libsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/0000755000175000017500000000000012206742610021720 5ustar gregoagregoalibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/MANIFEST0000644000175000017500000001750012206742610023054 0ustar gregoagregoabin/hl-kate-convert bin/hlansi.pl bin/hlhtml.pl bin/regen.pl Changes eg/kate.pl inc/Module/Install.pm inc/Module/Install/Base.pm inc/Module/Install/Can.pm inc/Module/Install/Fetch.pm inc/Module/Install/Makefile.pm inc/Module/Install/Metadata.pm inc/Module/Install/Win32.pm inc/Module/Install/WriteAll.pm lib/Syntax/Highlight/Engine/Kate.pm lib/Syntax/Highlight/Engine/Kate/ABC.pm lib/Syntax/Highlight/Engine/Kate/Ada.pm lib/Syntax/Highlight/Engine/Kate/AHDL.pm lib/Syntax/Highlight/Engine/Kate/Alerts.pm lib/Syntax/Highlight/Engine/Kate/All.pm lib/Syntax/Highlight/Engine/Kate/ANSI_C89.pm lib/Syntax/Highlight/Engine/Kate/Ansys.pm lib/Syntax/Highlight/Engine/Kate/Apache_Configuration.pm lib/Syntax/Highlight/Engine/Kate/Asm6502.pm lib/Syntax/Highlight/Engine/Kate/ASP.pm lib/Syntax/Highlight/Engine/Kate/AVR_Assembler.pm lib/Syntax/Highlight/Engine/Kate/AWK.pm lib/Syntax/Highlight/Engine/Kate/BaseTest.pm lib/Syntax/Highlight/Engine/Kate/BaseTestchild.pm lib/Syntax/Highlight/Engine/Kate/Bash.pm lib/Syntax/Highlight/Engine/Kate/BibTeX.pm lib/Syntax/Highlight/Engine/Kate/C.pm lib/Syntax/Highlight/Engine/Kate/Cdash.pm lib/Syntax/Highlight/Engine/Kate/Cg.pm lib/Syntax/Highlight/Engine/Kate/CGiS.pm lib/Syntax/Highlight/Engine/Kate/ChangeLog.pm lib/Syntax/Highlight/Engine/Kate/Cisco.pm lib/Syntax/Highlight/Engine/Kate/Clipper.pm lib/Syntax/Highlight/Engine/Kate/CMake.pm lib/Syntax/Highlight/Engine/Kate/ColdFusion.pm lib/Syntax/Highlight/Engine/Kate/Common_Lisp.pm lib/Syntax/Highlight/Engine/Kate/ComponentminusPascal.pm lib/Syntax/Highlight/Engine/Kate/Convert/ToolKit.pm lib/Syntax/Highlight/Engine/Kate/Convert/XMLData.pm lib/Syntax/Highlight/Engine/Kate/Cplusplus.pm lib/Syntax/Highlight/Engine/Kate/CSS.pm lib/Syntax/Highlight/Engine/Kate/CSS_PHP.pm lib/Syntax/Highlight/Engine/Kate/CUE_Sheet.pm lib/Syntax/Highlight/Engine/Kate/D.pm lib/Syntax/Highlight/Engine/Kate/De_DE.pm lib/Syntax/Highlight/Engine/Kate/Debian_Changelog.pm lib/Syntax/Highlight/Engine/Kate/Debian_Control.pm lib/Syntax/Highlight/Engine/Kate/Desktop.pm lib/Syntax/Highlight/Engine/Kate/Diff.pm lib/Syntax/Highlight/Engine/Kate/Doxygen.pm lib/Syntax/Highlight/Engine/Kate/E_Language.pm lib/Syntax/Highlight/Engine/Kate/Eiffel.pm lib/Syntax/Highlight/Engine/Kate/Email.pm lib/Syntax/Highlight/Engine/Kate/En_US.pm lib/Syntax/Highlight/Engine/Kate/Euphoria.pm lib/Syntax/Highlight/Engine/Kate/Ferite.pm lib/Syntax/Highlight/Engine/Kate/Fortran.pm lib/Syntax/Highlight/Engine/Kate/FourGL.pm lib/Syntax/Highlight/Engine/Kate/FourGLminusPER.pm lib/Syntax/Highlight/Engine/Kate/FreeBASIC.pm lib/Syntax/Highlight/Engine/Kate/GDL.pm lib/Syntax/Highlight/Engine/Kate/GLSL.pm lib/Syntax/Highlight/Engine/Kate/GNU_Assembler.pm lib/Syntax/Highlight/Engine/Kate/GNU_Gettext.pm lib/Syntax/Highlight/Engine/Kate/Haskell.pm lib/Syntax/Highlight/Engine/Kate/HTML.pm lib/Syntax/Highlight/Engine/Kate/IDL.pm lib/Syntax/Highlight/Engine/Kate/ILERPG.pm lib/Syntax/Highlight/Engine/Kate/Inform.pm lib/Syntax/Highlight/Engine/Kate/INI_Files.pm lib/Syntax/Highlight/Engine/Kate/Intel_x86_NASM.pm lib/Syntax/Highlight/Engine/Kate/Java.pm lib/Syntax/Highlight/Engine/Kate/Javadoc.pm lib/Syntax/Highlight/Engine/Kate/JavaScript.pm lib/Syntax/Highlight/Engine/Kate/JavaScript_PHP.pm lib/Syntax/Highlight/Engine/Kate/JSP.pm lib/Syntax/Highlight/Engine/Kate/Kate_File_Template.pm lib/Syntax/Highlight/Engine/Kate/KBasic.pm lib/Syntax/Highlight/Engine/Kate/LaTeX.pm lib/Syntax/Highlight/Engine/Kate/LDIF.pm lib/Syntax/Highlight/Engine/Kate/Lex_Flex.pm lib/Syntax/Highlight/Engine/Kate/LilyPond.pm lib/Syntax/Highlight/Engine/Kate/Literate_Haskell.pm lib/Syntax/Highlight/Engine/Kate/Logtalk.pm lib/Syntax/Highlight/Engine/Kate/LPC.pm lib/Syntax/Highlight/Engine/Kate/Lua.pm lib/Syntax/Highlight/Engine/Kate/M3U.pm lib/Syntax/Highlight/Engine/Kate/MABminusDB.pm lib/Syntax/Highlight/Engine/Kate/Makefile.pm lib/Syntax/Highlight/Engine/Kate/Mason.pm lib/Syntax/Highlight/Engine/Kate/Matlab.pm lib/Syntax/Highlight/Engine/Kate/MIPS_Assembler.pm lib/Syntax/Highlight/Engine/Kate/Modulaminus2.pm lib/Syntax/Highlight/Engine/Kate/Music_Publisher.pm lib/Syntax/Highlight/Engine/Kate/Nl.pm lib/Syntax/Highlight/Engine/Kate/Objective_Caml.pm lib/Syntax/Highlight/Engine/Kate/ObjectiveminusC.pm lib/Syntax/Highlight/Engine/Kate/Octave.pm lib/Syntax/Highlight/Engine/Kate/Pascal.pm lib/Syntax/Highlight/Engine/Kate/Perl.pm lib/Syntax/Highlight/Engine/Kate/Perl6.pm lib/Syntax/Highlight/Engine/Kate/PHP_HTML.pm lib/Syntax/Highlight/Engine/Kate/PHP_PHP.pm lib/Syntax/Highlight/Engine/Kate/PicAsm.pm lib/Syntax/Highlight/Engine/Kate/Pike.pm lib/Syntax/Highlight/Engine/Kate/PostScript.pm lib/Syntax/Highlight/Engine/Kate/POVminusRay.pm lib/Syntax/Highlight/Engine/Kate/Progress.pm lib/Syntax/Highlight/Engine/Kate/Prolog.pm lib/Syntax/Highlight/Engine/Kate/PureBasic.pm lib/Syntax/Highlight/Engine/Kate/Python.pm lib/Syntax/Highlight/Engine/Kate/Quake_Script.pm lib/Syntax/Highlight/Engine/Kate/R_Script.pm lib/Syntax/Highlight/Engine/Kate/RenderMan_RIB.pm lib/Syntax/Highlight/Engine/Kate/REXX.pm lib/Syntax/Highlight/Engine/Kate/RPM_Spec.pm lib/Syntax/Highlight/Engine/Kate/RSI_IDL.pm lib/Syntax/Highlight/Engine/Kate/Ruby.pm lib/Syntax/Highlight/Engine/Kate/Sather.pm lib/Syntax/Highlight/Engine/Kate/Scheme.pm lib/Syntax/Highlight/Engine/Kate/Scilab.pm lib/Syntax/Highlight/Engine/Kate/SGML.pm lib/Syntax/Highlight/Engine/Kate/Sieve.pm lib/Syntax/Highlight/Engine/Kate/SML.pm lib/Syntax/Highlight/Engine/Kate/Spice.pm lib/Syntax/Highlight/Engine/Kate/SQL.pm lib/Syntax/Highlight/Engine/Kate/SQL_MySQL.pm lib/Syntax/Highlight/Engine/Kate/SQL_PostgreSQL.pm lib/Syntax/Highlight/Engine/Kate/Stata.pm lib/Syntax/Highlight/Engine/Kate/TaskJuggler.pm lib/Syntax/Highlight/Engine/Kate/Tcl_Tk.pm lib/Syntax/Highlight/Engine/Kate/Template.pm lib/Syntax/Highlight/Engine/Kate/TI_Basic.pm lib/Syntax/Highlight/Engine/Kate/Txt2tags.pm lib/Syntax/Highlight/Engine/Kate/UnrealScript.pm lib/Syntax/Highlight/Engine/Kate/Velocity.pm lib/Syntax/Highlight/Engine/Kate/Verilog.pm lib/Syntax/Highlight/Engine/Kate/VHDL.pm lib/Syntax/Highlight/Engine/Kate/VRML.pm lib/Syntax/Highlight/Engine/Kate/Wikimedia.pm lib/Syntax/Highlight/Engine/Kate/WINE_Config.pm lib/Syntax/Highlight/Engine/Kate/XHarbour.pm lib/Syntax/Highlight/Engine/Kate/XML.pm lib/Syntax/Highlight/Engine/Kate/XML_Debug.pm lib/Syntax/Highlight/Engine/Kate/Xorg_Configuration.pm lib/Syntax/Highlight/Engine/Kate/Xslt.pm lib/Syntax/Highlight/Engine/Kate/Yacas.pm lib/Syntax/Highlight/Engine/Kate/Yacc_Bison.pm Makefile.PL MANIFEST This list of files META.yml MYMETA.json MYMETA.yml README REGISTERED samples/highlight.abc samples/highlight.ahdl samples/highlight.asm samples/highlight.asm-nasm samples/highlight.asp samples/highlight.awk samples/highlight.basetest samples/highlight.bib samples/highlight.cmake samples/highlight.cpp samples/highlight.css samples/highlight.desktop samples/highlight.do samples/highlight.dox samples/highlight.e samples/highlight.eml samples/highlight.exu samples/highlight.f90 samples/highlight.glsl samples/highlight.hs samples/highlight.html samples/highlight.js samples/highlight.jsp samples/highlight.lex samples/highlight.lhs samples/highlight.lisp samples/highlight.ly samples/highlight.m samples/highlight.m3u samples/highlight.pb samples/highlight.php samples/highlight.pike samples/highlight.pl samples/highlight.pov samples/highlight.prg samples/highlight.ps samples/highlight.py samples/highlight.rb samples/highlight.rib samples/highlight.scheme samples/highlight.sh samples/highlight.sp samples/highlight.tcl samples/highlight.tex samples/highlight.uc samples/highlight.wrl samples/highlight.xml samples/highlight.xsl samples/highlight.y samples/highlight_lpc.c samples/highlight_ocaml.ml samples/highlight_octave.m samples/xorg.conf t/02-perl.t t/Kate.t t/lib/TestHighlight.pm t/perl/before/kate.pl t/perl/before/maze.pl t/perl/before/template.pl t/perl/highlighted/kate.pl t/perl/highlighted/maze.pl t/perl/highlighted/template.pl t/perl_highlighting.t t/perl_todo.t libsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/Changes0000644000175000017500000000325312150556505023222 0ustar gregoagregoaRevision history for Perl extension Syntax::Highlight::Engine::Kate. 0.08 2013.05.27 - Add stub files Syntax::Highlight::Engine::Kate::BaseTest and Syntax::Highlight::Engine::Kate::BaseTestchild to kick the old ones out of the PAUSE index. #85463 0.07 2012.09.23 - fixed some errors in the BibTeX-related documentation (ZENOG) - revisited conversion of Kate's highlight definitions (Jan Pokorny) - Added some regression tests (Ovid) - Some cleanup and adding conversion script (jnpkrn) 0.06 2009.07.23 - Fixing #45512: broken test by silencing the warnings - Switch to use Test::More - Switch to Module::Install 0.05 Mon Jun 8 2009 - Released by Gabor Szabo - Adding test and fixing RT bug #36328: no BaseTest and BaseTestchild modules 0.04 04 Feb 2008 0.03 Sun Feb 3 2008 - Fixed countless errors. - Added support for Ansys, Apache Configuration, Email, FreeBASIC, Kate File Template, de_DE, en_EN, nl, M3U, Wikimedia, x.org Configuration - No more 16 Mb output at make test 0.02 Wed Nov 01 2006 - Fixed bug in Perl with the q' ' construct. - Fixed bug in Template where testDetectSpaces would include a newline. - Moved all highlighting Methods from Kate to Template, so plugins can now function standalone. - Fixed reset, it did not work properly if Kate was screwed up by bugs, now it does. - Updated documentation. - Fixed startup penalty for Kate. Kate does not load all plugins at atartup, but searches for them programmatically. - Rewrote testing, Windows OS should now be able to cope with the length of the test-harness commandline. - Optimized testmethods in Template, gained some speed. 0.01 Mon May 29 2006 - First release libsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/MYMETA.json0000644000175000017500000000255212150556617023623 0ustar gregoagregoa{ "abstract" : "a port to Perl of the syntax highlight engine of the Kate texteditor.", "author" : [ "Hans Jeuken" ], "dynamic_config" : 0, "generated_by" : "Module::Install version 1.06, CPAN::Meta::Converter version 2.120921", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "Syntax-Highlight-Engine-Kate", "no_index" : { "directory" : [ "eg", "inc", "t" ] }, "prereqs" : { "build" : { "requires" : { "ExtUtils::MakeMaker" : "6.59", "Term::ANSIColor" : "0", "Test::Differences" : "0.61", "Test::More" : "0.88" } }, "configure" : { "requires" : { "ExtUtils::MakeMaker" : "6.59" } }, "runtime" : { "requires" : { "Carp" : "0", "Data::Dumper" : "0", "File::Basename" : "0", "perl" : "5.006" } } }, "release_status" : "stable", "resources" : { "homepage" : "http://padre.perlide.org/", "license" : [ "http://dev.perl.org/licenses/" ], "repository" : { "url" : "https://github.com/szabgab/Syntax-Highlight-Engine-Kate" } }, "version" : "0.07" } libsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/README0000644000175000017500000000151511735774352022620 0ustar gregoagregoaSyntax-Highlight-Engine-Kate version 0.01 ========================================= INSTALLATION To install this module type the following: perl Makefile.PL make make test make install DEMOS Following demos have been provided. hlhtml.pl and hlansi.pl. After the make command you may want to try something like: cat bin/hlhtml.pl | perl -Mblib bin/hlansi.pl Perl or cat bin/hlhtml.pl | perl -Mblib bin/hlhtml.pl Perl > tst.html just to get an overview of what this module actually does. COPYRIGHT AND LICENCE Put the correct copyright and licence information here. Copyright (C) 2006 by Hans Jeuken This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.3 or, at your option, any later version of Perl 5 you may have available. libsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/MYMETA.yml0000644000175000017500000000144712150556617023455 0ustar gregoagregoa--- abstract: 'a port to Perl of the syntax highlight engine of the Kate texteditor.' author: - 'Hans Jeuken' build_requires: ExtUtils::MakeMaker: 6.59 Term::ANSIColor: 0 Test::Differences: 0.61 Test::More: 0.88 configure_requires: ExtUtils::MakeMaker: 6.59 dynamic_config: 0 generated_by: 'Module::Install version 1.06, CPAN::Meta::Converter version 2.120921' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: 1.4 name: Syntax-Highlight-Engine-Kate no_index: directory: - eg - inc - t requires: Carp: 0 Data::Dumper: 0 File::Basename: 0 perl: 5.006 resources: homepage: http://padre.perlide.org/ license: http://dev.perl.org/licenses/ repository: https://github.com/szabgab/Syntax-Highlight-Engine-Kate version: 0.07 libsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/eg/0000755000175000017500000000000012150557146022321 5ustar gregoagregoalibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/eg/kate.pl0000755000175000017500000000072612027556043023610 0ustar gregoagregoa#!/usr/bin/perl use strict; use warnings FATAL => 'all'; use Data::Dumper; use File::Slurp qw(slurp); use Syntax::Highlight::Engine::Kate::All; use Syntax::Highlight::Engine::Kate; my $kate = Syntax::Highlight::Engine::Kate->new( language => 'Perl', ); my $text = slurp(shift); my @hl = $kate->highlight($text); print "==\n"; #print Dumper \@hl; while (@hl) { my $string = shift @hl; my $type = shift @hl; $type ||= 'Normal'; print "'$string' '$type'\n"; } libsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/t/0000755000175000017500000000000012150557146022171 5ustar gregoagregoalibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/t/Kate.t0000755000175000017500000000572411735774352023265 0ustar gregoagregoause strict; use Term::ANSIColor; use Test::More; my %reg = (); open RG, ") { chomp($t); my ($lang, $testfile) = split /\t/, $t; unless (defined($testfile)) { $testfile = "" } #diag "#language $lang, samplefile, ;$testfile; quovadis"; $reg{$lang} = $testfile; } close RG; my %filetypes = ( '../some/path/index.html' => 'HTML', 'Module.pm' => 'Perl', 'c:\\Documents and Settings\\My Documents\\settings.xml' => 'XML', ); my %options = ( substitutions => { "\n" => color('reset') . "\n", }, format_table => { Alert => [color('white bold on_green'), color('reset')], BaseN => [color('green'), color('reset')], BString => [color('red bold'), color('reset')], Char => [color('magenta'), color('reset')], Comment => [color('white bold on_blue'), color('reset')], DataType => [color('blue'), color('reset')], DecVal => [color('blue bold'), color('reset')], Error => [color('yellow bold on_red'), color('reset')], Float => [color('blue bold'), color('reset')], Function => [color('yellow bold on_blue'), color('reset')], IString => [color('red'), color('reset')], Keyword => [color('bold'), color('reset')], Normal => [color('reset'), color('reset')], Operator => [color('green'), color('reset')], Others => [color('yellow bold on_green'), color('reset')], RegionMarker => [color('black on_yellow bold'), color('reset')], Reserved => [color('magenta on_blue'), color('reset')], String => [color('red'), color('reset')], Variable => [color('blue on_red bold'), color('reset')], Warning => [color('green bold on_red'), color('reset')], }, ); my @langl = sort keys %reg; my @ftl = sort keys %filetypes; my $numtest = (@langl * 4) + 2 + (@ftl * 2); plan tests => $numtest; use Syntax::Highlight::Engine::Kate; ok(1, "cannot find Kate"); my $k = new Syntax::Highlight::Engine::Kate(%options); ok(defined($k), "cannot create Kate"); for (@ftl) { my $t = $_; my $l = $k->languagePropose($t); is($l, $filetypes{$t}, "Cannot select correct filetype for $t"); $k->languageAutoSet($t); is($k->language, $filetypes{$t}, "Cannot select correct filetype for $t"); } for (@langl) { my $ln = $_; #diag "testing $ln"; my $md = $k->syntaxes->{$ln}; my $mod = "Syntax::Highlight::Engine::Kate::$md"; eval "use $mod"; is($@, "", "cannot find $mod"); my $m = new $mod(%options); ok(defined($m), "cannot create $mod"); my $fl = $reg{$ln}; if ($fl ne "") { my $txt = ""; open(TST, "<$fl") or die "cannot open $fl"; while () { $txt = $txt . $_; }; close TST; my $res = ""; #diag "testing as kate plugin"; $k->language($ln); $k->reset; eval "\$res = \$k->highlightText(\$txt)"; is($@, "", "errors when highlighting"); # diag $res; #diag "testing standalone"; eval "\$res = \$m->highlightText(\$txt)"; is($@, "", "errors when highlighting"); # diag $res; } else { diag "Should be SKIP-ed! '$ln'"; ok(1); ok(1); #skip(1, "no test file"); #skip(1, "no test file"); } } libsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/t/02-perl.t0000644000175000017500000000053411736037062023540 0ustar gregoagregoa use strict; use warnings; use Test::More; use Syntax::Highlight::Engine::Kate; my @languages = ('Perl', 'PHP (HTML)', 'PHP/PHP'); plan tests => scalar @languages; foreach my $language (@languages) { my $hl = Syntax::Highlight::Engine::Kate->new( language => $language, ); isa_ok($hl, 'Syntax::Highlight::Engine::Kate'); } libsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/t/lib/0000755000175000017500000000000012150557146022737 5ustar gregoagregoalibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/t/lib/TestHighlight.pm0000644000175000017500000000474411736037062026054 0ustar gregoagregoapackage TestHighlight; use warnings; use Syntax::Highlight::Engine::Kate; use File::Find; use File::Spec::Functions 'catfile'; use Exporter 'import'; our @EXPORT_OK = qw( get_highlighter highlight_perl slurp get_sample_perl_files ); our %EXPORT_TAGS = ( all => \@EXPORT_OK ); my ( $BEFORE, $HIGHLIGHTED ) = ( 't/perl/before', 't/perl/highlighted' ); =head1 EXPORT =over 4 =item * get_highlighter my $highlighter = get_highlighter($language); Returns a new C highlighter for testing. Defaults to Perl if no language specified. All tokens are wrapped in tags corresponding to the token type: my =item * slurp Slurps and returns the contents of a file. =teim * get_sample_perl_files my $files = get_sample_perl_files(); while ( my ( $perl, $highlighted ) = each %$files ) { ... } Returns a hashref. Keys are the names of the raw Perl files in F and values are the filenames of the highlighted versions found in F. See F to understand how to regenerate these fixtures. See F for an example of testing with this. =back =cut sub highlight_perl { my $code = shift; return get_highlighter('Perl')->highlightText($code); } sub get_highlighter { my $syntax = shift || 'Perl'; return Syntax::Highlight::Engine::Kate->new( language => $syntax, format_table => { map { _make_token($_) } qw/ Alert BaseN BString Char Comment DataType DecVal Error Float Function IString Keyword Normal Operator Others RegionMarker Reserved String Variable Warning / } ); } sub _make_token { my $name = shift; my $token = lc $name; return $name => [ "<$token>" => "" ]; } sub slurp { my $file = shift; open my $fh, '<', $file or die "Cannot open $file for reading: $!"; return do { local $/; <$fh> }; } sub get_sample_perl_files { my %highlighted_file_for; find( sub { $highlighted_file_for{ catfile( $BEFORE, $_ ) } = catfile( $HIGHLIGHTED, $_ ) if -f $_ && /\.pl$/; }, $BEFORE ); return \%highlighted_file_for; } 1; libsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/t/perl/0000755000175000017500000000000012150557146023133 5ustar gregoagregoalibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/t/perl/highlighted/0000755000175000017500000000000012150557146025413 5ustar gregoagregoalibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/t/perl/highlighted/kate.pl0000644000175000017500000043145311736037062026705 0ustar gregoagregoa # Copyright (c) 2006 Hans Jeuken. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. package Syntax::Highlight::Engine::Kate; use 5.006; our $VERSION = '0.06'; use strict; use warnings; use Carp; use Data::Dumper; use File::Basename; use base('Syntax::Highlight::Engine::Kate::Template'); sub new { my $proto = shift; my $class = ref($proto) || $proto; my %args = (@_); my $add = delete $args{'plugins'}; unless (defined($add)) { $add = [] }; my $language = delete $args{'language'}; unless (defined($language)) { $language = 'Off' }; my $self = $class->SUPER::new(%args); $self->{'plugins'} = {}; #begin autoinsert $self->{'extensions'} = { ' *.cls' => ['LaTeX', ], ' *.dtx' => ['LaTeX', ], ' *.ltx' => ['LaTeX', ], ' *.sty' => ['LaTeX', ], '*.4GL' => ['4GL', ], '*.4gl' => ['4GL', ], '*.ABC' => ['ABC', ], '*.ASM' => ['AVR Assembler', 'PicAsm', ], '*.BAS' => ['FreeBASIC', ], '*.BI' => ['FreeBASIC', ], '*.C' => ['C++', 'C', 'ANSI C89', ], '*.D' => ['D', ], '*.F' => ['Fortran', ], '*.F90' => ['Fortran', ], '*.F95' => ['Fortran', ], '*.FOR' => ['Fortran', ], '*.FPP' => ['Fortran', ], '*.GDL' => ['GDL', ], '*.H' => ['C++', ], '*.JSP' => ['JSP', ], '*.LOGO' => ['de_DE', 'en_US', 'nl', ], '*.LY' => ['LilyPond', ], '*.Logo' => ['de_DE', 'en_US', 'nl', ], '*.M' => ['Matlab', 'Octave', ], '*.MAB' => ['MAB-DB', ], '*.Mab' => ['MAB-DB', ], '*.PER' => ['4GL-PER', ], '*.PIC' => ['PicAsm', ], '*.PRG' => ['xHarbour', 'Clipper', ], '*.R' => ['R Script', ], '*.S' => ['GNU Assembler', ], '*.SQL' => ['SQL', 'SQL (MySQL)', 'SQL (PostgreSQL)', ], '*.SRC' => ['PicAsm', ], '*.V' => ['Verilog', ], '*.VCG' => ['GDL', ], '*.a' => ['Ada', ], '*.abc' => ['ABC', ], '*.ada' => ['Ada', ], '*.adb' => ['Ada', ], '*.ado' => ['Stata', ], '*.ads' => ['Ada', ], '*.ahdl' => ['AHDL', ], '*.ai' => ['PostScript', ], '*.ans' => ['Ansys', ], '*.asm' => ['AVR Assembler', 'Asm6502', 'Intel x86 (NASM)', 'PicAsm', ], '*.asm-avr' => ['AVR Assembler', ], '*.asp' => ['ASP', ], '*.awk' => ['AWK', ], '*.bas' => ['FreeBASIC', ], '*.basetest' => ['BaseTest', ], '*.bash' => ['Bash', ], '*.bi' => ['FreeBASIC', ], '*.bib' => ['BibTeX', ], '*.bro' => ['Component-Pascal', ], '*.c' => ['C', 'ANSI C89', 'LPC', ], '*.c++' => ['C++', ], '*.cc' => ['C++', ], '*.cfc' => ['ColdFusion', ], '*.cfg' => ['Quake Script', ], '*.cfm' => ['ColdFusion', ], '*.cfml' => ['ColdFusion', ], '*.cg' => ['Cg', ], '*.cgis' => ['CGiS', ], '*.ch' => ['xHarbour', 'Clipper', ], '*.cis' => ['Cisco', ], '*.cl' => ['Common Lisp', ], '*.cmake' => ['CMake', ], '*.config' => ['Logtalk', ], '*.cp' => ['Component-Pascal', ], '*.cpp' => ['C++', ], '*.cs' => ['C#', ], '*.css' => ['CSS', ], '*.cue' => ['CUE Sheet', ], '*.cxx' => ['C++', ], '*.d' => ['D', ], '*.daml' => ['XML', ], '*.dbm' => ['ColdFusion', ], '*.def' => ['Modula-2', ], '*.desktop' => ['.desktop', ], '*.diff' => ['Diff', ], '*.do' => ['Stata', ], '*.docbook' => ['XML', ], '*.dox' => ['Doxygen', ], '*.doxygen' => ['Doxygen', ], '*.e' => ['E Language', 'Eiffel', 'Euphoria', ], '*.ebuild' => ['Bash', ], '*.eclass' => ['Bash', ], '*.eml' => ['Email', ], '*.eps' => ['PostScript', ], '*.err' => ['4GL', ], '*.ex' => ['Euphoria', ], '*.exu' => ['Euphoria', ], '*.exw' => ['Euphoria', ], '*.f' => ['Fortran', ], '*.f90' => ['Fortran', ], '*.f95' => ['Fortran', ], '*.fe' => ['ferite', ], '*.feh' => ['ferite', ], '*.flex' => ['Lex/Flex', ], '*.for' => ['Fortran', ], '*.fpp' => ['Fortran', ], '*.frag' => ['GLSL', ], '*.gdl' => ['GDL', ], '*.glsl' => ['GLSL', ], '*.guile' => ['Scheme', ], '*.h' => ['C++', 'C', 'ANSI C89', 'Inform', 'LPC', 'Objective-C', ], '*.h++' => ['C++', ], '*.hcc' => ['C++', ], '*.hpp' => ['C++', ], '*.hs' => ['Haskell', ], '*.hsp' => ['Spice', ], '*.ht' => ['Apache Configuration', ], '*.htm' => ['HTML', ], '*.html' => ['HTML', 'Mason', ], '*.hxx' => ['C++', ], '*.i' => ['progress', ], '*.idl' => ['IDL', ], '*.inc' => ['POV-Ray', 'PHP (HTML)', 'LPC', ], '*.inf' => ['Inform', ], '*.ini' => ['INI Files', ], '*.java' => ['Java', ], '*.js' => ['JavaScript', ], '*.jsp' => ['JSP', ], '*.katetemplate' => ['Kate File Template', ], '*.kbasic' => ['KBasic', ], '*.kdelnk' => ['.desktop', ], '*.l' => ['Lex/Flex', ], '*.ldif' => ['LDIF', ], '*.lex' => ['Lex/Flex', ], '*.lgo' => ['de_DE', 'en_US', 'nl', ], '*.lgt' => ['Logtalk', ], '*.lhs' => ['Literate Haskell', ], '*.lisp' => ['Common Lisp', ], '*.logo' => ['de_DE', 'en_US', 'nl', ], '*.lsp' => ['Common Lisp', ], '*.lua' => ['Lua', ], '*.ly' => ['LilyPond', ], '*.m' => ['Matlab', 'Objective-C', 'Octave', ], '*.m3u' => ['M3U', ], '*.mab' => ['MAB-DB', ], '*.md' => ['Modula-2', ], '*.mi' => ['Modula-2', ], '*.ml' => ['Objective Caml', 'SML', ], '*.mli' => ['Objective Caml', ], '*.moc' => ['C++', ], '*.mod' => ['Modula-2', ], '*.mup' => ['Music Publisher', ], '*.not' => ['Music Publisher', ], '*.o' => ['LPC', ], '*.octave' => ['Octave', ], '*.p' => ['Pascal', 'progress', ], '*.pas' => ['Pascal', ], '*.pb' => ['PureBasic', ], '*.per' => ['4GL-PER', ], '*.per.err' => ['4GL-PER', ], '*.php' => ['PHP (HTML)', ], '*.php3' => ['PHP (HTML)', ], '*.phtm' => ['PHP (HTML)', ], '*.phtml' => ['PHP (HTML)', ], '*.pic' => ['PicAsm', ], '*.pike' => ['Pike', ], '*.pl' => ['Perl', ], '*.pls' => ['INI Files', ], '*.pm' => ['Perl', ], '*.po' => ['GNU Gettext', ], '*.pot' => ['GNU Gettext', ], '*.pov' => ['POV-Ray', ], '*.pp' => ['Pascal', ], '*.prg' => ['xHarbour', 'Clipper', ], '*.pro' => ['RSI IDL', ], '*.prolog' => ['Prolog', ], '*.ps' => ['PostScript', ], '*.py' => ['Python', ], '*.pyw' => ['Python', ], '*.rb' => ['Ruby', ], '*.rc' => ['XML', ], '*.rdf' => ['XML', ], '*.reg' => ['WINE Config', ], '*.rex' => ['REXX', ], '*.rib' => ['RenderMan RIB', ], '*.s' => ['GNU Assembler', 'MIPS Assembler', ], '*.sa' => ['Sather', ], '*.sce' => ['scilab', ], '*.scheme' => ['Scheme', ], '*.sci' => ['scilab', ], '*.scm' => ['Scheme', ], '*.sgml' => ['SGML', ], '*.sh' => ['Bash', ], '*.shtm' => ['HTML', ], '*.shtml' => ['HTML', ], '*.siv' => ['Sieve', ], '*.sml' => ['SML', ], '*.sp' => ['Spice', ], '*.spec' => ['RPM Spec', ], '*.sql' => ['SQL', 'SQL (MySQL)', 'SQL (PostgreSQL)', ], '*.src' => ['PicAsm', ], '*.ss' => ['Scheme', ], '*.t2t' => ['txt2tags', ], '*.tcl' => ['Tcl/Tk', ], '*.tdf' => ['AHDL', ], '*.tex' => ['LaTeX', ], '*.tji' => ['TaskJuggler', ], '*.tjp' => ['TaskJuggler', ], '*.tk' => ['Tcl/Tk', ], '*.tst' => ['BaseTestchild', ], '*.uc' => ['UnrealScript', ], '*.v' => ['Verilog', ], '*.vcg' => ['GDL', ], '*.vert' => ['GLSL', ], '*.vhd' => ['VHDL', ], '*.vhdl' => ['VHDL', ], '*.vl' => ['Verilog', ], '*.vm' => ['Velocity', ], '*.w' => ['progress', ], '*.wml' => ['PHP (HTML)', ], '*.wrl' => ['VRML', ], '*.xml' => ['XML', ], '*.xsl' => ['xslt', ], '*.xslt' => ['xslt', ], '*.y' => ['Yacc/Bison', ], '*.ys' => ['yacas', ], '*Makefile*' => ['Makefile', ], '*makefile*' => ['Makefile', ], '*patch' => ['Diff', ], 'CMakeLists.txt' => ['CMake', ], 'ChangeLog' => ['ChangeLog', ], 'QRPGLESRC.*' => ['ILERPG', ], 'apache.conf' => ['Apache Configuration', ], 'apache2.conf' => ['Apache Configuration', ], 'httpd.conf' => ['Apache Configuration', ], 'httpd2.conf' => ['Apache Configuration', ], 'xorg.conf' => ['x.org Configuration', ], }; $self->{'sections'} = { 'Assembler' => [ 'AVR Assembler', 'Asm6502', 'GNU Assembler', 'Intel x86 (NASM)', 'MIPS Assembler', 'PicAsm', ], 'Configuration' => [ '.desktop', 'Apache Configuration', 'Cisco', 'INI Files', 'WINE Config', 'x.org Configuration', ], 'Database' => [ '4GL', '4GL-PER', 'LDIF', 'SQL', 'SQL (MySQL)', 'SQL (PostgreSQL)', 'progress', ], 'Hardware' => [ 'AHDL', 'Spice', 'VHDL', 'Verilog', ], 'Logo' => [ 'de_DE', 'en_US', 'nl', ], 'Markup' => [ 'ASP', 'BibTeX', 'CSS', 'ColdFusion', 'Doxygen', 'GNU Gettext', 'HTML', 'JSP', 'Javadoc', 'Kate File Template', 'LaTeX', 'MAB-DB', 'PostScript', 'SGML', 'VRML', 'Wikimedia', 'XML', 'txt2tags', 'xslt', ], 'Other' => [ 'ABC', 'Alerts', 'CMake', 'CSS/PHP', 'CUE Sheet', 'ChangeLog', 'Debian Changelog', 'Debian Control', 'Diff', 'Email', 'JavaScript/PHP', 'LilyPond', 'M3U', 'Makefile', 'Music Publisher', 'POV-Ray', 'RPM Spec', 'RenderMan RIB', ], 'Scientific' => [ 'GDL', 'Matlab', 'Octave', 'TI Basic', 'scilab', ], 'Script' => [ 'Ansys', ], 'Scripts' => [ 'AWK', 'Bash', 'Common Lisp', 'Euphoria', 'JavaScript', 'Lua', 'Mason', 'PHP (HTML)', 'PHP/PHP', 'Perl', 'Pike', 'Python', 'Quake Script', 'R Script', 'REXX', 'Ruby', 'Scheme', 'Sieve', 'TaskJuggler', 'Tcl/Tk', 'UnrealScript', 'Velocity', 'ferite', ], 'Sources' => [ 'ANSI C89', 'Ada', 'C', 'C#', 'C++', 'CGiS', 'Cg', 'Clipper', 'Component-Pascal', 'D', 'E Language', 'Eiffel', 'Fortran', 'FreeBASIC', 'GLSL', 'Haskell', 'IDL', 'ILERPG', 'Inform', 'Java', 'KBasic', 'LPC', 'Lex/Flex', 'Literate Haskell', 'Logtalk', 'Modula-2', 'Objective Caml', 'Objective-C', 'Pascal', 'Prolog', 'PureBasic', 'RSI IDL', 'SML', 'Sather', 'Stata', 'Yacc/Bison', 'xHarbour', 'yacas', ], 'Test' => [ 'BaseTest', 'BaseTestchild', ], }; $self->{'syntaxes'} = { '.desktop' => 'Desktop', '4GL' => 'FourGL', '4GL-PER' => 'FourGLminusPER', 'ABC' => 'ABC', 'AHDL' => 'AHDL', 'ANSI C89' => 'ANSI_C89', 'ASP' => 'ASP', 'AVR Assembler' => 'AVR_Assembler', 'AWK' => 'AWK', 'Ada' => 'Ada', 'Alerts' => 'Alerts', 'Ansys' => 'Ansys', 'Apache Configuration' => 'Apache_Configuration', 'Asm6502' => 'Asm6502', 'BaseTest' => 'BaseTest', 'BaseTestchild' => 'BaseTestchild', 'Bash' => 'Bash', 'BibTeX' => 'BibTeX', 'C' => 'C', 'C#' => 'Cdash', 'C++' => 'Cplusplus', 'CGiS' => 'CGiS', 'CMake' => 'CMake', 'CSS' => 'CSS', 'CSS/PHP' => 'CSS_PHP', 'CUE Sheet' => 'CUE_Sheet', 'Cg' => 'Cg', 'ChangeLog' => 'ChangeLog', 'Cisco' => 'Cisco', 'Clipper' => 'Clipper', 'ColdFusion' => 'ColdFusion', 'Common Lisp' => 'Common_Lisp', 'Component-Pascal' => 'ComponentminusPascal', 'D' => 'D', 'Debian Changelog' => 'Debian_Changelog', 'Debian Control' => 'Debian_Control', 'Diff' => 'Diff', 'Doxygen' => 'Doxygen', 'E Language' => 'E_Language', 'Eiffel' => 'Eiffel', 'Email' => 'Email', 'Euphoria' => 'Euphoria', 'Fortran' => 'Fortran', 'FreeBASIC' => 'FreeBASIC', 'GDL' => 'GDL', 'GLSL' => 'GLSL', 'GNU Assembler' => 'GNU_Assembler', 'GNU Gettext' => 'GNU_Gettext', 'HTML' => 'HTML', 'Haskell' => 'Haskell', 'IDL' => 'IDL', 'ILERPG' => 'ILERPG', 'INI Files' => 'INI_Files', 'Inform' => 'Inform', 'Intel x86 (NASM)' => 'Intel_x86_NASM', 'JSP' => 'JSP', 'Java' => 'Java', 'JavaScript' => 'JavaScript', 'JavaScript/PHP' => 'JavaScript_PHP', 'Javadoc' => 'Javadoc', 'KBasic' => 'KBasic', 'Kate File Template' => 'Kate_File_Template', 'LDIF' => 'LDIF', 'LPC' => 'LPC', 'LaTeX' => 'LaTeX', 'Lex/Flex' => 'Lex_Flex', 'LilyPond' => 'LilyPond', 'Literate Haskell' => 'Literate_Haskell', 'Logtalk' => 'Logtalk', 'Lua' => 'Lua', 'M3U' => 'M3U', 'MAB-DB' => 'MABminusDB', 'MIPS Assembler' => 'MIPS_Assembler', 'Makefile' => 'Makefile', 'Mason' => 'Mason', 'Matlab' => 'Matlab', 'Modula-2' => 'Modulaminus2', 'Music Publisher' => 'Music_Publisher', 'Objective Caml' => 'Objective_Caml', 'Objective-C' => 'ObjectiveminusC', 'Octave' => 'Octave', 'PHP (HTML)' => 'PHP_HTML', 'PHP/PHP' => 'PHP_PHP', 'POV-Ray' => 'POVminusRay', 'Pascal' => 'Pascal', 'Perl' => 'Perl', 'PicAsm' => 'PicAsm', 'Pike' => 'Pike', 'PostScript' => 'PostScript', 'Prolog' => 'Prolog', 'PureBasic' => 'PureBasic', 'Python' => 'Python', 'Quake Script' => 'Quake_Script', 'R Script' => 'R_Script', 'REXX' => 'REXX', 'RPM Spec' => 'RPM_Spec', 'RSI IDL' => 'RSI_IDL', 'RenderMan RIB' => 'RenderMan_RIB', 'Ruby' => 'Ruby', 'SGML' => 'SGML', 'SML' => 'SML', 'SQL' => 'SQL', 'SQL (MySQL)' => 'SQL_MySQL', 'SQL (PostgreSQL)' => 'SQL_PostgreSQL', 'Sather' => 'Sather', 'Scheme' => 'Scheme', 'Sieve' => 'Sieve', 'Spice' => 'Spice', 'Stata' => 'Stata', 'TI Basic' => 'TI_Basic', 'TaskJuggler' => 'TaskJuggler', 'Tcl/Tk' => 'Tcl_Tk', 'UnrealScript' => 'UnrealScript', 'VHDL' => 'VHDL', 'VRML' => 'VRML', 'Velocity' => 'Velocity', 'Verilog' => 'Verilog', 'WINE Config' => 'WINE_Config', 'Wikimedia' => 'Wikimedia', 'XML' => 'XML', 'Yacc/Bison' => 'Yacc_Bison', 'de_DE' => 'De_DE', 'en_US' => 'En_US', 'ferite' => 'Ferite', 'nl' => 'Nl', 'progress' => 'Progress', 'scilab' => 'Scilab', 'txt2tags' => 'Txt2tags', 'x.org Configuration' => 'Xorg_Configuration', 'xHarbour' => 'XHarbour', 'xslt' => 'Xslt', 'yacas' => 'Yacas', }; #end autoinsert $self->{'language '} = ''; bless ($self, $class); if ($language ne '') { $self->language($language); } return $self; } sub extensions { my $self = shift; return $self->{'extensions'}; } #overriding Template's initialize method. now it should not do anything. sub initialize { my $cw = shift; } sub language { my $self = shift; if (@_) { $self->{'language'} = shift; $self->reset; } return $self->{'language'}; } sub languageAutoSet { my ($self, $file) = @_; my $lang = $self->languagePropose($file); if (defined $lang) { $self->language($lang) } else { $self->language('Off') } } sub languageList { my $self = shift; my $l = $self->{'syntaxes'}; return sort {uc($a) cmp uc($b)} keys %$l; } sub languagePropose { my ($self, $file) = @_; my $hsh = $self->extensions; foreach my $key (keys %$hsh) { my $reg = $key; $reg =~ s/\./\\./g; $reg =~ s/\+/\\+/g; $reg =~ s/\*/.*/g; $reg = "$reg\$"; if ($file =~ /$reg/) { return $hsh->{$key}->[0] } } return undef; } sub languagePlug { my ($self, $req) = @_; unless (exists($self->{'syntaxes'}->{$req})) { warn "undefined language: $req"; return undef; } return $self->{'syntaxes'}->{$req}; } sub reset { my $self = shift; my $lang = $self->language; if ($lang eq 'Off') { $self->stack([]); } else { my $plug = $self->pluginGet($lang); my $basecontext = $plug->basecontext; $self->stack([ [$plug, $basecontext] ]); } $self->out([]); $self->snippet(''); } sub sections { my $self = shift; return $self->{'sections'}; } sub syntaxes { my $self = shift; return $self->{'syntaxes'} } 1; __END__ =head1 NAME Syntax::Highlight::Engine::Kate - a port to Perl of the syntax highlight engine of the Kate texteditor. =head1 SYNOPSIS #if you want to create a compiled executable, you may want to do this: use Syntax::Highlight::Engine::Kate::All; use Syntax::Highlight::Engine::Kate; my $hl = new Syntax::Highlight::Engine::Kate( language => 'Perl', substitutions => { "<" => "<", ">" => ">", "&" => "&", " " => " ", "\t" => "   ", "\n" => "
\n",
}, format_table => { Alert => ["", ""], BaseN => ["", ""], BString => ["", ""], Char => ["", ""], Comment => ["", ""], DataType => ["", ""], DecVal => ["", ""], Error => ["", ""], Float => ["", ""], Function => ["", ""], IString => ["", ""], Keyword => ["", ""], Normal => ["", ""], Operator => ["", ""], Others => ["", ""], RegionMarker => ["", ""], Reserved => ["", ""], String => ["", ""], Variable => ["", ""], Warning => ["", ""], }, ); #or my $hl = new Syntax::Highlight::Engine::Kate::Perl( substitutions => { "<" => "<", ">" => ">", "&" => "&", " " => " ", "\t" => "   ", "\n" => "
\n",
}, format_table => { Alert => ["", ""], BaseN => ["", ""], BString => ["", ""], Char => ["", ""], Comment => ["", ""], DataType => ["", ""], DecVal => ["", ""], Error => ["", ""], Float => ["", ""], Function => ["", ""], IString => ["", ""], Keyword => ["", ""], Normal => ["", ""], Operator => ["", ""], Others => ["", ""], RegionMarker => ["", ""], Reserved => ["", ""], String => ["", ""], Variable => ["", ""], Warning => ["", ""], }, ); print "\n\n\n\n"; while (my $in = <>) { print $hl->highlightText($in); } print "\n\n"; =head1 DESCRIPTION Syntax::Highlight::Engine::Kate is a port to perl of the syntax highlight engine of the Kate text editor. The language xml files of kate have been rewritten to perl modules using a script. These modules function as plugins to this module. Syntax::Highlight::Engine::Kate inherits Syntax::Highlight::Engine::Kate::Template. =head1 OPTIONS =over 4 =item B Specify the language you want highlighted. look in the B section for supported languages. =item B If you created your own language plugins you may specify a list of them with this option. plugins => [ ["MyModuleName", "MyLanguageName", "*,ext1;*.ext2", "Section"], .... ] =item B This option must be specified if the B method needs to do anything usefull for you. All mentioned keys in the synopsis must be specified. =item B With this option you can specify additional formatting options. =back =head1 METHODS =over 4 =item B returns a reference to the extensions hash, =item B(I) Sets and returns the current language that is highlighted. when setting the language a reset is also done. =item B(I<$filename>); Suggests language name for the fiven file B<$filename> =item B returns a list of languages for which plugins have been defined. =item B(I<$language>); returns the module name of the plugin for B<$language> =item B(I<$filename>); Suggests language name for the fiven file B<$filename> =item B Returns a reference to the sections hash. =back =head1 ATTRIBUTES In the kate XML syntax files you find under the section B<> entries like . Kate is an editor so it is ok to have definitions for forground and background colors and so on. However, since this Module is supposed to be a more universal highlight engine, the attributes need to be fully abstract. In which case, Kate does not have enough default attributes defined to fullfill all needs. Kate defines the following standard attributes: B, B, B, B, B, B, B, B, B, B, B, B, B, B. This module leaves out the "ds" part and uses following additional attributes: B, B, B, B, B. I have modified the XML files so that each highlight mode would get it's own attribute. In quite a few cases still not enough attributes were defined. So in some languages different modes have the same attribute. =head1 PLUGINS Below an overview of existing plugins. All have been tested on use and can be created. The ones for which no samplefile is available are marked. Those marked OK have highlighted the testfile without appearant mistakes. This does not mean that all bugs are shaken out. LANGUAGE MODULE COMMENT ******** ****** ****** .desktop Desktop OK 4GL FourGL No sample file 4GL-PER FourGLminusPER No sample file ABC ABC OK AHDL AHDL OK ANSI C89 ANSI_C89 No sample file ASP ASP OK AVR Assembler AVR_Assembler OK AWK AWK OK Ada Ada No sample file Alerts OK hidden module Ansys Ansys No sample file Apache Configuration Apache_Configuration No sample file Asm6502 Asm6502 No sample file Bash Bash OK BibTeX BibTeX OK C C No sample file C# Cdash No sample file C++ Cplusplus OK CGiS CGiS No sample file CMake CMake OK CSS CSS OK CUE Sheet CUE_Sheet No sample file Cg Cg No sample file ChangeLog ChangeLog No sample file Cisco Cisco No sample file Clipper Clipper OK ColdFusion ColdFusion No sample file Common Lisp Common_Lisp OK Component-Pascal ComponentminusPascal No sample file D D No sample file Debian Changelog Debian_Changelog No sample file Debian Control Debian_Control No sample file Diff Diff No sample file Doxygen Doxygen OK E Language E_Language OK Eiffel Eiffel No sample file Email Email OK Euphoria Euphoria OK Fortran Fortran OK FreeBASIC FreeBASIC No sample file GDL GDL No sample file GLSL GLSL OK GNU Assembler GNU_Assembler No sample file GNU Gettext GNU_Gettext No sample file HTML HTML OK Haskell Haskell OK IDL IDL No sample file ILERPG ILERPG No sample file INI Files INI_Files No sample file Inform Inform No sample file Intel x86 (NASM) Intel_X86_NASM seems to have issues JSP JSP OK Java Java OK JavaScript JavaScript OK Javadoc Javadoc No sample file KBasic KBasic No sample file Kate File Template Kate_File_Template No sample file LDIF LDIF No sample file LPC LPC No sample file LaTeX LaTex OK Lex/Flex Lex_Flex OK LilyPond LilyPond OK Literate Haskell Literate_Haskell OK Lua Lua No sample file M3U M3U OK MAB-DB MABminusDB No sample file MIPS Assembler MIPS_Assembler No sample file Makefile Makefile No sample file Mason Mason No sample file Matlab Matlab has issues Modula-2 Modulaminus2 No sample file Music Publisher Music_Publisher No sample file Octave Octave OK PHP (HTML) PHP_HTML OK PHP_PHP OK hidden module POV-Ray POV_Ray OK Pascal Pascal No sample file Perl Perl OK PicAsm PicAsm OK Pike Pike OK PostScript PostScript OK Prolog Prolog No sample file PureBasic PureBasic OK Python Python OK Quake Script Quake_Script No sample file R Script R_Script No sample file REXX REXX No sample file RPM Spec RPM_Spec No sample file RSI IDL RSI_IDL No sample file RenderMan RIB RenderMan_RIB OK Ruby Ruby OK SGML SGML No sample file SML SML No sample file SQL SQL No sample file SQL (MySQL) SQL_MySQL No sample file SQL (PostgreSQL) SQL_PostgreSQL No sample file Sather Sather No sample file Scheme Scheme OK Sieve Sieve No sample file Spice Spice OK Stata Stata OK TI Basic TI_Basic No sample file TaskJuggler TaskJuggler No sample file Tcl/Tk TCL_Tk OK UnrealScript UnrealScript OK VHDL VHDL No sample file VRML VRML OK Velocity Velocity No sample file Verilog Verilog No sample file WINE Config WINE_Config No sample file Wikimedia Wikimedia No sample file XML XML OK XML (Debug) XML_Debug No sample file Yacc/Bison Yacc_Bison OK de_DE De_DE No sample file en_EN En_EN No sample file ferite Ferite No sample file nl Nl No sample file progress Progress No sample file scilab Scilab No sample file txt2tags Txt2tags No sample file x.org Configuration X_org_Configuration OK xHarbour XHarbour OK xslt Xslt No sample file yacas Yacas No sample file =head1 BUGS Float is detected differently than in the Kate editor. The regular expression engine of the Kate editor, qregexp, appears to be more tolerant to mistakes in regular expressions than perl. This might lead to error messages and differences in behaviour. Most of the problems were sorted out while developing, because error messages appeared. For as far as differences in behaviour is concerned, testing is the only way to find out, so i hope the users out there will be able to tell me more. This module is mimicking the behaviour of the syntax highlight engine of the Kate editor. If you find a bug/mistake in the highlighting, please check if Kate behaves in the same way. If yes, the cause is likely to be found there. =head1 TO DO Rebuild the scripts i am using to generate the modules from xml files so they are more pro-actively tracking flaws in the build of the xml files like missing lists. Also regular expressions in the xml can be tested better before used in plugins. Refine the testmethods in Syntax::Highlight::Engine::Kate::Template, so that choices for casesensitivity, dynamic behaviour and lookahead can be determined at generate time of the plugin, might increase throughput. Implement codefolding. =head1 ACKNOWLEDGEMENTS All the people who wrote Kate and the syntax highlight xml files. =head1 AUTHOR AND COPYRIGHT This module is written and maintained by: Hans Jeuken < haje at toneel dot demon dot nl > Copyright (c) 2006 by Hans Jeuken, all rights reserved. You may freely distribute and/or modify this module under the same terms as Perl itself. =head1 SEE ALSO Syntax::Highlight::Engine::Kate::Template http:://www.kate-editor.org =cut libsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/t/perl/highlighted/maze.pl0000644000175000017500000003555311736037062026716 0ustar gregoagregoa#!perl use strict; use warnings; use diagnostics; use List::Util 'shuffle'; # The size of the maze. Take the arguments from the command line or from the # default. my ( $HEIGHT, $WIDTH ) = @ARGV ? @ARGV : ( 20, 20 ); # Time::HiRes was officially released with Perl 5.8.0, though Module::Corelist # reports that it was actually released as early as v5.7.3. If you don't have # this module, your version of Perl is probably over a decade old use Time::HiRes 'usleep'; # In Perl, $^O is the name of your operating system. On Windows (as of this # writing), it always 'MSWin32'. use constant IS_WIN32 => 'MSWin32' eq $^O; # On Windows, we assume that the command to clear the screen is 'cls'. On all # other systems, we assume it's 'clear'. You may need to adjust this. use constant CLEAR => IS_WIN32 ? 'cls' : 'clear'; # We will only redraw the screen (and thus show the recursive maze generation) # if and only if the system is capable of clearing the screen. The system() # command returns 0 upon success. See perldoc -f system. # The following line works because $x == $y returns a boolean value. #use constant CAN_REDRAW => 0 == system(CLEAR); use constant CAN_REDRAW => 0; # Time in microseconds between screen redraws. See Time::HiRes and the usleep # function use constant DELAY => 10_000; use constant OPPOSITE_OF => { north => 'south', south => 'north', west => 'east', east => 'west', }; my @maze; tunnel( 0, 0, \@maze ); my $num = 10_000; system(CLEAR) if CAN_REDRAW; print render_maze( \@maze ); exit; sub tunnel { my ( $x, $y, $maze ) = @_; if (CAN_REDRAW) { my $render = render_maze($maze); system(CLEAR); print $render; usleep DELAY; } # Here we need to use a unary plus in front of OPPOSITE_OF so that # Perl understands that this is a constant and that we're not trying # to access the %OPPOSITE_OF variable. my @directions = shuffle keys %{ +OPPOSITE_OF }; foreach my $direction (@directions) { my ( $new_x, $new_y ) = ( $x, $y ); if ( 'east' eq $direction ) { $new_x += 1; } elsif ( 'west' eq $direction ) { $new_x -= 1; } elsif ( 'south' eq $direction ) { $new_y += 1; } else { $new_y -= 1; } if ( have_not_visited( $new_x, $new_y, $maze ) ) { $maze->[$y][$x]{$direction} = 1; $maze->[$new_y][$new_x]{ OPPOSITE_OF->{$direction} } = 1; # This program will often recurse more than one hundred levels # deep and this is Perl's default recursion depth level prior to # issuing warnings. In this case, we're telling Perl that we know # that we'll exceed the recursion depth and to now warn us about # it no warnings 'recursion'; tunnel( $new_x, $new_y, $maze ); } } } sub have_not_visited { my ( $x, $y, $maze ) = @_; # the first two lines return false if we're out of bounds return if $x < 0 or $y < 0; return if $x > $WIDTH - 1 or $y > $HEIGHT - 1; # this returns false if we've already visited this cell return if $maze->[$y][$x]; # return true return 1; } sub render_maze { my $maze = shift; my $as_string = "_" x ( 1 + $WIDTH * 2 ); $as_string .= "\n"; for my $y ( 0 .. $HEIGHT - 1 ) { $as_string .= "|"; for my $x ( 0 .. $WIDTH - 1 ) { my $cell = $maze->[$y][$x]; $as_string .= $cell->{south} ? " " : "_"; $as_string .= $cell->{east} ? " " : "|"; } $as_string .= "\n"; } return $as_string; } libsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/t/perl/highlighted/template.pl0000644000175000017500000043542611736037062027600 0ustar gregoagregoa# Copyright (c) 2006 Hans Jeuken. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. package Syntax::Highlight::Engine::Kate::Template; our $VERSION = '0.06'; use strict; use Carp qw(cluck); use Data::Dumper; #my $regchars = '\\^.$|()[]*+?'; sub new { my $proto = shift; my $class = ref($proto) || $proto; my %args = (@_); my $debug = delete $args{'debug'}; unless (defined($debug)) { $debug = 0 }; my $substitutions = delete $args{'substitutions'}; unless (defined($substitutions)) { $substitutions = {} }; my $formattable = delete $args{'format_table'}; unless (defined($formattable)) { $formattable = {} }; my $engine = delete $args{'engine'}; my $self = {}; $self->{'attributes'} = {}, $self->{'captured'} = []; $self->{'contextdata'} = {}; $self->{'basecontext'} = ''; $self->{'debug'} = $debug; $self->{'deliminators'} = ''; $self->{'engine'} = ''; $self->{'format_table'} = $formattable; $self->{'keywordcase'} = 1; $self->{'lastchar'} = ''; $self->{'linesegment'} = ''; $self->{'lists'} = {}; $self->{'linestart'} = 1; $self->{'out'} = []; $self->{'plugins'} = {}; $self->{'snippet'} = ''; $self->{'snippetattribute'} = ''; $self->{'stack'} = []; $self->{'substitutions'} = $substitutions; bless ($self, $class); unless (defined $engine) { $engine = $self }; $self->engine($engine); $self->initialize; return $self; } sub attributes { my $self = shift; if (@_) { $self->{'attributes'} = shift; }; return $self->{'attributes'}; } sub basecontext { my $self = shift; if (@_) { $self->{'basecontext'} = shift; }; return $self->{'basecontext'}; } sub captured { my ($self, $c) = @_; if (defined($c)) { my $t = $self->engine->stackTop; my $n = 0; my @o = (); while (defined($c->[$n])) { push @o, $c->[$n]; $n ++; } if (@o) { $t->[2] = \@o; } }; } sub capturedGet { my ($self, $num) = @_; my $s = $self->engine->stack; if (defined($s->[1])) { my $c = $s->[1]->[2]; $num --; if (defined($c)) { if (defined($c->[$num])) { my $r = $c->[$num]; return $r; } else { warn "capture number $num not defined"; } } else { warn "dynamic substitution is called for but nothing to substitute\n"; return undef; } } else { warn "no parent context to take captures from"; } } #sub captured { # my $self = shift; # if (@_) { # $self->{'captured'} = shift; ## print Dumper($self->{'captured'}); # }; # return $self->{'captured'} ## my ($self, $c) = @_; ## if (defined($c)) { ## my $t = $self->engine->stackTop; ## my $n = 0; ## my @o = (); ## while (defined($c->[$n])) { ## push @o, $c->[$n]; ## $n ++; ## } ## if (@o) { ## $t->[2] = \@o; ## } ## }; #} # #sub capturedGet { # my ($self, $num) = @_; # my $s = $self->captured; # if (defined $s) { # $num --; # if (defined($s->[$num])) { # return $s->[$num]; # } else { # $self->logwarning("capture number $num not defined"); # } # } else { # $self->logwarning("dynamic substitution is called for but nothing to substitute"); # return undef; # } #} sub capturedParse { my ($self, $string, $mode) = @_; my $s = ''; if (defined($mode)) { if ($string =~ s/^(\d)//) { $s = $self->capturedGet($1); if ($string ne '') { $self->logwarning("character class is longer then 1 character, ignoring the rest"); } } } else { while ($string ne '') { if ($string =~ s/^([^\%]*)\%(\d)//) { my $r = $self->capturedGet($2); if ($r ne '') { $s = $s . $1 . $r } else { $s = $s . $1 . '%' . $2; $self->logwarning("target is an empty string"); } } else { $string =~ s/^(.)//; $s = "$s$1"; } } } return $s; } sub column { my $self = shift; return length($self->linesegment); } sub contextdata { my $self = shift; if (@_) { $self->{'contextdata'} = shift; }; return $self->{'contextdata'}; } sub contextInfo { my ($self, $context, $item) = @_; if (exists $self->contextdata->{$context}) { my $c = $self->contextdata->{$context}; if (exists $c->{$item}) { return $c->{$item} } else { return undef; } } else { $self->logwarning("undefined context '$context'"); return undef; } } sub contextParse { my ($self, $plug, $context) = @_; if ($context =~ /^#pop/i) { while ($context =~ s/#pop//i) { $self->stackPull; } } elsif ($context =~ /^#stay/i) { #don't do anything } elsif ($context =~ /^##(.+)/) { my $new = $self->pluginGet($1); $self->stackPush([$new, $new->basecontext]); } else { $self->stackPush([$plug, $context]); } } sub debug { my $self = shift; if (@_) { $self->{'debug'} = shift; }; return $self->{'debug'}; } sub debugTest { my $self = shift; if (@_) { $self->{'debugtest'} = shift; }; return $self->{'debugtest'}; } sub deliminators { my $self = shift; if (@_) { $self->{'deliminators'} = shift; }; return $self->{'deliminators'}; } sub engine { my $self = shift; if (@_) { $self->{'engine'} = shift; }; return $self->{'engine'}; } sub firstnonspace { my ($self, $string) = @_; my $line = $self->linesegment; if (($line =~ /^\s*$/) and ($string =~ /^[^\s]/)) { return 1 } return '' } sub formatTable { my $self = shift; if (@_) { $self->{'format_table'} = shift; }; return $self->{'format_table'}; } sub highlight { my ($self, $text) = @_; $self->snippet(''); my $out = $self->out; @$out = (); while ($text ne '') { my $top = $self->stackTop; if (defined($top)) { my ($plug, $context) = @$top; if ($text =~ s/^(\n)//) { $self->snippetForce; my $e = $plug->contextInfo($context, 'lineending'); if (defined($e)) { $self->contextParse($plug, $e) } my $attr = $plug->attributes->{$plug->contextInfo($context, 'attribute')}; $self->snippetParse($1, $attr); $self->snippetForce; $self->linesegment(''); my $b = $plug->contextInfo($context, 'linebeginning'); if (defined($b)) { $self->contextParse($plug, $b) } } else { my $sub = $plug->contextInfo($context, 'callback'); my $result = &$sub($plug, \$text); unless($result) { my $f = $plug->contextInfo($context, 'fallthrough'); if (defined($f)) { $self->contextParse($plug, $f); } else { $text =~ s/^(.)//; my $attr = $plug->attributes->{$plug->contextInfo($context, 'attribute')}; $self->snippetParse($1, $attr); } } } } else { push @$out, length($text), 'Normal'; $text = ''; } } $self->snippetForce; return @$out; } sub highlightText { my ($self, $text) = @_; my $res = ''; my @hl = $self->highlight($text); while (@hl) { my $f = shift @hl; my $t = shift @hl; unless (defined($t)) { $t = 'Normal' } my $s = $self->substitutions; my $rr = ''; while ($f ne '') { my $k = substr($f , 0, 1); $f = substr($f, 1, length($f) -1); if (exists $s->{$k}) { $rr = $rr . $s->{$k} } else { $rr = $rr . $k; } } my $rt = $self->formatTable; if (exists $rt->{$t}) { my $o = $rt->{$t}; $res = $res . $o->[0] . $rr . $o->[1]; } else { $res = $res . $rr; $self->logwarning("undefined format tag '$t'"); } } return $res; } sub includePlugin { my ($self, $language, $text) = @_; my $eng = $self->engine; my $plug = $eng->pluginGet($language); if (defined($plug)) { my $context = $plug->basecontext; my $call = $plug->contextInfo($context, 'callback'); if (defined($call)) { return &$call($plug, $text); } else { $self->logwarning("cannot find callback for context '$context'"); } } return 0; } sub includeRules { my ($self, $context, $text) = @_; my $call = $self->contextInfo($context, 'callback'); if (defined($call)) { return &$call($self, $text); } else { $self->logwarning("cannot find callback for context '$context'"); } return 0; } sub initialize { my $self = shift; if ($self->engine eq $self) { $self->stack([[$self, $self->basecontext]]); } } sub keywordscase { my $self = shift; if (@_) { $self->{'keywordcase'} = shift; } return $self->{'keywordscase'} } sub languagePlug { my ($cw, $name) = @_; my %numb = ( '1' => 'One', '2' => 'Two', '3' => 'Three', '4' => 'Four', '5' => 'Five', '6' => 'Six', '7' => 'Seven', '8' => 'Eight', '9' => 'Nine', '0' => 'Zero', ); if ($name =~ s/^(\d)//) { $name = $numb{$1} . $name; } $name =~ s/\.//; $name =~ s/\+/plus/g; $name =~ s/\-/minus/g; $name =~ s/#/dash/g; $name =~ s/[^0-9a-zA-Z]/_/g; $name =~ s/__/_/g; $name =~ s/_$//; $name = ucfirst($name); return $name; } sub lastchar { my $self = shift; my $l = $self->linesegment; if ($l eq '') { return "\n" } #last character was a newline return substr($l, length($l) - 1, 1); } sub lastcharDeliminator { my $self = shift; my $deliminators = '\s|\~|\!|\%|\^|\&|\*|\+|\(|\)|-|=|\{|\}|\[|\]|:|;|<|>|,|\\|\||\.|\?|\/'; if ($self->linestart or ($self->lastchar =~ /$deliminators/)) { return 1; } return ''; } sub linesegment { my $self = shift; if (@_) { $self->{'linesegment'} = shift; }; return $self->{'linesegment'}; } sub linestart { my $self = shift; if ($self->linesegment eq '') { return 1 } return ''; } sub lists { my $self = shift; if (@_) { $self->{'lists'} = shift; } return $self->{'lists'} } sub out { my $self = shift; if (@_) { $self->{'out'} = shift; } return $self->{'out'}; } sub listAdd { my $self = shift; my $listname = shift; my $lst = $self->lists; if (@_) { my @l = reverse sort @_; $lst->{$listname} = \@l; } else { $lst->{$listname} = []; } } sub logwarning { my ($self, $warning) = @_; my $top = $self->engine->stackTop; if (defined $top) { my $lang = $top->[0]->language; my $context = $top->[1]; $warning = "$warning\n Language => $lang, Context => $context\n"; } else { $warning = "$warning\n STACK IS EMPTY: PANIC\n" } cluck($warning); } sub parseResult { my ($self, $text, $string, $lahead, $column, $fnspace, $context, $attr) = @_; my $eng = $self->engine; if ($fnspace) { unless ($eng->firstnonspace($$text)) { return '' } } if (defined($column)) { if ($column ne $eng->column) { return ''; } } unless ($lahead) { $$text = substr($$text, length($string)); my $r; unless (defined($attr)) { my $t = $eng->stackTop; my ($plug, $ctext) = @$t; $r = $plug->attributes->{$plug->contextInfo($ctext, 'attribute')}; } else { $r = $self->attributes->{$attr}; } $eng->snippetParse($string, $r); } $eng->contextParse($self, $context); return 1 } sub pluginGet { my ($self, $language) = @_; my $plugs = $self->{'plugins'}; unless (exists($plugs->{$language})) { my $modname = 'Syntax::Highlight::Engine::Kate::' . $self->languagePlug($language); unless (defined($modname)) { $self->logwarning("no valid module found for language '$language'"); return undef; } my $plug; eval "use $modname; \$plug = new $modname(engine => \$self);"; if (defined($plug)) { $plugs->{$language} = $plug; } else { $self->logwarning("cannot create plugin for language '$language'\n$@"); } } if (exists($plugs->{$language})) { return $plugs->{$language}; } return undef; } sub reset { my $self = shift; $self->stack([[$self, $self->basecontext]]); $self->out([]); $self->snippet(''); } sub snippet { my $self = shift; if (@_) { $self->{'snippet'} = shift; } return $self->{'snippet'}; } sub snippetAppend { my ($self, $ch) = @_; return if not defined $ch; $self->{'snippet'} = $self->{'snippet'} . $ch; if ($ch ne '') { $self->linesegment($self->linesegment . $ch); } return; } sub snippetAttribute { my $self = shift; if (@_) { $self->{'snippetattribute'} = shift; } return $self->{'snippetattribute'}; } sub snippetForce { my $self = shift; my $parse = $self->snippet; if ($parse ne '') { my $out = $self->{'out'}; push(@$out, $parse, $self->snippetAttribute); $self->snippet(''); } } sub snippetParse { my $self = shift; my $snip = shift; my $attr = shift; if ((defined $attr) and ($attr ne $self->snippetAttribute)) { $self->snippetForce; $self->snippetAttribute($attr); } $self->snippetAppend($snip); } sub stack { my $self = shift; if (@_) { $self->{'stack'} = shift; } return $self->{'stack'}; } sub stackPush { my ($self, $val) = @_; my $stack = $self->stack; unshift(@$stack, $val); } sub stackPull { my ($self, $val) = @_; my $stack = $self->stack; return shift(@$stack); } sub stackTop { my $self = shift; return $self->stack->[0]; } sub stateCompare { my ($self, $state) = @_; my $h = [ $self->stateGet ]; my $equal = 0; if (Dumper($h) eq Dumper($state)) { $equal = 1 }; return $equal; } sub stateGet { my $self = shift; my $s = $self->stack; return @$s; } sub stateSet { my $self = shift; my $s = $self->stack; @$s = (@_); } sub substitutions { my $self = shift; if (@_) { $self->{'substitutions'} = shift; } return $self->{'substitutions'}; } sub testAnyChar { my $self = shift; my $text = shift; my $string = shift; my $insensitive = shift; my $test = substr($$text, 0, 1); my $bck = $test; if ($insensitive) { $string = lc($string); $test = lc($test); } if (index($string, $test) > -1) { return $self->parseResult($text, $bck, @_); } return '' } sub testDetectChar { my $self = shift; my $text = shift; my $char = shift; my $insensitive = shift; my $dyn = shift; if ($dyn) { $char = $self->capturedParse($char, 1); } my $test = substr($$text, 0, 1); my $bck = $test; if ($insensitive) { $char = lc($char); $test = lc($test); } if ($char eq $test) { return $self->parseResult($text, $bck, @_); } return '' } sub testDetect2Chars { my $self = shift; my $text = shift; my $char = shift; my $char1 = shift; my $insensitive = shift; my $dyn = shift; if ($dyn) { $char = $self->capturedParse($char, 1); $char1 = $self->capturedParse($char1, 1); } my $string = $char . $char1; my $test = substr($$text, 0, 2); my $bck = $test; if ($insensitive) { $string = lc($string); $test = lc($test); } if ($string eq $test) { return $self->parseResult($text, $bck, @_); } return '' } sub testDetectIdentifier { my $self = shift; my $text = shift; if ($$text =~ /^([a-zA-Z_][a-zA-Z0-9_]+)/) { return $self->parseResult($text, $1, @_); } return '' } sub testDetectSpaces { my $self = shift; my $text = shift; if ($$text =~ /^([\\040|\\t]+)/) { return $self->parseResult($text, $1, @_); } return '' } sub testFloat { my $self = shift; my $text = shift; if ($self->engine->lastcharDeliminator) { if ($$text =~ /^((?=\.?\d)\d*(?:\.\d*)?(?:[Ee][+-]?\d+)?)/) { return $self->parseResult($text, $1, @_); } } return '' } sub testHlCChar { my $self = shift; my $text = shift; if ($$text =~ /^('.')/) { return $self->parseResult($text, $1, @_); } return '' } sub testHlCHex { my $self = shift; my $text = shift; if ($self->engine->lastcharDeliminator) { if ($$text =~ /^(0x[0-9a-fA-F]+)/) { return $self->parseResult($text, $1, @_); } } return '' } sub testHlCOct { my $self = shift; my $text = shift; if ($self->engine->lastcharDeliminator) { if ($$text =~ /^(0[0-7]+)/) { return $self->parseResult($text, $1, @_); } } return '' } sub testHlCStringChar { my $self = shift; my $text = shift; if ($$text =~ /^(\\[a|b|e|f|n|r|t|v|'|"|\?])/) { return $self->parseResult($text, $1, @_); } if ($$text =~ /^(\\x[0-9a-fA-F][0-9a-fA-F]?)/) { return $self->parseResult($text, $1, @_); } if ($$text =~ /^(\\[0-7][0-7]?[0-7]?)/) { return $self->parseResult($text, $1, @_); } return '' } sub testInt { my $self = shift; my $text = shift; if ($self->engine->lastcharDeliminator) { if ($$text =~ /^([+-]?\d+)/) { return $self->parseResult($text, $1, @_); } } return '' } sub testKeyword { my $self = shift; my $text = shift; my $list = shift; my $eng = $self->engine; my $deliminators = $self->deliminators; if (($eng->lastcharDeliminator) and ($$text =~ /^([^$deliminators]+)/)) { my $match = $1; my $l = $self->lists->{$list}; if (defined($l)) { my @list = @$l; my @rl = (); unless ($self->keywordscase) { @rl = grep { (lc($match) eq lc($_)) } @list; } else { @rl = grep { ($match eq $_) } @list; } if (@rl) { return $self->parseResult($text, $match, @_); } } else { $self->logwarning("list '$list' is not defined, failing test"); } } return '' } sub testLineContinue { my $self = shift; my $text = shift; my $lahead = shift; if ($lahead) { if ($$text =~ /^\\\n/) { $self->parseResult($text, "\\", $lahead, @_); return 1; } } else { if ($$text =~ s/^(\\)(\n)/$2/) { return $self->parseResult($text, "\\", $lahead, @_); } } return '' } sub testRangeDetect { my $self = shift; my $text = shift; my $char = shift; my $char1 = shift; my $insensitive = shift; my $string = "$char\[^$char1\]+$char1"; return $self->testRegExpr($text, $string, $insensitive, 0, @_); } sub testRegExpr { my $self = shift; my $text = shift; my $reg = shift; my $insensitive = shift; my $dynamic = shift; if ($dynamic) { $reg = $self->capturedParse($reg); } my $eng = $self->engine; if ($reg =~ s/^\^//) { unless ($eng->linestart) { return ''; } } elsif ($reg =~ s/^\\(b)//i) { my $lastchar = $self->engine->lastchar; if ($1 eq 'b') { if ($lastchar =~ /\w/) { return '' } } else { if ($lastchar =~ /\W/) { return '' } } } # $reg = "^($reg)"; $reg = "^$reg"; my $pos; # my @cap = (); my $sample = $$text; # emergency measurements to avoid exception (szabgab) $reg = eval { qr/$reg/ }; if ($@) { warn $@; return ''; } if ($insensitive) { if ($sample =~ /$reg/ig) { $pos = pos($sample); # @cap = ($1, $2, $3, $4, $5, $6, $7, $8, $9); # my @cap = (); if ($#-) { no strict 'refs'; my @cap = map {$$_} 1 .. $#-; $self->captured(\@cap) } # my $r = 1; # my $c = 1; # my @cap = (); # while ($r) { # eval "if (defined\$$c) { push \@cap, \$$c } else { \$r = 0 }"; # $c ++; # } # if (@cap) { $self->captured(\@cap) }; } } else { if ($sample =~ /$reg/g) { $pos = pos($sample); # @cap = ($1, $2, $3, $4, $5, $6, $7, $8, $9); # my @cap = (); if ($#-) { no strict 'refs'; my @cap = map {$$_} 1 .. $#-; $self->captured(\@cap); } # my $r = 1; # my $c = 1; # my @cap = (); # while ($r) { # eval "if (defined\$$c) { push \@cap, \$$c } else { \$r = 0 }"; # $c ++; # } # if (@cap) { $self->captured(\@cap) }; } } if (defined($pos) and ($pos > 0)) { my $string = substr($$text, 0, $pos); return $self->parseResult($text, $string, @_); } return '' } sub testStringDetect { my $self = shift; my $text = shift; my $string = shift; my $insensitive = shift; my $dynamic = shift; if ($dynamic) { $string = $self->capturedParse($string); } my $test = substr($$text, 0, length($string)); my $bck = $test; if ($insensitive) { $string = lc($string); $test = lc($test); } if ($string eq $test) { return $self->parseResult($text, $bck, @_); } return '' } 1; __END__ =head1 NAME Syntax::Highlight::Engine::Kate::Template - a template for syntax highlighting plugins =head1 DESCRIPTION Syntax::Highlight::Engine::Kate::Template is a framework to assist authors of plugin modules. All methods to provide highlighting to the Syntax::Highlight::Engine::Kate module are there, Just no syntax definitions and callbacks. An instance of Syntax::Highlight::Engine::Kate::Template should never be created, it's meant to be sub classed only. =head1 METHODS =over 4 =item B(I); Sets and returns a reference to the attributes hash. =item B(I); Sets and returns the basecontext instance variable. This is the context that is used when highlighting starts. =item B(I<$cap>); Puts $cap in the first element of the stack, the current context. Used when the context is dynamic. =item B(I<$num>); Returns the $num'th element that was captured in the current context. =item B(I<$string>, I<$mode>); If B<$mode> is specified, B<$string> should only be one character long and numeric. B will return the Nth captured element of the current context. If B<$mode> is not specified, all occurences of %[1-9] will be replaced by the captured element of the current context. =item B returns the column position in the line that is currently highlighted. =item B(I<\%data>); Sets and returns a reference to the contextdata hash. =item B(I<$context>, I<$item>); returns the value of several context options. B<$item> can be B, B, B, B, B. =item B(I<$plugin>, I<$context>); Called by the plugins after a test succeeds. if B<$context> has following values: #pop returns to the previous context, removes to top item in the stack. Can also be specified as #pop#pop etc. #stay does nothing. ##.... Switches to the plugin specified in .... and assumes it's basecontext. .... Swtiches to the context specified in .... =item B(I); Sets and returns a string that is a regular expression for detecting deliminators. =item B Returns a reference to the Syntax::Highlight::Engine::Kate module that created this plugin. =item B(I<$string>); returns true if the current line did not contain a non-spatial character so far and the first character in B<$string> is also a spatial character. =item B sets and returns the instance variable B. See also the option B =item B(I<$text>); highlights I<$text>. It does so by selecting the proper callback from the B hash and invoke it. It will do so untill $text has been reduced to an empty string. returns a paired list of snippets of text and the attribute with which they should be highlighted. =item B(I<$text>); highlights I<$text> and reformats it using the B and B =item B(I<$language>, I<\$text>); Includes the plugin for B<$language> in the highlighting. =item B(I<$language>, I<\$text>); Includes the plugin for B<$language> in the highlighting. =item B Sets and returns the keywordscase instance variable. =item B return the last character that was processed. =item B returns true if the last character processed was a deliminator. =item B returns the string of text in the current line that has been processed so far, =item B returns true if processing is currently at the beginning of a line. =item B(I<'listname'>, I<$item1>, I<$item2> ...); Adds a list to the 'lists' hash. =item B(I); sets and returns the instance variable 'lists'. =item B(I); sets and returns the instance variable 'out'. =item B(I<\$text>, I<$match>, I<$lookahaed>, I<$column>, I<$firstnonspace>, I<$context>, I<$attribute>); Called by every one of the test methods below. If the test matches, it will do a couple of subtests. If B<$column> is a defined numerical value it will test if the process is at the requested column. If B<$firnonspace> is true, it will test this also. Ig it is not a look ahead and all tests are passed, B<$match> is then parsed and removed from B<$$text>. =item B(I<$language>); Returns a reference to a plugin object for the specified language. Creating an instance if needed. =item B Resets the highlight engine to a fresh state, does not change the syntx. =item B Contains the current snippet of text that will have one attribute. The moment the attribute changes it will be parsed. =item B(I<$string>) appends I<$string> to the current snippet. =item B(I<$attribute>) Sets and returns the used attribute. =item B Forces the current snippet to be parsed. =item B(I<$text>, I) If attribute is defined and differs from the current attribute it does a snippetForce and sets the current attribute to B<$attribute>. Then it does a snippetAppend of B<$text> =item B sets and returns the instance variable 'stack', a reference to an array =item B retrieves the element that is on top of the stack, decrements stacksize by 1. =item B(I<$tagname>); puts I<$tagname> on top of the stack, increments stacksize by 1 =item B Retrieves the element that is on top of the stack. =item B(I<\@state>) Compares two lists, \@state and the stack. returns true if they match. =item B Returns a list containing the entire stack. =item B(I<@list>) Accepts I<@list> as the current stack. =item B sets and returns a reference to the substitutions hash. =back The methods below all return a boolean value. =over 4 =item B(I<\$text>, I<$string>, I<$insensitive>, I<$lookahaed>, I<$column>, I<$firstnonspace>, I<$context>, I<$attribute>); =item B(I<\$text>, I<$char>, I<$insensitive>, I<$dynamic>, I<$lookahaed>, I<$column>, I<$firstnonspace>, I<$context>, I<$attribute>); =item B(I<\$text>, I<$char1>, I<$char2>, I<$insensitive>, I<$dynamic>, I<$lookahaed>, I<$column>, I<$firstnonspace>, I<$context>, I<$attribute>); =item B(I<\$text>, I<$lookahaed>, I<$column>, I<$firstnonspace>, I<$context>, I<$attribute>); =item B(I<\$text>, I<$lookahaed>, I<$column>, I<$firstnonspace>, I<$context>, I<$attribute>); =item B(I<\$text>, I<$lookahaed>, I<$column>, I<$firstnonspace>, I<$context>, I<$attribute>); =item B(I<\$text>, I<$lookahaed>, I<$column>, I<$firstnonspace>, I<$context>, I<$attribute>); =item B(I<\$text>, I<$lookahaed>, I<$column>, I<$firstnonspace>, I<$context>, I<$attribute>); =item B(I<\$text>, I<$lookahaed>, I<$column>, I<$firstnonspace>, I<$context>, I<$attribute>); =item B(I<\$text>, I<$lookahaed>, I<$column>, I<$firstnonspace>, I<$context>, I<$attribute>); =item B(I<\$text>, I<$lookahaed>, I<$column>, I<$firstnonspace>, I<$context>, I<$attribute>); =item B(I<\$text>, I<$list>, I<$insensitive>, I<$lookahaed>, I<$column>, I<$firstnonspace>, I<$context>, I<$attribute>); =item B(I<\$text>, I<$lookahaed>, I<$column>, I<$firstnonspace>, I<$context>, I<$attribute>); =item B(I<\$text>, I<$char1>, I<$char2>, I<$insensitive>, I<$lookahaed>, I<$column>, I<$firstnonspace>, I<$context>, I<$attribute>); =item B(I<\$text>, I<$reg>, I<$insensitive>, I<$dynamic>, I<$lookahaed>, I<$column>, I<$firstnonspace>, I<$context>, I<$attribute>); =item B(I<\$text>, I<$string>, I<$insensitive>, I<$dynamic>, II<$lookahaed>, I<$column>, I<$firstnonspace>, I<$context>, I<$attribute>); =back =head1 ACKNOWLEDGEMENTS All the people who wrote Kate and the syntax highlight xml files. =head1 AUTHOR AND COPYRIGHT This module is written and maintained by: Hans Jeuken < haje at toneel dot demon dot nl > Copyright (c) 2006 by Hans Jeuken, all rights reserved. You may freely distribute and/or modify this module under same terms as Perl itself =head1 SEE ALSO Synax::Highlight::Engine::Kate http:://www.kate-editor.orglibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/t/perl/before/0000755000175000017500000000000012150557146024375 5ustar gregoagregoalibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/t/perl/before/kate.pl0000755000175000017500000007341211736037062025667 0ustar gregoagregoa # Copyright (c) 2006 Hans Jeuken. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. package Syntax::Highlight::Engine::Kate; use 5.006; our $VERSION = '0.06'; use strict; use warnings; use Carp; use Data::Dumper; use File::Basename; use base('Syntax::Highlight::Engine::Kate::Template'); sub new { my $proto = shift; my $class = ref($proto) || $proto; my %args = (@_); my $add = delete $args{'plugins'}; unless (defined($add)) { $add = [] }; my $language = delete $args{'language'}; unless (defined($language)) { $language = 'Off' }; my $self = $class->SUPER::new(%args); $self->{'plugins'} = {}; #begin autoinsert $self->{'extensions'} = { ' *.cls' => ['LaTeX', ], ' *.dtx' => ['LaTeX', ], ' *.ltx' => ['LaTeX', ], ' *.sty' => ['LaTeX', ], '*.4GL' => ['4GL', ], '*.4gl' => ['4GL', ], '*.ABC' => ['ABC', ], '*.ASM' => ['AVR Assembler', 'PicAsm', ], '*.BAS' => ['FreeBASIC', ], '*.BI' => ['FreeBASIC', ], '*.C' => ['C++', 'C', 'ANSI C89', ], '*.D' => ['D', ], '*.F' => ['Fortran', ], '*.F90' => ['Fortran', ], '*.F95' => ['Fortran', ], '*.FOR' => ['Fortran', ], '*.FPP' => ['Fortran', ], '*.GDL' => ['GDL', ], '*.H' => ['C++', ], '*.JSP' => ['JSP', ], '*.LOGO' => ['de_DE', 'en_US', 'nl', ], '*.LY' => ['LilyPond', ], '*.Logo' => ['de_DE', 'en_US', 'nl', ], '*.M' => ['Matlab', 'Octave', ], '*.MAB' => ['MAB-DB', ], '*.Mab' => ['MAB-DB', ], '*.PER' => ['4GL-PER', ], '*.PIC' => ['PicAsm', ], '*.PRG' => ['xHarbour', 'Clipper', ], '*.R' => ['R Script', ], '*.S' => ['GNU Assembler', ], '*.SQL' => ['SQL', 'SQL (MySQL)', 'SQL (PostgreSQL)', ], '*.SRC' => ['PicAsm', ], '*.V' => ['Verilog', ], '*.VCG' => ['GDL', ], '*.a' => ['Ada', ], '*.abc' => ['ABC', ], '*.ada' => ['Ada', ], '*.adb' => ['Ada', ], '*.ado' => ['Stata', ], '*.ads' => ['Ada', ], '*.ahdl' => ['AHDL', ], '*.ai' => ['PostScript', ], '*.ans' => ['Ansys', ], '*.asm' => ['AVR Assembler', 'Asm6502', 'Intel x86 (NASM)', 'PicAsm', ], '*.asm-avr' => ['AVR Assembler', ], '*.asp' => ['ASP', ], '*.awk' => ['AWK', ], '*.bas' => ['FreeBASIC', ], '*.basetest' => ['BaseTest', ], '*.bash' => ['Bash', ], '*.bi' => ['FreeBASIC', ], '*.bib' => ['BibTeX', ], '*.bro' => ['Component-Pascal', ], '*.c' => ['C', 'ANSI C89', 'LPC', ], '*.c++' => ['C++', ], '*.cc' => ['C++', ], '*.cfc' => ['ColdFusion', ], '*.cfg' => ['Quake Script', ], '*.cfm' => ['ColdFusion', ], '*.cfml' => ['ColdFusion', ], '*.cg' => ['Cg', ], '*.cgis' => ['CGiS', ], '*.ch' => ['xHarbour', 'Clipper', ], '*.cis' => ['Cisco', ], '*.cl' => ['Common Lisp', ], '*.cmake' => ['CMake', ], '*.config' => ['Logtalk', ], '*.cp' => ['Component-Pascal', ], '*.cpp' => ['C++', ], '*.cs' => ['C#', ], '*.css' => ['CSS', ], '*.cue' => ['CUE Sheet', ], '*.cxx' => ['C++', ], '*.d' => ['D', ], '*.daml' => ['XML', ], '*.dbm' => ['ColdFusion', ], '*.def' => ['Modula-2', ], '*.desktop' => ['.desktop', ], '*.diff' => ['Diff', ], '*.do' => ['Stata', ], '*.docbook' => ['XML', ], '*.dox' => ['Doxygen', ], '*.doxygen' => ['Doxygen', ], '*.e' => ['E Language', 'Eiffel', 'Euphoria', ], '*.ebuild' => ['Bash', ], '*.eclass' => ['Bash', ], '*.eml' => ['Email', ], '*.eps' => ['PostScript', ], '*.err' => ['4GL', ], '*.ex' => ['Euphoria', ], '*.exu' => ['Euphoria', ], '*.exw' => ['Euphoria', ], '*.f' => ['Fortran', ], '*.f90' => ['Fortran', ], '*.f95' => ['Fortran', ], '*.fe' => ['ferite', ], '*.feh' => ['ferite', ], '*.flex' => ['Lex/Flex', ], '*.for' => ['Fortran', ], '*.fpp' => ['Fortran', ], '*.frag' => ['GLSL', ], '*.gdl' => ['GDL', ], '*.glsl' => ['GLSL', ], '*.guile' => ['Scheme', ], '*.h' => ['C++', 'C', 'ANSI C89', 'Inform', 'LPC', 'Objective-C', ], '*.h++' => ['C++', ], '*.hcc' => ['C++', ], '*.hpp' => ['C++', ], '*.hs' => ['Haskell', ], '*.hsp' => ['Spice', ], '*.ht' => ['Apache Configuration', ], '*.htm' => ['HTML', ], '*.html' => ['HTML', 'Mason', ], '*.hxx' => ['C++', ], '*.i' => ['progress', ], '*.idl' => ['IDL', ], '*.inc' => ['POV-Ray', 'PHP (HTML)', 'LPC', ], '*.inf' => ['Inform', ], '*.ini' => ['INI Files', ], '*.java' => ['Java', ], '*.js' => ['JavaScript', ], '*.jsp' => ['JSP', ], '*.katetemplate' => ['Kate File Template', ], '*.kbasic' => ['KBasic', ], '*.kdelnk' => ['.desktop', ], '*.l' => ['Lex/Flex', ], '*.ldif' => ['LDIF', ], '*.lex' => ['Lex/Flex', ], '*.lgo' => ['de_DE', 'en_US', 'nl', ], '*.lgt' => ['Logtalk', ], '*.lhs' => ['Literate Haskell', ], '*.lisp' => ['Common Lisp', ], '*.logo' => ['de_DE', 'en_US', 'nl', ], '*.lsp' => ['Common Lisp', ], '*.lua' => ['Lua', ], '*.ly' => ['LilyPond', ], '*.m' => ['Matlab', 'Objective-C', 'Octave', ], '*.m3u' => ['M3U', ], '*.mab' => ['MAB-DB', ], '*.md' => ['Modula-2', ], '*.mi' => ['Modula-2', ], '*.ml' => ['Objective Caml', 'SML', ], '*.mli' => ['Objective Caml', ], '*.moc' => ['C++', ], '*.mod' => ['Modula-2', ], '*.mup' => ['Music Publisher', ], '*.not' => ['Music Publisher', ], '*.o' => ['LPC', ], '*.octave' => ['Octave', ], '*.p' => ['Pascal', 'progress', ], '*.pas' => ['Pascal', ], '*.pb' => ['PureBasic', ], '*.per' => ['4GL-PER', ], '*.per.err' => ['4GL-PER', ], '*.php' => ['PHP (HTML)', ], '*.php3' => ['PHP (HTML)', ], '*.phtm' => ['PHP (HTML)', ], '*.phtml' => ['PHP (HTML)', ], '*.pic' => ['PicAsm', ], '*.pike' => ['Pike', ], '*.pl' => ['Perl', ], '*.pls' => ['INI Files', ], '*.pm' => ['Perl', ], '*.po' => ['GNU Gettext', ], '*.pot' => ['GNU Gettext', ], '*.pov' => ['POV-Ray', ], '*.pp' => ['Pascal', ], '*.prg' => ['xHarbour', 'Clipper', ], '*.pro' => ['RSI IDL', ], '*.prolog' => ['Prolog', ], '*.ps' => ['PostScript', ], '*.py' => ['Python', ], '*.pyw' => ['Python', ], '*.rb' => ['Ruby', ], '*.rc' => ['XML', ], '*.rdf' => ['XML', ], '*.reg' => ['WINE Config', ], '*.rex' => ['REXX', ], '*.rib' => ['RenderMan RIB', ], '*.s' => ['GNU Assembler', 'MIPS Assembler', ], '*.sa' => ['Sather', ], '*.sce' => ['scilab', ], '*.scheme' => ['Scheme', ], '*.sci' => ['scilab', ], '*.scm' => ['Scheme', ], '*.sgml' => ['SGML', ], '*.sh' => ['Bash', ], '*.shtm' => ['HTML', ], '*.shtml' => ['HTML', ], '*.siv' => ['Sieve', ], '*.sml' => ['SML', ], '*.sp' => ['Spice', ], '*.spec' => ['RPM Spec', ], '*.sql' => ['SQL', 'SQL (MySQL)', 'SQL (PostgreSQL)', ], '*.src' => ['PicAsm', ], '*.ss' => ['Scheme', ], '*.t2t' => ['txt2tags', ], '*.tcl' => ['Tcl/Tk', ], '*.tdf' => ['AHDL', ], '*.tex' => ['LaTeX', ], '*.tji' => ['TaskJuggler', ], '*.tjp' => ['TaskJuggler', ], '*.tk' => ['Tcl/Tk', ], '*.tst' => ['BaseTestchild', ], '*.uc' => ['UnrealScript', ], '*.v' => ['Verilog', ], '*.vcg' => ['GDL', ], '*.vert' => ['GLSL', ], '*.vhd' => ['VHDL', ], '*.vhdl' => ['VHDL', ], '*.vl' => ['Verilog', ], '*.vm' => ['Velocity', ], '*.w' => ['progress', ], '*.wml' => ['PHP (HTML)', ], '*.wrl' => ['VRML', ], '*.xml' => ['XML', ], '*.xsl' => ['xslt', ], '*.xslt' => ['xslt', ], '*.y' => ['Yacc/Bison', ], '*.ys' => ['yacas', ], '*Makefile*' => ['Makefile', ], '*makefile*' => ['Makefile', ], '*patch' => ['Diff', ], 'CMakeLists.txt' => ['CMake', ], 'ChangeLog' => ['ChangeLog', ], 'QRPGLESRC.*' => ['ILERPG', ], 'apache.conf' => ['Apache Configuration', ], 'apache2.conf' => ['Apache Configuration', ], 'httpd.conf' => ['Apache Configuration', ], 'httpd2.conf' => ['Apache Configuration', ], 'xorg.conf' => ['x.org Configuration', ], }; $self->{'sections'} = { 'Assembler' => [ 'AVR Assembler', 'Asm6502', 'GNU Assembler', 'Intel x86 (NASM)', 'MIPS Assembler', 'PicAsm', ], 'Configuration' => [ '.desktop', 'Apache Configuration', 'Cisco', 'INI Files', 'WINE Config', 'x.org Configuration', ], 'Database' => [ '4GL', '4GL-PER', 'LDIF', 'SQL', 'SQL (MySQL)', 'SQL (PostgreSQL)', 'progress', ], 'Hardware' => [ 'AHDL', 'Spice', 'VHDL', 'Verilog', ], 'Logo' => [ 'de_DE', 'en_US', 'nl', ], 'Markup' => [ 'ASP', 'BibTeX', 'CSS', 'ColdFusion', 'Doxygen', 'GNU Gettext', 'HTML', 'JSP', 'Javadoc', 'Kate File Template', 'LaTeX', 'MAB-DB', 'PostScript', 'SGML', 'VRML', 'Wikimedia', 'XML', 'txt2tags', 'xslt', ], 'Other' => [ 'ABC', 'Alerts', 'CMake', 'CSS/PHP', 'CUE Sheet', 'ChangeLog', 'Debian Changelog', 'Debian Control', 'Diff', 'Email', 'JavaScript/PHP', 'LilyPond', 'M3U', 'Makefile', 'Music Publisher', 'POV-Ray', 'RPM Spec', 'RenderMan RIB', ], 'Scientific' => [ 'GDL', 'Matlab', 'Octave', 'TI Basic', 'scilab', ], 'Script' => [ 'Ansys', ], 'Scripts' => [ 'AWK', 'Bash', 'Common Lisp', 'Euphoria', 'JavaScript', 'Lua', 'Mason', 'PHP (HTML)', 'PHP/PHP', 'Perl', 'Pike', 'Python', 'Quake Script', 'R Script', 'REXX', 'Ruby', 'Scheme', 'Sieve', 'TaskJuggler', 'Tcl/Tk', 'UnrealScript', 'Velocity', 'ferite', ], 'Sources' => [ 'ANSI C89', 'Ada', 'C', 'C#', 'C++', 'CGiS', 'Cg', 'Clipper', 'Component-Pascal', 'D', 'E Language', 'Eiffel', 'Fortran', 'FreeBASIC', 'GLSL', 'Haskell', 'IDL', 'ILERPG', 'Inform', 'Java', 'KBasic', 'LPC', 'Lex/Flex', 'Literate Haskell', 'Logtalk', 'Modula-2', 'Objective Caml', 'Objective-C', 'Pascal', 'Prolog', 'PureBasic', 'RSI IDL', 'SML', 'Sather', 'Stata', 'Yacc/Bison', 'xHarbour', 'yacas', ], 'Test' => [ 'BaseTest', 'BaseTestchild', ], }; $self->{'syntaxes'} = { '.desktop' => 'Desktop', '4GL' => 'FourGL', '4GL-PER' => 'FourGLminusPER', 'ABC' => 'ABC', 'AHDL' => 'AHDL', 'ANSI C89' => 'ANSI_C89', 'ASP' => 'ASP', 'AVR Assembler' => 'AVR_Assembler', 'AWK' => 'AWK', 'Ada' => 'Ada', 'Alerts' => 'Alerts', 'Ansys' => 'Ansys', 'Apache Configuration' => 'Apache_Configuration', 'Asm6502' => 'Asm6502', 'BaseTest' => 'BaseTest', 'BaseTestchild' => 'BaseTestchild', 'Bash' => 'Bash', 'BibTeX' => 'BibTeX', 'C' => 'C', 'C#' => 'Cdash', 'C++' => 'Cplusplus', 'CGiS' => 'CGiS', 'CMake' => 'CMake', 'CSS' => 'CSS', 'CSS/PHP' => 'CSS_PHP', 'CUE Sheet' => 'CUE_Sheet', 'Cg' => 'Cg', 'ChangeLog' => 'ChangeLog', 'Cisco' => 'Cisco', 'Clipper' => 'Clipper', 'ColdFusion' => 'ColdFusion', 'Common Lisp' => 'Common_Lisp', 'Component-Pascal' => 'ComponentminusPascal', 'D' => 'D', 'Debian Changelog' => 'Debian_Changelog', 'Debian Control' => 'Debian_Control', 'Diff' => 'Diff', 'Doxygen' => 'Doxygen', 'E Language' => 'E_Language', 'Eiffel' => 'Eiffel', 'Email' => 'Email', 'Euphoria' => 'Euphoria', 'Fortran' => 'Fortran', 'FreeBASIC' => 'FreeBASIC', 'GDL' => 'GDL', 'GLSL' => 'GLSL', 'GNU Assembler' => 'GNU_Assembler', 'GNU Gettext' => 'GNU_Gettext', 'HTML' => 'HTML', 'Haskell' => 'Haskell', 'IDL' => 'IDL', 'ILERPG' => 'ILERPG', 'INI Files' => 'INI_Files', 'Inform' => 'Inform', 'Intel x86 (NASM)' => 'Intel_x86_NASM', 'JSP' => 'JSP', 'Java' => 'Java', 'JavaScript' => 'JavaScript', 'JavaScript/PHP' => 'JavaScript_PHP', 'Javadoc' => 'Javadoc', 'KBasic' => 'KBasic', 'Kate File Template' => 'Kate_File_Template', 'LDIF' => 'LDIF', 'LPC' => 'LPC', 'LaTeX' => 'LaTeX', 'Lex/Flex' => 'Lex_Flex', 'LilyPond' => 'LilyPond', 'Literate Haskell' => 'Literate_Haskell', 'Logtalk' => 'Logtalk', 'Lua' => 'Lua', 'M3U' => 'M3U', 'MAB-DB' => 'MABminusDB', 'MIPS Assembler' => 'MIPS_Assembler', 'Makefile' => 'Makefile', 'Mason' => 'Mason', 'Matlab' => 'Matlab', 'Modula-2' => 'Modulaminus2', 'Music Publisher' => 'Music_Publisher', 'Objective Caml' => 'Objective_Caml', 'Objective-C' => 'ObjectiveminusC', 'Octave' => 'Octave', 'PHP (HTML)' => 'PHP_HTML', 'PHP/PHP' => 'PHP_PHP', 'POV-Ray' => 'POVminusRay', 'Pascal' => 'Pascal', 'Perl' => 'Perl', 'PicAsm' => 'PicAsm', 'Pike' => 'Pike', 'PostScript' => 'PostScript', 'Prolog' => 'Prolog', 'PureBasic' => 'PureBasic', 'Python' => 'Python', 'Quake Script' => 'Quake_Script', 'R Script' => 'R_Script', 'REXX' => 'REXX', 'RPM Spec' => 'RPM_Spec', 'RSI IDL' => 'RSI_IDL', 'RenderMan RIB' => 'RenderMan_RIB', 'Ruby' => 'Ruby', 'SGML' => 'SGML', 'SML' => 'SML', 'SQL' => 'SQL', 'SQL (MySQL)' => 'SQL_MySQL', 'SQL (PostgreSQL)' => 'SQL_PostgreSQL', 'Sather' => 'Sather', 'Scheme' => 'Scheme', 'Sieve' => 'Sieve', 'Spice' => 'Spice', 'Stata' => 'Stata', 'TI Basic' => 'TI_Basic', 'TaskJuggler' => 'TaskJuggler', 'Tcl/Tk' => 'Tcl_Tk', 'UnrealScript' => 'UnrealScript', 'VHDL' => 'VHDL', 'VRML' => 'VRML', 'Velocity' => 'Velocity', 'Verilog' => 'Verilog', 'WINE Config' => 'WINE_Config', 'Wikimedia' => 'Wikimedia', 'XML' => 'XML', 'Yacc/Bison' => 'Yacc_Bison', 'de_DE' => 'De_DE', 'en_US' => 'En_US', 'ferite' => 'Ferite', 'nl' => 'Nl', 'progress' => 'Progress', 'scilab' => 'Scilab', 'txt2tags' => 'Txt2tags', 'x.org Configuration' => 'Xorg_Configuration', 'xHarbour' => 'XHarbour', 'xslt' => 'Xslt', 'yacas' => 'Yacas', }; #end autoinsert $self->{'language '} = ''; bless ($self, $class); if ($language ne '') { $self->language($language); } return $self; } sub extensions { my $self = shift; return $self->{'extensions'}; } #overriding Template's initialize method. now it should not do anything. sub initialize { my $cw = shift; } sub language { my $self = shift; if (@_) { $self->{'language'} = shift; $self->reset; } return $self->{'language'}; } sub languageAutoSet { my ($self, $file) = @_; my $lang = $self->languagePropose($file); if (defined $lang) { $self->language($lang) } else { $self->language('Off') } } sub languageList { my $self = shift; my $l = $self->{'syntaxes'}; return sort {uc($a) cmp uc($b)} keys %$l; } sub languagePropose { my ($self, $file) = @_; my $hsh = $self->extensions; foreach my $key (keys %$hsh) { my $reg = $key; $reg =~ s/\./\\./g; $reg =~ s/\+/\\+/g; $reg =~ s/\*/.*/g; $reg = "$reg\$"; if ($file =~ /$reg/) { return $hsh->{$key}->[0] } } return undef; } sub languagePlug { my ($self, $req) = @_; unless (exists($self->{'syntaxes'}->{$req})) { warn "undefined language: $req"; return undef; } return $self->{'syntaxes'}->{$req}; } sub reset { my $self = shift; my $lang = $self->language; if ($lang eq 'Off') { $self->stack([]); } else { my $plug = $self->pluginGet($lang); my $basecontext = $plug->basecontext; $self->stack([ [$plug, $basecontext] ]); } $self->out([]); $self->snippet(''); } sub sections { my $self = shift; return $self->{'sections'}; } sub syntaxes { my $self = shift; return $self->{'syntaxes'} } 1; __END__ =head1 NAME Syntax::Highlight::Engine::Kate - a port to Perl of the syntax highlight engine of the Kate texteditor. =head1 SYNOPSIS #if you want to create a compiled executable, you may want to do this: use Syntax::Highlight::Engine::Kate::All; use Syntax::Highlight::Engine::Kate; my $hl = new Syntax::Highlight::Engine::Kate( language => 'Perl', substitutions => { "<" => "<", ">" => ">", "&" => "&", " " => " ", "\t" => "   ", "\n" => "
\n", }, format_table => { Alert => ["", ""], BaseN => ["", ""], BString => ["", ""], Char => ["", ""], Comment => ["", ""], DataType => ["", ""], DecVal => ["", ""], Error => ["", ""], Float => ["", ""], Function => ["", ""], IString => ["", ""], Keyword => ["", ""], Normal => ["", ""], Operator => ["", ""], Others => ["", ""], RegionMarker => ["", ""], Reserved => ["", ""], String => ["", ""], Variable => ["", ""], Warning => ["", ""], }, ); #or my $hl = new Syntax::Highlight::Engine::Kate::Perl( substitutions => { "<" => "<", ">" => ">", "&" => "&", " " => " ", "\t" => "   ", "\n" => "
\n", }, format_table => { Alert => ["", ""], BaseN => ["", ""], BString => ["", ""], Char => ["", ""], Comment => ["", ""], DataType => ["", ""], DecVal => ["", ""], Error => ["", ""], Float => ["", ""], Function => ["", ""], IString => ["", ""], Keyword => ["", ""], Normal => ["", ""], Operator => ["", ""], Others => ["", ""], RegionMarker => ["", ""], Reserved => ["", ""], String => ["", ""], Variable => ["", ""], Warning => ["", ""], }, ); print "\n\n\n\n"; while (my $in = <>) { print $hl->highlightText($in); } print "\n\n"; =head1 DESCRIPTION Syntax::Highlight::Engine::Kate is a port to perl of the syntax highlight engine of the Kate text editor. The language xml files of kate have been rewritten to perl modules using a script. These modules function as plugins to this module. Syntax::Highlight::Engine::Kate inherits Syntax::Highlight::Engine::Kate::Template. =head1 OPTIONS =over 4 =item B Specify the language you want highlighted. look in the B section for supported languages. =item B If you created your own language plugins you may specify a list of them with this option. plugins => [ ["MyModuleName", "MyLanguageName", "*,ext1;*.ext2", "Section"], .... ] =item B This option must be specified if the B method needs to do anything usefull for you. All mentioned keys in the synopsis must be specified. =item B With this option you can specify additional formatting options. =back =head1 METHODS =over 4 =item B returns a reference to the extensions hash, =item B(I) Sets and returns the current language that is highlighted. when setting the language a reset is also done. =item B(I<$filename>); Suggests language name for the fiven file B<$filename> =item B returns a list of languages for which plugins have been defined. =item B(I<$language>); returns the module name of the plugin for B<$language> =item B(I<$filename>); Suggests language name for the fiven file B<$filename> =item B Returns a reference to the sections hash. =back =head1 ATTRIBUTES In the kate XML syntax files you find under the section B<> entries like . Kate is an editor so it is ok to have definitions for forground and background colors and so on. However, since this Module is supposed to be a more universal highlight engine, the attributes need to be fully abstract. In which case, Kate does not have enough default attributes defined to fullfill all needs. Kate defines the following standard attributes: B, B, B, B, B, B, B, B, B, B, B, B, B, B. This module leaves out the "ds" part and uses following additional attributes: B, B, B, B, B. I have modified the XML files so that each highlight mode would get it's own attribute. In quite a few cases still not enough attributes were defined. So in some languages different modes have the same attribute. =head1 PLUGINS Below an overview of existing plugins. All have been tested on use and can be created. The ones for which no samplefile is available are marked. Those marked OK have highlighted the testfile without appearant mistakes. This does not mean that all bugs are shaken out. LANGUAGE MODULE COMMENT ******** ****** ****** .desktop Desktop OK 4GL FourGL No sample file 4GL-PER FourGLminusPER No sample file ABC ABC OK AHDL AHDL OK ANSI C89 ANSI_C89 No sample file ASP ASP OK AVR Assembler AVR_Assembler OK AWK AWK OK Ada Ada No sample file Alerts OK hidden module Ansys Ansys No sample file Apache Configuration Apache_Configuration No sample file Asm6502 Asm6502 No sample file Bash Bash OK BibTeX BibTeX OK C C No sample file C# Cdash No sample file C++ Cplusplus OK CGiS CGiS No sample file CMake CMake OK CSS CSS OK CUE Sheet CUE_Sheet No sample file Cg Cg No sample file ChangeLog ChangeLog No sample file Cisco Cisco No sample file Clipper Clipper OK ColdFusion ColdFusion No sample file Common Lisp Common_Lisp OK Component-Pascal ComponentminusPascal No sample file D D No sample file Debian Changelog Debian_Changelog No sample file Debian Control Debian_Control No sample file Diff Diff No sample file Doxygen Doxygen OK E Language E_Language OK Eiffel Eiffel No sample file Email Email OK Euphoria Euphoria OK Fortran Fortran OK FreeBASIC FreeBASIC No sample file GDL GDL No sample file GLSL GLSL OK GNU Assembler GNU_Assembler No sample file GNU Gettext GNU_Gettext No sample file HTML HTML OK Haskell Haskell OK IDL IDL No sample file ILERPG ILERPG No sample file INI Files INI_Files No sample file Inform Inform No sample file Intel x86 (NASM) Intel_X86_NASM seems to have issues JSP JSP OK Java Java OK JavaScript JavaScript OK Javadoc Javadoc No sample file KBasic KBasic No sample file Kate File Template Kate_File_Template No sample file LDIF LDIF No sample file LPC LPC No sample file LaTeX LaTex OK Lex/Flex Lex_Flex OK LilyPond LilyPond OK Literate Haskell Literate_Haskell OK Lua Lua No sample file M3U M3U OK MAB-DB MABminusDB No sample file MIPS Assembler MIPS_Assembler No sample file Makefile Makefile No sample file Mason Mason No sample file Matlab Matlab has issues Modula-2 Modulaminus2 No sample file Music Publisher Music_Publisher No sample file Octave Octave OK PHP (HTML) PHP_HTML OK PHP_PHP OK hidden module POV-Ray POV_Ray OK Pascal Pascal No sample file Perl Perl OK PicAsm PicAsm OK Pike Pike OK PostScript PostScript OK Prolog Prolog No sample file PureBasic PureBasic OK Python Python OK Quake Script Quake_Script No sample file R Script R_Script No sample file REXX REXX No sample file RPM Spec RPM_Spec No sample file RSI IDL RSI_IDL No sample file RenderMan RIB RenderMan_RIB OK Ruby Ruby OK SGML SGML No sample file SML SML No sample file SQL SQL No sample file SQL (MySQL) SQL_MySQL No sample file SQL (PostgreSQL) SQL_PostgreSQL No sample file Sather Sather No sample file Scheme Scheme OK Sieve Sieve No sample file Spice Spice OK Stata Stata OK TI Basic TI_Basic No sample file TaskJuggler TaskJuggler No sample file Tcl/Tk TCL_Tk OK UnrealScript UnrealScript OK VHDL VHDL No sample file VRML VRML OK Velocity Velocity No sample file Verilog Verilog No sample file WINE Config WINE_Config No sample file Wikimedia Wikimedia No sample file XML XML OK XML (Debug) XML_Debug No sample file Yacc/Bison Yacc_Bison OK de_DE De_DE No sample file en_EN En_EN No sample file ferite Ferite No sample file nl Nl No sample file progress Progress No sample file scilab Scilab No sample file txt2tags Txt2tags No sample file x.org Configuration X_org_Configuration OK xHarbour XHarbour OK xslt Xslt No sample file yacas Yacas No sample file =head1 BUGS Float is detected differently than in the Kate editor. The regular expression engine of the Kate editor, qregexp, appears to be more tolerant to mistakes in regular expressions than perl. This might lead to error messages and differences in behaviour. Most of the problems were sorted out while developing, because error messages appeared. For as far as differences in behaviour is concerned, testing is the only way to find out, so i hope the users out there will be able to tell me more. This module is mimicking the behaviour of the syntax highlight engine of the Kate editor. If you find a bug/mistake in the highlighting, please check if Kate behaves in the same way. If yes, the cause is likely to be found there. =head1 TO DO Rebuild the scripts i am using to generate the modules from xml files so they are more pro-actively tracking flaws in the build of the xml files like missing lists. Also regular expressions in the xml can be tested better before used in plugins. Refine the testmethods in Syntax::Highlight::Engine::Kate::Template, so that choices for casesensitivity, dynamic behaviour and lookahead can be determined at generate time of the plugin, might increase throughput. Implement codefolding. =head1 ACKNOWLEDGEMENTS All the people who wrote Kate and the syntax highlight xml files. =head1 AUTHOR AND COPYRIGHT This module is written and maintained by: Hans Jeuken < haje at toneel dot demon dot nl > Copyright (c) 2006 by Hans Jeuken, all rights reserved. You may freely distribute and/or modify this module under the same terms as Perl itself. =head1 SEE ALSO Syntax::Highlight::Engine::Kate::Template http:://www.kate-editor.org =cut libsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/t/perl/before/maze.pl0000644000175000017500000000707311736037062025674 0ustar gregoagregoa#!perl use strict; use warnings; use diagnostics; use List::Util 'shuffle'; # The size of the maze. Take the arguments from the command line or from the # default. my ( $HEIGHT, $WIDTH ) = @ARGV ? @ARGV : ( 20, 20 ); # Time::HiRes was officially released with Perl 5.8.0, though Module::Corelist # reports that it was actually released as early as v5.7.3. If you don't have # this module, your version of Perl is probably over a decade old use Time::HiRes 'usleep'; # In Perl, $^O is the name of your operating system. On Windows (as of this # writing), it always 'MSWin32'. use constant IS_WIN32 => 'MSWin32' eq $^O; # On Windows, we assume that the command to clear the screen is 'cls'. On all # other systems, we assume it's 'clear'. You may need to adjust this. use constant CLEAR => IS_WIN32 ? 'cls' : 'clear'; # We will only redraw the screen (and thus show the recursive maze generation) # if and only if the system is capable of clearing the screen. The system() # command returns 0 upon success. See perldoc -f system. # The following line works because $x == $y returns a boolean value. #use constant CAN_REDRAW => 0 == system(CLEAR); use constant CAN_REDRAW => 0; # Time in microseconds between screen redraws. See Time::HiRes and the usleep # function use constant DELAY => 10_000; use constant OPPOSITE_OF => { north => 'south', south => 'north', west => 'east', east => 'west', }; my @maze; tunnel( 0, 0, \@maze ); my $num = 10_000; system(CLEAR) if CAN_REDRAW; print render_maze( \@maze ); exit; sub tunnel { my ( $x, $y, $maze ) = @_; if (CAN_REDRAW) { my $render = render_maze($maze); system(CLEAR); print $render; usleep DELAY; } # Here we need to use a unary plus in front of OPPOSITE_OF so that # Perl understands that this is a constant and that we're not trying # to access the %OPPOSITE_OF variable. my @directions = shuffle keys %{ +OPPOSITE_OF }; foreach my $direction (@directions) { my ( $new_x, $new_y ) = ( $x, $y ); if ( 'east' eq $direction ) { $new_x += 1; } elsif ( 'west' eq $direction ) { $new_x -= 1; } elsif ( 'south' eq $direction ) { $new_y += 1; } else { $new_y -= 1; } if ( have_not_visited( $new_x, $new_y, $maze ) ) { $maze->[$y][$x]{$direction} = 1; $maze->[$new_y][$new_x]{ OPPOSITE_OF->{$direction} } = 1; # This program will often recurse more than one hundred levels # deep and this is Perl's default recursion depth level prior to # issuing warnings. In this case, we're telling Perl that we know # that we'll exceed the recursion depth and to now warn us about # it no warnings 'recursion'; tunnel( $new_x, $new_y, $maze ); } } } sub have_not_visited { my ( $x, $y, $maze ) = @_; # the first two lines return false if we're out of bounds return if $x < 0 or $y < 0; return if $x > $WIDTH - 1 or $y > $HEIGHT - 1; # this returns false if we've already visited this cell return if $maze->[$y][$x]; # return true return 1; } sub render_maze { my $maze = shift; my $as_string = "_" x ( 1 + $WIDTH * 2 ); $as_string .= "\n"; for my $y ( 0 .. $HEIGHT - 1 ) { $as_string .= "|"; for my $x ( 0 .. $WIDTH - 1 ) { my $cell = $maze->[$y][$x]; $as_string .= $cell->{south} ? " " : "_"; $as_string .= $cell->{east} ? " " : "|"; } $as_string .= "\n"; } return $as_string; } libsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/t/perl/before/template.pl0000755000175000017500000006560611736037062026564 0ustar gregoagregoa# Copyright (c) 2006 Hans Jeuken. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. package Syntax::Highlight::Engine::Kate::Template; our $VERSION = '0.06'; use strict; use Carp qw(cluck); use Data::Dumper; #my $regchars = '\\^.$|()[]*+?'; sub new { my $proto = shift; my $class = ref($proto) || $proto; my %args = (@_); my $debug = delete $args{'debug'}; unless (defined($debug)) { $debug = 0 }; my $substitutions = delete $args{'substitutions'}; unless (defined($substitutions)) { $substitutions = {} }; my $formattable = delete $args{'format_table'}; unless (defined($formattable)) { $formattable = {} }; my $engine = delete $args{'engine'}; my $self = {}; $self->{'attributes'} = {}, $self->{'captured'} = []; $self->{'contextdata'} = {}; $self->{'basecontext'} = ''; $self->{'debug'} = $debug; $self->{'deliminators'} = ''; $self->{'engine'} = ''; $self->{'format_table'} = $formattable; $self->{'keywordcase'} = 1; $self->{'lastchar'} = ''; $self->{'linesegment'} = ''; $self->{'lists'} = {}; $self->{'linestart'} = 1; $self->{'out'} = []; $self->{'plugins'} = {}; $self->{'snippet'} = ''; $self->{'snippetattribute'} = ''; $self->{'stack'} = []; $self->{'substitutions'} = $substitutions; bless ($self, $class); unless (defined $engine) { $engine = $self }; $self->engine($engine); $self->initialize; return $self; } sub attributes { my $self = shift; if (@_) { $self->{'attributes'} = shift; }; return $self->{'attributes'}; } sub basecontext { my $self = shift; if (@_) { $self->{'basecontext'} = shift; }; return $self->{'basecontext'}; } sub captured { my ($self, $c) = @_; if (defined($c)) { my $t = $self->engine->stackTop; my $n = 0; my @o = (); while (defined($c->[$n])) { push @o, $c->[$n]; $n ++; } if (@o) { $t->[2] = \@o; } }; } sub capturedGet { my ($self, $num) = @_; my $s = $self->engine->stack; if (defined($s->[1])) { my $c = $s->[1]->[2]; $num --; if (defined($c)) { if (defined($c->[$num])) { my $r = $c->[$num]; return $r; } else { warn "capture number $num not defined"; } } else { warn "dynamic substitution is called for but nothing to substitute\n"; return undef; } } else { warn "no parent context to take captures from"; } } #sub captured { # my $self = shift; # if (@_) { # $self->{'captured'} = shift; ## print Dumper($self->{'captured'}); # }; # return $self->{'captured'} ## my ($self, $c) = @_; ## if (defined($c)) { ## my $t = $self->engine->stackTop; ## my $n = 0; ## my @o = (); ## while (defined($c->[$n])) { ## push @o, $c->[$n]; ## $n ++; ## } ## if (@o) { ## $t->[2] = \@o; ## } ## }; #} # #sub capturedGet { # my ($self, $num) = @_; # my $s = $self->captured; # if (defined $s) { # $num --; # if (defined($s->[$num])) { # return $s->[$num]; # } else { # $self->logwarning("capture number $num not defined"); # } # } else { # $self->logwarning("dynamic substitution is called for but nothing to substitute"); # return undef; # } #} sub capturedParse { my ($self, $string, $mode) = @_; my $s = ''; if (defined($mode)) { if ($string =~ s/^(\d)//) { $s = $self->capturedGet($1); if ($string ne '') { $self->logwarning("character class is longer then 1 character, ignoring the rest"); } } } else { while ($string ne '') { if ($string =~ s/^([^\%]*)\%(\d)//) { my $r = $self->capturedGet($2); if ($r ne '') { $s = $s . $1 . $r } else { $s = $s . $1 . '%' . $2; $self->logwarning("target is an empty string"); } } else { $string =~ s/^(.)//; $s = "$s$1"; } } } return $s; } sub column { my $self = shift; return length($self->linesegment); } sub contextdata { my $self = shift; if (@_) { $self->{'contextdata'} = shift; }; return $self->{'contextdata'}; } sub contextInfo { my ($self, $context, $item) = @_; if (exists $self->contextdata->{$context}) { my $c = $self->contextdata->{$context}; if (exists $c->{$item}) { return $c->{$item} } else { return undef; } } else { $self->logwarning("undefined context '$context'"); return undef; } } sub contextParse { my ($self, $plug, $context) = @_; if ($context =~ /^#pop/i) { while ($context =~ s/#pop//i) { $self->stackPull; } } elsif ($context =~ /^#stay/i) { #don't do anything } elsif ($context =~ /^##(.+)/) { my $new = $self->pluginGet($1); $self->stackPush([$new, $new->basecontext]); } else { $self->stackPush([$plug, $context]); } } sub debug { my $self = shift; if (@_) { $self->{'debug'} = shift; }; return $self->{'debug'}; } sub debugTest { my $self = shift; if (@_) { $self->{'debugtest'} = shift; }; return $self->{'debugtest'}; } sub deliminators { my $self = shift; if (@_) { $self->{'deliminators'} = shift; }; return $self->{'deliminators'}; } sub engine { my $self = shift; if (@_) { $self->{'engine'} = shift; }; return $self->{'engine'}; } sub firstnonspace { my ($self, $string) = @_; my $line = $self->linesegment; if (($line =~ /^\s*$/) and ($string =~ /^[^\s]/)) { return 1 } return '' } sub formatTable { my $self = shift; if (@_) { $self->{'format_table'} = shift; }; return $self->{'format_table'}; } sub highlight { my ($self, $text) = @_; $self->snippet(''); my $out = $self->out; @$out = (); while ($text ne '') { my $top = $self->stackTop; if (defined($top)) { my ($plug, $context) = @$top; if ($text =~ s/^(\n)//) { $self->snippetForce; my $e = $plug->contextInfo($context, 'lineending'); if (defined($e)) { $self->contextParse($plug, $e) } my $attr = $plug->attributes->{$plug->contextInfo($context, 'attribute')}; $self->snippetParse($1, $attr); $self->snippetForce; $self->linesegment(''); my $b = $plug->contextInfo($context, 'linebeginning'); if (defined($b)) { $self->contextParse($plug, $b) } } else { my $sub = $plug->contextInfo($context, 'callback'); my $result = &$sub($plug, \$text); unless($result) { my $f = $plug->contextInfo($context, 'fallthrough'); if (defined($f)) { $self->contextParse($plug, $f); } else { $text =~ s/^(.)//; my $attr = $plug->attributes->{$plug->contextInfo($context, 'attribute')}; $self->snippetParse($1, $attr); } } } } else { push @$out, length($text), 'Normal'; $text = ''; } } $self->snippetForce; return @$out; } sub highlightText { my ($self, $text) = @_; my $res = ''; my @hl = $self->highlight($text); while (@hl) { my $f = shift @hl; my $t = shift @hl; unless (defined($t)) { $t = 'Normal' } my $s = $self->substitutions; my $rr = ''; while ($f ne '') { my $k = substr($f , 0, 1); $f = substr($f, 1, length($f) -1); if (exists $s->{$k}) { $rr = $rr . $s->{$k} } else { $rr = $rr . $k; } } my $rt = $self->formatTable; if (exists $rt->{$t}) { my $o = $rt->{$t}; $res = $res . $o->[0] . $rr . $o->[1]; } else { $res = $res . $rr; $self->logwarning("undefined format tag '$t'"); } } return $res; } sub includePlugin { my ($self, $language, $text) = @_; my $eng = $self->engine; my $plug = $eng->pluginGet($language); if (defined($plug)) { my $context = $plug->basecontext; my $call = $plug->contextInfo($context, 'callback'); if (defined($call)) { return &$call($plug, $text); } else { $self->logwarning("cannot find callback for context '$context'"); } } return 0; } sub includeRules { my ($self, $context, $text) = @_; my $call = $self->contextInfo($context, 'callback'); if (defined($call)) { return &$call($self, $text); } else { $self->logwarning("cannot find callback for context '$context'"); } return 0; } sub initialize { my $self = shift; if ($self->engine eq $self) { $self->stack([[$self, $self->basecontext]]); } } sub keywordscase { my $self = shift; if (@_) { $self->{'keywordcase'} = shift; } return $self->{'keywordscase'} } sub languagePlug { my ($cw, $name) = @_; my %numb = ( '1' => 'One', '2' => 'Two', '3' => 'Three', '4' => 'Four', '5' => 'Five', '6' => 'Six', '7' => 'Seven', '8' => 'Eight', '9' => 'Nine', '0' => 'Zero', ); if ($name =~ s/^(\d)//) { $name = $numb{$1} . $name; } $name =~ s/\.//; $name =~ s/\+/plus/g; $name =~ s/\-/minus/g; $name =~ s/#/dash/g; $name =~ s/[^0-9a-zA-Z]/_/g; $name =~ s/__/_/g; $name =~ s/_$//; $name = ucfirst($name); return $name; } sub lastchar { my $self = shift; my $l = $self->linesegment; if ($l eq '') { return "\n" } #last character was a newline return substr($l, length($l) - 1, 1); } sub lastcharDeliminator { my $self = shift; my $deliminators = '\s|\~|\!|\%|\^|\&|\*|\+|\(|\)|-|=|\{|\}|\[|\]|:|;|<|>|,|\\|\||\.|\?|\/'; if ($self->linestart or ($self->lastchar =~ /$deliminators/)) { return 1; } return ''; } sub linesegment { my $self = shift; if (@_) { $self->{'linesegment'} = shift; }; return $self->{'linesegment'}; } sub linestart { my $self = shift; if ($self->linesegment eq '') { return 1 } return ''; } sub lists { my $self = shift; if (@_) { $self->{'lists'} = shift; } return $self->{'lists'} } sub out { my $self = shift; if (@_) { $self->{'out'} = shift; } return $self->{'out'}; } sub listAdd { my $self = shift; my $listname = shift; my $lst = $self->lists; if (@_) { my @l = reverse sort @_; $lst->{$listname} = \@l; } else { $lst->{$listname} = []; } } sub logwarning { my ($self, $warning) = @_; my $top = $self->engine->stackTop; if (defined $top) { my $lang = $top->[0]->language; my $context = $top->[1]; $warning = "$warning\n Language => $lang, Context => $context\n"; } else { $warning = "$warning\n STACK IS EMPTY: PANIC\n" } cluck($warning); } sub parseResult { my ($self, $text, $string, $lahead, $column, $fnspace, $context, $attr) = @_; my $eng = $self->engine; if ($fnspace) { unless ($eng->firstnonspace($$text)) { return '' } } if (defined($column)) { if ($column ne $eng->column) { return ''; } } unless ($lahead) { $$text = substr($$text, length($string)); my $r; unless (defined($attr)) { my $t = $eng->stackTop; my ($plug, $ctext) = @$t; $r = $plug->attributes->{$plug->contextInfo($ctext, 'attribute')}; } else { $r = $self->attributes->{$attr}; } $eng->snippetParse($string, $r); } $eng->contextParse($self, $context); return 1 } sub pluginGet { my ($self, $language) = @_; my $plugs = $self->{'plugins'}; unless (exists($plugs->{$language})) { my $modname = 'Syntax::Highlight::Engine::Kate::' . $self->languagePlug($language); unless (defined($modname)) { $self->logwarning("no valid module found for language '$language'"); return undef; } my $plug; eval "use $modname; \$plug = new $modname(engine => \$self);"; if (defined($plug)) { $plugs->{$language} = $plug; } else { $self->logwarning("cannot create plugin for language '$language'\n$@"); } } if (exists($plugs->{$language})) { return $plugs->{$language}; } return undef; } sub reset { my $self = shift; $self->stack([[$self, $self->basecontext]]); $self->out([]); $self->snippet(''); } sub snippet { my $self = shift; if (@_) { $self->{'snippet'} = shift; } return $self->{'snippet'}; } sub snippetAppend { my ($self, $ch) = @_; return if not defined $ch; $self->{'snippet'} = $self->{'snippet'} . $ch; if ($ch ne '') { $self->linesegment($self->linesegment . $ch); } return; } sub snippetAttribute { my $self = shift; if (@_) { $self->{'snippetattribute'} = shift; } return $self->{'snippetattribute'}; } sub snippetForce { my $self = shift; my $parse = $self->snippet; if ($parse ne '') { my $out = $self->{'out'}; push(@$out, $parse, $self->snippetAttribute); $self->snippet(''); } } sub snippetParse { my $self = shift; my $snip = shift; my $attr = shift; if ((defined $attr) and ($attr ne $self->snippetAttribute)) { $self->snippetForce; $self->snippetAttribute($attr); } $self->snippetAppend($snip); } sub stack { my $self = shift; if (@_) { $self->{'stack'} = shift; } return $self->{'stack'}; } sub stackPush { my ($self, $val) = @_; my $stack = $self->stack; unshift(@$stack, $val); } sub stackPull { my ($self, $val) = @_; my $stack = $self->stack; return shift(@$stack); } sub stackTop { my $self = shift; return $self->stack->[0]; } sub stateCompare { my ($self, $state) = @_; my $h = [ $self->stateGet ]; my $equal = 0; if (Dumper($h) eq Dumper($state)) { $equal = 1 }; return $equal; } sub stateGet { my $self = shift; my $s = $self->stack; return @$s; } sub stateSet { my $self = shift; my $s = $self->stack; @$s = (@_); } sub substitutions { my $self = shift; if (@_) { $self->{'substitutions'} = shift; } return $self->{'substitutions'}; } sub testAnyChar { my $self = shift; my $text = shift; my $string = shift; my $insensitive = shift; my $test = substr($$text, 0, 1); my $bck = $test; if ($insensitive) { $string = lc($string); $test = lc($test); } if (index($string, $test) > -1) { return $self->parseResult($text, $bck, @_); } return '' } sub testDetectChar { my $self = shift; my $text = shift; my $char = shift; my $insensitive = shift; my $dyn = shift; if ($dyn) { $char = $self->capturedParse($char, 1); } my $test = substr($$text, 0, 1); my $bck = $test; if ($insensitive) { $char = lc($char); $test = lc($test); } if ($char eq $test) { return $self->parseResult($text, $bck, @_); } return '' } sub testDetect2Chars { my $self = shift; my $text = shift; my $char = shift; my $char1 = shift; my $insensitive = shift; my $dyn = shift; if ($dyn) { $char = $self->capturedParse($char, 1); $char1 = $self->capturedParse($char1, 1); } my $string = $char . $char1; my $test = substr($$text, 0, 2); my $bck = $test; if ($insensitive) { $string = lc($string); $test = lc($test); } if ($string eq $test) { return $self->parseResult($text, $bck, @_); } return '' } sub testDetectIdentifier { my $self = shift; my $text = shift; if ($$text =~ /^([a-zA-Z_][a-zA-Z0-9_]+)/) { return $self->parseResult($text, $1, @_); } return '' } sub testDetectSpaces { my $self = shift; my $text = shift; if ($$text =~ /^([\\040|\\t]+)/) { return $self->parseResult($text, $1, @_); } return '' } sub testFloat { my $self = shift; my $text = shift; if ($self->engine->lastcharDeliminator) { if ($$text =~ /^((?=\.?\d)\d*(?:\.\d*)?(?:[Ee][+-]?\d+)?)/) { return $self->parseResult($text, $1, @_); } } return '' } sub testHlCChar { my $self = shift; my $text = shift; if ($$text =~ /^('.')/) { return $self->parseResult($text, $1, @_); } return '' } sub testHlCHex { my $self = shift; my $text = shift; if ($self->engine->lastcharDeliminator) { if ($$text =~ /^(0x[0-9a-fA-F]+)/) { return $self->parseResult($text, $1, @_); } } return '' } sub testHlCOct { my $self = shift; my $text = shift; if ($self->engine->lastcharDeliminator) { if ($$text =~ /^(0[0-7]+)/) { return $self->parseResult($text, $1, @_); } } return '' } sub testHlCStringChar { my $self = shift; my $text = shift; if ($$text =~ /^(\\[a|b|e|f|n|r|t|v|'|"|\?])/) { return $self->parseResult($text, $1, @_); } if ($$text =~ /^(\\x[0-9a-fA-F][0-9a-fA-F]?)/) { return $self->parseResult($text, $1, @_); } if ($$text =~ /^(\\[0-7][0-7]?[0-7]?)/) { return $self->parseResult($text, $1, @_); } return '' } sub testInt { my $self = shift; my $text = shift; if ($self->engine->lastcharDeliminator) { if ($$text =~ /^([+-]?\d+)/) { return $self->parseResult($text, $1, @_); } } return '' } sub testKeyword { my $self = shift; my $text = shift; my $list = shift; my $eng = $self->engine; my $deliminators = $self->deliminators; if (($eng->lastcharDeliminator) and ($$text =~ /^([^$deliminators]+)/)) { my $match = $1; my $l = $self->lists->{$list}; if (defined($l)) { my @list = @$l; my @rl = (); unless ($self->keywordscase) { @rl = grep { (lc($match) eq lc($_)) } @list; } else { @rl = grep { ($match eq $_) } @list; } if (@rl) { return $self->parseResult($text, $match, @_); } } else { $self->logwarning("list '$list' is not defined, failing test"); } } return '' } sub testLineContinue { my $self = shift; my $text = shift; my $lahead = shift; if ($lahead) { if ($$text =~ /^\\\n/) { $self->parseResult($text, "\\", $lahead, @_); return 1; } } else { if ($$text =~ s/^(\\)(\n)/$2/) { return $self->parseResult($text, "\\", $lahead, @_); } } return '' } sub testRangeDetect { my $self = shift; my $text = shift; my $char = shift; my $char1 = shift; my $insensitive = shift; my $string = "$char\[^$char1\]+$char1"; return $self->testRegExpr($text, $string, $insensitive, 0, @_); } sub testRegExpr { my $self = shift; my $text = shift; my $reg = shift; my $insensitive = shift; my $dynamic = shift; if ($dynamic) { $reg = $self->capturedParse($reg); } my $eng = $self->engine; if ($reg =~ s/^\^//) { unless ($eng->linestart) { return ''; } } elsif ($reg =~ s/^\\(b)//i) { my $lastchar = $self->engine->lastchar; if ($1 eq 'b') { if ($lastchar =~ /\w/) { return '' } } else { if ($lastchar =~ /\W/) { return '' } } } # $reg = "^($reg)"; $reg = "^$reg"; my $pos; # my @cap = (); my $sample = $$text; # emergency measurements to avoid exception (szabgab) $reg = eval { qr/$reg/ }; if ($@) { warn $@; return ''; } if ($insensitive) { if ($sample =~ /$reg/ig) { $pos = pos($sample); # @cap = ($1, $2, $3, $4, $5, $6, $7, $8, $9); # my @cap = (); if ($#-) { no strict 'refs'; my @cap = map {$$_} 1 .. $#-; $self->captured(\@cap) } # my $r = 1; # my $c = 1; # my @cap = (); # while ($r) { # eval "if (defined\$$c) { push \@cap, \$$c } else { \$r = 0 }"; # $c ++; # } # if (@cap) { $self->captured(\@cap) }; } } else { if ($sample =~ /$reg/g) { $pos = pos($sample); # @cap = ($1, $2, $3, $4, $5, $6, $7, $8, $9); # my @cap = (); if ($#-) { no strict 'refs'; my @cap = map {$$_} 1 .. $#-; $self->captured(\@cap); } # my $r = 1; # my $c = 1; # my @cap = (); # while ($r) { # eval "if (defined\$$c) { push \@cap, \$$c } else { \$r = 0 }"; # $c ++; # } # if (@cap) { $self->captured(\@cap) }; } } if (defined($pos) and ($pos > 0)) { my $string = substr($$text, 0, $pos); return $self->parseResult($text, $string, @_); } return '' } sub testStringDetect { my $self = shift; my $text = shift; my $string = shift; my $insensitive = shift; my $dynamic = shift; if ($dynamic) { $string = $self->capturedParse($string); } my $test = substr($$text, 0, length($string)); my $bck = $test; if ($insensitive) { $string = lc($string); $test = lc($test); } if ($string eq $test) { return $self->parseResult($text, $bck, @_); } return '' } 1; __END__ =head1 NAME Syntax::Highlight::Engine::Kate::Template - a template for syntax highlighting plugins =head1 DESCRIPTION Syntax::Highlight::Engine::Kate::Template is a framework to assist authors of plugin modules. All methods to provide highlighting to the Syntax::Highlight::Engine::Kate module are there, Just no syntax definitions and callbacks. An instance of Syntax::Highlight::Engine::Kate::Template should never be created, it's meant to be sub classed only. =head1 METHODS =over 4 =item B(I); Sets and returns a reference to the attributes hash. =item B(I); Sets and returns the basecontext instance variable. This is the context that is used when highlighting starts. =item B(I<$cap>); Puts $cap in the first element of the stack, the current context. Used when the context is dynamic. =item B(I<$num>); Returns the $num'th element that was captured in the current context. =item B(I<$string>, I<$mode>); If B<$mode> is specified, B<$string> should only be one character long and numeric. B will return the Nth captured element of the current context. If B<$mode> is not specified, all occurences of %[1-9] will be replaced by the captured element of the current context. =item B returns the column position in the line that is currently highlighted. =item B(I<\%data>); Sets and returns a reference to the contextdata hash. =item B(I<$context>, I<$item>); returns the value of several context options. B<$item> can be B, B, B, B, B. =item B(I<$plugin>, I<$context>); Called by the plugins after a test succeeds. if B<$context> has following values: #pop returns to the previous context, removes to top item in the stack. Can also be specified as #pop#pop etc. #stay does nothing. ##.... Switches to the plugin specified in .... and assumes it's basecontext. .... Swtiches to the context specified in .... =item B(I); Sets and returns a string that is a regular expression for detecting deliminators. =item B Returns a reference to the Syntax::Highlight::Engine::Kate module that created this plugin. =item B(I<$string>); returns true if the current line did not contain a non-spatial character so far and the first character in B<$string> is also a spatial character. =item B sets and returns the instance variable B. See also the option B =item B(I<$text>); highlights I<$text>. It does so by selecting the proper callback from the B hash and invoke it. It will do so untill $text has been reduced to an empty string. returns a paired list of snippets of text and the attribute with which they should be highlighted. =item B(I<$text>); highlights I<$text> and reformats it using the B and B =item B(I<$language>, I<\$text>); Includes the plugin for B<$language> in the highlighting. =item B(I<$language>, I<\$text>); Includes the plugin for B<$language> in the highlighting. =item B Sets and returns the keywordscase instance variable. =item B return the last character that was processed. =item B returns true if the last character processed was a deliminator. =item B returns the string of text in the current line that has been processed so far, =item B returns true if processing is currently at the beginning of a line. =item B(I<'listname'>, I<$item1>, I<$item2> ...); Adds a list to the 'lists' hash. =item B(I); sets and returns the instance variable 'lists'. =item B(I); sets and returns the instance variable 'out'. =item B(I<\$text>, I<$match>, I<$lookahaed>, I<$column>, I<$firstnonspace>, I<$context>, I<$attribute>); Called by every one of the test methods below. If the test matches, it will do a couple of subtests. If B<$column> is a defined numerical value it will test if the process is at the requested column. If B<$firnonspace> is true, it will test this also. Ig it is not a look ahead and all tests are passed, B<$match> is then parsed and removed from B<$$text>. =item B(I<$language>); Returns a reference to a plugin object for the specified language. Creating an instance if needed. =item B Resets the highlight engine to a fresh state, does not change the syntx. =item B Contains the current snippet of text that will have one attribute. The moment the attribute changes it will be parsed. =item B(I<$string>) appends I<$string> to the current snippet. =item B(I<$attribute>) Sets and returns the used attribute. =item B Forces the current snippet to be parsed. =item B(I<$text>, I) If attribute is defined and differs from the current attribute it does a snippetForce and sets the current attribute to B<$attribute>. Then it does a snippetAppend of B<$text> =item B sets and returns the instance variable 'stack', a reference to an array =item B retrieves the element that is on top of the stack, decrements stacksize by 1. =item B(I<$tagname>); puts I<$tagname> on top of the stack, increments stacksize by 1 =item B Retrieves the element that is on top of the stack. =item B(I<\@state>) Compares two lists, \@state and the stack. returns true if they match. =item B Returns a list containing the entire stack. =item B(I<@list>) Accepts I<@list> as the current stack. =item B sets and returns a reference to the substitutions hash. =back The methods below all return a boolean value. =over 4 =item B(I<\$text>, I<$string>, I<$insensitive>, I<$lookahaed>, I<$column>, I<$firstnonspace>, I<$context>, I<$attribute>); =item B(I<\$text>, I<$char>, I<$insensitive>, I<$dynamic>, I<$lookahaed>, I<$column>, I<$firstnonspace>, I<$context>, I<$attribute>); =item B(I<\$text>, I<$char1>, I<$char2>, I<$insensitive>, I<$dynamic>, I<$lookahaed>, I<$column>, I<$firstnonspace>, I<$context>, I<$attribute>); =item B(I<\$text>, I<$lookahaed>, I<$column>, I<$firstnonspace>, I<$context>, I<$attribute>); =item B(I<\$text>, I<$lookahaed>, I<$column>, I<$firstnonspace>, I<$context>, I<$attribute>); =item B(I<\$text>, I<$lookahaed>, I<$column>, I<$firstnonspace>, I<$context>, I<$attribute>); =item B(I<\$text>, I<$lookahaed>, I<$column>, I<$firstnonspace>, I<$context>, I<$attribute>); =item B(I<\$text>, I<$lookahaed>, I<$column>, I<$firstnonspace>, I<$context>, I<$attribute>); =item B(I<\$text>, I<$lookahaed>, I<$column>, I<$firstnonspace>, I<$context>, I<$attribute>); =item B(I<\$text>, I<$lookahaed>, I<$column>, I<$firstnonspace>, I<$context>, I<$attribute>); =item B(I<\$text>, I<$lookahaed>, I<$column>, I<$firstnonspace>, I<$context>, I<$attribute>); =item B(I<\$text>, I<$list>, I<$insensitive>, I<$lookahaed>, I<$column>, I<$firstnonspace>, I<$context>, I<$attribute>); =item B(I<\$text>, I<$lookahaed>, I<$column>, I<$firstnonspace>, I<$context>, I<$attribute>); =item B(I<\$text>, I<$char1>, I<$char2>, I<$insensitive>, I<$lookahaed>, I<$column>, I<$firstnonspace>, I<$context>, I<$attribute>); =item B(I<\$text>, I<$reg>, I<$insensitive>, I<$dynamic>, I<$lookahaed>, I<$column>, I<$firstnonspace>, I<$context>, I<$attribute>); =item B(I<\$text>, I<$string>, I<$insensitive>, I<$dynamic>, II<$lookahaed>, I<$column>, I<$firstnonspace>, I<$context>, I<$attribute>); =back =head1 ACKNOWLEDGEMENTS All the people who wrote Kate and the syntax highlight xml files. =head1 AUTHOR AND COPYRIGHT This module is written and maintained by: Hans Jeuken < haje at toneel dot demon dot nl > Copyright (c) 2006 by Hans Jeuken, all rights reserved. You may freely distribute and/or modify this module under same terms as Perl itself =head1 SEE ALSO Synax::Highlight::Engine::Kate http:://www.kate-editor.orglibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/t/perl_todo.t0000644000175000017500000000341011736037062024342 0ustar gregoagregoause strict; use warnings; use Test::More; use Test::Differences; use lib 't/lib'; use TestHighlight 'highlight_perl'; plan tests => 2; # https://rt.cpan.org/Ticket/Display.html?id=76182 my $underscore_bug = <<'END'; my $underscore_bug = 10_000 ; END my $want = <<'END'; my $underscore_bug = 10_100 ; END my $have = highlight_perl($underscore_bug); TODO: { local $TODO = 'Kate does not yet handle numbers with underscores (10_000)'; eq_or_diff $have, $want, 'Numbers with underscores should parse correctly'; } # https://rt.cpan.org/Ticket/Display.html?id=76168 my $heredoc_bug = <<'END'; my $heredoc_bug = <<'HEY'; We be here HEY! <-- this is not the terminator and here HEY END $have = highlight_perl($heredoc_bug); $want = <<'END'; my $heredoc_bug = <<'HEY'; We be here HEY! <-- this is not the terminator and here HEY END TODO: { local $TODO = 'Kate sometimes guesses the heredoc terminator incorrectly'; eq_or_diff $have, $want, 'heredocs should parse correctly'; } __END__ #!/usr/bin/env perl my $heredoc_bug = <<'HEY'; We be here HEY! <-- this is not the terminator and here HEY # https://rt.cpan.org/Ticket/Display.html?id=76160 =head1 BORKED All Perl code after this was considered a "comment" and Kate could not highlight it correctly. =cut my $this_is_not_a_comment = 'or a pipe'; libsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/t/perl_highlighting.t0000644000175000017500000000132111736037062026041 0ustar gregoagregoause strict; use warnings; use Test::More; use Test::Differences; use lib 't/lib'; use TestHighlight ':all'; diag <<'END'; We don't actually know if these are highlighted correctly, but this makes decent regression tests when we refactor. END my ( $before, $after ) = ( 't/perl/before', 't/perl/highlighted' ); my $highlighted_version_of = get_sample_perl_files(); plan tests => scalar keys %$highlighted_version_of; for my $perl ( sort keys %$highlighted_version_of ) { my $highlighted = $highlighted_version_of->{$perl}; my $have = get_highlighter('Perl')->highlightText( slurp($perl) ); my $want = slurp($highlighted); eq_or_diff $have, $want, "($perl) was highlighted correctly"; } libsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/0000755000175000017500000000000012150557146022474 5ustar gregoagregoalibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/0000755000175000017500000000000012150557146023762 5ustar gregoagregoalibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/0000755000175000017500000000000012150557146025671 5ustar gregoagregoalibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/Engine/0000755000175000017500000000000012150557146027076 5ustar gregoagregoalibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/Engine/Kate.pm0000755000175000017500000007341212150556611030326 0ustar gregoagregoa # Copyright (c) 2006 Hans Jeuken. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. package Syntax::Highlight::Engine::Kate; use 5.006; our $VERSION = '0.08'; use strict; use warnings; use Carp; use Data::Dumper; use File::Basename; use base('Syntax::Highlight::Engine::Kate::Template'); sub new { my $proto = shift; my $class = ref($proto) || $proto; my %args = (@_); my $add = delete $args{'plugins'}; unless (defined($add)) { $add = [] }; my $language = delete $args{'language'}; unless (defined($language)) { $language = 'Off' }; my $self = $class->SUPER::new(%args); $self->{'plugins'} = {}; #begin autoinsert $self->{'extensions'} = { ' *.cls' => ['LaTeX', ], ' *.dtx' => ['LaTeX', ], ' *.ltx' => ['LaTeX', ], ' *.sty' => ['LaTeX', ], '*.4GL' => ['4GL', ], '*.4gl' => ['4GL', ], '*.ABC' => ['ABC', ], '*.ASM' => ['AVR Assembler', 'PicAsm', ], '*.BAS' => ['FreeBASIC', ], '*.BI' => ['FreeBASIC', ], '*.C' => ['C++', 'C', 'ANSI C89', ], '*.D' => ['D', ], '*.F' => ['Fortran', ], '*.F90' => ['Fortran', ], '*.F95' => ['Fortran', ], '*.FOR' => ['Fortran', ], '*.FPP' => ['Fortran', ], '*.GDL' => ['GDL', ], '*.H' => ['C++', ], '*.JSP' => ['JSP', ], '*.LOGO' => ['de_DE', 'en_US', 'nl', ], '*.LY' => ['LilyPond', ], '*.Logo' => ['de_DE', 'en_US', 'nl', ], '*.M' => ['Matlab', 'Octave', ], '*.MAB' => ['MAB-DB', ], '*.Mab' => ['MAB-DB', ], '*.PER' => ['4GL-PER', ], '*.PIC' => ['PicAsm', ], '*.PRG' => ['xHarbour', 'Clipper', ], '*.R' => ['R Script', ], '*.S' => ['GNU Assembler', ], '*.SQL' => ['SQL', 'SQL (MySQL)', 'SQL (PostgreSQL)', ], '*.SRC' => ['PicAsm', ], '*.V' => ['Verilog', ], '*.VCG' => ['GDL', ], '*.a' => ['Ada', ], '*.abc' => ['ABC', ], '*.ada' => ['Ada', ], '*.adb' => ['Ada', ], '*.ado' => ['Stata', ], '*.ads' => ['Ada', ], '*.ahdl' => ['AHDL', ], '*.ai' => ['PostScript', ], '*.ans' => ['Ansys', ], '*.asm' => ['AVR Assembler', 'Asm6502', 'Intel x86 (NASM)', 'PicAsm', ], '*.asm-avr' => ['AVR Assembler', ], '*.asp' => ['ASP', ], '*.awk' => ['AWK', ], '*.bas' => ['FreeBASIC', ], '*.basetest' => ['BaseTest', ], '*.bash' => ['Bash', ], '*.bi' => ['FreeBASIC', ], '*.bib' => ['BibTeX', ], '*.bro' => ['Component-Pascal', ], '*.c' => ['C', 'ANSI C89', 'LPC', ], '*.c++' => ['C++', ], '*.cc' => ['C++', ], '*.cfc' => ['ColdFusion', ], '*.cfg' => ['Quake Script', ], '*.cfm' => ['ColdFusion', ], '*.cfml' => ['ColdFusion', ], '*.cg' => ['Cg', ], '*.cgis' => ['CGiS', ], '*.ch' => ['xHarbour', 'Clipper', ], '*.cis' => ['Cisco', ], '*.cl' => ['Common Lisp', ], '*.cmake' => ['CMake', ], '*.config' => ['Logtalk', ], '*.cp' => ['Component-Pascal', ], '*.cpp' => ['C++', ], '*.cs' => ['C#', ], '*.css' => ['CSS', ], '*.cue' => ['CUE Sheet', ], '*.cxx' => ['C++', ], '*.d' => ['D', ], '*.daml' => ['XML', ], '*.dbm' => ['ColdFusion', ], '*.def' => ['Modula-2', ], '*.desktop' => ['.desktop', ], '*.diff' => ['Diff', ], '*.do' => ['Stata', ], '*.docbook' => ['XML', ], '*.dox' => ['Doxygen', ], '*.doxygen' => ['Doxygen', ], '*.e' => ['E Language', 'Eiffel', 'Euphoria', ], '*.ebuild' => ['Bash', ], '*.eclass' => ['Bash', ], '*.eml' => ['Email', ], '*.eps' => ['PostScript', ], '*.err' => ['4GL', ], '*.ex' => ['Euphoria', ], '*.exu' => ['Euphoria', ], '*.exw' => ['Euphoria', ], '*.f' => ['Fortran', ], '*.f90' => ['Fortran', ], '*.f95' => ['Fortran', ], '*.fe' => ['ferite', ], '*.feh' => ['ferite', ], '*.flex' => ['Lex/Flex', ], '*.for' => ['Fortran', ], '*.fpp' => ['Fortran', ], '*.frag' => ['GLSL', ], '*.gdl' => ['GDL', ], '*.glsl' => ['GLSL', ], '*.guile' => ['Scheme', ], '*.h' => ['C++', 'C', 'ANSI C89', 'Inform', 'LPC', 'Objective-C', ], '*.h++' => ['C++', ], '*.hcc' => ['C++', ], '*.hpp' => ['C++', ], '*.hs' => ['Haskell', ], '*.hsp' => ['Spice', ], '*.ht' => ['Apache Configuration', ], '*.htm' => ['HTML', ], '*.html' => ['HTML', 'Mason', ], '*.hxx' => ['C++', ], '*.i' => ['progress', ], '*.idl' => ['IDL', ], '*.inc' => ['POV-Ray', 'PHP (HTML)', 'LPC', ], '*.inf' => ['Inform', ], '*.ini' => ['INI Files', ], '*.java' => ['Java', ], '*.js' => ['JavaScript', ], '*.jsp' => ['JSP', ], '*.katetemplate' => ['Kate File Template', ], '*.kbasic' => ['KBasic', ], '*.kdelnk' => ['.desktop', ], '*.l' => ['Lex/Flex', ], '*.ldif' => ['LDIF', ], '*.lex' => ['Lex/Flex', ], '*.lgo' => ['de_DE', 'en_US', 'nl', ], '*.lgt' => ['Logtalk', ], '*.lhs' => ['Literate Haskell', ], '*.lisp' => ['Common Lisp', ], '*.logo' => ['de_DE', 'en_US', 'nl', ], '*.lsp' => ['Common Lisp', ], '*.lua' => ['Lua', ], '*.ly' => ['LilyPond', ], '*.m' => ['Matlab', 'Objective-C', 'Octave', ], '*.m3u' => ['M3U', ], '*.mab' => ['MAB-DB', ], '*.md' => ['Modula-2', ], '*.mi' => ['Modula-2', ], '*.ml' => ['Objective Caml', 'SML', ], '*.mli' => ['Objective Caml', ], '*.moc' => ['C++', ], '*.mod' => ['Modula-2', ], '*.mup' => ['Music Publisher', ], '*.not' => ['Music Publisher', ], '*.o' => ['LPC', ], '*.octave' => ['Octave', ], '*.p' => ['Pascal', 'progress', ], '*.pas' => ['Pascal', ], '*.pb' => ['PureBasic', ], '*.per' => ['4GL-PER', ], '*.per.err' => ['4GL-PER', ], '*.php' => ['PHP (HTML)', ], '*.php3' => ['PHP (HTML)', ], '*.phtm' => ['PHP (HTML)', ], '*.phtml' => ['PHP (HTML)', ], '*.pic' => ['PicAsm', ], '*.pike' => ['Pike', ], '*.pl' => ['Perl', ], '*.pls' => ['INI Files', ], '*.pm' => ['Perl', ], '*.po' => ['GNU Gettext', ], '*.pot' => ['GNU Gettext', ], '*.pov' => ['POV-Ray', ], '*.pp' => ['Pascal', ], '*.prg' => ['xHarbour', 'Clipper', ], '*.pro' => ['RSI IDL', ], '*.prolog' => ['Prolog', ], '*.ps' => ['PostScript', ], '*.py' => ['Python', ], '*.pyw' => ['Python', ], '*.rb' => ['Ruby', ], '*.rc' => ['XML', ], '*.rdf' => ['XML', ], '*.reg' => ['WINE Config', ], '*.rex' => ['REXX', ], '*.rib' => ['RenderMan RIB', ], '*.s' => ['GNU Assembler', 'MIPS Assembler', ], '*.sa' => ['Sather', ], '*.sce' => ['scilab', ], '*.scheme' => ['Scheme', ], '*.sci' => ['scilab', ], '*.scm' => ['Scheme', ], '*.sgml' => ['SGML', ], '*.sh' => ['Bash', ], '*.shtm' => ['HTML', ], '*.shtml' => ['HTML', ], '*.siv' => ['Sieve', ], '*.sml' => ['SML', ], '*.sp' => ['Spice', ], '*.spec' => ['RPM Spec', ], '*.sql' => ['SQL', 'SQL (MySQL)', 'SQL (PostgreSQL)', ], '*.src' => ['PicAsm', ], '*.ss' => ['Scheme', ], '*.t2t' => ['txt2tags', ], '*.tcl' => ['Tcl/Tk', ], '*.tdf' => ['AHDL', ], '*.tex' => ['LaTeX', ], '*.tji' => ['TaskJuggler', ], '*.tjp' => ['TaskJuggler', ], '*.tk' => ['Tcl/Tk', ], '*.tst' => ['BaseTestchild', ], '*.uc' => ['UnrealScript', ], '*.v' => ['Verilog', ], '*.vcg' => ['GDL', ], '*.vert' => ['GLSL', ], '*.vhd' => ['VHDL', ], '*.vhdl' => ['VHDL', ], '*.vl' => ['Verilog', ], '*.vm' => ['Velocity', ], '*.w' => ['progress', ], '*.wml' => ['PHP (HTML)', ], '*.wrl' => ['VRML', ], '*.xml' => ['XML', ], '*.xsl' => ['xslt', ], '*.xslt' => ['xslt', ], '*.y' => ['Yacc/Bison', ], '*.ys' => ['yacas', ], '*Makefile*' => ['Makefile', ], '*makefile*' => ['Makefile', ], '*patch' => ['Diff', ], 'CMakeLists.txt' => ['CMake', ], 'ChangeLog' => ['ChangeLog', ], 'QRPGLESRC.*' => ['ILERPG', ], 'apache.conf' => ['Apache Configuration', ], 'apache2.conf' => ['Apache Configuration', ], 'httpd.conf' => ['Apache Configuration', ], 'httpd2.conf' => ['Apache Configuration', ], 'xorg.conf' => ['x.org Configuration', ], }; $self->{'sections'} = { 'Assembler' => [ 'AVR Assembler', 'Asm6502', 'GNU Assembler', 'Intel x86 (NASM)', 'MIPS Assembler', 'PicAsm', ], 'Configuration' => [ '.desktop', 'Apache Configuration', 'Cisco', 'INI Files', 'WINE Config', 'x.org Configuration', ], 'Database' => [ '4GL', '4GL-PER', 'LDIF', 'SQL', 'SQL (MySQL)', 'SQL (PostgreSQL)', 'progress', ], 'Hardware' => [ 'AHDL', 'Spice', 'VHDL', 'Verilog', ], 'Logo' => [ 'de_DE', 'en_US', 'nl', ], 'Markup' => [ 'ASP', 'BibTeX', 'CSS', 'ColdFusion', 'Doxygen', 'GNU Gettext', 'HTML', 'JSP', 'Javadoc', 'Kate File Template', 'LaTeX', 'MAB-DB', 'PostScript', 'SGML', 'VRML', 'Wikimedia', 'XML', 'txt2tags', 'xslt', ], 'Other' => [ 'ABC', 'Alerts', 'CMake', 'CSS/PHP', 'CUE Sheet', 'ChangeLog', 'Debian Changelog', 'Debian Control', 'Diff', 'Email', 'JavaScript/PHP', 'LilyPond', 'M3U', 'Makefile', 'Music Publisher', 'POV-Ray', 'RPM Spec', 'RenderMan RIB', ], 'Scientific' => [ 'GDL', 'Matlab', 'Octave', 'TI Basic', 'scilab', ], 'Script' => [ 'Ansys', ], 'Scripts' => [ 'AWK', 'Bash', 'Common Lisp', 'Euphoria', 'JavaScript', 'Lua', 'Mason', 'PHP (HTML)', 'PHP/PHP', 'Perl', 'Pike', 'Python', 'Quake Script', 'R Script', 'REXX', 'Ruby', 'Scheme', 'Sieve', 'TaskJuggler', 'Tcl/Tk', 'UnrealScript', 'Velocity', 'ferite', ], 'Sources' => [ 'ANSI C89', 'Ada', 'C', 'C#', 'C++', 'CGiS', 'Cg', 'Clipper', 'Component-Pascal', 'D', 'E Language', 'Eiffel', 'Fortran', 'FreeBASIC', 'GLSL', 'Haskell', 'IDL', 'ILERPG', 'Inform', 'Java', 'KBasic', 'LPC', 'Lex/Flex', 'Literate Haskell', 'Logtalk', 'Modula-2', 'Objective Caml', 'Objective-C', 'Pascal', 'Prolog', 'PureBasic', 'RSI IDL', 'SML', 'Sather', 'Stata', 'Yacc/Bison', 'xHarbour', 'yacas', ], 'Test' => [ 'BaseTest', 'BaseTestchild', ], }; $self->{'syntaxes'} = { '.desktop' => 'Desktop', '4GL' => 'FourGL', '4GL-PER' => 'FourGLminusPER', 'ABC' => 'ABC', 'AHDL' => 'AHDL', 'ANSI C89' => 'ANSI_C89', 'ASP' => 'ASP', 'AVR Assembler' => 'AVR_Assembler', 'AWK' => 'AWK', 'Ada' => 'Ada', 'Alerts' => 'Alerts', 'Ansys' => 'Ansys', 'Apache Configuration' => 'Apache_Configuration', 'Asm6502' => 'Asm6502', 'BaseTest' => 'BaseTest', 'BaseTestchild' => 'BaseTestchild', 'Bash' => 'Bash', 'BibTeX' => 'BibTeX', 'C' => 'C', 'C#' => 'Cdash', 'C++' => 'Cplusplus', 'CGiS' => 'CGiS', 'CMake' => 'CMake', 'CSS' => 'CSS', 'CSS/PHP' => 'CSS_PHP', 'CUE Sheet' => 'CUE_Sheet', 'Cg' => 'Cg', 'ChangeLog' => 'ChangeLog', 'Cisco' => 'Cisco', 'Clipper' => 'Clipper', 'ColdFusion' => 'ColdFusion', 'Common Lisp' => 'Common_Lisp', 'Component-Pascal' => 'ComponentminusPascal', 'D' => 'D', 'Debian Changelog' => 'Debian_Changelog', 'Debian Control' => 'Debian_Control', 'Diff' => 'Diff', 'Doxygen' => 'Doxygen', 'E Language' => 'E_Language', 'Eiffel' => 'Eiffel', 'Email' => 'Email', 'Euphoria' => 'Euphoria', 'Fortran' => 'Fortran', 'FreeBASIC' => 'FreeBASIC', 'GDL' => 'GDL', 'GLSL' => 'GLSL', 'GNU Assembler' => 'GNU_Assembler', 'GNU Gettext' => 'GNU_Gettext', 'HTML' => 'HTML', 'Haskell' => 'Haskell', 'IDL' => 'IDL', 'ILERPG' => 'ILERPG', 'INI Files' => 'INI_Files', 'Inform' => 'Inform', 'Intel x86 (NASM)' => 'Intel_x86_NASM', 'JSP' => 'JSP', 'Java' => 'Java', 'JavaScript' => 'JavaScript', 'JavaScript/PHP' => 'JavaScript_PHP', 'Javadoc' => 'Javadoc', 'KBasic' => 'KBasic', 'Kate File Template' => 'Kate_File_Template', 'LDIF' => 'LDIF', 'LPC' => 'LPC', 'LaTeX' => 'LaTeX', 'Lex/Flex' => 'Lex_Flex', 'LilyPond' => 'LilyPond', 'Literate Haskell' => 'Literate_Haskell', 'Logtalk' => 'Logtalk', 'Lua' => 'Lua', 'M3U' => 'M3U', 'MAB-DB' => 'MABminusDB', 'MIPS Assembler' => 'MIPS_Assembler', 'Makefile' => 'Makefile', 'Mason' => 'Mason', 'Matlab' => 'Matlab', 'Modula-2' => 'Modulaminus2', 'Music Publisher' => 'Music_Publisher', 'Objective Caml' => 'Objective_Caml', 'Objective-C' => 'ObjectiveminusC', 'Octave' => 'Octave', 'PHP (HTML)' => 'PHP_HTML', 'PHP/PHP' => 'PHP_PHP', 'POV-Ray' => 'POVminusRay', 'Pascal' => 'Pascal', 'Perl' => 'Perl', 'PicAsm' => 'PicAsm', 'Pike' => 'Pike', 'PostScript' => 'PostScript', 'Prolog' => 'Prolog', 'PureBasic' => 'PureBasic', 'Python' => 'Python', 'Quake Script' => 'Quake_Script', 'R Script' => 'R_Script', 'REXX' => 'REXX', 'RPM Spec' => 'RPM_Spec', 'RSI IDL' => 'RSI_IDL', 'RenderMan RIB' => 'RenderMan_RIB', 'Ruby' => 'Ruby', 'SGML' => 'SGML', 'SML' => 'SML', 'SQL' => 'SQL', 'SQL (MySQL)' => 'SQL_MySQL', 'SQL (PostgreSQL)' => 'SQL_PostgreSQL', 'Sather' => 'Sather', 'Scheme' => 'Scheme', 'Sieve' => 'Sieve', 'Spice' => 'Spice', 'Stata' => 'Stata', 'TI Basic' => 'TI_Basic', 'TaskJuggler' => 'TaskJuggler', 'Tcl/Tk' => 'Tcl_Tk', 'UnrealScript' => 'UnrealScript', 'VHDL' => 'VHDL', 'VRML' => 'VRML', 'Velocity' => 'Velocity', 'Verilog' => 'Verilog', 'WINE Config' => 'WINE_Config', 'Wikimedia' => 'Wikimedia', 'XML' => 'XML', 'Yacc/Bison' => 'Yacc_Bison', 'de_DE' => 'De_DE', 'en_US' => 'En_US', 'ferite' => 'Ferite', 'nl' => 'Nl', 'progress' => 'Progress', 'scilab' => 'Scilab', 'txt2tags' => 'Txt2tags', 'x.org Configuration' => 'Xorg_Configuration', 'xHarbour' => 'XHarbour', 'xslt' => 'Xslt', 'yacas' => 'Yacas', }; #end autoinsert $self->{'language '} = ''; bless ($self, $class); if ($language ne '') { $self->language($language); } return $self; } sub extensions { my $self = shift; return $self->{'extensions'}; } #overriding Template's initialize method. now it should not do anything. sub initialize { my $cw = shift; } sub language { my $self = shift; if (@_) { $self->{'language'} = shift; $self->reset; } return $self->{'language'}; } sub languageAutoSet { my ($self, $file) = @_; my $lang = $self->languagePropose($file); if (defined $lang) { $self->language($lang) } else { $self->language('Off') } } sub languageList { my $self = shift; my $l = $self->{'syntaxes'}; return sort {uc($a) cmp uc($b)} keys %$l; } sub languagePropose { my ($self, $file) = @_; my $hsh = $self->extensions; foreach my $key (keys %$hsh) { my $reg = $key; $reg =~ s/\./\\./g; $reg =~ s/\+/\\+/g; $reg =~ s/\*/.*/g; $reg = "$reg\$"; if ($file =~ /$reg/) { return $hsh->{$key}->[0] } } return undef; } sub languagePlug { my ($self, $req) = @_; unless (exists($self->{'syntaxes'}->{$req})) { warn "undefined language: $req"; return undef; } return $self->{'syntaxes'}->{$req}; } sub reset { my $self = shift; my $lang = $self->language; if ($lang eq 'Off') { $self->stack([]); } else { my $plug = $self->pluginGet($lang); my $basecontext = $plug->basecontext; $self->stack([ [$plug, $basecontext] ]); } $self->out([]); $self->snippet(''); } sub sections { my $self = shift; return $self->{'sections'}; } sub syntaxes { my $self = shift; return $self->{'syntaxes'} } 1; __END__ =head1 NAME Syntax::Highlight::Engine::Kate - a port to Perl of the syntax highlight engine of the Kate texteditor. =head1 SYNOPSIS #if you want to create a compiled executable, you may want to do this: use Syntax::Highlight::Engine::Kate::All; use Syntax::Highlight::Engine::Kate; my $hl = new Syntax::Highlight::Engine::Kate( language => 'Perl', substitutions => { "<" => "<", ">" => ">", "&" => "&", " " => " ", "\t" => "   ", "\n" => "
\n", }, format_table => { Alert => ["", ""], BaseN => ["", ""], BString => ["", ""], Char => ["", ""], Comment => ["", ""], DataType => ["", ""], DecVal => ["", ""], Error => ["", ""], Float => ["", ""], Function => ["", ""], IString => ["", ""], Keyword => ["", ""], Normal => ["", ""], Operator => ["", ""], Others => ["", ""], RegionMarker => ["", ""], Reserved => ["", ""], String => ["", ""], Variable => ["", ""], Warning => ["", ""], }, ); #or my $hl = new Syntax::Highlight::Engine::Kate::Perl( substitutions => { "<" => "<", ">" => ">", "&" => "&", " " => " ", "\t" => "   ", "\n" => "
\n", }, format_table => { Alert => ["", ""], BaseN => ["", ""], BString => ["", ""], Char => ["", ""], Comment => ["", ""], DataType => ["", ""], DecVal => ["", ""], Error => ["", ""], Float => ["", ""], Function => ["", ""], IString => ["", ""], Keyword => ["", ""], Normal => ["", ""], Operator => ["", ""], Others => ["", ""], RegionMarker => ["", ""], Reserved => ["", ""], String => ["", ""], Variable => ["", ""], Warning => ["", ""], }, ); print "\n\n\n\n"; while (my $in = <>) { print $hl->highlightText($in); } print "\n\n"; =head1 DESCRIPTION Syntax::Highlight::Engine::Kate is a port to perl of the syntax highlight engine of the Kate text editor. The language xml files of kate have been rewritten to perl modules using a script. These modules function as plugins to this module. Syntax::Highlight::Engine::Kate inherits Syntax::Highlight::Engine::Kate::Template. =head1 OPTIONS =over 4 =item B Specify the language you want highlighted. look in the B section for supported languages. =item B If you created your own language plugins you may specify a list of them with this option. plugins => [ ["MyModuleName", "MyLanguageName", "*,ext1;*.ext2", "Section"], .... ] =item B This option must be specified if the B method needs to do anything usefull for you. All mentioned keys in the synopsis must be specified. =item B With this option you can specify additional formatting options. =back =head1 METHODS =over 4 =item B returns a reference to the extensions hash, =item B(I) Sets and returns the current language that is highlighted. when setting the language a reset is also done. =item B(I<$filename>); Suggests language name for the fiven file B<$filename> =item B returns a list of languages for which plugins have been defined. =item B(I<$language>); returns the module name of the plugin for B<$language> =item B(I<$filename>); Suggests language name for the fiven file B<$filename> =item B Returns a reference to the sections hash. =back =head1 ATTRIBUTES In the kate XML syntax files you find under the section B<> entries like . Kate is an editor so it is ok to have definitions for forground and background colors and so on. However, since this Module is supposed to be a more universal highlight engine, the attributes need to be fully abstract. In which case, Kate does not have enough default attributes defined to fullfill all needs. Kate defines the following standard attributes: B, B, B, B, B, B, B, B, B, B, B, B, B, B. This module leaves out the "ds" part and uses following additional attributes: B, B, B, B, B. I have modified the XML files so that each highlight mode would get it's own attribute. In quite a few cases still not enough attributes were defined. So in some languages different modes have the same attribute. =head1 PLUGINS Below an overview of existing plugins. All have been tested on use and can be created. The ones for which no samplefile is available are marked. Those marked OK have highlighted the testfile without appearant mistakes. This does not mean that all bugs are shaken out. LANGUAGE MODULE COMMENT ******** ****** ****** .desktop Desktop OK 4GL FourGL No sample file 4GL-PER FourGLminusPER No sample file ABC ABC OK AHDL AHDL OK ANSI C89 ANSI_C89 No sample file ASP ASP OK AVR Assembler AVR_Assembler OK AWK AWK OK Ada Ada No sample file Alerts OK hidden module Ansys Ansys No sample file Apache Configuration Apache_Configuration No sample file Asm6502 Asm6502 No sample file Bash Bash OK BibTeX BibTeX OK C C No sample file C# Cdash No sample file C++ Cplusplus OK CGiS CGiS No sample file CMake CMake OK CSS CSS OK CUE Sheet CUE_Sheet No sample file Cg Cg No sample file ChangeLog ChangeLog No sample file Cisco Cisco No sample file Clipper Clipper OK ColdFusion ColdFusion No sample file Common Lisp Common_Lisp OK Component-Pascal ComponentminusPascal No sample file D D No sample file Debian Changelog Debian_Changelog No sample file Debian Control Debian_Control No sample file Diff Diff No sample file Doxygen Doxygen OK E Language E_Language OK Eiffel Eiffel No sample file Email Email OK Euphoria Euphoria OK Fortran Fortran OK FreeBASIC FreeBASIC No sample file GDL GDL No sample file GLSL GLSL OK GNU Assembler GNU_Assembler No sample file GNU Gettext GNU_Gettext No sample file HTML HTML OK Haskell Haskell OK IDL IDL No sample file ILERPG ILERPG No sample file INI Files INI_Files No sample file Inform Inform No sample file Intel x86 (NASM) Intel_X86_NASM seems to have issues JSP JSP OK Java Java OK JavaScript JavaScript OK Javadoc Javadoc No sample file KBasic KBasic No sample file Kate File Template Kate_File_Template No sample file LDIF LDIF No sample file LPC LPC No sample file LaTeX LaTex OK Lex/Flex Lex_Flex OK LilyPond LilyPond OK Literate Haskell Literate_Haskell OK Lua Lua No sample file M3U M3U OK MAB-DB MABminusDB No sample file MIPS Assembler MIPS_Assembler No sample file Makefile Makefile No sample file Mason Mason No sample file Matlab Matlab has issues Modula-2 Modulaminus2 No sample file Music Publisher Music_Publisher No sample file Octave Octave OK PHP (HTML) PHP_HTML OK PHP_PHP OK hidden module POV-Ray POV_Ray OK Pascal Pascal No sample file Perl Perl OK PicAsm PicAsm OK Pike Pike OK PostScript PostScript OK Prolog Prolog No sample file PureBasic PureBasic OK Python Python OK Quake Script Quake_Script No sample file R Script R_Script No sample file REXX REXX No sample file RPM Spec RPM_Spec No sample file RSI IDL RSI_IDL No sample file RenderMan RIB RenderMan_RIB OK Ruby Ruby OK SGML SGML No sample file SML SML No sample file SQL SQL No sample file SQL (MySQL) SQL_MySQL No sample file SQL (PostgreSQL) SQL_PostgreSQL No sample file Sather Sather No sample file Scheme Scheme OK Sieve Sieve No sample file Spice Spice OK Stata Stata OK TI Basic TI_Basic No sample file TaskJuggler TaskJuggler No sample file Tcl/Tk TCL_Tk OK UnrealScript UnrealScript OK VHDL VHDL No sample file VRML VRML OK Velocity Velocity No sample file Verilog Verilog No sample file WINE Config WINE_Config No sample file Wikimedia Wikimedia No sample file XML XML OK XML (Debug) XML_Debug No sample file Yacc/Bison Yacc_Bison OK de_DE De_DE No sample file en_EN En_EN No sample file ferite Ferite No sample file nl Nl No sample file progress Progress No sample file scilab Scilab No sample file txt2tags Txt2tags No sample file x.org Configuration X_org_Configuration OK xHarbour XHarbour OK xslt Xslt No sample file yacas Yacas No sample file =head1 BUGS Float is detected differently than in the Kate editor. The regular expression engine of the Kate editor, qregexp, appears to be more tolerant to mistakes in regular expressions than perl. This might lead to error messages and differences in behaviour. Most of the problems were sorted out while developing, because error messages appeared. For as far as differences in behaviour is concerned, testing is the only way to find out, so i hope the users out there will be able to tell me more. This module is mimicking the behaviour of the syntax highlight engine of the Kate editor. If you find a bug/mistake in the highlighting, please check if Kate behaves in the same way. If yes, the cause is likely to be found there. =head1 TO DO Rebuild the scripts i am using to generate the modules from xml files so they are more pro-actively tracking flaws in the build of the xml files like missing lists. Also regular expressions in the xml can be tested better before used in plugins. Refine the testmethods in Syntax::Highlight::Engine::Kate::Template, so that choices for casesensitivity, dynamic behaviour and lookahead can be determined at generate time of the plugin, might increase throughput. Implement codefolding. =head1 ACKNOWLEDGEMENTS All the people who wrote Kate and the syntax highlight xml files. =head1 AUTHOR AND COPYRIGHT This module is written and maintained by: Hans Jeuken < haje at toneel dot demon dot nl > Copyright (c) 2006 by Hans Jeuken, all rights reserved. You may freely distribute and/or modify this module under the same terms as Perl itself. =head1 SEE ALSO Syntax::Highlight::Engine::Kate::Template http:://www.kate-editor.org =cut libsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/Engine/Kate/0000755000175000017500000000000012150557146027762 5ustar gregoagregoalibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/Engine/Kate/En_US.pm0000644000175000017500000001500512150556557031277 0ustar gregoagregoa# Copyright (c) 2005 - 2006 Hans Jeuken. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. # This file was generated from the 'logohighlightstyle.en_US.xml' file of the syntax highlight # engine of the kate text editor (http://www.kate-editor.org #kate xml version 0.2 #kate version 2.1 #generated: Sun Feb 3 22:02:04 2008, localtime package Syntax::Highlight::Engine::Kate::En_US; our $VERSION = '0.07'; use strict; use warnings; use base('Syntax::Highlight::Engine::Kate::Template'); sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = $class->SUPER::new(@_); $self->attributes({ 'Boolean Operators' => 'BString', 'Comment' => 'Comment', 'Execution Controllers' => 'BaseN', 'Expressers' => 'Datatype', 'MetaFunctions' => 'Function', 'Normal' => 'Normal', 'Normal Text' => 'Normal', 'Number' => 'Float', 'Operator' => 'Operator', 'Raw String' => 'String', 'Scopes' => 'RegionMarker', 'Statements' => 'Keyword', 'String' => 'String', }); $self->listAdd('boolops', 'and', 'not', 'or', ); $self->listAdd('controllers', 'break', 'do', 'else', 'for', 'foreach', 'if', 'in', 'repeat', 'return', 'rpt', 'to', 'wait', 'while', ); $self->listAdd('metafunctions', 'learn', ); $self->listAdd('statements', 'backward', 'bw', 'canvascolor', 'canvassize', 'cc', 'ccl', 'center', 'change', 'clear', 'cs', 'dir', 'direction', 'fontsize', 'fonttype', 'forward', 'fw', 'go', 'gox', 'goy', 'gx', 'gy', 'hide', 'inputwindow', 'message', 'pc', 'pd', 'pencolor', 'pendown', 'penup', 'penwidth', 'press', 'print', 'pu', 'pw', 'random', 'reset', 'run', 'sc', 'sh', 'show', 'sp', 'ss', 'tl', 'tr', 'turnleft', 'turnright', 'wrapoff', 'wrapon', ); $self->contextdata({ 'Normal' => { callback => \&parseNormal, attribute => 'Normal Text', }, 'String' => { callback => \&parseString, attribute => 'String', }, }); $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); $self->basecontext('Normal'); $self->keywordscase(0); $self->initialize; bless ($self, $class); return $self; } sub language { return 'en_US'; } sub parseNormal { my ($self, $text) = @_; # String => 'metafunctions' # attribute => 'MetaFunctions' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'metafunctions', 0, undef, 0, '#stay', 'MetaFunctions')) { return 1 } # String => 'statements' # attribute => 'Statements' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'statements', 0, undef, 0, '#stay', 'Statements')) { return 1 } # String => 'controllers' # attribute => 'Execution Controllers' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'controllers', 0, undef, 0, '#stay', 'Execution Controllers')) { return 1 } # String => 'boolops' # attribute => 'Boolean Operators' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'boolops', 0, undef, 0, '#stay', 'Boolean Operators')) { return 1 } # String => '([!=><][=]|[><])' # attribute => 'Expressers' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '([!=><][=]|[><])', 0, 0, 0, undef, 0, '#stay', 'Expressers')) { return 1 } # String => '[a-zA-Z_][a-zA-Z_0-9]+' # attribute => 'Normal' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '[a-zA-Z_][a-zA-Z_0-9]+', 0, 0, 0, undef, 0, '#stay', 'Normal')) { return 1 } # String => '([0-9]+\.[0-9]*|\.[0-9]+)?|[0-9]*' # attribute => 'Number' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '([0-9]+\\.[0-9]*|\\.[0-9]+)?|[0-9]*', 0, 0, 0, undef, 0, '#stay', 'Number')) { return 1 } # String => '#.*$' # attribute => 'Comment' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '#.*$', 0, 0, 0, undef, 0, '#stay', 'Comment')) { return 1 } # String => '[+*/\(\)-]' # attribute => 'Operator' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '[+*/\\(\\)-]', 0, 0, 0, undef, 0, '#stay', 'Operator')) { return 1 } # String => '[\[\]]' # attribute => 'Scopes' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '[\\[\\]]', 0, 0, 0, undef, 0, '#stay', 'Scopes')) { return 1 } # attribute => 'String' # char => '"' # context => 'String' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) { return 1 } return 0; }; sub parseString { my ($self, $text) = @_; # attribute => 'String' # context => '#stay' # type => 'HlCStringChar' if ($self->testHlCStringChar($text, 0, undef, 0, '#stay', 'String')) { return 1 } # String => '%[a-zA-Z]' # attribute => 'Operator' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '%[a-zA-Z]', 0, 0, 0, undef, 0, '#stay', 'Operator')) { return 1 } # attribute => 'String' # char => '"' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) { return 1 } return 0; }; 1; __END__ =head1 NAME Syntax::Highlight::Engine::Kate::En_US - a Plugin for en_US syntax highlighting =head1 SYNOPSIS require Syntax::Highlight::Engine::Kate::En_US; my $sh = new Syntax::Highlight::Engine::Kate::En_US([ ]); =head1 DESCRIPTION Syntax::Highlight::Engine::Kate::En_US is a plugin module that provides syntax highlighting for en_US to the Syntax::Haghlight::Engine::Kate highlighting engine. This code is generated from the syntax definition files used by the Kate project. It works quite fine, but can use refinement and optimization. It inherits Syntax::Higlight::Engine::Kate::Template. See also there. =head1 AUTHOR Hans Jeuken (haje toneel demon nl) =head1 BUGS Unknown. If you find any, please contact the authorlibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/Engine/Kate/VRML.pm0000644000175000017500000001535012150556557031111 0ustar gregoagregoa# Copyright (c) 2005 - 2006 Hans Jeuken. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. # This file was generated from the 'vrml.xml' file of the syntax highlight # engine of the kate text editor (http://www.kate-editor.org #kate xml version 1.02 #kate author Volker Krause (volker.krause@rwth-aachen.de) #generated: Sun Feb 3 22:02:06 2008, localtime package Syntax::Highlight::Engine::Kate::VRML; our $VERSION = '0.07'; use strict; use warnings; use base('Syntax::Highlight::Engine::Kate::Template'); sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = $class->SUPER::new(@_); $self->attributes({ 'Comment' => 'Comment', 'Data Type' => 'DataType', 'Decimal' => 'DecVal', 'Float' => 'Float', 'Hex' => 'BaseN', 'Keyword' => 'Keyword', 'Node' => 'Others', 'Normal Text' => 'Normal', 'String' => 'String', 'String Char' => 'Char', }); $self->listAdd('keywords', 'DEF', 'EXTERNPROTO', 'FALSE', 'IS', 'NULL', 'PROTO', 'ROUTE', 'TO', 'TRUE', 'USE', 'eventIn', 'eventOut', 'exposedField', 'field', ); $self->listAdd('nodes', 'Anchor', 'Appearance', 'AudioClip', 'Background', 'Billboard', 'Box', 'Collision', 'Color', 'ColorInterpolator', 'Cone', 'Coordinate', 'CoordinateInterpolator', 'Cylinder', 'CylinderSensor', 'DirectionalLight', 'ElevationGrid', 'Extrusion', 'Fog', 'FontStyle', 'Group', 'ImageTexture', 'IndexedFaceSet', 'IndexedLineSet', 'Inline', 'LOD', 'Material', 'MovieTexture', 'NavigationInfo', 'Normal', 'NormalInterpolator', 'OrientationInterpolator', 'PixelTexture', 'Plane', 'PlaneSensor', 'PointLight', 'PointSet', 'PositionInterpolator', 'ProximitySensor', 'ScalarInterpolator', 'Script', 'Sensor', 'Shape', 'Sound', 'Sphere', 'SphereSensor', 'SpotLight', 'Switch', 'Text', 'TextureCoordinate', 'TextureTransform', 'TimeSensor', 'TouchSensor', 'Transform', 'Viewpoint', 'VisibilitySensor', 'WorldInfo', ); $self->listAdd('types', 'MFColor', 'MFFloat', 'MFInt32', 'MFNode', 'MFRotation', 'MFString', 'MFTime', 'MFVec2f', 'MFVec3f', 'SFBool', 'SFColor', 'SFFloat', 'SFImage', 'SFInt32', 'SFNode', 'SFRotation', 'SFString', 'SFTime', 'SFVec2f', 'SFVec3f', ); $self->contextdata({ 'Comment' => { callback => \&parseComment, attribute => 'Comment', lineending => '#pop', }, 'Normal' => { callback => \&parseNormal, attribute => 'Normal Text', }, 'String' => { callback => \&parseString, attribute => 'String', }, }); $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); $self->basecontext('Normal'); $self->keywordscase(1); $self->initialize; bless ($self, $class); return $self; } sub language { return 'VRML'; } sub parseComment { my ($self, $text) = @_; return 0; }; sub parseNormal { my ($self, $text) = @_; # String => 'keywords' # attribute => 'Keyword' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'nodes' # attribute => 'Node' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'nodes', 0, undef, 0, '#stay', 'Node')) { return 1 } # String => 'types' # attribute => 'Data Type' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'types', 0, undef, 0, '#stay', 'Data Type')) { return 1 } # attribute => 'Float' # context => '#stay' # type => 'Float' if ($self->testFloat($text, 0, undef, 0, '#stay', 'Float')) { return 1 } # attribute => 'Hex' # context => '#stay' # type => 'HlCHex' if ($self->testHlCHex($text, 0, undef, 0, '#stay', 'Hex')) { return 1 } # attribute => 'Decimal' # context => '#stay' # type => 'Int' if ($self->testInt($text, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # attribute => 'Normal Text' # beginRegion => 'Brace' # char => '{' # context => '#stay' # type => 'DetectChar' if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { return 1 } # attribute => 'Normal Text' # char => '}' # context => '#stay' # endRegion => 'Brace' # type => 'DetectChar' if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { return 1 } # attribute => 'String' # char => '"' # context => 'String' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) { return 1 } # attribute => 'Comment' # char => '#' # context => 'Comment' # type => 'DetectChar' if ($self->testDetectChar($text, '#', 0, 0, 0, undef, 0, 'Comment', 'Comment')) { return 1 } return 0; }; sub parseString { my ($self, $text) = @_; # attribute => 'String' # context => '#stay' # type => 'LineContinue' if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'String')) { return 1 } # attribute => 'String Char' # context => '#stay' # type => 'HlCStringChar' if ($self->testHlCStringChar($text, 0, undef, 0, '#stay', 'String Char')) { return 1 } # attribute => 'String' # char => '"' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) { return 1 } return 0; }; 1; __END__ =head1 NAME Syntax::Highlight::Engine::Kate::VRML - a Plugin for VRML syntax highlighting =head1 SYNOPSIS require Syntax::Highlight::Engine::Kate::VRML; my $sh = new Syntax::Highlight::Engine::Kate::VRML([ ]); =head1 DESCRIPTION Syntax::Highlight::Engine::Kate::VRML is a plugin module that provides syntax highlighting for VRML to the Syntax::Haghlight::Engine::Kate highlighting engine. This code is generated from the syntax definition files used by the Kate project. It works quite fine, but can use refinement and optimization. It inherits Syntax::Higlight::Engine::Kate::Template. See also there. =head1 AUTHOR Hans Jeuken (haje toneel demon nl) =head1 BUGS Unknown. If you find any, please contact the authorlibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/Engine/Kate/Yacc_Bison.pm0000644000175000017500000004032612150556557032343 0ustar gregoagregoa# Copyright (c) 2005 - 2006 Hans Jeuken. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. # This file was generated from the 'yacc.xml' file of the syntax highlight # engine of the kate text editor (http://www.kate-editor.org #kate xml version 1.03 #kate version 2.4 #kate author Jan Villat (jan.villat@net2000.ch) #generated: Sun Feb 3 22:02:06 2008, localtime package Syntax::Highlight::Engine::Kate::Yacc_Bison; our $VERSION = '0.07'; use strict; use warnings; use base('Syntax::Highlight::Engine::Kate::Template'); sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = $class->SUPER::new(@_); $self->attributes({ 'Alert' => 'Alert', 'Backslash Code' => 'String', 'Comment' => 'Comment', 'Content-Type Delimiter' => 'BaseN', 'Data Type' => 'DataType', 'Definition' => 'Normal', 'Directive' => 'Keyword', 'Normal Text' => 'Normal', 'Rule' => 'String', 'String' => 'String', 'String Char' => 'Char', }); $self->contextdata({ 'C Declarations' => { callback => \&parseCDeclarations, attribute => 'Normal Text', }, 'Char' => { callback => \&parseChar, attribute => 'String Char', lineending => '#pop', }, 'Comment' => { callback => \&parseComment, attribute => 'Comment', }, 'CommentSlash' => { callback => \&parseCommentSlash, attribute => 'Comment', }, 'CommentStar' => { callback => \&parseCommentStar, attribute => 'Comment', }, 'Declarations' => { callback => \&parseDeclarations, attribute => 'Normal Text', }, 'Dol' => { callback => \&parseDol, attribute => 'Normal Text', fallthrough => 'DolEnd', }, 'DolEnd' => { callback => \&parseDolEnd, attribute => 'Normal Text', }, 'Normal C Bloc' => { callback => \&parseNormalCBloc, attribute => 'Normal Text', }, 'PC type' => { callback => \&parsePCtype, attribute => 'Data Type', lineending => '#pop#pop#pop', }, 'Percent Command' => { callback => \&parsePercentCommand, attribute => 'Directive', lineending => '#pop', }, 'Percent Command In' => { callback => \&parsePercentCommandIn, attribute => 'NormalText', lineending => '#pop#pop', }, 'Pre Start' => { callback => \&parsePreStart, attribute => 'Normal Text', }, 'Rule In' => { callback => \&parseRuleIn, attribute => 'Definition', }, 'Rules' => { callback => \&parseRules, attribute => 'Rule', }, 'String' => { callback => \&parseString, attribute => 'String', lineending => '#pop', }, 'StringOrChar' => { callback => \&parseStringOrChar, attribute => 'NormalText', }, 'Union In' => { callback => \&parseUnionIn, attribute => 'Normal Text', }, 'Union InIn' => { callback => \&parseUnionInIn, attribute => 'Normal Text', }, 'Union Start' => { callback => \&parseUnionStart, attribute => 'Normal Text', }, 'User Code' => { callback => \&parseUserCode, attribute => 'Normal Text', }, }); $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); $self->basecontext('Pre Start'); $self->keywordscase(1); $self->initialize; bless ($self, $class); return $self; } sub language { return 'Yacc/Bison'; } sub parseCDeclarations { my ($self, $text) = @_; # context => 'Comment' # type => 'IncludeRules' if ($self->includeRules('Comment', $text)) { return 1 } # attribute => 'Content-Type Delimiter' # char => '%' # char1 => '}' # column => '0' # context => '#pop' # endRegion => 'cdeclarations' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '%', '}', 0, 0, 0, 0, 0, '#pop', 'Content-Type Delimiter')) { return 1 } # context => '##C++' # type => 'IncludeRules' if ($self->includePlugin('C++', $text)) { return 1 } return 0; }; sub parseChar { my ($self, $text) = @_; # String => '\\.' # attribute => 'Backslash Code' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\\\.', 0, 0, 0, undef, 0, '#stay', 'Backslash Code')) { return 1 } # attribute => 'String Char' # char => ''' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop', 'String Char')) { return 1 } return 0; }; sub parseComment { my ($self, $text) = @_; # attribute => 'Comment' # char => '/' # char1 => '*' # context => 'CommentStar' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'CommentStar', 'Comment')) { return 1 } # attribute => 'Comment' # char => '/' # char1 => '/' # context => 'CommentSlash' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'CommentSlash', 'Comment')) { return 1 } return 0; }; sub parseCommentSlash { my ($self, $text) = @_; # String => '[^\\]$' # attribute => 'Comment' # context => '#pop' # type => 'RegExpr' if ($self->testRegExpr($text, '[^\\\\]$', 0, 0, 0, undef, 0, '#pop', 'Comment')) { return 1 } return 0; }; sub parseCommentStar { my ($self, $text) = @_; # attribute => 'Comment' # char => '*' # char1 => '/' # context => '#pop' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop', 'Comment')) { return 1 } return 0; }; sub parseDeclarations { my ($self, $text) = @_; # context => 'Comment' # type => 'IncludeRules' if ($self->includeRules('Comment', $text)) { return 1 } # String => '%union' # attribute => 'Directive' # context => 'Union Start' # type => 'StringDetect' if ($self->testStringDetect($text, '%union', 0, 0, 0, undef, 0, 'Union Start', 'Directive')) { return 1 } # attribute => 'Content-Type Delimiter' # beginRegion => 'rules' # char => '%' # char1 => '%' # context => 'Rules' # endRegion => 'declarations' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '%', '%', 0, 0, 0, undef, 0, 'Rules', 'Content-Type Delimiter')) { return 1 } # attribute => 'Content-Type Delimiter' # beginRegion => 'cdeclarations' # char => '%' # char1 => '{' # column => '0' # context => 'C Declarations' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '%', '{', 0, 0, 0, 0, 0, 'C Declarations', 'Content-Type Delimiter')) { return 1 } # attribute => 'Directive' # char => '%' # context => 'Percent Command' # type => 'DetectChar' if ($self->testDetectChar($text, '%', 0, 0, 0, undef, 0, 'Percent Command', 'Directive')) { return 1 } return 0; }; sub parseDol { my ($self, $text) = @_; # String => '<[^>]+>' # attribute => 'Data Type' # context => 'DolEnd' # type => 'RegExpr' if ($self->testRegExpr($text, '<[^>]+>', 0, 0, 0, undef, 0, 'DolEnd', 'Data Type')) { return 1 } return 0; }; sub parseDolEnd { my ($self, $text) = @_; # String => '\d+' # attribute => 'Directive' # context => '#pop#pop' # type => 'RegExpr' if ($self->testRegExpr($text, '\\d+', 0, 0, 0, undef, 0, '#pop#pop', 'Directive')) { return 1 } # attribute => 'Directive' # char => '$' # context => '#pop#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '$', 0, 0, 0, undef, 0, '#pop#pop', 'Directive')) { return 1 } return 0; }; sub parseNormalCBloc { my ($self, $text) = @_; # attribute => 'Normal Text' # beginRegion => 'bloc' # char => '{' # context => 'Normal C Bloc' # type => 'DetectChar' if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, 'Normal C Bloc', 'Normal Text')) { return 1 } # attribute => 'Normal Text' # char => '}' # context => '#pop' # endRegion => 'bloc' # type => 'DetectChar' if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#pop', 'Normal Text')) { return 1 } # context => '##C++' # type => 'IncludeRules' if ($self->includePlugin('C++', $text)) { return 1 } # attribute => 'Directive' # char => '$' # context => 'Dol' # type => 'DetectChar' if ($self->testDetectChar($text, '$', 0, 0, 0, undef, 0, 'Dol', 'Directive')) { return 1 } return 0; }; sub parsePCtype { my ($self, $text) = @_; # attribute => 'Data Type' # char => '>' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '#pop', 'Data Type')) { return 1 } return 0; }; sub parsePercentCommand { my ($self, $text) = @_; # context => 'Comment' # type => 'IncludeRules' if ($self->includeRules('Comment', $text)) { return 1 } # String => '\W' # attribute => 'Normal Text' # context => 'Percent Command In' # lookAhead => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '\\W', 0, 0, 1, undef, 0, 'Percent Command In', 'Normal Text')) { return 1 } return 0; }; sub parsePercentCommandIn { my ($self, $text) = @_; # context => 'StringOrChar' # type => 'IncludeRules' if ($self->includeRules('StringOrChar', $text)) { return 1 } # attribute => 'Data Type' # char => '<' # context => 'PC type' # type => 'DetectChar' if ($self->testDetectChar($text, '<', 0, 0, 0, undef, 0, 'PC type', 'Data Type')) { return 1 } return 0; }; sub parsePreStart { my ($self, $text) = @_; # context => 'Comment' # type => 'IncludeRules' if ($self->includeRules('Comment', $text)) { return 1 } # type => 'DetectSpaces' if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { return 1 } # attribute => 'Content-Type Delimiter' # beginRegion => 'cdeclarations' # char => '%' # char1 => '{' # column => '0' # context => 'C Declarations' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '%', '{', 0, 0, 0, 0, 0, 'C Declarations', 'Content-Type Delimiter')) { return 1 } # String => '.' # attribute => 'Normal Text' # beginRegion => 'declarations' # context => 'Declarations' # lookAhead => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '.', 0, 0, 1, undef, 0, 'Declarations', 'Normal Text')) { return 1 } return 0; }; sub parseRuleIn { my ($self, $text) = @_; # context => 'Comment' # type => 'IncludeRules' if ($self->includeRules('Comment', $text)) { return 1 } # attribute => 'Normal Text' # char => ';' # context => '#pop' # endRegion => 'rule' # type => 'DetectChar' if ($self->testDetectChar($text, ';', 0, 0, 0, undef, 0, '#pop', 'Normal Text')) { return 1 } # attribute => 'Normal Text' # beginRegion => 'bloc' # char => '{' # context => 'Normal C Bloc' # type => 'DetectChar' if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, 'Normal C Bloc', 'Normal Text')) { return 1 } # attribute => 'Normal Text' # char => '|' # context => '#stay' # type => 'DetectChar' if ($self->testDetectChar($text, '|', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { return 1 } # context => 'StringOrChar' # type => 'IncludeRules' if ($self->includeRules('StringOrChar', $text)) { return 1 } return 0; }; sub parseRules { my ($self, $text) = @_; # context => 'Comment' # type => 'IncludeRules' if ($self->includeRules('Comment', $text)) { return 1 } # attribute => 'Content-Type Delimiter' # beginRegion => 'code' # char => '%' # char1 => '%' # context => 'User Code' # endRegion => 'rules' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '%', '%', 0, 0, 0, undef, 0, 'User Code', 'Content-Type Delimiter')) { return 1 } # attribute => 'Normal Text' # beginRegion => 'rule' # char => ':' # context => 'Rule In' # type => 'DetectChar' if ($self->testDetectChar($text, ':', 0, 0, 0, undef, 0, 'Rule In', 'Normal Text')) { return 1 } return 0; }; sub parseString { my ($self, $text) = @_; # String => '\\.' # attribute => 'Backslash Code' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\\\.', 0, 0, 0, undef, 0, '#stay', 'Backslash Code')) { return 1 } # attribute => 'String' # char => '"' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) { return 1 } return 0; }; sub parseStringOrChar { my ($self, $text) = @_; # attribute => 'String Char' # char => ''' # context => 'Char' # type => 'DetectChar' if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'Char', 'String Char')) { return 1 } # attribute => 'String' # char => '"' # context => 'String' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) { return 1 } return 0; }; sub parseUnionIn { my ($self, $text) = @_; # attribute => 'Normal Text' # char => '{' # context => 'Union InIn' # type => 'DetectChar' if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, 'Union InIn', 'Normal Text')) { return 1 } # attribute => 'Normal Text' # char => '}' # context => '#pop#pop' # endRegion => 'union' # type => 'DetectChar' if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#pop#pop', 'Normal Text')) { return 1 } # context => '##C++' # type => 'IncludeRules' if ($self->includePlugin('C++', $text)) { return 1 } return 0; }; sub parseUnionInIn { my ($self, $text) = @_; # attribute => 'Normal Text' # char => '{' # context => 'Union InIn' # type => 'DetectChar' if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, 'Union InIn', 'Normal Text')) { return 1 } # attribute => 'Normal Text' # char => '}' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#pop', 'Normal Text')) { return 1 } # context => '##C++' # type => 'IncludeRules' if ($self->includePlugin('C++', $text)) { return 1 } return 0; }; sub parseUnionStart { my ($self, $text) = @_; # context => 'Comment' # type => 'IncludeRules' if ($self->includeRules('Comment', $text)) { return 1 } # type => 'DetectSpaces' if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { return 1 } # attribute => 'Normal Text' # beginRegion => 'union' # char => '{' # context => 'Union In' # type => 'DetectChar' if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, 'Union In', 'Normal Text')) { return 1 } # String => '.' # attribute => 'Alert' # context => '#pop' # type => 'RegExpr' if ($self->testRegExpr($text, '.', 0, 0, 0, undef, 0, '#pop', 'Alert')) { return 1 } return 0; }; sub parseUserCode { my ($self, $text) = @_; # context => '##C++' # type => 'IncludeRules' if ($self->includePlugin('C++', $text)) { return 1 } return 0; }; 1; __END__ =head1 NAME Syntax::Highlight::Engine::Kate::Yacc_Bison - a Plugin for Yacc/Bison syntax highlighting =head1 SYNOPSIS require Syntax::Highlight::Engine::Kate::Yacc_Bison; my $sh = new Syntax::Highlight::Engine::Kate::Yacc_Bison([ ]); =head1 DESCRIPTION Syntax::Highlight::Engine::Kate::Yacc_Bison is a plugin module that provides syntax highlighting for Yacc/Bison to the Syntax::Haghlight::Engine::Kate highlighting engine. This code is generated from the syntax definition files used by the Kate project. It works quite fine, but can use refinement and optimization. It inherits Syntax::Higlight::Engine::Kate::Template. See also there. =head1 AUTHOR Hans Jeuken (haje toneel demon nl) =head1 BUGS Unknown. If you find any, please contact the author././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootlibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/Engine/Kate/Kate_File_Template.pmlibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/Engine/Kate/Kate_File_Templ0000644000175000017500000001471012150556557032701 0ustar gregoagregoa# Copyright (c) 2005 - 2006 Hans Jeuken. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. # This file was generated from the 'katetemplate.xml' file of the syntax highlight # engine of the kate text editor (http://www.kate-editor.org #kate xml version 1.00 #kate version 2.3 #kate author Anders Lund #generated: Sun Feb 3 22:02:05 2008, localtime package Syntax::Highlight::Engine::Kate::Kate_File_Template; our $VERSION = '0.07'; use strict; use warnings; use base('Syntax::Highlight::Engine::Kate::Template'); sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = $class->SUPER::new(@_); $self->attributes({ 'Comment' => 'Comment', 'Error' => 'Error', 'Escape' => 'Others', 'Header Keyword' => 'Operator', 'Header Text' => 'Normal', 'Keyword' => 'Keyword', 'Macro' => 'DataType', 'Normal Text' => 'Normal', 'Property' => 'DecVal', 'Property Value' => 'String', }); $self->listAdd('macros', 'date', 'datetime', 'email', 'month', 'organisation', 'realname', 'time', 'username', 'year', ); $self->listAdd('properties', 'author', 'description', 'documentname', 'group', 'highlight', 'icon', 'template', ); $self->contextdata({ 'Normal Text' => { callback => \&parseNormalText, attribute => 'Normal Text', lineending => '#pop', }, 'escape' => { callback => \&parseescape, attribute => 'Escape', }, 'header' => { callback => \&parseheader, attribute => 'Comment', lineending => '#pop', }, 'headervalue' => { callback => \&parseheadervalue, attribute => 'Property Value', lineending => '#pop#pop', }, 'macros' => { callback => \&parsemacros, attribute => 'Error', lineending => '#pop', }, }); $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); $self->basecontext('Normal Text'); $self->keywordscase(0); $self->initialize; bless ($self, $class); return $self; } sub language { return 'Kate File Template'; } sub parseNormalText { my ($self, $text) = @_; # String => '^katetemplate:' # attribute => 'Header Keyword' # context => 'header' # type => 'RegExpr' if ($self->testRegExpr($text, '^katetemplate:', 0, 0, 0, undef, 0, 'header', 'Header Keyword')) { return 1 } # String => '\\[$%]\{[^}\s]+\}' # attribute => 'Normal' # context => 'escape' # lookAhead => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '\\\\[$%]\\{[^}\\s]+\\}', 0, 0, 1, undef, 0, 'escape', 'Normal')) { return 1 } # String => '[$%]\{[^}\s]+\}' # attribute => 'Macro' # context => 'macros' # lookAhead => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '[$%]\\{[^}\\s]+\\}', 0, 0, 1, undef, 0, 'macros', 'Macro')) { return 1 } # attribute => 'Escape' # char => '\' # char1 => '^' # context => '#stay' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '\\', '^', 0, 0, 0, undef, 0, '#stay', 'Escape')) { return 1 } # attribute => 'Keyword' # char => '^' # context => '#stay' # type => 'DetectChar' if ($self->testDetectChar($text, '^', 0, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } return 0; }; sub parseescape { my ($self, $text) = @_; # attribute => 'Escape' # char => '\' # char1 => '$' # context => '#pop' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '\\', '$', 0, 0, 0, undef, 0, '#pop', 'Escape')) { return 1 } return 0; }; sub parseheader { my ($self, $text) = @_; # String => 'properties' # attribute => 'Property' # context => 'headervalue' # type => 'keyword' if ($self->testKeyword($text, 'properties', 0, undef, 0, 'headervalue', 'Property')) { return 1 } return 0; }; sub parseheadervalue { my ($self, $text) = @_; # attribute => 'Header Text' # char => '=' # context => '#stay' # type => 'DetectChar' if ($self->testDetectChar($text, '=', 0, 0, 0, undef, 0, '#stay', 'Header Text')) { return 1 } # String => ' \w+\s*=' # context => '#pop' # lookAhead => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, ' \\w+\\s*=', 0, 0, 1, undef, 0, '#pop', undef)) { return 1 } return 0; }; sub parsemacros { my ($self, $text) = @_; # attribute => 'Keyword' # char => '$' # char1 => '{' # context => '#stay' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '$', '{', 0, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # attribute => 'Keyword' # char => '%' # char1 => '{' # context => '#stay' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '%', '{', 0, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # attribute => 'Keyword' # char => '}' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#pop', 'Keyword')) { return 1 } # String => '[^}\s]+' # attribute => 'Macro' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '[^}\\s]+', 0, 0, 0, undef, 0, '#stay', 'Macro')) { return 1 } # String => 'macros' # attribute => 'Keyword' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'macros', 0, undef, 0, '#stay', 'Keyword')) { return 1 } return 0; }; 1; __END__ =head1 NAME Syntax::Highlight::Engine::Kate::Kate_File_Template - a Plugin for Kate File Template syntax highlighting =head1 SYNOPSIS require Syntax::Highlight::Engine::Kate::Kate_File_Template; my $sh = new Syntax::Highlight::Engine::Kate::Kate_File_Template([ ]); =head1 DESCRIPTION Syntax::Highlight::Engine::Kate::Kate_File_Template is a plugin module that provides syntax highlighting for Kate File Template to the Syntax::Haghlight::Engine::Kate highlighting engine. This code is generated from the syntax definition files used by the Kate project. It works quite fine, but can use refinement and optimization. It inherits Syntax::Higlight::Engine::Kate::Template. See also there. =head1 AUTHOR Hans Jeuken (haje toneel demon nl) =head1 BUGS Unknown. If you find any, please contact the authorlibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/Engine/Kate/GNU_Gettext.pm0000644000175000017500000001112412150556557032461 0ustar gregoagregoa# Copyright (c) 2005 - 2006 Hans Jeuken. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. # This file was generated from the 'gettext.xml' file of the syntax highlight # engine of the kate text editor (http://www.kate-editor.org #kate xml version 1.03 #kate version 2.4 #kate author Dominik Haumann (dhdev@gmx.de) #generated: Sun Feb 3 22:02:05 2008, localtime package Syntax::Highlight::Engine::Kate::GNU_Gettext; our $VERSION = '0.07'; use strict; use warnings; use base('Syntax::Highlight::Engine::Kate::Template'); sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = $class->SUPER::new(@_); $self->attributes({ 'Automatic Comment' => 'Comment', 'Char' => 'Char', 'Flag' => 'Comment', 'Index' => 'DecVal', 'Keyword' => 'Keyword', 'Normal Text' => 'Normal', 'Reference' => 'Comment', 'String' => 'String', 'Translator Comment' => 'Comment', }); $self->contextdata({ 'Normal' => { callback => \&parseNormal, attribute => 'Normal Text', }, 'String' => { callback => \&parseString, attribute => 'String', }, }); $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); $self->basecontext('Normal'); $self->keywordscase(0); $self->initialize; bless ($self, $class); return $self; } sub language { return 'GNU Gettext'; } sub parseNormal { my ($self, $text) = @_; # String => '^(msgid_plural|msgid|msgstr|msgctxt)' # attribute => 'Keyword' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^(msgid_plural|msgid|msgstr|msgctxt)', 0, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '#\..*$' # attribute => 'Automatic Comment' # context => '#stay' # firstNonSpace => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '#\\..*$', 0, 0, 0, undef, 1, '#stay', 'Automatic Comment')) { return 1 } # String => '#:.*$' # attribute => 'Reference' # context => '#stay' # firstNonSpace => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '#:.*$', 0, 0, 0, undef, 1, '#stay', 'Reference')) { return 1 } # String => '#,.*$' # attribute => 'Flag' # context => '#stay' # firstNonSpace => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '#,.*$', 0, 0, 0, undef, 1, '#stay', 'Flag')) { return 1 } # String => '#.*$' # attribute => 'Translator Comment' # context => '#stay' # firstNonSpace => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '#.*$', 0, 0, 0, undef, 1, '#stay', 'Translator Comment')) { return 1 } # String => '\\.' # attribute => 'Char' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\\\.', 0, 0, 0, undef, 0, '#stay', 'Char')) { return 1 } # attribute => 'String' # char => '"' # context => 'String' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) { return 1 } # String => '\[\d+\]' # attribute => 'Index' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\[\\d+\\]', 0, 0, 0, undef, 0, '#stay', 'Index')) { return 1 } return 0; }; sub parseString { my ($self, $text) = @_; # String => '\\.' # attribute => 'Char' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\\\.', 0, 0, 0, undef, 0, '#stay', 'Char')) { return 1 } # attribute => 'String' # char => '"' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) { return 1 } return 0; }; 1; __END__ =head1 NAME Syntax::Highlight::Engine::Kate::GNU_Gettext - a Plugin for GNU Gettext syntax highlighting =head1 SYNOPSIS require Syntax::Highlight::Engine::Kate::GNU_Gettext; my $sh = new Syntax::Highlight::Engine::Kate::GNU_Gettext([ ]); =head1 DESCRIPTION Syntax::Highlight::Engine::Kate::GNU_Gettext is a plugin module that provides syntax highlighting for GNU Gettext to the Syntax::Haghlight::Engine::Kate highlighting engine. This code is generated from the syntax definition files used by the Kate project. It works quite fine, but can use refinement and optimization. It inherits Syntax::Higlight::Engine::Kate::Template. See also there. =head1 AUTHOR Hans Jeuken (haje toneel demon nl) =head1 BUGS Unknown. If you find any, please contact the authorlibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/Engine/Kate/Sieve.pm0000644000175000017500000001563512150556557031412 0ustar gregoagregoa# Copyright (c) 2005 - 2006 Hans Jeuken. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. # This file was generated from the 'sieve.xml' file of the syntax highlight # engine of the kate text editor (http://www.kate-editor.org #kate xml version 1.05 #kate version 2.4 #kate author Petter E. Stokke #generated: Sun Feb 3 22:02:06 2008, localtime package Syntax::Highlight::Engine::Kate::Sieve; our $VERSION = '0.07'; use strict; use warnings; use base('Syntax::Highlight::Engine::Kate::Template'); sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = $class->SUPER::new(@_); $self->attributes({ 'Comment' => 'Comment', 'Decimal' => 'DecVal', 'Function' => 'Function', 'Keyword' => 'Keyword', 'Normal Text' => 'Normal', 'String' => 'String', 'String Char' => 'Char', 'Symbol' => 'Normal', 'Tagged Argument' => 'Others', }); $self->listAdd('keywords', 'discard', 'else', 'elsif', 'fileinto', 'if', 'keep', 'redirect', 'reject', 'require', 'stop', ); $self->contextdata({ 'Comment' => { callback => \&parseComment, attribute => 'Comment', }, 'Member' => { callback => \&parseMember, attribute => 'Normal Text', lineending => '#pop', fallthrough => '#pop', }, 'MultilineString' => { callback => \&parseMultilineString, attribute => 'String', }, 'Normal' => { callback => \&parseNormal, attribute => 'Normal Text', }, 'String' => { callback => \&parseString, attribute => 'String', lineending => '#pop', }, }); $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); $self->basecontext('Normal'); $self->keywordscase(0); $self->initialize; bless ($self, $class); return $self; } sub language { return 'Sieve'; } sub parseComment { my ($self, $text) = @_; # attribute => 'Comment' # char => '*' # char1 => '/' # context => '#pop' # endRegion => 'Comment' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop', 'Comment')) { return 1 } return 0; }; sub parseMember { my ($self, $text) = @_; # String => '\b[_a-zA-Z]\w*(?=[\s]*)' # attribute => 'Function' # context => '#pop' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b[_a-zA-Z]\\w*(?=[\\s]*)', 0, 0, 0, undef, 0, '#pop', 'Function')) { return 1 } return 0; }; sub parseMultilineString { my ($self, $text) = @_; # String => '\.$' # attribute => 'String' # column => '0' # context => '#pop' # type => 'RegExpr' if ($self->testRegExpr($text, '\\.$', 0, 0, 0, 0, 0, '#pop', 'String')) { return 1 } # attribute => 'String Char' # context => '#stay' # type => 'HlCStringChar' if ($self->testHlCStringChar($text, 0, undef, 0, '#stay', 'String Char')) { return 1 } return 0; }; sub parseNormal { my ($self, $text) = @_; # String => 'keywords' # attribute => 'Keyword' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) { return 1 } # attribute => 'Symbol' # beginRegion => 'Brace1' # char => '{' # context => '#stay' # type => 'DetectChar' if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, '#stay', 'Symbol')) { return 1 } # attribute => 'Symbol' # char => '}' # context => '#stay' # endRegion => 'Brace1' # type => 'DetectChar' if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#stay', 'Symbol')) { return 1 } # String => '\d+[KMG]?' # attribute => 'Decimal' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\d+[KMG]?', 0, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # attribute => 'String' # char => '"' # context => 'String' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) { return 1 } # String => 'text:$' # attribute => 'String' # beginRegion => 'String' # context => 'MultilineString' # type => 'RegExpr' if ($self->testRegExpr($text, 'text:$', 0, 0, 0, undef, 0, 'MultilineString', 'String')) { return 1 } # attribute => 'Comment' # beginRegion => 'Comment' # char => '/' # char1 => '*' # context => 'Comment' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'Comment', 'Comment')) { return 1 } # String => '#.*$' # attribute => 'Comment' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '#.*$', 0, 0, 0, undef, 0, '#stay', 'Comment')) { return 1 } # String => ':\w+' # attribute => 'Tagged Argument' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, ':\\w+', 0, 0, 0, undef, 0, '#stay', 'Tagged Argument')) { return 1 } # String => '[.]{1,1}' # attribute => 'Symbol' # context => 'Member' # type => 'RegExpr' if ($self->testRegExpr($text, '[.]{1,1}', 0, 0, 0, undef, 0, 'Member', 'Symbol')) { return 1 } # String => ':!%&()+,-/.*<=>?[]|~^;' # attribute => 'Symbol' # context => '#stay' # type => 'AnyChar' if ($self->testAnyChar($text, ':!%&()+,-/.*<=>?[]|~^;', 0, 0, undef, 0, '#stay', 'Symbol')) { return 1 } return 0; }; sub parseString { my ($self, $text) = @_; # attribute => 'String' # context => '#stay' # type => 'LineContinue' if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'String')) { return 1 } # attribute => 'String Char' # context => '#stay' # type => 'HlCStringChar' if ($self->testHlCStringChar($text, 0, undef, 0, '#stay', 'String Char')) { return 1 } # attribute => 'String' # char => '"' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) { return 1 } return 0; }; 1; __END__ =head1 NAME Syntax::Highlight::Engine::Kate::Sieve - a Plugin for Sieve syntax highlighting =head1 SYNOPSIS require Syntax::Highlight::Engine::Kate::Sieve; my $sh = new Syntax::Highlight::Engine::Kate::Sieve([ ]); =head1 DESCRIPTION Syntax::Highlight::Engine::Kate::Sieve is a plugin module that provides syntax highlighting for Sieve to the Syntax::Haghlight::Engine::Kate highlighting engine. This code is generated from the syntax definition files used by the Kate project. It works quite fine, but can use refinement and optimization. It inherits Syntax::Higlight::Engine::Kate::Template. See also there. =head1 AUTHOR Hans Jeuken (haje toneel demon nl) =head1 BUGS Unknown. If you find any, please contact the authorlibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/Engine/Kate/Cdash.pm0000644000175000017500000002622512150556557031356 0ustar gregoagregoa# Copyright (c) 2005 - 2006 Hans Jeuken. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. # This file was generated from the 'cs.xml' file of the syntax highlight # engine of the kate text editor (http://www.kate-editor.org #kate xml version 1.14 #kate version 2.3 #generated: Sun Feb 3 22:02:04 2008, localtime package Syntax::Highlight::Engine::Kate::Cdash; our $VERSION = '0.07'; use strict; use warnings; use base('Syntax::Highlight::Engine::Kate::Template'); sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = $class->SUPER::new(@_); $self->attributes({ 'Char' => 'Char', 'Comment' => 'Comment', 'Data Type' => 'DataType', 'Decimal' => 'DecVal', 'Float' => 'Float', 'Function' => 'Function', 'Hex' => 'BaseN', 'Keyword' => 'Keyword', 'Normal Text' => 'Normal', 'Octal' => 'BaseN', 'String' => 'String', 'String Char' => 'Char', 'Symbol' => 'Normal', }); $self->listAdd('keywords', '#define', '#elif', '#else', '#endif', '#error', '#if', '#line', '#undef', '#warning', 'abstract', 'as', 'base', 'break', 'case', 'catch', 'checked', 'class', 'continue', 'default', 'delegate', 'do', 'else', 'enum', 'event', 'explicit', 'extern', 'false', 'finally', 'fixed', 'for', 'foreach', 'goto', 'if', 'implicit', 'in', 'interface', 'internal', 'is', 'lock', 'namespace', 'new', 'null', 'operator', 'out', 'override', 'params', 'private', 'protected', 'public', 'readonly', 'ref', 'return', 'sealed', 'sizeof', 'stackalloc', 'static', 'struct', 'switch', 'this', 'throw', 'true', 'try', 'typeof', 'unchecked', 'unsafe', 'using', 'virtual', 'while', ); $self->listAdd('types', 'bool', 'byte', 'char', 'const', 'decimal', 'double', 'float', 'int', 'long', 'object', 'sbyte', 'short', 'string', 'uint', 'ulong', 'ushort', 'void', ); $self->contextdata({ 'Commentar 1' => { callback => \&parseCommentar1, attribute => 'Comment', lineending => '#pop', }, 'Commentar 2' => { callback => \&parseCommentar2, attribute => 'Comment', }, 'Member' => { callback => \&parseMember, attribute => 'Normal Text', lineending => '#pop', fallthrough => '#pop', }, 'Normal' => { callback => \&parseNormal, attribute => 'Normal Text', }, 'String' => { callback => \&parseString, attribute => 'String', lineending => '#pop', }, }); $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); $self->basecontext('Normal'); $self->keywordscase(0); $self->initialize; bless ($self, $class); return $self; } sub language { return 'C#'; } sub parseCommentar1 { my ($self, $text) = @_; return 0; }; sub parseCommentar2 { my ($self, $text) = @_; # attribute => 'Comment' # char => '*' # char1 => '/' # context => '#pop' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop', 'Comment')) { return 1 } return 0; }; sub parseMember { my ($self, $text) = @_; # String => '\b[_\w][_\w\d]*(?=[\s]*)' # attribute => 'Function' # context => '#pop' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b[_\\w][_\\w\\d]*(?=[\\s]*)', 0, 0, 0, undef, 0, '#pop', 'Function')) { return 1 } return 0; }; sub parseNormal { my ($self, $text) = @_; # String => 'keywords' # attribute => 'Keyword' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'types' # attribute => 'Data Type' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'types', 0, undef, 0, '#stay', 'Data Type')) { return 1 } # attribute => 'Float' # context => '#stay' # items => 'ARRAY(0x10f55a0)' # type => 'Float' if ($self->testFloat($text, 0, undef, 0, '#stay', 'Float')) { # String => 'fF' # attribute => 'Float' # context => '#stay' # type => 'AnyChar' if ($self->testAnyChar($text, 'fF', 0, 0, undef, 0, '#stay', 'Float')) { return 1 } } # attribute => 'Octal' # context => '#stay' # type => 'HlCOct' if ($self->testHlCOct($text, 0, undef, 0, '#stay', 'Octal')) { return 1 } # attribute => 'Hex' # context => '#stay' # type => 'HlCHex' if ($self->testHlCHex($text, 0, undef, 0, '#stay', 'Hex')) { return 1 } # attribute => 'Decimal' # context => '#stay' # items => 'ARRAY(0x1095b90)' # type => 'Int' if ($self->testInt($text, 0, undef, 0, '#stay', 'Decimal')) { # String => 'ULL' # attribute => 'Decimal' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'ULL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'LUL' # attribute => 'Decimal' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'LUL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'LLU' # attribute => 'Decimal' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'LLU', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'UL' # attribute => 'Decimal' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'UL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'LU' # attribute => 'Decimal' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'LU', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'LL' # attribute => 'Decimal' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'LL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'U' # attribute => 'Decimal' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'U', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'L' # attribute => 'Decimal' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'L', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } } # attribute => 'Char' # context => '#stay' # type => 'HlCChar' if ($self->testHlCChar($text, 0, undef, 0, '#stay', 'Char')) { return 1 } # attribute => 'String' # char => '"' # context => 'String' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) { return 1 } # context => '##Doxygen' # type => 'IncludeRules' if ($self->includePlugin('Doxygen', $text)) { return 1 } # attribute => 'Comment' # char => '/' # char1 => '/' # context => 'Commentar 1' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'Commentar 1', 'Comment')) { return 1 } # attribute => 'Comment' # char => '/' # char1 => '*' # context => 'Commentar 2' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'Commentar 2', 'Comment')) { return 1 } # attribute => 'Symbol' # beginRegion => 'block1' # char => '{' # context => '#stay' # type => 'DetectChar' if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, '#stay', 'Symbol')) { return 1 } # attribute => 'Symbol' # char => '}' # context => '#stay' # endRegion => 'block1' # type => 'DetectChar' if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#stay', 'Symbol')) { return 1 } # String => '#region.*$' # attribute => 'Decimal' # beginRegion => 'Region1' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '#region.*$', 0, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => '#endregion.*$' # attribute => 'Decimal' # context => '#stay' # endRegion => 'Region1' # type => 'RegExpr' if ($self->testRegExpr($text, '#endregion.*$', 0, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => '\b[_\w][_\w\d]*(?=[\s]*[(])' # attribute => 'Function' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b[_\\w][_\\w\\d]*(?=[\\s]*[(])', 0, 0, 0, undef, 0, '#stay', 'Function')) { return 1 } # String => '[.]{1,1}' # attribute => 'Symbol' # context => 'Member' # type => 'RegExpr' if ($self->testRegExpr($text, '[.]{1,1}', 0, 0, 0, undef, 0, 'Member', 'Symbol')) { return 1 } # String => ':!%&()+,-/.*<=>?[]|~^;' # attribute => 'Symbol' # context => '#stay' # type => 'AnyChar' if ($self->testAnyChar($text, ':!%&()+,-/.*<=>?[]|~^;', 0, 0, undef, 0, '#stay', 'Symbol')) { return 1 } return 0; }; sub parseString { my ($self, $text) = @_; # attribute => 'String' # context => '#pop' # type => 'LineContinue' if ($self->testLineContinue($text, 0, undef, 0, '#pop', 'String')) { return 1 } # attribute => 'String Char' # context => '#stay' # type => 'HlCStringChar' if ($self->testHlCStringChar($text, 0, undef, 0, '#stay', 'String Char')) { return 1 } # attribute => 'String' # char => '"' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) { return 1 } return 0; }; 1; __END__ =head1 NAME Syntax::Highlight::Engine::Kate::Cdash - a Plugin for C# syntax highlighting =head1 SYNOPSIS require Syntax::Highlight::Engine::Kate::Cdash; my $sh = new Syntax::Highlight::Engine::Kate::Cdash([ ]); =head1 DESCRIPTION Syntax::Highlight::Engine::Kate::Cdash is a plugin module that provides syntax highlighting for C# to the Syntax::Haghlight::Engine::Kate highlighting engine. This code is generated from the syntax definition files used by the Kate project. It works quite fine, but can use refinement and optimization. It inherits Syntax::Higlight::Engine::Kate::Template. See also there. =head1 AUTHOR Hans Jeuken (haje toneel demon nl) =head1 BUGS Unknown. If you find any, please contact the authorlibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/Engine/Kate/Doxygen.pm0000644000175000017500000007070412150556557031752 0ustar gregoagregoa# Copyright (c) 2005 - 2006 Hans Jeuken. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. # This file was generated from the 'doxygen.xml' file of the syntax highlight # engine of the kate text editor (http://www.kate-editor.org #kate xml version 1.25 #kate version 2.4 #kate author Dominik Haumann (dhdev@gmx.de) #generated: Sun Feb 3 22:02:04 2008, localtime package Syntax::Highlight::Engine::Kate::Doxygen; our $VERSION = '0.07'; use strict; use warnings; use base('Syntax::Highlight::Engine::Kate::Template'); sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = $class->SUPER::new(@_); $self->attributes({ 'Comment' => 'Reserved', 'Description' => 'Function', 'HTML Comment' => 'Comment', 'HTML Tag' => 'Keyword', 'Identifier' => 'Others', 'Normal Text' => 'Normal', 'Tags' => 'Keyword', 'Types' => 'DataType', 'Word' => 'Operator', }); $self->listAdd('TagOnly', '@#', '@$', '@@', '@\\\\', '@arg', '@attention', '@author', '@callgraph', '@code', '@dot', '@else', '@endcode', '@enddot', '@endhtmlonly', '@endif', '@endlatexonly', '@endlink', '@endmanonly', '@endverbatim', '@endxmlonly', '@f$', '@f[', '@f]', '@hideinitializer', '@htmlonly', '@interface', '@internal', '@invariant', '@latexonly', '@li', '@manonly', '@n', '@nosubgrouping', '@note', '@only', '@par', '@post', '@pre', '@remarks', '@return', '@returns', '@sa', '@see', '@showinitializer', '@since', '@test', '@todo', '@verbatim', '@warning', '@xmlonly', '@~', '\\\\#', '\\\\$', '\\\\@', '\\\\\\\\', '\\\\arg', '\\\\attention', '\\\\author', '\\\\callgraph', '\\\\code', '\\\\dot', '\\\\else', '\\\\endcode', '\\\\enddot', '\\\\endhtmlonly', '\\\\endif', '\\\\endlatexonly', '\\\\endlink', '\\\\endmanonly', '\\\\endverbatim', '\\\\endxmlonly', '\\\\f$', '\\\\f[', '\\\\f]', '\\\\hideinitializer', '\\\\htmlonly', '\\\\interface', '\\\\internal', '\\\\invariant', '\\\\latexonly', '\\\\li', '\\\\manonly', '\\\\n', '\\\\nosubgrouping', '\\\\note', '\\\\only', '\\\\par', '\\\\post', '\\\\pre', '\\\\remarks', '\\\\return', '\\\\returns', '\\\\sa', '\\\\see', '\\\\showinitializer', '\\\\since', '\\\\test', '\\\\todo', '\\\\verbatim', '\\\\warning', '\\\\xmlonly', '\\\\~', ); $self->listAdd('TagString', '@addindex', '@brief', '@bug', '@date', '@deprecated', '@fn', '@ingroup', '@line', '@mainpage', '@name', '@overload', '@short', '@skip', '@skipline', '@typedef', '@until', '@var', '\\\\addindex', '\\\\brief', '\\\\bug', '\\\\date', '\\\\deprecated', '\\\\fn', '\\\\ingroup', '\\\\line', '\\\\mainpage', '\\\\name', '\\\\overload', '\\\\short', '\\\\skip', '\\\\skipline', '\\\\typedef', '\\\\until', '\\\\var', ); $self->listAdd('TagWord', '@a', '@addtogroup', '@anchor', '@b', '@c', '@class', '@copydoc', '@def', '@dontinclude', '@dotfile', '@e', '@elseif', '@em', '@enum', '@example', '@exception', '@exceptions', '@file', '@htmlinclude', '@if', '@ifnot', '@include', '@link', '@namespace', '@p', '@package', '@param', '@ref', '@relates', '@relatesalso', '@retval', '@throw', '@throws', '@verbinclude', '@version', '@xrefitem', '\\\\a', '\\\\addtogroup', '\\\\anchor', '\\\\b', '\\\\c', '\\\\class', '\\\\copydoc', '\\\\def', '\\\\dontinclude', '\\\\dotfile', '\\\\e', '\\\\elseif', '\\\\em', '\\\\enum', '\\\\example', '\\\\exception', '\\\\exceptions', '\\\\file', '\\\\htmlinclude', '\\\\if', '\\\\ifnot', '\\\\include', '\\\\link', '\\\\namespace', '\\\\p', '\\\\package', '\\\\param', '\\\\ref', '\\\\relates', '\\\\relatesalso', '\\\\retval', '\\\\throw', '\\\\throws', '\\\\verbinclude', '\\\\version', '\\\\xrefitem', ); $self->listAdd('TagWordString', '@defgroup', '@page', '@paragraph', '@section', '@struct', '@subsection', '@subsubsection', '@union', '@weakgroup', '\\\\defgroup', '\\\\page', '\\\\paragraph', '\\\\section', '\\\\struct', '\\\\subsection', '\\\\subsubsection', '\\\\union', '\\\\weakgroup', ); $self->listAdd('TagWordWord', '@image', '\\\\image', ); $self->contextdata({ 'BlockComment' => { callback => \&parseBlockComment, attribute => 'Comment', }, 'LineComment' => { callback => \&parseLineComment, attribute => 'Comment', lineending => '#pop', }, 'ML_Tag2ndWord' => { callback => \&parseML_Tag2ndWord, attribute => 'Comment', lineending => '#pop', }, 'ML_TagString' => { callback => \&parseML_TagString, attribute => 'Comment', lineending => '#pop', }, 'ML_TagWord' => { callback => \&parseML_TagWord, attribute => 'Comment', lineending => '#pop', }, 'ML_TagWordString' => { callback => \&parseML_TagWordString, attribute => 'Comment', lineending => '#pop', }, 'ML_TagWordWord' => { callback => \&parseML_TagWordWord, attribute => 'Comment', lineending => '#pop', }, 'ML_htmlcomment' => { callback => \&parseML_htmlcomment, attribute => 'HTML Comment', }, 'ML_htmltag' => { callback => \&parseML_htmltag, attribute => 'Identifier', }, 'ML_identifiers' => { callback => \&parseML_identifiers, attribute => 'Identifier', }, 'ML_types1' => { callback => \&parseML_types1, attribute => 'Types', }, 'ML_types2' => { callback => \&parseML_types2, attribute => 'Types', }, 'Normal' => { callback => \&parseNormal, attribute => 'Normal Text', }, 'SL_Tag2ndWord' => { callback => \&parseSL_Tag2ndWord, attribute => 'Comment', lineending => '#pop', }, 'SL_TagString' => { callback => \&parseSL_TagString, attribute => 'Comment', lineending => '#pop', }, 'SL_TagWord' => { callback => \&parseSL_TagWord, attribute => 'Comment', lineending => '#pop', }, 'SL_TagWordString' => { callback => \&parseSL_TagWordString, attribute => 'Comment', lineending => '#pop', }, 'SL_TagWordWord' => { callback => \&parseSL_TagWordWord, attribute => 'Comment', lineending => '#pop', }, 'SL_htmlcomment' => { callback => \&parseSL_htmlcomment, attribute => 'HTML Comment', lineending => '#pop', }, 'SL_htmltag' => { callback => \&parseSL_htmltag, attribute => 'Identifier', lineending => '#pop', }, 'SL_identifiers' => { callback => \&parseSL_identifiers, attribute => 'Identifier', lineending => '#pop', }, 'SL_types1' => { callback => \&parseSL_types1, attribute => 'Types', lineending => '#pop', }, 'SL_types2' => { callback => \&parseSL_types2, attribute => 'Types', lineending => '#pop', }, }); $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\\\|\\$|\\~'); $self->basecontext('Normal'); $self->keywordscase(0); $self->initialize; bless ($self, $class); return $self; } sub language { return 'Doxygen'; } sub parseBlockComment { my ($self, $text) = @_; # type => 'DetectSpaces' if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { return 1 } # attribute => 'Comment' # char => '*' # char1 => '/' # context => '#pop' # endRegion => 'BlockComment' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop', 'Comment')) { return 1 } # context => '##Alerts' # type => 'IncludeRules' if ($self->includePlugin('Alerts', $text)) { return 1 } # String => 'TagOnly' # attribute => 'Tags' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'TagOnly', 0, undef, 0, '#stay', 'Tags')) { return 1 } # String => 'TagWord' # attribute => 'Tags' # context => 'ML_TagWord' # type => 'keyword' if ($self->testKeyword($text, 'TagWord', 0, undef, 0, 'ML_TagWord', 'Tags')) { return 1 } # String => 'TagWordWord' # attribute => 'Tags' # context => 'ML_TagWordWord' # type => 'keyword' if ($self->testKeyword($text, 'TagWordWord', 0, undef, 0, 'ML_TagWordWord', 'Tags')) { return 1 } # String => 'TagString' # attribute => 'Tags' # context => 'ML_TagString' # type => 'keyword' if ($self->testKeyword($text, 'TagString', 0, undef, 0, 'ML_TagString', 'Tags')) { return 1 } # String => 'TagWordString' # attribute => 'Tags' # context => 'ML_TagWordString' # type => 'keyword' if ($self->testKeyword($text, 'TagWordString', 0, undef, 0, 'ML_TagWordString', 'Tags')) { return 1 } # type => 'DetectIdentifier' if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) { return 1 } # String => '\\(<|>)' # attribute => 'Tags' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\\\(<|>)', 0, 0, 0, undef, 0, '#stay', 'Tags')) { return 1 } # attribute => 'Comment' # char => '<' # char1 => '<' # context => '#stay' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '<', '<', 0, 0, 0, undef, 0, '#stay', 'Comment')) { return 1 } # String => '<\s*\/?\s*[a-zA-Z_:][a-zA-Z0-9._:-]*' # attribute => 'HTML Tag' # context => 'ML_htmltag' # type => 'RegExpr' if ($self->testRegExpr($text, '<\\s*\\/?\\s*[a-zA-Z_:][a-zA-Z0-9._:-]*', 0, 0, 0, undef, 0, 'ML_htmltag', 'HTML Tag')) { return 1 } # String => '' # attribute => 'HTML Comment' # context => '#pop' # type => 'StringDetect' if ($self->testStringDetect($text, '-->', 0, 0, 0, undef, 0, '#pop', 'HTML Comment')) { return 1 } return 0; }; sub parseML_htmltag { my ($self, $text) = @_; # attribute => 'Comment' # char => '*' # char1 => '/' # context => '#pop' # lookAhead => 'true' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '*', '/', 0, 0, 1, undef, 0, '#pop', 'Comment')) { return 1 } # attribute => 'HTML Tag' # char => '/' # char1 => '>' # context => '#pop' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '>', 0, 0, 0, undef, 0, '#pop', 'HTML Tag')) { return 1 } # attribute => 'HTML Tag' # char => '>' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '#pop', 'HTML Tag')) { return 1 } # String => '\s*=\s*' # attribute => 'Identifier' # context => 'ML_identifiers' # type => 'RegExpr' if ($self->testRegExpr($text, '\\s*=\\s*', 0, 0, 0, undef, 0, 'ML_identifiers', 'Identifier')) { return 1 } return 0; }; sub parseML_identifiers { my ($self, $text) = @_; # attribute => 'Comment' # char => '*' # char1 => '/' # context => '#pop' # lookAhead => 'true' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '*', '/', 0, 0, 1, undef, 0, '#pop', 'Comment')) { return 1 } # String => '\s*#?[a-zA-Z0-9]*' # attribute => 'String' # context => '#pop' # type => 'RegExpr' if ($self->testRegExpr($text, '\\s*#?[a-zA-Z0-9]*', 0, 0, 0, undef, 0, '#pop', 'String')) { return 1 } # attribute => 'Types' # char => ''' # context => 'ML_types1' # type => 'DetectChar' if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'ML_types1', 'Types')) { return 1 } # attribute => 'Types' # char => '"' # context => 'ML_types2' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'ML_types2', 'Types')) { return 1 } return 0; }; sub parseML_types1 { my ($self, $text) = @_; # attribute => 'Comment' # char => '*' # char1 => '/' # context => '#pop' # lookAhead => 'true' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '*', '/', 0, 0, 1, undef, 0, '#pop', 'Comment')) { return 1 } # attribute => 'Types' # char => ''' # context => '#pop#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop#pop', 'Types')) { return 1 } return 0; }; sub parseML_types2 { my ($self, $text) = @_; # attribute => 'Comment' # char => '*' # char1 => '/' # context => '#pop' # lookAhead => 'true' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '*', '/', 0, 0, 1, undef, 0, '#pop', 'Comment')) { return 1 } # attribute => 'Types' # char => '"' # context => '#pop#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop#pop', 'Types')) { return 1 } return 0; }; sub parseNormal { my ($self, $text) = @_; # String => '//(!|(/(?=[^/]|$))) 'Comment' # context => 'LineComment' # type => 'RegExpr' if ($self->testRegExpr($text, '//(!|(/(?=[^/]|$))) '/\*(\*[^*/]|!|\*$) 'Comment' # beginRegion => 'BlockComment' # context => 'BlockComment' # type => 'RegExpr' if ($self->testRegExpr($text, '/\\*(\\*[^*/]|!|\\*$) 'DetectSpaces' if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { return 1 } # String => '\S\s' # attribute => 'Word' # context => '#pop' # type => 'RegExpr' if ($self->testRegExpr($text, '\\S\\s', 0, 0, 0, undef, 0, '#pop', 'Word')) { return 1 } # String => '\S' # attribute => 'Word' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\S', 0, 0, 0, undef, 0, '#stay', 'Word')) { return 1 } return 0; }; sub parseSL_TagString { my ($self, $text) = @_; # type => 'DetectSpaces' if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { return 1 } # String => '' # attribute => 'HTML Comment' # context => '#pop' # type => 'StringDetect' if ($self->testStringDetect($text, '-->', 0, 0, 0, undef, 0, '#pop', 'HTML Comment')) { return 1 } return 0; }; sub parseSL_htmltag { my ($self, $text) = @_; # attribute => 'HTML Tag' # char => '/' # char1 => '>' # context => '#pop' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '>', 0, 0, 0, undef, 0, '#pop', 'HTML Tag')) { return 1 } # attribute => 'HTML Tag' # char => '>' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '#pop', 'HTML Tag')) { return 1 } # String => '\s*=\s*' # attribute => 'Identifier' # context => 'SL_identifiers' # type => 'RegExpr' if ($self->testRegExpr($text, '\\s*=\\s*', 0, 0, 0, undef, 0, 'SL_identifiers', 'Identifier')) { return 1 } return 0; }; sub parseSL_identifiers { my ($self, $text) = @_; # String => '\s*#?[a-zA-Z0-9]*' # attribute => 'String' # context => '#pop' # type => 'RegExpr' if ($self->testRegExpr($text, '\\s*#?[a-zA-Z0-9]*', 0, 0, 0, undef, 0, '#pop', 'String')) { return 1 } # attribute => 'Types' # char => ''' # context => 'SL_types1' # type => 'DetectChar' if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'SL_types1', 'Types')) { return 1 } # attribute => 'Types' # char => '"' # context => 'SL_types2' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'SL_types2', 'Types')) { return 1 } return 0; }; sub parseSL_types1 { my ($self, $text) = @_; # attribute => 'Types' # char => ''' # context => '#pop#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop#pop', 'Types')) { return 1 } return 0; }; sub parseSL_types2 { my ($self, $text) = @_; # attribute => 'Types' # char => '"' # context => '#pop#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop#pop', 'Types')) { return 1 } return 0; }; 1; __END__ =head1 NAME Syntax::Highlight::Engine::Kate::Doxygen - a Plugin for Doxygen syntax highlighting =head1 SYNOPSIS require Syntax::Highlight::Engine::Kate::Doxygen; my $sh = new Syntax::Highlight::Engine::Kate::Doxygen([ ]); =head1 DESCRIPTION Syntax::Highlight::Engine::Kate::Doxygen is a plugin module that provides syntax highlighting for Doxygen to the Syntax::Haghlight::Engine::Kate highlighting engine. This code is generated from the syntax definition files used by the Kate project. It works quite fine, but can use refinement and optimization. It inherits Syntax::Higlight::Engine::Kate::Template. See also there. =head1 AUTHOR Hans Jeuken (haje toneel demon nl) =head1 BUGS Unknown. If you find any, please contact the authorlibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/Engine/Kate/Asm6502.pm0000644000175000017500000005020612150556557031365 0ustar gregoagregoa# Copyright (c) 2005 - 2006 Hans Jeuken. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. # This file was generated from the 'asm6502.xml' file of the syntax highlight # engine of the kate text editor (http://www.kate-editor.org #kate xml version 1.04 #kate version 2.1 #generated: Sun Feb 3 22:02:04 2008, localtime package Syntax::Highlight::Engine::Kate::Asm6502; our $VERSION = '0.07'; use strict; use warnings; use base('Syntax::Highlight::Engine::Kate::Template'); sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = $class->SUPER::new(@_); $self->attributes({ 'Command' => 'Normal', 'Comment' => 'Comment', 'Data Type' => 'DataType', 'Decimal' => 'DecVal', 'Hex' => 'BaseN', 'Keyword' => 'Keyword', 'Normal Text' => 'Normal', 'Operator' => 'Others', 'Parameter' => 'Others', 'Preprocessor' => 'Others', 'String' => 'String', 'Substitution' => 'Others', }); $self->contextdata({ 'Base' => { callback => \&parseBase, attribute => 'Normal Text', }, 'Commentar 2' => { callback => \&parseCommentar2, attribute => 'Comment', }, }); $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); $self->basecontext('Base'); $self->keywordscase(0); $self->initialize; bless ($self, $class); return $self; } sub language { return 'Asm6502'; } sub parseBase { my ($self, $text) = @_; # String => '#define.*$' # attribute => 'Preprocessor' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '#define.*$', 0, 0, 0, undef, 0, '#stay', 'Preprocessor')) { return 1 } # String => '#include .*$' # attribute => 'Preprocessor' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '#include .*$', 0, 0, 0, undef, 0, '#stay', 'Preprocessor')) { return 1 } # String => ';.*$' # attribute => 'Comment' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, ';.*$', 0, 0, 0, undef, 0, '#stay', 'Comment')) { return 1 } # String => '\.byte' # attribute => 'Data Type' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\.byte', 0, 0, 0, undef, 0, '#stay', 'Data Type')) { return 1 } # String => '\.byt' # attribute => 'Data Type' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\.byt', 0, 0, 0, undef, 0, '#stay', 'Data Type')) { return 1 } # String => '\.word' # attribute => 'Data Type' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\.word', 0, 0, 0, undef, 0, '#stay', 'Data Type')) { return 1 } # String => '\.asc' # attribute => 'Data Type' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\.asc', 0, 0, 0, undef, 0, '#stay', 'Data Type')) { return 1 } # String => '\.dsb' # attribute => 'Data Type' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\.dsb', 0, 0, 0, undef, 0, '#stay', 'Data Type')) { return 1 } # String => '\.fopt' # attribute => 'Data Type' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\.fopt', 0, 0, 0, undef, 0, '#stay', 'Data Type')) { return 1 } # String => '\.text' # attribute => 'Data Type' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\.text', 0, 0, 0, undef, 0, '#stay', 'Data Type')) { return 1 } # String => '\.data' # attribute => 'Data Type' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\.data', 0, 0, 0, undef, 0, '#stay', 'Data Type')) { return 1 } # String => '\.bss' # attribute => 'Data Type' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\.bss', 0, 0, 0, undef, 0, '#stay', 'Data Type')) { return 1 } # String => '\.zero' # attribute => 'Data Type' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\.zero', 0, 0, 0, undef, 0, '#stay', 'Data Type')) { return 1 } # String => '\.align' # attribute => 'Data Type' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\.align', 0, 0, 0, undef, 0, '#stay', 'Data Type')) { return 1 } # String => '\$[A-Za-z0-9]*' # attribute => 'Hex' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\$[A-Za-z0-9]*', 0, 0, 0, undef, 0, '#stay', 'Hex')) { return 1 } # String => ',x$' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'RegExpr' if ($self->testRegExpr($text, ',x$', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => ',y$' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'RegExpr' if ($self->testRegExpr($text, ',y$', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '#' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'RegExpr' if ($self->testRegExpr($text, '#', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'TAX' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'TAX', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'ADC' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'ADC', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'AND' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'AND', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'ASL' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'ASL', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'BCC' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'BCC', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'BCS' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'BCS', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'BEQ' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'BEQ', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'BIT' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'BIT', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'BMI' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'BMI', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'BNE' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'BNE', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'BPL' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'BPL', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'BRK' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'BRK', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'BVC' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'BVC', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'BVS' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'BVS', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'CLC' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'CLC', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'CLD' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'CLD', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'CLI' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'CLI', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'CLV' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'CLV', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'CMP' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'CMP', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'CPX' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'CPX', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'CPY' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'CPY', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'DEC' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'DEC', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'DEX' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'DEX', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'DEY' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'DEY', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'EOR' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'EOR', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'INC' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'INC', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'INX' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'INX', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'INY' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'INY', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'JMP' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'JMP', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'JSR' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'JSR', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'LDA' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'LDA', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'LDX' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'LDX', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'LDY' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'LDY', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'LSR' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'LSR', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'NOP' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'NOP', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'ORA' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'ORA', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'PHA' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'PHA', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'PHP' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'PHP', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'PLA' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'PLA', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'PLP' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'PLP', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'ROL' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'ROL', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'ROR' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'ROR', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'RTI' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'RTI', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'RTS' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'RTS', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'SBC' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'SBC', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'SEC' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'SEC', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'SED' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'SED', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'SEI' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'SEI', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'STA' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'STA', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'STX' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'STX', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'STY' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'STY', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'TAY' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'TAY', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'TSX' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'TSX', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'TXA' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'TXA', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'TXS' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'TXS', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'TYA' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'TYA', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '\*=' # attribute => 'Decimal' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\*=', 0, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # attribute => 'String' # char => '"' # char1 => '"' # context => '#stay' # type => 'RangeDetect' if ($self->testRangeDetect($text, '"', '"', 0, 0, undef, 0, '#stay', 'String')) { return 1 } # String => '-+<>=;' # attribute => 'Operator' # context => '#stay' # type => 'AnyChar' if ($self->testAnyChar($text, '-+<>=;', 0, 0, undef, 0, '#stay', 'Operator')) { return 1 } # attribute => 'Comment' # beginRegion => 'Comment' # char => '/' # char1 => '*' # context => 'Commentar 2' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'Commentar 2', 'Comment')) { return 1 } return 0; }; sub parseCommentar2 { my ($self, $text) = @_; # attribute => 'Comment' # char => '*' # char1 => '/' # context => '#pop' # endRegion => 'Comment' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop', 'Comment')) { return 1 } return 0; }; 1; __END__ =head1 NAME Syntax::Highlight::Engine::Kate::Asm6502 - a Plugin for Asm6502 syntax highlighting =head1 SYNOPSIS require Syntax::Highlight::Engine::Kate::Asm6502; my $sh = new Syntax::Highlight::Engine::Kate::Asm6502([ ]); =head1 DESCRIPTION Syntax::Highlight::Engine::Kate::Asm6502 is a plugin module that provides syntax highlighting for Asm6502 to the Syntax::Haghlight::Engine::Kate highlighting engine. This code is generated from the syntax definition files used by the Kate project. It works quite fine, but can use refinement and optimization. It inherits Syntax::Higlight::Engine::Kate::Template. See also there. =head1 AUTHOR Hans Jeuken (haje toneel demon nl) =head1 BUGS Unknown. If you find any, please contact the authorlibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/Engine/Kate/LPC.pm0000644000175000017500000003067712150556557030760 0ustar gregoagregoa# Copyright (c) 2005 - 2006 Hans Jeuken. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. # This file was generated from the 'lpc.xml' file of the syntax highlight # engine of the kate text editor (http://www.kate-editor.org #kate xml version 0.76 #kate version 2.4 #kate author Andreas Klauer (Andreas.Klauer@metamorpher.de) #generated: Sun Feb 3 22:02:05 2008, localtime package Syntax::Highlight::Engine::Kate::LPC; our $VERSION = '0.07'; use strict; use warnings; use base('Syntax::Highlight::Engine::Kate::Template'); sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = $class->SUPER::new(@_); $self->attributes({ 'Alert' => 'Alert', 'Binary' => 'BaseN', 'Char' => 'Char', 'Closure' => 'Others', 'Datatype' => 'DataType', 'Default' => 'Normal', 'Floats' => 'Float', 'Hexadecimal' => 'BaseN', 'Integer' => 'DecVal', 'Keywords' => 'Keyword', 'Modifier' => 'DataType', 'Multi-Line comments' => 'Comment', 'Octal' => 'BaseN', 'Preprocessor' => 'Others', 'Preprocessor-Strings' => 'String', 'Region Marker' => 'RegionMarker', 'Single-Line comments' => 'Comment', 'Strings' => 'String', }); $self->listAdd('attention', '###', 'FIXME', 'HACK', 'NOTE', 'NOTICE', 'TODO', 'WARNING', ); $self->listAdd('keywords', 'break', 'case', 'continue', 'default', 'do', 'else', 'for', 'foreach', 'functions', 'if', 'inherit', 'nolog', 'publish', 'return', 'switch', 'variables', 'while', ); $self->listAdd('modifiers', 'nomask', 'nosave', 'private', 'protected', 'public', 'static', 'varargs', 'virtual', ); $self->listAdd('types', 'array', 'closure', 'float', 'int', 'mapping', 'mixed', 'object', 'status', 'string', 'symbol', 'void', ); $self->contextdata({ 'Comment1' => { callback => \&parseComment1, attribute => 'Single-Line comments', lineending => '#pop', }, 'Comment2' => { callback => \&parseComment2, attribute => 'Multi-Line comments', }, 'Normal' => { callback => \&parseNormal, attribute => 'Default', }, 'Preprocessor' => { callback => \&parsePreprocessor, attribute => 'Preprocessor', lineending => '#pop', }, 'String1' => { callback => \&parseString1, attribute => 'Strings', lineending => '#pop', }, 'String2' => { callback => \&parseString2, attribute => 'Preprocessor-Strings', lineending => '#pop', }, }); $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); $self->basecontext('Normal'); $self->keywordscase(0); $self->initialize; bless ($self, $class); return $self; } sub language { return 'LPC'; } sub parseComment1 { my ($self, $text) = @_; # attribute => 'Single-Line comments' # context => '#stay' # type => 'LineContinue' if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'Single-Line comments')) { return 1 } # String => 'attention' # attribute => 'Alert' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'attention', 0, undef, 0, '#stay', 'Alert')) { return 1 } return 0; }; sub parseComment2 { my ($self, $text) = @_; # attribute => 'Multi-Line comments' # char => '*' # char1 => '/' # context => '#pop' # endRegion => 'blockComment' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop', 'Multi-Line comments')) { return 1 } # String => 'attention' # attribute => 'Alert' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'attention', 0, undef, 0, '#stay', 'Alert')) { return 1 } return 0; }; sub parseNormal { my ($self, $text) = @_; # String => '//\s*BEGIN.*$' # attribute => 'Region Marker' # beginRegion => 'regionMarker' # context => '#stay' # firstNonSpace => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '//\\s*BEGIN.*$', 0, 0, 0, undef, 1, '#stay', 'Region Marker')) { return 1 } # String => '//\s*END.*$' # attribute => 'Region Marker' # context => '#stay' # endRegion => 'regionMarker' # firstNonSpace => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '//\\s*END.*$', 0, 0, 0, undef, 1, '#stay', 'Region Marker')) { return 1 } # attribute => 'Single-Line comments' # char => '/' # char1 => '/' # context => 'Comment1' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'Comment1', 'Single-Line comments')) { return 1 } # attribute => 'Multi-Line comments' # beginRegion => 'blockComment' # char => '/' # char1 => '*' # context => 'Comment2' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'Comment2', 'Multi-Line comments')) { return 1 } # String => 'modifiers' # attribute => 'Modifier' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'modifiers', 0, undef, 0, '#stay', 'Modifier')) { return 1 } # String => 'types' # attribute => 'Datatype' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'types', 0, undef, 0, '#stay', 'Datatype')) { return 1 } # String => 'keywords' # attribute => 'Keywords' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keywords')) { return 1 } # attribute => 'Preprocessor' # char => '#' # column => '0' # context => 'Preprocessor' # type => 'DetectChar' if ($self->testDetectChar($text, '#', 0, 0, 0, 0, 0, 'Preprocessor', 'Preprocessor')) { return 1 } # attribute => 'Floats' # context => '#stay' # items => 'ARRAY(0x19c5720)' # type => 'Float' if ($self->testFloat($text, 0, undef, 0, '#stay', 'Floats')) { # String => 'fFeE' # context => '#stay' # type => 'AnyChar' if ($self->testAnyChar($text, 'fFeE', 0, 0, undef, 0, '#stay', undef)) { return 1 } } # String => '0b[01]+' # attribute => 'Binary' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '0b[01]+', 0, 0, 0, undef, 0, '#stay', 'Binary')) { return 1 } # String => '0x[0-9a-fA-F]+' # attribute => 'Hexadecimal' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '0x[0-9a-fA-F]+', 0, 0, 0, undef, 0, '#stay', 'Hexadecimal')) { return 1 } # String => '0o[0-7]+' # attribute => 'Octal' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '0o[0-7]+', 0, 0, 0, undef, 0, '#stay', 'Octal')) { return 1 } # attribute => 'Integer' # context => '#stay' # type => 'Int' if ($self->testInt($text, 0, undef, 0, '#stay', 'Integer')) { return 1 } # String => '#'[^\t ][^\t ,);}\]/]*' # attribute => 'Closure' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '#\'[^\\t ][^\\t ,);}\\]/]*', 0, 0, 0, undef, 0, '#stay', 'Closure')) { return 1 } # attribute => 'Strings' # char => '"' # context => 'String1' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String1', 'Strings')) { return 1 } # attribute => 'Char' # context => '#stay' # type => 'HlCStringChar' if ($self->testHlCStringChar($text, 0, undef, 0, '#stay', 'Char')) { return 1 } # attribute => 'Default' # beginRegion => 'brace' # char => '{' # context => '#stay' # type => 'DetectChar' if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, '#stay', 'Default')) { return 1 } # attribute => 'Default' # char => '}' # context => '#stay' # endRegion => 'brace' # type => 'DetectChar' if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#stay', 'Default')) { return 1 } return 0; }; sub parsePreprocessor { my ($self, $text) = @_; # attribute => 'Preprocessor' # context => '#stay' # type => 'LineContinue' if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'Preprocessor')) { return 1 } # attribute => 'Single-Line comments' # char => '/' # char1 => '/' # context => 'Comment1' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'Comment1', 'Single-Line comments')) { return 1 } # attribute => 'Multi-Line comments' # beginRegion => 'blockComment' # char => '/' # char1 => '*' # context => 'Comment2' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'Comment2', 'Multi-Line comments')) { return 1 } # String => 'modifiers' # attribute => 'Modifier' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'modifiers', 0, undef, 0, '#stay', 'Modifier')) { return 1 } # String => 'types' # attribute => 'Datatype' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'types', 0, undef, 0, '#stay', 'Datatype')) { return 1 } # String => 'keywords' # attribute => 'Keywords' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keywords')) { return 1 } # attribute => 'Preprocessor-Strings' # char => '"' # context => 'String2' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String2', 'Preprocessor-Strings')) { return 1 } return 0; }; sub parseString1 { my ($self, $text) = @_; # attribute => 'Default' # context => '#stay' # type => 'LineContinue' if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'Default')) { return 1 } # attribute => 'Strings' # char => '\' # char1 => '\' # context => '#stay' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '\\', '\\', 0, 0, 0, undef, 0, '#stay', 'Strings')) { return 1 } # attribute => 'Strings' # char => '\' # char1 => '"' # context => '#stay' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '\\', '"', 0, 0, 0, undef, 0, '#stay', 'Strings')) { return 1 } # attribute => 'Strings' # char => '"' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'Strings')) { return 1 } return 0; }; sub parseString2 { my ($self, $text) = @_; # attribute => 'Default' # context => '#stay' # type => 'LineContinue' if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'Default')) { return 1 } # attribute => 'Preprocessor-Strings' # char => '\' # char1 => '\' # context => '#stay' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '\\', '\\', 0, 0, 0, undef, 0, '#stay', 'Preprocessor-Strings')) { return 1 } # attribute => 'Preprocessor-Strings' # char => '\' # char1 => '"' # context => '#stay' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '\\', '"', 0, 0, 0, undef, 0, '#stay', 'Preprocessor-Strings')) { return 1 } # attribute => 'Preprocessor-Strings' # char => '"' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'Preprocessor-Strings')) { return 1 } return 0; }; 1; __END__ =head1 NAME Syntax::Highlight::Engine::Kate::LPC - a Plugin for LPC syntax highlighting =head1 SYNOPSIS require Syntax::Highlight::Engine::Kate::LPC; my $sh = new Syntax::Highlight::Engine::Kate::LPC([ ]); =head1 DESCRIPTION Syntax::Highlight::Engine::Kate::LPC is a plugin module that provides syntax highlighting for LPC to the Syntax::Haghlight::Engine::Kate highlighting engine. This code is generated from the syntax definition files used by the Kate project. It works quite fine, but can use refinement and optimization. It inherits Syntax::Higlight::Engine::Kate::Template. See also there. =head1 AUTHOR Hans Jeuken (haje toneel demon nl) =head1 BUGS Unknown. If you find any, please contact the authorlibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/Engine/Kate/Makefile.pm0000644000175000017500000001760112150556557032047 0ustar gregoagregoa# Copyright (c) 2005 - 2006 Hans Jeuken. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. # This file was generated from the 'makefile.xml' file of the syntax highlight # engine of the kate text editor (http://www.kate-editor.org #kate xml version 1.06 #kate version 2.4 #kate author Per Wigren (wigren@home.se) #generated: Sun Feb 3 22:02:05 2008, localtime package Syntax::Highlight::Engine::Kate::Makefile; our $VERSION = '0.07'; use strict; use warnings; use base('Syntax::Highlight::Engine::Kate::Template'); sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = $class->SUPER::new(@_); $self->attributes({ 'Commands' => 'BaseN', 'Comment' => 'Comment', 'Keyword' => 'Keyword', 'Normal Text' => 'Normal', 'Operator' => 'Char', 'Section' => 'Others', 'Special' => 'Float', 'String' => 'String', 'Target' => 'DecVal', 'Variable' => 'DataType', }); $self->listAdd('keywords', 'define', 'else', 'endef', 'endif', 'ifdef', 'ifeq', 'ifndef', 'ifneq', 'include', ); $self->contextdata({ 'Commands' => { callback => \&parseCommands, attribute => 'Normal Text', lineending => '#pop', }, 'Normal' => { callback => \&parseNormal, attribute => 'Normal Text', }, 'String' => { callback => \&parseString, attribute => 'String', lineending => '#pop', }, 'Value' => { callback => \&parseValue, attribute => 'String', }, 'VarFromNormal' => { callback => \&parseVarFromNormal, attribute => 'Variable', }, 'VarFromValue' => { callback => \&parseVarFromValue, attribute => 'Variable', }, }); $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); $self->basecontext('Normal'); $self->keywordscase(0); $self->initialize; bless ($self, $class); return $self; } sub language { return 'Makefile'; } sub parseCommands { my ($self, $text) = @_; # String => '[$][\({]' # attribute => 'Operator' # context => 'VarFromNormal' # type => 'RegExpr' if ($self->testRegExpr($text, '[$][\\({]', 0, 0, 0, undef, 0, 'VarFromNormal', 'Operator')) { return 1 } # String => '[_\w-]*\b' # attribute => 'Commands' # context => '#pop' # type => 'RegExpr' if ($self->testRegExpr($text, '[_\\w-]*\\b', 0, 0, 0, undef, 0, '#pop', 'Commands')) { return 1 } return 0; }; sub parseNormal { my ($self, $text) = @_; # String => 'keywords' # attribute => 'Keyword' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '[_\w\d]*\s*(?=:=|=)' # attribute => 'Variable' # context => 'Value' # type => 'RegExpr' if ($self->testRegExpr($text, '[_\\w\\d]*\\s*(?=:=|=)', 0, 0, 0, undef, 0, 'Value', 'Variable')) { return 1 } # String => '[_\w\d-]*\s*:' # attribute => 'Target' # context => '#stay' # firstNonSpace => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '[_\\w\\d-]*\\s*:', 0, 0, 0, undef, 1, '#stay', 'Target')) { return 1 } # String => '^[.].*:' # attribute => 'Section' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^[.].*:', 0, 0, 0, undef, 0, '#stay', 'Section')) { return 1 } # attribute => 'String' # char => '"' # context => 'String' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) { return 1 } # String => '[$][\({]' # attribute => 'Operator' # context => 'VarFromNormal' # type => 'RegExpr' if ($self->testRegExpr($text, '[$][\\({]', 0, 0, 0, undef, 0, 'VarFromNormal', 'Operator')) { return 1 } # String => '+*=%$():\\;' # attribute => 'Operator' # context => '#stay' # type => 'AnyChar' if ($self->testAnyChar($text, '+*=%$():\\\\;', 0, 0, undef, 0, '#stay', 'Operator')) { return 1 } # String => '[@-]' # attribute => 'Operator' # context => 'Commands' # firstNonSpace => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '[@-]', 0, 0, 0, undef, 1, 'Commands', 'Operator')) { return 1 } # String => '(:^|[^\\])#.*$' # attribute => 'Comment' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '(:^|[^\\\\])#.*$', 0, 0, 0, undef, 0, '#stay', 'Comment')) { return 1 } return 0; }; sub parseString { my ($self, $text) = @_; # attribute => 'String' # context => '#stay' # type => 'LineContinue' if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'String')) { return 1 } # attribute => 'String' # char => '"' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) { return 1 } return 0; }; sub parseValue { my ($self, $text) = @_; # String => '\\$' # attribute => 'Operator' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\\\$', 0, 0, 0, undef, 0, '#stay', 'Operator')) { return 1 } # String => '[^\\]?$' # attribute => 'String' # context => '#pop' # type => 'RegExpr' if ($self->testRegExpr($text, '[^\\\\]?$', 0, 0, 0, undef, 0, '#pop', 'String')) { return 1 } # String => '[$][\({]' # attribute => 'Operator' # context => 'VarFromValue' # type => 'RegExpr' if ($self->testRegExpr($text, '[$][\\({]', 0, 0, 0, undef, 0, 'VarFromValue', 'Operator')) { return 1 } # String => '@[-_\d\w]*@' # attribute => 'Special' # context => '#pop' # type => 'RegExpr' if ($self->testRegExpr($text, '@[-_\\d\\w]*@', 0, 0, 0, undef, 0, '#pop', 'Special')) { return 1 } # attribute => 'Operator' # char => ';' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, ';', 0, 0, 0, undef, 0, '#pop', 'Operator')) { return 1 } return 0; }; sub parseVarFromNormal { my ($self, $text) = @_; # String => '[\)}]' # attribute => 'Operator' # context => '#pop' # type => 'RegExpr' if ($self->testRegExpr($text, '[\\)}]', 0, 0, 0, undef, 0, '#pop', 'Operator')) { return 1 } return 0; }; sub parseVarFromValue { my ($self, $text) = @_; # String => '[\)}](?=/)' # attribute => 'Operator' # context => '#pop' # type => 'RegExpr' if ($self->testRegExpr($text, '[\\)}](?=/)', 0, 0, 0, undef, 0, '#pop', 'Operator')) { return 1 } # String => '[\)}][^$]' # attribute => 'Operator' # context => '#pop' # type => 'RegExpr' if ($self->testRegExpr($text, '[\\)}][^$]', 0, 0, 0, undef, 0, '#pop', 'Operator')) { return 1 } # String => '[\)}]$' # attribute => 'Operator' # context => '#pop#pop' # type => 'RegExpr' if ($self->testRegExpr($text, '[\\)}]$', 0, 0, 0, undef, 0, '#pop#pop', 'Operator')) { return 1 } return 0; }; 1; __END__ =head1 NAME Syntax::Highlight::Engine::Kate::Makefile - a Plugin for Makefile syntax highlighting =head1 SYNOPSIS require Syntax::Highlight::Engine::Kate::Makefile; my $sh = new Syntax::Highlight::Engine::Kate::Makefile([ ]); =head1 DESCRIPTION Syntax::Highlight::Engine::Kate::Makefile is a plugin module that provides syntax highlighting for Makefile to the Syntax::Haghlight::Engine::Kate highlighting engine. This code is generated from the syntax definition files used by the Kate project. It works quite fine, but can use refinement and optimization. It inherits Syntax::Higlight::Engine::Kate::Template. See also there. =head1 AUTHOR Hans Jeuken (haje toneel demon nl) =head1 BUGS Unknown. If you find any, please contact the authorlibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/Engine/Kate/XML_Debug.pm0000644000175000017500000016611512150556557032105 0ustar gregoagregoa# Copyright (c) 2005 - 2006 Hans Jeuken. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. # This file was generated from the 'katexml/xmldebug.xml' file of the syntax highlight # engine of the kate text editor (http://kate.kde.org #kate xml version 1.02 #kate version 2.3 #generated: Wed Nov 1 21:17:55 2006, localtime package Syntax::Highlight::Engine::Kate::XML_Debug; our $VERSION = '0.07'; use strict; use warnings; use base('Syntax::Highlight::Engine::Kate::Template'); sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = $class->SUPER::new(@_); $self->attributes({ 'Attribute' => 'DataType', 'Comment' => 'Comment', 'Doctype Declaration' => 'Keyword', 'Entity' => 'Char', 'Error' => 'Error', 'Normal Tag' => 'Keyword', 'Normal Text' => 'Normal', 'PI content' => 'Others', 'Processing Instruction' => 'Keyword', 'Stylesheet' => 'Keyword', 'Value' => 'String', }); $self->listAdd('AttType', 'CDATA', 'ENTITIES', 'ENTITY', 'ID', 'IDREF', 'IDREFS', 'NMTOKEN', 'NMTOKENS', ); $self->contextdata({ '0:prolog' => { callback => \&parse0prolog, attribute => 'Error', }, '10:XMLDecl Standalone' => { callback => \&parse10XMLDeclStandalone, attribute => 'Error', }, '11:Misc after XMLDecl' => { callback => \&parse11MiscafterXMLDecl, attribute => 'Error', }, '12:Comment after XMLDecl' => { callback => \&parse12CommentafterXMLDecl, attribute => 'Comment', }, '13:PI after XMLDecl' => { callback => \&parse13PIafterXMLDecl, attribute => 'Processing Instruction Body', }, '14:Doctype Decl Name' => { callback => \&parse14DoctypeDeclName, attribute => 'Error', }, '15:Doctype Decl ExternalID' => { callback => \&parse15DoctypeDeclExternalID, attribute => 'Error', }, '16:Doctype Decl PublicID' => { callback => \&parse16DoctypeDeclPublicID, attribute => 'Error', }, '17:Doctype Decl PublicID qq' => { callback => \&parse17DoctypeDeclPublicIDqq, attribute => 'Error', }, '18:Doctype Decl PublicID q' => { callback => \&parse18DoctypeDeclPublicIDq, attribute => 'Value', }, '19:Doctype Decl SystemID' => { callback => \&parse19DoctypeDeclSystemID, attribute => 'Error', }, '1:XMLDecl Version' => { callback => \&parse1XMLDeclVersion, attribute => 'Error', }, '20:Doctype Decl SystemID qq' => { callback => \&parse20DoctypeDeclSystemIDqq, attribute => 'Value', }, '21:Doctype Decl SystemID q' => { callback => \&parse21DoctypeDeclSystemIDq, attribute => 'Value', }, '22:Doctype Decl IS or end' => { callback => \&parse22DoctypeDeclISorend, attribute => 'Error', }, '23:Doctype Decl IS' => { callback => \&parse23DoctypeDeclIS, attribute => 'Error', }, '24:elementdecl' => { callback => \&parse24elementdecl, attribute => 'Error', }, '25:contentspec' => { callback => \&parse25contentspec, attribute => 'Error', }, '26:MixedOrChildren' => { callback => \&parse26MixedOrChildren, attribute => 'Error', }, '27:MixedShort' => { callback => \&parse27MixedShort, attribute => 'Error', }, '28:MixedLong' => { callback => \&parse28MixedLong, attribute => 'Error', }, '29:MixedLong endOrContinue' => { callback => \&parse29MixedLongendOrContinue, attribute => 'Error', }, '2:XMLDecl Version Eq' => { callback => \&parse2XMLDeclVersionEq, attribute => 'Error', lineending => '5:XMLDecl Encoding Eq', }, '30:children unknown' => { callback => \&parse30childrenunknown, attribute => 'Error', }, '31:children unknownOrEnd' => { callback => \&parse31childrenunknownOrEnd, attribute => 'Error', }, '32:children unknownName' => { callback => \&parse32childrenunknownName, attribute => 'Error', }, '33:children choice' => { callback => \&parse33childrenchoice, attribute => 'Error', }, '34:children choiceOrEnd' => { callback => \&parse34childrenchoiceOrEnd, attribute => 'Error', }, '35:children seq' => { callback => \&parse35childrenseq, attribute => 'Error', }, '36:children seqOrEnd' => { callback => \&parse36childrenseqOrEnd, attribute => 'Error', }, '37:element end' => { callback => \&parse37elementend, attribute => 'Error', }, '38:AttlistDecl' => { callback => \&parse38AttlistDecl, attribute => 'Error', }, '39:AttDef' => { callback => \&parse39AttDef, attribute => 'Error', }, '3:XMLDecl Version' => { callback => \&parse3XMLDeclVersion, attribute => 'Error', }, '40:AttType' => { callback => \&parse40AttType, attribute => 'Error', }, '41:NotationStart' => { callback => \&parse41NotationStart, attribute => 'Error', }, '42:Notation' => { callback => \&parse42Notation, attribute => 'Error', }, '43:Notation or End' => { callback => \&parse43NotationorEnd, attribute => 'Error', }, '44:Enumeration' => { callback => \&parse44Enumeration, attribute => 'Error', }, '45:Enumeration or End' => { callback => \&parse45EnumerationorEnd, attribute => 'Error', }, '46:DefaultDecl' => { callback => \&parse46DefaultDecl, attribute => 'Error', }, '47:DefaultDecl AttValue' => { callback => \&parse47DefaultDeclAttValue, attribute => 'Error', }, '48:DefaultDecl AttValue qq' => { callback => \&parse48DefaultDeclAttValueqq, attribute => 'Value', }, '49:DefaultDecl AttValue q' => { callback => \&parse49DefaultDeclAttValueq, attribute => 'Value', }, '4:XMLDecl Encoding' => { callback => \&parse4XMLDeclEncoding, attribute => 'Error', }, '50:EntityDecl' => { callback => \&parse50EntityDecl, attribute => 'Error', }, '51:unused' => { callback => \&parse51unused, attribute => 'Error', }, '52:GEDecl EntityValueOrExternalID' => { callback => \&parse52GEDeclEntityValueOrExternalID, attribute => 'Error', }, '53:GEDecl EntityValue qq' => { callback => \&parse53GEDeclEntityValueqq, attribute => 'Value', }, '54:GEDecl EntityValue q' => { callback => \&parse54GEDeclEntityValueq, attribute => 'Value', }, '55:GEDecl PublicID' => { callback => \&parse55GEDeclPublicID, attribute => 'Error', }, '56:GEDecl PublicID qq' => { callback => \&parse56GEDeclPublicIDqq, attribute => 'Error', }, '57:GEDecl PublicID q' => { callback => \&parse57GEDeclPublicIDq, attribute => 'Value', }, '58:GEDecl SystemID' => { callback => \&parse58GEDeclSystemID, attribute => 'Error', }, '59:GEDecl SystemID qq' => { callback => \&parse59GEDeclSystemIDqq, attribute => 'Value', }, '5:XMLDecl Encoding Eq' => { callback => \&parse5XMLDeclEncodingEq, attribute => 'Error', }, '60:GEDecl SystemID q' => { callback => \&parse60GEDeclSystemIDq, attribute => 'Value', }, '61:PEDecl' => { callback => \&parse61PEDecl, attribute => 'Error', }, '62:PEDecl EntityValueOrExternalID' => { callback => \&parse62PEDeclEntityValueOrExternalID, attribute => 'Error', }, '63:PEDecl PublicID' => { callback => \&parse63PEDeclPublicID, attribute => 'Error', }, '64:PEDecl PublicID qq' => { callback => \&parse64PEDeclPublicIDqq, attribute => 'Error', }, '65:PEDecl PublicID q' => { callback => \&parse65PEDeclPublicIDq, attribute => 'Value', }, '66:PEDecl SystemID' => { callback => \&parse66PEDeclSystemID, attribute => 'Error', }, '67:PEDecl SystemID qq' => { callback => \&parse67PEDeclSystemIDqq, attribute => 'Value', }, '68:PEDecl SystemID q' => { callback => \&parse68PEDeclSystemIDq, attribute => 'Value', }, '69:GEDecl endOrNDATA' => { callback => \&parse69GEDeclendOrNDATA, attribute => 'Error', }, '6:XMLDecl Encoding' => { callback => \&parse6XMLDeclEncoding, attribute => 'Error', }, '70:GEDecl NDATA' => { callback => \&parse70GEDeclNDATA, attribute => 'Error', }, '71:NotationDecl Name' => { callback => \&parse71NotationDeclName, attribute => 'Error', }, '72:NotationDecl ExternalID' => { callback => \&parse72NotationDeclExternalID, attribute => 'Error', }, '73:NotationDecl PublicID' => { callback => \&parse73NotationDeclPublicID, attribute => 'Error', }, '74:NotationDecl PublicID qq' => { callback => \&parse74NotationDeclPublicIDqq, attribute => 'Error', }, '75:NotationDecl PublicID q' => { callback => \&parse75NotationDeclPublicIDq, attribute => 'Value', }, '76:NotationDecl SystemIDOrEnd' => { callback => \&parse76NotationDeclSystemIDOrEnd, attribute => 'Error', }, '77:Comment inside IS' => { callback => \&parse77CommentinsideIS, attribute => 'Comment', }, '78:PI inside IS' => { callback => \&parse78PIinsideIS, attribute => 'Processing Instruction Body', }, '79:Outside' => { callback => \&parse79Outside, attribute => 'Normal Text', }, '7:XMLDecl Standalone' => { callback => \&parse7XMLDeclStandalone, attribute => 'Error', }, '80:STag' => { callback => \&parse80STag, attribute => 'Error', }, '81:STag Attribute' => { callback => \&parse81STagAttribute, attribute => 'Error', }, '82:STag Attribute Value' => { callback => \&parse82STagAttributeValue, attribute => 'Error', }, '83:STag Value qq' => { callback => \&parse83STagValueqq, attribute => 'Value', }, '84:STag Value q' => { callback => \&parse84STagValueq, attribute => 'Value', }, '85:ETag' => { callback => \&parse85ETag, attribute => 'Error', }, '86:CDSect' => { callback => \&parse86CDSect, attribute => 'Normal Text', }, '87:Comment inside IS' => { callback => \&parse87CommentinsideIS, attribute => 'Comment', }, '88:PI inside IS' => { callback => \&parse88PIinsideIS, attribute => 'Processing Instruction Body', }, '8:XMLDecl Standalone Eq' => { callback => \&parse8XMLDeclStandaloneEq, attribute => 'Error', }, '9:XMLDecl Standalone' => { callback => \&parse9XMLDeclStandalone, attribute => 'Error', }, }); $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); $self->basecontext('0:prolog'); $self->keywordscase(1); $self->initialize; bless ($self, $class); return $self; } sub language { return 'XML (Debug)'; } sub parse0prolog { my ($self, $text) = @_; # type => RegExpr if ($self->testRegExpr($text, '<\\?xml(\\s+|$)', 0, 0, 0, undef, 0, '1:XMLDecl Version', 'Doctype Declaration')) { return 1 } return 0; }; sub parse10XMLDeclStandalone { my ($self, $text) = @_; # type => RegExpr if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Doctype Declaration')) { return 1 } # type => RegExpr if ($self->testRegExpr($text, '\\?>', 0, 0, 0, undef, 0, '11:Misc after XMLDecl', 'Doctype Declaration')) { return 1 } return 0; }; sub parse11MiscafterXMLDecl { my ($self, $text) = @_; # type => RegExpr if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { return 1 } # type => RegExpr if ($self->testRegExpr($text, '\\s*', 0, 0, 0, undef, 0, '#pop', 'Error')) { return 1 } # type => RegExpr if ($self->testRegExpr($text, '-->', 0, 0, 0, undef, 0, '#pop', 'Comment')) { return 1 } # type => Detect2Chars if ($self->testDetect2Chars($text, '-', '-', 0, 0, 0, undef, 0, '#stay', 'Error')) { return 1 } return 0; }; sub parse13PIafterXMLDecl { my ($self, $text) = @_; # type => Detect2Chars if ($self->testDetect2Chars($text, '?', '>', 0, 0, 0, undef, 0, '#pop', 'Processing Instruction')) { return 1 } return 0; }; sub parse14DoctypeDeclName { my ($self, $text) = @_; # type => RegExpr if ($self->testRegExpr($text, '(?![٠-٩۰-۹०-९০-৯੦-੯૦-૯୦-୯௧-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩]|\\d)(\\w|[_:])(\\w|[_:.-])*(\\s+|$)', 0, 0, 0, undef, 0, '15:Doctype Decl ExternalID', 'Doctype Declaration')) { return 1 } # type => RegExpr if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Doctype Declaration')) { return 1 } return 0; }; sub parse15DoctypeDeclExternalID { my ($self, $text) = @_; # type => RegExpr if ($self->testRegExpr($text, 'PUBLIC(\\s+|$)', 0, 0, 0, undef, 0, '16:Doctype Decl PublicID', 'Doctype Declaration')) { return 1 } # type => RegExpr if ($self->testRegExpr($text, 'SYSTEM(\\s+|$)', 0, 0, 0, undef, 0, '19:Doctype Decl SystemID', 'Doctype Declaration')) { return 1 } # type => DetectChar if ($self->testDetectChar($text, '[', 0, 0, 0, undef, 0, '23:Doctype Decl IS', 'Doctype Declaration')) { return 1 } # type => DetectChar if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '23:Doctype Decl IS', 'Doctype Declaration')) { return 1 } # type => RegExpr if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Doctype Declaration')) { return 1 } return 0; }; sub parse16DoctypeDeclPublicID { my ($self, $text) = @_; # type => DetectChar if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '17:Doctype Decl PublicID qq', 'Value')) { return 1 } # type => DetectChar if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '18:Doctype Decl PublicID q', 'Value')) { return 1 } # type => RegExpr if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Doctype Declaration')) { return 1 } return 0; }; sub parse17DoctypeDeclPublicIDqq { my ($self, $text) = @_; # type => DetectChar if ($self->testDetectChar($text, '"(\\s+|$)', 0, 0, 0, undef, 0, '19:Doctype Decl SystemID', 'Value')) { return 1 } # type => RegExpr if ($self->testRegExpr($text, '[ a-zA-Z0-9\'()+,./:=?;!*#@$_%-]', 0, 0, 0, undef, 0, '#stay', 'Value')) { return 1 } return 0; }; sub parse18DoctypeDeclPublicIDq { my ($self, $text) = @_; # type => DetectChar if ($self->testDetectChar($text, '\'(\\s+|$)', 0, 0, 0, undef, 0, '19:Doctype Decl SystemID', 'Value')) { return 1 } # type => RegExpr if ($self->testRegExpr($text, '[ a-zA-Z0-9()+,./:=?;!*#@$_%-]', 0, 0, 0, undef, 0, '#stay', 'Value')) { return 1 } return 0; }; sub parse19DoctypeDeclSystemID { my ($self, $text) = @_; # type => DetectChar if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '20:Doctype Decl SystemID qq', 'Value')) { return 1 } # type => DetectChar if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '21:Doctype Decl SystemID q', 'Value')) { return 1 } # type => RegExpr if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Doctype Declaration')) { return 1 } return 0; }; sub parse1XMLDeclVersion { my ($self, $text) = @_; # type => RegExpr if ($self->testRegExpr($text, '\\s*version\\s*', 0, 0, 0, undef, 0, '2:XMLDecl Version Eq', 'Attribute')) { return 1 } # type => RegExpr if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Doctype Declaration')) { return 1 } return 0; }; sub parse20DoctypeDeclSystemIDqq { my ($self, $text) = @_; # type => DetectChar if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '22:Doctype Decl IS or end', 'Value')) { return 1 } return 0; }; sub parse21DoctypeDeclSystemIDq { my ($self, $text) = @_; # type => DetectChar if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '22:Doctype Decl IS or end', 'Value')) { return 1 } return 0; }; sub parse22DoctypeDeclISorend { my ($self, $text) = @_; # type => DetectChar if ($self->testDetectChar($text, '[', 0, 0, 0, undef, 0, '23:Doctype Decl IS', 'Doctype Declaration')) { return 1 } # type => DetectChar if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '79:Outside', 'Doctype Declaration')) { return 1 } # type => RegExpr if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Doctype Declaration')) { return 1 } return 0; }; sub parse23DoctypeDeclIS { my ($self, $text) = @_; # type => RegExpr if ($self->testRegExpr($text, '%(?![٠-٩۰-۹०-९০-৯੦-੯૦-૯୦-୯௧-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩]|\\d)(\\w|[_:])(\\w|[_:.-])*;', 0, 0, 0, undef, 0, '#stay', 'Entity')) { return 1 } # type => RegExpr if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Doctype Declaration')) { return 1 } # type => RegExpr if ($self->testRegExpr($text, ' RegExpr if ($self->testRegExpr($text, ' RegExpr if ($self->testRegExpr($text, ' RegExpr if ($self->testRegExpr($text, ' RegExpr if ($self->testRegExpr($text, '\\s*', 0, 0, 0, undef, 0, '23:Doctype Decl IS', 'Error')) { return 1 } # type => RegExpr if ($self->testRegExpr($text, '-->', 0, 0, 0, undef, 0, '23:Doctype Decl IS', 'Comment')) { return 1 } # type => Detect2Chars if ($self->testDetect2Chars($text, '-', '-', 0, 0, 0, undef, 0, '#stay', 'Error')) { return 1 } return 0; }; sub parse78PIinsideIS { my ($self, $text) = @_; # type => Detect2Chars if ($self->testDetect2Chars($text, '?', '>', 0, 0, 0, undef, 0, '23:Doctype Decl IS', 'Processing Instruction')) { return 1 } return 0; }; sub parse79Outside { my ($self, $text) = @_; # type => RegExpr if ($self->testRegExpr($text, '<[xX][mM][lL](\\w|[_.-])*(:(\\w|[_.-])+)?', 0, 0, 0, undef, 0, '80:STag', 'Error')) { return 1 } # type => RegExpr if ($self->testRegExpr($text, '<(?![٠-٩۰-۹०-९০-৯੦-੯૦-૯୦-୯௧-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩]|\\d)(\\w|_)(\\w|[_.-])*(:(\\w|[_.-])+)?', 0, 0, 0, undef, 0, '80:STag', 'Normal Tag')) { return 1 } # type => RegExpr if ($self->testRegExpr($text, '<(?![٠-٩۰-۹०-९০-৯੦-੯૦-૯୦-୯௧-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩]|\\d)(\\w|[:_])(\\w|[:_.-])*', 0, 0, 0, undef, 0, '80:STag', 'Error')) { return 1 } # type => RegExpr if ($self->testRegExpr($text, ' RegExpr if ($self->testRegExpr($text, ' RegExpr if ($self->testRegExpr($text, ' RegExpr if ($self->testRegExpr($text, '&(?![٠-٩۰-۹०-९০-৯੦-੯૦-૯୦-୯௧-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩]|\\d)(\\w|[_:])(\\w|[_:.-])*;', 0, 0, 0, undef, 0, '#stay', 'Entity')) { return 1 } # type => RegExpr if ($self->testRegExpr($text, '&#(x[0-9a-fA-F]+|[0-9]+);', 0, 0, 0, undef, 0, '#stay', 'Entity')) { return 1 } # type => RegExpr if ($self->testRegExpr($text, ' RegExpr if ($self->testRegExpr($text, '', 0, 0, 0, undef, 0, '79:Outside', 'Error')) { return 1 } # type => RegExpr if ($self->testRegExpr($text, '-->', 0, 0, 0, undef, 0, '79:Outside', 'Comment')) { return 1 } # type => Detect2Chars if ($self->testDetect2Chars($text, '-', '-', 0, 0, 0, undef, 0, '#stay', 'Error')) { return 1 } return 0; }; sub parse88PIinsideIS { my ($self, $text) = @_; # type => Detect2Chars if ($self->testDetect2Chars($text, '?', '>', 0, 0, 0, undef, 0, '79:Outside', 'Processing Instruction')) { return 1 } return 0; }; sub parse8XMLDeclStandaloneEq { my ($self, $text) = @_; # type => RegExpr if ($self->testRegExpr($text, '\\s*=\\s*', 0, 0, 0, undef, 0, '9:XMLDecl Standalone', 'Attribute')) { return 1 } # type => RegExpr if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Attribute')) { return 1 } return 0; }; sub parse9XMLDeclStandalone { my ($self, $text) = @_; # type => RegExpr if ($self->testRegExpr($text, '\\s*"(yes|no)"|\'(yes|no)\'\\s*', 0, 0, 0, undef, 0, '10:XMLDecl Standalone', 'Value')) { return 1 } # type => RegExpr if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Attribute')) { return 1 } return 0; }; 1; __END__ =head1 NAME Syntax::Highlight::Engine::Kate::XML_Debug - a Plugin for XML (Debug) syntax highlighting =head1 SYNOPSIS require Syntax::Highlight::Engine::Kate::XML_Debug; my $sh = new Syntax::Highlight::Engine::Kate::XML_Debug([ ]); =head1 DESCRIPTION Syntax::Highlight::Engine::Kate::XML_Debug is a plugin module that provides syntax highlighting for XML (Debug) to the Syntax::Haghlight::Engine::Kate highlighting engine. This code is generated from the syntax definition files used by the Kate project. It works quite fine, but can use refinement and optimization. It inherits Syntax::Higlight::Engine::Kate::Template. See also there. =head1 AUTHOR Hans Jeuken (haje toneel demon nl) =head1 BUGS Unknown. If you find any, please contact the authorlibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/Engine/Kate/RSI_IDL.pm0000644000175000017500000003277712150556557031472 0ustar gregoagregoa# Copyright (c) 2005 - 2006 Hans Jeuken. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. # This file was generated from the 'rsiidl.xml' file of the syntax highlight # engine of the kate text editor (http://www.kate-editor.org #kate xml version 1.04 #kate version 2.1 #kate author Markus Fraenz (fraenz@linmpi.mpg.de) #generated: Sun Feb 3 22:02:06 2008, localtime package Syntax::Highlight::Engine::Kate::RSI_IDL; our $VERSION = '0.07'; use strict; use warnings; use base('Syntax::Highlight::Engine::Kate::Template'); sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = $class->SUPER::new(@_); $self->attributes({ 'Char' => 'Char', 'Command' => 'BaseN', 'Comment' => 'Comment', 'Data Type' => 'DataType', 'Decimal' => 'DecVal', 'Float' => 'DecVal', 'Hex' => 'DecVal', 'IOCommand' => 'DataType', 'Keyword' => 'Keyword', 'Normal Text' => 'Normal', 'Octal' => 'DecVal', 'String' => 'String', 'String Char' => 'Char', 'bracketed' => 'Float', }); $self->listAdd('commands', 'ABS', 'ACOS', 'ADAPT_HIST_EQUAL', 'ALOG', 'ALOG10', 'ARG_PRESENT', 'ASIN', 'ASSOC', 'ATAN', 'AXIS', 'BESELI', 'BESELJ', 'BESELY', 'BLAS_AXPY', 'BREAKPOINT', 'BROYDEN', 'BYTEORDER', 'CALL_EXTERNAL', 'CALL_FUNCTION', 'CALL_METHOD', 'CALL_PROCEDURE', 'CATCH', 'CEIL', 'CHECK_MATH', 'CHOLDC', 'CHOLSOL', 'COLOR_CONVERT', 'COLOR_QUAN', 'COMPILE_OPT', 'COMPUTE_MESH_NORMALS', 'CONJ', 'CONSTRAINED_MIN', 'CONTOUR', 'CONVERT_COORD', 'CONVOL', 'CORRELATE', 'COS', 'COSH', 'CREATE_STRUCT', 'CURSOR', 'DEFINE_KEY', 'DEFSYSV', 'DELVAR', 'DEVICE', 'DFPMIN', 'DIALOG_MESSAGE', 'DIALOG_PICKFILE', 'DIALOG_PRINTERSETUP', 'DIALOG_PRINTJOB', 'DILATE', 'DLM_LOAD', 'DRAW_ROI', 'ELMHES', 'EMPTY', 'ENABLE_SYSRTN', 'ERASE', 'ERODE', 'ERRORF', 'EXECUTE', 'EXIT', 'EXP', 'EXPAND_PATH', 'EXPINT', 'FINDFILE', 'FINITE', 'FLOOR', 'FORMAT_AXIS_VALUES', 'FORWARD_FUNCTION', 'FSTAT', 'FULSTR', 'FZ_ROOTS', 'GAUSSINT', 'GETENV', 'GET_KBRD', 'GRID3', 'GRID_TPS', 'HEAP_GC', 'HELP', 'HISTOGRAM', 'HQR', 'IMAGE_STATISTICS', 'IMAGINARY', 'INTERPOLATE', 'INVERT', 'ISHFT', 'ISOCONTOUR', 'ISOSURFACE', 'JOURNAL', 'KEYWORD_SET', 'LABEL_REGION', 'LINBCG', 'LINKIMAGE', 'LMGR', 'LNGAMMA', 'LNP_TEST', 'LOADCT', 'LOCALE_GET', 'LSODE', 'LUDC', 'LUMPROVE', 'LUSOL', 'MACHAR', 'MAKE_ARRAY', 'MAP_PROJ_INFO', 'MAX', 'MEDIAN', 'MESH_CLIP', 'MESH_DECIMATE', 'MESH_ISSOLID', 'MESH_MERGE', 'MESH_NUMTRIANGLES', 'MESH_SMOOTH', 'MESH_SURFACEAREA', 'MESH_VALIDATE', 'MESH_VOLUME', 'MESSAGE', 'MIN', 'NEWTON', 'N_ELEMENTS', 'N_PARAMS', 'N_TAGS', 'OBJ_CLASS', 'OBJ_DESTROY', 'OBJ_ISA', 'OBJ_NEW', 'OBJ_VALID', 'ON_ERROR', 'OPLOT', 'PARTICLE_TRACE', 'PLOT', 'PLOTS', 'POLYFILL', 'POLYFILLV', 'POLYSHADE', 'POLY_2D', 'POWELL', 'PROFILER', 'PTR_FREE', 'PTR_NEW', 'PTR_VALID', 'QROMB', 'QROMO', 'QSIMP', 'RANDOMN', 'RANDOMU', 'REBIN', 'REFORM', 'RETALL', 'RETURN', 'RIEMANN', 'RK4', 'ROBERTS', 'ROTATE', 'ROUND', 'SETENV', 'SET_PLOT', 'SET_SHADING', 'SHADE_SURF', 'SHADE_VOLUME', 'SHIFT', 'SIN', 'SINH', 'SIZE', 'SMOOTH', 'SOBEL', 'SORT', 'SPL_INIT', 'SPL_INTERP', 'SPRSAB', 'SPRSAX', 'SPRSIN', 'SQRT', 'STOP', 'STRCMP', 'STRCOMPRESS', 'STREGEX', 'STRJOIN', 'STRLEN', 'STRLOWCASE', 'STRMATCH', 'STRMESSAGE', 'STRMID', 'STRPOS', 'STRPUT', 'STRTRIM', 'STRUCT_ASSIGN', 'STRUCT_HIDE', 'STRUPCASE', 'SURFACE', 'SVDC', 'SVSOL', 'SYSTIME', 'TAG_NAMES', 'TAN', 'TANH', 'TEMPORARY', 'TETRA_CLIP', 'TETRA_SURFACE', 'TETRA_VOLUME', 'THIN', 'THREED', 'TOTAL', 'TRANSPOSE', 'TRIANGULATE', 'TRIGRID', 'TRIQL', 'TRIRED', 'TRISOL', 'TV', 'TVCRS', 'TVLCT', 'TVRD', 'TVSCLU', 'USERSYM', 'VALUE_LOCATE', 'VOIGT', 'VOXEL_PROJ', 'WAIT', 'WATERSHED', 'WDELETE', 'WHERE', 'WIDGET_BASE', 'WIDGET_BUTTON', 'WIDGET_CONTROL', 'WIDGET_DRAW', 'WIDGET_DROPLIST', 'WIDGET_EVENT', 'WIDGET_INFO', 'WIDGET_LABEL', 'WIDGET_LIST', 'WIDGET_SLIDER', 'WIDGET_TABLE', 'WIDGET_TEXT', 'WINDOW', 'WSET', 'WSHOW', 'WTN', 'XYOUTS', ); $self->listAdd('io commands', 'Close', 'FLUSH', 'Free_lun', 'IOCTL', 'Open', 'Openr', 'Openu', 'Openw', 'POINT_LUN', 'RESTORE', 'SAVE', 'assoc', 'catch', 'cd', 'eof', 'get_lun', 'print', 'printf', 'prints', 'read', 'readf', 'reads', 'spawn', 'writu', ); $self->listAdd('reserved words', 'And', 'Begin', 'Case', 'Common', 'Do', 'Else', 'End', 'Endcase', 'Endelse', 'Endfor', 'Endif', 'Endrep', 'Endwhile', 'Eq', 'For', 'Function', 'Ge', 'Goto', 'Gt', 'If', 'Le', 'Lt', 'Mod', 'Ne', 'Not', 'Of', 'On_ioerror', 'Or', 'Pro', 'Repeat', 'Return', 'Then', 'Then', 'Until', 'While', 'Xor', ); $self->listAdd('system variables', 'c', 'd', 'dir', 'dlm_path', 'dpi', 'dtor', 'edit_input', 'err', 'err_string', 'error', 'error_state', 'except', 'help_path', 'journal', 'map', 'more', 'mouse', 'msg_prefix', 'order', 'p', 'path', 'pi', 'prompt', 'quiet', 'radeg', 'stime', 'syserr_string', 'syserror', 'values', 'version', 'warn', 'x', 'y', 'z', ); $self->listAdd('types', 'Bytarr', 'Byte', 'Bytscl', 'Dblarr', 'Dcindgen', 'Dindgen', 'Double', 'Findgen', 'Fix', 'Float', 'Fltarr', 'Indgen', 'Intarr', 'Long', 'Long64', 'Objarr', 'Ptrarr', 'Replicate', 'Strarr', 'String', 'bindgen', 'cindgen', 'complex', 'complexarr', 'dcomplex', 'dcomplexarr', 'l64indgen', 'lindgen', 'lon64arr', 'lonarr', 'sindgen', 'uindgen', 'uint', 'uintarr', 'ul64indgen', 'ulindgen', 'ulon64arr', 'ulonarr', 'ulong', ); $self->contextdata({ 'Comment' => { callback => \&parseComment, attribute => 'Comment', lineending => '#pop', }, 'Normal' => { callback => \&parseNormal, attribute => 'Normal Text', }, 'systemvarcontext' => { callback => \&parsesystemvarcontext, attribute => 'Char', lineending => '#pop', }, }); $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); $self->basecontext('Normal'); $self->keywordscase(0); $self->initialize; bless ($self, $class); return $self; } sub language { return 'RSI IDL'; } sub parseComment { my ($self, $text) = @_; return 0; }; sub parseNormal { my ($self, $text) = @_; # String => 'reserved words' # attribute => 'Keyword' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'reserved words', 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'types' # attribute => 'Data Type' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'types', 0, undef, 0, '#stay', 'Data Type')) { return 1 } # String => 'commands' # attribute => 'Command' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'commands', 0, undef, 0, '#stay', 'Command')) { return 1 } # String => 'io commands' # attribute => 'IOCommand' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'io commands', 0, undef, 0, '#stay', 'IOCommand')) { return 1 } # attribute => 'Octal' # context => '#stay' # type => 'Float' if ($self->testFloat($text, 0, undef, 0, '#stay', 'Octal')) { return 1 } # attribute => 'Decimal' # context => '#stay' # type => 'Int' if ($self->testInt($text, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # attribute => 'String' # char => ''' # char1 => ''' # context => '#stay' # type => 'RangeDetect' if ($self->testRangeDetect($text, '\'', '\'', 0, 0, undef, 0, '#stay', 'String')) { return 1 } # attribute => 'String' # char => '"' # char1 => '"' # context => '#stay' # type => 'RangeDetect' if ($self->testRangeDetect($text, '"', '"', 0, 0, undef, 0, '#stay', 'String')) { return 1 } # attribute => 'Hex' # char => '(' # context => '#stay' # type => 'DetectChar' if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, '#stay', 'Hex')) { return 1 } # attribute => 'Hex' # char => ')' # context => '#stay' # type => 'DetectChar' if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#stay', 'Hex')) { return 1 } # attribute => 'Char' # char => '[' # context => '#stay' # type => 'DetectChar' if ($self->testDetectChar($text, '[', 0, 0, 0, undef, 0, '#stay', 'Char')) { return 1 } # attribute => 'Char' # char => ']' # context => '#stay' # type => 'DetectChar' if ($self->testDetectChar($text, ']', 0, 0, 0, undef, 0, '#stay', 'Char')) { return 1 } # attribute => 'Float' # char => '{' # context => '#stay' # type => 'DetectChar' if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, '#stay', 'Float')) { return 1 } # attribute => 'Float' # char => '}' # context => '#stay' # type => 'DetectChar' if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#stay', 'Float')) { return 1 } # attribute => 'Char' # char => '$' # context => '#stay' # type => 'DetectChar' if ($self->testDetectChar($text, '$', 0, 0, 0, undef, 0, '#stay', 'Char')) { return 1 } # attribute => 'Char' # char => '@' # context => '#stay' # type => 'DetectChar' if ($self->testDetectChar($text, '@', 0, 0, 0, undef, 0, '#stay', 'Char')) { return 1 } # attribute => 'Char' # char => ':' # context => '#stay' # type => 'DetectChar' if ($self->testDetectChar($text, ':', 0, 0, 0, undef, 0, '#stay', 'Char')) { return 1 } # attribute => 'Char' # char => ';' # context => 'Comment' # type => 'DetectChar' if ($self->testDetectChar($text, ';', 0, 0, 0, undef, 0, 'Comment', 'Char')) { return 1 } # attribute => 'Char' # char => '!' # context => 'systemvarcontext' # type => 'DetectChar' if ($self->testDetectChar($text, '!', 0, 0, 0, undef, 0, 'systemvarcontext', 'Char')) { return 1 } return 0; }; sub parsesystemvarcontext { my ($self, $text) = @_; # attribute => 'Hex' # char => '(' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, '#pop', 'Hex')) { return 1 } # attribute => 'Char' # char => '.' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '.', 0, 0, 0, undef, 0, '#pop', 'Char')) { return 1 } # attribute => 'Hex' # char => ' ' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, ' ', 0, 0, 0, undef, 0, '#pop', 'Hex')) { return 1 } # String => 'system variables' # attribute => 'Float' # context => '#pop' # type => 'keyword' if ($self->testKeyword($text, 'system variables', 0, undef, 0, '#pop', 'Float')) { return 1 } return 0; }; 1; __END__ =head1 NAME Syntax::Highlight::Engine::Kate::RSI_IDL - a Plugin for RSI IDL syntax highlighting =head1 SYNOPSIS require Syntax::Highlight::Engine::Kate::RSI_IDL; my $sh = new Syntax::Highlight::Engine::Kate::RSI_IDL([ ]); =head1 DESCRIPTION Syntax::Highlight::Engine::Kate::RSI_IDL is a plugin module that provides syntax highlighting for RSI IDL to the Syntax::Haghlight::Engine::Kate highlighting engine. This code is generated from the syntax definition files used by the Kate project. It works quite fine, but can use refinement and optimization. It inherits Syntax::Higlight::Engine::Kate::Template. See also there. =head1 AUTHOR Hans Jeuken (haje toneel demon nl) =head1 BUGS Unknown. If you find any, please contact the authorlibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/Engine/Kate/TaskJuggler.pm0000644000175000017500000003317512150556557032560 0ustar gregoagregoa# Copyright (c) 2005 - 2006 Hans Jeuken. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. # This file was generated from the 'taskjuggler.xml' file of the syntax highlight # engine of the kate text editor (http://www.kate-editor.org #kate xml version 1.21 #kate version 2.1 #generated: Sun Feb 3 22:02:06 2008, localtime package Syntax::Highlight::Engine::Kate::TaskJuggler; our $VERSION = '0.07'; use strict; use warnings; use base('Syntax::Highlight::Engine::Kate::Template'); sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = $class->SUPER::new(@_); $self->attributes({ 'Builtin Function' => 'Function', 'Char' => 'Char', 'Comment' => 'Comment', 'Data Types' => 'DataType', 'Decimal' => 'DecVal', 'Float' => 'Float', 'Hex' => 'BaseN', 'Keyword' => 'Keyword', 'Normal Text' => 'Normal', 'Octal' => 'BaseN', 'String' => 'String', 'String Char' => 'Char', 'Symbol' => 'Normal', }); $self->listAdd('builtinfuncs', 'accountid', 'accountreport', 'accumulate', 'allocate', 'allowredefinitions', 'alternative', 'barlabels', 'booking', 'caption', 'celltext', 'cellurl', 'columns', 'complete', 'completed', 'copyright', 'cost', 'credit', 'criticalness', 'csvaccountreport', 'csvresourcereport', 'csvtaskreport', 'currency', 'currencydigits', 'currencyformat', 'dailymax', 'dailyworkinghours', 'db', 'depends', 'disabled', 'duration', 'efficiency', 'effort', 'empty', 'end', 'endbuffer', 'endbufferstart', 'endcredit', 'endsAfter', 'endsBefore', 'export', 'extend', 'finished', 'flags', 'follows', 'freeload', 'gapduration', 'gaplength', 'headline', 'hideaccount', 'hidecelltext', 'hidecellurl', 'hideresource', 'hidetask', 'hierarchindex', 'hierarchno', 'htmlaccountreport', 'htmlresourcereport', 'htmlstatusreport', 'htmltaskreport', 'htmlweeklycalendar', 'id', 'include', 'index', 'inherit', 'inprogress', 'journalentry', 'kotrusid', 'kotrusmode', 'label', 'late', 'length', 'limits', 'load', 'loadunit', 'macro', 'mandatory', 'maxeffort', 'maxend', 'maxstart', 'milestone', 'mineffort', 'minend', 'minstart', 'monthlymax', 'name', 'no', 'nokotrus', 'note', 'notimestamp', 'notstarted', 'now', 'numberformat', 'ontime', 'optimize', 'order', 'pathcriticalness', 'persistent', 'precedes', 'priority', 'profit', 'projectid', 'projectids', 'projection', 'rate', 'rawhead', 'rawstylesheet', 'rawtail', 'reference', 'resourceid', 'resourcereport', 'resources', 'responsibilities', 'responsible', 'revenue', 'rollupaccount', 'rollupresource', 'rolluptask', 'scenario', 'scenarios', 'schedule', 'scheduled', 'scheduling', 'select', 'separator', 'seqno', 'shorttimeformat', 'showprojectids', 'sortaccounts', 'sortresources', 'sorttasks', 'start', 'startbuffer', 'startbufferend', 'startcredit', 'startsAfter', 'startsBefore', 'status', 'statusnote', 'subtitle', 'subtitleurl', 'supplement', 'table', 'taskattributes', 'taskid', 'taskprefix', 'taskreport', 'taskroot', 'text', 'timeformat', 'timezone', 'timingresolution', 'title', 'titleurl', 'total', 'tree', 'treeLevel', 'url', 'utilization', 'vacation', 'version', 'weeklymax', 'weekstartsmonday', 'weekstartssunday', 'workinghours', 'xml', 'xmlreport', 'yearlyworkingdays', ); $self->listAdd('keywords', 'account', 'project', 'resource', 'scenario', 'shift', 'task', ); $self->listAdd('types', 'alap', 'all', 'asap', 'completeddown', 'completedup', 'containstask', 'criticalnessdown', 'criticalnessup', 'd', 'daily', 'day', 'days', 'enddown', 'endup', 'fri', 'fullnamedown', 'fullnameup', 'h', 'hours', 'iddown', 'idup', 'indexdown', 'indexup', 'inprogressearly', 'inprogresslate', 'isAResource', 'isATask', 'isAccount', 'isAllocated', 'isAllocatedToProject', 'isAnAccount', 'isChildOf', 'isDutyOf', 'isLeaf', 'isMilestone', 'isParentOf', 'isResource', 'isTask', 'isTaskOfProject', 'isTaskStatus', 'isactualallocated', 'isatask', 'isplanallocated', 'issubtaskof', 'kotrusiddown', 'kotrusidup', 'longauto', 'm', 'maxeffortdown', 'maxeffortup', 'maxloaded', 'min', 'minallocated', 'mineffortdown', 'mineffortup', 'minloaded', 'minutes', 'mon', 'month', 'monthly', 'months', 'namedown', 'nameup', 'off', 'pathcriticalnessdown', 'pathcriticalnessup', 'prioritydown', 'priorityup', 'quarter', 'quarterly', 'random', 'ratedown', 'rateup', 'responsibledown', 'responsibleup', 'sat', 'sequencedown', 'sequenceup', 'shortauto', 'startdown', 'startup', 'statusdown', 'statusup', 'sun', 'thu', 'tue', 'undefined', 'w', 'wed', 'week', 'weekly', 'weeks', 'y', 'year', 'yearly', 'years', ); $self->contextdata({ 'Comment1' => { callback => \&parseComment1, attribute => 'Comment', lineending => '#pop', }, 'Comment2' => { callback => \&parseComment2, attribute => 'Comment', }, 'Normal' => { callback => \&parseNormal, attribute => 'Normal Text', }, 'String1' => { callback => \&parseString1, attribute => 'String', }, 'String2' => { callback => \&parseString2, attribute => 'String', }, }); $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); $self->basecontext('Normal'); $self->keywordscase(0); $self->initialize; bless ($self, $class); return $self; } sub language { return 'TaskJuggler'; } sub parseComment1 { my ($self, $text) = @_; # context => '##Alerts' # type => 'IncludeRules' if ($self->includePlugin('Alerts', $text)) { return 1 } return 0; }; sub parseComment2 { my ($self, $text) = @_; # attribute => 'Comment' # char => '*' # char1 => '/' # context => '#pop' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop', 'Comment')) { return 1 } return 0; }; sub parseNormal { my ($self, $text) = @_; # String => 'builtinfuncs' # attribute => 'Builtin Function' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'builtinfuncs', 0, undef, 0, '#stay', 'Builtin Function')) { return 1 } # String => 'keywords' # attribute => 'Keyword' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'types' # attribute => 'Data Types' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'types', 0, undef, 0, '#stay', 'Data Types')) { return 1 } # attribute => 'Symbol' # beginRegion => 'Brace2' # char => '{' # context => '#stay' # type => 'DetectChar' if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, '#stay', 'Symbol')) { return 1 } # attribute => 'Symbol' # char => '}' # context => '#stay' # endRegion => 'Brace2' # type => 'DetectChar' if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#stay', 'Symbol')) { return 1 } # attribute => 'Symbol' # beginRegion => 'Brace1' # char => '[' # context => '#stay' # type => 'DetectChar' if ($self->testDetectChar($text, '[', 0, 0, 0, undef, 0, '#stay', 'Symbol')) { return 1 } # attribute => 'Symbol' # char => ']' # context => '#stay' # endRegion => 'Brace1' # type => 'DetectChar' if ($self->testDetectChar($text, ']', 0, 0, 0, undef, 0, '#stay', 'Symbol')) { return 1 } # attribute => 'Float' # context => '#stay' # items => 'ARRAY(0x1782620)' # type => 'Float' if ($self->testFloat($text, 0, undef, 0, '#stay', 'Float')) { # String => 'fF' # attribute => 'Float' # context => '#stay' # type => 'AnyChar' if ($self->testAnyChar($text, 'fF', 0, 0, undef, 0, '#stay', 'Float')) { return 1 } } # attribute => 'Decimal' # context => '#stay' # items => 'ARRAY(0x16a0c30)' # type => 'Int' if ($self->testInt($text, 0, undef, 0, '#stay', 'Decimal')) { # String => 'ULL' # attribute => 'Decimal' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'ULL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'LUL' # attribute => 'Decimal' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'LUL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'LLU' # attribute => 'Decimal' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'LLU', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'UL' # attribute => 'Decimal' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'UL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'LU' # attribute => 'Decimal' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'LU', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'LL' # attribute => 'Decimal' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'LL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'U' # attribute => 'Decimal' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'U', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'L' # attribute => 'Decimal' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'L', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } } # attribute => 'String' # char => ''' # context => 'String1' # type => 'DetectChar' if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'String1', 'String')) { return 1 } # attribute => 'String' # char => '"' # context => 'String2' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String2', 'String')) { return 1 } # attribute => 'Comment' # char => '#' # context => 'Comment1' # type => 'DetectChar' if ($self->testDetectChar($text, '#', 0, 0, 0, undef, 0, 'Comment1', 'Comment')) { return 1 } # attribute => 'Comment' # char => '/' # char1 => '*' # context => 'Comment2' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'Comment2', 'Comment')) { return 1 } return 0; }; sub parseString1 { my ($self, $text) = @_; # attribute => 'String' # char => ''' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop', 'String')) { return 1 } return 0; }; sub parseString2 { my ($self, $text) = @_; # attribute => 'String' # char => '"' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) { return 1 } return 0; }; 1; __END__ =head1 NAME Syntax::Highlight::Engine::Kate::TaskJuggler - a Plugin for TaskJuggler syntax highlighting =head1 SYNOPSIS require Syntax::Highlight::Engine::Kate::TaskJuggler; my $sh = new Syntax::Highlight::Engine::Kate::TaskJuggler([ ]); =head1 DESCRIPTION Syntax::Highlight::Engine::Kate::TaskJuggler is a plugin module that provides syntax highlighting for TaskJuggler to the Syntax::Haghlight::Engine::Kate highlighting engine. This code is generated from the syntax definition files used by the Kate project. It works quite fine, but can use refinement and optimization. It inherits Syntax::Higlight::Engine::Kate::Template. See also there. =head1 AUTHOR Hans Jeuken (haje toneel demon nl) =head1 BUGS Unknown. If you find any, please contact the authorlibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/Engine/Kate/Fortran.pm0000644000175000017500000007371612150556557031756 0ustar gregoagregoa# Copyright (c) 2005 - 2006 Hans Jeuken. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. # This file was generated from the 'fortran.xml' file of the syntax highlight # engine of the kate text editor (http://www.kate-editor.org #kate xml version 1.11 #kate version 2.4 #kate author Franchin Matteo (fnch@libero.it) #generated: Sun Feb 3 22:02:05 2008, localtime package Syntax::Highlight::Engine::Kate::Fortran; our $VERSION = '0.07'; use strict; use warnings; use base('Syntax::Highlight::Engine::Kate::Template'); sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = $class->SUPER::new(@_); $self->attributes({ 'Comment' => 'Comment', 'Data Type' => 'DataType', 'Decimal' => 'DecVal', 'Elemental Procedure' => 'BString', 'Float' => 'Float', 'IO Function' => 'Function', 'Inquiry Function' => 'Function', 'Keyword' => 'Keyword', 'Logical' => 'Reserved', 'Non elemental subroutine' => 'Keyword', 'Normal Text' => 'Normal', 'Operator' => 'Operator', 'Preprocessor' => 'Others', 'String' => 'String', 'Symbol' => 'Normal', 'Transformational Function' => 'Variable', }); $self->listAdd('elemental_procs', 'abs', 'achar', 'acos', 'adjustl', 'adjustr', 'aimag', 'aint', 'alog', 'alog10', 'amax0', 'amax1', 'amin0', 'amin1', 'amod', 'anint', 'aprime', 'asin', 'atan', 'atan2', 'btest', 'cabs', 'ccos', 'ceiling', 'cexp', 'char', 'clog', 'cmplx', 'conjg', 'cos', 'cosh', 'csin', 'csqrt', 'dabs', 'dacos', 'dasin', 'datan', 'datan2', 'dble', 'dcmplx', 'dconjg', 'dcos', 'dcosh', 'ddim', 'ddmim', 'dexp', 'dfloat', 'dim', 'dimag', 'dint', 'dlog', 'dlog10', 'dmax1', 'dmin1', 'dmod', 'dnint', 'dprod', 'dreal', 'dsign', 'dsin', 'dsinh', 'dsqrt', 'dtan', 'dtanh', 'exp', 'exponent', 'float', 'floor', 'fraction', 'iabs', 'iachar', 'iand', 'ibclr', 'ibits', 'ibset', 'ichar', 'idim', 'idint', 'idnint', 'ieor', 'ifix', 'index', 'int', 'ior', 'ishft', 'ishftc', 'isign', 'len_trim', 'lge', 'lgt', 'lle', 'llt', 'log', 'log10', 'logical', 'max', 'max0', 'max1', 'merge', 'min', 'min0', 'min1', 'mod', 'modulo', 'mvbits', 'nearest', 'nint', 'not', 'rand', 'real', 'rrspacing', 'scale', 'scan', 'set_exponent', 'sign', 'sin', 'sinh', 'sngl', 'spacing', 'sqrt', 'tan', 'tanh', 'verify', ); $self->listAdd('inquire_keywords', 'access', 'action', 'blank', 'delim', 'direct', 'err', 'exist', 'file', 'form', 'formatted', 'iostat', 'name', 'named', 'nextrec', 'number', 'opened', 'pad', 'position', 'read', 'readwrite', 'recl', 'sequential', 'unformatted', 'unit', 'write', ); $self->listAdd('inquiry_fn', 'allocated', 'associated', 'bit_size', 'digits', 'epsilon', 'huge', 'kind', 'lbound', 'len', 'maxexponent', 'minexponent', 'precision', 'present', 'radix', 'range', 'shape', 'size', 'tiny', 'ubound', ); $self->listAdd('io_functions', 'access', 'backspace', 'close', 'format', 'inquire', 'open', 'print', 'read', 'rewind', 'write', ); $self->listAdd('io_keywords', 'advance', 'end', 'eor', 'err', 'fmt', 'iostat', 'size', 'status', 'unit', ); $self->listAdd('keywords', 'allocate', 'assignment', 'break', 'call', 'case', 'common', 'contains', 'continue', 'cycle', 'deallocate', 'default', 'do', 'elemental', 'else', 'elseif', 'elsewhere', 'entry', 'equivalence', 'exit', 'external', 'for', 'forall', 'go', 'goto', 'if', 'implicit', 'include', 'interface', 'intrinsic', 'namelist', 'none', 'nullify', 'only', 'operator', 'pause', 'procedure', 'pure', 'record', 'recursive', 'result', 'return', 'select', 'selectcase', 'stop', 'then', 'to', 'use', 'where', 'while', ); $self->listAdd('non_elem_subr', 'date_and_time', 'random_number', 'random_seed', 'system_clock', ); $self->listAdd('open_keywords', 'access', 'action', 'blank', 'delim', 'err', 'file', 'form', 'iostat', 'pad', 'position', 'recl', 'status', 'unit', ); $self->listAdd('transform_fn', 'all', 'any', 'count', 'cshift', 'dot_product', 'eoshift', 'matmul', 'maxloc', 'maxval', 'minloc', 'minval', 'pack', 'product', 'repeat', 'reshape', 'selected_int_kind', 'selected_real_kind', 'spread', 'sum', 'transfer', 'transpose', 'trim', 'unpack', ); $self->listAdd('types', 'allocatable', 'double', 'optional', 'parameter', 'pointer', 'precision', 'private', 'public', 'save', 'sequence', 'target', ); $self->contextdata({ 'default' => { callback => \&parsedefault, attribute => 'Normal Text', }, 'end_of_string' => { callback => \&parseend_of_string, attribute => 'String', fallthrough => '#pop#pop', }, 'find_begin_stmnts' => { callback => \&parsefind_begin_stmnts, attribute => 'Normal Text', }, 'find_comments' => { callback => \&parsefind_comments, attribute => 'Normal Text', }, 'find_decls' => { callback => \&parsefind_decls, attribute => 'Normal Text', }, 'find_end_stmnts' => { callback => \&parsefind_end_stmnts, attribute => 'Normal Text', }, 'find_intrinsics' => { callback => \&parsefind_intrinsics, attribute => 'Normal Text', }, 'find_io_paren' => { callback => \&parsefind_io_paren, attribute => 'Normal Text', }, 'find_io_stmnts' => { callback => \&parsefind_io_stmnts, attribute => 'Normal Text', }, 'find_numbers' => { callback => \&parsefind_numbers, attribute => 'Normal Text', }, 'find_op_and_log' => { callback => \&parsefind_op_and_log, attribute => 'Normal Text', }, 'find_paren' => { callback => \&parsefind_paren, attribute => 'Data Type', lineending => '#pop', }, 'find_preprocessor' => { callback => \&parsefind_preprocessor, attribute => 'Normal Text', }, 'find_strings' => { callback => \&parsefind_strings, attribute => 'String', }, 'find_symbols' => { callback => \&parsefind_symbols, attribute => 'Normal Text', }, 'format_stmnt' => { callback => \&parseformat_stmnt, attribute => 'Normal Text', }, 'inside_func_paren' => { callback => \&parseinside_func_paren, attribute => 'Normal Text', }, 'string_1' => { callback => \&parsestring_1, attribute => 'String', fallthrough => '#pop', }, 'string_2' => { callback => \&parsestring_2, attribute => 'String', fallthrough => '#pop', }, }); $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); $self->basecontext('default'); $self->keywordscase(0); $self->initialize; bless ($self, $class); return $self; } sub language { return 'Fortran'; } sub parsedefault { my ($self, $text) = @_; # context => 'find_strings' # type => 'IncludeRules' if ($self->includeRules('find_strings', $text)) { return 1 } # context => 'find_decls' # type => 'IncludeRules' if ($self->includeRules('find_decls', $text)) { return 1 } # context => 'find_intrinsics' # type => 'IncludeRules' if ($self->includeRules('find_intrinsics', $text)) { return 1 } # context => 'find_io_stmnts' # type => 'IncludeRules' if ($self->includeRules('find_io_stmnts', $text)) { return 1 } # context => 'find_op_and_log' # type => 'IncludeRules' if ($self->includeRules('find_op_and_log', $text)) { return 1 } # context => 'find_numbers' # type => 'IncludeRules' if ($self->includeRules('find_numbers', $text)) { return 1 } # context => 'find_preprocessor' # type => 'IncludeRules' if ($self->includeRules('find_preprocessor', $text)) { return 1 } # context => 'find_comments' # type => 'IncludeRules' if ($self->includeRules('find_comments', $text)) { return 1 } # context => 'find_symbols' # type => 'IncludeRules' if ($self->includeRules('find_symbols', $text)) { return 1 } # context => 'find_end_stmnts' # type => 'IncludeRules' if ($self->includeRules('find_end_stmnts', $text)) { return 1 } # context => 'find_begin_stmnts' # type => 'IncludeRules' if ($self->includeRules('find_begin_stmnts', $text)) { return 1 } return 0; }; sub parseend_of_string { my ($self, $text) = @_; # type => 'DetectSpaces' if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { return 1 } # String => '&\s*$' # attribute => 'Keyword' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '&\\s*$', 0, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # attribute => 'Keyword' # char => '&' # context => '#pop' # firstNonSpace => 'true' # type => 'DetectChar' if ($self->testDetectChar($text, '&', 0, 0, 0, undef, 1, '#pop', 'Keyword')) { return 1 } # String => '(!.*)?$' # attribute => 'Comment' # context => '#stay' # firstNonSpace => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '(!.*)?$', 0, 0, 0, undef, 1, '#stay', 'Comment')) { return 1 } return 0; }; sub parsefind_begin_stmnts { my ($self, $text) = @_; # String => '\bmodule\s+procedure\b' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bmodule\\s+procedure\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '\b(program|subroutine|function|module|block\s*data)\b' # attribute => 'Keyword' # beginRegion => 'Unit' # context => '#stay' # insensitive => 'TRUE' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(program|subroutine|function|module|block\\s*data)\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } return 0; }; sub parsefind_comments { my ($self, $text) = @_; # String => '[cC\*].*$' # attribute => 'Comment' # column => '0' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '[cC\\*].*$', 0, 0, 0, 0, 0, '#stay', 'Comment')) { return 1 } # String => '!.*$' # attribute => 'Comment' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '!.*$', 0, 0, 0, undef, 0, '#stay', 'Comment')) { return 1 } return 0; }; sub parsefind_decls { my ($self, $text) = @_; # String => '\binteger[\*]\d{1,2}' # attribute => 'Data Type' # context => '#stay' # insensitive => 'TRUE' # type => 'RegExpr' if ($self->testRegExpr($text, '\\binteger[\\*]\\d{1,2}', 1, 0, 0, undef, 0, '#stay', 'Data Type')) { return 1 } # String => '\breal[\*]\d{1,2}' # attribute => 'Data Type' # context => '#stay' # insensitive => 'TRUE' # type => 'RegExpr' if ($self->testRegExpr($text, '\\breal[\\*]\\d{1,2}', 1, 0, 0, undef, 0, '#stay', 'Data Type')) { return 1 } # String => '\bcomplex[\*]\d{1,2}' # attribute => 'Data Type' # context => '#stay' # insensitive => 'TRUE' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bcomplex[\\*]\\d{1,2}', 1, 0, 0, undef, 0, '#stay', 'Data Type')) { return 1 } # String => '\bend\s*type\b' # attribute => 'Data Type' # context => '#stay' # insensitive => 'TRUE' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bend\\s*type\\b', 1, 0, 0, undef, 0, '#stay', 'Data Type')) { return 1 } # String => 'types' # attribute => 'Data Type' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'types', 0, undef, 0, '#stay', 'Data Type')) { return 1 } # String => '^\s*data\b' # attribute => 'Data Type' # context => '#stay' # insensitive => 'TRUE' # type => 'RegExpr' if ($self->testRegExpr($text, '^\\s*data\\b', 1, 0, 0, undef, 0, '#stay', 'Data Type')) { return 1 } # String => '^\s*real\s*[(]' # attribute => 'Data Type' # context => 'find_paren' # insensitive => 'TRUE' # type => 'RegExpr' if ($self->testRegExpr($text, '^\\s*real\\s*[(]', 1, 0, 0, undef, 0, 'find_paren', 'Data Type')) { return 1 } # String => '^\s*real(?![\w\*])' # attribute => 'Data Type' # context => '#stay' # insensitive => 'TRUE' # type => 'RegExpr' if ($self->testRegExpr($text, '^\\s*real(?![\\w\\*])', 1, 0, 0, undef, 0, '#stay', 'Data Type')) { return 1 } # String => '\bcharacter[*][0-9]+\b' # attribute => 'Data Type' # context => '#stay' # insensitive => 'TRUE' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bcharacter[*][0-9]+\\b', 1, 0, 0, undef, 0, '#stay', 'Data Type')) { return 1 } # String => '\b(type|integer|complex|character|logical|intent|dimension)\b\s*[(]' # attribute => 'Data Type' # context => 'find_paren' # insensitive => 'TRUE' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(type|integer|complex|character|logical|intent|dimension)\\b\\s*[(]', 1, 0, 0, undef, 0, 'find_paren', 'Data Type')) { return 1 } # String => '\b(type|integer|complex|character|logical|intent|dimension)\b' # attribute => 'Data Type' # context => '#stay' # insensitive => 'TRUE' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(type|integer|complex|character|logical|intent|dimension)\\b', 1, 0, 0, undef, 0, '#stay', 'Data Type')) { return 1 } # attribute => 'Data Type' # char => ':' # char1 => ':' # context => '#stay' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, ':', ':', 0, 0, 0, undef, 0, '#stay', 'Data Type')) { return 1 } return 0; }; sub parsefind_end_stmnts { my ($self, $text) = @_; # String => '\bend\s*(program|subroutine|function|module|block\s*data)\b' # attribute => 'Keyword' # context => '#stay' # endRegion => 'Unit' # insensitive => 'TRUE' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bend\\s*(program|subroutine|function|module|block\\s*data)\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '\bend\s*(do|if|select|where|forall|interface)\b' # attribute => 'Keyword' # context => '#stay' # insensitive => 'TRUE' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bend\\s*(do|if|select|where|forall|interface)\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '\bend\b' # attribute => 'Keyword' # context => '#stay' # endRegion => 'Unit' # insensitive => 'TRUE' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bend\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } return 0; }; sub parsefind_intrinsics { my ($self, $text) = @_; # String => 'keywords' # attribute => 'Keyword' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'elemental_procs' # attribute => 'Elemental Procedure' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'elemental_procs', 0, undef, 0, '#stay', 'Elemental Procedure')) { return 1 } # String => 'inquiry_fn' # attribute => 'Inquiry Function' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'inquiry_fn', 0, undef, 0, '#stay', 'Inquiry Function')) { return 1 } # String => 'transform_fn' # attribute => 'Transformational Function' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'transform_fn', 0, undef, 0, '#stay', 'Transformational Function')) { return 1 } # String => 'non_elem_subr' # attribute => 'Non elemental subroutine' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'non_elem_subr', 0, undef, 0, '#stay', 'Non elemental subroutine')) { return 1 } return 0; }; sub parsefind_io_paren { my ($self, $text) = @_; # attribute => 'IO Function' # char => '*' # context => '#stay' # type => 'DetectChar' if ($self->testDetectChar($text, '*', 0, 0, 0, undef, 0, '#stay', 'IO Function')) { return 1 } # attribute => 'Normal Text' # char => '(' # context => 'inside_func_paren' # type => 'DetectChar' if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'inside_func_paren', 'Normal Text')) { return 1 } # attribute => 'IO Function' # char => ')' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop', 'IO Function')) { return 1 } # String => 'io_keywords' # attribute => 'IO Function' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'io_keywords', 0, undef, 0, '#stay', 'IO Function')) { return 1 } # String => 'inquire_keywords' # attribute => 'IO Function' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'inquire_keywords', 0, undef, 0, '#stay', 'IO Function')) { return 1 } # String => 'open_keywords' # attribute => 'IO Function' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'open_keywords', 0, undef, 0, '#stay', 'IO Function')) { return 1 } # context => 'find_strings' # type => 'IncludeRules' if ($self->includeRules('find_strings', $text)) { return 1 } # context => 'find_intrinsics' # type => 'IncludeRules' if ($self->includeRules('find_intrinsics', $text)) { return 1 } # context => 'find_numbers' # type => 'IncludeRules' if ($self->includeRules('find_numbers', $text)) { return 1 } # context => 'find_symbols' # type => 'IncludeRules' if ($self->includeRules('find_symbols', $text)) { return 1 } return 0; }; sub parsefind_io_stmnts { my ($self, $text) = @_; # String => '\b(read|write|backspace|rewind|end\s*file|close)\s*[(]' # attribute => 'IO Function' # context => 'find_io_paren' # insensitive => 'TRUE' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(read|write|backspace|rewind|end\\s*file|close)\\s*[(]', 1, 0, 0, undef, 0, 'find_io_paren', 'IO Function')) { return 1 } # String => '\bopen\s*[(]' # attribute => 'IO Function' # context => 'find_io_paren' # insensitive => 'TRUE' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bopen\\s*[(]', 1, 0, 0, undef, 0, 'find_io_paren', 'IO Function')) { return 1 } # String => '\binquire\s*[(]' # attribute => 'IO Function' # context => 'find_io_paren' # insensitive => 'TRUE' # type => 'RegExpr' if ($self->testRegExpr($text, '\\binquire\\s*[(]', 1, 0, 0, undef, 0, 'find_io_paren', 'IO Function')) { return 1 } # String => '\bformat\s*[(]' # attribute => 'IO Function' # context => 'format_stmnt' # insensitive => 'TRUE' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bformat\\s*[(]', 1, 0, 0, undef, 0, 'format_stmnt', 'IO Function')) { return 1 } # String => '\bend\s*file\b' # attribute => 'IO Function' # context => '#stay' # insensitive => 'TRUE' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bend\\s*file\\b', 1, 0, 0, undef, 0, '#stay', 'IO Function')) { return 1 } # String => 'io_functions' # attribute => 'IO Function' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'io_functions', 0, undef, 0, '#stay', 'IO Function')) { return 1 } return 0; }; sub parsefind_numbers { my ($self, $text) = @_; # String => '[0-9]*\.[0-9]+([de][+-]?[0-9]+)?([_]([0-9]+|[a-z][\w_]*))?' # attribute => 'Float' # context => '#stay' # insensitive => 'TRUE' # type => 'RegExpr' if ($self->testRegExpr($text, '[0-9]*\\.[0-9]+([de][+-]?[0-9]+)?([_]([0-9]+|[a-z][\\w_]*))?', 1, 0, 0, undef, 0, '#stay', 'Float')) { return 1 } # String => '\b[0-9]+\.[0-9]*([de][+-]?[0-9]+)?([_]([0-9]+|[a-z][\w_]*))?(?![a-z])' # attribute => 'Float' # context => '#stay' # insensitive => 'TRUE' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b[0-9]+\\.[0-9]*([de][+-]?[0-9]+)?([_]([0-9]+|[a-z][\\w_]*))?(?![a-z])', 1, 0, 0, undef, 0, '#stay', 'Float')) { return 1 } # String => '\b[0-9]+[de][+-]?[0-9]+([_]([0-9]+|[a-z][\w_]*))?' # attribute => 'Float' # context => '#stay' # insensitive => 'TRUE' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b[0-9]+[de][+-]?[0-9]+([_]([0-9]+|[a-z][\\w_]*))?', 1, 0, 0, undef, 0, '#stay', 'Float')) { return 1 } # String => '\b[0-9]+([_]([0-9]+|[a-zA-Z][\w_]*))?' # attribute => 'Decimal' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b[0-9]+([_]([0-9]+|[a-zA-Z][\\w_]*))?', 0, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => '\b[bozx](['][0-9a-f]+[']|["][0-9a-f]+["])' # attribute => 'Decimal' # context => '#stay' # insensitive => 'TRUE' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b[bozx]([\'][0-9a-f]+[\']|["][0-9a-f]+["])', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } return 0; }; sub parsefind_op_and_log { my ($self, $text) = @_; # String => '\.(true|false)\.' # attribute => 'Logical' # context => '#stay' # insensitive => 'TRUE' # type => 'RegExpr' if ($self->testRegExpr($text, '\\.(true|false)\\.', 1, 0, 0, undef, 0, '#stay', 'Logical')) { return 1 } # String => '\.[A-Za-z]+\.' # attribute => 'Operator' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\.[A-Za-z]+\\.', 0, 0, 0, undef, 0, '#stay', 'Operator')) { return 1 } # String => '(==|/=|<|<=|>|>=)' # attribute => 'Operator' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '(==|/=|<|<=|>|>=)', 0, 0, 0, undef, 0, '#stay', 'Operator')) { return 1 } return 0; }; sub parsefind_paren { my ($self, $text) = @_; # attribute => 'Data Type' # char => '(' # context => 'find_paren' # type => 'DetectChar' if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'find_paren', 'Data Type')) { return 1 } # attribute => 'Data Type' # char => ')' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop', 'Data Type')) { return 1 } return 0; }; sub parsefind_preprocessor { my ($self, $text) = @_; # String => '(#|cDEC\$|CDEC\$).*$' # attribute => 'Preprocessor' # column => '0' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '(#|cDEC\\$|CDEC\\$).*$', 0, 0, 0, 0, 0, '#stay', 'Preprocessor')) { return 1 } return 0; }; sub parsefind_strings { my ($self, $text) = @_; # attribute => 'String' # char => ''' # context => 'string_1' # type => 'DetectChar' if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'string_1', 'String')) { return 1 } # attribute => 'String' # char => '"' # context => 'string_2' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'string_2', 'String')) { return 1 } return 0; }; sub parsefind_symbols { my ($self, $text) = @_; # attribute => 'Keyword' # char => '*' # char1 => '*' # context => '#stay' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '*', '*', 0, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # attribute => 'Keyword' # char => '(' # char1 => '/' # context => '#stay' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '(', '/', 0, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # attribute => 'Keyword' # char => '/' # char1 => ')' # context => '#stay' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', ')', 0, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '&+-*/=?[]^{|}~' # attribute => 'Keyword' # context => '#stay' # type => 'AnyChar' if ($self->testAnyChar($text, '&+-*/=?[]^{|}~', 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '(),' # attribute => 'Symbol' # context => '#stay' # type => 'AnyChar' if ($self->testAnyChar($text, '(),', 0, 0, undef, 0, '#stay', 'Symbol')) { return 1 } return 0; }; sub parseformat_stmnt { my ($self, $text) = @_; # attribute => 'IO Function' # char => '(' # context => 'format_stmnt' # type => 'DetectChar' if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'format_stmnt', 'IO Function')) { return 1 } # attribute => 'IO Function' # char => ')' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop', 'IO Function')) { return 1 } # String => '[0-9]*/' # attribute => 'IO Function' # context => '#stay' # insensitive => 'TRUE' # type => 'RegExpr' if ($self->testRegExpr($text, '[0-9]*/', 1, 0, 0, undef, 0, '#stay', 'IO Function')) { return 1 } # String => ':' # attribute => 'IO Function' # context => '#stay' # type => 'AnyChar' if ($self->testAnyChar($text, ':', 0, 0, undef, 0, '#stay', 'IO Function')) { return 1 } # context => 'find_strings' # type => 'IncludeRules' if ($self->includeRules('find_strings', $text)) { return 1 } # context => 'find_symbols' # type => 'IncludeRules' if ($self->includeRules('find_symbols', $text)) { return 1 } return 0; }; sub parseinside_func_paren { my ($self, $text) = @_; # attribute => 'Normal Text' # char => '(' # context => 'inside_func_paren' # type => 'DetectChar' if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'inside_func_paren', 'Normal Text')) { return 1 } # attribute => 'Normal Text' # char => ')' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop', 'Normal Text')) { return 1 } # context => 'find_strings' # type => 'IncludeRules' if ($self->includeRules('find_strings', $text)) { return 1 } # context => 'find_intrinsics' # type => 'IncludeRules' if ($self->includeRules('find_intrinsics', $text)) { return 1 } # context => 'find_numbers' # type => 'IncludeRules' if ($self->includeRules('find_numbers', $text)) { return 1 } return 0; }; sub parsestring_1 { my ($self, $text) = @_; # String => '[^']*'' # attribute => 'String' # context => '#pop' # type => 'RegExpr' if ($self->testRegExpr($text, '[^\']*\'', 0, 0, 0, undef, 0, '#pop', 'String')) { return 1 } # String => '&\s*$' # attribute => 'Keyword' # context => 'end_of_string' # type => 'RegExpr' if ($self->testRegExpr($text, '&\\s*$', 0, 0, 0, undef, 0, 'end_of_string', 'Keyword')) { return 1 } # String => '.*(?=&\s*$)' # attribute => 'String' # context => 'end_of_string' # type => 'RegExpr' if ($self->testRegExpr($text, '.*(?=&\\s*$)', 0, 0, 0, undef, 0, 'end_of_string', 'String')) { return 1 } return 0; }; sub parsestring_2 { my ($self, $text) = @_; # String => '[^"]*"' # attribute => 'String' # context => '#pop' # type => 'RegExpr' if ($self->testRegExpr($text, '[^"]*"', 0, 0, 0, undef, 0, '#pop', 'String')) { return 1 } # String => '&\s*$' # attribute => 'Keyword' # context => 'end_of_string' # type => 'RegExpr' if ($self->testRegExpr($text, '&\\s*$', 0, 0, 0, undef, 0, 'end_of_string', 'Keyword')) { return 1 } # String => '.*(?=&\s*$)' # attribute => 'String' # context => 'end_of_string' # type => 'RegExpr' if ($self->testRegExpr($text, '.*(?=&\\s*$)', 0, 0, 0, undef, 0, 'end_of_string', 'String')) { return 1 } return 0; }; 1; __END__ =head1 NAME Syntax::Highlight::Engine::Kate::Fortran - a Plugin for Fortran syntax highlighting =head1 SYNOPSIS require Syntax::Highlight::Engine::Kate::Fortran; my $sh = new Syntax::Highlight::Engine::Kate::Fortran([ ]); =head1 DESCRIPTION Syntax::Highlight::Engine::Kate::Fortran is a plugin module that provides syntax highlighting for Fortran to the Syntax::Haghlight::Engine::Kate highlighting engine. This code is generated from the syntax definition files used by the Kate project. It works quite fine, but can use refinement and optimization. It inherits Syntax::Higlight::Engine::Kate::Template. See also there. =head1 AUTHOR Hans Jeuken (haje toneel demon nl) =head1 BUGS Unknown. If you find any, please contact the authorlibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/Engine/Kate/Python.pm0000644000175000017500000003572512150556557031622 0ustar gregoagregoa# Copyright (c) 2005 - 2006 Hans Jeuken. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. # This file was generated from the 'python.xml' file of the syntax highlight # engine of the kate text editor (http://www.kate-editor.org #kate xml version 1.23 #kate version 2.4 #kate author Per Wigren #generated: Sun Feb 3 22:02:06 2008, localtime package Syntax::Highlight::Engine::Kate::Python; our $VERSION = '0.07'; use strict; use warnings; use base('Syntax::Highlight::Engine::Kate::Template'); sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = $class->SUPER::new(@_); $self->attributes({ 'Builtin Function' => 'DataType', 'Comment' => 'Comment', 'Complex' => 'Others', 'Float' => 'Float', 'Hex' => 'Others', 'Int' => 'DecVal', 'Keyword' => 'Keyword', 'Long' => 'Others', 'Normal Text' => 'Normal', 'Octal' => 'Others', 'Operator' => 'Char', 'Preprocessor' => 'Char', 'Raw String' => 'String', 'Special Variable' => 'Others', 'String' => 'String', }); $self->listAdd('builtinfuncs', 'abs', 'apply', 'buffer', 'callable', 'chr', 'cmp', 'coerce', 'compile', 'complex', 'copyright', 'credits', 'delattr', 'dir', 'divmod', 'eval', 'execfile', 'exit', 'filter', 'float', 'getattr', 'globals', 'hasattr', 'hash', 'hex', 'id', 'input', 'int', 'intern', 'isinstance', 'issubclass', 'iter', 'len', 'license', 'list', 'locals', 'long', 'map', 'max', 'min', 'oct', 'open', 'ord', 'pow', 'quit', 'range', 'raw_input', 'reduce', 'reload', 'repr', 'round', 'setattr', 'slice', 'str', 'tuple', 'type', 'unichr', 'unicode', 'vars', 'xrange', 'zip', ); $self->listAdd('prep', 'as', 'from', 'import', ); $self->listAdd('specialvars', 'Ellipsis', 'False', 'None', 'NotImplemented', 'True', 'self', ); $self->listAdd('statements', 'and', 'assert', 'break', 'class', 'continue', 'def', 'del', 'elif', 'else', 'except', 'exec', 'finally', 'for', 'global', 'if', 'in', 'is', 'lambda', 'not', 'or', 'pass', 'print', 'raise', 'return', 'try', 'while', 'yield', ); $self->contextdata({ 'Normal' => { callback => \&parseNormal, attribute => 'Normal Text', }, 'Raw A-string' => { callback => \&parseRawAstring, attribute => 'Raw String', }, 'Raw Q-string' => { callback => \&parseRawQstring, attribute => 'Raw String', }, 'Single A-comment' => { callback => \&parseSingleAcomment, attribute => 'Comment', }, 'Single A-string' => { callback => \&parseSingleAstring, attribute => 'String', }, 'Single Q-comment' => { callback => \&parseSingleQcomment, attribute => 'Comment', }, 'Single Q-string' => { callback => \&parseSingleQstring, attribute => 'String', }, 'Tripple A-comment' => { callback => \&parseTrippleAcomment, attribute => 'Comment', }, 'Tripple A-string' => { callback => \&parseTrippleAstring, attribute => 'String', }, 'Tripple Q-comment' => { callback => \&parseTrippleQcomment, attribute => 'Comment', }, 'Tripple Q-string' => { callback => \&parseTrippleQstring, attribute => 'String', }, }); $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); $self->basecontext('Normal'); $self->keywordscase(0); $self->initialize; bless ($self, $class); return $self; } sub language { return 'Python'; } sub parseNormal { my ($self, $text) = @_; # String => 'prep' # attribute => 'Preprocessor' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'prep', 0, undef, 0, '#stay', 'Preprocessor')) { return 1 } # String => 'statements' # attribute => 'Keyword' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'statements', 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'builtinfuncs' # attribute => 'Builtin Function' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'builtinfuncs', 0, undef, 0, '#stay', 'Builtin Function')) { return 1 } # String => 'specialvars' # attribute => 'Special Variable' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'specialvars', 0, undef, 0, '#stay', 'Special Variable')) { return 1 } # String => '[a-zA-Z_]\w+' # attribute => 'Normal' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '[a-zA-Z_]\\w+', 0, 0, 0, undef, 0, '#stay', 'Normal')) { return 1 } # String => ' (((\d*\.\d+|\d+\.)|(\d+|(\d*\.\d+|\d+\.))[eE][+-]?\d+)|\d+)[jJ]' # attribute => 'Complex' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, ' (((\\d*\\.\\d+|\\d+\\.)|(\\d+|(\\d*\\.\\d+|\\d+\\.))[eE][+-]?\\d+)|\\d+)[jJ]', 0, 0, 0, undef, 0, '#stay', 'Complex')) { return 1 } # String => '(\d+\.\d*|\.\d+)([eE]\d+)?' # attribute => 'Float' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '(\\d+\\.\\d*|\\.\\d+)([eE]\\d+)?', 0, 0, 0, undef, 0, '#stay', 'Float')) { return 1 } # String => '([1-9]\d*([eE]\d+)?|0)' # attribute => 'Int' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '([1-9]\\d*([eE]\\d+)?|0)', 0, 0, 0, undef, 0, '#stay', 'Int')) { return 1 } # String => '[1-9]\d*([eE][\d.]+)?[Ll]' # attribute => 'Long' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '[1-9]\\d*([eE][\\d.]+)?[Ll]', 0, 0, 0, undef, 0, '#stay', 'Long')) { return 1 } # String => '0[Xx][\da-fA-F]+' # attribute => 'Hex' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '0[Xx][\\da-fA-F]+', 0, 0, 0, undef, 0, '#stay', 'Hex')) { return 1 } # String => '0[1-9]\d*' # attribute => 'Octal' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '0[1-9]\\d*', 0, 0, 0, undef, 0, '#stay', 'Octal')) { return 1 } # String => '[rR]'' # attribute => 'Raw String' # context => 'Raw A-string' # type => 'RegExpr' if ($self->testRegExpr($text, '[rR]\'', 0, 0, 0, undef, 0, 'Raw A-string', 'Raw String')) { return 1 } # String => '[rR]"' # attribute => 'Raw String' # context => 'Raw Q-string' # type => 'RegExpr' if ($self->testRegExpr($text, '[rR]"', 0, 0, 0, undef, 0, 'Raw Q-string', 'Raw String')) { return 1 } # String => '#.*$' # attribute => 'Comment' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '#.*$', 0, 0, 0, undef, 0, '#stay', 'Comment')) { return 1 } # String => ''''' # attribute => 'Comment' # context => 'Tripple A-comment' # firstNonSpace => 'true' # type => 'StringDetect' if ($self->testStringDetect($text, '\'\'\'', 0, 0, 0, undef, 1, 'Tripple A-comment', 'Comment')) { return 1 } # String => '"""' # attribute => 'Comment' # context => 'Tripple Q-comment' # firstNonSpace => 'true' # type => 'StringDetect' if ($self->testStringDetect($text, '"""', 0, 0, 0, undef, 1, 'Tripple Q-comment', 'Comment')) { return 1 } # String => ''''' # attribute => 'String' # context => 'Tripple A-string' # type => 'StringDetect' if ($self->testStringDetect($text, '\'\'\'', 0, 0, 0, undef, 0, 'Tripple A-string', 'String')) { return 1 } # String => '"""' # attribute => 'String' # context => 'Tripple Q-string' # type => 'StringDetect' if ($self->testStringDetect($text, '"""', 0, 0, 0, undef, 0, 'Tripple Q-string', 'String')) { return 1 } # attribute => 'String' # char => ''' # context => 'Single A-string' # type => 'DetectChar' if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'Single A-string', 'String')) { return 1 } # attribute => 'String' # char => '"' # context => 'Single Q-string' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'Single Q-string', 'String')) { return 1 } # String => '[+*/\(\)%\|\[\]\{\}:=;\!<>!^&~-]' # attribute => 'Operator' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '[+*/\\(\\)%\\|\\[\\]\\{\\}:=;\\!<>!^&~-]', 0, 0, 0, undef, 0, '#stay', 'Operator')) { return 1 } return 0; }; sub parseRawAstring { my ($self, $text) = @_; # attribute => 'Raw String' # context => '#stay' # type => 'HlCStringChar' if ($self->testHlCStringChar($text, 0, undef, 0, '#stay', 'Raw String')) { return 1 } # attribute => 'Raw String' # char => ''' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop', 'Raw String')) { return 1 } return 0; }; sub parseRawQstring { my ($self, $text) = @_; # attribute => 'Raw String' # context => '#stay' # type => 'HlCStringChar' if ($self->testHlCStringChar($text, 0, undef, 0, '#stay', 'Raw String')) { return 1 } # attribute => 'Raw String' # char => '"' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'Raw String')) { return 1 } return 0; }; sub parseSingleAcomment { my ($self, $text) = @_; # attribute => 'Comment' # context => '#stay' # type => 'HlCStringChar' if ($self->testHlCStringChar($text, 0, undef, 0, '#stay', 'Comment')) { return 1 } # attribute => 'Comment' # char => ''' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop', 'Comment')) { return 1 } return 0; }; sub parseSingleAstring { my ($self, $text) = @_; # attribute => 'String' # context => '#stay' # type => 'HlCStringChar' if ($self->testHlCStringChar($text, 0, undef, 0, '#stay', 'String')) { return 1 } # String => '%[a-zA-Z]' # attribute => 'Operator' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '%[a-zA-Z]', 0, 0, 0, undef, 0, '#stay', 'Operator')) { return 1 } # attribute => 'String' # char => ''' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop', 'String')) { return 1 } return 0; }; sub parseSingleQcomment { my ($self, $text) = @_; # attribute => 'Comment' # context => '#stay' # type => 'HlCStringChar' if ($self->testHlCStringChar($text, 0, undef, 0, '#stay', 'Comment')) { return 1 } # attribute => 'Comment' # char => '"' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'Comment')) { return 1 } return 0; }; sub parseSingleQstring { my ($self, $text) = @_; # attribute => 'String' # context => '#stay' # type => 'HlCStringChar' if ($self->testHlCStringChar($text, 0, undef, 0, '#stay', 'String')) { return 1 } # String => '%[a-zA-Z]' # attribute => 'Operator' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '%[a-zA-Z]', 0, 0, 0, undef, 0, '#stay', 'Operator')) { return 1 } # attribute => 'String' # char => '"' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) { return 1 } return 0; }; sub parseTrippleAcomment { my ($self, $text) = @_; # attribute => 'Comment' # context => '#stay' # type => 'HlCChar' if ($self->testHlCChar($text, 0, undef, 0, '#stay', 'Comment')) { return 1 } # String => ''''' # attribute => 'Comment' # context => '#pop' # type => 'StringDetect' if ($self->testStringDetect($text, '\'\'\'', 0, 0, 0, undef, 0, '#pop', 'Comment')) { return 1 } return 0; }; sub parseTrippleAstring { my ($self, $text) = @_; # attribute => 'String' # context => '#stay' # type => 'HlCChar' if ($self->testHlCChar($text, 0, undef, 0, '#stay', 'String')) { return 1 } # String => '%[a-zA-Z]' # attribute => 'Operator' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '%[a-zA-Z]', 0, 0, 0, undef, 0, '#stay', 'Operator')) { return 1 } # String => ''''' # attribute => 'String' # context => '#pop' # type => 'StringDetect' if ($self->testStringDetect($text, '\'\'\'', 0, 0, 0, undef, 0, '#pop', 'String')) { return 1 } return 0; }; sub parseTrippleQcomment { my ($self, $text) = @_; # attribute => 'Comment' # context => '#stay' # type => 'HlCChar' if ($self->testHlCChar($text, 0, undef, 0, '#stay', 'Comment')) { return 1 } # String => '"""' # attribute => 'Comment' # context => '#pop' # type => 'StringDetect' if ($self->testStringDetect($text, '"""', 0, 0, 0, undef, 0, '#pop', 'Comment')) { return 1 } return 0; }; sub parseTrippleQstring { my ($self, $text) = @_; # attribute => 'String' # context => '#stay' # type => 'HlCStringChar' if ($self->testHlCStringChar($text, 0, undef, 0, '#stay', 'String')) { return 1 } # String => '%[a-zA-Z]' # attribute => 'Operator' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '%[a-zA-Z]', 0, 0, 0, undef, 0, '#stay', 'Operator')) { return 1 } # String => '"""' # attribute => 'String' # context => '#pop' # type => 'StringDetect' if ($self->testStringDetect($text, '"""', 0, 0, 0, undef, 0, '#pop', 'String')) { return 1 } return 0; }; 1; __END__ =head1 NAME Syntax::Highlight::Engine::Kate::Python - a Plugin for Python syntax highlighting =head1 SYNOPSIS require Syntax::Highlight::Engine::Kate::Python; my $sh = new Syntax::Highlight::Engine::Kate::Python([ ]); =head1 DESCRIPTION Syntax::Highlight::Engine::Kate::Python is a plugin module that provides syntax highlighting for Python to the Syntax::Haghlight::Engine::Kate highlighting engine. This code is generated from the syntax definition files used by the Kate project. It works quite fine, but can use refinement and optimization. It inherits Syntax::Higlight::Engine::Kate::Template. See also there. =head1 AUTHOR Hans Jeuken (haje toneel demon nl) =head1 BUGS Unknown. If you find any, please contact the authorlibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/Engine/Kate/Verilog.pm0000644000175000017500000003374412150556557031747 0ustar gregoagregoa# Copyright (c) 2005 - 2006 Hans Jeuken. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. # This file was generated from the 'verilog.xml' file of the syntax highlight # engine of the kate text editor (http://www.kate-editor.org #kate xml version 1.07 #kate version 2.4 #kate author Yevgen Voronenko (ysv22@drexel.edu) #generated: Sun Feb 3 22:02:06 2008, localtime package Syntax::Highlight::Engine::Kate::Verilog; our $VERSION = '0.07'; use strict; use warnings; use base('Syntax::Highlight::Engine::Kate::Template'); sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = $class->SUPER::new(@_); $self->attributes({ 'Alert' => 'Alert', 'Binary' => 'BaseN', 'Block name' => 'DataType', 'Comment' => 'Comment', 'Data Type' => 'DataType', 'Decimal' => 'BaseN', 'Delay' => 'BaseN', 'Drive/charge strength' => 'BaseN', 'Float' => 'Float', 'Gate instantiation' => 'DataType', 'Hex' => 'BaseN', 'Integer' => 'DecVal', 'Keyword' => 'Keyword', 'Normal Text' => 'Normal', 'Octal' => 'BaseN', 'Port connection' => 'DataType', 'Prep. Lib' => 'Float', 'Preprocessor' => 'Others', 'String' => 'String', 'String Char' => 'Char', 'Symbol' => 'Normal', 'System Task' => 'DataType', }); $self->listAdd('gates', 'and', 'buf', 'bufif0', 'bufif1', 'cmos', 'nand', 'nmos', 'nor', 'not', 'notif0', 'notif1', 'or', 'pmos', 'pulldown', 'pullup', 'rcmos', 'rnmos', 'rpmos', 'rtran', 'rtranif0', 'rtranif1', 'tran', 'tranif0', 'tranif1', 'xnor', 'xor', ); $self->listAdd('keywords', 'always', 'assign', 'begin', 'case', 'casex', 'casez', 'deassign', 'default', 'defparam', 'disable', 'edge', 'else', 'end', 'endcase', 'endfunction', 'endmodule', 'endspecify', 'endtable', 'endtask', 'for', 'force', 'forever', 'fork', 'function', 'if', 'ifnone', 'initial', 'join', 'macromodule', 'module', 'negedge', 'posedge', 'release', 'repeat', 'specify', 'specparam', 'table', 'task', 'wait', 'while', ); $self->listAdd('strength', 'highz0', 'highz1', 'large', 'medium', 'pull0', 'pull1', 'small', 'strong0', 'strong1', 'weak0', 'weak1', ); $self->listAdd('types', 'event', 'inout', 'input', 'integer', 'output', 'parameter', 'real', 'realtime', 'reg', 'scalared', 'supply0', 'supply1', 'time', 'tri', 'tri0', 'tri1', 'triand', 'trior', 'trireg', 'vectored', 'wand', 'wire', 'wor', ); $self->contextdata({ 'Block name' => { callback => \&parseBlockname, attribute => 'Block name', lineending => '#pop', }, 'Commentar 1' => { callback => \&parseCommentar1, attribute => 'Comment', lineending => '#pop', }, 'Commentar 2' => { callback => \&parseCommentar2, attribute => 'Comment', }, 'Commentar/Preprocessor' => { callback => \&parseCommentarPreprocessor, attribute => 'Comment', }, 'Normal' => { callback => \&parseNormal, attribute => 'Normal Text', }, 'Preprocessor' => { callback => \&parsePreprocessor, attribute => 'Preprocessor', lineending => '#pop', }, 'Some Context' => { callback => \&parseSomeContext, attribute => 'Normal Text', lineending => '#pop', }, 'Some Context2' => { callback => \&parseSomeContext2, attribute => 'Comment', }, 'String' => { callback => \&parseString, attribute => 'String', lineending => '#pop', }, }); $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); $self->basecontext('Normal'); $self->keywordscase(0); $self->initialize; bless ($self, $class); return $self; } sub language { return 'Verilog'; } sub parseBlockname { my ($self, $text) = @_; # String => '[^ ]+' # attribute => 'Data Type' # context => '#pop' # type => 'RegExpr' if ($self->testRegExpr($text, '[^ ]+', 0, 0, 0, undef, 0, '#pop', 'Data Type')) { return 1 } return 0; }; sub parseCommentar1 { my ($self, $text) = @_; # String => '(FIXME|TODO)' # attribute => 'Alert' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '(FIXME|TODO)', 0, 0, 0, undef, 0, '#stay', 'Alert')) { return 1 } return 0; }; sub parseCommentar2 { my ($self, $text) = @_; # String => '(FIXME|TODO)' # attribute => 'Alert' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '(FIXME|TODO)', 0, 0, 0, undef, 0, '#stay', 'Alert')) { return 1 } # attribute => 'Comment' # char => '*' # char1 => '/' # context => '#pop' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop', 'Comment')) { return 1 } return 0; }; sub parseCommentarPreprocessor { my ($self, $text) = @_; # attribute => 'Comment' # char => '*' # char1 => '/' # context => '#pop' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop', 'Comment')) { return 1 } return 0; }; sub parseNormal { my ($self, $text) = @_; # String => 'begin\ *:' # attribute => 'Keyword' # context => 'Block name' # type => 'RegExpr' if ($self->testRegExpr($text, 'begin\\ *:', 0, 0, 0, undef, 0, 'Block name', 'Keyword')) { return 1 } # String => 'keywords' # attribute => 'Keyword' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'types' # attribute => 'Data Type' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'types', 0, undef, 0, '#stay', 'Data Type')) { return 1 } # String => 'strength' # attribute => 'Drive/charge strength' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'strength', 0, undef, 0, '#stay', 'Drive/charge strength')) { return 1 } # String => 'gates' # attribute => 'Gate instantiation' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'gates', 0, undef, 0, '#stay', 'Gate instantiation')) { return 1 } # String => '[a-zA-Z]+[\w$]*' # attribute => 'Normal Text' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '[a-zA-Z]+[\\w$]*', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { return 1 } # String => '\\[^ ]+ ' # attribute => 'Normal Text' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\\\[^ ]+ ', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { return 1 } # String => '[\d_]*'d[\d_]+' # attribute => 'Decimal' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '[\\d_]*\'d[\\d_]+', 0, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => '[\d_]*'o[0-7xXzZ_]+' # attribute => 'Octal' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '[\\d_]*\'o[0-7xXzZ_]+', 0, 0, 0, undef, 0, '#stay', 'Octal')) { return 1 } # String => '[\d_]*'h[\da-fA-FxXzZ_]+' # attribute => 'Hex' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '[\\d_]*\'h[\\da-fA-FxXzZ_]+', 0, 0, 0, undef, 0, '#stay', 'Hex')) { return 1 } # String => '[\d_]*'b[01_zZxX]+' # attribute => 'Binary' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '[\\d_]*\'b[01_zZxX]+', 0, 0, 0, undef, 0, '#stay', 'Binary')) { return 1 } # attribute => 'Float' # context => '#stay' # type => 'Float' if ($self->testFloat($text, 0, undef, 0, '#stay', 'Float')) { return 1 } # attribute => 'Integer' # context => '#stay' # type => 'Int' if ($self->testInt($text, 0, undef, 0, '#stay', 'Integer')) { return 1 } # String => '[^\w$]\.[a-zA-Z]+[\w$]*' # attribute => 'Port connection' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '[^\\w$]\\.[a-zA-Z]+[\\w$]*', 0, 0, 0, undef, 0, '#stay', 'Port connection')) { return 1 } # attribute => 'String' # char => '"' # context => 'String' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) { return 1 } # attribute => 'Comment' # char => '/' # char1 => '/' # context => 'Commentar 1' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'Commentar 1', 'Comment')) { return 1 } # attribute => 'Comment' # char => '/' # char1 => '*' # context => 'Commentar 2' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'Commentar 2', 'Comment')) { return 1 } # String => '!%&()+,-<=+/:;>?[]^{|}~@' # attribute => 'Symbol' # context => '#stay' # type => 'AnyChar' if ($self->testAnyChar($text, '!%&()+,-<=+/:;>?[]^{|}~@', 0, 0, undef, 0, '#stay', 'Symbol')) { return 1 } # String => '#if 0' # attribute => 'Comment' # context => 'Some Context2' # firstNonSpace => 'true' # insensitive => 'FALSE' # type => 'StringDetect' if ($self->testStringDetect($text, '#if 0', 0, 0, 0, undef, 1, 'Some Context2', 'Comment')) { return 1 } # attribute => 'Preprocessor' # char => '`' # column => '0' # context => 'Preprocessor' # type => 'DetectChar' if ($self->testDetectChar($text, '`', 0, 0, 0, 0, 0, 'Preprocessor', 'Preprocessor')) { return 1 } # String => '\`[a-zA-Z_]+\w*' # attribute => 'Preprocessor' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\`[a-zA-Z_]+\\w*', 0, 0, 0, undef, 0, '#stay', 'Preprocessor')) { return 1 } # String => '\$[a-zA-Z_]+\w*' # attribute => 'System Task' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\$[a-zA-Z_]+\\w*', 0, 0, 0, undef, 0, '#stay', 'System Task')) { return 1 } # String => '#[\d_]+' # attribute => 'Delay' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '#[\\d_]+', 0, 0, 0, undef, 0, '#stay', 'Delay')) { return 1 } return 0; }; sub parsePreprocessor { my ($self, $text) = @_; # attribute => 'Preprocessor' # context => 'Some Context' # type => 'LineContinue' if ($self->testLineContinue($text, 0, undef, 0, 'Some Context', 'Preprocessor')) { return 1 } # attribute => 'Prep. Lib' # char => '"' # char1 => '"' # context => '#stay' # type => 'RangeDetect' if ($self->testRangeDetect($text, '"', '"', 0, 0, undef, 0, '#stay', 'Prep. Lib')) { return 1 } # attribute => 'Prep. Lib' # char => '<' # char1 => '>' # context => '#stay' # type => 'RangeDetect' if ($self->testRangeDetect($text, '<', '>', 0, 0, undef, 0, '#stay', 'Prep. Lib')) { return 1 } # attribute => 'Comment' # char => '/' # char1 => '/' # context => 'Commentar 1' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'Commentar 1', 'Comment')) { return 1 } # attribute => 'Comment' # char => '/' # char1 => '*' # context => 'Commentar/Preprocessor' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'Commentar/Preprocessor', 'Comment')) { return 1 } return 0; }; sub parseSomeContext { my ($self, $text) = @_; return 0; }; sub parseSomeContext2 { my ($self, $text) = @_; # String => '(FIXME|TODO)' # attribute => 'Alert' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '(FIXME|TODO)', 0, 0, 0, undef, 0, '#stay', 'Alert')) { return 1 } # String => '#endif' # attribute => 'Comment' # context => '#pop' # firstNonSpace => 'true' # type => 'StringDetect' if ($self->testStringDetect($text, '#endif', 0, 0, 0, undef, 1, '#pop', 'Comment')) { return 1 } return 0; }; sub parseString { my ($self, $text) = @_; # attribute => 'String' # context => 'Some Context' # type => 'LineContinue' if ($self->testLineContinue($text, 0, undef, 0, 'Some Context', 'String')) { return 1 } # attribute => 'String Char' # context => '#stay' # type => 'HlCStringChar' if ($self->testHlCStringChar($text, 0, undef, 0, '#stay', 'String Char')) { return 1 } # attribute => 'String' # char => '"' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) { return 1 } return 0; }; 1; __END__ =head1 NAME Syntax::Highlight::Engine::Kate::Verilog - a Plugin for Verilog syntax highlighting =head1 SYNOPSIS require Syntax::Highlight::Engine::Kate::Verilog; my $sh = new Syntax::Highlight::Engine::Kate::Verilog([ ]); =head1 DESCRIPTION Syntax::Highlight::Engine::Kate::Verilog is a plugin module that provides syntax highlighting for Verilog to the Syntax::Haghlight::Engine::Kate highlighting engine. This code is generated from the syntax definition files used by the Kate project. It works quite fine, but can use refinement and optimization. It inherits Syntax::Higlight::Engine::Kate::Template. See also there. =head1 AUTHOR Hans Jeuken (haje toneel demon nl) =head1 BUGS Unknown. If you find any, please contact the authorlibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/Engine/Kate/PHP_HTML.pm0000644000175000017500000006753712150556557031622 0ustar gregoagregoa# Copyright (c) 2005 - 2006 Hans Jeuken. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. # This file was generated from the 'html-php.xml' file of the syntax highlight # engine of the kate text editor (http://www.kate-editor.org #kate xml version 1.98 #kate version 2.4 #kate author Wilbert Berendsen (wilbert@kde.nl) #generated: Sun Feb 3 22:02:06 2008, localtime package Syntax::Highlight::Engine::Kate::PHP_HTML; our $VERSION = '0.07'; use strict; use warnings; use base('Syntax::Highlight::Engine::Kate::Template'); sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = $class->SUPER::new(@_); $self->attributes({ 'Attribute' => 'Others', 'CDATA' => 'BaseN', 'Comment' => 'Comment', 'Doctype' => 'DataType', 'Element' => 'Keyword', 'EntityRef' => 'DecVal', 'Error' => 'Error', 'Normal Text' => 'Normal', 'PEntityRef' => 'DecVal', 'Processing Instruction' => 'Keyword', 'Value' => 'String', }); $self->contextdata({ 'CDATA' => { callback => \&parseCDATA, attribute => 'Normal Text', }, 'CSS' => { callback => \&parseCSS, attribute => 'Normal Text', }, 'CSS content' => { callback => \&parseCSScontent, attribute => 'Normal Text', }, 'Comment' => { callback => \&parseComment, attribute => 'Comment', }, 'Doctype' => { callback => \&parseDoctype, attribute => 'Normal Text', }, 'Doctype Internal Subset' => { callback => \&parseDoctypeInternalSubset, attribute => 'Normal Text', }, 'Doctype Markupdecl' => { callback => \&parseDoctypeMarkupdecl, attribute => 'Normal Text', }, 'Doctype Markupdecl DQ' => { callback => \&parseDoctypeMarkupdeclDQ, attribute => 'Value', }, 'Doctype Markupdecl SQ' => { callback => \&parseDoctypeMarkupdeclSQ, attribute => 'Value', }, 'El Close' => { callback => \&parseElClose, attribute => 'Normal Text', }, 'El Close 2' => { callback => \&parseElClose2, attribute => 'Normal Text', }, 'El Close 3' => { callback => \&parseElClose3, attribute => 'Normal Text', }, 'El Open' => { callback => \&parseElOpen, attribute => 'Normal Text', }, 'FindAttributes' => { callback => \&parseFindAttributes, attribute => 'Normal Text', }, 'FindDTDRules' => { callback => \&parseFindDTDRules, attribute => 'Normal Text', }, 'FindEntityRefs' => { callback => \&parseFindEntityRefs, attribute => 'Normal Text', }, 'FindHTML' => { callback => \&parseFindHTML, attribute => 'Normal Text', }, 'FindPEntityRefs' => { callback => \&parseFindPEntityRefs, attribute => 'Normal Text', }, 'FindPHP' => { callback => \&parseFindPHP, }, 'JS' => { callback => \&parseJS, attribute => 'Normal Text', }, 'JS comment close' => { callback => \&parseJScommentclose, attribute => 'Comment', lineending => '#pop', }, 'JS content' => { callback => \&parseJScontent, attribute => 'Normal Text', }, 'PI' => { callback => \&parsePI, attribute => 'Normal Text', }, 'Start' => { callback => \&parseStart, attribute => 'Normal Text', }, 'Value' => { callback => \&parseValue, attribute => 'Normal Text', fallthrough => 'Value NQ', }, 'Value DQ' => { callback => \&parseValueDQ, attribute => 'Value', }, 'Value NQ' => { callback => \&parseValueNQ, attribute => 'Normal Text', lineending => '#pop#pop', fallthrough => '#pop#pop', }, 'Value SQ' => { callback => \&parseValueSQ, attribute => 'Value', }, }); $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); $self->basecontext('Start'); $self->keywordscase(1); $self->initialize; bless ($self, $class); return $self; } sub language { return 'PHP (HTML)'; } sub parseCDATA { my ($self, $text) = @_; # context => 'FindPHP' # type => 'IncludeRules' if ($self->includeRules('FindPHP', $text)) { return 1 } # type => 'DetectSpaces' if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { return 1 } # type => 'DetectIdentifier' if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) { return 1 } # String => ']]>' # attribute => 'CDATA' # context => '#pop' # endRegion => 'cdata' # type => 'StringDetect' if ($self->testStringDetect($text, ']]>', 0, 0, 0, undef, 0, '#pop', 'CDATA')) { return 1 } # String => ']]>' # attribute => 'EntityRef' # context => '#stay' # type => 'StringDetect' if ($self->testStringDetect($text, ']]>', 0, 0, 0, undef, 0, '#stay', 'EntityRef')) { return 1 } return 0; }; sub parseCSS { my ($self, $text) = @_; # context => 'FindPHP' # type => 'IncludeRules' if ($self->includeRules('FindPHP', $text)) { return 1 } # attribute => 'Element' # char => '/' # char1 => '>' # context => '#pop' # endRegion => 'style' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '>', 0, 0, 0, undef, 0, '#pop', 'Element')) { return 1 } # attribute => 'Element' # char => '>' # context => 'CSS content' # type => 'DetectChar' if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, 'CSS content', 'Element')) { return 1 } # context => 'FindAttributes' # type => 'IncludeRules' if ($self->includeRules('FindAttributes', $text)) { return 1 } # String => '\S' # attribute => 'Error' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\S', 0, 0, 0, undef, 0, '#stay', 'Error')) { return 1 } return 0; }; sub parseCSScontent { my ($self, $text) = @_; # context => 'FindPHP' # type => 'IncludeRules' if ($self->includeRules('FindPHP', $text)) { return 1 } # String => ' 'Element' # context => 'El Close 2' # endRegion => 'style' # insensitive => 'TRUE' # type => 'RegExpr' if ($self->testRegExpr($text, ' '##CSS/PHP' # includeAttrib => 'true' # type => 'IncludeRules' if ($self->includePlugin('CSS/PHP', $text)) { return 1 } return 0; }; sub parseComment { my ($self, $text) = @_; # context => 'FindPHP' # type => 'IncludeRules' if ($self->includeRules('FindPHP', $text)) { return 1 } # type => 'DetectSpaces' if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { return 1 } # context => '##Alerts' # type => 'IncludeRules' if ($self->includePlugin('Alerts', $text)) { return 1 } # type => 'DetectIdentifier' if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) { return 1 } # String => '-->' # attribute => 'Comment' # context => '#pop' # endRegion => 'comment' # type => 'StringDetect' if ($self->testStringDetect($text, '-->', 0, 0, 0, undef, 0, '#pop', 'Comment')) { return 1 } # String => '-(-(?!->))+' # attribute => 'Error' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '-(-(?!->))+', 0, 0, 0, undef, 0, '#stay', 'Error')) { return 1 } return 0; }; sub parseDoctype { my ($self, $text) = @_; # context => 'FindPHP' # type => 'IncludeRules' if ($self->includeRules('FindPHP', $text)) { return 1 } # attribute => 'Doctype' # char => '>' # context => '#pop' # endRegion => 'doctype' # type => 'DetectChar' if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '#pop', 'Doctype')) { return 1 } # attribute => 'Doctype' # beginRegion => 'int_subset' # char => '[' # context => 'Doctype Internal Subset' # type => 'DetectChar' if ($self->testDetectChar($text, '[', 0, 0, 0, undef, 0, 'Doctype Internal Subset', 'Doctype')) { return 1 } return 0; }; sub parseDoctypeInternalSubset { my ($self, $text) = @_; # context => 'FindPHP' # type => 'IncludeRules' if ($self->includeRules('FindPHP', $text)) { return 1 } # attribute => 'Doctype' # char => ']' # context => '#pop' # endRegion => 'int_subset' # type => 'DetectChar' if ($self->testDetectChar($text, ']', 0, 0, 0, undef, 0, '#pop', 'Doctype')) { return 1 } # context => 'FindDTDRules' # type => 'IncludeRules' if ($self->includeRules('FindDTDRules', $text)) { return 1 } # String => '' # attribute => 'HTML Comment' # context => '#pop' # type => 'StringDetect' if ($self->testStringDetect($text, '-->', 0, 0, 0, undef, 0, '#pop', 'HTML Comment')) { return 1 } # String => '\s*=\s*' # attribute => 'Normal Text' # context => 'identifiers' # type => 'RegExpr' if ($self->testRegExpr($text, '\\s*=\\s*', 0, 0, 0, undef, 0, 'identifiers', 'Normal Text')) { return 1 } return 0; }; sub parsehtmltag { my ($self, $text) = @_; # attribute => 'HTML Tag' # char => '/' # char1 => '>' # context => '#pop' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '>', 0, 0, 0, undef, 0, '#pop', 'HTML Tag')) { return 1 } # attribute => 'HTML Tag' # char => '>' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '#pop', 'HTML Tag')) { return 1 } # String => '<%' # attribute => 'Keyword' # context => 'aspsource' # type => 'StringDetect' if ($self->testStringDetect($text, '<%', 0, 0, 0, undef, 0, 'aspsource', 'Keyword')) { return 1 } # String => '<%' # attribute => 'Keyword' # context => 'aspsource' # type => 'StringDetect' if ($self->testStringDetect($text, '<%', 0, 0, 0, undef, 0, 'aspsource', 'Keyword')) { return 1 } # String => '\s*=\s*' # attribute => 'Identifier' # context => 'identifiers' # type => 'RegExpr' if ($self->testRegExpr($text, '\\s*=\\s*', 0, 0, 0, undef, 0, 'identifiers', 'Identifier')) { return 1 } return 0; }; sub parseidentifiers { my ($self, $text) = @_; # String => '\s*#?[a-zA-Z0-9]*' # attribute => 'String' # context => '#pop' # type => 'RegExpr' if ($self->testRegExpr($text, '\\s*#?[a-zA-Z0-9]*', 0, 0, 0, undef, 0, '#pop', 'String')) { return 1 } # attribute => 'Types' # char => ''' # context => 'types1' # type => 'DetectChar' if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'types1', 'Types')) { return 1 } # attribute => 'Types' # char => '"' # context => 'types2' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'types2', 'Types')) { return 1 } return 0; }; sub parsenosource { my ($self, $text) = @_; # String => '<%' # attribute => 'Keyword' # context => 'aspsource' # type => 'StringDetect' if ($self->testStringDetect($text, '<%', 0, 0, 0, undef, 0, 'aspsource', 'Keyword')) { return 1 } # String => '<\s*script(\s|>)' # attribute => 'HTML Tag' # context => 'scripts' # insensitive => 'TRUE' # type => 'RegExpr' if ($self->testRegExpr($text, '<\\s*script(\\s|>)', 1, 0, 0, undef, 0, 'scripts', 'HTML Tag')) { return 1 } # String => '<\s*\/?\s*[a-zA-Z_:][a-zA-Z0-9._:-]*' # attribute => 'HTML Tag' # context => 'htmltag' # type => 'RegExpr' if ($self->testRegExpr($text, '<\\s*\\/?\\s*[a-zA-Z_:][a-zA-Z0-9._:-]*', 0, 0, 0, undef, 0, 'htmltag', 'HTML Tag')) { return 1 } # String => '' # attribute => 'Html Comment' # context => '#pop' # type => 'RegExpr' if ($self->testRegExpr($text, '\\/*-->', 0, 0, 0, undef, 0, '#pop', 'Html Comment')) { return 1 } return 0; }; sub parseHtmlDoubleQuotedValue { my ($self, $text) = @_; # String => '<%--' # attribute => 'Jsp Comment' # context => 'Jsp Comment' # type => 'StringDetect' if ($self->testStringDetect($text, '<%--', 0, 0, 0, undef, 0, 'Jsp Comment', 'Jsp Comment')) { return 1 } # String => '<%(!|=)?' # attribute => 'Jsp Scriptlet' # context => 'Jsp Scriptlet' # type => 'RegExpr' if ($self->testRegExpr($text, '<%(!|=)?', 0, 0, 0, undef, 0, 'Jsp Scriptlet', 'Jsp Scriptlet')) { return 1 } # attribute => 'Jsp Expression' # char => '$' # char1 => '{' # context => 'Jsp Expression' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '$', '{', 0, 0, 0, undef, 0, 'Jsp Expression', 'Jsp Expression')) { return 1 } # String => '<\s*\/?\s*\$?\w*:\$?\w*' # attribute => 'Keyword' # context => 'Jsp Custom Tag' # type => 'RegExpr' if ($self->testRegExpr($text, '<\\s*\\/?\\s*\\$?\\w*:\\$?\\w*', 0, 0, 0, undef, 0, 'Jsp Custom Tag', 'Keyword')) { return 1 } # String => '("|"|")' # attribute => 'Types' # context => '#pop#pop' # type => 'RegExpr' if ($self->testRegExpr($text, '("|"|")', 0, 0, 0, undef, 0, '#pop#pop', 'Types')) { return 1 } return 0; }; sub parseHtmlSingleQuotedValue { my ($self, $text) = @_; # String => '<%--' # attribute => 'Jsp Comment' # context => 'Jsp Comment' # type => 'StringDetect' if ($self->testStringDetect($text, '<%--', 0, 0, 0, undef, 0, 'Jsp Comment', 'Jsp Comment')) { return 1 } # String => '<%(!|=)?' # attribute => 'Jsp Scriptlet' # context => 'Jsp Scriptlet' # type => 'RegExpr' if ($self->testRegExpr($text, '<%(!|=)?', 0, 0, 0, undef, 0, 'Jsp Scriptlet', 'Jsp Scriptlet')) { return 1 } # attribute => 'Jsp Expression' # char => '$' # char1 => '{' # context => 'Jsp Expression' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '$', '{', 0, 0, 0, undef, 0, 'Jsp Expression', 'Jsp Expression')) { return 1 } # String => '<\s*\/?\s*\$?\w*:\$?\w*' # attribute => 'Keyword' # context => 'Jsp Custom Tag' # type => 'RegExpr' if ($self->testRegExpr($text, '<\\s*\\/?\\s*\\$?\\w*:\\$?\\w*', 0, 0, 0, undef, 0, 'Jsp Custom Tag', 'Keyword')) { return 1 } # String => '('|')' # attribute => 'Types' # context => '#pop#pop' # type => 'RegExpr' if ($self->testRegExpr($text, '(\'|')', 0, 0, 0, undef, 0, '#pop#pop', 'Types')) { return 1 } return 0; }; sub parseHtmlUnquotedValue { my ($self, $text) = @_; # String => '<%--' # attribute => 'Jsp Comment' # context => 'Jsp Comment' # type => 'StringDetect' if ($self->testStringDetect($text, '<%--', 0, 0, 0, undef, 0, 'Jsp Comment', 'Jsp Comment')) { return 1 } # String => '<%(!|=)?' # attribute => 'Jsp Scriptlet' # context => 'Jsp Scriptlet' # type => 'RegExpr' if ($self->testRegExpr($text, '<%(!|=)?', 0, 0, 0, undef, 0, 'Jsp Scriptlet', 'Jsp Scriptlet')) { return 1 } # attribute => 'Jsp Expression' # char => '$' # char1 => '{' # context => 'Jsp Expression' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '$', '{', 0, 0, 0, undef, 0, 'Jsp Expression', 'Jsp Expression')) { return 1 } # String => '<\s*\/?\s*\$?\w*:\$?\w*' # attribute => 'Keyword' # context => 'Jsp Custom Tag' # type => 'RegExpr' if ($self->testRegExpr($text, '<\\s*\\/?\\s*\\$?\\w*:\\$?\\w*', 0, 0, 0, undef, 0, 'Jsp Custom Tag', 'Keyword')) { return 1 } # String => '\/?>' # attribute => 'Normal Text' # context => '#pop#pop#pop' # type => 'RegExpr' if ($self->testRegExpr($text, '\\/?>', 0, 0, 0, undef, 0, '#pop#pop#pop', 'Normal Text')) { return 1 } # String => '\s+' # attribute => 'Types' # context => '#pop#pop' # type => 'RegExpr' if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#pop#pop', 'Types')) { return 1 } return 0; }; sub parseHtmlValue { my ($self, $text) = @_; # String => '<%--' # attribute => 'Jsp Comment' # context => 'Jsp Comment' # type => 'StringDetect' if ($self->testStringDetect($text, '<%--', 0, 0, 0, undef, 0, 'Jsp Comment', 'Jsp Comment')) { return 1 } # String => '<%(!|=)?' # attribute => 'Jsp Scriptlet' # context => 'Jsp Scriptlet' # type => 'RegExpr' if ($self->testRegExpr($text, '<%(!|=)?', 0, 0, 0, undef, 0, 'Jsp Scriptlet', 'Jsp Scriptlet')) { return 1 } # attribute => 'Jsp Expression' # char => '$' # char1 => '{' # context => 'Jsp Expression' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '$', '{', 0, 0, 0, undef, 0, 'Jsp Expression', 'Jsp Expression')) { return 1 } # String => '<\s*\/?\s*\$?\w*:\$?\w*' # attribute => 'Keyword' # context => 'Jsp Custom Tag' # type => 'RegExpr' if ($self->testRegExpr($text, '<\\s*\\/?\\s*\\$?\\w*:\\$?\\w*', 0, 0, 0, undef, 0, 'Jsp Custom Tag', 'Keyword')) { return 1 } # String => '("|"|")' # attribute => 'Types' # context => 'Html Double Quoted Value' # type => 'RegExpr' if ($self->testRegExpr($text, '("|"|")', 0, 0, 0, undef, 0, 'Html Double Quoted Value', 'Types')) { return 1 } # String => '('|')' # attribute => 'Types' # context => 'Html Single Quoted Value' # type => 'RegExpr' if ($self->testRegExpr($text, '(\'|')', 0, 0, 0, undef, 0, 'Html Single Quoted Value', 'Types')) { return 1 } # String => '\s*#?-?_?\.?[a-zA-Z0-9]*' # attribute => 'Types' # context => 'Html Unquoted Value' # type => 'RegExpr' if ($self->testRegExpr($text, '\\s*#?-?_?\\.?[a-zA-Z0-9]*', 0, 0, 0, undef, 0, 'Html Unquoted Value', 'Types')) { return 1 } # String => '\/?>' # attribute => 'Normal Text' # context => '#pop#pop' # type => 'RegExpr' if ($self->testRegExpr($text, '\\/?>', 0, 0, 0, undef, 0, '#pop#pop', 'Normal Text')) { return 1 } return 0; }; sub parseJavaMultiLineComment { my ($self, $text) = @_; # attribute => 'Java Comment' # char => '*' # char1 => '/' # context => '#pop' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop', 'Java Comment')) { return 1 } return 0; }; sub parseJavaSingleLineComment { my ($self, $text) = @_; return 0; }; sub parseJavaString { my ($self, $text) = @_; # attribute => 'String' # char => '\' # char1 => '"' # context => '#stay' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '\\', '"', 0, 0, 0, undef, 0, '#stay', 'String')) { return 1 } # attribute => 'String' # char => '"' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) { return 1 } return 0; }; sub parseJspComment { my ($self, $text) = @_; # String => '--%>' # attribute => 'Jsp Comment' # context => '#pop' # type => 'StringDetect' if ($self->testStringDetect($text, '--%>', 0, 0, 0, undef, 0, '#pop', 'Jsp Comment')) { return 1 } return 0; }; sub parseJspCustomTag { my ($self, $text) = @_; # String => '\/?>' # attribute => 'Keyword' # context => '#pop' # type => 'RegExpr' if ($self->testRegExpr($text, '\\/?>', 0, 0, 0, undef, 0, '#pop', 'Keyword')) { return 1 } # String => '\s*=\s*' # attribute => 'Normal Text' # context => 'Jsp Custom Tag Value' # type => 'RegExpr' if ($self->testRegExpr($text, '\\s*=\\s*', 0, 0, 0, undef, 0, 'Jsp Custom Tag Value', 'Normal Text')) { return 1 } # String => '<%--' # attribute => 'Jsp Comment' # context => 'Jsp Comment' # type => 'StringDetect' if ($self->testStringDetect($text, '<%--', 0, 0, 0, undef, 0, 'Jsp Comment', 'Jsp Comment')) { return 1 } # String => '<%(!|=)?' # attribute => 'Jsp Scriptlet' # context => 'Jsp Scriptlet' # type => 'RegExpr' if ($self->testRegExpr($text, '<%(!|=)?', 0, 0, 0, undef, 0, 'Jsp Scriptlet', 'Jsp Scriptlet')) { return 1 } # attribute => 'Jsp Expression' # char => '$' # char1 => '{' # context => 'Jsp Expression' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '$', '{', 0, 0, 0, undef, 0, 'Jsp Expression', 'Jsp Expression')) { return 1 } return 0; }; sub parseJspCustomTagValue { my ($self, $text) = @_; # String => '<%--' # attribute => 'Jsp Comment' # context => 'Jsp Comment' # type => 'StringDetect' if ($self->testStringDetect($text, '<%--', 0, 0, 0, undef, 0, 'Jsp Comment', 'Jsp Comment')) { return 1 } # String => '<%(!|=)?' # attribute => 'Jsp Scriptlet' # context => 'Jsp Scriptlet' # type => 'RegExpr' if ($self->testRegExpr($text, '<%(!|=)?', 0, 0, 0, undef, 0, 'Jsp Scriptlet', 'Jsp Scriptlet')) { return 1 } # attribute => 'Jsp Expression' # char => '$' # char1 => '{' # context => 'Jsp Expression' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '$', '{', 0, 0, 0, undef, 0, 'Jsp Expression', 'Jsp Expression')) { return 1 } # attribute => 'Types' # char => '"' # context => 'Jsp Double Quoted Custom Tag Value' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'Jsp Double Quoted Custom Tag Value', 'Types')) { return 1 } # attribute => 'Types' # char => ''' # context => 'Jsp Single Quoted Custom Tag Value' # type => 'DetectChar' if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'Jsp Single Quoted Custom Tag Value', 'Types')) { return 1 } # String => '\/?>' # attribute => 'Normal Text' # context => '#pop#pop' # type => 'RegExpr' if ($self->testRegExpr($text, '\\/?>', 0, 0, 0, undef, 0, '#pop#pop', 'Normal Text')) { return 1 } return 0; }; sub parseJspDoubleQuotedCustomTagValue { my ($self, $text) = @_; # attribute => 'Types' # char => '"' # context => '#pop#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop#pop', 'Types')) { return 1 } # String => '<%--' # attribute => 'Jsp Comment' # context => 'Jsp Comment' # type => 'StringDetect' if ($self->testStringDetect($text, '<%--', 0, 0, 0, undef, 0, 'Jsp Comment', 'Jsp Comment')) { return 1 } # String => '<%(!|=)?' # attribute => 'Jsp Scriptlet' # context => 'Jsp Scriptlet' # type => 'RegExpr' if ($self->testRegExpr($text, '<%(!|=)?', 0, 0, 0, undef, 0, 'Jsp Scriptlet', 'Jsp Scriptlet')) { return 1 } # attribute => 'Jsp Expression' # char => '$' # char1 => '{' # context => 'Jsp Expression' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '$', '{', 0, 0, 0, undef, 0, 'Jsp Expression', 'Jsp Expression')) { return 1 } return 0; }; sub parseJspDoubleQuotedParamValue { my ($self, $text) = @_; # attribute => 'Jsp Param Value' # char => '"' # context => '#pop#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop#pop', 'Jsp Param Value')) { return 1 } # String => '<%--' # attribute => 'Jsp Comment' # context => 'Jsp Comment' # type => 'StringDetect' if ($self->testStringDetect($text, '<%--', 0, 0, 0, undef, 0, 'Jsp Comment', 'Jsp Comment')) { return 1 } # String => '<%(!|=)?' # attribute => 'Jsp Scriptlet' # context => 'Jsp Scriptlet' # type => 'RegExpr' if ($self->testRegExpr($text, '<%(!|=)?', 0, 0, 0, undef, 0, 'Jsp Scriptlet', 'Jsp Scriptlet')) { return 1 } # attribute => 'Jsp Expression' # char => '$' # char1 => '{' # context => 'Jsp Expression' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '$', '{', 0, 0, 0, undef, 0, 'Jsp Expression', 'Jsp Expression')) { return 1 } return 0; }; sub parseJspExpression { my ($self, $text) = @_; # String => ''${'' # attribute => 'Normal Text' # context => '#stay' # type => 'StringDetect' if ($self->testStringDetect($text, '\'${\'', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { return 1 } # attribute => 'Jsp Scriptlet' # char => '}' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#pop', 'Jsp Scriptlet')) { return 1 } # String => 'java-1.4.2-keywords' # attribute => 'Keyword' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'java-1.4.2-keywords', 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'jsp-reserved-words' # attribute => 'Keyword' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'jsp-reserved-words', 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'java-1.4.2-types' # attribute => 'Types' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'java-1.4.2-types', 0, undef, 0, '#stay', 'Types')) { return 1 } # String => 'java-1.4.2-classes' # attribute => 'Java 1.4.2 Classes' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'java-1.4.2-classes', 0, undef, 0, '#stay', 'Java 1.4.2 Classes')) { return 1 } # attribute => 'Float' # context => '#stay' # items => 'ARRAY(0x19b69e0)' # type => 'Float' if ($self->testFloat($text, 0, undef, 0, '#stay', 'Float')) { # String => 'fF' # attribute => 'Float' # context => '#stay' # type => 'AnyChar' if ($self->testAnyChar($text, 'fF', 0, 0, undef, 0, '#stay', 'Float')) { return 1 } } # attribute => 'Octal' # context => '#stay' # type => 'HlCOct' if ($self->testHlCOct($text, 0, undef, 0, '#stay', 'Octal')) { return 1 } # attribute => 'Hex' # context => '#stay' # type => 'HlCHex' if ($self->testHlCHex($text, 0, undef, 0, '#stay', 'Hex')) { return 1 } # attribute => 'Decimal' # context => '#stay' # items => 'ARRAY(0x19bc750)' # type => 'Int' if ($self->testInt($text, 0, undef, 0, '#stay', 'Decimal')) { # String => 'ULL' # attribute => 'Decimal' # context => '#stay' # insensitive => 'true' # type => 'StringDetect' if ($self->testStringDetect($text, 'ULL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'LUL' # attribute => 'Decimal' # context => '#stay' # insensitive => 'true' # type => 'StringDetect' if ($self->testStringDetect($text, 'LUL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'LLU' # attribute => 'Decimal' # context => '#stay' # insensitive => 'true' # type => 'StringDetect' if ($self->testStringDetect($text, 'LLU', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'UL' # attribute => 'Decimal' # context => '#stay' # insensitive => 'true' # type => 'StringDetect' if ($self->testStringDetect($text, 'UL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'LU' # attribute => 'Decimal' # context => '#stay' # insensitive => 'true' # type => 'StringDetect' if ($self->testStringDetect($text, 'LU', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'LL' # attribute => 'Decimal' # context => '#stay' # insensitive => 'true' # type => 'StringDetect' if ($self->testStringDetect($text, 'LL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'U' # attribute => 'Decimal' # context => '#stay' # insensitive => 'true' # type => 'StringDetect' if ($self->testStringDetect($text, 'U', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'L' # attribute => 'Decimal' # context => '#stay' # insensitive => 'true' # type => 'StringDetect' if ($self->testStringDetect($text, 'L', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } } # attribute => 'Char' # context => '#stay' # type => 'HlCChar' if ($self->testHlCChar($text, 0, undef, 0, '#stay', 'Char')) { return 1 } # attribute => 'String' # char => '"' # context => 'Java String' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'Java String', 'String')) { return 1 } # String => '!%&()+,-<=>?[]^{|}~' # attribute => 'Symbol' # context => '#stay' # type => 'AnyChar' if ($self->testAnyChar($text, '!%&()+,-<=>?[]^{|}~', 0, 0, undef, 0, '#stay', 'Symbol')) { return 1 } return 0; }; sub parseJspScriptlet { my ($self, $text) = @_; # attribute => 'Jsp Scriptlet' # char => '%' # char1 => '>' # context => '#pop' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '%', '>', 0, 0, 0, undef, 0, '#pop', 'Jsp Scriptlet')) { return 1 } # String => '<\s*jsp:(declaration|expression|scriptlet)\s*>' # attribute => 'Jsp Scriptlet' # context => 'Jsp Scriptlet' # type => 'RegExpr' if ($self->testRegExpr($text, '<\\s*jsp:(declaration|expression|scriptlet)\\s*>', 0, 0, 0, undef, 0, 'Jsp Scriptlet', 'Jsp Scriptlet')) { return 1 } # String => 'java-1.4.2-keywords' # attribute => 'Keyword' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'java-1.4.2-keywords', 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'jsp-reserved-words' # attribute => 'Keyword' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'jsp-reserved-words', 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'java-1.4.2-types' # attribute => 'Types' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'java-1.4.2-types', 0, undef, 0, '#stay', 'Types')) { return 1 } # String => 'java-1.4.2-classes' # attribute => 'Java 1.4.2 Classes' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'java-1.4.2-classes', 0, undef, 0, '#stay', 'Java 1.4.2 Classes')) { return 1 } # attribute => 'Float' # context => '#stay' # items => 'ARRAY(0x12a3610)' # type => 'Float' if ($self->testFloat($text, 0, undef, 0, '#stay', 'Float')) { # String => 'fF' # attribute => 'Float' # context => '#stay' # type => 'AnyChar' if ($self->testAnyChar($text, 'fF', 0, 0, undef, 0, '#stay', 'Float')) { return 1 } } # attribute => 'Octal' # context => '#stay' # type => 'HlCOct' if ($self->testHlCOct($text, 0, undef, 0, '#stay', 'Octal')) { return 1 } # attribute => 'Hex' # context => '#stay' # type => 'HlCHex' if ($self->testHlCHex($text, 0, undef, 0, '#stay', 'Hex')) { return 1 } # attribute => 'Decimal' # context => '#stay' # items => 'ARRAY(0x19ad810)' # type => 'Int' if ($self->testInt($text, 0, undef, 0, '#stay', 'Decimal')) { # String => 'ULL' # attribute => 'Decimal' # context => '#stay' # insensitive => 'true' # type => 'StringDetect' if ($self->testStringDetect($text, 'ULL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'LUL' # attribute => 'Decimal' # context => '#stay' # insensitive => 'true' # type => 'StringDetect' if ($self->testStringDetect($text, 'LUL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'LLU' # attribute => 'Decimal' # context => '#stay' # insensitive => 'true' # type => 'StringDetect' if ($self->testStringDetect($text, 'LLU', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'UL' # attribute => 'Decimal' # context => '#stay' # insensitive => 'true' # type => 'StringDetect' if ($self->testStringDetect($text, 'UL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'LU' # attribute => 'Decimal' # context => '#stay' # insensitive => 'true' # type => 'StringDetect' if ($self->testStringDetect($text, 'LU', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'LL' # attribute => 'Decimal' # context => '#stay' # insensitive => 'true' # type => 'StringDetect' if ($self->testStringDetect($text, 'LL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'U' # attribute => 'Decimal' # context => '#stay' # insensitive => 'true' # type => 'StringDetect' if ($self->testStringDetect($text, 'U', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'L' # attribute => 'Decimal' # context => '#stay' # insensitive => 'true' # type => 'StringDetect' if ($self->testStringDetect($text, 'L', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } } # attribute => 'Char' # context => '#stay' # type => 'HlCChar' if ($self->testHlCChar($text, 0, undef, 0, '#stay', 'Char')) { return 1 } # String => '//\s*BEGIN.*$' # attribute => 'Decimal' # beginRegion => 'Region1' # context => '#stay' # firstNonSpace => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '//\\s*BEGIN.*$', 0, 0, 0, undef, 1, '#stay', 'Decimal')) { return 1 } # String => '//\s*END.*$' # attribute => 'Decimal' # context => '#stay' # endRegion => 'Region1' # firstNonSpace => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '//\\s*END.*$', 0, 0, 0, undef, 1, '#stay', 'Decimal')) { return 1 } # attribute => 'String' # char => '"' # context => 'Java String' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'Java String', 'String')) { return 1 } # attribute => 'Normal Text' # beginRegion => 'Brace1' # char => '{' # context => '#stay' # type => 'DetectChar' if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { return 1 } # attribute => 'Normal Text' # char => '}' # context => '#stay' # endRegion => 'Brace1' # type => 'DetectChar' if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { return 1 } # String => '!%&()+,-<=>?[]^{|}~' # attribute => 'Symbol' # context => '#stay' # type => 'AnyChar' if ($self->testAnyChar($text, '!%&()+,-<=>?[]^{|}~', 0, 0, undef, 0, '#stay', 'Symbol')) { return 1 } # attribute => 'Java Comment' # char => '/' # char1 => '/' # context => 'Java Single-Line Comment' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'Java Single-Line Comment', 'Java Comment')) { return 1 } # attribute => 'Java Comment' # char => '/' # char1 => '*' # context => 'Java Multi-Line Comment' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'Java Multi-Line Comment', 'Java Comment')) { return 1 } return 0; }; sub parseJspSingleQuotedCustomTagValue { my ($self, $text) = @_; # attribute => 'Types' # char => ''' # context => '#pop#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop#pop', 'Types')) { return 1 } # String => '<%--' # attribute => 'Jsp Comment' # context => 'Jsp Comment' # type => 'StringDetect' if ($self->testStringDetect($text, '<%--', 0, 0, 0, undef, 0, 'Jsp Comment', 'Jsp Comment')) { return 1 } # String => '<%(!|=)?' # attribute => 'Jsp Scriptlet' # context => 'Jsp Scriptlet' # type => 'RegExpr' if ($self->testRegExpr($text, '<%(!|=)?', 0, 0, 0, undef, 0, 'Jsp Scriptlet', 'Jsp Scriptlet')) { return 1 } # attribute => 'Jsp Expression' # char => '$' # char1 => '{' # context => 'Jsp Expression' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '$', '{', 0, 0, 0, undef, 0, 'Jsp Expression', 'Jsp Expression')) { return 1 } return 0; }; sub parseJspSingleQuotedParamValue { my ($self, $text) = @_; # attribute => 'Jsp Param Value' # char => ''' # context => '#pop#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop#pop', 'Jsp Param Value')) { return 1 } # String => '<%--' # attribute => 'Jsp Comment' # context => 'Jsp Comment' # type => 'StringDetect' if ($self->testStringDetect($text, '<%--', 0, 0, 0, undef, 0, 'Jsp Comment', 'Jsp Comment')) { return 1 } # String => '<%(!|=)?' # attribute => 'Jsp Scriptlet' # context => 'Jsp Scriptlet' # type => 'RegExpr' if ($self->testRegExpr($text, '<%(!|=)?', 0, 0, 0, undef, 0, 'Jsp Scriptlet', 'Jsp Scriptlet')) { return 1 } # attribute => 'Jsp Expression' # char => '$' # char1 => '{' # context => 'Jsp Expression' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '$', '{', 0, 0, 0, undef, 0, 'Jsp Expression', 'Jsp Expression')) { return 1 } return 0; }; sub parseJspStandardDirective { my ($self, $text) = @_; # attribute => 'Jsp Directive' # char => '%' # char1 => '>' # context => '#pop' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '%', '>', 0, 0, 0, undef, 0, '#pop', 'Jsp Directive')) { return 1 } # String => '\s*=\s*' # attribute => 'Normal Text' # context => 'Jsp Standard Directive Value' # type => 'RegExpr' if ($self->testRegExpr($text, '\\s*=\\s*', 0, 0, 0, undef, 0, 'Jsp Standard Directive Value', 'Normal Text')) { return 1 } # String => '<%--' # attribute => 'Jsp Comment' # context => 'Jsp Comment' # type => 'StringDetect' if ($self->testStringDetect($text, '<%--', 0, 0, 0, undef, 0, 'Jsp Comment', 'Jsp Comment')) { return 1 } # String => '<%(!|=)?' # attribute => 'Jsp Scriptlet' # context => 'Jsp Scriptlet' # type => 'RegExpr' if ($self->testRegExpr($text, '<%(!|=)?', 0, 0, 0, undef, 0, 'Jsp Scriptlet', 'Jsp Scriptlet')) { return 1 } # attribute => 'Jsp Expression' # char => '$' # char1 => '{' # context => 'Jsp Expression' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '$', '{', 0, 0, 0, undef, 0, 'Jsp Expression', 'Jsp Expression')) { return 1 } # String => '<\s*\/?\s*\$?\w*:\$?\w*' # attribute => 'Keyword' # context => 'Jsp Custom Tag' # type => 'RegExpr' if ($self->testRegExpr($text, '<\\s*\\/?\\s*\\$?\\w*:\\$?\\w*', 0, 0, 0, undef, 0, 'Jsp Custom Tag', 'Keyword')) { return 1 } return 0; }; sub parseJspStandardDirectiveValue { my ($self, $text) = @_; # String => '<%--' # attribute => 'Jsp Comment' # context => 'Jsp Comment' # type => 'StringDetect' if ($self->testStringDetect($text, '<%--', 0, 0, 0, undef, 0, 'Jsp Comment', 'Jsp Comment')) { return 1 } # String => '<%(!|=)?' # attribute => 'Jsp Scriptlet' # context => 'Jsp Scriptlet' # type => 'RegExpr' if ($self->testRegExpr($text, '<%(!|=)?', 0, 0, 0, undef, 0, 'Jsp Scriptlet', 'Jsp Scriptlet')) { return 1 } # attribute => 'Jsp Expression' # char => '$' # char1 => '{' # context => 'Jsp Expression' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '$', '{', 0, 0, 0, undef, 0, 'Jsp Expression', 'Jsp Expression')) { return 1 } # attribute => 'Jsp Param Value' # char => '"' # context => 'Jsp Double Quoted Param Value' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'Jsp Double Quoted Param Value', 'Jsp Param Value')) { return 1 } # attribute => 'Jsp Param Value' # char => ''' # context => 'Jsp Single Quoted Param Value' # type => 'DetectChar' if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'Jsp Single Quoted Param Value', 'Jsp Param Value')) { return 1 } # attribute => 'Jsp Directive' # char => '%' # char1 => '>' # context => '#pop#pop' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '%', '>', 0, 0, 0, undef, 0, '#pop#pop', 'Jsp Directive')) { return 1 } return 0; }; sub parseJspXmlDirective { my ($self, $text) = @_; # String => '\s*\/?\s*>' # attribute => 'Jsp Directive' # context => '#pop' # type => 'RegExpr' if ($self->testRegExpr($text, '\\s*\\/?\\s*>', 0, 0, 0, undef, 0, '#pop', 'Jsp Directive')) { return 1 } # String => '\s*=\s*' # attribute => 'Normal Text' # context => 'Jsp Xml Directive Value' # type => 'RegExpr' if ($self->testRegExpr($text, '\\s*=\\s*', 0, 0, 0, undef, 0, 'Jsp Xml Directive Value', 'Normal Text')) { return 1 } # String => '<%--' # attribute => 'Jsp Comment' # context => 'Jsp Comment' # type => 'StringDetect' if ($self->testStringDetect($text, '<%--', 0, 0, 0, undef, 0, 'Jsp Comment', 'Jsp Comment')) { return 1 } # String => '<%(!|=)?' # attribute => 'Jsp Scriptlet' # context => 'Jsp Scriptlet' # type => 'RegExpr' if ($self->testRegExpr($text, '<%(!|=)?', 0, 0, 0, undef, 0, 'Jsp Scriptlet', 'Jsp Scriptlet')) { return 1 } # attribute => 'Jsp Expression' # char => '$' # char1 => '{' # context => 'Jsp Expression' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '$', '{', 0, 0, 0, undef, 0, 'Jsp Expression', 'Jsp Expression')) { return 1 } return 0; }; sub parseJspXmlDirectiveValue { my ($self, $text) = @_; # String => '<%--' # attribute => 'Jsp Comment' # context => 'Jsp Comment' # type => 'StringDetect' if ($self->testStringDetect($text, '<%--', 0, 0, 0, undef, 0, 'Jsp Comment', 'Jsp Comment')) { return 1 } # String => '<%(!|=)?' # attribute => 'Jsp Scriptlet' # context => 'Jsp Scriptlet' # type => 'RegExpr' if ($self->testRegExpr($text, '<%(!|=)?', 0, 0, 0, undef, 0, 'Jsp Scriptlet', 'Jsp Scriptlet')) { return 1 } # attribute => 'Jsp Expression' # char => '$' # char1 => '{' # context => 'Jsp Expression' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '$', '{', 0, 0, 0, undef, 0, 'Jsp Expression', 'Jsp Expression')) { return 1 } # attribute => 'Jsp Param Value' # char => '"' # context => 'Jsp Double Quoted Param Value' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'Jsp Double Quoted Param Value', 'Jsp Param Value')) { return 1 } # attribute => 'Jsp Param Value' # char => ''' # context => 'Jsp Single Quoted Param Value' # type => 'DetectChar' if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'Jsp Single Quoted Param Value', 'Jsp Param Value')) { return 1 } # String => '\s*\/?\s*>' # attribute => 'Jsp Directive' # context => '#pop#pop' # type => 'RegExpr' if ($self->testRegExpr($text, '\\s*\\/?\\s*>', 0, 0, 0, undef, 0, '#pop#pop', 'Jsp Directive')) { return 1 } return 0; }; sub parseNormal { my ($self, $text) = @_; # String => '<%@\s*[a-zA-Z0-9_\.]*' # attribute => 'Jsp Directive' # context => 'Jsp Standard Directive' # type => 'RegExpr' if ($self->testRegExpr($text, '<%@\\s*[a-zA-Z0-9_\\.]*', 0, 0, 0, undef, 0, 'Jsp Standard Directive', 'Jsp Directive')) { return 1 } # String => '<\s*jsp:(declaration|expression|scriptlet)\s*>' # attribute => 'Jsp Scriptlet' # context => 'Jsp Scriptlet' # type => 'RegExpr' if ($self->testRegExpr($text, '<\\s*jsp:(declaration|expression|scriptlet)\\s*>', 0, 0, 0, undef, 0, 'Jsp Scriptlet', 'Jsp Scriptlet')) { return 1 } # String => '<\s*\/?s*jsp:[a-zA-Z0-9_\.]*' # attribute => 'Jsp Directive' # context => 'Jsp Xml Directive' # type => 'RegExpr' if ($self->testRegExpr($text, '<\\s*\\/?s*jsp:[a-zA-Z0-9_\\.]*', 0, 0, 0, undef, 0, 'Jsp Xml Directive', 'Jsp Directive')) { return 1 } # String => '<%--' # attribute => 'Jsp Comment' # context => 'Jsp Comment' # type => 'StringDetect' if ($self->testStringDetect($text, '<%--', 0, 0, 0, undef, 0, 'Jsp Comment', 'Jsp Comment')) { return 1 } # String => '<%(!|=)?' # attribute => 'Jsp Scriptlet' # context => 'Jsp Scriptlet' # type => 'RegExpr' if ($self->testRegExpr($text, '<%(!|=)?', 0, 0, 0, undef, 0, 'Jsp Scriptlet', 'Jsp Scriptlet')) { return 1 } # String => '' # attribute => 'Comment' # context => '#pop' # type => 'StringDetect' if ($self->testStringDetect($text, '-->', 0, 0, 0, undef, 0, '#pop', 'Comment')) { return 1 } return 0; }; sub parseNormalText { my ($self, $text) = @_; # String => '' # attribute => 'NoWiki' # type => 'RegExpr' if ($self->testRegExpr($text, '', 0, 0, 0, undef, 0, '#stay', 'NoWiki')) { return 1 } # String => '' # attribute => 'Wiki-Tag' # context => '#pop' # type => 'StringDetect' if ($self->testStringDetect($text, '', 0, 0, 0, undef, 0, '#pop', 'Wiki-Tag')) { return 1 } # String => '[<][^>]+[>]' # attribute => 'HTML-Tag' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '[<][^>]+[>]', 0, 0, 0, undef, 0, '#stay', 'HTML-Tag')) { return 1 } # String => '
'
   # attribute => 'HTML-Tag'
   # context => 'Pre'
   # type => 'StringDetect'
   if ($self->testStringDetect($text, '
', 0, 0, 0, undef, 0, 'Pre', 'HTML-Tag')) {
      return 1
   }
   return 0;
};

sub parsePre {
   my ($self, $text) = @_;
   # String => '
' # attribute => 'Wiki-Tag' # context => '#pop' # type => 'StringDetect' if ($self->testStringDetect($text, '
', 0, 0, 0, undef, 0, '#pop', 'Wiki-Tag')) { return 1 } return 0; }; sub parseTable { my ($self, $text) = @_; # String => '' # attribute => 'Comment' # context => '#pop' # endRegion => 'comment' # type => 'StringDetect' if ($self->testStringDetect($text, '-->', 0, 0, 0, undef, 0, '#pop', 'Comment')) { return 1 } return 0; }; sub parsenormal { my ($self, $text) = @_; # String => '' # attribute => 'Comment' # context => '#pop' # endRegion => 'comment' # type => 'StringDetect' if ($self->testStringDetect($text, '-->', 0, 0, 0, undef, 0, '#pop', 'Comment')) { return 1 } # String => '-(-(?!->))+' # attribute => 'Error' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '-(-(?!->))+', 0, 0, 0, undef, 0, '#stay', 'Error')) { return 1 } # context => '##Alerts' # type => 'IncludeRules' if ($self->includePlugin('Alerts', $text)) { return 1 } # type => 'DetectIdentifier' if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) { return 1 } return 0; }; sub parseDoctype { my ($self, $text) = @_; # attribute => 'Doctype' # char => '>' # context => '#pop' # endRegion => 'doctype' # type => 'DetectChar' if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '#pop', 'Doctype')) { return 1 } # attribute => 'Doctype' # beginRegion => 'int_subset' # char => '[' # context => 'Doctype Internal Subset' # type => 'DetectChar' if ($self->testDetectChar($text, '[', 0, 0, 0, undef, 0, 'Doctype Internal Subset', 'Doctype')) { return 1 } return 0; }; sub parseDoctypeInternalSubset { my ($self, $text) = @_; # attribute => 'Doctype' # char => ']' # context => '#pop' # endRegion => 'int_subset' # type => 'DetectChar' if ($self->testDetectChar($text, ']', 0, 0, 0, undef, 0, '#pop', 'Doctype')) { return 1 } # String => ' 'Doctype' # context => 'Doctype Markupdecl' # type => 'RegExpr' if ($self->testRegExpr($text, ' '' # attribute => 'Comment' # context => '#pop' # endRegion => 'comment' # type => 'StringDetect' if ($self->testStringDetect($text, '-->', 0, 0, 0, undef, 0, '#pop', 'Comment')) { return 1 } # String => '-(-(?!->))+' # attribute => 'Error' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '-(-(?!->))+', 0, 0, 0, undef, 0, '#stay', 'Error')) { return 1 } return 0; }; sub parseDoctype { my ($self, $text) = @_; # attribute => 'Doctype' # char => '>' # context => '#pop' # endRegion => 'doctype' # type => 'DetectChar' if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '#pop', 'Doctype')) { return 1 } # attribute => 'Doctype' # beginRegion => 'int_subset' # char => '[' # context => 'Doctype Internal Subset' # type => 'DetectChar' if ($self->testDetectChar($text, '[', 0, 0, 0, undef, 0, 'Doctype Internal Subset', 'Doctype')) { return 1 } return 0; }; sub parseDoctypeInternalSubset { my ($self, $text) = @_; # attribute => 'Doctype' # char => ']' # context => '#pop' # endRegion => 'int_subset' # type => 'DetectChar' if ($self->testDetectChar($text, ']', 0, 0, 0, undef, 0, '#pop', 'Doctype')) { return 1 } # context => 'FindDTDRules' # type => 'IncludeRules' if ($self->includeRules('FindDTDRules', $text)) { return 1 } # String => '' # attribute => 'CF Comment' # context => '#pop' # type => 'StringDetect' if ($self->testStringDetect($text, '--->', 0, 0, 0, undef, 0, '#pop', 'CF Comment')) { return 1 } return 0; }; sub parsectxCFTag { my ($self, $text) = @_; # attribute => 'CF Tags' # char => '>' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '#pop', 'CF Tags')) { return 1 } # attribute => 'Normal Text' # char => '=' # context => '#stay' # type => 'DetectChar' if ($self->testDetectChar($text, '=', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { return 1 } # String => '"[^"]*"' # attribute => 'Attribute Values' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '"[^"]*"', 0, 0, 0, undef, 0, '#stay', 'Attribute Values')) { return 1 } # String => ''[^']*'' # attribute => 'Attribute Values' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\'[^\']*\'', 0, 0, 0, undef, 0, '#stay', 'Attribute Values')) { return 1 } return 0; }; sub parsectxCFSCRIPTBlock { my ($self, $text) = @_; # attribute => 'Script Comment' # char => '/' # char1 => '*' # context => 'ctxC Style Comment' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'ctxC Style Comment', 'Script Comment')) { return 1 } # attribute => 'Script Comment' # char => '/' # char1 => '/' # context => 'ctxOne Line Comment' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'ctxOne Line Comment', 'Script Comment')) { return 1 } # String => '"[^"]*"' # attribute => 'Script Strings' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '"[^"]*"', 0, 0, 0, undef, 0, '#stay', 'Script Strings')) { return 1 } # String => ''[^']*'' # attribute => 'Script Strings' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\'[^\']*\'', 0, 0, 0, undef, 0, '#stay', 'Script Strings')) { return 1 } # attribute => 'Script Numbers' # context => '#stay' # type => 'Int' if ($self->testInt($text, 0, undef, 0, '#stay', 'Script Numbers')) { return 1 } # attribute => 'Script Numbers' # context => '#stay' # type => 'Float' if ($self->testFloat($text, 0, undef, 0, '#stay', 'Script Numbers')) { return 1 } # String => '[()[\]=+-*/]+' # attribute => 'Script Operators' # context => '#stay' # type => 'AnyChar' if ($self->testAnyChar($text, '[()[\\]=+-*/]+', 0, 0, undef, 0, '#stay', 'Script Operators')) { return 1 } # String => '{}' # attribute => 'Brackets' # context => '#stay' # type => 'AnyChar' if ($self->testAnyChar($text, '{}', 0, 0, undef, 0, '#stay', 'Brackets')) { return 1 } # String => 'CFSCRIPT Keywords' # attribute => 'Script Keywords' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'CFSCRIPT Keywords', 0, undef, 0, '#stay', 'Script Keywords')) { return 1 } # String => 'CFSCRIPT Functions' # attribute => 'Script Functions' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'CFSCRIPT Functions', 0, undef, 0, '#stay', 'Script Functions')) { return 1 } # String => '' # attribute => 'Script Tags' # context => '#pop#pop' # type => 'RegExpr' if ($self->testRegExpr($text, '', 0, 0, 0, undef, 0, '#pop#pop', 'Script Tags')) { return 1 } return 0; }; sub parsectxCFSCRIPTTag { my ($self, $text) = @_; # attribute => 'Script Tags' # char => '>' # context => 'ctxCFSCRIPT Block' # type => 'DetectChar' if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, 'ctxCFSCRIPT Block', 'Script Tags')) { return 1 } # attribute => 'Normal Text' # char => '=' # context => '#stay' # type => 'DetectChar' if ($self->testDetectChar($text, '=', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { return 1 } # String => '"[^"]*"' # attribute => 'Attribute Values' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '"[^"]*"', 0, 0, 0, undef, 0, '#stay', 'Attribute Values')) { return 1 } # String => ''[^']*'' # attribute => 'Attribute Values' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\'[^\']*\'', 0, 0, 0, undef, 0, '#stay', 'Attribute Values')) { return 1 } return 0; }; sub parsectxCFXTag { my ($self, $text) = @_; # attribute => 'CFX Tags' # char => '>' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '#pop', 'CFX Tags')) { return 1 } # attribute => 'Normal Text' # char => '=' # context => '#stay' # type => 'DetectChar' if ($self->testDetectChar($text, '=', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { return 1 } # String => '"[^"]*"' # attribute => 'Attribute Values' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '"[^"]*"', 0, 0, 0, undef, 0, '#stay', 'Attribute Values')) { return 1 } # String => ''[^']*'' # attribute => 'Attribute Values' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\'[^\']*\'', 0, 0, 0, undef, 0, '#stay', 'Attribute Values')) { return 1 } return 0; }; sub parsectxCustomTag { my ($self, $text) = @_; # attribute => 'Custom Tags' # char => '>' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '#pop', 'Custom Tags')) { return 1 } # attribute => 'Normal Text' # char => '=' # context => '#stay' # type => 'DetectChar' if ($self->testDetectChar($text, '=', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { return 1 } # String => '"[^"]*"' # attribute => 'Attribute Values' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '"[^"]*"', 0, 0, 0, undef, 0, '#stay', 'Attribute Values')) { return 1 } # String => ''[^']*'' # attribute => 'Attribute Values' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\'[^\']*\'', 0, 0, 0, undef, 0, '#stay', 'Attribute Values')) { return 1 } return 0; }; sub parsectxHTMLComment { my ($self, $text) = @_; # String => '' # attribute => 'HTML Comment' # context => '#pop' # type => 'StringDetect' if ($self->testStringDetect($text, '-->', 0, 0, 0, undef, 0, '#pop', 'HTML Comment')) { return 1 } return 0; }; sub parsectxHTMLEntities { my ($self, $text) = @_; # attribute => 'HTML Entities' # char => ';' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, ';', 0, 0, 0, undef, 0, '#pop', 'HTML Entities')) { return 1 } return 0; }; sub parsectxImageTag { my ($self, $text) = @_; # attribute => 'Image Tags' # char => '>' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '#pop', 'Image Tags')) { return 1 } # attribute => 'Normal Text' # char => '=' # context => '#stay' # type => 'DetectChar' if ($self->testDetectChar($text, '=', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { return 1 } # String => '"[^"]*"' # attribute => 'Attribute Values' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '"[^"]*"', 0, 0, 0, undef, 0, '#stay', 'Attribute Values')) { return 1 } # String => ''[^']*'' # attribute => 'Attribute Values' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\'[^\']*\'', 0, 0, 0, undef, 0, '#stay', 'Attribute Values')) { return 1 } return 0; }; sub parsectxOneLineComment { my ($self, $text) = @_; return 0; }; sub parsectxSCRIPTBlock { my ($self, $text) = @_; # attribute => 'Script Comment' # char => '/' # char1 => '*' # context => 'ctxC Style Comment' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'ctxC Style Comment', 'Script Comment')) { return 1 } # attribute => 'Script Comment' # char => '/' # char1 => '/' # context => 'ctxOne Line Comment' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'ctxOne Line Comment', 'Script Comment')) { return 1 } # String => '"[^"]*"' # attribute => 'Script Strings' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '"[^"]*"', 0, 0, 0, undef, 0, '#stay', 'Script Strings')) { return 1 } # String => ''[^']*'' # attribute => 'Script Strings' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\'[^\']*\'', 0, 0, 0, undef, 0, '#stay', 'Script Strings')) { return 1 } # attribute => 'Script Numbers' # context => '#stay' # type => 'Int' if ($self->testInt($text, 0, undef, 0, '#stay', 'Script Numbers')) { return 1 } # attribute => 'Script Numbers' # context => '#stay' # type => 'Float' if ($self->testFloat($text, 0, undef, 0, '#stay', 'Script Numbers')) { return 1 } # String => '[()[\]=+-*/]+' # attribute => 'Script Operators' # context => '#stay' # type => 'AnyChar' if ($self->testAnyChar($text, '[()[\\]=+-*/]+', 0, 0, undef, 0, '#stay', 'Script Operators')) { return 1 } # String => '{}' # attribute => 'Brackets' # context => '#stay' # type => 'AnyChar' if ($self->testAnyChar($text, '{}', 0, 0, undef, 0, '#stay', 'Brackets')) { return 1 } # String => 'Script Keywords' # attribute => 'Script Keywords' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'Script Keywords', 0, undef, 0, '#stay', 'Script Keywords')) { return 1 } # String => 'Script Objects' # attribute => 'Script Objects' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'Script Objects', 0, undef, 0, '#stay', 'Script Objects')) { return 1 } # String => 'Script Methods' # attribute => 'Script Functions' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'Script Methods', 0, undef, 0, '#stay', 'Script Functions')) { return 1 } # String => '' # attribute => 'Script Tags' # context => '#pop#pop' # type => 'RegExpr' if ($self->testRegExpr($text, '', 0, 0, 0, undef, 0, '#pop#pop', 'Script Tags')) { return 1 } return 0; }; sub parsectxSCRIPTTag { my ($self, $text) = @_; # attribute => 'Script Tags' # char => '>' # context => 'ctxSCRIPT Block' # type => 'DetectChar' if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, 'ctxSCRIPT Block', 'Script Tags')) { return 1 } # attribute => 'Normal Text' # char => '=' # context => '#stay' # type => 'DetectChar' if ($self->testDetectChar($text, '=', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { return 1 } # String => '"[^"]*"' # attribute => 'Attribute Values' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '"[^"]*"', 0, 0, 0, undef, 0, '#stay', 'Attribute Values')) { return 1 } # String => ''[^']*'' # attribute => 'Attribute Values' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\'[^\']*\'', 0, 0, 0, undef, 0, '#stay', 'Attribute Values')) { return 1 } return 0; }; sub parsectxSTYLEBlock { my ($self, $text) = @_; # attribute => 'Script Comment' # char => '/' # char1 => '*' # context => 'ctxC Style Comment' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'ctxC Style Comment', 'Script Comment')) { return 1 } # attribute => 'Brackets' # char => '{' # context => 'ctxStyle Properties' # type => 'DetectChar' if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, 'ctxStyle Properties', 'Brackets')) { return 1 } # String => '' # attribute => 'Style Tags' # context => '#pop#pop' # type => 'RegExpr' if ($self->testRegExpr($text, '', 0, 0, 0, undef, 0, '#pop#pop', 'Style Tags')) { return 1 } return 0; }; sub parsectxSTYLETag { my ($self, $text) = @_; # attribute => 'Style Tags' # char => '>' # context => 'ctxSTYLE Block' # type => 'DetectChar' if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, 'ctxSTYLE Block', 'Style Tags')) { return 1 } # attribute => 'Normal Text' # char => '=' # context => '#stay' # type => 'DetectChar' if ($self->testDetectChar($text, '=', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { return 1 } # String => '"[^"]*"' # attribute => 'Attribute Values' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '"[^"]*"', 0, 0, 0, undef, 0, '#stay', 'Attribute Values')) { return 1 } # String => ''[^']*'' # attribute => 'Attribute Values' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\'[^\']*\'', 0, 0, 0, undef, 0, '#stay', 'Attribute Values')) { return 1 } return 0; }; sub parsectxStyleProperties { my ($self, $text) = @_; # attribute => 'Brackets' # char => '}' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#pop', 'Brackets')) { return 1 } # attribute => 'Script Comment' # char => '/' # char1 => '*' # context => 'ctxC Style Comment' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'ctxC Style Comment', 'Script Comment')) { return 1 } # attribute => 'Normal Text' # char => ':' # context => 'ctxStyle Values' # type => 'DetectChar' if ($self->testDetectChar($text, ':', 0, 0, 0, undef, 0, 'ctxStyle Values', 'Normal Text')) { return 1 } return 0; }; sub parsectxStyleValues { my ($self, $text) = @_; # attribute => 'Normal Text' # char => ';' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, ';', 0, 0, 0, undef, 0, '#pop', 'Normal Text')) { return 1 } # attribute => 'Normal Text' # char => ',' # context => '#stay' # type => 'DetectChar' if ($self->testDetectChar($text, ',', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { return 1 } # attribute => 'Numbers' # context => '#stay' # type => 'Int' if ($self->testInt($text, 0, undef, 0, '#stay', 'Numbers')) { return 1 } # attribute => 'Numbers' # context => '#stay' # type => 'Float' if ($self->testFloat($text, 0, undef, 0, '#stay', 'Numbers')) { return 1 } # String => '#([0-9a-fA-F]{3})|([0-9a-fA-F]{6})' # attribute => 'Numbers' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '#([0-9a-fA-F]{3})|([0-9a-fA-F]{6})', 0, 0, 0, undef, 0, '#stay', 'Numbers')) { return 1 } # String => '"[^"]*"' # attribute => 'Attribute Values' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '"[^"]*"', 0, 0, 0, undef, 0, '#stay', 'Attribute Values')) { return 1 } # String => ''[^']*'' # attribute => 'Attribute Values' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\'[^\']*\'', 0, 0, 0, undef, 0, '#stay', 'Attribute Values')) { return 1 } return 0; }; sub parsectxTableTag { my ($self, $text) = @_; # attribute => 'Table Tags' # char => '>' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '#pop', 'Table Tags')) { return 1 } # attribute => 'Normal Text' # char => '=' # context => '#stay' # type => 'DetectChar' if ($self->testDetectChar($text, '=', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { return 1 } # String => '"[^"]*"' # attribute => 'Attribute Values' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '"[^"]*"', 0, 0, 0, undef, 0, '#stay', 'Attribute Values')) { return 1 } # String => ''[^']*'' # attribute => 'Attribute Values' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\'[^\']*\'', 0, 0, 0, undef, 0, '#stay', 'Attribute Values')) { return 1 } return 0; }; sub parsectxTag { my ($self, $text) = @_; # attribute => 'Tags' # char => '>' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '#pop', 'Tags')) { return 1 } # attribute => 'Normal Text' # char => '=' # context => '#stay' # type => 'DetectChar' if ($self->testDetectChar($text, '=', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { return 1 } # String => '"[^"]*"' # attribute => 'Attribute Values' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '"[^"]*"', 0, 0, 0, undef, 0, '#stay', 'Attribute Values')) { return 1 } # String => ''[^']*'' # attribute => 'Attribute Values' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\'[^\']*\'', 0, 0, 0, undef, 0, '#stay', 'Attribute Values')) { return 1 } return 0; }; 1; __END__ =head1 NAME Syntax::Highlight::Engine::Kate::ColdFusion - a Plugin for ColdFusion syntax highlighting =head1 SYNOPSIS require Syntax::Highlight::Engine::Kate::ColdFusion; my $sh = new Syntax::Highlight::Engine::Kate::ColdFusion([ ]); =head1 DESCRIPTION Syntax::Highlight::Engine::Kate::ColdFusion is a plugin module that provides syntax highlighting for ColdFusion to the Syntax::Haghlight::Engine::Kate highlighting engine. This code is generated from the syntax definition files used by the Kate project. It works quite fine, but can use refinement and optimization. It inherits Syntax::Higlight::Engine::Kate::Template. See also there. =head1 AUTHOR Hans Jeuken (haje toneel demon nl) =head1 BUGS Unknown. If you find any, please contact the authorlibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/Engine/Kate/Logtalk.pm0000644000175000017500000006760212150556557031735 0ustar gregoagregoa# Copyright (c) 2005 - 2006 Hans Jeuken. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. # This file was generated from the 'logtalk.xml' file of the syntax highlight # engine of the kate text editor (http://www.kate-editor.org #kate xml version 1.40 #kate version 2.4 #kate author Paulo Moura (pmoura@logtalk.org) #generated: Sun Feb 3 22:02:05 2008, localtime package Syntax::Highlight::Engine::Kate::Logtalk; our $VERSION = '0.07'; use strict; use warnings; use base('Syntax::Highlight::Engine::Kate::Template'); sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = $class->SUPER::new(@_); $self->attributes({ 'Built-in' => 'Keyword', 'Comment' => 'Comment', 'Directive' => 'Keyword', 'Normal' => 'Normal', 'Number' => 'DecVal', 'Operator' => 'DataType', 'String' => 'String', 'Variable' => 'Others', }); $self->contextdata({ 'atom' => { callback => \&parseatom, attribute => 'String', }, 'directive' => { callback => \&parsedirective, attribute => 'Directive', }, 'entityrelations' => { callback => \&parseentityrelations, attribute => 'Normal', }, 'multiline comment' => { callback => \&parsemultilinecomment, attribute => 'Comment', }, 'normal' => { callback => \&parsenormal, attribute => 'Normal', }, 'single line comment' => { callback => \&parsesinglelinecomment, attribute => 'Comment', lineending => '#pop', }, 'string' => { callback => \&parsestring, attribute => 'String', }, }); $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); $self->basecontext('normal'); $self->keywordscase(1); $self->initialize; bless ($self, $class); return $self; } sub language { return 'Logtalk'; } sub parseatom { my ($self, $text) = @_; # attribute => 'String' # char => ''' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop', 'String')) { return 1 } return 0; }; sub parsedirective { my ($self, $text) = @_; # String => '\b(category|object|protocol)(?=[(])' # attribute => 'Directive' # beginRegion => 'Entity' # context => 'entityrelations' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(category|object|protocol)(?=[(])', 0, 0, 0, undef, 0, 'entityrelations', 'Directive')) { return 1 } # String => '\bend_(category|object|protocol)[.]' # attribute => 'Directive' # context => '#pop' # endRegion => 'Entity' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bend_(category|object|protocol)[.]', 0, 0, 0, undef, 0, '#pop', 'Directive')) { return 1 } # String => '\bp(ublic|r(otected|ivate))(?=[(])' # attribute => 'Directive' # context => '#pop' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bp(ublic|r(otected|ivate))(?=[(])', 0, 0, 0, undef, 0, '#pop', 'Directive')) { return 1 } # String => '\bencoding(?=[(])' # attribute => 'Directive' # context => '#pop' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bencoding(?=[(])', 0, 0, 0, undef, 0, '#pop', 'Directive')) { return 1 } # String => '\bin(fo|itialization)(?=[(])' # attribute => 'Directive' # context => '#pop' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bin(fo|itialization)(?=[(])', 0, 0, 0, undef, 0, '#pop', 'Directive')) { return 1 } # String => '\bdynamic[.]' # attribute => 'Directive' # context => '#pop' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bdynamic[.]', 0, 0, 0, undef, 0, '#pop', 'Directive')) { return 1 } # String => '\b(alias|d(ynamic|iscontiguous)|m(etapredicate|ode|ultifile))(?=[(])' # attribute => 'Directive' # context => '#pop' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(alias|d(ynamic|iscontiguous)|m(etapredicate|ode|ultifile))(?=[(])', 0, 0, 0, undef, 0, '#pop', 'Directive')) { return 1 } # String => '\bop(?=[(])' # attribute => 'Directive' # context => '#pop' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bop(?=[(])', 0, 0, 0, undef, 0, '#pop', 'Directive')) { return 1 } # String => '\b(calls|uses)(?=[(])' # attribute => 'Directive' # context => '#pop' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(calls|uses)(?=[(])', 0, 0, 0, undef, 0, '#pop', 'Directive')) { return 1 } return 0; }; sub parseentityrelations { my ($self, $text) = @_; # String => '\b(extends|i(nstantiates|mp(lements|orts))|specializes)(?=[(])' # attribute => 'Directive' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(extends|i(nstantiates|mp(lements|orts))|specializes)(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Directive')) { return 1 } # attribute => 'Normal' # char => ')' # char1 => '.' # context => 'normal' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, ')', '.', 0, 0, 0, undef, 0, 'normal', 'Normal')) { return 1 } return 0; }; sub parsemultilinecomment { my ($self, $text) = @_; # attribute => 'Comment' # char => '*' # char1 => '/' # context => '#pop' # endRegion => 'Comment' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop', 'Comment')) { return 1 } return 0; }; sub parsenormal { my ($self, $text) = @_; # String => '^\s*:-' # attribute => 'Normal' # context => 'directive' # type => 'RegExpr' if ($self->testRegExpr($text, '^\\s*:-', 0, 0, 0, undef, 0, 'directive', 'Normal')) { return 1 } # String => '\b(after|before)(?=[(])' # attribute => 'Built-in' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(after|before)(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { return 1 } # String => '\b(parameter|this|se(lf|nder))(?=[(])' # attribute => 'Built-in' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(parameter|this|se(lf|nder))(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { return 1 } # String => '\b(current_predicate|predicate_property)(?=[(])' # attribute => 'Built-in' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(current_predicate|predicate_property)(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { return 1 } # String => '\b(expand_term|phrase)(?=[(])' # attribute => 'Built-in' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(expand_term|phrase)(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { return 1 } # String => '\b(abolish|c(reate|urrent))_(object|protocol|category)(?=[(])' # attribute => 'Built-in' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(abolish|c(reate|urrent))_(object|protocol|category)(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { return 1 } # String => '\b(object|protocol|category)_property(?=[(])' # attribute => 'Built-in' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(object|protocol|category)_property(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { return 1 } # String => '\bextends_(object|protocol)(?=[(])' # attribute => 'Built-in' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bextends_(object|protocol)(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { return 1 } # String => '\bimplements_protocol(?=[(])' # attribute => 'Built-in' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bimplements_protocol(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { return 1 } # String => '\b(instantiates|specializes)_class(?=[(])' # attribute => 'Built-in' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(instantiates|specializes)_class(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { return 1 } # String => '\bimports_category(?=[(])' # attribute => 'Built-in' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bimports_category(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { return 1 } # String => '\b(current_event|(abolish|define)_events)(?=[(])' # attribute => 'Built-in' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(current_event|(abolish|define)_events)(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { return 1 } # String => '\b(current|set)_logtalk_flag(?=[(])' # attribute => 'Built-in' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(current|set)_logtalk_flag(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { return 1 } # String => '\blogtalk_(compile|l(ibrary_path|oad))(?=[(])' # attribute => 'Built-in' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\blogtalk_(compile|l(ibrary_path|oad))(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { return 1 } # String => '\b(clause|retract(all)?)(?=[(])' # attribute => 'Built-in' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(clause|retract(all)?)(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { return 1 } # String => '\ba(bolish|ssert(a|z))(?=[(])' # attribute => 'Built-in' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\ba(bolish|ssert(a|z))(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { return 1 } # String => '\b(ca(ll|tch)|throw)(?=[(])' # attribute => 'Built-in' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(ca(ll|tch)|throw)(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { return 1 } # String => '\b(fail|true)\b' # attribute => 'Built-in' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(fail|true)\\b', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { return 1 } # String => '\b((bag|set)of|f(ind|or)all)(?=[(])' # attribute => 'Built-in' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b((bag|set)of|f(ind|or)all)(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { return 1 } # String => '\bunify_with_occurs_check(?=[(])' # attribute => 'Built-in' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bunify_with_occurs_check(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { return 1 } # String => '\b(functor|arg|copy_term)(?=[(])' # attribute => 'Built-in' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(functor|arg|copy_term)(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { return 1 } # String => '\b(rem|mod|abs|sign)(?=[(])' # attribute => 'Built-in' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(rem|mod|abs|sign)(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { return 1 } # String => '\bfloat(_(integer|fractional)_part)?(?=[(])' # attribute => 'Built-in' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bfloat(_(integer|fractional)_part)?(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { return 1 } # String => '\b(floor|truncate|round|ceiling)(?=[(])' # attribute => 'Built-in' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(floor|truncate|round|ceiling)(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { return 1 } # String => '\b(cos|atan|exp|log|s(in|qrt))(?=[(])' # attribute => 'Built-in' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(cos|atan|exp|log|s(in|qrt))(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { return 1 } # String => '\b(var|atom(ic)?|integer|float|compound|n(onvar|umber))(?=[(])' # attribute => 'Built-in' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(var|atom(ic)?|integer|float|compound|n(onvar|umber))(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { return 1 } # String => '\b(current|set)_(in|out)put(?=[(])' # attribute => 'Built-in' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(current|set)_(in|out)put(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { return 1 } # String => '\b(open|close)(?=[(])' # attribute => 'Built-in' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(open|close)(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { return 1 } # String => '\bflush_output(?=[(])' # attribute => 'Built-in' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bflush_output(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { return 1 } # String => '\bflush_output\b' # attribute => 'Built-in' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bflush_output\\b', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { return 1 } # String => '\b(stream_property|at_end_of_stream|set_stream_position)(?=[(])' # attribute => 'Built-in' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(stream_property|at_end_of_stream|set_stream_position)(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { return 1 } # String => '\b(nl|(get|peek|put)_(byte|c(har|ode)))(?=[(])' # attribute => 'Built-in' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(nl|(get|peek|put)_(byte|c(har|ode)))(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { return 1 } # String => '\bnl\b' # attribute => 'Built-in' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bnl\\b', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { return 1 } # String => '\bread(_term)?(?=[(])' # attribute => 'Built-in' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bread(_term)?(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { return 1 } # String => '\bwrite(q|_(canonical|term))?(?=[(])' # attribute => 'Built-in' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bwrite(q|_(canonical|term))?(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { return 1 } # String => '\b(current_)?op(?=[(])' # attribute => 'Built-in' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(current_)?op(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { return 1 } # String => '\b(current_)?char_conversion(?=[(])' # attribute => 'Built-in' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(current_)?char_conversion(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { return 1 } # String => '\batom_(length|c(hars|o(ncat|des)))(?=[(])' # attribute => 'Built-in' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\batom_(length|c(hars|o(ncat|des)))(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { return 1 } # String => '\b(char_code|sub_atom)(?=[(])' # attribute => 'Built-in' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(char_code|sub_atom)(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { return 1 } # String => '\bnumber_c(hars|odes)(?=[(])' # attribute => 'Built-in' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bnumber_c(hars|odes)(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { return 1 } # String => '\b(set|current)_prolog_flag(?=[(])' # attribute => 'Built-in' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(set|current)_prolog_flag(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { return 1 } # String => '\bhalt\b' # attribute => 'Built-in' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bhalt\\b', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { return 1 } # String => '\bhalt(?=[(])' # attribute => 'Built-in' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bhalt(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { return 1 } # String => '\b[A-Z_]\w*' # attribute => 'Variable' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b[A-Z_]\\w*', 0, 0, 0, undef, 0, '#stay', 'Variable')) { return 1 } # attribute => 'Comment' # char => '%' # context => 'single line comment' # type => 'DetectChar' if ($self->testDetectChar($text, '%', 0, 0, 0, undef, 0, 'single line comment', 'Comment')) { return 1 } # attribute => 'Comment' # beginRegion => 'Comment' # char => '/' # char1 => '*' # context => 'multiline comment' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'multiline comment', 'Comment')) { return 1 } # attribute => 'String' # char => '"' # context => 'string' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'string', 'String')) { return 1 } # attribute => 'String' # char => ''' # context => 'atom' # type => 'DetectChar' if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'atom', 'String')) { return 1 } # String => '0'.' # attribute => 'Number' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '0\'.', 0, 0, 0, undef, 0, '#stay', 'Number')) { return 1 } # String => '0b[0-1]+' # attribute => 'Number' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '0b[0-1]+', 0, 0, 0, undef, 0, '#stay', 'Number')) { return 1 } # String => '0o[0-7]+' # attribute => 'Number' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '0o[0-7]+', 0, 0, 0, undef, 0, '#stay', 'Number')) { return 1 } # String => '0x[0-9a-fA-F]+' # attribute => 'Number' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '0x[0-9a-fA-F]+', 0, 0, 0, undef, 0, '#stay', 'Number')) { return 1 } # String => '\d+(\.\d+)?([eE]([-+])?\d+)?' # attribute => 'Number' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\d+(\\.\\d+)?([eE]([-+])?\\d+)?', 0, 0, 0, undef, 0, '#stay', 'Number')) { return 1 } # attribute => 'Operator' # char => ':' # char1 => ':' # context => '#stay' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, ':', ':', 0, 0, 0, undef, 0, '#stay', 'Operator')) { return 1 } # attribute => 'Operator' # char => '^' # char1 => '^' # context => '#stay' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '^', '^', 0, 0, 0, undef, 0, '#stay', 'Operator')) { return 1 } # attribute => 'Operator' # beginRegion => 'external' # char => '{' # context => '#stay' # type => 'DetectChar' if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, '#stay', 'Operator')) { return 1 } # attribute => 'Operator' # char => '}' # context => '#stay' # endRegion => 'external' # type => 'DetectChar' if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#stay', 'Operator')) { return 1 } # String => '\bonce(?=[(])' # attribute => 'Built-in' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bonce(?=[(])', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { return 1 } # String => '\brepeat\b' # attribute => 'Built-in' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\brepeat\\b', 0, 0, 0, undef, 0, '#stay', 'Built-in')) { return 1 } # attribute => 'Operator' # char => '>' # char1 => '>' # context => '#stay' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '>', '>', 0, 0, 0, undef, 0, '#stay', 'Operator')) { return 1 } # attribute => 'Operator' # char => '<' # char1 => '<' # context => '#stay' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '<', '<', 0, 0, 0, undef, 0, '#stay', 'Operator')) { return 1 } # attribute => 'Operator' # char => '/' # char1 => '\' # context => '#stay' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '\\', 0, 0, 0, undef, 0, '#stay', 'Operator')) { return 1 } # attribute => 'Operator' # char => '\' # char1 => '/' # context => '#stay' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '\\', '/', 0, 0, 0, undef, 0, '#stay', 'Operator')) { return 1 } # attribute => 'Operator' # char => '\' # char1 => '\' # context => '#stay' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '\\', '\\', 0, 0, 0, undef, 0, '#stay', 'Operator')) { return 1 } # String => '\bis\b' # attribute => 'Operator' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bis\\b', 0, 0, 0, undef, 0, '#stay', 'Operator')) { return 1 } # String => '=:=' # attribute => 'Operator' # context => '#stay' # type => 'StringDetect' if ($self->testStringDetect($text, '=:=', 0, 0, 0, undef, 0, '#stay', 'Operator')) { return 1 } # String => '=\=' # attribute => 'Operator' # context => '#stay' # type => 'StringDetect' if ($self->testStringDetect($text, '=\\=', 0, 0, 0, undef, 0, '#stay', 'Operator')) { return 1 } # attribute => 'Operator' # char => '<' # context => '#stay' # type => 'DetectChar' if ($self->testDetectChar($text, '<', 0, 0, 0, undef, 0, '#stay', 'Operator')) { return 1 } # attribute => 'Operator' # char => '=' # char1 => '<' # context => '#stay' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '=', '<', 0, 0, 0, undef, 0, '#stay', 'Operator')) { return 1 } # attribute => 'Operator' # char => '>' # context => '#stay' # type => 'DetectChar' if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '#stay', 'Operator')) { return 1 } # attribute => 'Operator' # char => '>' # char1 => '=' # context => '#stay' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '>', '=', 0, 0, 0, undef, 0, '#stay', 'Operator')) { return 1 } # String => '=..' # attribute => 'Operator' # context => '#stay' # type => 'StringDetect' if ($self->testStringDetect($text, '=..', 0, 0, 0, undef, 0, '#stay', 'Operator')) { return 1 } # attribute => 'Operator' # char => '=' # context => '#stay' # type => 'DetectChar' if ($self->testDetectChar($text, '=', 0, 0, 0, undef, 0, '#stay', 'Operator')) { return 1 } # attribute => 'Operator' # char => '\' # char1 => '=' # context => '#stay' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '\\', '=', 0, 0, 0, undef, 0, '#stay', 'Operator')) { return 1 } # attribute => 'Operator' # char => '=' # char1 => '=' # context => '#stay' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '=', '=', 0, 0, 0, undef, 0, '#stay', 'Operator')) { return 1 } # String => '\==' # attribute => 'Operator' # context => '#stay' # type => 'StringDetect' if ($self->testStringDetect($text, '\\==', 0, 0, 0, undef, 0, '#stay', 'Operator')) { return 1 } # String => '@=<' # attribute => 'Operator' # context => '#stay' # type => 'StringDetect' if ($self->testStringDetect($text, '@=<', 0, 0, 0, undef, 0, '#stay', 'Operator')) { return 1 } # attribute => 'Operator' # char => '@' # char1 => '<' # context => '#stay' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '@', '<', 0, 0, 0, undef, 0, '#stay', 'Operator')) { return 1 } # String => '@>=' # attribute => 'Operator' # context => '#stay' # type => 'StringDetect' if ($self->testStringDetect($text, '@>=', 0, 0, 0, undef, 0, '#stay', 'Operator')) { return 1 } # attribute => 'Operator' # char => '@' # char1 => '>' # context => '#stay' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '@', '>', 0, 0, 0, undef, 0, '#stay', 'Operator')) { return 1 } # attribute => 'Operator' # char => '/' # char1 => '/' # context => '#stay' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, '#stay', 'Operator')) { return 1 } # String => '+-*/' # attribute => 'Operator' # context => '#stay' # type => 'AnyChar' if ($self->testAnyChar($text, '+-*/', 0, 0, undef, 0, '#stay', 'Operator')) { return 1 } # String => '\b(mod|rem)\b' # attribute => 'Operator' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(mod|rem)\\b', 0, 0, 0, undef, 0, '#stay', 'Operator')) { return 1 } # attribute => 'Operator' # char => '*' # char1 => '*' # context => '#stay' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '*', '*', 0, 0, 0, undef, 0, '#stay', 'Operator')) { return 1 } # String => '-->' # attribute => 'Operator' # context => '#stay' # type => 'StringDetect' if ($self->testStringDetect($text, '-->', 0, 0, 0, undef, 0, '#stay', 'Operator')) { return 1 } # String => '!;' # attribute => 'Operator' # context => '#stay' # type => 'AnyChar' if ($self->testAnyChar($text, '!;', 0, 0, undef, 0, '#stay', 'Operator')) { return 1 } # attribute => 'Operator' # char => '-' # char1 => '>' # context => '#stay' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '-', '>', 0, 0, 0, undef, 0, '#stay', 'Operator')) { return 1 } # attribute => 'Operator' # char => '\' # char1 => '+' # context => '#stay' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '\\', '+', 0, 0, 0, undef, 0, '#stay', 'Operator')) { return 1 } # String => '?@' # attribute => 'Operator' # context => '#stay' # type => 'AnyChar' if ($self->testAnyChar($text, '?@', 0, 0, undef, 0, '#stay', 'Operator')) { return 1 } # attribute => 'Normal' # char => ':' # char1 => '-' # context => '#stay' # firstNonSpace => 'false' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, ':', '-', 0, 0, 0, undef, 0, '#stay', 'Normal')) { return 1 } # String => '\b[a-z]\w*' # attribute => 'Normal' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b[a-z]\\w*', 0, 0, 0, undef, 0, '#stay', 'Normal')) { return 1 } return 0; }; sub parsesinglelinecomment { my ($self, $text) = @_; return 0; }; sub parsestring { my ($self, $text) = @_; # attribute => 'String' # char => '"' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) { return 1 } return 0; }; 1; __END__ =head1 NAME Syntax::Highlight::Engine::Kate::Logtalk - a Plugin for Logtalk syntax highlighting =head1 SYNOPSIS require Syntax::Highlight::Engine::Kate::Logtalk; my $sh = new Syntax::Highlight::Engine::Kate::Logtalk([ ]); =head1 DESCRIPTION Syntax::Highlight::Engine::Kate::Logtalk is a plugin module that provides syntax highlighting for Logtalk to the Syntax::Haghlight::Engine::Kate highlighting engine. This code is generated from the syntax definition files used by the Kate project. It works quite fine, but can use refinement and optimization. It inherits Syntax::Higlight::Engine::Kate::Template. See also there. =head1 AUTHOR Hans Jeuken (haje toneel demon nl) =head1 BUGS Unknown. If you find any, please contact the authorlibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/Engine/Kate/E_Language.pm0000644000175000017500000002316112150556557032317 0ustar gregoagregoa# Copyright (c) 2005 - 2006 Hans Jeuken. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. # This file was generated from the 'e.xml' file of the syntax highlight # engine of the kate text editor (http://www.kate-editor.org #kate xml version 0.21 #kate version 2.3 #generated: Sun Feb 3 22:02:04 2008, localtime package Syntax::Highlight::Engine::Kate::E_Language; our $VERSION = '0.07'; use strict; use warnings; use base('Syntax::Highlight::Engine::Kate::Template'); sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = $class->SUPER::new(@_); $self->attributes({ 'Action' => 'Reserved', 'Bit' => 'DecVal', 'Comment' => 'Comment', 'Data Type' => 'DataType', 'Function' => 'Function', 'Integer' => 'DecVal', 'Keyword' => 'Keyword', 'Normal Text' => 'Normal', 'Operators' => 'Normal', 'OutSide E code' => 'Comment', 'Statement' => 'Others', 'Vector' => 'String', }); $self->listAdd('Action', 'C', 'add', 'also', 'and', 'as', 'as_a', 'break', 'code', 'compute', 'computed', 'delayed', 'do', 'each', 'else', 'emit', 'empty', 'end', 'exit', 'finish', 'for', 'from', 'if', 'in', 'is', 'like', 'log', 'new', 'no', 'not', 'only', 'or', 'out', 'read', 'repeat', 'return', 'reverse', 'routine', 'step', 'then', 'to', 'traceable', 'untraceable', 'var', 'when', 'while', 'with', 'write', 'xor', ); $self->listAdd('Cover', 'address', 'cover', 'error', 'event', 'events', 'illegal', 'item', 'kind', 'length', 'range', 'ranges', 'sample', 'text', 'transition', 'value', ); $self->listAdd('Function', 'append', 'clear', 'crc_32', 'deep_compare', 'deep_compare_physical', 'delete', 'dut_error', 'hex', 'init', 'is_empty', 'pack', 'pop0', 'post_generate', 'pre_generate', 'pre_generate', 'run', 'set_config', 'setup', 'size', 'stop_run', 'unpack', ); $self->listAdd('Generation', 'before', 'by', 'choose', 'gen', 'keep', 'keeping', 'matches', 'next', 'select', 'sequence', 'soft', 'using', ); $self->listAdd('Simulator', 'all', 'always', 'basic', 'call', 'change', 'check', 'clock', 'cycle', 'cycles', 'expect', 'fall', 'first', 'forever', 'idle', 'initial', 'negedge', 'on', 'others', 'posedge', 'rise', 'start', 'task', 'that', 'time', 'until', 'verilog', 'vhdl', 'wait', 'within', ); $self->listAdd('Statement', 'DOECHO', 'ECHO', 'chars', 'define', 'event', 'extend', 'import', 'initialize', 'non_terminal', 'script', 'struct', 'testgroup', 'type', 'unit', ); $self->listAdd('Type', 'FALSE', 'MAX_INT', 'MIN_INT', 'NULL', 'TRUE', 'UNDEF', 'bit', 'bits', 'body', 'bool', 'byte', 'byte_array', 'continue', 'copy', 'default', 'external_pointer', 'file', 'files', 'form', 'global', 'index', 'init', 'int', 'it', 'list', 'load', 'long', 'me', 'method', 'module', 'ntv', 'of', 'pat', 'print', 'result', 'source_ref', 'string', 'symtab', 'sys', 'test', 'uint', 'untyped', 'vec', ); $self->contextdata({ 'comment' => { callback => \&parsecomment, attribute => 'Comment', lineending => '#pop', }, 'normal' => { callback => \&parsenormal, attribute => 'Normal Text', }, 'out_comment' => { callback => \&parseout_comment, attribute => 'OutSide E code', }, 'string' => { callback => \&parsestring, attribute => 'Vector', }, }); $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); $self->basecontext('out_comment'); $self->keywordscase(0); $self->initialize; bless ($self, $class); return $self; } sub language { return 'E Language'; } sub parsecomment { my ($self, $text) = @_; return 0; }; sub parsenormal { my ($self, $text) = @_; # attribute => 'Operators' # beginRegion => 'Region1' # char => '{' # context => '#stay' # type => 'DetectChar' if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, '#stay', 'Operators')) { return 1 } # attribute => 'Operators' # char => '}' # context => '#stay' # endRegion => 'Region1' # type => 'DetectChar' if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#stay', 'Operators')) { return 1 } # attribute => 'Integer' # context => '#stay' # type => 'HlCHex' if ($self->testHlCHex($text, 0, undef, 0, '#stay', 'Integer')) { return 1 } # attribute => 'Integer' # context => '#stay' # type => 'HlCOct' if ($self->testHlCOct($text, 0, undef, 0, '#stay', 'Integer')) { return 1 } # attribute => 'Integer' # context => '#stay' # type => 'Int' if ($self->testInt($text, 0, undef, 0, '#stay', 'Integer')) { return 1 } # attribute => 'OutSide E code' # char => ''' # char1 => '>' # context => 'out_comment' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '\'', '>', 0, 0, 0, undef, 0, 'out_comment', 'OutSide E code')) { return 1 } # attribute => 'Comment' # char => '-' # char1 => '-' # context => 'comment' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '-', '-', 0, 0, 0, undef, 0, 'comment', 'Comment')) { return 1 } # attribute => 'Comment' # char => '/' # char1 => '/' # context => 'comment' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'comment', 'Comment')) { return 1 } # attribute => 'Vector' # char => '"' # context => 'string' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'string', 'Vector')) { return 1 } # String => ''[&><=:+\-*\|].,;' # attribute => 'Operators' # context => '#stay' # type => 'AnyChar' if ($self->testAnyChar($text, '\'[&><=:+\\-*\\|].,;', 0, 0, undef, 0, '#stay', 'Operators')) { return 1 } # String => 'Type' # attribute => 'Data Type' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'Type', 0, undef, 0, '#stay', 'Data Type')) { return 1 } # String => 'Function' # attribute => 'Function' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'Function', 0, undef, 0, '#stay', 'Function')) { return 1 } # String => 'Statement' # attribute => 'Statement' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'Statement', 0, undef, 0, '#stay', 'Statement')) { return 1 } # String => 'Action' # attribute => 'Action' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'Action', 0, undef, 0, '#stay', 'Action')) { return 1 } # String => 'Generation' # attribute => 'Keyword' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'Generation', 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'Cover' # attribute => 'Keyword' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'Cover', 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'Simulator' # attribute => 'Keyword' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'Simulator', 0, undef, 0, '#stay', 'Keyword')) { return 1 } return 0; }; sub parseout_comment { my ($self, $text) = @_; # attribute => 'OutSide E code' # char => '<' # char1 => ''' # context => '#pop' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '<', '\'', 0, 0, 0, undef, 0, '#pop', 'OutSide E code')) { return 1 } return 0; }; sub parsestring { my ($self, $text) = @_; # attribute => 'Vector' # char => '"' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'Vector')) { return 1 } return 0; }; 1; __END__ =head1 NAME Syntax::Highlight::Engine::Kate::E_Language - a Plugin for E Language syntax highlighting =head1 SYNOPSIS require Syntax::Highlight::Engine::Kate::E_Language; my $sh = new Syntax::Highlight::Engine::Kate::E_Language([ ]); =head1 DESCRIPTION Syntax::Highlight::Engine::Kate::E_Language is a plugin module that provides syntax highlighting for E Language to the Syntax::Haghlight::Engine::Kate highlighting engine. This code is generated from the syntax definition files used by the Kate project. It works quite fine, but can use refinement and optimization. It inherits Syntax::Higlight::Engine::Kate::Template. See also there. =head1 AUTHOR Hans Jeuken (haje toneel demon nl) =head1 BUGS Unknown. If you find any, please contact the authorlibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/Engine/Kate/Clipper.pm0000644000175000017500000005170212150556557031730 0ustar gregoagregoa# Copyright (c) 2005 - 2006 Hans Jeuken. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. # This file was generated from the 'clipper.xml' file of the syntax highlight # engine of the kate text editor (http://www.kate-editor.org #kate xml version 1.05 #kate version 2.3 #kate author Andrey Cherepanov (sibskull@mail.ru) #generated: Sun Feb 3 22:02:04 2008, localtime package Syntax::Highlight::Engine::Kate::Clipper; our $VERSION = '0.07'; use strict; use warnings; use base('Syntax::Highlight::Engine::Kate::Template'); sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = $class->SUPER::new(@_); $self->attributes({ 'Command' => 'DataType', 'Comment' => 'Comment', 'Decimal' => 'DecVal', 'Eval Block' => 'Others', 'Function' => 'Function', 'Hex' => 'BaseN', 'Keyword' => 'Keyword', 'Normal Text' => 'Normal', 'Prep. Lib' => 'Others', 'Preprocessor' => 'Others', 'Region Marker' => 'RegionMarker', 'String' => 'String', 'String Char' => 'Char', 'Symbol' => 'Normal', }); $self->listAdd('commands', '?', '??', '@', 'accept', 'all', 'alternate', 'append', 'ascending', 'average', 'bell', 'blank', 'box', 'century', 'clear', 'close', 'coclor', 'color', 'commit', 'confirm', 'console', 'continue', 'copy', 'count', 'create', 'cursor', 'date', 'decimals', 'default', 'delete', 'deleted', 'delimiters', 'descending', 'device', 'display', 'do', 'eject', 'epoch', 'erase', 'escape', 'eval', 'every', 'exact', 'extended', 'file', 'filter', 'fixed', 'form', 'from', 'get', 'gets', 'go', 'goto', 'index', 'input', 'intensity', 'join', 'key', 'keyboard', 'label', 'list', 'locate', 'margin', 'memory', 'menu', 'message', 'new', 'on', 'order', 'pack', 'path', 'pict', 'printer', 'prompt', 'quit', 'range', 'read', 'recall', 'record', 'reindex', 'relation', 'release', 'rename', 'replace', 'report', 'rest', 'restore', 'run', 'save', 'say', 'scoreboard', 'seek', 'select', 'set', 'skip', 'softseek', 'sort', 'structure', 'sum', 'tag', 'to', 'total', 'type', 'typeahead', 'unique', 'unlock', 'update', 'use', 'valid', 'wait', 'when', 'with', 'wrap', 'zap', ); $self->listAdd('functions', 'aadd', 'abs', 'achoice', 'aclone', 'acopy', 'adel', 'aeval', 'afill', 'ains', 'alert', 'alias', 'alltrim', 'altd', 'array', 'ascan', 'asize', 'asort', 'at', 'atail', 'bin2i', 'bin2l', 'bin2w', 'bof', 'break', 'browse', 'cdowchr', 'chr', 'cmonth', 'col', 'colorselect', 'ctod', 'curdir', 'date', 'day', 'dbappend', 'dbclearall', 'dbclearfilter', 'dbclearindex', 'dbclearrelation', 'dbcloseall', 'dbclosearea', 'dbcommit', 'dbcommitall', 'dbcreate', 'dbcreateindex', 'dbdelete', 'dbedit', 'dbeval', 'dbf', 'dbfilter', 'dbgobottom', 'dbgoto', 'dbgotop', 'dbrecall', 'dbreindex', 'dbrelation', 'dbrlock', 'dbrlocklist', 'dbrselect', 'dbrunlock', 'dbseek', 'dbselectarea', 'dbsetfilter', 'dbsetindex', 'dbsetorder', 'dbsetrelation', 'dbskip', 'dbstruct', 'dbunlock', 'dbunlockall', 'dbusearea', 'deleted', 'descend', 'devout', 'devpos', 'directory', 'dispbegin', 'dispbox', 'dispcount', 'dispend', 'dispout', 'dispspace', 'doserror', 'dow', 'dtoc', 'dtos', 'empty', 'eof', 'errorblock', 'errorinhandler', 'errorlevel', 'eval', 'exp', 'fclose', 'fcount', 'fcreate', 'ferase', 'ferror', 'field', 'fieldblock', 'fieldget', 'fieldname', 'fieldpos', 'fieldput', 'fieldwblock', 'file', 'flock', 'fopen', 'found', 'fread', 'freadstr', 'frename', 'fseek', 'fwrite', 'getactive', 'getenv', 'hardcr', 'header', 'i2bin', 'iif', 'indexext', 'indexkey', 'indexord', 'inkey', 'int', 'isalpha', 'iscolor', 'isdigit', 'islower', 'isprinter', 'isupper', 'l2bin', 'lastkey', 'lastrec', 'left', 'len', 'lock', 'log', 'lower', 'ltrim', 'lupdate', 'max', 'maxcol', 'maxrow', 'memoedit', 'memoline', 'memoread', 'memory', 'memotran', 'memowrit', 'memvarblock', 'min', 'mlcount', 'mlctopos', 'mlpos', 'mod', 'month', 'mpostolc', 'neterr', 'netname', 'nextkey', 'nosnow', 'ordbagext', 'ordbagname', 'ordcreate', 'orddestroy', 'ordfor', 'ordkey', 'ordlistadd', 'ordlistclear', 'ordlistrebuild', 'ordname', 'ordnumber', 'ordsetfocus', 'os', 'outerr', 'outstd', 'padc', 'padl', 'padr', 'pcol', 'pcount', 'proclineprocname', 'prow', 'qout', 'qqout', 'rat', 'rddlist', 'rddname', 'rddsetdefault', 'readexit', 'readinsert', 'readmodal', 'readvar', 'reccount', 'recno', 'recsize', 'replicate', 'restscreen', 'right', 'rlock', 'round', 'row', 'rtrim', 'savesreen', 'scroll', 'seconds', 'select', 'setblink', 'setcancel', 'setcolor', 'setcursor', 'setkey', 'setmode', 'setpos', 'setprc', 'soundex', 'space', 'sqrt', 'str', 'strtran', 'stuff', 'substr', 'time', 'tone', 'transform', 'trim', 'updated', 'upper', 'used', 'val', 'valtype', 'version', ); $self->listAdd('keywords', '.and.', '.f.', '.not.', '.or.', '.t.', 'announce', 'begin', 'case', 'command', 'define', 'do', 'else', 'elseif', 'endcase', 'enddo', 'endif', 'error', 'exit', 'field', 'for', 'function', 'if', 'ifdef', 'include', 'init', 'inndef', 'local', 'memvar', 'next', 'nil', 'other', 'parameters', 'private', 'procedure', 'public', 'request', 'return', 'sequence', 'static', 'stdout', 'traslate', 'undef', 'while', 'xcommand', 'xtranslate', ); $self->contextdata({ 'BlockComment' => { callback => \&parseBlockComment, attribute => 'Comment', }, 'EvalBlock' => { callback => \&parseEvalBlock, attribute => 'Eval Block', }, 'LineComment' => { callback => \&parseLineComment, attribute => 'Comment', lineending => '#pop', }, 'Normal' => { callback => \&parseNormal, attribute => 'Normal Text', }, 'Preprocessor' => { callback => \&parsePreprocessor, attribute => 'Preprocessor', lineending => '#pop', }, 'String' => { callback => \&parseString, attribute => 'String', lineending => '#pop', }, 'String2' => { callback => \&parseString2, attribute => 'String', lineending => '#pop', }, }); $self->deliminators('\\s||\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\|\\?|\\.'); $self->basecontext('Normal'); $self->keywordscase(0); $self->initialize; bless ($self, $class); return $self; } sub language { return 'Clipper'; } sub parseBlockComment { my ($self, $text) = @_; # attribute => 'Comment' # char => '*' # char1 => '/' # context => '#pop' # endRegion => 'Comment2' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop', 'Comment')) { return 1 } # String => '(FIXME|TODO|NOT(IC)?E)' # attribute => 'Command' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '(FIXME|TODO|NOT(IC)?E)', 0, 0, 0, undef, 0, '#stay', 'Command')) { return 1 } return 0; }; sub parseEvalBlock { my ($self, $text) = @_; # attribute => 'Eval Block' # context => '#stay' # type => 'LineContinue' if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'Eval Block')) { return 1 } # attribute => 'Eval Block' # char => '}' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#pop', 'Eval Block')) { return 1 } return 0; }; sub parseLineComment { my ($self, $text) = @_; # String => '(FIXME|TODO|NOT(IC)?E)' # attribute => 'Command' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '(FIXME|TODO|NOT(IC)?E)', 0, 0, 0, undef, 0, '#stay', 'Command')) { return 1 } return 0; }; sub parseNormal { my ($self, $text) = @_; # String => '\bfunction\b' # attribute => 'Keyword' # beginRegion => 'regFunction' # context => '#stay' # insensitive => 'TRUE' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bfunction\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '^return\b' # attribute => 'Keyword' # context => '#stay' # endRegion => 'regFunction' # insensitive => 'TRUE' # type => 'RegExpr' if ($self->testRegExpr($text, '^return\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '\bbegin\s+sequence\b' # attribute => 'Keyword' # beginRegion => 'regSequence' # context => '#stay' # insensitive => 'TRUE' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bbegin\\s+sequence\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '\bend\s+sequence\b' # attribute => 'Keyword' # context => '#stay' # endRegion => 'regSequence' # insensitive => 'TRUE' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bend\\s+sequence\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '\bdo\s+case\b' # attribute => 'Keyword' # beginRegion => 'regDoCase' # context => '#stay' # insensitive => 'TRUE' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bdo\\s+case\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '\bendcase\b' # attribute => 'Keyword' # context => '#stay' # endRegion => 'regDoCase' # insensitive => 'TRUE' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bendcase\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '\bdo\s+while\b' # attribute => 'Keyword' # beginRegion => 'regDoWhile' # context => '#stay' # insensitive => 'TRUE' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bdo\\s+while\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '\benddo\b' # attribute => 'Keyword' # context => '#stay' # endRegion => 'regDoWhile' # insensitive => 'TRUE' # type => 'RegExpr' if ($self->testRegExpr($text, '\\benddo\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '\bfor\b' # attribute => 'Keyword' # beginRegion => 'regFor' # context => '#stay' # insensitive => 'TRUE' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bfor\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '\bnext\b' # attribute => 'Keyword' # context => '#stay' # endRegion => 'regFor' # insensitive => 'TRUE' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bnext\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '\bif\b' # attribute => 'Keyword' # beginRegion => 'regIf' # context => '#stay' # insensitive => 'TRUE' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bif\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '\belseif\b' # attribute => 'Keyword' # beginRegion => 'regIf' # context => '#stay' # endRegion => 'regIf' # insensitive => 'TRUE' # type => 'RegExpr' if ($self->testRegExpr($text, '\\belseif\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '\belse\b' # attribute => 'Keyword' # beginRegion => 'regIf' # context => '#stay' # endRegion => 'regIf' # insensitive => 'TRUE' # type => 'RegExpr' if ($self->testRegExpr($text, '\\belse\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '\bendif\b' # attribute => 'Keyword' # context => '#stay' # endRegion => 'regIf' # insensitive => 'TRUE' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bendif\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '\bswitch\b' # attribute => 'Keyword' # beginRegion => 'regSwitch' # context => '#stay' # insensitive => 'TRUE' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bswitch\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '\bendswitch\b' # attribute => 'Keyword' # context => '#stay' # endRegion => 'regSwitch' # insensitive => 'TRUE' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bendswitch\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'keywords' # attribute => 'Keyword' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'commands' # attribute => 'Command' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'commands', 0, undef, 0, '#stay', 'Command')) { return 1 } # String => 'functions' # attribute => 'Function' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'functions', 0, undef, 0, '#stay', 'Function')) { return 1 } # attribute => 'String Char' # context => '#stay' # type => 'HlCHex' if ($self->testHlCHex($text, 0, undef, 0, '#stay', 'String Char')) { return 1 } # attribute => 'String' # char => '"' # context => 'String' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) { return 1 } # String => '//\s*BEGIN.*$' # attribute => 'Region Marker' # beginRegion => 'regMarker' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '//\\s*BEGIN.*$', 0, 0, 0, undef, 0, '#stay', 'Region Marker')) { return 1 } # String => '//\s*END.*$' # attribute => 'Region Marker' # context => '#stay' # endRegion => 'regMarker' # type => 'RegExpr' if ($self->testRegExpr($text, '//\\s*END.*$', 0, 0, 0, undef, 0, '#stay', 'Region Marker')) { return 1 } # attribute => 'Comment' # char => '/' # char1 => '/' # context => 'LineComment' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'LineComment', 'Comment')) { return 1 } # String => '^\s*\*.*$' # attribute => 'Comment' # context => 'LineComment' # type => 'RegExpr' if ($self->testRegExpr($text, '^\\s*\\*.*$', 0, 0, 0, undef, 0, 'LineComment', 'Comment')) { return 1 } # attribute => 'Comment' # beginRegion => 'Comment2' # char => '/' # char1 => '*' # context => 'BlockComment' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'BlockComment', 'Comment')) { return 1 } # String => '!%&()+,-<:=>[]^~' # attribute => 'Symbol' # context => '#stay' # type => 'AnyChar' if ($self->testAnyChar($text, '!%&()+,-<:=>[]^~', 0, 0, undef, 0, '#stay', 'Symbol')) { return 1 } # String => '#' # attribute => 'Preprocessor' # context => 'Preprocessor' # type => 'RegExpr' if ($self->testRegExpr($text, '#', 0, 0, 0, undef, 0, 'Preprocessor', 'Preprocessor')) { return 1 } # attribute => 'Eval Block' # char => '{' # char1 => '|' # context => 'EvalBlock' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '{', '|', 0, 0, 0, undef, 0, 'EvalBlock', 'Eval Block')) { return 1 } # attribute => 'String' # char => ''' # context => 'String2' # type => 'DetectChar' if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'String2', 'String')) { return 1 } return 0; }; sub parsePreprocessor { my ($self, $text) = @_; # attribute => 'Preprocessor' # context => '#stay' # type => 'LineContinue' if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'Preprocessor')) { return 1 } # attribute => 'Prep. Lib' # char => '"' # char1 => '"' # context => '#stay' # type => 'RangeDetect' if ($self->testRangeDetect($text, '"', '"', 0, 0, undef, 0, '#stay', 'Prep. Lib')) { return 1 } # attribute => 'Prep. Lib' # char => '<' # char1 => '>' # context => '#stay' # type => 'RangeDetect' if ($self->testRangeDetect($text, '<', '>', 0, 0, undef, 0, '#stay', 'Prep. Lib')) { return 1 } # String => '//\s*BEGIN.*$' # attribute => 'Region Marker' # beginRegion => 'regMarker' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '//\\s*BEGIN.*$', 0, 0, 0, undef, 0, '#stay', 'Region Marker')) { return 1 } # String => '//\s*END.*$' # attribute => 'Region Marker' # context => '#stay' # endRegion => 'regMarker' # type => 'RegExpr' if ($self->testRegExpr($text, '//\\s*END.*$', 0, 0, 0, undef, 0, '#stay', 'Region Marker')) { return 1 } # attribute => 'Comment' # char => '/' # char1 => '/' # context => 'LineComment' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'LineComment', 'Comment')) { return 1 } # attribute => 'Comment' # beginRegion => 'Comment2' # char => '/' # char1 => '*' # context => 'BlockComment' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'BlockComment', 'Comment')) { return 1 } return 0; }; sub parseString { my ($self, $text) = @_; # attribute => 'String' # context => '#stay' # type => 'LineContinue' if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'String')) { return 1 } # attribute => 'String Char' # context => '#stay' # type => 'HlCStringChar' if ($self->testHlCStringChar($text, 0, undef, 0, '#stay', 'String Char')) { return 1 } # attribute => 'String' # char => '"' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) { return 1 } return 0; }; sub parseString2 { my ($self, $text) = @_; # attribute => 'String' # context => '#stay' # type => 'LineContinue' if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'String')) { return 1 } # attribute => 'String Char' # context => '#stay' # type => 'HlCStringChar' if ($self->testHlCStringChar($text, 0, undef, 0, '#stay', 'String Char')) { return 1 } # attribute => 'String' # char => ''' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop', 'String')) { return 1 } return 0; }; 1; __END__ =head1 NAME Syntax::Highlight::Engine::Kate::Clipper - a Plugin for Clipper syntax highlighting =head1 SYNOPSIS require Syntax::Highlight::Engine::Kate::Clipper; my $sh = new Syntax::Highlight::Engine::Kate::Clipper([ ]); =head1 DESCRIPTION Syntax::Highlight::Engine::Kate::Clipper is a plugin module that provides syntax highlighting for Clipper to the Syntax::Haghlight::Engine::Kate highlighting engine. This code is generated from the syntax definition files used by the Kate project. It works quite fine, but can use refinement and optimization. It inherits Syntax::Higlight::Engine::Kate::Template. See also there. =head1 AUTHOR Hans Jeuken (haje toneel demon nl) =head1 BUGS Unknown. If you find any, please contact the authorlibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/Engine/Kate/CSS_PHP.pm0000644000175000017500000007200612150556557031471 0ustar gregoagregoa# Copyright (c) 2005 - 2006 Hans Jeuken. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. # This file was generated from the 'css-php.xml' file of the syntax highlight # engine of the kate text editor (http://www.kate-editor.org #kate xml version 1.99 #kate version 2.4 #kate author Wilbert Berendsen (wilbert@kde.nl) #generated: Sun Feb 3 22:02:04 2008, localtime package Syntax::Highlight::Engine::Kate::CSS_PHP; our $VERSION = '0.07'; use strict; use warnings; use base('Syntax::Highlight::Engine::Kate::Template'); sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = $class->SUPER::new(@_); $self->attributes({ 'Alert' => 'Alert', 'At Rule' => 'DecVal', 'Comment' => 'Comment', 'Error' => 'Error', 'Important' => 'Keyword', 'Media' => 'DecVal', 'Normal Text' => 'Normal', 'Property' => 'Keyword', 'Region Marker' => 'RegionMarker', 'Selector Attr' => 'Char', 'Selector Class' => 'Float', 'Selector Id' => 'Float', 'Selector Pseudo' => 'DecVal', 'String' => 'String', 'Unknown Property' => 'Error', 'Value' => 'DataType', }); $self->listAdd('colors', 'ActiveBorder', 'ActiveCaption', 'AppWorkspace', 'Background', 'ButtonFace', 'ButtonHighlight', 'ButtonShadow', 'ButtonText', 'CaptionText', 'GrayText', 'Highlight', 'HighlightText', 'InactiveBorder', 'InactiveCaption', 'InactiveCaptionText', 'InfoBackground', 'InfoText', 'Menu', 'MenuText', 'Scrollbar', 'ThreeDDarkShadow', 'ThreeDFace', 'ThreeDHighlight', 'ThreeDLightShadow', 'ThreeDShadow', 'Window', 'WindowFrame', 'WindowText', 'aqua', 'black', 'blue', 'fuchsia', 'gray', 'green', 'lime', 'maroon', 'navy', 'olive', 'purple', 'red', 'silver', 'teal', 'white', 'yellow', ); $self->listAdd('mediatypes', 'all', 'aural', 'braille', 'embossed', 'handheld', 'print', 'projection', 'screen', 'tty', 'tv', ); $self->listAdd('paren', 'attr', 'counter', 'counters', 'format', 'local', 'rect', 'rgb', 'url', ); $self->listAdd('properties', 'ascent', 'azimuth', 'background', 'background-attachment', 'background-color', 'background-image', 'background-position', 'background-repeat', 'baseline', 'bbox', 'border', 'border-bottom', 'border-bottom-color', 'border-bottom-style', 'border-bottom-width', 'border-collapse', 'border-color', 'border-left', 'border-left-color', 'border-left-style', 'border-left-width', 'border-right', 'border-right-color', 'border-right-style', 'border-right-width', 'border-spacing', 'border-style', 'border-top', 'border-top-color', 'border-top-style', 'border-top-width', 'border-width', 'bottom', 'box-sizing', 'cap-height', 'caption-side', 'centerline', 'clear', 'clip', 'color', 'content', 'counter-increment', 'counter-reset', 'cue', 'cue-after', 'cue-before', 'cursor', 'definition-src', 'descent', 'direction', 'display', 'elevation', 'empty-cells', 'float', 'font', 'font-family', 'font-family', 'font-size', 'font-size', 'font-size-adjust', 'font-stretch', 'font-stretch', 'font-style', 'font-style', 'font-variant', 'font-variant', 'font-weight', 'font-weight', 'height', 'konq_bgpos_x', 'konq_bgpos_y', 'left', 'letter-spacing', 'line-height', 'list-style', 'list-style-image', 'list-style-keyword', 'list-style-position', 'list-style-type', 'margin', 'margin-bottom', 'margin-left', 'margin-right', 'margin-top', 'marker-offset', 'mathline', 'max-height', 'max-width', 'min-height', 'min-width', 'opacity', 'orphans', 'outline', 'outline-color', 'outline-style', 'outline-width', 'overflow', 'padding', 'padding-bottom', 'padding-left', 'padding-right', 'padding-top', 'page', 'page-break-after', 'page-break-before', 'page-break-inside', 'panose-1', 'pause', 'pause-after', 'pause-before', 'pitch', 'pitch-range', 'play-during', 'position', 'quotes', 'richness', 'right', 'size', 'slope', 'speak', 'speak-header', 'speak-numeral', 'speak-punctuation', 'speech-rate', 'src', 'stemh', 'stemv', 'stress', 'table-layout', 'text-align', 'text-decoration', 'text-decoration-color', 'text-indent', 'text-shadow', 'text-shadow', 'text-transform', 'top', 'topline', 'unicode-bidi', 'unicode-range', 'units-per-em', 'vertical-align', 'visibility', 'voice-family', 'volume', 'white-space', 'widows', 'width', 'widths', 'word-spacing', 'x-height', 'z-index', ); $self->listAdd('pseudoclasses', 'active', 'after', 'before', 'checked', 'disabled', 'empty', 'enabled', 'first-child', 'first-letter', 'first-line', 'first-of-type', 'focus', 'hover', 'indeterminate', 'last-child', 'last-of-type', 'link', 'only-child', 'only-of-type', 'root', 'selection', 'target', 'visited', ); $self->listAdd('types', '100', '200', '300', '400', '500', '600', '700', '800', '900', 'above', 'absolute', 'always', 'armenian', 'auto', 'avoid', 'baseline', 'below', 'bidi-override', 'blink', 'block', 'bold', 'bolder', 'border-box', 'both', 'bottom', 'box', 'break', 'capitalize', 'caption', 'center', 'circle', 'cjk-ideographic', 'close-quote', 'collapse', 'compact', 'condensed', 'content-box', 'crop', 'cross', 'crosshair', 'cursive', 'dashed', 'decimal', 'decimal-leading-zero', 'default', 'disc', 'dotted', 'double', 'e-resize', 'embed', 'expanded', 'extra-condensed', 'extra-expanded', 'fantasy', 'fixed', 'georgian', 'groove', 'hand', 'hebrew', 'help', 'hidden', 'hide', 'higher', 'hiragana', 'hiragana-iroha', 'icon', 'inherit', 'inline', 'inline-table', 'inset', 'inside', 'invert', 'italic', 'justify', 'katakana', 'katakana-iroha', 'konq-center', 'landscape', 'large', 'larger', 'left', 'level', 'light', 'lighter', 'line-through', 'list-item', 'loud', 'lower', 'lower-alpha', 'lower-greek', 'lower-latin', 'lower-roman', 'lowercase', 'ltr', 'marker', 'medium', 'menu', 'message-box', 'middle', 'mix', 'monospace', 'move', 'n-resize', 'narrower', 'ne-resize', 'no-close-quote', 'no-open-quote', 'no-repeat', 'none', 'normal', 'nowrap', 'nw-resize', 'oblique', 'open-quote', 'outset', 'outside', 'overline', 'pointer', 'portrait', 'pre', 'pre-line', 'pre-wrap', 'relative', 'repeat', 'repeat-x', 'repeat-y', 'ridge', 'right', 'rtl', 'run-in', 's-resize', 'sans-serif', 'scroll', 'se-resize', 'semi-condensed', 'semi-expanded', 'separate', 'serif', 'show', 'small', 'small-caps', 'small-caption', 'smaller', 'solid', 'square', 'static', 'static-position', 'status-bar', 'sub', 'super', 'sw-resize', 'table', 'table-caption', 'table-cell', 'table-column', 'table-column-group', 'table-footer-group', 'table-header-group', 'table-row', 'table-row-group', 'text', 'text-bottom', 'text-top', 'thick', 'thin', 'top', 'transparent', 'ultra-condensed', 'ultra-expanded', 'underline', 'upper-alpha', 'upper-latin', 'upper-roman', 'uppercase', 'visible', 'w-resize', 'wait', 'wider', 'x-large', 'x-small', 'xx-large', 'xx-small', ); $self->contextdata({ 'Base' => { callback => \&parseBase, attribute => 'Normal Text', }, 'Comment' => { callback => \&parseComment, attribute => 'Comment', }, 'FindComments' => { callback => \&parseFindComments, attribute => 'Normal Text', }, 'FindPHP' => { callback => \&parseFindPHP, }, 'FindRuleSets' => { callback => \&parseFindRuleSets, attribute => 'Normal Text', }, 'FindStrings' => { callback => \&parseFindStrings, attribute => 'Normal Text', }, 'FindValues' => { callback => \&parseFindValues, attribute => 'Normal Text', }, 'Import' => { callback => \&parseImport, attribute => 'Normal Text', }, 'InsideString' => { callback => \&parseInsideString, attribute => 'String', }, 'Media' => { callback => \&parseMedia, attribute => 'Normal Text', }, 'Media2' => { callback => \&parseMedia2, attribute => 'Normal Text', }, 'PropParen' => { callback => \&parsePropParen, attribute => 'Normal Text', }, 'PropParen2' => { callback => \&parsePropParen2, attribute => 'Normal Text', }, 'Rule' => { callback => \&parseRule, attribute => 'Normal Text', }, 'Rule2' => { callback => \&parseRule2, attribute => 'Normal Text', }, 'RuleSet' => { callback => \&parseRuleSet, attribute => 'Normal Text', }, 'SelAttr' => { callback => \&parseSelAttr, attribute => 'Selector Attr', }, 'SelPseudo' => { callback => \&parseSelPseudo, attribute => 'Selector Pseudo', lineending => '#pop', fallthrough => '#pop', }, 'StringDQ' => { callback => \&parseStringDQ, attribute => 'String', }, 'StringSQ' => { callback => \&parseStringSQ, attribute => 'String', }, }); $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|<|=|>|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\|-|\\%'); $self->basecontext('Base'); $self->keywordscase(0); $self->initialize; bless ($self, $class); return $self; } sub language { return 'CSS/PHP'; } sub parseBase { my ($self, $text) = @_; # context => 'FindPHP' # type => 'IncludeRules' if ($self->includeRules('FindPHP', $text)) { return 1 } # type => 'LineContinue' if ($self->testLineContinue($text, 0, undef, 0, '#stay', undef)) { return 1 } # type => 'DetectSpaces' if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { return 1 } # context => 'FindRuleSets' # type => 'IncludeRules' if ($self->includeRules('FindRuleSets', $text)) { return 1 } return 0; }; sub parseComment { my ($self, $text) = @_; # context => 'FindPHP' # type => 'IncludeRules' if ($self->includeRules('FindPHP', $text)) { return 1 } # type => 'DetectSpaces' if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { return 1 } # attribute => 'Comment' # char => '*' # char1 => '/' # context => '#pop' # endRegion => 'comment' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop', 'Comment')) { return 1 } # context => '##Alerts' # type => 'IncludeRules' if ($self->includePlugin('Alerts', $text)) { return 1 } # type => 'DetectIdentifier' if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) { return 1 } return 0; }; sub parseFindComments { my ($self, $text) = @_; # context => 'FindPHP' # type => 'IncludeRules' if ($self->includeRules('FindPHP', $text)) { return 1 } # String => '/\*BEGIN.*\*/' # attribute => 'Region Marker' # beginRegion => 'UserDefined' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '/\\*BEGIN.*\\*/', 0, 0, 0, undef, 0, '#stay', 'Region Marker')) { return 1 } # String => '/\*END.*\*/' # attribute => 'Region Marker' # context => '#stay' # endRegion => 'UserDefined' # type => 'RegExpr' if ($self->testRegExpr($text, '/\\*END.*\\*/', 0, 0, 0, undef, 0, '#stay', 'Region Marker')) { return 1 } # attribute => 'Comment' # beginRegion => 'comment' # char => '/' # char1 => '*' # context => 'Comment' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'Comment', 'Comment')) { return 1 } return 0; }; sub parseFindPHP { my ($self, $text) = @_; # String => '<\?(?:=|php)?' # context => '##PHP/PHP' # lookAhead => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '<\\?(?:=|php)?', 0, 0, 1, undef, 0, '##PHP/PHP', undef)) { return 1 } return 0; }; sub parseFindRuleSets { my ($self, $text) = @_; # context => 'FindPHP' # type => 'IncludeRules' if ($self->includeRules('FindPHP', $text)) { return 1 } # String => '@media\b' # attribute => 'Media' # context => 'Media' # type => 'RegExpr' if ($self->testRegExpr($text, '@media\\b', 0, 0, 0, undef, 0, 'Media', 'Media')) { return 1 } # String => '@import\b' # attribute => 'At Rule' # context => 'Import' # type => 'RegExpr' if ($self->testRegExpr($text, '@import\\b', 0, 0, 0, undef, 0, 'Import', 'At Rule')) { return 1 } # String => '@(font-face|charset)\b' # attribute => 'At Rule' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '@(font-face|charset)\\b', 0, 0, 0, undef, 0, '#stay', 'At Rule')) { return 1 } # attribute => 'Property' # beginRegion => 'ruleset' # char => '{' # context => 'RuleSet' # type => 'DetectChar' if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, 'RuleSet', 'Property')) { return 1 } # attribute => 'Selector Attr' # char => '[' # context => 'SelAttr' # type => 'DetectChar' if ($self->testDetectChar($text, '[', 0, 0, 0, undef, 0, 'SelAttr', 'Selector Attr')) { return 1 } # String => '#[A-Za-z0-9][\w\-]*' # attribute => 'Selector Id' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '#[A-Za-z0-9][\\w\\-]*', 0, 0, 0, undef, 0, '#stay', 'Selector Id')) { return 1 } # String => '\.[A-Za-z0-9][\w\-]*' # attribute => 'Selector Class' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\.[A-Za-z0-9][\\w\\-]*', 0, 0, 0, undef, 0, '#stay', 'Selector Class')) { return 1 } # String => ':lang\([\w_-]+\)' # attribute => 'Selector Pseudo' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, ':lang\\([\\w_-]+\\)', 0, 0, 0, undef, 0, '#stay', 'Selector Pseudo')) { return 1 } # attribute => 'Selector Pseudo' # char => ':' # context => 'SelPseudo' # type => 'DetectChar' if ($self->testDetectChar($text, ':', 0, 0, 0, undef, 0, 'SelPseudo', 'Selector Pseudo')) { return 1 } # context => 'FindStrings' # type => 'IncludeRules' if ($self->includeRules('FindStrings', $text)) { return 1 } # context => 'FindComments' # type => 'IncludeRules' if ($self->includeRules('FindComments', $text)) { return 1 } return 0; }; sub parseFindStrings { my ($self, $text) = @_; # context => 'FindPHP' # type => 'IncludeRules' if ($self->includeRules('FindPHP', $text)) { return 1 } # attribute => 'String' # char => '"' # context => 'StringDQ' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'StringDQ', 'String')) { return 1 } # attribute => 'String' # char => ''' # context => 'StringSQ' # type => 'DetectChar' if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'StringSQ', 'String')) { return 1 } return 0; }; sub parseFindValues { my ($self, $text) = @_; # context => 'FindPHP' # type => 'IncludeRules' if ($self->includeRules('FindPHP', $text)) { return 1 } # String => '[-+]?[0-9.]+(em|ex|px|in|cm|mm|pt|pc|deg|rad|grad|ms|s|Hz|kHz)\b' # attribute => 'Value' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '[-+]?[0-9.]+(em|ex|px|in|cm|mm|pt|pc|deg|rad|grad|ms|s|Hz|kHz)\\b', 0, 0, 0, undef, 0, '#stay', 'Value')) { return 1 } # String => '[-+]?[0-9.]+[%]?' # attribute => 'Value' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '[-+]?[0-9.]+[%]?', 0, 0, 0, undef, 0, '#stay', 'Value')) { return 1 } # String => '[\w\-]+' # attribute => 'Normal Text' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '[\\w\\-]+', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { return 1 } return 0; }; sub parseImport { my ($self, $text) = @_; # context => 'FindPHP' # type => 'IncludeRules' if ($self->includeRules('FindPHP', $text)) { return 1 } # attribute => 'At Rule' # char => ';' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, ';', 0, 0, 0, undef, 0, '#pop', 'At Rule')) { return 1 } # String => 'mediatypes' # attribute => 'Media' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'mediatypes', 0, undef, 0, '#stay', 'Media')) { return 1 } # context => 'FindValues' # type => 'IncludeRules' if ($self->includeRules('FindValues', $text)) { return 1 } # context => 'FindStrings' # type => 'IncludeRules' if ($self->includeRules('FindStrings', $text)) { return 1 } # context => 'FindComments' # type => 'IncludeRules' if ($self->includeRules('FindComments', $text)) { return 1 } return 0; }; sub parseInsideString { my ($self, $text) = @_; # context => 'FindPHP' # type => 'IncludeRules' if ($self->includeRules('FindPHP', $text)) { return 1 } # String => '\\["']' # attribute => 'String' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\\\["\']', 0, 0, 0, undef, 0, '#stay', 'String')) { return 1 } # type => 'DetectIdentifier' if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) { return 1 } return 0; }; sub parseMedia { my ($self, $text) = @_; # context => 'FindPHP' # type => 'IncludeRules' if ($self->includeRules('FindPHP', $text)) { return 1 } # attribute => 'Media' # beginRegion => 'media' # char => '{' # context => 'Media2' # type => 'DetectChar' if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, 'Media2', 'Media')) { return 1 } # String => 'mediatypes' # attribute => 'Media' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'mediatypes', 0, undef, 0, '#stay', 'Media')) { return 1 } # attribute => 'Media' # char => ',' # context => '#stay' # type => 'DetectChar' if ($self->testDetectChar($text, ',', 0, 0, 0, undef, 0, '#stay', 'Media')) { return 1 } # context => 'FindComments' # type => 'IncludeRules' if ($self->includeRules('FindComments', $text)) { return 1 } # String => '\S+' # attribute => 'Error' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\S+', 0, 0, 0, undef, 0, '#stay', 'Error')) { return 1 } return 0; }; sub parseMedia2 { my ($self, $text) = @_; # context => 'FindPHP' # type => 'IncludeRules' if ($self->includeRules('FindPHP', $text)) { return 1 } # attribute => 'Media' # char => '}' # context => '#pop#pop' # endRegion => 'media' # type => 'DetectChar' if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#pop#pop', 'Media')) { return 1 } # context => 'FindRuleSets' # type => 'IncludeRules' if ($self->includeRules('FindRuleSets', $text)) { return 1 } return 0; }; sub parsePropParen { my ($self, $text) = @_; # context => 'FindPHP' # type => 'IncludeRules' if ($self->includeRules('FindPHP', $text)) { return 1 } # attribute => 'Value' # char => '(' # context => 'PropParen2' # type => 'DetectChar' if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'PropParen2', 'Value')) { return 1 } # context => 'FindComments' # type => 'IncludeRules' if ($self->includeRules('FindComments', $text)) { return 1 } # String => '\S' # attribute => 'Error' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\S', 0, 0, 0, undef, 0, '#stay', 'Error')) { return 1 } return 0; }; sub parsePropParen2 { my ($self, $text) = @_; # context => 'FindPHP' # type => 'IncludeRules' if ($self->includeRules('FindPHP', $text)) { return 1 } # attribute => 'Value' # char => ')' # context => '#pop#pop' # type => 'DetectChar' if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop#pop', 'Value')) { return 1 } # context => 'FindValues' # type => 'IncludeRules' if ($self->includeRules('FindValues', $text)) { return 1 } # context => 'FindStrings' # type => 'IncludeRules' if ($self->includeRules('FindStrings', $text)) { return 1 } # context => 'FindComments' # type => 'IncludeRules' if ($self->includeRules('FindComments', $text)) { return 1 } return 0; }; sub parseRule { my ($self, $text) = @_; # context => 'FindPHP' # type => 'IncludeRules' if ($self->includeRules('FindPHP', $text)) { return 1 } # attribute => 'Property' # char => ':' # context => 'Rule2' # type => 'DetectChar' if ($self->testDetectChar($text, ':', 0, 0, 0, undef, 0, 'Rule2', 'Property')) { return 1 } # String => '\S' # attribute => 'Error' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\S', 0, 0, 0, undef, 0, '#stay', 'Error')) { return 1 } return 0; }; sub parseRule2 { my ($self, $text) = @_; # context => 'FindPHP' # type => 'IncludeRules' if ($self->includeRules('FindPHP', $text)) { return 1 } # attribute => 'Property' # char => ';' # context => '#pop#pop' # type => 'DetectChar' if ($self->testDetectChar($text, ';', 0, 0, 0, undef, 0, '#pop#pop', 'Property')) { return 1 } # attribute => 'Property' # char => '}' # context => '#pop#pop#pop' # endRegion => 'ruleset' # type => 'DetectChar' if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#pop#pop#pop', 'Property')) { return 1 } # String => 'types' # attribute => 'Value' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'types', 0, undef, 0, '#stay', 'Value')) { return 1 } # String => 'colors' # attribute => 'Value' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'colors', 0, undef, 0, '#stay', 'Value')) { return 1 } # String => '#([0-9A-Fa-f]{3}){1,4}\b' # attribute => 'Value' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '#([0-9A-Fa-f]{3}){1,4}\\b', 0, 0, 0, undef, 0, '#stay', 'Value')) { return 1 } # String => 'paren' # attribute => 'Value' # context => 'PropParen' # type => 'keyword' if ($self->testKeyword($text, 'paren', 0, undef, 0, 'PropParen', 'Value')) { return 1 } # String => '!important\b' # attribute => 'Important' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '!important\\b', 0, 0, 0, undef, 0, '#stay', 'Important')) { return 1 } # context => 'FindValues' # type => 'IncludeRules' if ($self->includeRules('FindValues', $text)) { return 1 } # context => 'FindStrings' # type => 'IncludeRules' if ($self->includeRules('FindStrings', $text)) { return 1 } # context => 'FindComments' # type => 'IncludeRules' if ($self->includeRules('FindComments', $text)) { return 1 } return 0; }; sub parseRuleSet { my ($self, $text) = @_; # context => 'FindPHP' # type => 'IncludeRules' if ($self->includeRules('FindPHP', $text)) { return 1 } # attribute => 'Property' # char => '}' # context => '#pop' # endRegion => 'ruleset' # type => 'DetectChar' if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#pop', 'Property')) { return 1 } # String => 'properties' # attribute => 'Property' # context => 'Rule' # type => 'keyword' if ($self->testKeyword($text, 'properties', 0, undef, 0, 'Rule', 'Property')) { return 1 } # String => '-?[A-Za-z_-]+(?=\s*:)' # attribute => 'Unknown Property' # context => 'Rule' # type => 'RegExpr' if ($self->testRegExpr($text, '-?[A-Za-z_-]+(?=\\s*:)', 0, 0, 0, undef, 0, 'Rule', 'Unknown Property')) { return 1 } # context => 'FindComments' # type => 'IncludeRules' if ($self->includeRules('FindComments', $text)) { return 1 } # String => '\S' # attribute => 'Error' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\S', 0, 0, 0, undef, 0, '#stay', 'Error')) { return 1 } return 0; }; sub parseSelAttr { my ($self, $text) = @_; # context => 'FindPHP' # type => 'IncludeRules' if ($self->includeRules('FindPHP', $text)) { return 1 } # attribute => 'Selector Attr' # char => ']' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, ']', 0, 0, 0, undef, 0, '#pop', 'Selector Attr')) { return 1 } # context => 'FindStrings' # type => 'IncludeRules' if ($self->includeRules('FindStrings', $text)) { return 1 } return 0; }; sub parseSelPseudo { my ($self, $text) = @_; # context => 'FindPHP' # type => 'IncludeRules' if ($self->includeRules('FindPHP', $text)) { return 1 } # String => 'pseudoclasses' # attribute => 'Selector Pseudo' # context => '#pop' # type => 'keyword' if ($self->testKeyword($text, 'pseudoclasses', 0, undef, 0, '#pop', 'Selector Pseudo')) { return 1 } return 0; }; sub parseStringDQ { my ($self, $text) = @_; # context => 'FindPHP' # type => 'IncludeRules' if ($self->includeRules('FindPHP', $text)) { return 1 } # attribute => 'String' # char => '"' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) { return 1 } # context => 'InsideString' # type => 'IncludeRules' if ($self->includeRules('InsideString', $text)) { return 1 } return 0; }; sub parseStringSQ { my ($self, $text) = @_; # context => 'FindPHP' # type => 'IncludeRules' if ($self->includeRules('FindPHP', $text)) { return 1 } # attribute => 'String' # char => ''' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop', 'String')) { return 1 } # context => 'InsideString' # type => 'IncludeRules' if ($self->includeRules('InsideString', $text)) { return 1 } return 0; }; 1; __END__ =head1 NAME Syntax::Highlight::Engine::Kate::CSS_PHP - a Plugin for CSS/PHP syntax highlighting =head1 SYNOPSIS require Syntax::Highlight::Engine::Kate::CSS_PHP; my $sh = new Syntax::Highlight::Engine::Kate::CSS_PHP([ ]); =head1 DESCRIPTION Syntax::Highlight::Engine::Kate::CSS_PHP is a plugin module that provides syntax highlighting for CSS/PHP to the Syntax::Haghlight::Engine::Kate highlighting engine. This code is generated from the syntax definition files used by the Kate project. It works quite fine, but can use refinement and optimization. It inherits Syntax::Higlight::Engine::Kate::Template. See also there. =head1 AUTHOR Hans Jeuken (haje toneel demon nl) =head1 BUGS Unknown. If you find any, please contact the author././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootlibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/Engine/Kate/ObjectiveminusC.pmlibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/Engine/Kate/ObjectiveminusC0000644000175000017500000002703512150556557033012 0ustar gregoagregoa# Copyright (c) 2005 - 2006 Hans Jeuken. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. # This file was generated from the 'objectivec.xml' file of the syntax highlight # engine of the kate text editor (http://www.kate-editor.org #kate xml version 1.07 #kate version 2.3 #generated: Sun Feb 3 22:02:05 2008, localtime package Syntax::Highlight::Engine::Kate::ObjectiveminusC; our $VERSION = '0.07'; use strict; use warnings; use base('Syntax::Highlight::Engine::Kate::Template'); sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = $class->SUPER::new(@_); $self->attributes({ 'Char' => 'Char', 'Comment' => 'Comment', 'Data Type' => 'DataType', 'Decimal' => 'DecVal', 'Float' => 'Float', 'Hex' => 'BaseN', 'Keyword' => 'Keyword', 'Normal Text' => 'Normal', 'Octal' => 'BaseN', 'Prep. Lib' => 'Others', 'Preprocessor' => 'Others', 'String' => 'String', 'String Char' => 'Char', 'Symbol' => 'Normal', }); $self->listAdd('keywords', '@class', '@defs', '@encode', '@end', '@implementation', '@interface', '@private', '@protected', '@protocol', '@public', '@selector', 'break', 'case', 'continue', 'default', 'do', 'else', 'enum', 'extern', 'for', 'goto', 'if', 'return', 'self', 'sizeof', 'struct', 'super', 'switch', 'typedef', 'union', 'while', ); $self->listAdd('types', 'auto', 'char', 'const', 'double', 'float', 'int', 'long', 'register', 'short', 'signed', 'static', 'unsigned', 'void', 'volatile', ); $self->contextdata({ 'Default' => { callback => \&parseDefault, attribute => 'Normal Text', }, 'MultiLineComment' => { callback => \&parseMultiLineComment, attribute => 'Comment', }, 'MultiLineCommentPrep' => { callback => \&parseMultiLineCommentPrep, attribute => 'Comment', }, 'Preprocessor' => { callback => \&parsePreprocessor, attribute => 'Preprocessor', lineending => 'Default', }, 'SingleLineComment' => { callback => \&parseSingleLineComment, attribute => 'Comment', lineending => '#pop', }, 'String' => { callback => \&parseString, attribute => 'String', lineending => '#pop', }, }); $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); $self->basecontext('Default'); $self->keywordscase(0); $self->initialize; bless ($self, $class); return $self; } sub language { return 'Objective-C'; } sub parseDefault { my ($self, $text) = @_; # String => 'keywords' # attribute => 'Keyword' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'types' # attribute => 'Data Type' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'types', 0, undef, 0, '#stay', 'Data Type')) { return 1 } # attribute => 'Symbol' # beginRegion => 'Brace1' # char => '{' # context => '#stay' # type => 'DetectChar' if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, '#stay', 'Symbol')) { return 1 } # attribute => 'Symbol' # char => '}' # context => '#stay' # endRegion => 'Brace1' # type => 'DetectChar' if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#stay', 'Symbol')) { return 1 } # attribute => 'Float' # context => '#stay' # items => 'ARRAY(0x197ace0)' # type => 'Float' if ($self->testFloat($text, 0, undef, 0, '#stay', 'Float')) { # String => 'fF' # attribute => 'Float' # context => '#stay' # type => 'AnyChar' if ($self->testAnyChar($text, 'fF', 0, 0, undef, 0, '#stay', 'Float')) { return 1 } } # attribute => 'Octal' # context => '#stay' # type => 'HlCOct' if ($self->testHlCOct($text, 0, undef, 0, '#stay', 'Octal')) { return 1 } # attribute => 'Hex' # context => '#stay' # type => 'HlCHex' if ($self->testHlCHex($text, 0, undef, 0, '#stay', 'Hex')) { return 1 } # attribute => 'Decimal' # context => '#stay' # items => 'ARRAY(0x1835840)' # type => 'Int' if ($self->testInt($text, 0, undef, 0, '#stay', 'Decimal')) { # String => 'ULL' # attribute => 'Decimal' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'ULL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'LUL' # attribute => 'Decimal' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'LUL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'LLU' # attribute => 'Decimal' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'LLU', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'UL' # attribute => 'Decimal' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'UL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'LU' # attribute => 'Decimal' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'LU', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'LL' # attribute => 'Decimal' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'LL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'U' # attribute => 'Decimal' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'U', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'L' # attribute => 'Decimal' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'L', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } } # attribute => 'Char' # context => '#stay' # type => 'HlCChar' if ($self->testHlCChar($text, 0, undef, 0, '#stay', 'Char')) { return 1 } # attribute => 'String' # char => '"' # context => 'String' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) { return 1 } # attribute => 'Comment' # char => '/' # char1 => '/' # context => 'SingleLineComment' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'SingleLineComment', 'Comment')) { return 1 } # attribute => 'Comment' # char => '/' # char1 => '*' # context => 'MultiLineComment' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'MultiLineComment', 'Comment')) { return 1 } # String => ':!%&()+,-/.*<=>?[]|~^;' # attribute => 'Symbol' # context => '#stay' # type => 'AnyChar' if ($self->testAnyChar($text, ':!%&()+,-/.*<=>?[]|~^;', 0, 0, undef, 0, '#stay', 'Symbol')) { return 1 } # String => '^#' # attribute => 'Preprocessor' # context => 'Preprocessor' # type => 'RegExpr' if ($self->testRegExpr($text, '^#', 0, 0, 0, undef, 0, 'Preprocessor', 'Preprocessor')) { return 1 } # attribute => 'String' # char => '@' # char1 => '"' # context => 'String' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '@', '"', 0, 0, 0, undef, 0, 'String', 'String')) { return 1 } return 0; }; sub parseMultiLineComment { my ($self, $text) = @_; # attribute => 'Comment' # char => '*' # char1 => '/' # context => '#pop' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop', 'Comment')) { return 1 } return 0; }; sub parseMultiLineCommentPrep { my ($self, $text) = @_; # attribute => 'Comment' # char => '*' # char1 => '/' # context => '#pop#pop' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop#pop', 'Comment')) { return 1 } return 0; }; sub parsePreprocessor { my ($self, $text) = @_; # attribute => 'Preprocessor' # context => '#stay' # type => 'LineContinue' if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'Preprocessor')) { return 1 } # attribute => 'Prep. Lib' # char => '"' # char1 => '"' # context => '#stay' # type => 'RangeDetect' if ($self->testRangeDetect($text, '"', '"', 0, 0, undef, 0, '#stay', 'Prep. Lib')) { return 1 } # attribute => 'Prep. Lib' # char => '<' # char1 => '>' # context => '#stay' # type => 'RangeDetect' if ($self->testRangeDetect($text, '<', '>', 0, 0, undef, 0, '#stay', 'Prep. Lib')) { return 1 } # context => '##Doxygen' # type => 'IncludeRules' if ($self->includePlugin('Doxygen', $text)) { return 1 } # attribute => 'Comment' # char => '/' # char1 => '/' # context => 'SingleLineComment' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'SingleLineComment', 'Comment')) { return 1 } # attribute => 'Comment' # char => '/' # char1 => '*' # context => 'MultiLineCommentPrep' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'MultiLineCommentPrep', 'Comment')) { return 1 } return 0; }; sub parseSingleLineComment { my ($self, $text) = @_; return 0; }; sub parseString { my ($self, $text) = @_; # attribute => 'String' # context => '#stay' # type => 'LineContinue' if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'String')) { return 1 } # attribute => 'String Char' # context => '#stay' # type => 'HlCStringChar' if ($self->testHlCStringChar($text, 0, undef, 0, '#stay', 'String Char')) { return 1 } # attribute => 'String' # char => '"' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) { return 1 } return 0; }; 1; __END__ =head1 NAME Syntax::Highlight::Engine::Kate::ObjectiveminusC - a Plugin for Objective-C syntax highlighting =head1 SYNOPSIS require Syntax::Highlight::Engine::Kate::ObjectiveminusC; my $sh = new Syntax::Highlight::Engine::Kate::ObjectiveminusC([ ]); =head1 DESCRIPTION Syntax::Highlight::Engine::Kate::ObjectiveminusC is a plugin module that provides syntax highlighting for Objective-C to the Syntax::Haghlight::Engine::Kate highlighting engine. This code is generated from the syntax definition files used by the Kate project. It works quite fine, but can use refinement and optimization. It inherits Syntax::Higlight::Engine::Kate::Template. See also there. =head1 AUTHOR Hans Jeuken (haje toneel demon nl) =head1 BUGS Unknown. If you find any, please contact the authorlibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/Engine/Kate/Java.pm0000644000175000017500000030431412150556557031213 0ustar gregoagregoa# Copyright (c) 2005 - 2006 Hans Jeuken. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. # This file was generated from the 'java.xml' file of the syntax highlight # engine of the kate text editor (http://www.kate-editor.org #kate xml version 1.15 #kate version 2.4 #kate author Alfredo Luiz Foltran Fialho (alfoltran@ig.com.br) #generated: Sun Feb 3 22:02:05 2008, localtime package Syntax::Highlight::Engine::Kate::Java; our $VERSION = '0.07'; use strict; use warnings; use base('Syntax::Highlight::Engine::Kate::Template'); sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = $class->SUPER::new(@_); $self->attributes({ 'Char' => 'Char', 'Comment' => 'Comment', 'Data Type' => 'DataType', 'Decimal' => 'DecVal', 'Float' => 'Float', 'Function' => 'Function', 'Hex' => 'BaseN', 'Imports' => 'Keyword', 'Java15' => 'Normal', 'Keyword' => 'Keyword', 'Normal Text' => 'Normal', 'Octal' => 'BaseN', 'PrintfString' => 'String', 'StaticImports' => 'Keyword', 'String' => 'String', 'String Char' => 'Char', 'Symbol' => 'Normal', }); $self->listAdd('java15', 'ACTIVE', 'ACTIVITY_COMPLETED', 'ACTIVITY_REQUIRED', 'ARG_IN', 'ARG_INOUT', 'ARG_OUT', 'AWTError', 'AWTEvent', 'AWTEventListener', 'AWTEventListenerProxy', 'AWTEventMulticaster', 'AWTException', 'AWTKeyStroke', 'AWTPermission', 'AbstractAction', 'AbstractBorder', 'AbstractButton', 'AbstractCellEditor', 'AbstractCollection', 'AbstractColorChooserPanel', 'AbstractDocument', 'AbstractDocument.AttributeContext', 'AbstractDocument.Content', 'AbstractDocument.ElementEdit', 'AbstractExecutorService', 'AbstractInterruptibleChannel', 'AbstractLayoutCache', 'AbstractLayoutCache.NodeDimensions', 'AbstractList', 'AbstractListModel', 'AbstractMap', 'AbstractMethodError', 'AbstractPreferences', 'AbstractQueue', 'AbstractQueuedSynchronizer', 'AbstractSelectableChannel', 'AbstractSelectionKey', 'AbstractSelector', 'AbstractSequentialList', 'AbstractSet', 'AbstractSpinnerModel', 'AbstractTableModel', 'AbstractUndoableEdit', 'AbstractWriter', 'AccessControlContext', 'AccessControlException', 'AccessController', 'AccessException', 'Accessible', 'AccessibleAction', 'AccessibleAttributeSequence', 'AccessibleBundle', 'AccessibleComponent', 'AccessibleContext', 'AccessibleEditableText', 'AccessibleExtendedComponent', 'AccessibleExtendedTable', 'AccessibleExtendedText', 'AccessibleHyperlink', 'AccessibleHypertext', 'AccessibleIcon', 'AccessibleKeyBinding', 'AccessibleObject', 'AccessibleRelation', 'AccessibleRelationSet', 'AccessibleResourceBundle', 'AccessibleRole', 'AccessibleSelection', 'AccessibleState', 'AccessibleStateSet', 'AccessibleStreamable', 'AccessibleTable', 'AccessibleTableModelChange', 'AccessibleText', 'AccessibleTextSequence', 'AccessibleValue', 'AccountException', 'AccountExpiredException', 'AccountLockedException', 'AccountNotFoundException', 'Acl', 'AclEntry', 'AclNotFoundException', 'Action', 'ActionEvent', 'ActionListener', 'ActionMap', 'ActionMapUIResource', 'Activatable', 'ActivateFailedException', 'ActivationDesc', 'ActivationException', 'ActivationGroup', 'ActivationGroupDesc', 'ActivationGroupDesc.CommandEnvironment', 'ActivationGroupID', 'ActivationGroup_Stub', 'ActivationID', 'ActivationInstantiator', 'ActivationMonitor', 'ActivationSystem', 'Activator', 'ActiveEvent', 'ActivityCompletedException', 'ActivityRequiredException', 'AdapterActivator', 'AdapterActivatorOperations', 'AdapterAlreadyExists', 'AdapterAlreadyExistsHelper', 'AdapterInactive', 'AdapterInactiveHelper', 'AdapterManagerIdHelper', 'AdapterNameHelper', 'AdapterNonExistent', 'AdapterNonExistentHelper', 'AdapterStateHelper', 'AddressHelper', 'Adjustable', 'AdjustmentEvent', 'AdjustmentListener', 'Adler32', 'AffineTransform', 'AffineTransformOp', 'AlgorithmParameterGenerator', 'AlgorithmParameterGeneratorSpi', 'AlgorithmParameterSpec', 'AlgorithmParameters', 'AlgorithmParametersSpi', 'AllPermission', 'AlphaComposite', 'AlreadyBound', 'AlreadyBoundException', 'AlreadyBoundHelper', 'AlreadyBoundHolder', 'AlreadyConnectedException', 'AncestorEvent', 'AncestorListener', 'AnnotatedElement', 'Annotation', 'Annotation', 'AnnotationFormatError', 'AnnotationTypeMismatchException', 'Any', 'AnyHolder', 'AnySeqHelper', 'AnySeqHelper', 'AnySeqHolder', 'AppConfigurationEntry', 'AppConfigurationEntry.LoginModuleControlFlag', 'Appendable', 'Applet', 'AppletContext', 'AppletInitializer', 'AppletStub', 'ApplicationException', 'Arc2D', 'Arc2D.Double', 'Arc2D.Float', 'Area', 'AreaAveragingScaleFilter', 'ArithmeticException', 'Array', 'Array', 'ArrayBlockingQueue', 'ArrayIndexOutOfBoundsException', 'ArrayList', 'ArrayStoreException', 'ArrayType', 'Arrays', 'AssertionError', 'AsyncBoxView', 'AsynchronousCloseException', 'AtomicBoolean', 'AtomicInteger', 'AtomicIntegerArray', 'AtomicIntegerFieldUpdater', 'AtomicLong', 'AtomicLongArray', 'AtomicLongFieldUpdater', 'AtomicMarkableReference', 'AtomicReference', 'AtomicReferenceArray', 'AtomicReferenceFieldUpdater', 'AtomicStampedReference', 'Attr', 'Attribute', 'Attribute', 'Attribute', 'AttributeChangeNotification', 'AttributeChangeNotificationFilter', 'AttributeException', 'AttributeInUseException', 'AttributeList', 'AttributeList', 'AttributeList', 'AttributeListImpl', 'AttributeModificationException', 'AttributeNotFoundException', 'AttributeSet', 'AttributeSet', 'AttributeSet.CharacterAttribute', 'AttributeSet.ColorAttribute', 'AttributeSet.FontAttribute', 'AttributeSet.ParagraphAttribute', 'AttributeSetUtilities', 'AttributeValueExp', 'AttributedCharacterIterator', 'AttributedCharacterIterator.Attribute', 'AttributedString', 'Attributes', 'Attributes', 'Attributes', 'Attributes.Name', 'Attributes2', 'Attributes2Impl', 'AttributesImpl', 'AudioClip', 'AudioFileFormat', 'AudioFileFormat.Type', 'AudioFileReader', 'AudioFileWriter', 'AudioFormat', 'AudioFormat.Encoding', 'AudioInputStream', 'AudioPermission', 'AudioSystem', 'AuthPermission', 'AuthProvider', 'AuthenticationException', 'AuthenticationException', 'AuthenticationNotSupportedException', 'Authenticator', 'Authenticator.RequestorType', 'AuthorizeCallback', 'Autoscroll', 'BAD_CONTEXT', 'BAD_INV_ORDER', 'BAD_OPERATION', 'BAD_PARAM', 'BAD_POLICY', 'BAD_POLICY_TYPE', 'BAD_POLICY_VALUE', 'BAD_QOS', 'BAD_TYPECODE', 'BMPImageWriteParam', 'BackingStoreException', 'BadAttributeValueExpException', 'BadBinaryOpValueExpException', 'BadKind', 'BadLocationException', 'BadPaddingException', 'BadStringOperationException', 'BandCombineOp', 'BandedSampleModel', 'BaseRowSet', 'BasicArrowButton', 'BasicAttribute', 'BasicAttributes', 'BasicBorders', 'BasicBorders.ButtonBorder', 'BasicBorders.FieldBorder', 'BasicBorders.MarginBorder', 'BasicBorders.MenuBarBorder', 'BasicBorders.RadioButtonBorder', 'BasicBorders.RolloverButtonBorder', 'BasicBorders.SplitPaneBorder', 'BasicBorders.ToggleButtonBorder', 'BasicButtonListener', 'BasicButtonUI', 'BasicCheckBoxMenuItemUI', 'BasicCheckBoxUI', 'BasicColorChooserUI', 'BasicComboBoxEditor', 'BasicComboBoxEditor.UIResource', 'BasicComboBoxRenderer', 'BasicComboBoxRenderer.UIResource', 'BasicComboBoxUI', 'BasicComboPopup', 'BasicControl', 'BasicDesktopIconUI', 'BasicDesktopPaneUI', 'BasicDirectoryModel', 'BasicEditorPaneUI', 'BasicFileChooserUI', 'BasicFormattedTextFieldUI', 'BasicGraphicsUtils', 'BasicHTML', 'BasicIconFactory', 'BasicInternalFrameTitlePane', 'BasicInternalFrameUI', 'BasicLabelUI', 'BasicListUI', 'BasicLookAndFeel', 'BasicMenuBarUI', 'BasicMenuItemUI', 'BasicMenuUI', 'BasicOptionPaneUI', 'BasicOptionPaneUI.ButtonAreaLayout', 'BasicPanelUI', 'BasicPasswordFieldUI', 'BasicPermission', 'BasicPopupMenuSeparatorUI', 'BasicPopupMenuUI', 'BasicProgressBarUI', 'BasicRadioButtonMenuItemUI', 'BasicRadioButtonUI', 'BasicRootPaneUI', 'BasicScrollBarUI', 'BasicScrollPaneUI', 'BasicSeparatorUI', 'BasicSliderUI', 'BasicSpinnerUI', 'BasicSplitPaneDivider', 'BasicSplitPaneUI', 'BasicStroke', 'BasicTabbedPaneUI', 'BasicTableHeaderUI', 'BasicTableUI', 'BasicTextAreaUI', 'BasicTextFieldUI', 'BasicTextPaneUI', 'BasicTextUI', 'BasicTextUI.BasicCaret', 'BasicTextUI.BasicHighlighter', 'BasicToggleButtonUI', 'BasicToolBarSeparatorUI', 'BasicToolBarUI', 'BasicToolTipUI', 'BasicTreeUI', 'BasicViewportUI', 'BatchUpdateException', 'BeanContext', 'BeanContextChild', 'BeanContextChildComponentProxy', 'BeanContextChildSupport', 'BeanContextContainerProxy', 'BeanContextEvent', 'BeanContextMembershipEvent', 'BeanContextMembershipListener', 'BeanContextProxy', 'BeanContextServiceAvailableEvent', 'BeanContextServiceProvider', 'BeanContextServiceProviderBeanInfo', 'BeanContextServiceRevokedEvent', 'BeanContextServiceRevokedListener', 'BeanContextServices', 'BeanContextServicesListener', 'BeanContextServicesSupport', 'BeanContextServicesSupport.BCSSServiceProvider', 'BeanContextSupport', 'BeanContextSupport.BCSIterator', 'BeanDescriptor', 'BeanInfo', 'Beans', 'BevelBorder', 'Bidi', 'BigDecimal', 'BigInteger', 'BinaryRefAddr', 'BindException', 'Binding', 'Binding', 'BindingHelper', 'BindingHolder', 'BindingIterator', 'BindingIteratorHelper', 'BindingIteratorHolder', 'BindingIteratorOperations', 'BindingIteratorPOA', 'BindingListHelper', 'BindingListHolder', 'BindingType', 'BindingTypeHelper', 'BindingTypeHolder', 'BitSet', 'Blob', 'BlockView', 'BlockingQueue', 'Book', 'Boolean', 'BooleanControl', 'BooleanControl.Type', 'BooleanHolder', 'BooleanSeqHelper', 'BooleanSeqHolder', 'Border', 'BorderFactory', 'BorderLayout', 'BorderUIResource', 'BorderUIResource.BevelBorderUIResource', 'BorderUIResource.CompoundBorderUIResource', 'BorderUIResource.EmptyBorderUIResource', 'BorderUIResource.EtchedBorderUIResource', 'BorderUIResource.LineBorderUIResource', 'BorderUIResource.MatteBorderUIResource', 'BorderUIResource.TitledBorderUIResource', 'BoundedRangeModel', 'Bounds', 'Bounds', 'Box', 'Box.Filler', 'BoxLayout', 'BoxView', 'BoxedValueHelper', 'BreakIterator', 'BrokenBarrierException', 'Buffer', 'BufferCapabilities', 'BufferCapabilities.FlipContents', 'BufferOverflowException', 'BufferStrategy', 'BufferUnderflowException', 'BufferedImage', 'BufferedImageFilter', 'BufferedImageOp', 'BufferedInputStream', 'BufferedOutputStream', 'BufferedReader', 'BufferedWriter', 'Button', 'ButtonGroup', 'ButtonModel', 'ButtonUI', 'Byte', 'ByteArrayInputStream', 'ByteArrayOutputStream', 'ByteBuffer', 'ByteChannel', 'ByteHolder', 'ByteLookupTable', 'ByteOrder', 'CDATASection', 'CMMException', 'CODESET_INCOMPATIBLE', 'COMM_FAILURE', 'CRC32', 'CRL', 'CRLException', 'CRLSelector', 'CSS', 'CSS.Attribute', 'CTX_RESTRICT_SCOPE', 'CacheRequest', 'CacheResponse', 'CachedRowSet', 'Calendar', 'Callable', 'CallableStatement', 'Callback', 'CallbackHandler', 'CancelablePrintJob', 'CancellationException', 'CancelledKeyException', 'CannotProceed', 'CannotProceedException', 'CannotProceedHelper', 'CannotProceedHolder', 'CannotRedoException', 'CannotUndoException', 'Canvas', 'CardLayout', 'Caret', 'CaretEvent', 'CaretListener', 'CellEditor', 'CellEditorListener', 'CellRendererPane', 'CertPath', 'CertPath.CertPathRep', 'CertPathBuilder', 'CertPathBuilderException', 'CertPathBuilderResult', 'CertPathBuilderSpi', 'CertPathParameters', 'CertPathTrustManagerParameters', 'CertPathValidator', 'CertPathValidatorException', 'CertPathValidatorResult', 'CertPathValidatorSpi', 'CertSelector', 'CertStore', 'CertStoreException', 'CertStoreParameters', 'CertStoreSpi', 'Certificate', 'Certificate', 'Certificate', 'Certificate.CertificateRep', 'CertificateEncodingException', 'CertificateEncodingException', 'CertificateException', 'CertificateException', 'CertificateExpiredException', 'CertificateExpiredException', 'CertificateFactory', 'CertificateFactorySpi', 'CertificateNotYetValidException', 'CertificateNotYetValidException', 'CertificateParsingException', 'CertificateParsingException', 'ChangeEvent', 'ChangeListener', 'ChangedCharSetException', 'Channel', 'ChannelBinding', 'Channels', 'CharArrayReader', 'CharArrayWriter', 'CharBuffer', 'CharConversionException', 'CharHolder', 'CharSeqHelper', 'CharSeqHolder', 'CharSequence', 'Character', 'Character.Subset', 'Character.UnicodeBlock', 'CharacterCodingException', 'CharacterData', 'CharacterIterator', 'Charset', 'CharsetDecoder', 'CharsetEncoder', 'CharsetProvider', 'Checkbox', 'CheckboxGroup', 'CheckboxMenuItem', 'CheckedInputStream', 'CheckedOutputStream', 'Checksum', 'Choice', 'ChoiceCallback', 'ChoiceFormat', 'Chromaticity', 'Cipher', 'CipherInputStream', 'CipherOutputStream', 'CipherSpi', 'Class', 'ClassCastException', 'ClassCircularityError', 'ClassDefinition', 'ClassDesc', 'ClassFileTransformer', 'ClassFormatError', 'ClassLoader', 'ClassLoaderRepository', 'ClassLoadingMXBean', 'ClassNotFoundException', 'ClientRequestInfo', 'ClientRequestInfoOperations', 'ClientRequestInterceptor', 'ClientRequestInterceptorOperations', 'Clip', 'Clipboard', 'ClipboardOwner', 'Clob', 'CloneNotSupportedException', 'Cloneable', 'Closeable', 'ClosedByInterruptException', 'ClosedChannelException', 'ClosedSelectorException', 'CodeSets', 'CodeSigner', 'CodeSource', 'Codec', 'CodecFactory', 'CodecFactoryHelper', 'CodecFactoryOperations', 'CodecOperations', 'CoderMalfunctionError', 'CoderResult', 'CodingErrorAction', 'CollationElementIterator', 'CollationKey', 'Collator', 'Collection', 'CollectionCertStoreParameters', 'Collections', 'Color', 'ColorChooserComponentFactory', 'ColorChooserUI', 'ColorConvertOp', 'ColorModel', 'ColorSelectionModel', 'ColorSpace', 'ColorSupported', 'ColorType', 'ColorUIResource', 'ComboBoxEditor', 'ComboBoxModel', 'ComboBoxUI', 'ComboPopup', 'Comment', 'CommunicationException', 'Comparable', 'Comparator', 'CompilationMXBean', 'Compiler', 'CompletionService', 'CompletionStatus', 'CompletionStatusHelper', 'Component', 'ComponentAdapter', 'ComponentColorModel', 'ComponentEvent', 'ComponentIdHelper', 'ComponentInputMap', 'ComponentInputMapUIResource', 'ComponentListener', 'ComponentOrientation', 'ComponentSampleModel', 'ComponentUI', 'ComponentView', 'Composite', 'CompositeContext', 'CompositeData', 'CompositeDataSupport', 'CompositeName', 'CompositeType', 'CompositeView', 'CompoundBorder', 'CompoundControl', 'CompoundControl.Type', 'CompoundEdit', 'CompoundName', 'Compression', 'ConcurrentHashMap', 'ConcurrentLinkedQueue', 'ConcurrentMap', 'ConcurrentModificationException', 'Condition', 'Configuration', 'ConfigurationException', 'ConfirmationCallback', 'ConnectException', 'ConnectException', 'ConnectIOException', 'Connection', 'ConnectionEvent', 'ConnectionEventListener', 'ConnectionPendingException', 'ConnectionPoolDataSource', 'ConsoleHandler', 'Constructor', 'Container', 'ContainerAdapter', 'ContainerEvent', 'ContainerListener', 'ContainerOrderFocusTraversalPolicy', 'ContentHandler', 'ContentHandler', 'ContentHandlerFactory', 'ContentModel', 'Context', 'Context', 'ContextList', 'ContextNotEmptyException', 'ContextualRenderedImageFactory', 'Control', 'Control', 'Control.Type', 'ControlFactory', 'ControllerEventListener', 'ConvolveOp', 'CookieHandler', 'CookieHolder', 'Copies', 'CopiesSupported', 'CopyOnWriteArrayList', 'CopyOnWriteArraySet', 'CountDownLatch', 'CounterMonitor', 'CounterMonitorMBean', 'CredentialException', 'CredentialExpiredException', 'CredentialNotFoundException', 'CropImageFilter', 'CubicCurve2D', 'CubicCurve2D.Double', 'CubicCurve2D.Float', 'Currency', 'Current', 'Current', 'Current', 'CurrentHelper', 'CurrentHelper', 'CurrentHelper', 'CurrentHolder', 'CurrentOperations', 'CurrentOperations', 'CurrentOperations', 'Cursor', 'CustomMarshal', 'CustomValue', 'Customizer', 'CyclicBarrier', 'DATA_CONVERSION', 'DESKeySpec', 'DESedeKeySpec', 'DGC', 'DHGenParameterSpec', 'DHKey', 'DHParameterSpec', 'DHPrivateKey', 'DHPrivateKeySpec', 'DHPublicKey', 'DHPublicKeySpec', 'DISCARDING', 'DOMConfiguration', 'DOMError', 'DOMErrorHandler', 'DOMException', 'DOMImplementation', 'DOMImplementationLS', 'DOMImplementationList', 'DOMImplementationRegistry', 'DOMImplementationSource', 'DOMLocator', 'DOMLocator', 'DOMResult', 'DOMSource', 'DOMStringList', 'DSAKey', 'DSAKeyPairGenerator', 'DSAParameterSpec', 'DSAParams', 'DSAPrivateKey', 'DSAPrivateKeySpec', 'DSAPublicKey', 'DSAPublicKeySpec', 'DTD', 'DTDConstants', 'DTDHandler', 'DataBuffer', 'DataBufferByte', 'DataBufferDouble', 'DataBufferFloat', 'DataBufferInt', 'DataBufferShort', 'DataBufferUShort', 'DataFlavor', 'DataFormatException', 'DataInput', 'DataInputStream', 'DataInputStream', 'DataLine', 'DataLine.Info', 'DataOutput', 'DataOutputStream', 'DataOutputStream', 'DataSource', 'DataTruncation', 'DatabaseMetaData', 'DatagramChannel', 'DatagramPacket', 'DatagramSocket', 'DatagramSocketImpl', 'DatagramSocketImplFactory', 'DatatypeConfigurationException', 'DatatypeConstants', 'DatatypeConstants.Field', 'DatatypeFactory', 'Date', 'Date', 'DateFormat', 'DateFormat.Field', 'DateFormatSymbols', 'DateFormatter', 'DateTimeAtCompleted', 'DateTimeAtCreation', 'DateTimeAtProcessing', 'DateTimeSyntax', 'DebugGraphics', 'DecimalFormat', 'DecimalFormatSymbols', 'DeclHandler', 'DefaultBoundedRangeModel', 'DefaultButtonModel', 'DefaultCaret', 'DefaultCellEditor', 'DefaultColorSelectionModel', 'DefaultComboBoxModel', 'DefaultDesktopManager', 'DefaultEditorKit', 'DefaultEditorKit.BeepAction', 'DefaultEditorKit.CopyAction', 'DefaultEditorKit.CutAction', 'DefaultEditorKit.DefaultKeyTypedAction', 'DefaultEditorKit.InsertBreakAction', 'DefaultEditorKit.InsertContentAction', 'DefaultEditorKit.InsertTabAction', 'DefaultEditorKit.PasteAction', 'DefaultFocusManager', 'DefaultFocusTraversalPolicy', 'DefaultFormatter', 'DefaultFormatterFactory', 'DefaultHandler', 'DefaultHandler2', 'DefaultHighlighter', 'DefaultHighlighter.DefaultHighlightPainter', 'DefaultKeyboardFocusManager', 'DefaultListCellRenderer', 'DefaultListCellRenderer.UIResource', 'DefaultListModel', 'DefaultListSelectionModel', 'DefaultLoaderRepository', 'DefaultLoaderRepository', 'DefaultMenuLayout', 'DefaultMetalTheme', 'DefaultMutableTreeNode', 'DefaultPersistenceDelegate', 'DefaultSingleSelectionModel', 'DefaultStyledDocument', 'DefaultStyledDocument.AttributeUndoableEdit', 'DefaultStyledDocument.ElementSpec', 'DefaultTableCellRenderer', 'DefaultTableCellRenderer.UIResource', 'DefaultTableColumnModel', 'DefaultTableModel', 'DefaultTextUI', 'DefaultTreeCellEditor', 'DefaultTreeCellRenderer', 'DefaultTreeModel', 'DefaultTreeSelectionModel', 'DefinitionKind', 'DefinitionKindHelper', 'Deflater', 'DeflaterOutputStream', 'DelayQueue', 'Delayed', 'Delegate', 'Delegate', 'Delegate', 'DelegationPermission', 'Deprecated', 'Descriptor', 'DescriptorAccess', 'DescriptorSupport', 'DesignMode', 'DesktopIconUI', 'DesktopManager', 'DesktopPaneUI', 'Destination', 'DestroyFailedException', 'Destroyable', 'Dialog', 'Dictionary', 'DigestException', 'DigestInputStream', 'DigestOutputStream', 'Dimension', 'Dimension2D', 'DimensionUIResource', 'DirContext', 'DirObjectFactory', 'DirStateFactory', 'DirStateFactory.Result', 'DirectColorModel', 'DirectoryManager', 'DisplayMode', 'DnDConstants', 'Doc', 'DocAttribute', 'DocAttributeSet', 'DocFlavor', 'DocFlavor.BYTE_ARRAY', 'DocFlavor.CHAR_ARRAY', 'DocFlavor.INPUT_STREAM', 'DocFlavor.READER', 'DocFlavor.SERVICE_FORMATTED', 'DocFlavor.STRING', 'DocFlavor.URL', 'DocPrintJob', 'Document', 'Document', 'DocumentBuilder', 'DocumentBuilderFactory', 'DocumentEvent', 'DocumentEvent.ElementChange', 'DocumentEvent.EventType', 'DocumentFilter', 'DocumentFilter.FilterBypass', 'DocumentFragment', 'DocumentHandler', 'DocumentListener', 'DocumentName', 'DocumentParser', 'DocumentType', 'Documented', 'DomainCombiner', 'DomainManager', 'DomainManagerOperations', 'Double', 'DoubleBuffer', 'DoubleHolder', 'DoubleSeqHelper', 'DoubleSeqHolder', 'DragGestureEvent', 'DragGestureListener', 'DragGestureRecognizer', 'DragSource', 'DragSourceAdapter', 'DragSourceContext', 'DragSourceDragEvent', 'DragSourceDropEvent', 'DragSourceEvent', 'DragSourceListener', 'DragSourceMotionListener', 'Driver', 'DriverManager', 'DriverPropertyInfo', 'DropTarget', 'DropTarget.DropTargetAutoScroller', 'DropTargetAdapter', 'DropTargetContext', 'DropTargetDragEvent', 'DropTargetDropEvent', 'DropTargetEvent', 'DropTargetListener', 'DuplicateFormatFlagsException', 'DuplicateName', 'DuplicateNameHelper', 'Duration', 'DynAny', 'DynAny', 'DynAnyFactory', 'DynAnyFactoryHelper', 'DynAnyFactoryOperations', 'DynAnyHelper', 'DynAnyOperations', 'DynAnySeqHelper', 'DynArray', 'DynArray', 'DynArrayHelper', 'DynArrayOperations', 'DynEnum', 'DynEnum', 'DynEnumHelper', 'DynEnumOperations', 'DynFixed', 'DynFixed', 'DynFixedHelper', 'DynFixedOperations', 'DynSequence', 'DynSequence', 'DynSequenceHelper', 'DynSequenceOperations', 'DynStruct', 'DynStruct', 'DynStructHelper', 'DynStructOperations', 'DynUnion', 'DynUnion', 'DynUnionHelper', 'DynUnionOperations', 'DynValue', 'DynValue', 'DynValueBox', 'DynValueBoxOperations', 'DynValueCommon', 'DynValueCommonOperations', 'DynValueHelper', 'DynValueOperations', 'DynamicImplementation', 'DynamicImplementation', 'DynamicMBean', 'ECField', 'ECFieldF2m', 'ECFieldFp', 'ECGenParameterSpec', 'ECKey', 'ECParameterSpec', 'ECPoint', 'ECPrivateKey', 'ECPrivateKeySpec', 'ECPublicKey', 'ECPublicKeySpec', 'ENCODING_CDR_ENCAPS', 'EOFException', 'EditorKit', 'Element', 'Element', 'Element', 'ElementIterator', 'ElementType', 'Ellipse2D', 'Ellipse2D.Double', 'Ellipse2D.Float', 'EllipticCurve', 'EmptyBorder', 'EmptyStackException', 'EncodedKeySpec', 'Encoder', 'Encoding', 'EncryptedPrivateKeyInfo', 'Entity', 'Entity', 'EntityReference', 'EntityResolver', 'EntityResolver2', 'Enum', 'EnumConstantNotPresentException', 'EnumControl', 'EnumControl.Type', 'EnumMap', 'EnumSet', 'EnumSyntax', 'Enumeration', 'Environment', 'Error', 'ErrorHandler', 'ErrorListener', 'ErrorManager', 'EtchedBorder', 'Event', 'EventContext', 'EventDirContext', 'EventHandler', 'EventListener', 'EventListenerList', 'EventListenerProxy', 'EventObject', 'EventQueue', 'EventSetDescriptor', 'Exception', 'ExceptionDetailMessage', 'ExceptionInInitializerError', 'ExceptionList', 'ExceptionListener', 'Exchanger', 'ExecutionException', 'Executor', 'ExecutorCompletionService', 'ExecutorService', 'Executors', 'ExemptionMechanism', 'ExemptionMechanismException', 'ExemptionMechanismSpi', 'ExpandVetoException', 'ExportException', 'Expression', 'ExtendedRequest', 'ExtendedResponse', 'Externalizable', 'FREE_MEM', 'FactoryConfigurationError', 'FailedLoginException', 'FeatureDescriptor', 'Fidelity', 'Field', 'FieldNameHelper', 'FieldNameHelper', 'FieldPosition', 'FieldView', 'File', 'FileCacheImageInputStream', 'FileCacheImageOutputStream', 'FileChannel', 'FileChannel.MapMode', 'FileChooserUI', 'FileDescriptor', 'FileDialog', 'FileFilter', 'FileFilter', 'FileHandler', 'FileImageInputStream', 'FileImageOutputStream', 'FileInputStream', 'FileLock', 'FileLockInterruptionException', 'FileNameMap', 'FileNotFoundException', 'FileOutputStream', 'FilePermission', 'FileReader', 'FileSystemView', 'FileView', 'FileWriter', 'FilenameFilter', 'Filter', 'FilterInputStream', 'FilterOutputStream', 'FilterReader', 'FilterWriter', 'FilteredImageSource', 'FilteredRowSet', 'Finishings', 'FixedHeightLayoutCache', 'FixedHolder', 'FlatteningPathIterator', 'FlavorEvent', 'FlavorException', 'FlavorListener', 'FlavorMap', 'FlavorTable', 'Float', 'FloatBuffer', 'FloatControl', 'FloatControl.Type', 'FloatHolder', 'FloatSeqHelper', 'FloatSeqHolder', 'FlowLayout', 'FlowView', 'FlowView.FlowStrategy', 'Flushable', 'FocusAdapter', 'FocusEvent', 'FocusListener', 'FocusManager', 'FocusTraversalPolicy', 'Font', 'FontFormatException', 'FontMetrics', 'FontRenderContext', 'FontUIResource', 'FormSubmitEvent', 'FormSubmitEvent.MethodType', 'FormView', 'Format', 'Format.Field', 'FormatConversionProvider', 'FormatFlagsConversionMismatchException', 'FormatMismatch', 'FormatMismatchHelper', 'Formattable', 'FormattableFlags', 'Formatter', 'Formatter', 'FormatterClosedException', 'ForwardRequest', 'ForwardRequest', 'ForwardRequestHelper', 'ForwardRequestHelper', 'Frame', 'Future', 'FutureTask', 'GSSContext', 'GSSCredential', 'GSSException', 'GSSManager', 'GSSName', 'GZIPInputStream', 'GZIPOutputStream', 'GapContent', 'GarbageCollectorMXBean', 'GatheringByteChannel', 'GaugeMonitor', 'GaugeMonitorMBean', 'GeneralPath', 'GeneralSecurityException', 'GenericArrayType', 'GenericDeclaration', 'GenericSignatureFormatError', 'GlyphJustificationInfo', 'GlyphMetrics', 'GlyphVector', 'GlyphView', 'GlyphView.GlyphPainter', 'GradientPaint', 'GraphicAttribute', 'Graphics', 'Graphics2D', 'GraphicsConfigTemplate', 'GraphicsConfiguration', 'GraphicsDevice', 'GraphicsEnvironment', 'GrayFilter', 'GregorianCalendar', 'GridBagConstraints', 'GridBagLayout', 'GridLayout', 'Group', 'Guard', 'GuardedObject', 'HOLDING', 'HTML', 'HTML.Attribute', 'HTML.Tag', 'HTML.UnknownTag', 'HTMLDocument', 'HTMLDocument.Iterator', 'HTMLEditorKit', 'HTMLEditorKit.HTMLFactory', 'HTMLEditorKit.HTMLTextAction', 'HTMLEditorKit.InsertHTMLTextAction', 'HTMLEditorKit.LinkController', 'HTMLEditorKit.Parser', 'HTMLEditorKit.ParserCallback', 'HTMLFrameHyperlinkEvent', 'HTMLWriter', 'Handler', 'HandlerBase', 'HandshakeCompletedEvent', 'HandshakeCompletedListener', 'HasControls', 'HashAttributeSet', 'HashDocAttributeSet', 'HashMap', 'HashPrintJobAttributeSet', 'HashPrintRequestAttributeSet', 'HashPrintServiceAttributeSet', 'HashSet', 'Hashtable', 'HeadlessException', 'HierarchyBoundsAdapter', 'HierarchyBoundsListener', 'HierarchyEvent', 'HierarchyListener', 'Highlighter', 'Highlighter.Highlight', 'Highlighter.HighlightPainter', 'HostnameVerifier', 'HttpRetryException', 'HttpURLConnection', 'HttpsURLConnection', 'HyperlinkEvent', 'HyperlinkEvent.EventType', 'HyperlinkListener', 'ICC_ColorSpace', 'ICC_Profile', 'ICC_ProfileGray', 'ICC_ProfileRGB', 'IDLEntity', 'IDLType', 'IDLTypeHelper', 'IDLTypeOperations', 'ID_ASSIGNMENT_POLICY_ID', 'ID_UNIQUENESS_POLICY_ID', 'IIOByteBuffer', 'IIOException', 'IIOImage', 'IIOInvalidTreeException', 'IIOMetadata', 'IIOMetadataController', 'IIOMetadataFormat', 'IIOMetadataFormatImpl', 'IIOMetadataNode', 'IIOParam', 'IIOParamController', 'IIOReadProgressListener', 'IIOReadUpdateListener', 'IIOReadWarningListener', 'IIORegistry', 'IIOServiceProvider', 'IIOWriteProgressListener', 'IIOWriteWarningListener', 'IMPLICIT_ACTIVATION_POLICY_ID', 'IMP_LIMIT', 'INACTIVE', 'INITIALIZE', 'INTERNAL', 'INTF_REPOS', 'INVALID_ACTIVITY', 'INVALID_TRANSACTION', 'INV_FLAG', 'INV_IDENT', 'INV_OBJREF', 'INV_POLICY', 'IOException', 'IOR', 'IORHelper', 'IORHolder', 'IORInfo', 'IORInfoOperations', 'IORInterceptor', 'IORInterceptorOperations', 'IORInterceptor_3_0', 'IORInterceptor_3_0Helper', 'IORInterceptor_3_0Holder', 'IORInterceptor_3_0Operations', 'IRObject', 'IRObjectOperations', 'Icon', 'IconUIResource', 'IconView', 'IdAssignmentPolicy', 'IdAssignmentPolicyOperations', 'IdAssignmentPolicyValue', 'IdUniquenessPolicy', 'IdUniquenessPolicyOperations', 'IdUniquenessPolicyValue', 'IdentifierHelper', 'Identity', 'IdentityHashMap', 'IdentityScope', 'IllegalAccessError', 'IllegalAccessException', 'IllegalArgumentException', 'IllegalBlockSizeException', 'IllegalBlockingModeException', 'IllegalCharsetNameException', 'IllegalClassFormatException', 'IllegalComponentStateException', 'IllegalFormatCodePointException', 'IllegalFormatConversionException', 'IllegalFormatException', 'IllegalFormatFlagsException', 'IllegalFormatPrecisionException', 'IllegalFormatWidthException', 'IllegalMonitorStateException', 'IllegalPathStateException', 'IllegalSelectorException', 'IllegalStateException', 'IllegalThreadStateException', 'Image', 'ImageCapabilities', 'ImageConsumer', 'ImageFilter', 'ImageGraphicAttribute', 'ImageIO', 'ImageIcon', 'ImageInputStream', 'ImageInputStreamImpl', 'ImageInputStreamSpi', 'ImageObserver', 'ImageOutputStream', 'ImageOutputStreamImpl', 'ImageOutputStreamSpi', 'ImageProducer', 'ImageReadParam', 'ImageReader', 'ImageReaderSpi', 'ImageReaderWriterSpi', 'ImageTranscoder', 'ImageTranscoderSpi', 'ImageTypeSpecifier', 'ImageView', 'ImageWriteParam', 'ImageWriter', 'ImageWriterSpi', 'ImagingOpException', 'ImplicitActivationPolicy', 'ImplicitActivationPolicyOperations', 'ImplicitActivationPolicyValue', 'IncompatibleClassChangeError', 'IncompleteAnnotationException', 'InconsistentTypeCode', 'InconsistentTypeCode', 'InconsistentTypeCodeHelper', 'IndexColorModel', 'IndexOutOfBoundsException', 'IndexedPropertyChangeEvent', 'IndexedPropertyDescriptor', 'IndirectionException', 'Inet4Address', 'Inet6Address', 'InetAddress', 'InetSocketAddress', 'Inflater', 'InflaterInputStream', 'InheritableThreadLocal', 'Inherited', 'InitialContext', 'InitialContextFactory', 'InitialContextFactoryBuilder', 'InitialDirContext', 'InitialLdapContext', 'InlineView', 'InputContext', 'InputEvent', 'InputMap', 'InputMapUIResource', 'InputMethod', 'InputMethodContext', 'InputMethodDescriptor', 'InputMethodEvent', 'InputMethodHighlight', 'InputMethodListener', 'InputMethodRequests', 'InputMismatchException', 'InputSource', 'InputStream', 'InputStream', 'InputStream', 'InputStreamReader', 'InputSubset', 'InputVerifier', 'Insets', 'InsetsUIResource', 'InstanceAlreadyExistsException', 'InstanceNotFoundException', 'InstantiationError', 'InstantiationException', 'Instrument', 'Instrumentation', 'InsufficientResourcesException', 'IntBuffer', 'IntHolder', 'Integer', 'IntegerSyntax', 'Interceptor', 'InterceptorOperations', 'InternalError', 'InternalFrameAdapter', 'InternalFrameEvent', 'InternalFrameFocusTraversalPolicy', 'InternalFrameListener', 'InternalFrameUI', 'InternationalFormatter', 'InterruptedException', 'InterruptedIOException', 'InterruptedNamingException', 'InterruptibleChannel', 'IntrospectionException', 'IntrospectionException', 'Introspector', 'Invalid', 'InvalidActivityException', 'InvalidAddress', 'InvalidAddressHelper', 'InvalidAddressHolder', 'InvalidAlgorithmParameterException', 'InvalidApplicationException', 'InvalidAttributeIdentifierException', 'InvalidAttributeValueException', 'InvalidAttributeValueException', 'InvalidAttributesException', 'InvalidClassException', 'InvalidDnDOperationException', 'InvalidKeyException', 'InvalidKeyException', 'InvalidKeySpecException', 'InvalidMarkException', 'InvalidMidiDataException', 'InvalidName', 'InvalidName', 'InvalidName', 'InvalidNameException', 'InvalidNameHelper', 'InvalidNameHelper', 'InvalidNameHolder', 'InvalidObjectException', 'InvalidOpenTypeException', 'InvalidParameterException', 'InvalidParameterSpecException', 'InvalidPolicy', 'InvalidPolicyHelper', 'InvalidPreferencesFormatException', 'InvalidPropertiesFormatException', 'InvalidRelationIdException', 'InvalidRelationServiceException', 'InvalidRelationTypeException', 'InvalidRoleInfoException', 'InvalidRoleValueException', 'InvalidSearchControlsException', 'InvalidSearchFilterException', 'InvalidSeq', 'InvalidSlot', 'InvalidSlotHelper', 'InvalidTargetObjectTypeException', 'InvalidTransactionException', 'InvalidTypeForEncoding', 'InvalidTypeForEncodingHelper', 'InvalidValue', 'InvalidValue', 'InvalidValueHelper', 'InvocationEvent', 'InvocationHandler', 'InvocationTargetException', 'InvokeHandler', 'IstringHelper', 'ItemEvent', 'ItemListener', 'ItemSelectable', 'Iterable', 'Iterator', 'IvParameterSpec', 'JApplet', 'JButton', 'JCheckBox', 'JCheckBoxMenuItem', 'JColorChooser', 'JComboBox', 'JComboBox.KeySelectionManager', 'JComponent', 'JDesktopPane', 'JDialog', 'JEditorPane', 'JFileChooser', 'JFormattedTextField', 'JFormattedTextField.AbstractFormatter', 'JFormattedTextField.AbstractFormatterFactory', 'JFrame', 'JInternalFrame', 'JInternalFrame.JDesktopIcon', 'JLabel', 'JLayeredPane', 'JList', 'JMException', 'JMRuntimeException', 'JMXAuthenticator', 'JMXConnectionNotification', 'JMXConnector', 'JMXConnectorFactory', 'JMXConnectorProvider', 'JMXConnectorServer', 'JMXConnectorServerFactory', 'JMXConnectorServerMBean', 'JMXConnectorServerProvider', 'JMXPrincipal', 'JMXProviderException', 'JMXServerErrorException', 'JMXServiceURL', 'JMenu', 'JMenuBar', 'JMenuItem', 'JOptionPane', 'JPEGHuffmanTable', 'JPEGImageReadParam', 'JPEGImageWriteParam', 'JPEGQTable', 'JPanel', 'JPasswordField', 'JPopupMenu', 'JPopupMenu.Separator', 'JProgressBar', 'JRadioButton', 'JRadioButtonMenuItem', 'JRootPane', 'JScrollBar', 'JScrollPane', 'JSeparator', 'JSlider', 'JSpinner', 'JSpinner.DateEditor', 'JSpinner.DefaultEditor', 'JSpinner.ListEditor', 'JSpinner.NumberEditor', 'JSplitPane', 'JTabbedPane', 'JTable', 'JTable.PrintMode', 'JTableHeader', 'JTextArea', 'JTextComponent', 'JTextComponent.KeyBinding', 'JTextField', 'JTextPane', 'JToggleButton', 'JToggleButton.ToggleButtonModel', 'JToolBar', 'JToolBar.Separator', 'JToolTip', 'JTree', 'JTree.DynamicUtilTreeNode', 'JTree.EmptySelectionModel', 'JViewport', 'JWindow', 'JarEntry', 'JarException', 'JarFile', 'JarInputStream', 'JarOutputStream', 'JarURLConnection', 'JdbcRowSet', 'JobAttributes', 'JobAttributes.DefaultSelectionType', 'JobAttributes.DestinationType', 'JobAttributes.DialogType', 'JobAttributes.MultipleDocumentHandlingType', 'JobAttributes.SidesType', 'JobHoldUntil', 'JobImpressions', 'JobImpressionsCompleted', 'JobImpressionsSupported', 'JobKOctets', 'JobKOctetsProcessed', 'JobKOctetsSupported', 'JobMediaSheets', 'JobMediaSheetsCompleted', 'JobMediaSheetsSupported', 'JobMessageFromOperator', 'JobName', 'JobOriginatingUserName', 'JobPriority', 'JobPrioritySupported', 'JobSheets', 'JobState', 'JobStateReason', 'JobStateReasons', 'JoinRowSet', 'Joinable', 'KerberosKey', 'KerberosPrincipal', 'KerberosTicket', 'Kernel', 'Key', 'KeyAdapter', 'KeyAgreement', 'KeyAgreementSpi', 'KeyAlreadyExistsException', 'KeyEvent', 'KeyEventDispatcher', 'KeyEventPostProcessor', 'KeyException', 'KeyFactory', 'KeyFactorySpi', 'KeyGenerator', 'KeyGeneratorSpi', 'KeyListener', 'KeyManagementException', 'KeyManager', 'KeyManagerFactory', 'KeyManagerFactorySpi', 'KeyPair', 'KeyPairGenerator', 'KeyPairGeneratorSpi', 'KeyRep', 'KeyRep.Type', 'KeySpec', 'KeyStore', 'KeyStore.Builder', 'KeyStore.CallbackHandlerProtection', 'KeyStore.Entry', 'KeyStore.LoadStoreParameter', 'KeyStore.PasswordProtection', 'KeyStore.PrivateKeyEntry', 'KeyStore.ProtectionParameter', 'KeyStore.SecretKeyEntry', 'KeyStore.TrustedCertificateEntry', 'KeyStoreBuilderParameters', 'KeyStoreException', 'KeyStoreSpi', 'KeyStroke', 'KeyboardFocusManager', 'Keymap', 'LDAPCertStoreParameters', 'LIFESPAN_POLICY_ID', 'LOCATION_FORWARD', 'LSException', 'LSInput', 'LSLoadEvent', 'LSOutput', 'LSParser', 'LSParserFilter', 'LSProgressEvent', 'LSResourceResolver', 'LSSerializer', 'LSSerializerFilter', 'Label', 'LabelUI', 'LabelView', 'LanguageCallback', 'LastOwnerException', 'LayeredHighlighter', 'LayeredHighlighter.LayerPainter', 'LayoutFocusTraversalPolicy', 'LayoutManager', 'LayoutManager2', 'LayoutQueue', 'LdapContext', 'LdapName', 'LdapReferralException', 'Lease', 'Level', 'LexicalHandler', 'LifespanPolicy', 'LifespanPolicyOperations', 'LifespanPolicyValue', 'LimitExceededException', 'Line', 'Line.Info', 'Line2D', 'Line2D.Double', 'Line2D.Float', 'LineBorder', 'LineBreakMeasurer', 'LineEvent', 'LineEvent.Type', 'LineListener', 'LineMetrics', 'LineNumberInputStream', 'LineNumberReader', 'LineUnavailableException', 'LinkException', 'LinkLoopException', 'LinkRef', 'LinkageError', 'LinkedBlockingQueue', 'LinkedHashMap', 'LinkedHashSet', 'LinkedList', 'List', 'List', 'ListCellRenderer', 'ListDataEvent', 'ListDataListener', 'ListIterator', 'ListModel', 'ListResourceBundle', 'ListSelectionEvent', 'ListSelectionListener', 'ListSelectionModel', 'ListUI', 'ListView', 'ListenerNotFoundException', 'LoaderHandler', 'LocalObject', 'Locale', 'LocateRegistry', 'Locator', 'Locator2', 'Locator2Impl', 'LocatorImpl', 'Lock', 'LockSupport', 'LogManager', 'LogRecord', 'LogStream', 'Logger', 'LoggingMXBean', 'LoggingPermission', 'LoginContext', 'LoginException', 'LoginModule', 'Long', 'LongBuffer', 'LongHolder', 'LongLongSeqHelper', 'LongLongSeqHolder', 'LongSeqHelper', 'LongSeqHolder', 'LookAndFeel', 'LookupOp', 'LookupTable', 'MARSHAL', 'MBeanAttributeInfo', 'MBeanConstructorInfo', 'MBeanException', 'MBeanFeatureInfo', 'MBeanInfo', 'MBeanNotificationInfo', 'MBeanOperationInfo', 'MBeanParameterInfo', 'MBeanPermission', 'MBeanRegistration', 'MBeanRegistrationException', 'MBeanServer', 'MBeanServerBuilder', 'MBeanServerConnection', 'MBeanServerDelegate', 'MBeanServerDelegateMBean', 'MBeanServerFactory', 'MBeanServerForwarder', 'MBeanServerInvocationHandler', 'MBeanServerNotification', 'MBeanServerNotificationFilter', 'MBeanServerPermission', 'MBeanTrustPermission', 'MGF1ParameterSpec', 'MLet', 'MLetMBean', 'Mac', 'MacSpi', 'MalformedInputException', 'MalformedLinkException', 'MalformedObjectNameException', 'MalformedParameterizedTypeException', 'MalformedURLException', 'ManageReferralControl', 'ManagementFactory', 'ManagementPermission', 'ManagerFactoryParameters', 'Manifest', 'Map', 'Map.Entry', 'MappedByteBuffer', 'MarshalException', 'MarshalledObject', 'MaskFormatter', 'MatchResult', 'Matcher', 'Math', 'MathContext', 'MatteBorder', 'Media', 'MediaName', 'MediaPrintableArea', 'MediaSize', 'MediaSize.Engineering', 'MediaSize.ISO', 'MediaSize.JIS', 'MediaSize.NA', 'MediaSize.Other', 'MediaSizeName', 'MediaTracker', 'MediaTray', 'Member', 'MemoryCacheImageInputStream', 'MemoryCacheImageOutputStream', 'MemoryHandler', 'MemoryImageSource', 'MemoryMXBean', 'MemoryManagerMXBean', 'MemoryNotificationInfo', 'MemoryPoolMXBean', 'MemoryType', 'MemoryUsage', 'Menu', 'MenuBar', 'MenuBarUI', 'MenuComponent', 'MenuContainer', 'MenuDragMouseEvent', 'MenuDragMouseListener', 'MenuElement', 'MenuEvent', 'MenuItem', 'MenuItemUI', 'MenuKeyEvent', 'MenuKeyListener', 'MenuListener', 'MenuSelectionManager', 'MenuShortcut', 'MessageDigest', 'MessageDigestSpi', 'MessageFormat', 'MessageFormat.Field', 'MessageProp', 'MetaEventListener', 'MetaMessage', 'MetalBorders', 'MetalBorders.ButtonBorder', 'MetalBorders.Flush3DBorder', 'MetalBorders.InternalFrameBorder', 'MetalBorders.MenuBarBorder', 'MetalBorders.MenuItemBorder', 'MetalBorders.OptionDialogBorder', 'MetalBorders.PaletteBorder', 'MetalBorders.PopupMenuBorder', 'MetalBorders.RolloverButtonBorder', 'MetalBorders.ScrollPaneBorder', 'MetalBorders.TableHeaderBorder', 'MetalBorders.TextFieldBorder', 'MetalBorders.ToggleButtonBorder', 'MetalBorders.ToolBarBorder', 'MetalButtonUI', 'MetalCheckBoxIcon', 'MetalCheckBoxUI', 'MetalComboBoxButton', 'MetalComboBoxEditor', 'MetalComboBoxEditor.UIResource', 'MetalComboBoxIcon', 'MetalComboBoxUI', 'MetalDesktopIconUI', 'MetalFileChooserUI', 'MetalIconFactory', 'MetalIconFactory.FileIcon16', 'MetalIconFactory.FolderIcon16', 'MetalIconFactory.PaletteCloseIcon', 'MetalIconFactory.TreeControlIcon', 'MetalIconFactory.TreeFolderIcon', 'MetalIconFactory.TreeLeafIcon', 'MetalInternalFrameTitlePane', 'MetalInternalFrameUI', 'MetalLabelUI', 'MetalLookAndFeel', 'MetalMenuBarUI', 'MetalPopupMenuSeparatorUI', 'MetalProgressBarUI', 'MetalRadioButtonUI', 'MetalRootPaneUI', 'MetalScrollBarUI', 'MetalScrollButton', 'MetalScrollPaneUI', 'MetalSeparatorUI', 'MetalSliderUI', 'MetalSplitPaneUI', 'MetalTabbedPaneUI', 'MetalTextFieldUI', 'MetalTheme', 'MetalToggleButtonUI', 'MetalToolBarUI', 'MetalToolTipUI', 'MetalTreeUI', 'Method', 'MethodDescriptor', 'MidiChannel', 'MidiDevice', 'MidiDevice.Info', 'MidiDeviceProvider', 'MidiEvent', 'MidiFileFormat', 'MidiFileReader', 'MidiFileWriter', 'MidiMessage', 'MidiSystem', 'MidiUnavailableException', 'MimeTypeParseException', 'MinimalHTMLWriter', 'MissingFormatArgumentException', 'MissingFormatWidthException', 'MissingResourceException', 'Mixer', 'Mixer.Info', 'MixerProvider', 'ModelMBean', 'ModelMBeanAttributeInfo', 'ModelMBeanConstructorInfo', 'ModelMBeanInfo', 'ModelMBeanInfoSupport', 'ModelMBeanNotificationBroadcaster', 'ModelMBeanNotificationInfo', 'ModelMBeanOperationInfo', 'ModificationItem', 'Modifier', 'Monitor', 'MonitorMBean', 'MonitorNotification', 'MonitorSettingException', 'MouseAdapter', 'MouseDragGestureRecognizer', 'MouseEvent', 'MouseInfo', 'MouseInputAdapter', 'MouseInputListener', 'MouseListener', 'MouseMotionAdapter', 'MouseMotionListener', 'MouseWheelEvent', 'MouseWheelListener', 'MultiButtonUI', 'MultiColorChooserUI', 'MultiComboBoxUI', 'MultiDesktopIconUI', 'MultiDesktopPaneUI', 'MultiDoc', 'MultiDocPrintJob', 'MultiDocPrintService', 'MultiFileChooserUI', 'MultiInternalFrameUI', 'MultiLabelUI', 'MultiListUI', 'MultiLookAndFeel', 'MultiMenuBarUI', 'MultiMenuItemUI', 'MultiOptionPaneUI', 'MultiPanelUI', 'MultiPixelPackedSampleModel', 'MultiPopupMenuUI', 'MultiProgressBarUI', 'MultiRootPaneUI', 'MultiScrollBarUI', 'MultiScrollPaneUI', 'MultiSeparatorUI', 'MultiSliderUI', 'MultiSpinnerUI', 'MultiSplitPaneUI', 'MultiTabbedPaneUI', 'MultiTableHeaderUI', 'MultiTableUI', 'MultiTextUI', 'MultiToolBarUI', 'MultiToolTipUI', 'MultiTreeUI', 'MultiViewportUI', 'MulticastSocket', 'MultipleComponentProfileHelper', 'MultipleComponentProfileHolder', 'MultipleDocumentHandling', 'MultipleMaster', 'MutableAttributeSet', 'MutableComboBoxModel', 'MutableTreeNode', 'NON_EXISTENT', 'NO_IMPLEMENT', 'NO_MEMORY', 'NO_PERMISSION', 'NO_RESOURCES', 'NO_RESPONSE', 'NVList', 'Name', 'NameAlreadyBoundException', 'NameCallback', 'NameClassPair', 'NameComponent', 'NameComponentHelper', 'NameComponentHolder', 'NameDynAnyPair', 'NameDynAnyPairHelper', 'NameDynAnyPairSeqHelper', 'NameHelper', 'NameHolder', 'NameList', 'NameNotFoundException', 'NameParser', 'NameValuePair', 'NameValuePair', 'NameValuePairHelper', 'NameValuePairHelper', 'NameValuePairSeqHelper', 'NamedNodeMap', 'NamedValue', 'NamespaceChangeListener', 'NamespaceContext', 'NamespaceSupport', 'Naming', 'NamingContext', 'NamingContextExt', 'NamingContextExtHelper', 'NamingContextExtHolder', 'NamingContextExtOperations', 'NamingContextExtPOA', 'NamingContextHelper', 'NamingContextHolder', 'NamingContextOperations', 'NamingContextPOA', 'NamingEnumeration', 'NamingEvent', 'NamingException', 'NamingExceptionEvent', 'NamingListener', 'NamingManager', 'NamingSecurityException', 'NavigationFilter', 'NavigationFilter.FilterBypass', 'NegativeArraySizeException', 'NetPermission', 'NetworkInterface', 'NoClassDefFoundError', 'NoConnectionPendingException', 'NoContext', 'NoContextHelper', 'NoInitialContextException', 'NoPermissionException', 'NoRouteToHostException', 'NoServant', 'NoServantHelper', 'NoSuchAlgorithmException', 'NoSuchAttributeException', 'NoSuchElementException', 'NoSuchFieldError', 'NoSuchFieldException', 'NoSuchMethodError', 'NoSuchMethodException', 'NoSuchObjectException', 'NoSuchPaddingException', 'NoSuchProviderException', 'Node', 'NodeChangeEvent', 'NodeChangeListener', 'NodeList', 'NonReadableChannelException', 'NonWritableChannelException', 'NoninvertibleTransformException', 'NotActiveException', 'NotBoundException', 'NotCompliantMBeanException', 'NotContextException', 'NotEmpty', 'NotEmptyHelper', 'NotEmptyHolder', 'NotFound', 'NotFoundHelper', 'NotFoundHolder', 'NotFoundReason', 'NotFoundReasonHelper', 'NotFoundReasonHolder', 'NotOwnerException', 'NotSerializableException', 'NotYetBoundException', 'NotYetConnectedException', 'Notation', 'Notification', 'NotificationBroadcaster', 'NotificationBroadcasterSupport', 'NotificationEmitter', 'NotificationFilter', 'NotificationFilterSupport', 'NotificationListener', 'NotificationResult', 'NullCipher', 'NullPointerException', 'Number', 'NumberFormat', 'NumberFormat.Field', 'NumberFormatException', 'NumberFormatter', 'NumberOfDocuments', 'NumberOfInterveningJobs', 'NumberUp', 'NumberUpSupported', 'NumericShaper', 'OAEPParameterSpec', 'OBJECT_NOT_EXIST', 'OBJ_ADAPTER', 'OMGVMCID', 'ORB', 'ORB', 'ORBIdHelper', 'ORBInitInfo', 'ORBInitInfoOperations', 'ORBInitializer', 'ORBInitializerOperations', 'ObjID', 'Object', 'Object', 'ObjectAlreadyActive', 'ObjectAlreadyActiveHelper', 'ObjectChangeListener', 'ObjectFactory', 'ObjectFactoryBuilder', 'ObjectHelper', 'ObjectHolder', 'ObjectIdHelper', 'ObjectIdHelper', 'ObjectImpl', 'ObjectImpl', 'ObjectInput', 'ObjectInputStream', 'ObjectInputStream.GetField', 'ObjectInputValidation', 'ObjectInstance', 'ObjectName', 'ObjectNotActive', 'ObjectNotActiveHelper', 'ObjectOutput', 'ObjectOutputStream', 'ObjectOutputStream.PutField', 'ObjectReferenceFactory', 'ObjectReferenceFactoryHelper', 'ObjectReferenceFactoryHolder', 'ObjectReferenceTemplate', 'ObjectReferenceTemplateHelper', 'ObjectReferenceTemplateHolder', 'ObjectReferenceTemplateSeqHelper', 'ObjectReferenceTemplateSeqHolder', 'ObjectStreamClass', 'ObjectStreamConstants', 'ObjectStreamException', 'ObjectStreamField', 'ObjectView', 'Observable', 'Observer', 'OceanTheme', 'OctetSeqHelper', 'OctetSeqHolder', 'Oid', 'OpenDataException', 'OpenMBeanAttributeInfo', 'OpenMBeanAttributeInfoSupport', 'OpenMBeanConstructorInfo', 'OpenMBeanConstructorInfoSupport', 'OpenMBeanInfo', 'OpenMBeanInfoSupport', 'OpenMBeanOperationInfo', 'OpenMBeanOperationInfoSupport', 'OpenMBeanParameterInfo', 'OpenMBeanParameterInfoSupport', 'OpenType', 'OpenType', 'OperatingSystemMXBean', 'Operation', 'OperationNotSupportedException', 'OperationsException', 'Option', 'OptionPaneUI', 'OptionalDataException', 'OrientationRequested', 'OutOfMemoryError', 'OutputDeviceAssigned', 'OutputKeys', 'OutputStream', 'OutputStream', 'OutputStream', 'OutputStreamWriter', 'OverlappingFileLockException', 'OverlayLayout', 'Override', 'Owner', 'PBEKey', 'PBEKeySpec', 'PBEParameterSpec', 'PDLOverrideSupported', 'PERSIST_STORE', 'PKCS8EncodedKeySpec', 'PKIXBuilderParameters', 'PKIXCertPathBuilderResult', 'PKIXCertPathChecker', 'PKIXCertPathValidatorResult', 'PKIXParameters', 'POA', 'POAHelper', 'POAManager', 'POAManagerOperations', 'POAOperations', 'PRIVATE_MEMBER', 'PSSParameterSpec', 'PSource', 'PSource.PSpecified', 'PUBLIC_MEMBER', 'Pack200', 'Pack200.Packer', 'Pack200.Unpacker', 'Package', 'PackedColorModel', 'PageAttributes', 'PageAttributes.ColorType', 'PageAttributes.MediaType', 'PageAttributes.OrientationRequestedType', 'PageAttributes.OriginType', 'PageAttributes.PrintQualityType', 'PageFormat', 'PageRanges', 'Pageable', 'PagedResultsControl', 'PagedResultsResponseControl', 'PagesPerMinute', 'PagesPerMinuteColor', 'Paint', 'PaintContext', 'PaintEvent', 'Panel', 'PanelUI', 'Paper', 'ParagraphView', 'ParagraphView', 'Parameter', 'ParameterBlock', 'ParameterDescriptor', 'ParameterMetaData', 'ParameterMode', 'ParameterModeHelper', 'ParameterModeHolder', 'ParameterizedType', 'ParseException', 'ParsePosition', 'Parser', 'Parser', 'ParserAdapter', 'ParserConfigurationException', 'ParserDelegator', 'ParserFactory', 'PartialResultException', 'PasswordAuthentication', 'PasswordCallback', 'PasswordView', 'Patch', 'PathIterator', 'Pattern', 'PatternSyntaxException', 'Permission', 'Permission', 'PermissionCollection', 'Permissions', 'PersistenceDelegate', 'PersistentMBean', 'PhantomReference', 'Pipe', 'Pipe.SinkChannel', 'Pipe.SourceChannel', 'PipedInputStream', 'PipedOutputStream', 'PipedReader', 'PipedWriter', 'PixelGrabber', 'PixelInterleavedSampleModel', 'PlainDocument', 'PlainView', 'Point', 'Point2D', 'Point2D.Double', 'Point2D.Float', 'PointerInfo', 'Policy', 'Policy', 'Policy', 'PolicyError', 'PolicyErrorCodeHelper', 'PolicyErrorHelper', 'PolicyErrorHolder', 'PolicyFactory', 'PolicyFactoryOperations', 'PolicyHelper', 'PolicyHolder', 'PolicyListHelper', 'PolicyListHolder', 'PolicyNode', 'PolicyOperations', 'PolicyQualifierInfo', 'PolicyTypeHelper', 'Polygon', 'PooledConnection', 'Popup', 'PopupFactory', 'PopupMenu', 'PopupMenuEvent', 'PopupMenuListener', 'PopupMenuUI', 'Port', 'Port.Info', 'PortUnreachableException', 'PortableRemoteObject', 'PortableRemoteObjectDelegate', 'Position', 'Position.Bias', 'Predicate', 'PreferenceChangeEvent', 'PreferenceChangeListener', 'Preferences', 'PreferencesFactory', 'PreparedStatement', 'PresentationDirection', 'Principal', 'Principal', 'PrincipalHolder', 'PrintEvent', 'PrintException', 'PrintGraphics', 'PrintJob', 'PrintJobAdapter', 'PrintJobAttribute', 'PrintJobAttributeEvent', 'PrintJobAttributeListener', 'PrintJobAttributeSet', 'PrintJobEvent', 'PrintJobListener', 'PrintQuality', 'PrintRequestAttribute', 'PrintRequestAttributeSet', 'PrintService', 'PrintServiceAttribute', 'PrintServiceAttributeEvent', 'PrintServiceAttributeListener', 'PrintServiceAttributeSet', 'PrintServiceLookup', 'PrintStream', 'PrintWriter', 'Printable', 'PrinterAbortException', 'PrinterException', 'PrinterGraphics', 'PrinterIOException', 'PrinterInfo', 'PrinterIsAcceptingJobs', 'PrinterJob', 'PrinterLocation', 'PrinterMakeAndModel', 'PrinterMessageFromOperator', 'PrinterMoreInfo', 'PrinterMoreInfoManufacturer', 'PrinterName', 'PrinterResolution', 'PrinterState', 'PrinterStateReason', 'PrinterStateReasons', 'PrinterURI', 'PriorityBlockingQueue', 'PriorityQueue', 'PrivateClassLoader', 'PrivateCredentialPermission', 'PrivateKey', 'PrivateMLet', 'PrivilegedAction', 'PrivilegedActionException', 'PrivilegedExceptionAction', 'Process', 'ProcessBuilder', 'ProcessingInstruction', 'ProfileDataException', 'ProfileIdHelper', 'ProgressBarUI', 'ProgressMonitor', 'ProgressMonitorInputStream', 'Properties', 'PropertyChangeEvent', 'PropertyChangeListener', 'PropertyChangeListenerProxy', 'PropertyChangeSupport', 'PropertyDescriptor', 'PropertyEditor', 'PropertyEditorManager', 'PropertyEditorSupport', 'PropertyPermission', 'PropertyResourceBundle', 'PropertyVetoException', 'ProtectionDomain', 'ProtocolException', 'Provider', 'Provider.Service', 'ProviderException', 'Proxy', 'Proxy', 'Proxy.Type', 'ProxySelector', 'PublicKey', 'PushbackInputStream', 'PushbackReader', 'QName', 'QuadCurve2D', 'QuadCurve2D.Double', 'QuadCurve2D.Float', 'Query', 'QueryEval', 'QueryExp', 'Queue', 'QueuedJobCount', 'RC2ParameterSpec', 'RC5ParameterSpec', 'REBIND', 'REQUEST_PROCESSING_POLICY_ID', 'RGBImageFilter', 'RMIClassLoader', 'RMIClassLoaderSpi', 'RMIClientSocketFactory', 'RMIConnection', 'RMIConnectionImpl', 'RMIConnectionImpl_Stub', 'RMIConnector', 'RMIConnectorServer', 'RMICustomMaxStreamFormat', 'RMIFailureHandler', 'RMIIIOPServerImpl', 'RMIJRMPServerImpl', 'RMISecurityException', 'RMISecurityManager', 'RMIServer', 'RMIServerImpl', 'RMIServerImpl_Stub', 'RMIServerSocketFactory', 'RMISocketFactory', 'RSAKey', 'RSAKeyGenParameterSpec', 'RSAMultiPrimePrivateCrtKey', 'RSAMultiPrimePrivateCrtKeySpec', 'RSAOtherPrimeInfo', 'RSAPrivateCrtKey', 'RSAPrivateCrtKeySpec', 'RSAPrivateKey', 'RSAPrivateKeySpec', 'RSAPublicKey', 'RSAPublicKeySpec', 'RTFEditorKit', 'Random', 'RandomAccess', 'RandomAccessFile', 'Raster', 'RasterFormatException', 'RasterOp', 'Rdn', 'ReadOnlyBufferException', 'ReadWriteLock', 'Readable', 'ReadableByteChannel', 'Reader', 'RealmCallback', 'RealmChoiceCallback', 'Receiver', 'Rectangle', 'Rectangle2D', 'Rectangle2D.Double', 'Rectangle2D.Float', 'RectangularShape', 'ReentrantLock', 'ReentrantReadWriteLock', 'ReentrantReadWriteLock.ReadLock', 'ReentrantReadWriteLock.WriteLock', 'Ref', 'RefAddr', 'Reference', 'Reference', 'ReferenceQueue', 'ReferenceUriSchemesSupported', 'Referenceable', 'ReferralException', 'ReflectPermission', 'ReflectionException', 'RefreshFailedException', 'Refreshable', 'Region', 'RegisterableService', 'Registry', 'RegistryHandler', 'RejectedExecutionException', 'RejectedExecutionHandler', 'Relation', 'RelationException', 'RelationNotFoundException', 'RelationNotification', 'RelationService', 'RelationServiceMBean', 'RelationServiceNotRegisteredException', 'RelationSupport', 'RelationSupportMBean', 'RelationType', 'RelationTypeNotFoundException', 'RelationTypeSupport', 'RemarshalException', 'Remote', 'RemoteCall', 'RemoteException', 'RemoteObject', 'RemoteObjectInvocationHandler', 'RemoteRef', 'RemoteServer', 'RemoteStub', 'RenderContext', 'RenderableImage', 'RenderableImageOp', 'RenderableImageProducer', 'RenderedImage', 'RenderedImageFactory', 'Renderer', 'RenderingHints', 'RenderingHints.Key', 'RepaintManager', 'ReplicateScaleFilter', 'RepositoryIdHelper', 'Request', 'RequestInfo', 'RequestInfoOperations', 'RequestProcessingPolicy', 'RequestProcessingPolicyOperations', 'RequestProcessingPolicyValue', 'RequestingUserName', 'RequiredModelMBean', 'RescaleOp', 'ResolutionSyntax', 'ResolveResult', 'Resolver', 'ResourceBundle', 'ResponseCache', 'ResponseHandler', 'Result', 'ResultSet', 'ResultSetMetaData', 'Retention', 'RetentionPolicy', 'ReverbType', 'Robot', 'Role', 'RoleInfo', 'RoleInfoNotFoundException', 'RoleList', 'RoleNotFoundException', 'RoleResult', 'RoleStatus', 'RoleUnresolved', 'RoleUnresolvedList', 'RootPaneContainer', 'RootPaneUI', 'RoundRectangle2D', 'RoundRectangle2D.Double', 'RoundRectangle2D.Float', 'RoundingMode', 'RowMapper', 'RowSet', 'RowSetEvent', 'RowSetInternal', 'RowSetListener', 'RowSetMetaData', 'RowSetMetaDataImpl', 'RowSetReader', 'RowSetWarning', 'RowSetWriter', 'RuleBasedCollator', 'RunTime', 'RunTimeOperations', 'Runnable', 'Runtime', 'RuntimeErrorException', 'RuntimeException', 'RuntimeMBeanException', 'RuntimeMXBean', 'RuntimeOperationsException', 'RuntimePermission', 'SAXException', 'SAXNotRecognizedException', 'SAXNotSupportedException', 'SAXParseException', 'SAXParser', 'SAXParserFactory', 'SAXResult', 'SAXSource', 'SAXTransformerFactory', 'SERVANT_RETENTION_POLICY_ID', 'SQLData', 'SQLException', 'SQLInput', 'SQLInputImpl', 'SQLOutput', 'SQLOutputImpl', 'SQLPermission', 'SQLWarning', 'SSLContext', 'SSLContextSpi', 'SSLEngine', 'SSLEngineResult', 'SSLEngineResult.HandshakeStatus', 'SSLEngineResult.Status', 'SSLException', 'SSLHandshakeException', 'SSLKeyException', 'SSLPeerUnverifiedException', 'SSLPermission', 'SSLProtocolException', 'SSLServerSocket', 'SSLServerSocketFactory', 'SSLSession', 'SSLSessionBindingEvent', 'SSLSessionBindingListener', 'SSLSessionContext', 'SSLSocket', 'SSLSocketFactory', 'SUCCESSFUL', 'SYNC_WITH_TRANSPORT', 'SYSTEM_EXCEPTION', 'SampleModel', 'Sasl', 'SaslClient', 'SaslClientFactory', 'SaslException', 'SaslServer', 'SaslServerFactory', 'Savepoint', 'Scanner', 'ScatteringByteChannel', 'ScheduledExecutorService', 'ScheduledFuture', 'ScheduledThreadPoolExecutor', 'Schema', 'SchemaFactory', 'SchemaFactoryLoader', 'SchemaViolationException', 'ScrollBarUI', 'ScrollPane', 'ScrollPaneAdjustable', 'ScrollPaneConstants', 'ScrollPaneLayout', 'ScrollPaneLayout.UIResource', 'ScrollPaneUI', 'Scrollable', 'Scrollbar', 'SealedObject', 'SearchControls', 'SearchResult', 'SecretKey', 'SecretKeyFactory', 'SecretKeyFactorySpi', 'SecretKeySpec', 'SecureCacheResponse', 'SecureClassLoader', 'SecureRandom', 'SecureRandomSpi', 'Security', 'SecurityException', 'SecurityManager', 'SecurityPermission', 'Segment', 'SelectableChannel', 'SelectionKey', 'Selector', 'SelectorProvider', 'Semaphore', 'SeparatorUI', 'Sequence', 'SequenceInputStream', 'Sequencer', 'Sequencer.SyncMode', 'SerialArray', 'SerialBlob', 'SerialClob', 'SerialDatalink', 'SerialException', 'SerialJavaObject', 'SerialRef', 'SerialStruct', 'Serializable', 'SerializablePermission', 'Servant', 'ServantActivator', 'ServantActivatorHelper', 'ServantActivatorOperations', 'ServantActivatorPOA', 'ServantAlreadyActive', 'ServantAlreadyActiveHelper', 'ServantLocator', 'ServantLocatorHelper', 'ServantLocatorOperations', 'ServantLocatorPOA', 'ServantManager', 'ServantManagerOperations', 'ServantNotActive', 'ServantNotActiveHelper', 'ServantObject', 'ServantRetentionPolicy', 'ServantRetentionPolicyOperations', 'ServantRetentionPolicyValue', 'ServerCloneException', 'ServerError', 'ServerException', 'ServerIdHelper', 'ServerNotActiveException', 'ServerRef', 'ServerRequest', 'ServerRequestInfo', 'ServerRequestInfoOperations', 'ServerRequestInterceptor', 'ServerRequestInterceptorOperations', 'ServerRuntimeException', 'ServerSocket', 'ServerSocketChannel', 'ServerSocketFactory', 'ServiceContext', 'ServiceContextHelper', 'ServiceContextHolder', 'ServiceContextListHelper', 'ServiceContextListHolder', 'ServiceDetail', 'ServiceDetailHelper', 'ServiceIdHelper', 'ServiceInformation', 'ServiceInformationHelper', 'ServiceInformationHolder', 'ServiceNotFoundException', 'ServicePermission', 'ServiceRegistry', 'ServiceRegistry.Filter', 'ServiceUI', 'ServiceUIFactory', 'ServiceUnavailableException', 'Set', 'SetOfIntegerSyntax', 'SetOverrideType', 'SetOverrideTypeHelper', 'Severity', 'Shape', 'ShapeGraphicAttribute', 'SheetCollate', 'Short', 'ShortBuffer', 'ShortBufferException', 'ShortHolder', 'ShortLookupTable', 'ShortMessage', 'ShortSeqHelper', 'ShortSeqHolder', 'Sides', 'Signature', 'SignatureException', 'SignatureSpi', 'SignedObject', 'Signer', 'SimpleAttributeSet', 'SimpleBeanInfo', 'SimpleDateFormat', 'SimpleDoc', 'SimpleFormatter', 'SimpleTimeZone', 'SimpleType', 'SinglePixelPackedSampleModel', 'SingleSelectionModel', 'Size2DSyntax', 'SizeLimitExceededException', 'SizeRequirements', 'SizeSequence', 'Skeleton', 'SkeletonMismatchException', 'SkeletonNotFoundException', 'SliderUI', 'Socket', 'SocketAddress', 'SocketChannel', 'SocketException', 'SocketFactory', 'SocketHandler', 'SocketImpl', 'SocketImplFactory', 'SocketOptions', 'SocketPermission', 'SocketSecurityException', 'SocketTimeoutException', 'SoftBevelBorder', 'SoftReference', 'SortControl', 'SortKey', 'SortResponseControl', 'SortedMap', 'SortedSet', 'SortingFocusTraversalPolicy', 'Soundbank', 'SoundbankReader', 'SoundbankResource', 'Source', 'SourceDataLine', 'SourceLocator', 'SpinnerDateModel', 'SpinnerListModel', 'SpinnerModel', 'SpinnerNumberModel', 'SpinnerUI', 'SplitPaneUI', 'Spring', 'SpringLayout', 'SpringLayout.Constraints', 'SslRMIClientSocketFactory', 'SslRMIServerSocketFactory', 'Stack', 'StackOverflowError', 'StackTraceElement', 'StandardMBean', 'StartTlsRequest', 'StartTlsResponse', 'State', 'StateEdit', 'StateEditable', 'StateFactory', 'Statement', 'Statement', 'StreamCorruptedException', 'StreamHandler', 'StreamPrintService', 'StreamPrintServiceFactory', 'StreamResult', 'StreamSource', 'StreamTokenizer', 'Streamable', 'StreamableValue', 'StrictMath', 'String', 'StringBuffer', 'StringBufferInputStream', 'StringBuilder', 'StringCharacterIterator', 'StringContent', 'StringHolder', 'StringIndexOutOfBoundsException', 'StringMonitor', 'StringMonitorMBean', 'StringNameHelper', 'StringReader', 'StringRefAddr', 'StringSelection', 'StringSeqHelper', 'StringSeqHolder', 'StringTokenizer', 'StringValueExp', 'StringValueHelper', 'StringWriter', 'Stroke', 'Struct', 'StructMember', 'StructMemberHelper', 'Stub', 'StubDelegate', 'StubNotFoundException', 'Style', 'StyleConstants', 'StyleConstants.CharacterConstants', 'StyleConstants.ColorConstants', 'StyleConstants.FontConstants', 'StyleConstants.ParagraphConstants', 'StyleContext', 'StyleSheet', 'StyleSheet.BoxPainter', 'StyleSheet.ListPainter', 'StyledDocument', 'StyledEditorKit', 'StyledEditorKit.AlignmentAction', 'StyledEditorKit.BoldAction', 'StyledEditorKit.FontFamilyAction', 'StyledEditorKit.FontSizeAction', 'StyledEditorKit.ForegroundAction', 'StyledEditorKit.ItalicAction', 'StyledEditorKit.StyledTextAction', 'StyledEditorKit.UnderlineAction', 'Subject', 'SubjectDelegationPermission', 'SubjectDomainCombiner', 'SupportedValuesAttribute', 'SuppressWarnings', 'SwingConstants', 'SwingPropertyChangeSupport', 'SwingUtilities', 'SyncFactory', 'SyncFactoryException', 'SyncFailedException', 'SyncProvider', 'SyncProviderException', 'SyncResolver', 'SyncScopeHelper', 'SynchronousQueue', 'SynthConstants', 'SynthContext', 'SynthGraphicsUtils', 'SynthLookAndFeel', 'SynthPainter', 'SynthStyle', 'SynthStyleFactory', 'Synthesizer', 'SysexMessage', 'System', 'SystemColor', 'SystemException', 'SystemFlavorMap', 'TAG_ALTERNATE_IIOP_ADDRESS', 'TAG_CODE_SETS', 'TAG_INTERNET_IOP', 'TAG_JAVA_CODEBASE', 'TAG_MULTIPLE_COMPONENTS', 'TAG_ORB_TYPE', 'TAG_POLICIES', 'TAG_RMI_CUSTOM_MAX_STREAM_FORMAT', 'TCKind', 'THREAD_POLICY_ID', 'TIMEOUT', 'TRANSACTION_MODE', 'TRANSACTION_REQUIRED', 'TRANSACTION_ROLLEDBACK', 'TRANSACTION_UNAVAILABLE', 'TRANSIENT', 'TRANSPORT_RETRY', 'TabExpander', 'TabSet', 'TabStop', 'TabableView', 'TabbedPaneUI', 'TableCellEditor', 'TableCellRenderer', 'TableColumn', 'TableColumnModel', 'TableColumnModelEvent', 'TableColumnModelListener', 'TableHeaderUI', 'TableModel', 'TableModelEvent', 'TableModelListener', 'TableUI', 'TableView', 'TabularData', 'TabularDataSupport', 'TabularType', 'TagElement', 'TaggedComponent', 'TaggedComponentHelper', 'TaggedComponentHolder', 'TaggedProfile', 'TaggedProfileHelper', 'TaggedProfileHolder', 'Target', 'TargetDataLine', 'TargetedNotification', 'Templates', 'TemplatesHandler', 'Text', 'TextAction', 'TextArea', 'TextAttribute', 'TextComponent', 'TextEvent', 'TextField', 'TextHitInfo', 'TextInputCallback', 'TextLayout', 'TextLayout.CaretPolicy', 'TextListener', 'TextMeasurer', 'TextOutputCallback', 'TextSyntax', 'TextUI', 'TexturePaint', 'Thread', 'Thread.State', 'Thread.UncaughtExceptionHandler', 'ThreadDeath', 'ThreadFactory', 'ThreadGroup', 'ThreadInfo', 'ThreadLocal', 'ThreadMXBean', 'ThreadPolicy', 'ThreadPolicyOperations', 'ThreadPolicyValue', 'ThreadPoolExecutor', 'ThreadPoolExecutor.AbortPolicy', 'ThreadPoolExecutor.CallerRunsPolicy', 'ThreadPoolExecutor.DiscardOldestPolicy', 'ThreadPoolExecutor.DiscardPolicy', 'Throwable', 'Tie', 'TileObserver', 'Time', 'TimeLimitExceededException', 'TimeUnit', 'TimeZone', 'TimeoutException', 'Timer', 'Timer', 'Timer', 'TimerAlarmClockNotification', 'TimerMBean', 'TimerNotification', 'TimerTask', 'Timestamp', 'Timestamp', 'TitledBorder', 'TooManyListenersException', 'ToolBarUI', 'ToolTipManager', 'ToolTipUI', 'Toolkit', 'Track', 'TransactionRequiredException', 'TransactionRolledbackException', 'TransactionService', 'TransactionalWriter', 'TransferHandler', 'Transferable', 'TransformAttribute', 'Transformer', 'TransformerConfigurationException', 'TransformerException', 'TransformerFactory', 'TransformerFactoryConfigurationError', 'TransformerHandler', 'Transmitter', 'Transparency', 'TreeCellEditor', 'TreeCellRenderer', 'TreeExpansionEvent', 'TreeExpansionListener', 'TreeMap', 'TreeModel', 'TreeModelEvent', 'TreeModelListener', 'TreeNode', 'TreePath', 'TreeSelectionEvent', 'TreeSelectionListener', 'TreeSelectionModel', 'TreeSet', 'TreeUI', 'TreeWillExpandListener', 'TrustAnchor', 'TrustManager', 'TrustManagerFactory', 'TrustManagerFactorySpi', 'Type', 'TypeCode', 'TypeCodeHolder', 'TypeInfo', 'TypeInfoProvider', 'TypeMismatch', 'TypeMismatch', 'TypeMismatch', 'TypeMismatchHelper', 'TypeMismatchHelper', 'TypeNotPresentException', 'TypeVariable', 'Types', 'UID', 'UIDefaults', 'UIDefaults.ActiveValue', 'UIDefaults.LazyInputMap', 'UIDefaults.LazyValue', 'UIDefaults.ProxyLazyValue', 'UIManager', 'UIManager.LookAndFeelInfo', 'UIResource', 'ULongLongSeqHelper', 'ULongLongSeqHolder', 'ULongSeqHelper', 'ULongSeqHolder', 'UNKNOWN', 'UNKNOWN', 'UNSUPPORTED_POLICY', 'UNSUPPORTED_POLICY_VALUE', 'URI', 'URIException', 'URIResolver', 'URISyntax', 'URISyntaxException', 'URL', 'URLClassLoader', 'URLConnection', 'URLDecoder', 'URLEncoder', 'URLStreamHandler', 'URLStreamHandlerFactory', 'URLStringHelper', 'USER_EXCEPTION', 'UShortSeqHelper', 'UShortSeqHolder', 'UTFDataFormatException', 'UUID', 'UndeclaredThrowableException', 'UndoManager', 'UndoableEdit', 'UndoableEditEvent', 'UndoableEditListener', 'UndoableEditSupport', 'UnexpectedException', 'UnicastRemoteObject', 'UnionMember', 'UnionMemberHelper', 'UnknownEncoding', 'UnknownEncodingHelper', 'UnknownError', 'UnknownException', 'UnknownFormatConversionException', 'UnknownFormatFlagsException', 'UnknownGroupException', 'UnknownHostException', 'UnknownHostException', 'UnknownObjectException', 'UnknownServiceException', 'UnknownUserException', 'UnknownUserExceptionHelper', 'UnknownUserExceptionHolder', 'UnmappableCharacterException', 'UnmarshalException', 'UnmodifiableClassException', 'UnmodifiableSetException', 'UnrecoverableEntryException', 'UnrecoverableKeyException', 'Unreferenced', 'UnresolvedAddressException', 'UnresolvedPermission', 'UnsatisfiedLinkError', 'UnsolicitedNotification', 'UnsolicitedNotificationEvent', 'UnsolicitedNotificationListener', 'UnsupportedAddressTypeException', 'UnsupportedAudioFileException', 'UnsupportedCallbackException', 'UnsupportedCharsetException', 'UnsupportedClassVersionError', 'UnsupportedEncodingException', 'UnsupportedFlavorException', 'UnsupportedLookAndFeelException', 'UnsupportedOperationException', 'UserDataHandler', 'UserException', 'Util', 'UtilDelegate', 'Utilities', 'VMID', 'VM_ABSTRACT', 'VM_CUSTOM', 'VM_NONE', 'VM_TRUNCATABLE', 'Validator', 'ValidatorHandler', 'ValueBase', 'ValueBaseHelper', 'ValueBaseHolder', 'ValueExp', 'ValueFactory', 'ValueHandler', 'ValueHandlerMultiFormat', 'ValueInputStream', 'ValueMember', 'ValueMemberHelper', 'ValueOutputStream', 'VariableHeightLayoutCache', 'Vector', 'VerifyError', 'VersionSpecHelper', 'VetoableChangeListener', 'VetoableChangeListenerProxy', 'VetoableChangeSupport', 'View', 'ViewFactory', 'ViewportLayout', 'ViewportUI', 'VirtualMachineError', 'Visibility', 'VisibilityHelper', 'VoiceStatus', 'Void', 'VolatileImage', 'WCharSeqHelper', 'WCharSeqHolder', 'WStringSeqHelper', 'WStringSeqHolder', 'WStringValueHelper', 'WeakHashMap', 'WeakReference', 'WebRowSet', 'WildcardType', 'Window', 'WindowAdapter', 'WindowConstants', 'WindowEvent', 'WindowFocusListener', 'WindowListener', 'WindowStateListener', 'WrappedPlainView', 'WritableByteChannel', 'WritableRaster', 'WritableRenderedImage', 'WriteAbortedException', 'Writer', 'WrongAdapter', 'WrongAdapterHelper', 'WrongPolicy', 'WrongPolicyHelper', 'WrongTransaction', 'WrongTransactionHelper', 'WrongTransactionHolder', 'X500Principal', 'X500PrivateCredential', 'X509CRL', 'X509CRLEntry', 'X509CRLSelector', 'X509CertSelector', 'X509Certificate', 'X509Certificate', 'X509EncodedKeySpec', 'X509ExtendedKeyManager', 'X509Extension', 'X509KeyManager', 'X509TrustManager', 'XAConnection', 'XADataSource', 'XAException', 'XAResource', 'XMLConstants', 'XMLDecoder', 'XMLEncoder', 'XMLFilter', 'XMLFilterImpl', 'XMLFormatter', 'XMLGregorianCalendar', 'XMLParseException', 'XMLReader', 'XMLReaderAdapter', 'XMLReaderFactory', 'XPath', 'XPathConstants', 'XPathException', 'XPathExpression', 'XPathExpressionException', 'XPathFactory', 'XPathFactoryConfigurationException', 'XPathFunction', 'XPathFunctionException', 'XPathFunctionResolver', 'XPathVariableResolver', 'Xid', 'XmlReader', 'XmlWriter', 'ZipEntry', 'ZipException', 'ZipFile', 'ZipInputStream', 'ZipOutputStream', 'ZoneView', '_BindingIteratorImplBase', '_BindingIteratorStub', '_DynAnyFactoryStub', '_DynAnyStub', '_DynArrayStub', '_DynEnumStub', '_DynFixedStub', '_DynSequenceStub', '_DynStructStub', '_DynUnionStub', '_DynValueStub', '_IDLTypeStub', '_NamingContextExtStub', '_NamingContextImplBase', '_NamingContextStub', '_PolicyStub', '_Remote_Stub', '_ServantActivatorStub', '_ServantLocatorStub', ); $self->listAdd('keywords', '@interface', 'abstract', 'break', 'case', 'catch', 'class', 'continue', 'default', 'do', 'else', 'enum', 'extends', 'false', 'finally', 'for', 'goto', 'if', 'implements', 'instanceof', 'interface', 'native', 'new', 'null', 'private', 'protected', 'public', 'return', 'strictfp', 'super', 'switch', 'synchronized', 'this', 'throw', 'throws', 'transient', 'true', 'try', 'volatile', 'while', ); $self->listAdd('types', 'boolean', 'byte', 'char', 'const', 'double', 'final', 'float', 'int', 'long', 'short', 'static', 'void', ); $self->contextdata({ 'Commentar 1' => { callback => \&parseCommentar1, attribute => 'Comment', lineending => '#pop', }, 'Commentar 2' => { callback => \&parseCommentar2, attribute => 'Comment', }, 'Imports' => { callback => \&parseImports, attribute => 'Normal Text', lineending => '#pop', }, 'Member' => { callback => \&parseMember, attribute => 'Normal Text', lineending => '#pop', fallthrough => '#pop', }, 'Normal' => { callback => \&parseNormal, attribute => 'Normal Text', }, 'Printf' => { callback => \&parsePrintf, attribute => 'Printf', lineending => '#pop', }, 'PrintfString' => { callback => \&parsePrintfString, attribute => 'PrintfString', lineending => '#pop', }, 'StaticImports' => { callback => \&parseStaticImports, attribute => 'Normal Text', lineending => '#pop', }, 'String' => { callback => \&parseString, attribute => 'String', lineending => '#pop', }, }); $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); $self->basecontext('Normal'); $self->keywordscase(0); $self->initialize; bless ($self, $class); return $self; } sub language { return 'Java'; } sub parseCommentar1 { my ($self, $text) = @_; return 0; }; sub parseCommentar2 { my ($self, $text) = @_; # attribute => 'Comment' # char => '*' # char1 => '/' # context => '#pop' # endRegion => 'Comment' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop', 'Comment')) { return 1 } return 0; }; sub parseImports { my ($self, $text) = @_; # String => '\s*.*$' # attribute => 'Imports' # context => '#pop' # type => 'RegExpr' if ($self->testRegExpr($text, '\\s*.*$', 0, 0, 0, undef, 0, '#pop', 'Imports')) { return 1 } return 0; }; sub parseMember { my ($self, $text) = @_; # String => '\b[_a-zA-Z]\w*(?=[\s]*)' # attribute => 'Function' # context => '#pop' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b[_a-zA-Z]\\w*(?=[\\s]*)', 0, 0, 0, undef, 0, '#pop', 'Function')) { return 1 } return 0; }; sub parseNormal { my ($self, $text) = @_; # context => '##Javadoc' # type => 'IncludeRules' if ($self->includePlugin('Javadoc', $text)) { return 1 } # String => 'keywords' # attribute => 'Keyword' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'types' # attribute => 'Data Type' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'types', 0, undef, 0, '#stay', 'Data Type')) { return 1 } # String => 'java15' # attribute => 'Java15' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'java15', 0, undef, 0, '#stay', 'Java15')) { return 1 } # attribute => 'Float' # context => '#stay' # items => 'ARRAY(0x1739d60)' # type => 'Float' if ($self->testFloat($text, 0, undef, 0, '#stay', 'Float')) { # String => 'fF' # attribute => 'Float' # context => '#stay' # type => 'AnyChar' if ($self->testAnyChar($text, 'fF', 0, 0, undef, 0, '#stay', 'Float')) { return 1 } } # attribute => 'Octal' # context => '#stay' # type => 'HlCOct' if ($self->testHlCOct($text, 0, undef, 0, '#stay', 'Octal')) { return 1 } # attribute => 'Hex' # context => '#stay' # type => 'HlCHex' if ($self->testHlCHex($text, 0, undef, 0, '#stay', 'Hex')) { return 1 } # attribute => 'Decimal' # context => '#stay' # items => 'ARRAY(0x12b6ff0)' # type => 'Int' if ($self->testInt($text, 0, undef, 0, '#stay', 'Decimal')) { # String => 'ULL' # attribute => 'Decimal' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'ULL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'LUL' # attribute => 'Decimal' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'LUL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'LLU' # attribute => 'Decimal' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'LLU', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'UL' # attribute => 'Decimal' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'UL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'LU' # attribute => 'Decimal' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'LU', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'LL' # attribute => 'Decimal' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'LL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'U' # attribute => 'Decimal' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'U', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'L' # attribute => 'Decimal' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'L', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } } # attribute => 'Char' # context => '#stay' # type => 'HlCChar' if ($self->testHlCChar($text, 0, undef, 0, '#stay', 'Char')) { return 1 } # String => '//\s*BEGIN.*$' # attribute => 'Decimal' # beginRegion => 'Region1' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '//\\s*BEGIN.*$', 0, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => '//\s*END.*$' # attribute => 'Decimal' # context => '#stay' # endRegion => 'Region1' # type => 'RegExpr' if ($self->testRegExpr($text, '//\\s*END.*$', 0, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # attribute => 'String' # char => '"' # context => 'String' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) { return 1 } # String => '\.(format|printf)\b' # attribute => 'Function' # context => 'Printf' # type => 'RegExpr' if ($self->testRegExpr($text, '\\.(format|printf)\\b', 0, 0, 0, undef, 0, 'Printf', 'Function')) { return 1 } # attribute => 'Comment' # char => '/' # char1 => '/' # context => 'Commentar 1' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'Commentar 1', 'Comment')) { return 1 } # attribute => 'Comment' # beginRegion => 'Comment' # char => '/' # char1 => '*' # context => 'Commentar 2' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'Commentar 2', 'Comment')) { return 1 } # attribute => 'Symbol' # beginRegion => 'Brace1' # char => '{' # context => '#stay' # type => 'DetectChar' if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, '#stay', 'Symbol')) { return 1 } # attribute => 'Symbol' # char => '}' # context => '#stay' # endRegion => 'Brace1' # type => 'DetectChar' if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#stay', 'Symbol')) { return 1 } # String => '\.{3,3}\s+' # attribute => 'Keyword' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\.{3,3}\\s+', 0, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '\b(import\s+static)\b' # attribute => 'Keyword' # context => 'StaticImports' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(import\\s+static)\\b', 0, 0, 0, undef, 0, 'StaticImports', 'Keyword')) { return 1 } # String => '\b(package|import)\b' # attribute => 'Keyword' # context => 'Imports' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(package|import)\\b', 0, 0, 0, undef, 0, 'Imports', 'Keyword')) { return 1 } # String => '\b[_\w][_\w\d]*(?=[\s]*(/\*\s*\d+\s*\*/\s*)?[(])' # attribute => 'Function' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b[_\\w][_\\w\\d]*(?=[\\s]*(/\\*\\s*\\d+\\s*\\*/\\s*)?[(])', 0, 0, 0, undef, 0, '#stay', 'Function')) { return 1 } # String => '[.]{1,1}' # attribute => 'Symbol' # context => 'Member' # type => 'RegExpr' if ($self->testRegExpr($text, '[.]{1,1}', 0, 0, 0, undef, 0, 'Member', 'Symbol')) { return 1 } # String => ':!%&()+,-/.*<=>?[]|~^;' # attribute => 'Symbol' # context => '#stay' # type => 'AnyChar' if ($self->testAnyChar($text, ':!%&()+,-/.*<=>?[]|~^;', 0, 0, undef, 0, '#stay', 'Symbol')) { return 1 } return 0; }; sub parsePrintf { my ($self, $text) = @_; # attribute => 'Normal Text' # char => ';' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, ';', 0, 0, 0, undef, 0, '#pop', 'Normal Text')) { return 1 } # attribute => 'String' # char => '"' # context => 'PrintfString' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'PrintfString', 'String')) { return 1 } return 0; }; sub parsePrintfString { my ($self, $text) = @_; # attribute => 'String' # context => '#stay' # type => 'LineContinue' if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'String')) { return 1 } # attribute => 'String Char' # context => '#stay' # type => 'HlCStringChar' if ($self->testHlCStringChar($text, 0, undef, 0, '#stay', 'String Char')) { return 1 } # attribute => 'String' # char => '"' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) { return 1 } # String => '%(\d+\$)?(-|#|\+|\ |0|,|\()*\d*(\.\d+)?[a-hosxA-CEGHSX]' # attribute => 'String Char' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '%(\\d+\\$)?(-|#|\\+|\\ |0|,|\\()*\\d*(\\.\\d+)?[a-hosxA-CEGHSX]', 0, 0, 0, undef, 0, '#stay', 'String Char')) { return 1 } # String => '%(\d+\$)?(-|#|\+|\ |0|,|\()*\d*(t|T)(a|A|b|B|c|C|d|D|e|F|h|H|I|j|k|l|L|m|M|N|p|P|Q|r|R|s|S|T|y|Y|z|Z)' # attribute => 'String Char' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '%(\\d+\\$)?(-|#|\\+|\\ |0|,|\\()*\\d*(t|T)(a|A|b|B|c|C|d|D|e|F|h|H|I|j|k|l|L|m|M|N|p|P|Q|r|R|s|S|T|y|Y|z|Z)', 0, 0, 0, undef, 0, '#stay', 'String Char')) { return 1 } # String => '%(%|n)' # attribute => 'String Char' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '%(%|n)', 0, 0, 0, undef, 0, '#stay', 'String Char')) { return 1 } return 0; }; sub parseStaticImports { my ($self, $text) = @_; # String => '\s*.*$' # attribute => 'StaticImports' # context => '#pop' # type => 'RegExpr' if ($self->testRegExpr($text, '\\s*.*$', 0, 0, 0, undef, 0, '#pop', 'StaticImports')) { return 1 } return 0; }; sub parseString { my ($self, $text) = @_; # attribute => 'String' # context => '#stay' # type => 'LineContinue' if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'String')) { return 1 } # attribute => 'String Char' # context => '#stay' # type => 'HlCStringChar' if ($self->testHlCStringChar($text, 0, undef, 0, '#stay', 'String Char')) { return 1 } # attribute => 'String' # char => '"' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) { return 1 } return 0; }; 1; __END__ =head1 NAME Syntax::Highlight::Engine::Kate::Java - a Plugin for Java syntax highlighting =head1 SYNOPSIS require Syntax::Highlight::Engine::Kate::Java; my $sh = new Syntax::Highlight::Engine::Kate::Java([ ]); =head1 DESCRIPTION Syntax::Highlight::Engine::Kate::Java is a plugin module that provides syntax highlighting for Java to the Syntax::Haghlight::Engine::Kate highlighting engine. This code is generated from the syntax definition files used by the Kate project. It works quite fine, but can use refinement and optimization. It inherits Syntax::Higlight::Engine::Kate::Template. See also there. =head1 AUTHOR Hans Jeuken (haje toneel demon nl) =head1 BUGS Unknown. If you find any, please contact the authorlibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/Engine/Kate/FourGL.pm0000644000175000017500000001502012150556557031461 0ustar gregoagregoa# Copyright (c) 2005 - 2006 Hans Jeuken. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. # This file was generated from the 'fgl-4gl.xml' file of the syntax highlight # engine of the kate text editor (http://www.kate-editor.org #kate xml version 1.01 #kate version 2.3 #kate author Andrej Falout (andrej@falout.org) #generated: Sun Feb 3 22:02:04 2008, localtime package Syntax::Highlight::Engine::Kate::FourGL; our $VERSION = '0.07'; use strict; use warnings; use base('Syntax::Highlight::Engine::Kate::Template'); sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = $class->SUPER::new(@_); $self->attributes({ 'Alert' => 'Alert', 'Char' => 'Char', 'Comment' => 'Comment', 'Data Type' => 'DataType', 'Decimal' => 'DecVal', 'Float' => 'Float', 'Hex' => 'BaseN', 'Keyword' => 'Keyword', 'Normal Text' => 'Normal', 'Octal' => 'BaseN', 'Prep. Lib' => 'Others', 'Preprocessor' => 'Others', 'String' => 'String', 'String Char' => 'Char', 'Symbol' => 'Normal', }); $self->listAdd('keywords', 'ABSOLUTE', 'ACCEPT', 'ALL', 'ANY', 'BEGIN', 'BOLD', 'CONSTRAINT', 'CURRENT', 'DEFER', 'DIRTY', 'DISTINCT', 'DROP', 'ESC', 'ESCAPE', 'EXTERNAL', 'FREE', 'GROUP', 'HAVING', 'HIDE', 'HOLD', 'HOUR', 'INTERRUPT', 'INT_FLAG', 'ISOLATION', 'LOCK', 'MAGENTA', 'MINUTE', 'MODE', 'MODIFY', 'NEED', 'NOTFOUND', 'PAGENO', 'PIPE', 'READ', 'ROLLBACK', 'SCREEN', 'SECOND', 'STEP', 'STOP', 'TABLE', 'TEMP', 'UNIQUE', 'UNITS', 'UNLOAD', 'WAIT', 'WHILE', 'WORK', 'WRAP', 'add', 'after', 'alter', 'and', 'ascii', 'at', 'attribute', 'attributes', 'avg', 'before', 'between', 'blink', 'blue', 'border', 'bottom', 'by', 'call', 'case', 'clear', 'clipped', 'close', 'cluster', 'column', 'columns', 'command', 'comment', 'commit', 'committed', 'connect', 'construct', 'continue', 'count', 'create', 'cursor', 'cyan', 'database', 'day', 'declare', 'defaults', 'define', 'delete', 'delimiter', 'desc', 'display', 'downshift', 'else', 'enable', 'end', 'error', 'every', 'exclusive', 'execute', 'exists', 'exit', 'false', 'fetch', 'fgl_lastkey', 'fgl_lastkey()', 'field', 'file', 'finish', 'first', 'flush', 'for', 'foreach', 'form', 'format', 'formhandler', 'from', 'function', 'globals', 'go', 'goto', 'green', 'header', 'help', 'if', 'in', 'index', 'infield', 'initialize', 'input', 'insert', 'into', 'is', 'key', 'label', 'last', 'left', 'length', 'let', 'like', 'line', 'lines', 'load', 'locate', 'log', 'main', 'margin', 'matches', 'max', 'mdy', 'menu', 'message', 'min', 'month', 'name', 'next', 'no', 'normal', 'not', 'null', 'of', 'on', 'open', 'option', 'options', 'or', 'order', 'otherwise', 'outer', 'output', 'page', 'pause', 'prepare', 'previous', 'print', 'printer', 'program', 'prompt', 'put', 'quit', 'quit_flag', 'record', 'red', 'report', 'return', 'returning', 'reverse', 'revoke', 'right', 'row', 'rows', 'run', 'scroll', 'select', 'set', 'share', 'show', 'skip', 'sleep', 'sort', 'space', 'spaces', 'start', 'statistics', 'status', 'sum', 'text', 'then', 'thru', 'to', 'today', 'top', 'trailer', 'true', 'union', 'up', 'update', 'upshift', 'user', 'using', 'values', 'waiting', 'when', 'whenever', 'where', 'white', 'window', 'with', 'without', 'wordwrap', 'year', 'yellow', ); $self->listAdd('types', 'DATETIME', 'DECIMAL', 'FRACTION', 'INTERVAL', 'NUMERIC', 'VARCHAR', 'array', 'char', 'date', 'float', 'integer', 'money', 'serial', 'smallint', ); $self->contextdata({ 'noname' => { callback => \&parsenoname, attribute => 'Comment', }, }); $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); $self->basecontext('noname'); $self->keywordscase(0); $self->initialize; bless ($self, $class); return $self; } sub language { return '4GL'; } sub parsenoname { my ($self, $text) = @_; # String => '#if' # attribute => 'Comment' # context => '9' # type => 'RegExpr' if ($self->testRegExpr($text, '#if', 0, 0, 0, undef, 0, '9', 'Comment')) { return 1 } # String => '#endif' # attribute => 'Comment' # context => '#pop' # type => 'RegExpr' if ($self->testRegExpr($text, '#endif', 0, 0, 0, undef, 0, '#pop', 'Comment')) { return 1 } return 0; }; 1; __END__ =head1 NAME Syntax::Highlight::Engine::Kate::FourGL - a Plugin for 4GL syntax highlighting =head1 SYNOPSIS require Syntax::Highlight::Engine::Kate::FourGL; my $sh = new Syntax::Highlight::Engine::Kate::FourGL([ ]); =head1 DESCRIPTION Syntax::Highlight::Engine::Kate::FourGL is a plugin module that provides syntax highlighting for 4GL to the Syntax::Haghlight::Engine::Kate highlighting engine. This code is generated from the syntax definition files used by the Kate project. It works quite fine, but can use refinement and optimization. It inherits Syntax::Higlight::Engine::Kate::Template. See also there. =head1 AUTHOR Hans Jeuken (haje toneel demon nl) =head1 BUGS Unknown. If you find any, please contact the authorlibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/Engine/Kate/Lua.pm0000644000175000017500000001746412150556557031062 0ustar gregoagregoa# Copyright (c) 2005 - 2006 Hans Jeuken. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. # This file was generated from the 'lua.xml' file of the syntax highlight # engine of the kate text editor (http://www.kate-editor.org #kate xml version 0.22 #kate version 2.3 #generated: Sun Feb 3 22:02:05 2008, localtime package Syntax::Highlight::Engine::Kate::Lua; our $VERSION = '0.07'; use strict; use warnings; use base('Syntax::Highlight::Engine::Kate::Template'); sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = $class->SUPER::new(@_); $self->attributes({ 'Alert' => 'Alert', 'BaseFunc' => 'Normal', 'Comment' => 'Comment', 'Decimal' => 'DecVal', 'Keyword' => 'Keyword', 'Normal Text' => 'Normal', 'Number' => 'BaseN', 'String' => 'String', 'Symbol' => 'Normal', }); $self->listAdd('basefunc', 'LUA_PATH', '_ALERT', '_ERRORMESSAGE', '_LOADED', '_VERSION', 'abs', 'acos', 'appendto', 'ascii', 'asin', 'assert', 'atan', 'atan2', 'call', 'ceil', 'clock', 'closefile', 'collectgarbage', 'copytagmethods', 'cos', 'date', 'debug.gethook', 'debug.getinfo', 'debug.getlocal', 'debug.sethook', 'debug.setlocal', 'deg', 'dofile', 'dostring', 'error', 'execute', 'exit', 'exp', 'floor', 'flush', 'foreach', 'foreachi', 'format', 'frexp', 'gcinfo', 'getenv', 'getglobal', 'getglobals', 'getinfo', 'getlocal', 'getmetatable', 'getn', 'gettagmethod', 'globals', 'gsub', 'io.close', 'io.flush', 'io.input', 'io.lines', 'io.open', 'io.output', 'io.read', 'io.stderr', 'io.stdin', 'io.stdout', 'io.tmpfile', 'io.write', 'ipairs', 'ldexp', 'loadfile', 'loadstring', 'log', 'log10', 'math.abs', 'math.acos', 'math.asin', 'math.atan', 'math.atan2', 'math.ceil', 'math.cos', 'math.deg', 'math.exp', 'math.floor', 'math.frexp', 'math.ldexp', 'math.log', 'math.log10', 'math.max', 'math.min', 'math.mod', 'math.rad', 'math.random', 'math.randomseed', 'math.sin', 'math.squrt', 'math.tan', 'max', 'min', 'mod', 'newtag', 'next', 'openfile', 'os.clock', 'os.date', 'os.difftime', 'os.execute', 'os.exit', 'os.getenv', 'os.remove', 'os.rename', 'os.setlocale', 'os.time', 'os.tmpname', 'pairs', 'pcall', 'print', 'rad', 'random', 'randomseed', 'rawget', 'rawset', 'read', 'readfrom', 'remove', 'rename', 'require', 'seek', 'setcallhook', 'setglobal', 'setglobals', 'setlinehook', 'setlocal', 'setlocale', 'setmetatable', 'settag', 'settagmethod', 'sin', 'sort', 'squrt', 'strbyte', 'strchar', 'strfind', 'string.byte', 'string.char', 'string.find', 'string.format', 'string.gfind', 'string.gsub', 'string.len', 'string.lower', 'string.rep', 'string.sub', 'string.upper', 'strlen', 'strlower', 'strrep', 'strsub', 'strupper', 'table.concat', 'table.foreach', 'table.foreachi', 'table.getn', 'table.insert', 'table.remove', 'table.setn', 'table.sort', 'tag', 'tan', 'tinsert', 'tmpname', 'tonumber', 'tostring', 'tremove', 'type', 'unpack', 'write', 'writeto', ); $self->listAdd('keywords', 'and', 'break', 'do', 'else', 'elsif', 'end', 'for', 'function', 'if', 'in', 'local', 'nil', 'not', 'or', 'repeat', 'return', 'then', 'until', 'while', ); $self->contextdata({ 'Comment' => { callback => \&parseComment, attribute => 'Comment', lineending => '#pop', }, 'Normal' => { callback => \&parseNormal, attribute => 'Normal Text', }, 'String' => { callback => \&parseString, attribute => 'String', lineending => '#pop', }, }); $self->deliminators('\\s||\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\|\\.'); $self->basecontext('Normal'); $self->keywordscase(0); $self->initialize; bless ($self, $class); return $self; } sub language { return 'Lua'; } sub parseComment { my ($self, $text) = @_; # String => '(FIXME|TODO)' # attribute => 'Alert' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '(FIXME|TODO)', 0, 0, 0, undef, 0, '#stay', 'Alert')) { return 1 } return 0; }; sub parseNormal { my ($self, $text) = @_; # String => 'keywords' # attribute => 'Keyword' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'basefunc' # attribute => 'BaseFunc' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'basefunc', 0, undef, 0, '#stay', 'BaseFunc')) { return 1 } # attribute => 'Char' # context => '#stay' # type => 'HlCChar' #This rule is buggy, not sending it to output # attribute => 'Comment' # char => '-' # char1 => '-' # context => 'Comment' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '-', '-', 0, 0, 0, undef, 0, 'Comment', 'Comment')) { return 1 } # attribute => 'Comment' # char => '#' # context => 'Comment' # type => 'DetectChar' if ($self->testDetectChar($text, '#', 0, 0, 0, undef, 0, 'Comment', 'Comment')) { return 1 } # attribute => 'String' # char => '"' # context => 'String' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) { return 1 } # String => '!%&()+,-<=>?[]^{|}~' # attribute => 'Symbol' # context => '#stay' # type => 'AnyChar' if ($self->testAnyChar($text, '!%&()+,-<=>?[]^{|}~', 0, 0, undef, 0, '#stay', 'Symbol')) { return 1 } # String => '\d*\.?\d*e?\d+' # attribute => 'Number' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\d*\\.?\\d*e?\\d+', 0, 0, 0, undef, 0, '#stay', 'Number')) { return 1 } return 0; }; sub parseString { my ($self, $text) = @_; # attribute => 'String' # char => '"' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) { return 1 } return 0; }; 1; __END__ =head1 NAME Syntax::Highlight::Engine::Kate::Lua - a Plugin for Lua syntax highlighting =head1 SYNOPSIS require Syntax::Highlight::Engine::Kate::Lua; my $sh = new Syntax::Highlight::Engine::Kate::Lua([ ]); =head1 DESCRIPTION Syntax::Highlight::Engine::Kate::Lua is a plugin module that provides syntax highlighting for Lua to the Syntax::Haghlight::Engine::Kate highlighting engine. This code is generated from the syntax definition files used by the Kate project. It works quite fine, but can use refinement and optimization. It inherits Syntax::Higlight::Engine::Kate::Template. See also there. =head1 AUTHOR Hans Jeuken (haje toneel demon nl) =head1 BUGS Unknown. If you find any, please contact the author././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootlibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/Engine/Kate/Debian_Changelog.pmlibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/Engine/Kate/Debian_Changelo0000644000175000017500000001231512150556557032676 0ustar gregoagregoa# Copyright (c) 2005 - 2006 Hans Jeuken. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. # This file was generated from the 'debianchangelog.xml' file of the syntax highlight # engine of the kate text editor (http://www.kate-editor.org #kate xml version 0.62 #kate version 2.4 #generated: Sun Feb 3 22:02:04 2008, localtime package Syntax::Highlight::Engine::Kate::Debian_Changelog; our $VERSION = '0.07'; use strict; use warnings; use base('Syntax::Highlight::Engine::Kate::Template'); sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = $class->SUPER::new(@_); $self->attributes({ 'Bug' => 'DataType', 'Data' => 'DataType', 'Email' => 'Others', 'Keyword' => 'Keyword', 'Normal Text' => 'Normal', 'Version' => 'DataType', }); $self->listAdd('distributions', 'experimental', 'frozen', 'stable', 'testing', 'unstable', ); $self->listAdd('keywords', 'urgency', ); $self->listAdd('urgencies', 'bug', 'emergency', 'high', 'low', 'medium', ); $self->contextdata({ 'Head' => { callback => \&parseHead, attribute => 'Normal Text', lineending => '#pop', }, 'Version' => { callback => \&parseVersion, attribute => 'Version', lineending => '#pop', }, 'noname' => { callback => \&parsenoname, attribute => 'Normal Text', }, }); $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); $self->basecontext('noname'); $self->keywordscase(0); $self->initialize; bless ($self, $class); return $self; } sub language { return 'Debian Changelog'; } sub parseHead { my ($self, $text) = @_; # attribute => 'Keyword' # char => '(' # context => 'Version' # type => 'DetectChar' if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'Version', 'Keyword')) { return 1 } # String => '[,;=]' # attribute => 'Keyword' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '[,;=]', 0, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'keywords' # attribute => 'Keyword' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'distributions' # attribute => 'Data' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'distributions', 0, undef, 0, '#stay', 'Data')) { return 1 } # String => 'urgencies' # attribute => 'Data' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'urgencies', 0, undef, 0, '#stay', 'Data')) { return 1 } return 0; }; sub parseVersion { my ($self, $text) = @_; # attribute => 'Keyword' # char => ')' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop', 'Keyword')) { return 1 } return 0; }; sub parsenoname { my ($self, $text) = @_; # String => '[^ ]*' # attribute => 'Keyword' # column => '0' # context => 'Head' # type => 'RegExpr' if ($self->testRegExpr($text, '[^ ]*', 0, 0, 0, 0, 0, 'Head', 'Keyword')) { return 1 } # String => '<.*@.*>' # attribute => 'Email' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '<.*@.*>', 0, 0, 0, undef, 0, '#stay', 'Email')) { return 1 } # String => ' \-\-' # attribute => 'Keyword' # column => '0' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, ' \\-\\-', 0, 0, 0, 0, 0, '#stay', 'Keyword')) { return 1 } # String => ' \*' # attribute => 'Keyword' # column => '0' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, ' \\*', 0, 0, 0, 0, 0, '#stay', 'Keyword')) { return 1 } # String => '[Cc][Ll][Oo][Ss][Ee][Ss]:[\s]*(([Bb][Uu][Gg]\s*)?#\s*\d+)(\s*, *([Bb[Uu][Gg]\s*)?#\s*\d+)*' # attribute => 'Bug' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '[Cc][Ll][Oo][Ss][Ee][Ss]:[\\s]*(([Bb][Uu][Gg]\\s*)?#\\s*\\d+)(\\s*, *([Bb[Uu][Gg]\\s*)?#\\s*\\d+)*', 0, 0, 0, undef, 0, '#stay', 'Bug')) { return 1 } return 0; }; 1; __END__ =head1 NAME Syntax::Highlight::Engine::Kate::Debian_Changelog - a Plugin for Debian Changelog syntax highlighting =head1 SYNOPSIS require Syntax::Highlight::Engine::Kate::Debian_Changelog; my $sh = new Syntax::Highlight::Engine::Kate::Debian_Changelog([ ]); =head1 DESCRIPTION Syntax::Highlight::Engine::Kate::Debian_Changelog is a plugin module that provides syntax highlighting for Debian Changelog to the Syntax::Haghlight::Engine::Kate highlighting engine. This code is generated from the syntax definition files used by the Kate project. It works quite fine, but can use refinement and optimization. It inherits Syntax::Higlight::Engine::Kate::Template. See also there. =head1 AUTHOR Hans Jeuken (haje toneel demon nl) =head1 BUGS Unknown. If you find any, please contact the author././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootlibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/Engine/Kate/Apache_Configuration.pmlibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/Engine/Kate/Apache_Configur0000644000175000017500000004744712150556557032747 0ustar gregoagregoa# Copyright (c) 2005 - 2006 Hans Jeuken. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. # This file was generated from the 'apache.xml' file of the syntax highlight # engine of the kate text editor (http://www.kate-editor.org #kate xml version 1.10 #kate author Jan Janssen (medhefgo@googlemail.com) #generated: Sun Feb 3 22:02:04 2008, localtime package Syntax::Highlight::Engine::Kate::Apache_Configuration; our $VERSION = '0.07'; use strict; use warnings; use base('Syntax::Highlight::Engine::Kate::Template'); sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = $class->SUPER::new(@_); $self->attributes({ 'Alert' => 'Error', 'Alternates' => 'Keyword', 'Attribute' => 'Others', 'Comment' => 'Comment', 'Container' => 'Function', 'Directives' => 'Reserved', 'Float' => 'Float', 'Int' => 'Float', 'Normal Text' => 'Normal', 'Other' => 'Char', 'String' => 'String', }); $self->listAdd('Alternates', 'All', 'Allow,Deny', 'Any', 'Ascending', 'AuthConfig', 'Basic', 'Block', 'CompatEnvVars', 'Connection', 'Cookie', 'Cookie2', 'DB', 'DNS', 'Date', 'Default', 'Deny,Allow', 'Descending', 'Description', 'Digest', 'Double', 'EMail', 'ExecCGI', 'ExportCertData', 'FakeBasicAuth', 'Fallback', 'FileInfo', 'Filters', 'FollowSymLinks', 'Full', 'Full', 'GDBM', 'GDSF', 'Handlers', 'INode', 'Ignore', 'Includes', 'IncludesNOEXEC', 'Indexes', 'Indexes', 'IsError', 'Keep-Alive', 'LRU', 'Limit', 'MD5', 'MD5-sess', 'MTime', 'Major', 'Min', 'Minimal', 'Minor', 'MultiViews', 'Mutual-failure', 'NDBM', 'Name', 'NegotiatedOnly', 'Netscape', 'None', 'OS', 'Off', 'On', 'OptRenegotiate', 'Options', 'Prefer', 'Prod', 'ProductOnly', 'Proxy-Authenticate', 'Proxy-Authorization', 'RFC2109', 'RFC2965', 'Registry', 'Registry-Strict', 'SDBM', 'SSL', 'SSLv2', 'SSLv3', 'STARTTLS', 'Script', 'Size', 'Size', 'StartBody', 'StdEnvVars', 'StrictRequire', 'SymLinksIfOwnerMatch', 'TE', 'TLS', 'TLSv1', 'Trailers', 'Transfer-Encoding', 'Upgrade', 'alert', 'always', 'auth', 'auth-int', 'crit', 'dbm:', 'dc:', 'debug', 'emerg', 'error', 'error', 'fcntl', 'fcntl:', 'file:', 'finding', 'flock', 'flock:', 'formatted', 'info', 'inherit', 'map', 'never', 'no', 'nocontent', 'nonenotnull', 'notice', 'optional', 'optional_no_ca', 'posixsem', 'posixsem', 'pthread', 'pthread', 'referer', 'require', 'searching', 'sem', 'semiformatted', 'shm:', 'sysvsem', 'sysvsem', 'unformatted', 'warn', 'yes', ); $self->listAdd('Alternative Directives', 'AcceptMutex', 'AcceptPathInfo', 'AllowEncodedSlashes', 'AllowOverride', 'Anonymous_Authoritative', 'Anonymous_LogEmail', 'Anonymous_MustGiveEmail', 'Anonymous_NoUserID', 'Anonymous_VerifyEmail', 'AuthAuthoritative', 'AuthBasicAuthoritative', 'AuthBasicProvider', 'AuthDBMAuthoritative', 'AuthDBMType', 'AuthDefaultAuthoritative', 'AuthDigestAlgorithm', 'AuthDigestNcCheck', 'AuthDigestQop', 'AuthLDAPAuthoritative', 'AuthLDAPCompareDNOnServer', 'AuthLDAPDereferenceAliases', 'AuthLDAPEnabled', 'AuthLDAPFrontPageHack', 'AuthLDAPGroupAttributeIsDN', 'AuthLDAPRemoteUserIsDN', 'AuthType', 'AuthzDBMAuthoritative', 'AuthzDBMType', 'AuthzDefaultAuthoritative', 'AuthzGroupFileAuthoritative', 'AuthzLDAPAuthoritative', 'AuthzOwnerAuthoritative', 'AuthzUserAuthoritative', 'BufferedLogs', 'CacheExpiryCheck', 'CacheIgnoreCacheControl', 'CacheIgnoreHeaders', 'CacheIgnoreNoLastMod', 'CacheNegotiatedDocs', 'CacheStoreNoStore', 'CacheStorePrivate', 'CheckSpelling', 'ContentDigest', 'CookieStyle', 'CookieTracking', 'CoreDumpDirectory', 'CustomLog', 'DavDepthInfinity', 'DirectorySlash', 'DumpIOInput', 'DumpIOOutput', 'EnableExceptionHook', 'EnableMMAP', 'EnableSendfile', 'ExpiresActive', 'ExtendedStatus', 'FileETag', 'ForceLanguagePriority', 'HostnameLookups', 'ISAPIAppendLogToErrors', 'ISAPIAppendLogToQuery', 'ISAPIFakeAsync', 'ISAPILogNotSupported', 'IdentityCheck', 'ImapDefault', 'ImapMenu', 'IndexOrderDefault', 'KeepAlive', 'LDAPTrustedMode', 'LDAPVerifyServerCert', 'LogLevel', 'MCacheRemovalAlgorithm', 'MetaFiles', 'ModMimeUsePathInfo', 'MultiviewsMatch', 'Options', 'Order', 'ProtocolEcho', 'ProxyBadHeader', 'ProxyErrorOverride', 'ProxyPreserveHost', 'ProxyRequests', 'ProxyVia', 'RewriteEngine', 'RewriteOptions', 'SSLEngine', 'SSLMutex', 'SSLOptions', 'SSLProtocol', 'SSLProxyEngine', 'SSLProxyVerify', 'SSLSessionCache', 'SSLVerifyClient', 'Satisfy', 'ScriptInterpreterSource', 'ServerSignature', 'ServerTokens', 'UseCanonicalName', 'XBitHack', ); $self->listAdd('Integer Directives', 'AllowCONNECT', 'AssignUserID', 'AuthDigestNonceLifetime', 'AuthDigestShmemSize', 'CacheDefaultExpire', 'CacheDirLength', 'CacheDirLevels', 'CacheForceCompletion', 'CacheGcDaily', 'CacheGcInterval', 'CacheGcMemUsage', 'CacheLastModifiedFactor', 'CacheMaxExpire', 'CacheMaxFileSize', 'CacheMinFileSize', 'CacheSize', 'CacheTimeMargin', 'ChildPerUserID', 'CookieExpires', 'DBDExptime', 'DBDKeep', 'DBDMax', 'DBDMin', 'DBDPersist', 'DavMinTimeout', 'DeflateBufferSize', 'DeflateCompressionLevel', 'DeflateMemLevel', 'DeflateWindowSize', 'ISAPIReadAheadBuffer', 'IdentityCheckTimeout', 'KeepAliveTimeout', 'LDAPCacheEntries', 'LDAPCacheTTL', 'LDAPConnectionTimeout', 'LDAPOpCacheEntries', 'LDAPOpCacheTTL', 'LDAPSharedCacheSize', 'LimitInternalRecursion', 'LimitRequestBody', 'LimitRequestFields', 'LimitRequestFieldsize', 'LimitRequestLine', 'LimitXMLRequestBody', 'ListenBacklog', 'MCacheMaxObjectCount', 'MCacheMaxObjectSize', 'MCacheMaxStreamingBuffer', 'MCacheMinObjectSize', 'MCacheSize', 'MaxClients', 'MaxKeepAliveRequests', 'MaxMemFree', 'MaxRequestsPerChild', 'MaxRequestsPerThread', 'MaxSpareServers', 'MaxSpareThreads', 'MaxThreads', 'MaxThreadsPerChild', 'MinSpareServers', 'MinSpareThreads', 'NumServers', 'ProxyIOBufferSize', 'ProxyMaxForwards', 'ProxyReceiveBufferSize', 'ProxyTimeout', 'RLimitCPU', 'RLimitMEM', 'RLimitNPROC', 'RewriteLogLevel', 'SSLProxyVerifyDepth', 'SSLSessionCacheTimeout', 'SSLVerifyDepth', 'ScriptLogBuffer', 'ScriptLogLength', 'SendBufferSize', 'ServerLimit', 'StartServers', 'StartThreads', 'ThreadLimit', 'ThreadStackSize', 'ThreadsPerChild', 'TimeOut', ); $self->listAdd('String Directives', 'AcceptFilter', 'AccessFileName', 'Action', 'AddAlt', 'AddAltByEncoding', 'AddAltByType', 'AddCharset', 'AddDefaultCharset', 'AddDescription', 'AddEncoding', 'AddHandler', 'AddIcon', 'AddIconByEncoding', 'AddIconByType', 'AddInputFilter', 'AddLanguage', 'AddModuleInfo', 'AddOutputFilter', 'AddOutputFilterByType', 'AddType', 'Alias', 'AliasMatch', 'Allow', 'Anonymous', 'AuthBasicProvider', 'AuthDBMGroupFile', 'AuthDBMUserFile', 'AuthDigestDomain', 'AuthDigestFile', 'AuthDigestGroupFile', 'AuthDigestNonceFormat', 'AuthDigestProvider', 'AuthGroupFile', 'AuthLDAPBindDN', 'AuthLDAPBindPassword', 'AuthLDAPCharsetConfig', 'AuthLDAPGroupAttribute', 'AuthLDAPUrl', 'AuthName', 'AuthUserFile', 'BS2000Account', 'BrowserMatch', 'BrowserMatchNoCase', 'CGIMapExtension', 'CacheDisable', 'CacheEnable', 'CacheFile', 'CacheGcClean', 'CacheGcUnused', 'CacheRoot', 'CharsetDefault', 'CharsetOptions', 'CharsetSourceEnc', 'CookieDomain', 'CookieLog', 'CookieName', 'CoreDumpDirectory', 'CustomLog', 'DBDParams', 'DBDPrepareSQL', 'DBDriver', 'Dav', 'DavGenericLockDB', 'DavLockDB', 'DefaultIcon', 'DefaultLanguage', 'DefaultType', 'DeflateFilterNote', 'Deny', 'DirectoryIndex', 'DocumentRoot', 'ErrorDocument', 'ErrorLog', 'Example', 'ExpiresByType', 'ExpiresDefault', 'ExtFilterDefine', 'ExtFilterOptions', 'FilterChain', 'FilterDeclare', 'FilterProtocol', 'FilterProvider', 'FilterTrace', 'ForceType', 'ForensicLog', 'Group', 'Header', 'HeaderName', 'ISAPICacheFile', 'ImapBase', 'Include', 'IndexIgnore', 'IndexOptions', 'IndexStyleSheet', 'LDAPSharedCacheFile', 'LDAPTrustedCA', 'LDAPTrustedCAType', 'LDAPTrustedClientCert', 'LDAPTrustedGlobalCert', 'LanguagePriority', 'Listen', 'LoadFile', 'LoadModule', 'LockFile', 'LogFormat', 'MMapFile', 'MetaDir', 'MetaSuffix', 'MimeMagicFile', 'NWSSLTrustedCerts', 'NWSSLUpgradeable', 'NameVirtualHost', 'NoProxy', 'PassEnv', 'PidFile', 'ProxyBlock', 'ProxyDomain', 'ProxyPass', 'ProxyPassReverse', 'ProxyPassReverseCookieDomain', 'ProxyPassReverseCookiePath', 'ProxyRemote', 'ProxyRemoteMatch', 'ReadmeName', 'Redirect', 'RedirectMatch', 'RedirectPermanent', 'RedirectTemp', 'RemoveCharset', 'RemoveEncoding', 'RemoveHandler', 'RemoveInputFilter', 'RemoveLanguage', 'RemoveOutputFilter', 'RemoveType', 'RequestHeader', 'Require', 'RewriteBase', 'RewriteCond', 'RewriteLock', 'RewriteLog', 'RewriteMap', 'RewriteRule', 'SSIEndTag', 'SSIErrorMsg', 'SSIStartTag', 'SSITimeFormat', 'SSIUndefinedEcho', 'SSLCACertificateFile', 'SSLCACertificatePath', 'SSLCADNRequestFile', 'SSLCADNRequestPath', 'SSLCARevocationFile', 'SSLCARevocationPath', 'SSLCertificateChainFile', 'SSLCertificateFile', 'SSLCertificateKeyFile', 'SSLCipherSuite', 'SSLCryptoDevice', 'SSLHonorCiperOrder', 'SSLPassPhraseDialog', 'SSLProxyCACertificateFile', 'SSLProxyCACertificatePath', 'SSLProxyCARevocationFile', 'SSLProxyCARevocationPath', 'SSLProxyCipherSuite', 'SSLProxyMachineCertificateFile', 'SSLProxyMachineCertificatePath', 'SSLProxyProtocol', 'SSLRandomSeed', 'SSLRequire', 'SSLRequireSSL', 'SSLUserName', 'ScoreBoardFile', 'Script', 'ScriptAlias', 'ScriptAliasMatch', 'ScriptLog', 'ScriptSock', 'SecureListen', 'ServerAdmin', 'ServerAlias', 'ServerName', 'ServerPath', 'ServerRoot', 'SetEnv', 'SetEnvIf', 'SetEnvIfNoCase', 'SetHandler', 'SetInputFilter', 'SetOutputFilter', 'SuexecUserGroup', 'TransferLog', 'TypesConfig', 'UnsetEnv', 'User', 'UserDir', 'VirtualDocumentRoot', 'VirtualDocumentRootIP', 'VirtualScriptAlias', 'VirtualScriptAliasIP', 'Win32DisableAcceptEx', ); $self->contextdata({ 'Alert' => { callback => \&parseAlert, attribute => 'Alert', lineending => '#pop', }, 'Alternative Directives' => { callback => \&parseAlternativeDirectives, attribute => 'Other', lineending => '#pop', }, 'Comment' => { callback => \&parseComment, attribute => 'Comment', lineending => '#pop', }, 'Comment Alert' => { callback => \&parseCommentAlert, attribute => 'Normal Text', lineending => '#pop', }, 'Container Close' => { callback => \&parseContainerClose, attribute => 'Container', lineending => '#pop', }, 'Container Open' => { callback => \&parseContainerOpen, attribute => 'Container', lineending => '#pop', }, 'Integer Directives' => { callback => \&parseIntegerDirectives, attribute => 'Other', lineending => '#pop', }, 'String Directives' => { callback => \&parseStringDirectives, attribute => 'Directives', lineending => '#pop', }, 'apache' => { callback => \&parseapache, attribute => 'Normal Text', }, }); $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\|,'); $self->basecontext('apache'); $self->keywordscase(0); $self->initialize; bless ($self, $class); return $self; } sub language { return 'Apache Configuration'; } sub parseAlert { my ($self, $text) = @_; return 0; }; sub parseAlternativeDirectives { my ($self, $text) = @_; # String => 'Alternates' # attribute => 'Alternates' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'Alternates', 0, undef, 0, '#stay', 'Alternates')) { return 1 } # attribute => 'Alternates' # char => '-' # context => '#stay' # type => 'DetectChar' if ($self->testDetectChar($text, '-', 0, 0, 0, undef, 0, '#stay', 'Alternates')) { return 1 } # attribute => 'Alternates' # char => '+' # context => '#stay' # type => 'DetectChar' if ($self->testDetectChar($text, '+', 0, 0, 0, undef, 0, '#stay', 'Alternates')) { return 1 } # context => 'Comment Alert' # type => 'IncludeRules' if ($self->includeRules('Comment Alert', $text)) { return 1 } return 0; }; sub parseComment { my ($self, $text) = @_; # type => 'DetectSpaces' if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { return 1 } # context => '##Alerts' # type => 'IncludeRules' if ($self->includePlugin('Alerts', $text)) { return 1 } # type => 'DetectIdentifier' if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) { return 1 } return 0; }; sub parseCommentAlert { my ($self, $text) = @_; # attribute => 'Alert' # char => '#' # context => 'Alert' # type => 'DetectChar' if ($self->testDetectChar($text, '#', 0, 0, 0, undef, 0, 'Alert', 'Alert')) { return 1 } return 0; }; sub parseContainerClose { my ($self, $text) = @_; # attribute => 'Container' # char => '>' # context => 'Alert' # type => 'DetectChar' if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, 'Alert', 'Container')) { return 1 } return 0; }; sub parseContainerOpen { my ($self, $text) = @_; # attribute => 'Container' # char => '>' # context => 'Alert' # type => 'DetectChar' if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, 'Alert', 'Container')) { return 1 } # String => '[^#>]*' # attribute => 'Attribute' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '[^#>]*', 0, 0, 0, undef, 0, '#stay', 'Attribute')) { return 1 } # context => 'Comment Alert' # type => 'IncludeRules' if ($self->includeRules('Comment Alert', $text)) { return 1 } return 0; }; sub parseIntegerDirectives { my ($self, $text) = @_; # attribute => 'Float' # context => 'Integer Directives' # type => 'Float' if ($self->testFloat($text, 0, undef, 0, 'Integer Directives', 'Float')) { return 1 } # attribute => 'Int' # context => 'Integer Directives' # type => 'Int' if ($self->testInt($text, 0, undef, 0, 'Integer Directives', 'Int')) { return 1 } # context => 'Comment Alert' # type => 'IncludeRules' if ($self->includeRules('Comment Alert', $text)) { return 1 } return 0; }; sub parseStringDirectives { my ($self, $text) = @_; # String => '[^#]*' # attribute => 'String' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '[^#]*', 0, 0, 0, undef, 0, '#stay', 'String')) { return 1 } # context => 'Comment Alert' # type => 'IncludeRules' if ($self->includeRules('Comment Alert', $text)) { return 1 } return 0; }; sub parseapache { my ($self, $text) = @_; # String => 'String Directives' # context => 'String Directives' # type => 'keyword' if ($self->testKeyword($text, 'String Directives', 0, undef, 0, 'String Directives', undef)) { return 1 } # String => 'Integer Directives' # attribute => 'Directives' # context => 'Integer Directives' # type => 'keyword' if ($self->testKeyword($text, 'Integer Directives', 0, undef, 0, 'Integer Directives', 'Directives')) { return 1 } # String => 'Alternative Directives' # attribute => 'Directives' # context => 'Alternative Directives' # type => 'keyword' if ($self->testKeyword($text, 'Alternative Directives', 0, undef, 0, 'Alternative Directives', 'Directives')) { return 1 } # String => '<\w+' # attribute => 'Container' # beginRegion => 'Container' # context => 'Container Open' # type => 'RegExpr' if ($self->testRegExpr($text, '<\\w+', 0, 0, 0, undef, 0, 'Container Open', 'Container')) { return 1 } # String => ' 'Container' # context => 'Container Close' # endRegion => 'Container' # type => 'RegExpr' if ($self->testRegExpr($text, ' 'Comment' # char => '#' # context => 'Comment' # firstNonSpace => 'true' # type => 'DetectChar' if ($self->testDetectChar($text, '#', 0, 0, 0, undef, 1, 'Comment', 'Comment')) { return 1 } return 0; }; 1; __END__ =head1 NAME Syntax::Highlight::Engine::Kate::Apache_Configuration - a Plugin for Apache Configuration syntax highlighting =head1 SYNOPSIS require Syntax::Highlight::Engine::Kate::Apache_Configuration; my $sh = new Syntax::Highlight::Engine::Kate::Apache_Configuration([ ]); =head1 DESCRIPTION Syntax::Highlight::Engine::Kate::Apache_Configuration is a plugin module that provides syntax highlighting for Apache Configuration to the Syntax::Haghlight::Engine::Kate highlighting engine. This code is generated from the syntax definition files used by the Kate project. It works quite fine, but can use refinement and optimization. It inherits Syntax::Higlight::Engine::Kate::Template. See also there. =head1 AUTHOR Hans Jeuken (haje toneel demon nl) =head1 BUGS Unknown. If you find any, please contact the authorlibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/Engine/Kate/WINE_Config.pm0000644000175000017500000001065412150556557032362 0ustar gregoagregoa# Copyright (c) 2005 - 2006 Hans Jeuken. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. # This file was generated from the 'winehq.xml' file of the syntax highlight # engine of the kate text editor (http://www.kate-editor.org #kate xml version 1.03 #kate version 2.4 #generated: Sun Feb 3 22:02:06 2008, localtime package Syntax::Highlight::Engine::Kate::WINE_Config; our $VERSION = '0.07'; use strict; use warnings; use base('Syntax::Highlight::Engine::Kate::Template'); sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = $class->SUPER::new(@_); $self->attributes({ 'Comment' => 'Comment', 'Key' => 'DataType', 'Normal Text' => 'Normal', 'RegistryBeginEnd' => 'Float', 'Section' => 'Keyword', 'Value' => 'Variable', 'ValueFilesystem1' => 'BaseN', 'ValueFilesystem2' => 'DecVal', }); $self->contextdata({ 'Normal' => { callback => \&parseNormal, attribute => 'Normal Text', }, 'Value' => { callback => \&parseValue, attribute => 'Normal Text', lineending => '#pop', }, }); $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); $self->basecontext('Normal'); $self->keywordscase(1); $self->initialize; bless ($self, $class); return $self; } sub language { return 'WINE Config'; } sub parseNormal { my ($self, $text) = @_; # String => 'WINE REGISTRY Version.*$' # attribute => 'RegistryBeginEnd' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, 'WINE REGISTRY Version.*$', 0, 0, 0, undef, 0, '#stay', 'RegistryBeginEnd')) { return 1 } # String => '#\s*<\s*wineconf\s*>' # attribute => 'RegistryBeginEnd' # column => '0' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '#\\s*<\\s*wineconf\\s*>', 0, 0, 0, 0, 0, '#stay', 'RegistryBeginEnd')) { return 1 } # String => '#\s*<\s*\/\s*wineconf\s*>' # attribute => 'RegistryBeginEnd' # column => '0' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '#\\s*<\\s*\\/\\s*wineconf\\s*>', 0, 0, 0, 0, 0, '#stay', 'RegistryBeginEnd')) { return 1 } # String => '\[.*\]$' # attribute => 'Section' # column => '0' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\[.*\\]$', 0, 0, 0, 0, 0, '#stay', 'Section')) { return 1 } # String => ';.*$' # attribute => 'Comment' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, ';.*$', 0, 0, 0, undef, 0, '#stay', 'Comment')) { return 1 } # String => '\s*"\s*[a-zA-Z0-9_.:*]*\s*"' # attribute => 'Key' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\s*"\\s*[a-zA-Z0-9_.:*]*\\s*"', 0, 0, 0, undef, 0, '#stay', 'Key')) { return 1 } # attribute => 'Normal Text' # char => '=' # context => 'Value' # type => 'DetectChar' if ($self->testDetectChar($text, '=', 0, 0, 0, undef, 0, 'Value', 'Normal Text')) { return 1 } return 0; }; sub parseValue { my ($self, $text) = @_; # String => '\s*".*"' # attribute => 'Value' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\s*".*"', 0, 0, 0, undef, 0, '#stay', 'Value')) { return 1 } # String => ';.*$' # attribute => 'Comment' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, ';.*$', 0, 0, 0, undef, 0, '#stay', 'Comment')) { return 1 } return 0; }; 1; __END__ =head1 NAME Syntax::Highlight::Engine::Kate::WINE_Config - a Plugin for WINE Config syntax highlighting =head1 SYNOPSIS require Syntax::Highlight::Engine::Kate::WINE_Config; my $sh = new Syntax::Highlight::Engine::Kate::WINE_Config([ ]); =head1 DESCRIPTION Syntax::Highlight::Engine::Kate::WINE_Config is a plugin module that provides syntax highlighting for WINE Config to the Syntax::Haghlight::Engine::Kate highlighting engine. This code is generated from the syntax definition files used by the Kate project. It works quite fine, but can use refinement and optimization. It inherits Syntax::Higlight::Engine::Kate::Template. See also there. =head1 AUTHOR Hans Jeuken (haje toneel demon nl) =head1 BUGS Unknown. If you find any, please contact the authorlibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/Engine/Kate/FreeBASIC.pm0000644000175000017500000004414612150556557031761 0ustar gregoagregoa# Copyright (c) 2005 - 2006 Hans Jeuken. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. # This file was generated from the 'freebasic.xml' file of the syntax highlight # engine of the kate text editor (http://www.kate-editor.org #kate xml version 0.14 #kate version 2.3 #kate author Chris Neugebauer (chrisjrn@gmail.com) #generated: Sun Feb 3 22:02:05 2008, localtime package Syntax::Highlight::Engine::Kate::FreeBASIC; our $VERSION = '0.07'; use strict; use warnings; use base('Syntax::Highlight::Engine::Kate::Template'); sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = $class->SUPER::new(@_); $self->attributes({ 'Comment' => 'Comment', 'Constant' => 'BaseN', 'Data Types' => 'DataType', 'Functions' => 'Function', 'Keyword' => 'Keyword', 'Normal Text' => 'Normal', 'Number' => 'DecVal', 'Preprocessor' => 'Operator', 'Region Marker ' => 'RegionMarker', 'String' => 'String', }); $self->listAdd('Assembly Operators', 'AH', 'AL', 'AX', 'BH', 'BL', 'BP', 'BX', 'CH', 'CL', 'CS', 'CX', 'DH', 'DI', 'DL', 'DS', 'DX', 'EAX', 'EBP', 'EBX', 'ECX', 'EDI', 'EDX', 'ES', 'ESI', 'ESP', 'FS', 'GS', 'SI', 'SP', 'SS', ); $self->listAdd('Data Types', 'Byte PTR', 'Double', 'Dword PTR', 'Integer', 'Long', 'Qword PTR', 'Single', 'String', 'Word PTR', ); $self->listAdd('functions', 'AAA', 'AAD', 'AAM', 'AAS', 'ABS', 'ACOS', 'ADC', 'ADD', 'ALLOCATE', 'AND', 'AND', 'ARPL', 'ASC', 'ASIN', 'ASM', 'ATAN2', 'ATN', 'BEEP', 'BIN$', 'BLOAD', 'BOUND', 'BREAK', 'BSAVE', 'BSF', 'BSR', 'BSWAP', 'BT', 'BTC', 'BTR', 'BTS', 'BYREF', 'CALL', 'CALLOCATE', 'CALLS', 'CBW', 'CBYTE', 'CDBL', 'CDQ', 'CHAIN', 'CHDIR', 'CHR$', 'CINT', 'CIRCLE', 'CLC', 'CLD', 'CLEAR', 'CLI', 'CLNG', 'CLOSE', 'CLTS', 'CMC', 'CMP', 'CMPS', 'CMPSB', 'CMPSD', 'CMPSW', 'CMPXCHG', 'COLOR', 'COMMAND$', 'COMMON', 'CONST', 'CONTINUE', 'COS', 'CSHORT', 'CSIGN', 'CSNG', 'CUNSG', 'CURDIR$', 'CVD', 'CVI', 'CVL', 'CVS', 'CWD', 'CWDE', 'DAA', 'DAS', 'DATA', 'DATE$', 'DEALLOCATE', 'DEC', 'DIM', 'DIR$', 'DIV', 'DRAW', 'END', 'ENTER', 'ENUM', 'ENVIRON', 'ENVIRON$', 'EOF', 'EQV', 'ERASE', 'EXEC', 'EXEPATH', 'EXP', 'FIX', 'FLIP', 'FRE', 'FREEFILE', 'GET', 'GETKEY', 'GETMOUSE', 'HEX$', 'HLT', 'IDIV', 'IMP', 'IMUL', 'IN', 'INC', 'INKEY$', 'INP', 'INPUT', 'INPUT$', 'INS', 'INSB', 'INSD', 'INSTR', 'INT', 'INT', 'INTO', 'INVD', 'INVLPG', 'IRET', 'IRETD', 'JA', 'JAE', 'JB', 'JBE', 'JC', 'JCXZ', 'JE', 'JECXZ', 'JG', 'JGE', 'JL', 'JLE', 'JMP', 'JNA', 'JNAE', 'JNB', 'JNBE', 'JNC', 'JNE', 'JNG', 'JNGE', 'JNL', 'JNLE', 'JNO', 'JNP', 'JNS', 'JNZ', 'JO', 'JP', 'JPE', 'JPO', 'JS', 'JUMP', 'JZ', 'KILL', 'LAHF', 'LAR', 'LBOUND', 'LCASE$', 'LDS', 'LEA', 'LEAVE', 'LEAVED', 'LEAVEW', 'LEFT$', 'LEN', 'LES', 'LET', 'LFS', 'LGDT', 'LGS', 'LIB', 'LIDT', 'LINE', 'LLDT', 'LMSW', 'LOC', 'LOCK', 'LOCK', 'LODS', 'LODSB', 'LODSD', 'LODSW', 'LOF', 'LOG', 'LOOPD', 'LOOPDE', 'LOOPDNE', 'LOOPDNZ', 'LOOPDZ', 'LOOPE', 'LOOPNE', 'LOOPNZ', 'LOOPW', 'LOOPWE', 'LOOPWNE', 'LOOPWNZ', 'LOOPWZ', 'LOOPZ', 'LSET', 'LSL', 'LSS', 'LTR', 'LTRIM$', 'MID$', 'MKD$', 'MKDIR', 'MKI$', 'MKL$', 'MKS$', 'MOD', 'MOV', 'MOVS', 'MOVSB', 'MOVSD', 'MOVSW', 'MOVSX', 'MOVZX', 'MUL', 'MULTIKEY', 'NAME', 'NEG', 'NOP', 'NOT', 'NOTHING', 'OCT$', 'OPTION BASE', 'OPTION PRIVATE', 'OR', 'OUT', 'OUTS', 'OUTSB', 'OUTSD', 'OUTSW', 'PAINT', 'PALETTE', 'PCOPY', 'PEEK', 'PEEKI', 'PEEKS', 'PMAP', 'POINT', 'POKE', 'POKEI', 'POKES', 'POP', 'POPA', 'POPAD', 'POPF', 'POPFD', 'POS', 'PRESERVE', 'PRESET', 'PRINT', 'PRIVATE', 'PROCPTR', 'PSET', 'PTR', 'PUBLIC', 'PUSH', 'PUSHA', 'PUSHAD', 'PUSHF', 'PUSHFD', 'PUT', 'RANDOMIZE', 'RCL', 'RCR', 'REALLOCATE', 'REDIM', 'REM', 'REP', 'REPE', 'REPNE', 'REPNZ', 'REPZ', 'RESET', 'RET', 'RETURN', 'RGB', 'RIGHT$', 'RMDIR', 'RND', 'ROL', 'ROR', 'RSET', 'RTRIM$', 'RUN', 'SADD', 'SAHF', 'SAL', 'SAR', 'SBB', 'SCAS', 'SCASB', 'SCASD', 'SCASW', 'SCREEN', 'SCREENCOPY', 'SCREENINFO', 'SCREENLOCK', 'SCREENPTR', 'SCREENSET', 'SCREENUNLOCK', 'SEEK', 'SETA', 'SETAE', 'SETB', 'SETBE', 'SETC', 'SETDATE', 'SETE', 'SETENVIRON', 'SETG', 'SETGE', 'SETL', 'SETLE', 'SETNA', 'SETNAE', 'SETNB', 'SETNBE', 'SETNC', 'SETNE', 'SETNG', 'SETNGE', 'SETNL', 'SETNLE', 'SETNO', 'SETNP', 'SETNS', 'SETNZ', 'SETO', 'SETP', 'SETPE', 'SETPO', 'SETS', 'SETZ', 'SGDT', 'SGN', 'SHARED', 'SHELL', 'SHL', 'SHLD', 'SHR', 'SHRD', 'SIDT', 'SIN', 'SLDT', 'SLEEP', 'SMSW', 'SPACE$', 'SQR', 'STATIC', 'STC', 'STD', 'STI', 'STOP', 'STOS', 'STOSB', 'STOSD', 'STOSW', 'STR', 'STR$', 'STRING$', 'SWAP', 'TAN', 'TEST', 'TIME$', 'TIMER', 'TRIM$', 'TYPE', 'UBOUND', 'UCASE$', 'UNION', 'UNLOCK', 'VAL', 'VARPTR', 'VERR', 'VERW', 'VIEW', 'WAIT', 'WINDOWTITLE', 'WRITE', 'XADD', 'XCHG', 'XLAT', 'XLATB', 'XOR', ); $self->listAdd('keywords', 'As', 'Break', 'Case', 'Close', 'DEFBYTE', 'DEFDBL', 'DEFINT', 'DEFLNG', 'DEFSHORT', 'DEFSNG', 'DEFSTR', 'DEFUBYTE', 'DEFUINT', 'DEFUSHORT', 'Data', 'Declare', 'Declare', 'DefType', 'Default', 'Dim', 'Do', 'Else', 'End', 'EndSelect', 'Exit', 'For', 'For Binary', 'For Input', 'For Output', 'For Random', 'Function', 'Global', 'Gosub', 'Goto', 'If', 'Loop', 'Next', 'Open', 'Protected', 'Read', 'Restore', 'Return', 'Select', 'Shared', 'Static', 'Step', 'Sub', 'System', 'Then', 'To', 'Type', 'Unsigned', 'Until', 'Wend', 'While', ); $self->listAdd('preproc', '#DEFINE', '#ELSE', '#ELSEIF', '#ENDIF', '#IF', '#IFDEF', '#IFNDEF', '#UNDEF', '$DYNAMIC', '$INCLIB', '$INCLUDE', '$STATIC', ); $self->contextdata({ 'Comment1' => { callback => \&parseComment1, attribute => 'Comment', lineending => '#pop', }, 'Normal' => { callback => \&parseNormal, attribute => 'Normal Text', }, 'String' => { callback => \&parseString, attribute => 'String', lineending => '#pop', }, }); $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); $self->basecontext('Normal'); $self->keywordscase(0); $self->initialize; bless ($self, $class); return $self; } sub language { return 'FreeBASIC'; } sub parseComment1 { my ($self, $text) = @_; # context => '##Alerts' # type => 'IncludeRules' if ($self->includePlugin('Alerts', $text)) { return 1 } return 0; }; sub parseNormal { my ($self, $text) = @_; # String => '\b(exit (function|sub|for|do|while|type|select))([\s]|$)' # attribute => 'Keyword' # context => '#stay' # insensitive => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(exit (function|sub|for|do|while|type|select))([\\s]|$)', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '\b(declare (function|sub))([\s]|$)' # attribute => 'Keyword' # context => '#stay' # insensitive => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(declare (function|sub))([\\s]|$)', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '\b(while)([\s]|$)' # attribute => 'Keyword' # beginRegion => 'WhileRegion' # context => '#stay' # insensitive => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(while)([\\s]|$)', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '\b(wend)([\s]|$)' # attribute => 'Keyword' # context => '#stay' # endRegion => 'WhileRegion' # insensitive => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(wend)([\\s]|$)', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '\b(do)([\s]|$)' # attribute => 'Keyword' # beginRegion => 'DoRegion' # context => '#stay' # insensitive => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(do)([\\s]|$)', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '\b(loop)([\s]|$)' # attribute => 'Keyword' # context => '#stay' # endRegion => 'DoRegion' # insensitive => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(loop)([\\s]|$)', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '\b(select)([\s]|$)' # attribute => 'Keyword' # beginRegion => 'SelectRegion' # context => '#stay' # insensitive => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(select)([\\s]|$)', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '\b(end select)([\s]|$)' # attribute => 'Keyword' # context => '#stay' # endRegion => 'SelectRegion' # insensitive => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(end select)([\\s]|$)', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '\b(for (input|output|binary|random))([\s]|$)' # attribute => 'Keyword' # context => '#stay' # insensitive => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(for (input|output|binary|random))([\\s]|$)', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '\b(for)([\s]|$)' # attribute => 'Keyword' # beginRegion => 'ForRegion' # context => '#stay' # insensitive => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(for)([\\s]|$)', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '\b(next)([\s]|$)' # attribute => 'Keyword' # context => '#stay' # endRegion => 'ForRegion' # insensitive => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(next)([\\s]|$)', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '\b(function)([.\s]|$)' # attribute => 'Keyword' # beginRegion => 'fProcedureRegion' # context => '#stay' # insensitive => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(function)([.\\s]|$)', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '\b(end function)([\s]|$)' # attribute => 'Keyword' # context => '#stay' # endRegion => 'fProcedureRegion' # insensitive => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(end function)([\\s]|$)', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '\b(sub)([.\s]|$)' # attribute => 'Keyword' # beginRegion => 'sProcedureRegion' # context => '#stay' # insensitive => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(sub)([.\\s]|$)', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '\b(end sub)([\s]|$)' # attribute => 'Keyword' # context => '#stay' # endRegion => 'sProcedureRegion' # insensitive => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(end sub)([\\s]|$)', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '\b(type)([\s]|$)' # attribute => 'Keyword' # beginRegion => 'StructureRegion' # context => '#stay' # insensitive => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(type)([\\s]|$)', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '\b(end type)([\s]|$)' # attribute => 'Keyword' # context => '#stay' # endRegion => 'StructureRegion' # insensitive => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(end type)([\\s]|$)', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '\b(if)([\s]|$)' # attribute => 'Keyword' # beginRegion => 'IfRegion' # context => '#stay' # insensitive => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(if)([\\s]|$)', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '\b(then )[a-zA-Z_\x7f-\xff].' # attribute => 'Keyword' # context => '#stay' # endRegion => 'IfRegion' # insensitive => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(then )[a-zA-Z_\\x7f-\\xff].', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '\b(end if)([\s]|$)' # attribute => 'Keyword' # context => '#stay' # endRegion => 'IfRegion' # insensitive => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(end if)([\\s]|$)', 1, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'keywords' # attribute => 'Keyword' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'Data Types' # attribute => 'Data Types' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'Data Types', 0, undef, 0, '#stay', 'Data Types')) { return 1 } # String => 'functions' # attribute => 'Functions' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'functions', 0, undef, 0, '#stay', 'Functions')) { return 1 } # String => '\#+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*' # attribute => 'Constant' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\#+[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*', 0, 0, 0, undef, 0, '#stay', 'Constant')) { return 1 } # attribute => 'Number' # context => '#stay' # type => 'Float' if ($self->testFloat($text, 0, undef, 0, '#stay', 'Number')) { return 1 } # attribute => 'Number' # context => '#stay' # type => 'Int' if ($self->testInt($text, 0, undef, 0, '#stay', 'Number')) { return 1 } # attribute => 'String' # char => '"' # context => 'String' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) { return 1 } # String => '^\s*;+\s*BEGIN.*$' # attribute => 'Region Marker' # beginRegion => 'marker' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^\\s*;+\\s*BEGIN.*$', 0, 0, 0, undef, 0, '#stay', 'Region Marker')) { return 1 } # String => '^\s*;+\s*END.*$' # attribute => 'Region Marker' # context => '#stay' # endRegion => 'marker' # type => 'RegExpr' if ($self->testRegExpr($text, '^\\s*;+\\s*END.*$', 0, 0, 0, undef, 0, '#stay', 'Region Marker')) { return 1 } # attribute => 'Comment' # char => ''' # context => 'Comment1' # type => 'DetectChar' if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'Comment1', 'Comment')) { return 1 } return 0; }; sub parseString { my ($self, $text) = @_; # attribute => 'String' # char => '"' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) { return 1 } return 0; }; 1; __END__ =head1 NAME Syntax::Highlight::Engine::Kate::FreeBASIC - a Plugin for FreeBASIC syntax highlighting =head1 SYNOPSIS require Syntax::Highlight::Engine::Kate::FreeBASIC; my $sh = new Syntax::Highlight::Engine::Kate::FreeBASIC([ ]); =head1 DESCRIPTION Syntax::Highlight::Engine::Kate::FreeBASIC is a plugin module that provides syntax highlighting for FreeBASIC to the Syntax::Haghlight::Engine::Kate highlighting engine. This code is generated from the syntax definition files used by the Kate project. It works quite fine, but can use refinement and optimization. It inherits Syntax::Higlight::Engine::Kate::Template. See also there. =head1 AUTHOR Hans Jeuken (haje toneel demon nl) =head1 BUGS Unknown. If you find any, please contact the authorlibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/Engine/Kate/Perl.pm0000644000175000017500000023757012150556557031245 0ustar gregoagregoa# Copyright (c) 2005 - 2006 Hans Jeuken. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. # This file was generated from the 'perl.xml' file of the syntax highlight # engine of the kate text editor (http://www.kate-editor.org #kate xml version 1.20 #kate version 2.4 #kate author Anders Lund (anders@alweb.dk) #generated: Sun Feb 3 22:02:05 2008, localtime package Syntax::Highlight::Engine::Kate::Perl; our $VERSION = '0.07'; use strict; use warnings; use base('Syntax::Highlight::Engine::Kate::Template'); sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = $class->SUPER::new(@_); $self->attributes({ 'Comment' => 'Comment', 'Data' => 'Normal', 'Data Type' => 'DataType', 'Decimal' => 'DecVal', 'Float' => 'Float', 'Function' => 'Function', 'Hex' => 'BaseN', 'Keyword' => 'Keyword', 'Normal Text' => 'Normal', 'Nothing' => 'Comment', 'Octal' => 'BaseN', 'Operator' => 'Operator', 'Pattern' => 'Others', 'Pattern Character Class' => 'BaseN', 'Pattern Internal Operator' => 'Char', 'Pod' => 'Comment', 'Pragma' => 'Keyword', 'Special Variable' => 'Variable', 'String' => 'String', 'String (interpolated)' => 'String', 'String Special Character' => 'Char', }); $self->listAdd('functions', 'abs', 'accept', 'alarm', 'atan2', 'bind', 'binmode', 'bless', 'caller', 'chdir', 'chmod', 'chomp', 'chop', 'chown', 'chr', 'chroot', 'close', 'closedir', 'connect', 'cos', 'crypt', 'dbmclose', 'dbmopen', 'defined', 'delete', 'die', 'dump', 'endgrent', 'endhostent', 'endnetent', 'endprotoent', 'endpwent', 'endservent', 'eof', 'eval', 'exec', 'exists', 'exit', 'exp', 'fcntl', 'fileno', 'flock', 'fork', 'format', 'formline', 'getc', 'getgrent', 'getgrgid', 'getgrnam', 'gethostbyaddr', 'gethostbyname', 'gethostent', 'getlogin', 'getnetbyaddr', 'getnetbyname', 'getnetent', 'getpeername', 'getpgrp', 'getppid', 'getpriority', 'getprotobyname', 'getprotobynumber', 'getprotoent', 'getpwent', 'getpwnam', 'getpwuid', 'getservbyname', 'getservbyport', 'getservent', 'getsockname', 'getsockopt', 'glob', 'gmtime', 'goto', 'grep', 'hex', 'import', 'index', 'int', 'ioctl', 'join', 'keys', 'kill', 'last', 'lc', 'lcfirst', 'length', 'link', 'listen', 'localtime', 'lock', 'log', 'lstat', 'map', 'mkdir', 'msgctl', 'msgget', 'msgrcv', 'msgsnd', 'oct', 'open', 'opendir', 'ord', 'pack', 'package', 'pipe', 'pop', 'pos', 'print', 'printf', 'prototype', 'push', 'quotemeta', 'rand', 'read', 'readdir', 'readline', 'readlink', 'recv', 'redo', 'ref', 'rename', 'reset', 'return', 'reverse', 'rewinddir', 'rindex', 'rmdir', 'scalar', 'seek', 'seekdir', 'select', 'semctl', 'semget', 'semop', 'send', 'setgrent', 'sethostent', 'setnetent', 'setpgrp', 'setpriority', 'setprotoent', 'setpwent', 'setservent', 'setsockopt', 'shift', 'shmctl', 'shmget', 'shmread', 'shmwrite', 'shutdown', 'sin', 'sleep', 'socket', 'socketpair', 'sort', 'splice', 'split', 'sprintf', 'sqrt', 'srand', 'stat', 'study', 'sub', 'substr', 'symlink', 'syscall', 'sysread', 'sysseek', 'system', 'syswrite', 'tell', 'telldir', 'tie', 'time', 'times', 'truncate', 'uc', 'ucfirst', 'umask', 'undef', 'unlink', 'unpack', 'unshift', 'untie', 'utime', 'values', 'vec', 'wait', 'waitpid', 'wantarray', 'warn', 'write', ); $self->listAdd('keywords', 'BEGIN', 'END', '__DATA__', '__END__', '__FILE__', '__LINE__', '__PACKAGE__', 'break', 'continue', 'do', 'each', 'else', 'elsif', 'for', 'foreach', 'if', 'last', 'local', 'my', 'next', 'no', 'our', 'package', 'require', 'require', 'return', 'sub', 'unless', 'until', 'use', 'while', ); $self->listAdd('operators', '!=', '%', '&', '&&', '&&=', '&=', '*', '**=', '*=', '+', '+=', ',', '-', '-=', '->', '.', '/=', '::', ';', '<', '<<', '=', '=>', '>', '>>', '?=', '\\\\', '^', 'and', 'eq', 'ne', 'not', 'or', '|', '|=', '||', '||=', '~=', ); $self->listAdd('pragmas', 'bytes', 'constant', 'diagnostics', 'english', 'filetest', 'integer', 'less', 'locale', 'open', 'sigtrap', 'strict', 'subs', 'utf8', 'vars', 'warnings', ); $self->contextdata({ 'Backticked' => { callback => \&parseBackticked, attribute => 'String (interpolated)', }, 'comment' => { callback => \&parsecomment, attribute => 'Comment', lineending => '#pop', }, 'data_handle' => { callback => \&parsedata_handle, attribute => 'Data', }, 'end_handle' => { callback => \&parseend_handle, attribute => 'Nothing', }, 'find_here_document' => { callback => \&parsefind_here_document, attribute => 'Normal Text', lineending => '#pop', }, 'find_pattern' => { callback => \&parsefind_pattern, attribute => 'Pattern', }, 'find_qqx' => { callback => \&parsefind_qqx, attribute => 'Normal Text', }, 'find_quoted' => { callback => \&parsefind_quoted, attribute => 'Normal Text', }, 'find_qw' => { callback => \&parsefind_qw, attribute => 'Normal Text', }, 'find_subst' => { callback => \&parsefind_subst, attribute => 'Normal Text', }, 'find_variable' => { callback => \&parsefind_variable, attribute => 'Data Type', lineending => '#pop', fallthrough => '#pop', }, 'find_variable_unsafe' => { callback => \&parsefind_variable_unsafe, attribute => 'Data Type', lineending => '#pop', fallthrough => '#pop', }, 'here_document' => { callback => \&parsehere_document, attribute => 'String (interpolated)', dynamic => 1, }, 'here_document_dumb' => { callback => \&parsehere_document_dumb, attribute => 'Normal Text', dynamic => 1, }, 'ip_string' => { callback => \&parseip_string, attribute => 'String (interpolated)', }, 'ip_string_2' => { callback => \&parseip_string_2, attribute => 'String (interpolated)', }, 'ip_string_3' => { callback => \&parseip_string_3, attribute => 'String (interpolated)', }, 'ip_string_4' => { callback => \&parseip_string_4, attribute => 'String (interpolated)', }, 'ip_string_5' => { callback => \&parseip_string_5, attribute => 'String (interpolated)', }, 'ip_string_6' => { callback => \&parseip_string_6, attribute => 'String (interpolated)', dynamic => 1, }, 'ipstring_internal' => { callback => \&parseipstring_internal, attribute => 'String (interpolated)', }, 'normal' => { callback => \&parsenormal, attribute => 'Normal Text', }, 'package_qualified_blank' => { callback => \&parsepackage_qualified_blank, attribute => 'Normal Text', }, 'pat_char_class' => { callback => \&parsepat_char_class, attribute => 'Pattern Character Class', }, 'pat_ext' => { callback => \&parsepat_ext, attribute => 'Pattern Internal Operator', }, 'pattern' => { callback => \&parsepattern, attribute => 'Pattern', dynamic => 1, }, 'pattern_brace' => { callback => \&parsepattern_brace, attribute => 'Pattern', }, 'pattern_bracket' => { callback => \&parsepattern_bracket, attribute => 'Pattern', }, 'pattern_paren' => { callback => \&parsepattern_paren, attribute => 'Pattern', }, 'pattern_slash' => { callback => \&parsepattern_slash, attribute => 'Pattern', }, 'pattern_sq' => { callback => \&parsepattern_sq, attribute => 'Pattern', }, 'pod' => { callback => \&parsepod, attribute => 'Pod', }, 'quote_word' => { callback => \&parsequote_word, attribute => 'Normal Text', dynamic => 1, }, 'quote_word_brace' => { callback => \&parsequote_word_brace, attribute => 'Normal Text', }, 'quote_word_bracket' => { callback => \&parsequote_word_bracket, attribute => 'Normal Text', }, 'quote_word_paren' => { callback => \&parsequote_word_paren, attribute => 'Normal Text', }, 'regex_pattern_internal' => { callback => \&parseregex_pattern_internal, attribute => 'Pattern', }, 'regex_pattern_internal_ip' => { callback => \&parseregex_pattern_internal_ip, attribute => 'Pattern', }, 'regex_pattern_internal_rules_1' => { callback => \&parseregex_pattern_internal_rules_1, }, 'regex_pattern_internal_rules_2' => { callback => \&parseregex_pattern_internal_rules_2, }, 'slash_safe_escape' => { callback => \&parseslash_safe_escape, attribute => 'Normal Text', lineending => '#pop', fallthrough => '#pop', }, 'string' => { callback => \&parsestring, attribute => 'String', }, 'string_2' => { callback => \&parsestring_2, attribute => 'String', }, 'string_3' => { callback => \&parsestring_3, attribute => 'String', }, 'string_4' => { callback => \&parsestring_4, attribute => 'String', }, 'string_5' => { callback => \&parsestring_5, attribute => 'String', }, 'string_6' => { callback => \&parsestring_6, attribute => 'String', dynamic => 1, }, 'sub_arg_definition' => { callback => \&parsesub_arg_definition, attribute => 'Normal Text', fallthrough => '#pop#pop', }, 'sub_name_def' => { callback => \&parsesub_name_def, attribute => 'Normal Text', lineending => '#pop', fallthrough => '#pop', }, 'subst_bracket_pattern' => { callback => \&parsesubst_bracket_pattern, attribute => 'Pattern', }, 'subst_bracket_replace' => { callback => \&parsesubst_bracket_replace, attribute => 'String (interpolated)', }, 'subst_curlybrace_middle' => { callback => \&parsesubst_curlybrace_middle, attribute => 'Normal Text', }, 'subst_curlybrace_pattern' => { callback => \&parsesubst_curlybrace_pattern, attribute => 'Pattern', }, 'subst_curlybrace_replace' => { callback => \&parsesubst_curlybrace_replace, attribute => 'String (interpolated)', }, 'subst_curlybrace_replace_recursive' => { callback => \&parsesubst_curlybrace_replace_recursive, attribute => 'String (interpolated)', }, 'subst_paren_pattern' => { callback => \&parsesubst_paren_pattern, attribute => 'Pattern', }, 'subst_paren_replace' => { callback => \&parsesubst_paren_replace, attribute => 'String (interpolated)', }, 'subst_slash_pattern' => { callback => \&parsesubst_slash_pattern, attribute => 'Pattern', dynamic => 1, }, 'subst_slash_replace' => { callback => \&parsesubst_slash_replace, attribute => 'String (interpolated)', dynamic => 1, }, 'subst_sq_pattern' => { callback => \&parsesubst_sq_pattern, attribute => 'Pattern', }, 'subst_sq_replace' => { callback => \&parsesubst_sq_replace, attribute => 'String', }, 'tr' => { callback => \&parsetr, attribute => 'Pattern', lineending => '#pop', fallthrough => '#pop', }, 'var_detect' => { callback => \&parsevar_detect, attribute => 'Data Type', lineending => '#pop#pop', fallthrough => '#pop#pop', }, 'var_detect_rules' => { callback => \&parsevar_detect_rules, attribute => 'Data Type', lineending => '#pop#pop', }, 'var_detect_unsafe' => { callback => \&parsevar_detect_unsafe, attribute => 'Data Type', lineending => '#pop#pop', fallthrough => '#pop#pop', }, }); $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); $self->basecontext('normal'); $self->keywordscase(0); $self->initialize; bless ($self, $class); return $self; } sub language { return 'Perl'; } sub parseBackticked { my ($self, $text) = @_; # context => 'ipstring_internal' # type => 'IncludeRules' if ($self->includeRules('ipstring_internal', $text)) { return 1 } # attribute => 'Operator' # char => '`' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '`', 0, 0, 0, undef, 0, '#pop', 'Operator')) { return 1 } return 0; }; sub parsecomment { my ($self, $text) = @_; # type => 'DetectSpaces' if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { return 1 } # context => '##Alerts' # type => 'IncludeRules' if ($self->includePlugin('Alerts', $text)) { return 1 } # type => 'DetectIdentifier' if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) { return 1 } return 0; }; sub parsedata_handle { my ($self, $text) = @_; # String => '\=(?:head[1-6]|over|back|item|for|begin|end|pod)\s+.*' # attribute => 'Pod' # beginRegion => 'POD' # column => '0' # context => 'pod' # type => 'RegExpr' if ($self->testRegExpr($text, '\\=(?:head[1-6]|over|back|item|for|begin|end|pod)\\s+.*', 0, 0, 0, 0, 0, 'pod', 'Pod')) { return 1 } # String => '__END__' # attribute => 'Keyword' # context => 'normal' # firstNonSpace => 'true' # type => 'StringDetect' if ($self->testStringDetect($text, '__END__', 0, 0, 0, undef, 1, 'normal', 'Keyword')) { return 1 } return 0; }; sub parseend_handle { my ($self, $text) = @_; # String => '^\=(?:head[1-6]|over|back|item|for|begin|end|pod)\s*.*' # attribute => 'Pod' # context => 'pod' # type => 'RegExpr' if ($self->testRegExpr($text, '^\\=(?:head[1-6]|over|back|item|for|begin|end|pod)\\s*.*', 0, 0, 0, undef, 0, 'pod', 'Pod')) { return 1 } # String => '__DATA__' # attribute => 'Keyword' # context => 'data_handle' # firstNonSpace => 'true' # type => 'StringDetect' if ($self->testStringDetect($text, '__DATA__', 0, 0, 0, undef, 1, 'data_handle', 'Keyword')) { return 1 } return 0; }; sub parsefind_here_document { my ($self, $text) = @_; # String => '(\w+)\s*;?' # attribute => 'Keyword' # context => 'here_document' # type => 'RegExpr' if ($self->testRegExpr($text, '(\\w+)\\s*;?', 0, 0, 0, undef, 0, 'here_document', 'Keyword')) { return 1 } # String => '\s*"([^"]+)"\s*;?' # attribute => 'Keyword' # context => 'here_document' # type => 'RegExpr' if ($self->testRegExpr($text, '\\s*"([^"]+)"\\s*;?', 0, 0, 0, undef, 0, 'here_document', 'Keyword')) { return 1 } # String => '\s*`([^`]+)`\s*;?' # attribute => 'Keyword' # context => 'here_document' # type => 'RegExpr' if ($self->testRegExpr($text, '\\s*`([^`]+)`\\s*;?', 0, 0, 0, undef, 0, 'here_document', 'Keyword')) { return 1 } # String => '\s*'([^']+)'\s*;?' # attribute => 'Keyword' # context => 'here_document_dumb' # type => 'RegExpr' if ($self->testRegExpr($text, '\\s*\'([^\']+)\'\\s*;?', 0, 0, 0, undef, 0, 'here_document_dumb', 'Keyword')) { return 1 } return 0; }; sub parsefind_pattern { my ($self, $text) = @_; # String => '\s+#.*' # attribute => 'Comment' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\s+#.*', 0, 0, 0, undef, 0, '#stay', 'Comment')) { return 1 } # attribute => 'Operator' # beginRegion => 'Pattern' # char => '{' # context => 'pattern_brace' # type => 'DetectChar' if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, 'pattern_brace', 'Operator')) { return 1 } # attribute => 'Operator' # beginRegion => 'Pattern' # char => '(' # context => 'pattern_paren' # type => 'DetectChar' if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'pattern_paren', 'Operator')) { return 1 } # attribute => 'Operator' # beginRegion => 'Pattern' # char => '[' # context => 'pattern_bracket' # type => 'DetectChar' if ($self->testDetectChar($text, '[', 0, 0, 0, undef, 0, 'pattern_bracket', 'Operator')) { return 1 } # attribute => 'Operator' # beginRegion => 'Pattern' # char => ''' # context => 'pattern_sq' # type => 'DetectChar' if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'pattern_sq', 'Operator')) { return 1 } # String => '([^\w\s])' # attribute => 'Operator' # beginRegion => 'Pattern' # context => 'pattern' # type => 'RegExpr' if ($self->testRegExpr($text, '([^\\w\\s])', 0, 0, 0, undef, 0, 'pattern', 'Operator')) { return 1 } return 0; }; sub parsefind_qqx { my ($self, $text) = @_; # attribute => 'Operator' # beginRegion => 'String' # char => '(' # context => 'ip_string_2' # type => 'DetectChar' if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'ip_string_2', 'Operator')) { return 1 } # attribute => 'Operator' # beginRegion => 'String' # char => '{' # context => 'ip_string_3' # type => 'DetectChar' if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, 'ip_string_3', 'Operator')) { return 1 } # attribute => 'Operator' # beginRegion => 'String' # char => '[' # context => 'ip_string_4' # type => 'DetectChar' if ($self->testDetectChar($text, '[', 0, 0, 0, undef, 0, 'ip_string_4', 'Operator')) { return 1 } # attribute => 'Operator' # beginRegion => 'String' # char => '<' # context => 'ip_string_5' # type => 'DetectChar' if ($self->testDetectChar($text, '<', 0, 0, 0, undef, 0, 'ip_string_5', 'Operator')) { return 1 } # String => '([^a-zA-Z0-9_\s[\]{}()])' # attribute => 'Operator' # beginRegion => 'String' # context => 'ip_string_6' # type => 'RegExpr' if ($self->testRegExpr($text, '([^a-zA-Z0-9_\\s[\\]{}()])', 0, 0, 0, undef, 0, 'ip_string_6', 'Operator')) { return 1 } # String => '\s+#.*' # attribute => 'Comment' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\s+#.*', 0, 0, 0, undef, 0, '#stay', 'Comment')) { return 1 } return 0; }; sub parsefind_quoted { my ($self, $text) = @_; # String => 'x\s*(')' # attribute => 'Operator' # beginRegion => 'String' # context => 'string_6' # type => 'RegExpr' if ($self->testRegExpr($text, 'x\\s*(\')', 0, 0, 0, undef, 0, 'string_6', 'Operator')) { return 1 } # String => 'qx' # attribute => 'Operator' # context => 'find_qqx' # type => 'AnyChar' if ($self->testAnyChar($text, 'qx', 0, 0, undef, 0, 'find_qqx', 'Operator')) { return 1 } # attribute => 'Operator' # char => 'w' # context => 'find_qw' # type => 'DetectChar' if ($self->testDetectChar($text, 'w', 0, 0, 0, undef, 0, 'find_qw', 'Operator')) { return 1 } # attribute => 'Operator' # beginRegion => 'String' # char => '(' # context => 'string_2' # type => 'DetectChar' if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'string_2', 'Operator')) { return 1 } # attribute => 'Operator' # beginRegion => 'String' # char => '{' # context => 'string_3' # type => 'DetectChar' if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, 'string_3', 'Operator')) { return 1 } # attribute => 'Operator' # beginRegion => 'String' # char => '[' # context => 'string_4' # type => 'DetectChar' if ($self->testDetectChar($text, '[', 0, 0, 0, undef, 0, 'string_4', 'Operator')) { return 1 } # attribute => 'Operator' # beginRegion => 'String' # char => '<' # context => 'string_5' # type => 'DetectChar' if ($self->testDetectChar($text, '<', 0, 0, 0, undef, 0, 'string_5', 'Operator')) { return 1 } # String => '([^a-zA-Z0-9_\s[\]{}()])' # attribute => 'Operator' # beginRegion => 'String' # context => 'string_6' # type => 'RegExpr' if ($self->testRegExpr($text, '([^a-zA-Z0-9_\\s[\\]{}()])', 0, 0, 0, undef, 0, 'string_6', 'Operator')) { return 1 } # String => '\s+#.*' # attribute => 'Comment' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\s+#.*', 0, 0, 0, undef, 0, '#stay', 'Comment')) { return 1 } return 0; }; sub parsefind_qw { my ($self, $text) = @_; # attribute => 'Operator' # beginRegion => 'Wordlist' # char => '(' # context => 'quote_word_paren' # type => 'DetectChar' if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'quote_word_paren', 'Operator')) { return 1 } # attribute => 'Operator' # beginRegion => 'Wordlist' # char => '{' # context => 'quote_word_brace' # type => 'DetectChar' if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, 'quote_word_brace', 'Operator')) { return 1 } # attribute => 'Operator' # beginRegion => 'Wordlist' # char => '[' # context => 'quote_word_bracket' # type => 'DetectChar' if ($self->testDetectChar($text, '[', 0, 0, 0, undef, 0, 'quote_word_bracket', 'Operator')) { return 1 } # String => '([^a-zA-Z0-9_\s[\]{}()])' # attribute => 'Operator' # beginRegion => 'Wordlist' # context => 'quote_word' # type => 'RegExpr' if ($self->testRegExpr($text, '([^a-zA-Z0-9_\\s[\\]{}()])', 0, 0, 0, undef, 0, 'quote_word', 'Operator')) { return 1 } # String => '\s+#.*' # attribute => 'Comment' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\s+#.*', 0, 0, 0, undef, 0, '#stay', 'Comment')) { return 1 } return 0; }; sub parsefind_subst { my ($self, $text) = @_; # String => '\s+#.*' # attribute => 'Comment' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\s+#.*', 0, 0, 0, undef, 0, '#stay', 'Comment')) { return 1 } # attribute => 'Operator' # beginRegion => 'Pattern' # char => '{' # context => 'subst_curlybrace_pattern' # type => 'DetectChar' if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, 'subst_curlybrace_pattern', 'Operator')) { return 1 } # attribute => 'Operator' # beginRegion => 'Pattern' # char => '(' # context => 'subst_paren_pattern' # type => 'DetectChar' if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'subst_paren_pattern', 'Operator')) { return 1 } # attribute => 'Operator' # beginRegion => 'Pattern' # char => '[' # context => 'subst_bracket_pattern' # type => 'DetectChar' if ($self->testDetectChar($text, '[', 0, 0, 0, undef, 0, 'subst_bracket_pattern', 'Operator')) { return 1 } # attribute => 'Operator' # beginRegion => 'Pattern' # char => ''' # context => 'subst_sq_pattern' # type => 'DetectChar' if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'subst_sq_pattern', 'Operator')) { return 1 } # String => '([^\w\s[\]{}()])' # attribute => 'Operator' # beginRegion => 'Pattern' # context => 'subst_slash_pattern' # type => 'RegExpr' if ($self->testRegExpr($text, '([^\\w\\s[\\]{}()])', 0, 0, 0, undef, 0, 'subst_slash_pattern', 'Operator')) { return 1 } return 0; }; sub parsefind_variable { my ($self, $text) = @_; # String => '\$[0-9]+' # attribute => 'Special Variable' # context => 'var_detect' # type => 'RegExpr' if ($self->testRegExpr($text, '\\$[0-9]+', 0, 0, 0, undef, 0, 'var_detect', 'Special Variable')) { return 1 } # String => '[@\$](?:[\+\-_]\B|ARGV\b|INC\b)' # attribute => 'Special Variable' # context => 'var_detect' # type => 'RegExpr' if ($self->testRegExpr($text, '[@\\$](?:[\\+\\-_]\\B|ARGV\\b|INC\\b)', 0, 0, 0, undef, 0, 'var_detect', 'Special Variable')) { return 1 } # String => '[%\$](?:INC\b|ENV\b|SIG\b)' # attribute => 'Special Variable' # context => 'var_detect' # type => 'RegExpr' if ($self->testRegExpr($text, '[%\\$](?:INC\\b|ENV\\b|SIG\\b)', 0, 0, 0, undef, 0, 'var_detect', 'Special Variable')) { return 1 } # String => '\$\$[\$\w_]' # attribute => 'Data Type' # context => 'var_detect' # type => 'RegExpr' if ($self->testRegExpr($text, '\\$\\$[\\$\\w_]', 0, 0, 0, undef, 0, 'var_detect', 'Data Type')) { return 1 } # String => '\$[#_][\w_]' # attribute => 'Data Type' # context => 'var_detect' # type => 'RegExpr' if ($self->testRegExpr($text, '\\$[#_][\\w_]', 0, 0, 0, undef, 0, 'var_detect', 'Data Type')) { return 1 } # String => '\$+::' # attribute => 'Data Type' # context => 'var_detect' # type => 'RegExpr' if ($self->testRegExpr($text, '\\$+::', 0, 0, 0, undef, 0, 'var_detect', 'Data Type')) { return 1 } # String => '\$[^a-zA-Z0-9\s{][A-Z]?' # attribute => 'Special Variable' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\$[^a-zA-Z0-9\\s{][A-Z]?', 0, 0, 0, undef, 0, '#stay', 'Special Variable')) { return 1 } # String => '[\$@%]\{[\w_]+\}' # attribute => 'Data Type' # context => 'var_detect' # type => 'RegExpr' if ($self->testRegExpr($text, '[\\$@%]\\{[\\w_]+\\}', 0, 0, 0, undef, 0, 'var_detect', 'Data Type')) { return 1 } # String => '$@%' # attribute => 'Data Type' # context => 'var_detect' # type => 'AnyChar' if ($self->testAnyChar($text, '$@%', 0, 0, undef, 0, 'var_detect', 'Data Type')) { return 1 } # String => '\*[a-zA-Z_]+' # attribute => 'Data Type' # context => 'var_detect' # type => 'RegExpr' if ($self->testRegExpr($text, '\\*[a-zA-Z_]+', 0, 0, 0, undef, 0, 'var_detect', 'Data Type')) { return 1 } # String => '\*[^a-zA-Z0-9\s{][A-Z]?' # attribute => 'Special Variable' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\*[^a-zA-Z0-9\\s{][A-Z]?', 0, 0, 0, undef, 0, '#stay', 'Special Variable')) { return 1 } # String => '$@%*' # attribute => 'Operator' # context => '#pop' # type => 'AnyChar' if ($self->testAnyChar($text, '$@%*', 0, 0, undef, 0, '#pop', 'Operator')) { return 1 } return 0; }; sub parsefind_variable_unsafe { my ($self, $text) = @_; # String => '\$[0-9]+' # attribute => 'Special Variable' # context => 'var_detect_unsafe' # type => 'RegExpr' if ($self->testRegExpr($text, '\\$[0-9]+', 0, 0, 0, undef, 0, 'var_detect_unsafe', 'Special Variable')) { return 1 } # String => '[@\$](?:[\+\-_]\B|ARGV\b|INC\b)' # attribute => 'Special Variable' # context => 'var_detect_unsafe' # type => 'RegExpr' if ($self->testRegExpr($text, '[@\\$](?:[\\+\\-_]\\B|ARGV\\b|INC\\b)', 0, 0, 0, undef, 0, 'var_detect_unsafe', 'Special Variable')) { return 1 } # String => '[%\$](?:INC\b|ENV\b|SIG\b)' # attribute => 'Special Variable' # context => 'var_detect_unsafe' # type => 'RegExpr' if ($self->testRegExpr($text, '[%\\$](?:INC\\b|ENV\\b|SIG\\b)', 0, 0, 0, undef, 0, 'var_detect_unsafe', 'Special Variable')) { return 1 } # String => '\$\$[\$\w_]' # attribute => 'Data Type' # context => 'var_detect_unsafe' # type => 'RegExpr' if ($self->testRegExpr($text, '\\$\\$[\\$\\w_]', 0, 0, 0, undef, 0, 'var_detect_unsafe', 'Data Type')) { return 1 } # String => '\$[#_][\w_]' # attribute => 'Data Type' # context => 'var_detect_unsafe' # type => 'RegExpr' if ($self->testRegExpr($text, '\\$[#_][\\w_]', 0, 0, 0, undef, 0, 'var_detect_unsafe', 'Data Type')) { return 1 } # String => '\$+::' # attribute => 'Data Type' # context => 'var_detect_unsafe' # type => 'RegExpr' if ($self->testRegExpr($text, '\\$+::', 0, 0, 0, undef, 0, 'var_detect_unsafe', 'Data Type')) { return 1 } # String => '\$[^a-zA-Z0-9\s{][A-Z]?' # attribute => 'Special Variable' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\$[^a-zA-Z0-9\\s{][A-Z]?', 0, 0, 0, undef, 0, '#stay', 'Special Variable')) { return 1 } # String => '[\$@%]\{[\w_]+\}' # attribute => 'Data Type' # context => 'var_detect_unsafe' # type => 'RegExpr' if ($self->testRegExpr($text, '[\\$@%]\\{[\\w_]+\\}', 0, 0, 0, undef, 0, 'var_detect_unsafe', 'Data Type')) { return 1 } # String => '[\$@%]' # attribute => 'Data Type' # context => 'var_detect_unsafe' # type => 'RegExpr' if ($self->testRegExpr($text, '[\\$@%]', 0, 0, 0, undef, 0, 'var_detect_unsafe', 'Data Type')) { return 1 } # String => '\*\w+' # attribute => 'Data Type' # context => 'var_detect_unsafe' # type => 'RegExpr' if ($self->testRegExpr($text, '\\*\\w+', 0, 0, 0, undef, 0, 'var_detect_unsafe', 'Data Type')) { return 1 } # String => '$@%*' # attribute => 'Operator' # context => '#pop' # type => 'AnyChar' if ($self->testAnyChar($text, '$@%*', 0, 0, undef, 0, '#pop', 'Operator')) { return 1 } return 0; }; sub parsehere_document { my ($self, $text) = @_; # type => 'DetectSpaces' if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { return 1 } # String => '%1' # attribute => 'Keyword' # column => '0' # context => '#pop#pop' # dynamic => 'true' # endRegion => 'HereDocument' # type => 'RegExpr' if ($self->testRegExpr($text, '%1', 0, 1, 0, 0, 0, '#pop#pop', 'Keyword')) { return 1 } # String => '\=\s*<<\s*["']?([A-Z0-9_\-]+)["']?' # attribute => 'Keyword' # beginRegion => 'HEREDoc' # context => 'here_document' # type => 'RegExpr' if ($self->testRegExpr($text, '\\=\\s*<<\\s*["\']?([A-Z0-9_\\-]+)["\']?', 0, 0, 0, undef, 0, 'here_document', 'Keyword')) { return 1 } # context => 'ipstring_internal' # type => 'IncludeRules' if ($self->includeRules('ipstring_internal', $text)) { return 1 } return 0; }; sub parsehere_document_dumb { my ($self, $text) = @_; # type => 'DetectSpaces' if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { return 1 } # String => '%1' # attribute => 'Keyword' # column => '0' # context => '#pop#pop' # dynamic => 'true' # endRegion => 'HereDocument' # type => 'RegExpr' if ($self->testRegExpr($text, '%1', 0, 1, 0, 0, 0, '#pop#pop', 'Keyword')) { return 1 } # type => 'DetectIdentifier' if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) { return 1 } return 0; }; sub parseip_string { my ($self, $text) = @_; # attribute => 'Operator' # char => '"' # context => '#pop' # endRegion => 'String' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'Operator')) { return 1 } # context => 'ipstring_internal' # type => 'IncludeRules' if ($self->includeRules('ipstring_internal', $text)) { return 1 } return 0; }; sub parseip_string_2 { my ($self, $text) = @_; # attribute => 'String (interpolated)' # char => '(' # char1 => ')' # context => '#stay' # type => 'RangeDetect' if ($self->testRangeDetect($text, '(', ')', 0, 0, undef, 0, '#stay', 'String (interpolated)')) { return 1 } # attribute => 'Operator' # char => ')' # context => '#pop#pop#pop' # endRegion => 'String' # type => 'DetectChar' if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop#pop#pop', 'Operator')) { return 1 } # context => 'ipstring_internal' # type => 'IncludeRules' if ($self->includeRules('ipstring_internal', $text)) { return 1 } return 0; }; sub parseip_string_3 { my ($self, $text) = @_; # attribute => 'String (interpolated)' # char => '{' # char1 => '}' # context => '#stay' # type => 'RangeDetect' if ($self->testRangeDetect($text, '{', '}', 0, 0, undef, 0, '#stay', 'String (interpolated)')) { return 1 } # attribute => 'Operator' # char => '}' # context => '#pop#pop#pop' # endRegion => 'String' # type => 'DetectChar' if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#pop#pop#pop', 'Operator')) { return 1 } # context => 'ipstring_internal' # type => 'IncludeRules' if ($self->includeRules('ipstring_internal', $text)) { return 1 } return 0; }; sub parseip_string_4 { my ($self, $text) = @_; # attribute => 'String (interpolated)' # char => '[' # char1 => ']' # context => '#stay' # type => 'RangeDetect' if ($self->testRangeDetect($text, '[', ']', 0, 0, undef, 0, '#stay', 'String (interpolated)')) { return 1 } # attribute => 'Operator' # char => ']' # context => '#pop#pop#pop' # endRegion => 'String' # type => 'DetectChar' if ($self->testDetectChar($text, ']', 0, 0, 0, undef, 0, '#pop#pop#pop', 'Operator')) { return 1 } # context => 'ipstring_internal' # type => 'IncludeRules' if ($self->includeRules('ipstring_internal', $text)) { return 1 } return 0; }; sub parseip_string_5 { my ($self, $text) = @_; # attribute => 'String (interpolated)' # char => '<' # char1 => '>' # context => '#stay' # type => 'RangeDetect' if ($self->testRangeDetect($text, '<', '>', 0, 0, undef, 0, '#stay', 'String (interpolated)')) { return 1 } # attribute => 'Operator' # char => '>' # context => '#pop#pop#pop' # endRegion => 'String' # type => 'DetectChar' if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '#pop#pop#pop', 'Operator')) { return 1 } # context => 'ipstring_internal' # type => 'IncludeRules' if ($self->includeRules('ipstring_internal', $text)) { return 1 } return 0; }; sub parseip_string_6 { my ($self, $text) = @_; # String => '\\%1' # attribute => 'String (interpolated)' # context => '#stay' # dynamic => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '\\\\%1', 0, 1, 0, undef, 0, '#stay', 'String (interpolated)')) { return 1 } # attribute => 'Operator' # char => '1' # context => '#pop#pop#pop' # dynamic => 'true' # endRegion => 'String' # type => 'DetectChar' if ($self->testDetectChar($text, '1', 0, 1, 0, undef, 0, '#pop#pop#pop', 'Operator')) { return 1 } # context => 'ipstring_internal' # type => 'IncludeRules' if ($self->includeRules('ipstring_internal', $text)) { return 1 } return 0; }; sub parseipstring_internal { my ($self, $text) = @_; # type => 'DetectIdentifier' if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) { return 1 } # String => '\\[UuLlEtnaefr]' # attribute => 'String Special Character' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\\\[UuLlEtnaefr]', 0, 0, 0, undef, 0, '#stay', 'String Special Character')) { return 1 } # String => '\\.' # attribute => 'String (interpolated)' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\\\.', 0, 0, 0, undef, 0, '#stay', 'String (interpolated)')) { return 1 } # String => '(?:[\$@]\S|%[\w{])' # attribute => 'Normal Text' # context => 'find_variable_unsafe' # lookAhead => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '(?:[\\$@]\\S|%[\\w{])', 0, 0, 1, undef, 0, 'find_variable_unsafe', 'Normal Text')) { return 1 } return 0; }; sub parsenormal { my ($self, $text) = @_; # String => '^#!\/.*' # attribute => 'Keyword' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^#!\\/.*', 0, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '__DATA__' # attribute => 'Keyword' # context => 'data_handle' # firstNonSpace => 'true' # type => 'StringDetect' if ($self->testStringDetect($text, '__DATA__', 0, 0, 0, undef, 1, 'data_handle', 'Keyword')) { return 1 } # String => '__END__' # attribute => 'Keyword' # context => '#stay' # firstNonSpace => 'true' # type => 'StringDetect' if ($self->testStringDetect($text, '__END__', 0, 0, 0, undef, 1, '#stay', 'Keyword')) { return 1 } # String => '\bsub\s+' # attribute => 'Keyword' # context => 'sub_name_def' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bsub\\s+', 0, 0, 0, undef, 0, 'sub_name_def', 'Keyword')) { return 1 } # String => 'keywords' # attribute => 'Keyword' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'operators' # attribute => 'Operator' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'operators', 0, undef, 0, '#stay', 'Operator')) { return 1 } # String => 'functions' # attribute => 'Function' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'functions', 0, undef, 0, '#stay', 'Function')) { return 1 } # String => 'pragmas' # attribute => 'Pragma' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'pragmas', 0, undef, 0, '#stay', 'Pragma')) { return 1 } # String => '\=(?:head[1-6]|over|back|item|for|begin|end|pod)(\s|$)' # attribute => 'Pod' # beginRegion => 'POD' # column => '0' # context => 'pod' # type => 'RegExpr' if ($self->testRegExpr($text, '\\=(?:head[1-6]|over|back|item|for|begin|end|pod)(\\s|$)', 0, 0, 0, 0, 0, 'pod', 'Pod')) { return 1 } # type => 'DetectSpaces' if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { return 1 } # attribute => 'Comment' # char => '#' # context => 'comment' # type => 'DetectChar' if ($self->testDetectChar($text, '#', 0, 0, 0, undef, 0, 'comment', 'Comment')) { return 1 } # attribute => 'Octal' # context => 'slash_safe_escape' # type => 'HlCOct' if ($self->testHlCOct($text, 0, undef, 0, 'slash_safe_escape', 'Octal')) { return 1 } # attribute => 'Hex' # context => 'slash_safe_escape' # type => 'HlCHex' if ($self->testHlCHex($text, 0, undef, 0, 'slash_safe_escape', 'Hex')) { return 1 } # attribute => 'Float' # context => 'slash_safe_escape' # type => 'Float' if ($self->testFloat($text, 0, undef, 0, 'slash_safe_escape', 'Float')) { return 1 } # attribute => 'Decimal' # context => 'slash_safe_escape' # type => 'Int' if ($self->testInt($text, 0, undef, 0, 'slash_safe_escape', 'Decimal')) { return 1 } # String => '\\(["'])[^\1]' # attribute => 'Normal Text' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\\\(["\'])[^\\1]', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { return 1 } # attribute => 'Normal Text' # char => '&' # char1 => ''' # context => '#stay' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '&', '\'', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { return 1 } # attribute => 'Operator' # beginRegion => 'String' # char => '"' # context => 'ip_string' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'ip_string', 'Operator')) { return 1 } # attribute => 'Operator' # beginRegion => 'String' # char => ''' # context => 'string' # type => 'DetectChar' if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'string', 'Operator')) { return 1 } # attribute => 'Operator' # char => '`' # context => 'Backticked' # type => 'DetectChar' if ($self->testDetectChar($text, '`', 0, 0, 0, undef, 0, 'Backticked', 'Operator')) { return 1 } # String => '(?:[$@]\S|%[\w{]|\*[^\d\*{\$@%=(])' # attribute => 'Normal Text' # context => 'find_variable' # lookAhead => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '(?:[$@]\\S|%[\\w{]|\\*[^\\d\\*{\\$@%=(])', 0, 0, 1, undef, 0, 'find_variable', 'Normal Text')) { return 1 } # String => '<[A-Z0-9_]+>' # attribute => 'Keyword' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '<[A-Z0-9_]+>', 0, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '\s*<<(?=\w+|\s*["'])' # attribute => 'Operator' # beginRegion => 'HereDocument' # context => 'find_here_document' # type => 'RegExpr' if ($self->testRegExpr($text, '\\s*<<(?=\\w+|\\s*["\'])', 0, 0, 0, undef, 0, 'find_here_document', 'Operator')) { return 1 } # String => '\s*\}\s*/' # attribute => 'Normal Text' # context => '#stay' # endRegion => 'Block' # type => 'RegExpr' if ($self->testRegExpr($text, '\\s*\\}\\s*/', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { return 1 } # String => '\s*[)]\s*/' # attribute => 'Normal Text' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\s*[)]\\s*/', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { return 1 } # String => '\w+::' # attribute => 'Function' # context => 'sub_name_def' # type => 'RegExpr' if ($self->testRegExpr($text, '\\w+::', 0, 0, 0, undef, 0, 'sub_name_def', 'Function')) { return 1 } # String => '\w+[=]' # attribute => 'Normal Text' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\w+[=]', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { return 1 } # String => '\bq(?=[qwx]?\s*[^\w\s])' # attribute => 'Operator' # context => 'find_quoted' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bq(?=[qwx]?\\s*[^\\w\\s])', 0, 0, 0, undef, 0, 'find_quoted', 'Operator')) { return 1 } # String => '\bs(?=\s*[^\w\s])' # attribute => 'Operator' # context => 'find_subst' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bs(?=\\s*[^\\w\\s])', 0, 0, 0, undef, 0, 'find_subst', 'Operator')) { return 1 } # String => '\b(?:tr|y)\s*(?=[^\w\s\]})])' # attribute => 'Operator' # context => 'tr' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(?:tr|y)\\s*(?=[^\\w\\s\\]})])', 0, 0, 0, undef, 0, 'tr', 'Operator')) { return 1 } # String => '\b(?:m|qr)(?=\s*[^\w\s\]})])' # attribute => 'Operator' # context => 'find_pattern' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b(?:m|qr)(?=\\s*[^\\w\\s\\]})])', 0, 0, 0, undef, 0, 'find_pattern', 'Operator')) { return 1 } # String => '[\w_]+\s*/' # attribute => 'Normal Text' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '[\\w_]+\\s*/', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { return 1 } # String => '[<>"':]/' # attribute => 'Normal Text' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '[<>"\':]/', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { return 1 } # attribute => 'Operator' # beginRegion => 'Pattern' # char => '/' # context => 'pattern_slash' # type => 'DetectChar' if ($self->testDetectChar($text, '/', 0, 0, 0, undef, 0, 'pattern_slash', 'Operator')) { return 1 } # String => '-[rwxoRWXOeszfdlpSbctugkTBMAC]' # attribute => 'Operator' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '-[rwxoRWXOeszfdlpSbctugkTBMAC]', 0, 0, 0, undef, 0, '#stay', 'Operator')) { return 1 } # attribute => 'Normal Text' # beginRegion => 'Block' # char => '{' # context => '#stay' # type => 'DetectChar' if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { return 1 } # attribute => 'Normal Text' # char => '}' # context => '#stay' # endRegion => 'Block' # type => 'DetectChar' if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { return 1 } return 0; }; sub parsepackage_qualified_blank { my ($self, $text) = @_; # String => '[\w_]+' # attribute => 'Normal Text' # context => '#pop' # type => 'RegExpr' if ($self->testRegExpr($text, '[\\w_]+', 0, 0, 0, undef, 0, '#pop', 'Normal Text')) { return 1 } return 0; }; sub parsepat_char_class { my ($self, $text) = @_; # attribute => 'Pattern Internal Operator' # char => '^' # context => '#stay' # type => 'DetectChar' if ($self->testDetectChar($text, '^', 0, 0, 0, undef, 0, '#stay', 'Pattern Internal Operator')) { return 1 } # attribute => 'Pattern Character Class' # char => '\' # char1 => '\' # context => '#stay' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '\\', '\\', 0, 0, 0, undef, 0, '#stay', 'Pattern Character Class')) { return 1 } # attribute => 'Pattern Character Class' # char => '\' # char1 => ']' # context => '#stay' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '\\', ']', 0, 0, 0, undef, 0, '#stay', 'Pattern Character Class')) { return 1 } # String => '\[:^?[a-z]+:\]' # attribute => 'Pattern Character Class' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\[:^?[a-z]+:\\]', 0, 0, 0, undef, 0, '#stay', 'Pattern Character Class')) { return 1 } # attribute => 'Pattern Internal Operator' # char => ']' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, ']', 0, 0, 0, undef, 0, '#pop', 'Pattern Internal Operator')) { return 1 } return 0; }; sub parsepat_ext { my ($self, $text) = @_; # String => '\#[^)]*' # attribute => 'Comment' # context => '#pop' # type => 'RegExpr' if ($self->testRegExpr($text, '\\#[^)]*', 0, 0, 0, undef, 0, '#pop', 'Comment')) { return 1 } # String => '[:=!><]+' # attribute => 'Pattern Internal Operator' # context => '#pop' # type => 'RegExpr' if ($self->testRegExpr($text, '[:=!><]+', 0, 0, 0, undef, 0, '#pop', 'Pattern Internal Operator')) { return 1 } # attribute => 'Pattern Internal Operator' # char => ')' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop', 'Pattern Internal Operator')) { return 1 } return 0; }; sub parsepattern { my ($self, $text) = @_; # String => '\$(?=%1)' # attribute => 'Pattern Internal Operator' # context => '#stay' # dynamic => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '\\$(?=%1)', 0, 1, 0, undef, 0, '#stay', 'Pattern Internal Operator')) { return 1 } # String => '%1[cgimosx]*' # attribute => 'Operator' # context => '#pop#pop' # dynamic => 'true' # endRegion => 'Pattern' # type => 'RegExpr' if ($self->testRegExpr($text, '%1[cgimosx]*', 0, 1, 0, undef, 0, '#pop#pop', 'Operator')) { return 1 } # context => 'regex_pattern_internal_ip' # type => 'IncludeRules' if ($self->includeRules('regex_pattern_internal_ip', $text)) { return 1 } # String => '\$(?=\%1)' # attribute => 'Pattern Internal Operator' # context => '#stay' # dynamic => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '\\$(?=\\%1)', 0, 1, 0, undef, 0, '#stay', 'Pattern Internal Operator')) { return 1 } return 0; }; sub parsepattern_brace { my ($self, $text) = @_; # String => '\}[cgimosx]*' # attribute => 'Operator' # context => '#pop#pop' # endRegion => 'Pattern' # type => 'RegExpr' if ($self->testRegExpr($text, '\\}[cgimosx]*', 0, 0, 0, undef, 0, '#pop#pop', 'Operator')) { return 1 } # context => 'regex_pattern_internal_ip' # type => 'IncludeRules' if ($self->includeRules('regex_pattern_internal_ip', $text)) { return 1 } return 0; }; sub parsepattern_bracket { my ($self, $text) = @_; # String => '\][cgimosx]*' # attribute => 'Operator' # context => '#pop#pop' # endRegion => 'Pattern' # type => 'RegExpr' if ($self->testRegExpr($text, '\\][cgimosx]*', 0, 0, 0, undef, 0, '#pop#pop', 'Operator')) { return 1 } # context => 'regex_pattern_internal_ip' # type => 'IncludeRules' if ($self->includeRules('regex_pattern_internal_ip', $text)) { return 1 } return 0; }; sub parsepattern_paren { my ($self, $text) = @_; # String => '\)[cgimosx]*' # attribute => 'Operator' # context => '#pop#pop' # endRegion => 'Pattern' # type => 'RegExpr' if ($self->testRegExpr($text, '\\)[cgimosx]*', 0, 0, 0, undef, 0, '#pop#pop', 'Operator')) { return 1 } # context => 'regex_pattern_internal_ip' # type => 'IncludeRules' if ($self->includeRules('regex_pattern_internal_ip', $text)) { return 1 } return 0; }; sub parsepattern_slash { my ($self, $text) = @_; # String => '\$(?=/)' # attribute => 'Pattern Internal Operator' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\$(?=/)', 0, 0, 0, undef, 0, '#stay', 'Pattern Internal Operator')) { return 1 } # context => 'regex_pattern_internal_ip' # type => 'IncludeRules' if ($self->includeRules('regex_pattern_internal_ip', $text)) { return 1 } # String => '/[cgimosx]*' # attribute => 'Operator' # context => '#pop' # endRegion => 'Pattern' # type => 'RegExpr' if ($self->testRegExpr($text, '/[cgimosx]*', 0, 0, 0, undef, 0, '#pop', 'Operator')) { return 1 } return 0; }; sub parsepattern_sq { my ($self, $text) = @_; # String => ''[cgimosx]*' # attribute => 'Operator' # context => '#pop#pop' # endRegion => 'Pattern' # type => 'RegExpr' if ($self->testRegExpr($text, '\'[cgimosx]*', 0, 0, 0, undef, 0, '#pop#pop', 'Operator')) { return 1 } # context => 'regex_pattern_internal' # type => 'IncludeRules' if ($self->includeRules('regex_pattern_internal', $text)) { return 1 } return 0; }; sub parsepod { my ($self, $text) = @_; # type => 'DetectSpaces' if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { return 1 } # type => 'DetectIdentifier' if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) { return 1 } # String => '\=(?:head[1-6]|over|back|item|for|begin|end|pod)\s*.*' # attribute => 'Pod' # beginRegion => 'POD' # column => '0' # context => '#stay' # endRegion => 'POD' # type => 'RegExpr' if ($self->testRegExpr($text, '\\=(?:head[1-6]|over|back|item|for|begin|end|pod)\\s*.*', 0, 0, 0, 0, 0, '#stay', 'Pod')) { return 1 } # String => '\=cut.*$' # attribute => 'Pod' # column => '0' # context => '#pop' # endRegion => 'POD' # type => 'RegExpr' if ($self->testRegExpr($text, '\\=cut.*$', 0, 0, 0, 0, 0, '#pop', 'Pod')) { return 1 } return 0; }; sub parsequote_word { my ($self, $text) = @_; # type => 'DetectSpaces' if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { return 1 } # type => 'DetectIdentifier' if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) { return 1 } # String => '\\%1' # attribute => 'Normal Text' # context => '#stay' # dynamic => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '\\\\%1', 0, 1, 0, undef, 0, '#stay', 'Normal Text')) { return 1 } # attribute => 'Operator' # char => '1' # context => '#pop#pop#pop' # dynamic => 'true' # endRegion => 'Wordlist' # type => 'DetectChar' if ($self->testDetectChar($text, '1', 0, 1, 0, undef, 0, '#pop#pop#pop', 'Operator')) { return 1 } return 0; }; sub parsequote_word_brace { my ($self, $text) = @_; # type => 'DetectSpaces' if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { return 1 } # type => 'DetectIdentifier' if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) { return 1 } # attribute => 'Normal Text' # char => '\' # char1 => '}' # context => '#stay' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '\\', '}', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { return 1 } # attribute => 'Operator' # char => '}' # context => '#pop#pop#pop' # endRegion => 'Wordlist' # type => 'DetectChar' if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#pop#pop#pop', 'Operator')) { return 1 } return 0; }; sub parsequote_word_bracket { my ($self, $text) = @_; # type => 'DetectSpaces' if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { return 1 } # type => 'DetectIdentifier' if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) { return 1 } # attribute => 'Normal Text' # char => '\' # char1 => ']' # context => '#stay' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '\\', ']', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { return 1 } # attribute => 'Operator' # char => ']' # context => '#pop#pop#pop' # endRegion => 'Wordlist' # type => 'DetectChar' if ($self->testDetectChar($text, ']', 0, 0, 0, undef, 0, '#pop#pop#pop', 'Operator')) { return 1 } return 0; }; sub parsequote_word_paren { my ($self, $text) = @_; # type => 'DetectSpaces' if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { return 1 } # type => 'DetectIdentifier' if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) { return 1 } # attribute => 'Normal Text' # char => '\' # char1 => ')' # context => '#stay' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '\\', ')', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { return 1 } # attribute => 'Operator' # char => ')' # context => '#pop#pop#pop' # endRegion => 'Wordlist' # type => 'DetectChar' if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop#pop#pop', 'Operator')) { return 1 } return 0; }; sub parseregex_pattern_internal { my ($self, $text) = @_; # context => 'regex_pattern_internal_rules_1' # type => 'IncludeRules' if ($self->includeRules('regex_pattern_internal_rules_1', $text)) { return 1 } # context => 'regex_pattern_internal_rules_2' # type => 'IncludeRules' if ($self->includeRules('regex_pattern_internal_rules_2', $text)) { return 1 } return 0; }; sub parseregex_pattern_internal_ip { my ($self, $text) = @_; # context => 'regex_pattern_internal_rules_1' # type => 'IncludeRules' if ($self->includeRules('regex_pattern_internal_rules_1', $text)) { return 1 } # String => '[$@][^]\s{}()|>']' # attribute => 'Data Type' # context => 'find_variable_unsafe' # lookAhead => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '[$@][^]\\s{}()|>\']', 0, 0, 1, undef, 0, 'find_variable_unsafe', 'Data Type')) { return 1 } # context => 'regex_pattern_internal_rules_2' # type => 'IncludeRules' if ($self->includeRules('regex_pattern_internal_rules_2', $text)) { return 1 } return 0; }; sub parseregex_pattern_internal_rules_1 { my ($self, $text) = @_; # String => '#.*$' # attribute => 'Comment' # context => '#stay' # firstNonSpace => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '#.*$', 0, 0, 0, undef, 1, '#stay', 'Comment')) { return 1 } # String => '\\[anDdSsWw]' # attribute => 'Pattern Character Class' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\\\[anDdSsWw]', 0, 0, 0, undef, 0, '#stay', 'Pattern Character Class')) { return 1 } # String => '\\[ABbEGLlNUuQdQZz]' # attribute => 'Pattern Internal Operator' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\\\[ABbEGLlNUuQdQZz]', 0, 0, 0, undef, 0, '#stay', 'Pattern Internal Operator')) { return 1 } # String => '\\[\d]+' # attribute => 'Special Variable' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\\\[\\d]+', 0, 0, 0, undef, 0, '#stay', 'Special Variable')) { return 1 } # String => '\\.' # attribute => 'Pattern' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\\\.', 0, 0, 0, undef, 0, '#stay', 'Pattern')) { return 1 } return 0; }; sub parseregex_pattern_internal_rules_2 { my ($self, $text) = @_; # attribute => 'Pattern Internal Operator' # char => '(' # char1 => '?' # context => 'pat_ext' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '(', '?', 0, 0, 0, undef, 0, 'pat_ext', 'Pattern Internal Operator')) { return 1 } # attribute => 'Pattern Internal Operator' # char => '[' # context => 'pat_char_class' # type => 'DetectChar' if ($self->testDetectChar($text, '[', 0, 0, 0, undef, 0, 'pat_char_class', 'Pattern Internal Operator')) { return 1 } # String => '[()?^*+|]' # attribute => 'Pattern Internal Operator' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '[()?^*+|]', 0, 0, 0, undef, 0, '#stay', 'Pattern Internal Operator')) { return 1 } # String => '\{[\d, ]+\}' # attribute => 'Pattern Internal Operator' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\{[\\d, ]+\\}', 0, 0, 0, undef, 0, '#stay', 'Pattern Internal Operator')) { return 1 } # attribute => 'Pattern Internal Operator' # char => '$' # context => '#stay' # type => 'DetectChar' if ($self->testDetectChar($text, '$', 0, 0, 0, undef, 0, '#stay', 'Pattern Internal Operator')) { return 1 } # String => '\s{3,}#.*$' # attribute => 'Comment' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\s{3,}#.*$', 0, 0, 0, undef, 0, '#stay', 'Comment')) { return 1 } return 0; }; sub parseslash_safe_escape { my ($self, $text) = @_; # String => '\s*\]?\s*/' # attribute => 'Normal Text' # context => '#pop' # type => 'RegExpr' if ($self->testRegExpr($text, '\\s*\\]?\\s*/', 0, 0, 0, undef, 0, '#pop', 'Normal Text')) { return 1 } # String => '\s*\}?\s*/' # attribute => 'Normal Text' # context => '#pop' # endRegion => 'Block' # type => 'RegExpr' if ($self->testRegExpr($text, '\\s*\\}?\\s*/', 0, 0, 0, undef, 0, '#pop', 'Normal Text')) { return 1 } # String => '\s*\)?\s*/' # attribute => 'Normal Text' # context => '#pop' # type => 'RegExpr' if ($self->testRegExpr($text, '\\s*\\)?\\s*/', 0, 0, 0, undef, 0, '#pop', 'Normal Text')) { return 1 } # String => 'keywords' # attribute => 'Keyword' # context => '#pop' # type => 'keyword' if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#pop', 'Keyword')) { return 1 } return 0; }; sub parsestring { my ($self, $text) = @_; # type => 'DetectIdentifier' if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) { return 1 } # attribute => 'String Special Character' # char => '\' # char1 => ''' # context => '#stay' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '\\', '\'', 0, 0, 0, undef, 0, '#stay', 'String Special Character')) { return 1 } # attribute => 'String Special Character' # char => '\' # char1 => '\' # context => '#stay' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '\\', '\\', 0, 0, 0, undef, 0, '#stay', 'String Special Character')) { return 1 } # attribute => 'Operator' # char => ''' # context => '#pop' # endRegion => 'String' # type => 'DetectChar' if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop', 'Operator')) { return 1 } return 0; }; sub parsestring_2 { my ($self, $text) = @_; # type => 'DetectIdentifier' if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) { return 1 } # attribute => 'String Special Character' # char => '\' # char1 => ')' # context => '#stay' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '\\', ')', 0, 0, 0, undef, 0, '#stay', 'String Special Character')) { return 1 } # attribute => 'String Special Character' # char => '\' # char1 => '\' # context => '#stay' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '\\', '\\', 0, 0, 0, undef, 0, '#stay', 'String Special Character')) { return 1 } # attribute => 'String' # char => '(' # char1 => ')' # context => '#stay' # type => 'RangeDetect' if ($self->testRangeDetect($text, '(', ')', 0, 0, undef, 0, '#stay', 'String')) { return 1 } # attribute => 'Operator' # char => ')' # context => '#pop#pop' # endRegion => 'String' # type => 'DetectChar' if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop#pop', 'Operator')) { return 1 } return 0; }; sub parsestring_3 { my ($self, $text) = @_; # type => 'DetectIdentifier' if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) { return 1 } # attribute => 'String Special Character' # char => '\' # char1 => '}' # context => '#stay' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '\\', '}', 0, 0, 0, undef, 0, '#stay', 'String Special Character')) { return 1 } # attribute => 'String Special Character' # char => '\' # char1 => '\' # context => '#stay' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '\\', '\\', 0, 0, 0, undef, 0, '#stay', 'String Special Character')) { return 1 } # attribute => 'String' # char => '{' # char1 => '}' # context => '#stay' # type => 'RangeDetect' if ($self->testRangeDetect($text, '{', '}', 0, 0, undef, 0, '#stay', 'String')) { return 1 } # attribute => 'Operator' # char => '}' # context => '#pop#pop' # endRegion => 'String' # type => 'DetectChar' if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#pop#pop', 'Operator')) { return 1 } return 0; }; sub parsestring_4 { my ($self, $text) = @_; # type => 'DetectIdentifier' if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) { return 1 } # attribute => 'String Special Character' # char => '\' # char1 => ']' # context => '#stay' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '\\', ']', 0, 0, 0, undef, 0, '#stay', 'String Special Character')) { return 1 } # attribute => 'String Special Character' # char => '\' # char1 => '\' # context => '#stay' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '\\', '\\', 0, 0, 0, undef, 0, '#stay', 'String Special Character')) { return 1 } # attribute => 'String' # char => '[' # char1 => ']' # context => '#stay' # type => 'RangeDetect' if ($self->testRangeDetect($text, '[', ']', 0, 0, undef, 0, '#stay', 'String')) { return 1 } # attribute => 'Operator' # char => ']' # context => '#pop#pop' # endRegion => 'String' # type => 'DetectChar' if ($self->testDetectChar($text, ']', 0, 0, 0, undef, 0, '#pop#pop', 'Operator')) { return 1 } return 0; }; sub parsestring_5 { my ($self, $text) = @_; # type => 'DetectIdentifier' if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) { return 1 } # attribute => 'String Special Character' # char => '\' # char1 => '<' # context => '#stay' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '\\', '<', 0, 0, 0, undef, 0, '#stay', 'String Special Character')) { return 1 } # attribute => 'String Special Character' # char => '\' # char1 => '\' # context => '#stay' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '\\', '\\', 0, 0, 0, undef, 0, '#stay', 'String Special Character')) { return 1 } # attribute => 'String' # char => '\' # char1 => '>' # context => '#stay' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '\\', '>', 0, 0, 0, undef, 0, '#stay', 'String')) { return 1 } # attribute => 'String' # char => '<' # char1 => '>' # context => '#stay' # type => 'RangeDetect' if ($self->testRangeDetect($text, '<', '>', 0, 0, undef, 0, '#stay', 'String')) { return 1 } # attribute => 'Operator' # char => '>' # context => '#pop#pop' # endRegion => 'String' # type => 'DetectChar' if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '#pop#pop', 'Operator')) { return 1 } return 0; }; sub parsestring_6 { my ($self, $text) = @_; # type => 'DetectIdentifier' if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) { return 1 } # attribute => 'String Special Character' # char => '\' # char1 => '\' # context => '#stay' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '\\', '\\', 0, 0, 0, undef, 0, '#stay', 'String Special Character')) { return 1 } # String => '\\%1' # attribute => 'String Special Character' # context => '#stay' # dynamic => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '\\\\%1', 0, 1, 0, undef, 0, '#stay', 'String Special Character')) { return 1 } # attribute => 'Operator' # char => '1' # context => '#pop#pop' # dynamic => 'true' # endRegion => 'String' # type => 'DetectChar' if ($self->testDetectChar($text, '1', 0, 1, 0, undef, 0, '#pop#pop', 'Operator')) { return 1 } return 0; }; sub parsesub_arg_definition { my ($self, $text) = @_; # String => '*$@%' # attribute => 'Data Type' # context => '#stay' # type => 'AnyChar' if ($self->testAnyChar($text, '*$@%', 0, 0, undef, 0, '#stay', 'Data Type')) { return 1 } # String => '&\[];' # attribute => 'Normal Text' # context => '#stay' # type => 'AnyChar' if ($self->testAnyChar($text, '&\\[];', 0, 0, undef, 0, '#stay', 'Normal Text')) { return 1 } # attribute => 'Normal Text' # char => ')' # context => 'slash_safe_escape' # type => 'DetectChar' if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, 'slash_safe_escape', 'Normal Text')) { return 1 } return 0; }; sub parsesub_name_def { my ($self, $text) = @_; # String => '\w+' # attribute => 'Function' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\w+', 0, 0, 0, undef, 0, '#stay', 'Function')) { return 1 } # String => '\$\S' # attribute => 'Normal Text' # context => 'find_variable' # lookAhead => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '\\$\\S', 0, 0, 1, undef, 0, 'find_variable', 'Normal Text')) { return 1 } # String => '\s*\(' # attribute => 'Normal Text' # context => 'sub_arg_definition' # type => 'RegExpr' if ($self->testRegExpr($text, '\\s*\\(', 0, 0, 0, undef, 0, 'sub_arg_definition', 'Normal Text')) { return 1 } # attribute => 'Normal Text' # char => ':' # char1 => ':' # context => '#stay' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, ':', ':', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { return 1 } return 0; }; sub parsesubst_bracket_pattern { my ($self, $text) = @_; # String => '\s+#.*$' # attribute => 'Comment' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\s+#.*$', 0, 0, 0, undef, 0, '#stay', 'Comment')) { return 1 } # context => 'regex_pattern_internal_ip' # type => 'IncludeRules' if ($self->includeRules('regex_pattern_internal_ip', $text)) { return 1 } # attribute => 'Operator' # char => ']' # context => 'subst_bracket_replace' # endRegion => 'Pattern' # type => 'DetectChar' if ($self->testDetectChar($text, ']', 0, 0, 0, undef, 0, 'subst_bracket_replace', 'Operator')) { return 1 } return 0; }; sub parsesubst_bracket_replace { my ($self, $text) = @_; # context => 'ipstring_internal' # type => 'IncludeRules' if ($self->includeRules('ipstring_internal', $text)) { return 1 } # attribute => 'Operator' # beginRegion => 'Replacement' # char => '[' # context => '#stay' # type => 'DetectChar' if ($self->testDetectChar($text, '[', 0, 0, 0, undef, 0, '#stay', 'Operator')) { return 1 } # String => '\][cegimosx]*' # attribute => 'Operator' # context => '#pop#pop#pop' # endRegion => 'Replacement' # type => 'RegExpr' if ($self->testRegExpr($text, '\\][cegimosx]*', 0, 0, 0, undef, 0, '#pop#pop#pop', 'Operator')) { return 1 } return 0; }; sub parsesubst_curlybrace_middle { my ($self, $text) = @_; # String => '#.*$' # attribute => 'Comment' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '#.*$', 0, 0, 0, undef, 0, '#stay', 'Comment')) { return 1 } # attribute => 'Operator' # beginRegion => 'Replacement' # char => '{' # context => 'subst_curlybrace_replace' # type => 'DetectChar' if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, 'subst_curlybrace_replace', 'Operator')) { return 1 } return 0; }; sub parsesubst_curlybrace_pattern { my ($self, $text) = @_; # String => '\s+#.*$' # attribute => 'Comment' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\s+#.*$', 0, 0, 0, undef, 0, '#stay', 'Comment')) { return 1 } # context => 'regex_pattern_internal_ip' # type => 'IncludeRules' if ($self->includeRules('regex_pattern_internal_ip', $text)) { return 1 } # attribute => 'Operator' # char => '}' # context => 'subst_curlybrace_middle' # endRegion => 'Pattern' # type => 'DetectChar' if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, 'subst_curlybrace_middle', 'Operator')) { return 1 } return 0; }; sub parsesubst_curlybrace_replace { my ($self, $text) = @_; # context => 'ipstring_internal' # type => 'IncludeRules' if ($self->includeRules('ipstring_internal', $text)) { return 1 } # attribute => 'Normal Text' # beginRegion => 'Block' # char => '{' # context => 'subst_curlybrace_replace_recursive' # type => 'DetectChar' if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, 'subst_curlybrace_replace_recursive', 'Normal Text')) { return 1 } # String => '\}[cegimosx]*' # attribute => 'Operator' # context => '#pop#pop#pop#pop' # endRegion => 'Replacement' # type => 'RegExpr' if ($self->testRegExpr($text, '\\}[cegimosx]*', 0, 0, 0, undef, 0, '#pop#pop#pop#pop', 'Operator')) { return 1 } return 0; }; sub parsesubst_curlybrace_replace_recursive { my ($self, $text) = @_; # attribute => 'String (interpolated)' # beginRegion => 'Block' # char => '{' # context => 'subst_curlybrace_replace_recursive' # type => 'DetectChar' if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, 'subst_curlybrace_replace_recursive', 'String (interpolated)')) { return 1 } # attribute => 'Normal Text' # char => '}' # context => '#pop' # endRegion => 'Block' # type => 'DetectChar' if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#pop', 'Normal Text')) { return 1 } # context => 'ipstring_internal' # type => 'IncludeRules' if ($self->includeRules('ipstring_internal', $text)) { return 1 } return 0; }; sub parsesubst_paren_pattern { my ($self, $text) = @_; # String => '\s+#.*$' # attribute => 'Comment' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\s+#.*$', 0, 0, 0, undef, 0, '#stay', 'Comment')) { return 1 } # context => 'regex_pattern_internal_ip' # type => 'IncludeRules' if ($self->includeRules('regex_pattern_internal_ip', $text)) { return 1 } # attribute => 'Operator' # char => '}' # context => 'subst_paren_replace' # endRegion => 'Pattern' # type => 'DetectChar' if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, 'subst_paren_replace', 'Operator')) { return 1 } return 0; }; sub parsesubst_paren_replace { my ($self, $text) = @_; # context => 'ipstring_internal' # type => 'IncludeRules' if ($self->includeRules('ipstring_internal', $text)) { return 1 } # attribute => 'Operator' # beginRegion => 'Replacement' # char => '(' # context => '#stay' # type => 'DetectChar' if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, '#stay', 'Operator')) { return 1 } # String => '\)[cegimosx]*' # attribute => 'Operator' # context => '#pop#pop#pop' # endRegion => 'Replacement' # type => 'RegExpr' if ($self->testRegExpr($text, '\\)[cegimosx]*', 0, 0, 0, undef, 0, '#pop#pop#pop', 'Operator')) { return 1 } return 0; }; sub parsesubst_slash_pattern { my ($self, $text) = @_; # String => '\$(?=%1)' # attribute => 'Pattern Internal Operator' # context => '#stay' # dynamic => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '\\$(?=%1)', 0, 1, 0, undef, 0, '#stay', 'Pattern Internal Operator')) { return 1 } # String => '(%1)' # attribute => 'Operator' # beginRegion => 'Replacement' # context => 'subst_slash_replace' # dynamic => 'true' # endRegion => 'Pattern' # type => 'RegExpr' if ($self->testRegExpr($text, '(%1)', 0, 1, 0, undef, 0, 'subst_slash_replace', 'Operator')) { return 1 } # context => 'regex_pattern_internal_ip' # type => 'IncludeRules' if ($self->includeRules('regex_pattern_internal_ip', $text)) { return 1 } return 0; }; sub parsesubst_slash_replace { my ($self, $text) = @_; # context => 'ipstring_internal' # type => 'IncludeRules' if ($self->includeRules('ipstring_internal', $text)) { return 1 } # String => '%1[cegimosx]*' # attribute => 'Operator' # context => '#pop#pop#pop' # dynamic => 'true' # endRegion => 'Replacement' # type => 'RegExpr' if ($self->testRegExpr($text, '%1[cegimosx]*', 0, 1, 0, undef, 0, '#pop#pop#pop', 'Operator')) { return 1 } return 0; }; sub parsesubst_sq_pattern { my ($self, $text) = @_; # String => '\s+#.*$' # attribute => 'Comment' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\s+#.*$', 0, 0, 0, undef, 0, '#stay', 'Comment')) { return 1 } # context => 'regex_pattern_internal' # type => 'IncludeRules' if ($self->includeRules('regex_pattern_internal', $text)) { return 1 } # attribute => 'Operator' # beginRegion => 'Pattern' # char => ''' # context => 'subst_sq_replace' # endRegion => 'Pattern' # type => 'DetectChar' if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'subst_sq_replace', 'Operator')) { return 1 } return 0; }; sub parsesubst_sq_replace { my ($self, $text) = @_; # String => ''[cegimosx]*' # attribute => 'Operator' # context => '#pop#pop#pop' # endRegion => 'Replacement' # type => 'RegExpr' if ($self->testRegExpr($text, '\'[cegimosx]*', 0, 0, 0, undef, 0, '#pop#pop#pop', 'Operator')) { return 1 } return 0; }; sub parsetr { my ($self, $text) = @_; # String => '\([^)]*\)\s*\(?:[^)]*\)' # attribute => 'Pattern' # context => '#pop' # type => 'RegExpr' if ($self->testRegExpr($text, '\\([^)]*\\)\\s*\\(?:[^)]*\\)', 0, 0, 0, undef, 0, '#pop', 'Pattern')) { return 1 } # String => '\{[^}]*\}\s*\{[^}]*\}' # attribute => 'Pattern' # context => '#pop' # type => 'RegExpr' if ($self->testRegExpr($text, '\\{[^}]*\\}\\s*\\{[^}]*\\}', 0, 0, 0, undef, 0, '#pop', 'Pattern')) { return 1 } # String => '\[[^}]*\]\s*\[[^\]]*\]' # attribute => 'Pattern' # context => '#pop' # type => 'RegExpr' if ($self->testRegExpr($text, '\\[[^}]*\\]\\s*\\[[^\\]]*\\]', 0, 0, 0, undef, 0, '#pop', 'Pattern')) { return 1 } # String => '([^a-zA-Z0-9_\s[\]{}()]).*\1.*\1' # attribute => 'Pattern' # context => '#pop' # minimal => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '([^a-zA-Z0-9_\\s[\\]{}()]).*?\\1.*?\\1', 0, 0, 0, undef, 0, '#pop', 'Pattern')) { return 1 } return 0; }; sub parsevar_detect { my ($self, $text) = @_; # context => 'var_detect_rules' # type => 'IncludeRules' if ($self->includeRules('var_detect_rules', $text)) { return 1 } # context => 'slash_safe_escape' # type => 'IncludeRules' if ($self->includeRules('slash_safe_escape', $text)) { return 1 } return 0; }; sub parsevar_detect_rules { my ($self, $text) = @_; # String => '[\w_]+' # attribute => 'Data Type' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '[\\w_]+', 0, 0, 0, undef, 0, '#stay', 'Data Type')) { return 1 } # attribute => 'Normal Text' # char => ':' # char1 => ':' # context => '#stay' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, ':', ':', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { return 1 } # attribute => 'Operator' # char => ''' # context => '#stay' # type => 'DetectChar' if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#stay', 'Operator')) { return 1 } # attribute => 'Normal Text' # char => '-' # char1 => '>' # context => '#stay' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '-', '>', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { return 1 } # attribute => 'Normal Text' # char => '+' # char1 => '+' # context => '#stay' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '+', '+', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { return 1 } # attribute => 'Normal Text' # char => '-' # char1 => '-' # context => '#stay' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '-', '-', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { return 1 } return 0; }; sub parsevar_detect_unsafe { my ($self, $text) = @_; # context => 'var_detect_rules' # type => 'IncludeRules' if ($self->includeRules('var_detect_rules', $text)) { return 1 } return 0; }; 1; __END__ =head1 NAME Syntax::Highlight::Engine::Kate::Perl - a Plugin for Perl syntax highlighting =head1 SYNOPSIS require Syntax::Highlight::Engine::Kate::Perl; my $sh = new Syntax::Highlight::Engine::Kate::Perl([ ]); =head1 DESCRIPTION Syntax::Highlight::Engine::Kate::Perl is a plugin module that provides syntax highlighting for Perl to the Syntax::Haghlight::Engine::Kate highlighting engine. This code is generated from the syntax definition files used by the Kate project. It works quite fine, but can use refinement and optimization. It inherits Syntax::Higlight::Engine::Kate::Template. See also there. =head1 AUTHOR Hans Jeuken (haje toneel demon nl) =head1 BUGS Unknown. If you find any, please contact the author././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootlibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/Engine/Kate/Xorg_Configuration.pmlibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/Engine/Kate/Xorg_Configurat0000644000175000017500000001544412150556557033022 0ustar gregoagregoa# Copyright (c) 2005 - 2006 Hans Jeuken. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. # This file was generated from the 'xorg.xml' file of the syntax highlight # engine of the kate text editor (http://www.kate-editor.org #kate xml version 1.01 #kate author Jan Janssen (medhefgo@web.de) #generated: Sun Feb 3 22:02:06 2008, localtime package Syntax::Highlight::Engine::Kate::Xorg_Configuration; our $VERSION = '0.07'; use strict; use warnings; use base('Syntax::Highlight::Engine::Kate::Template'); sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = $class->SUPER::new(@_); $self->attributes({ 'Alert' => 'Error', 'Comment' => 'Comment', 'Float' => 'Float', 'Int' => 'DecVal', 'Keyword' => 'Keyword', 'Normal Text' => 'Normal', 'Section' => 'Function', 'Section Name' => 'String', 'Value' => 'DataType', 'Value2' => 'Others', }); $self->contextdata({ 'Comment' => { callback => \&parseComment, attribute => 'Comment', lineending => '#pop', }, 'Keyword' => { callback => \&parseKeyword, attribute => 'Keyword', lineending => '#pop', }, 'Section' => { callback => \&parseSection, attribute => 'Normal Text', }, 'Section Content' => { callback => \&parseSectionContent, attribute => 'Normal Text', }, 'xorg' => { callback => \&parsexorg, attribute => 'Normal Text', }, }); $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); $self->basecontext('xorg'); $self->keywordscase(1); $self->initialize; bless ($self, $class); return $self; } sub language { return 'x.org Configuration'; } sub parseComment { my ($self, $text) = @_; # type => 'DetectSpaces' if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { return 1 } # context => '##Alerts' # type => 'IncludeRules' if ($self->includePlugin('Alerts', $text)) { return 1 } # type => 'DetectIdentifier' if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) { return 1 } return 0; }; sub parseKeyword { my ($self, $text) = @_; # attribute => 'Value' # char => '"' # char1 => '"' # type => 'RangeDetect' if ($self->testRangeDetect($text, '"', '"', 0, 0, undef, 0, '#stay', 'Value')) { return 1 } # attribute => 'Value' # char => ''' # char1 => ''' # type => 'RangeDetect' if ($self->testRangeDetect($text, '\'', '\'', 0, 0, undef, 0, '#stay', 'Value')) { return 1 } # attribute => 'Float' # type => 'Float' if ($self->testFloat($text, 0, undef, 0, '#stay', 'Float')) { return 1 } # attribute => 'Int' # type => 'Int' if ($self->testInt($text, 0, undef, 0, '#stay', 'Int')) { return 1 } # String => '[\w\d]+' # attribute => 'Value2' # type => 'RegExpr' if ($self->testRegExpr($text, '[\\w\\d]+', 0, 0, 0, undef, 0, '#stay', 'Value2')) { return 1 } # char => '#' # context => 'Comment' # type => 'DetectChar' if ($self->testDetectChar($text, '#', 0, 0, 0, undef, 0, 'Comment', undef)) { return 1 } return 0; }; sub parseSection { my ($self, $text) = @_; # attribute => 'Section Name' # char => '"' # char1 => '"' # context => 'Section Content' # type => 'RangeDetect' if ($self->testRangeDetect($text, '"', '"', 0, 0, undef, 0, 'Section Content', 'Section Name')) { return 1 } # attribute => 'Section Name' # char => ''' # char1 => ''' # context => 'Section Content' # type => 'RangeDetect' if ($self->testRangeDetect($text, '\'', '\'', 0, 0, undef, 0, 'Section Content', 'Section Name')) { return 1 } # attribute => 'Alert' # type => 'DetectIdentifier' if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', 'Alert')) { return 1 } # char => '#' # context => 'Comment' # type => 'DetectChar' if ($self->testDetectChar($text, '#', 0, 0, 0, undef, 0, 'Comment', undef)) { return 1 } return 0; }; sub parseSectionContent { my ($self, $text) = @_; # String => 'EndSection' # attribute => 'Section' # context => '#pop#pop' # endRegion => 'Section' # insensitive => 'true' # type => 'StringDetect' if ($self->testStringDetect($text, 'EndSection', 1, 0, 0, undef, 0, '#pop#pop', 'Section')) { return 1 } # String => 'EndSubSection' # attribute => 'Section' # context => '#pop#pop' # endRegion => 'SubSection' # insensitive => 'true' # type => 'StringDetect' if ($self->testStringDetect($text, 'EndSubSection', 1, 0, 0, undef, 0, '#pop#pop', 'Section')) { return 1 } # String => 'SubSection' # attribute => 'Section' # beginRegion => 'SubSection' # context => 'Section' # insensitive => 'true' # type => 'StringDetect' if ($self->testStringDetect($text, 'SubSection', 1, 0, 0, undef, 0, 'Section', 'Section')) { return 1 } # String => '\b\w+\b' # context => 'Keyword' # type => 'RegExpr' if ($self->testRegExpr($text, '\\b\\w+\\b', 0, 0, 0, undef, 0, 'Keyword', undef)) { return 1 } # char => '#' # context => 'Comment' # type => 'DetectChar' if ($self->testDetectChar($text, '#', 0, 0, 0, undef, 0, 'Comment', undef)) { return 1 } return 0; }; sub parsexorg { my ($self, $text) = @_; # String => 'Section' # attribute => 'Section' # beginRegion => 'Section' # context => 'Section' # insensitive => 'true' # type => 'StringDetect' if ($self->testStringDetect($text, 'Section', 1, 0, 0, undef, 0, 'Section', 'Section')) { return 1 } # char => '#' # context => 'Comment' # type => 'DetectChar' if ($self->testDetectChar($text, '#', 0, 0, 0, undef, 0, 'Comment', undef)) { return 1 } return 0; }; 1; __END__ =head1 NAME Syntax::Highlight::Engine::Kate::Xorg_Configuration - a Plugin for x.org Configuration syntax highlighting =head1 SYNOPSIS require Syntax::Highlight::Engine::Kate::Xorg_Configuration; my $sh = new Syntax::Highlight::Engine::Kate::Xorg_Configuration([ ]); =head1 DESCRIPTION Syntax::Highlight::Engine::Kate::Xorg_Configuration is a plugin module that provides syntax highlighting for x.org Configuration to the Syntax::Haghlight::Engine::Kate highlighting engine. This code is generated from the syntax definition files used by the Kate project. It works quite fine, but can use refinement and optimization. It inherits Syntax::Higlight::Engine::Kate::Template. See also there. =head1 AUTHOR Hans Jeuken (haje toneel demon nl) =head1 BUGS Unknown. If you find any, please contact the authorlibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/Engine/Kate/Euphoria.pm0000644000175000017500000003113012150556557032077 0ustar gregoagregoa# Copyright (c) 2005 - 2006 Hans Jeuken. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. # This file was generated from the 'euphoria.xml' file of the syntax highlight # engine of the kate text editor (http://www.kate-editor.org #kate xml version 2.08 #kate version 2.4 #kate author Irv Mullins (irvm@ellijay.com) #generated: Sun Feb 3 22:02:04 2008, localtime package Syntax::Highlight::Engine::Kate::Euphoria; our $VERSION = '0.07'; use strict; use warnings; use base('Syntax::Highlight::Engine::Kate::Template'); sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = $class->SUPER::new(@_); $self->attributes({ 'Comment' => 'Comment', 'Directive' => 'Others', 'GtkKeyword' => 'Keyword', 'Keyword' => 'Keyword', 'Normal Text' => 'Normal', 'Number' => 'DecVal', 'Region Marker' => 'RegionMarker', 'String' => 'String', 'Type' => 'DataType', }); $self->listAdd('GtkKeywords', 'Error', 'FALSE', 'Info', 'NULL', 'Question', 'TRUE', 'Warn', 'YesNo', 'addto', 'adjustment', 'alignment', 'append_page', 'appendto', 'arrow', 'aspect_frame', 'button', 'calendar', 'cell_renderer_text', 'cell_renderer_toggle', 'check', 'check_menu_item', 'checkbutton', 'choice', 'color_selection', 'combo', 'connect', 'deallocate_strings', 'draw_arc', 'draw_image', 'draw_line', 'draw_line', 'draw_point', 'draw_polygon', 'draw_rectangle', 'drawingarea', 'end_submenu', 'entry', 'euget', 'event_box', 'file_selection', 'flatten', 'font', 'font_selection_dialog', 'frame', 'g_list', 'g_list_to_sequence', 'get', 'getImage', 'getSize', 'hbox', 'hbuttonbox', 'hpaned', 'hscale', 'hscrollbar', 'hseparator', 'idle_add', 'image', 'image_menu_item', 'init', 'label', 'limit', 'list_store', 'list_view', 'list_view_column', 'main', 'mark_day', 'menu', 'menu_item', 'menubar', 'mouse_button', 'new_gc', 'new_group', 'new_menu_group', 'notebook', 'option', 'option_menu', 'pack', 'path', 'pop', 'progress_bar', 'push', 'quit', 'radio', 'radio_menu_item', 'radiobutton', 'rc_parse', 'run', 'scrolled_window', 'separator_menu_item', 'seq_to_str', 'set', 'setProperty', 'set_submenu', 'setfg', 'show', 'spinbutton', 'statusbar', 'str', 'table', 'textbox', 'timer', 'togglebutton', 'toolbar', 'tooltip', 'tree_store', 'tree_view', 'tree_view_column', 'vbox', 'vbuttonbox', 'vpaned', 'vscale', 'vscrollbar', 'vseparator', 'when', 'window', ); $self->listAdd('constants', 'GET_SUCCESS', 'PI', ); $self->listAdd('keywords', '?', 'abort', 'allocate', 'allocate_string', 'allow_break', 'and', 'and_bits', 'append', 'arccos', 'arcsin', 'arctan', 'as', 'atom_to_float32', 'atom_to_float64', 'begin', 'bits_to_int', 'bytes_to_int', 'c_func', 'c_proc', 'call', 'call_back', 'call_func', 'call_proc', 'chdir', 'check_break', 'clear_screen', 'close', 'command_line', 'compare', 'cos', 'crash_file', 'crash_message', 'current_dir', 'custom_sort', 'date', 'define_c_func', 'define_c_proc', 'define_c_var', 'dir', 'display_text_image', 'do', 'else', 'elsif', 'end', 'equal', 'exit', 'find', 'float32_to_atom', 'float64_to_atom', 'floor', 'flush', 'for', 'free', 'free_console', 'function', 'get_bytes', 'get_key', 'get_mouse', 'get_position', 'get_screen_char', 'getc', 'getenv', 'gets', 'if', 'include', 'int_to_bits', 'int_to_bytes', 'length', 'lock_file', 'log', 'lower', 'machine_func', 'machine_proc', 'match', 'mem_copy', 'mem_set', 'mouse_events', 'mouse_pointer', 'not', 'not_bits', 'of', 'open', 'open_dll', 'or', 'or_bits', 'peek', 'peek4', 'peek4s', 'peek4u', 'platform', 'poke', 'poke4', 'position', 'power', 'prepend', 'print', 'printf', 'procedure', 'profile', 'prompt_number', 'prompt_string', 'put_screen_char', 'puts', 'rand', 'read_bitmap', 'register_block', 'remainder', 'repeat', 'return', 'reverse', 'routine_id', 'save_bitmap', 'save_text_image', 'scroll', 'seek', 'set_rand', 'sin', 'sleep', 'sort', 'sprint', 'sprintf', 'sqrt', 'system', 'system_exec', 'tan', 'text_color', 'then', 'time', 'to', 'trace', 'type', 'unlock_file', 'unregister_block', 'upper', 'value', 'video_config', 'wait_key', 'walk_dir', 'where', 'while', 'wildcard_file', 'wildcard_match', 'with', 'without', 'wrap', 'xor', 'xor_bits', ); $self->listAdd('types', 'atom', 'constant', 'global', 'integer', 'object', 'sequence', 'type', ); $self->contextdata({ 'Comment' => { callback => \&parseComment, attribute => 'Comment', lineending => '#pop', }, 'Normal' => { callback => \&parseNormal, attribute => 'Normal Text', }, 'String' => { callback => \&parseString, attribute => 'String', lineending => '#pop', }, }); $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); $self->basecontext('Normal'); $self->keywordscase(0); $self->initialize; bless ($self, $class); return $self; } sub language { return 'Euphoria'; } sub parseComment { my ($self, $text) = @_; # context => '##Alerts' # type => 'IncludeRules' if ($self->includePlugin('Alerts', $text)) { return 1 } return 0; }; sub parseNormal { my ($self, $text) = @_; # String => '\bend\s+for\b' # attribute => 'Keyword' # context => '#stay' # endRegion => 'regFor' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bend\\s+for\\b', 0, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '\bfor\b' # attribute => 'Keyword' # beginRegion => 'regFor' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bfor\\b', 0, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '\bend\s+if\b' # attribute => 'Keyword' # context => '#stay' # endRegion => 'regIf' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bend\\s+if\\b', 0, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '\bif\b' # attribute => 'Keyword' # beginRegion => 'regIf' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bif\\b', 0, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '\bend\s+function\b' # attribute => 'Keyword' # context => '#stay' # endRegion => 'regFunction' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bend\\s+function\\b', 0, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '\bfunction\b' # attribute => 'Keyword' # beginRegion => 'regFunction' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bfunction\\b', 0, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '\bend\s+procedure\b' # attribute => 'Keyword' # context => '#stay' # endRegion => 'regProcedure' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bend\\s+procedure\\b', 0, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '\bprocedure\b' # attribute => 'Keyword' # beginRegion => 'regProcedure' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bprocedure\\b', 0, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '\bend\s+while\b' # attribute => 'Keyword' # context => '#stay' # endRegion => 'regWhile' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bend\\s+while\\b', 0, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '\bwhile\b' # attribute => 'Keyword' # beginRegion => 'regWhile' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bwhile\\b', 0, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '\bend\s+type\b' # attribute => 'Keyword' # context => '#stay' # endRegion => 'regType' # type => 'RegExpr' if ($self->testRegExpr($text, '\\bend\\s+type\\b', 0, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '\btype\b' # attribute => 'Keyword' # beginRegion => 'regType' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\btype\\b', 0, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'keywords' # attribute => 'Keyword' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'GtkKeywords' # attribute => 'GtkKeyword' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'GtkKeywords', 0, undef, 0, '#stay', 'GtkKeyword')) { return 1 } # String => 'types' # attribute => 'Type' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'types', 0, undef, 0, '#stay', 'Type')) { return 1 } # attribute => 'Number' # context => '#stay' # type => 'Float' if ($self->testFloat($text, 0, undef, 0, '#stay', 'Number')) { return 1 } # attribute => 'Number' # context => '#stay' # type => 'Int' if ($self->testInt($text, 0, undef, 0, '#stay', 'Number')) { return 1 } # attribute => 'String' # char => '"' # context => 'String' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) { return 1 } # String => '--\s*BEGIN.*' # attribute => 'Region Marker' # beginRegion => 'regMarker' # context => '#stay' # firstNonSpace => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '--\\s*BEGIN.*', 0, 0, 0, undef, 1, '#stay', 'Region Marker')) { return 1 } # String => '--\s*END.*' # attribute => 'Region Marker' # context => '#stay' # endRegion => 'regMarker' # firstNonSpace => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '--\\s*END.*', 0, 0, 0, undef, 1, '#stay', 'Region Marker')) { return 1 } # attribute => 'Comment' # char => '-' # char1 => '-' # context => 'Comment' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '-', '-', 0, 0, 0, undef, 0, 'Comment', 'Comment')) { return 1 } return 0; }; sub parseString { my ($self, $text) = @_; # attribute => 'String' # char => '"' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) { return 1 } return 0; }; 1; __END__ =head1 NAME Syntax::Highlight::Engine::Kate::Euphoria - a Plugin for Euphoria syntax highlighting =head1 SYNOPSIS require Syntax::Highlight::Engine::Kate::Euphoria; my $sh = new Syntax::Highlight::Engine::Kate::Euphoria([ ]); =head1 DESCRIPTION Syntax::Highlight::Engine::Kate::Euphoria is a plugin module that provides syntax highlighting for Euphoria to the Syntax::Haghlight::Engine::Kate highlighting engine. This code is generated from the syntax definition files used by the Kate project. It works quite fine, but can use refinement and optimization. It inherits Syntax::Higlight::Engine::Kate::Template. See also there. =head1 AUTHOR Hans Jeuken (haje toneel demon nl) =head1 BUGS Unknown. If you find any, please contact the authorlibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/Engine/Kate/Spice.pm0000644000175000017500000001024412150556557031371 0ustar gregoagregoa# Copyright (c) 2005 - 2006 Hans Jeuken. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. # This file was generated from the 'spice.xml' file of the syntax highlight # engine of the kate text editor (http://www.kate-editor.org #kate xml version 1.01 #kate version 2.3 #kate author Steven Robson (s.a.robson@sms.ed.ac.uk) and Anders Lund #generated: Sun Feb 3 22:02:06 2008, localtime package Syntax::Highlight::Engine::Kate::Spice; our $VERSION = '0.07'; use strict; use warnings; use base('Syntax::Highlight::Engine::Kate::Template'); sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = $class->SUPER::new(@_); $self->attributes({ 'Comment' => 'Comment', 'Keyword' => 'Keyword', 'Normal Text' => 'Normal', 'Number' => 'DecVal', 'String' => 'String', 'String Char' => 'Char', }); $self->contextdata({ 'Commentar 1' => { callback => \&parseCommentar1, attribute => 'Comment', lineending => '#pop', }, 'Normal' => { callback => \&parseNormal, attribute => 'Normal Text', }, 'String' => { callback => \&parseString, attribute => 'String', lineending => '#pop', }, }); $self->deliminators('\\s||\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\|\\.'); $self->basecontext('Normal'); $self->keywordscase(0); $self->initialize; bless ($self, $class); return $self; } sub language { return 'Spice'; } sub parseCommentar1 { my ($self, $text) = @_; return 0; }; sub parseNormal { my ($self, $text) = @_; # String => '\B\.\w+' # attribute => 'Keyword' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\B\\.\\w+', 0, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # attribute => 'Number' # context => '#stay' # type => 'Int' if ($self->testInt($text, 0, undef, 0, '#stay', 'Number')) { return 1 } # attribute => 'Number' # context => '#stay' # type => 'Float' if ($self->testFloat($text, 0, undef, 0, '#stay', 'Number')) { return 1 } # String => '$*' # attribute => 'Comment' # context => 'Commentar 1' # type => 'AnyChar' if ($self->testAnyChar($text, '$*', 0, 0, undef, 0, 'Commentar 1', 'Comment')) { return 1 } # attribute => 'String' # char => '"' # context => 'String' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) { return 1 } # attribute => 'String' # char => ''' # context => 'String' # type => 'DetectChar' if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'String', 'String')) { return 1 } return 0; }; sub parseString { my ($self, $text) = @_; # attribute => 'String' # context => '#stay' # type => 'LineContinue' if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'String')) { return 1 } # attribute => 'String Char' # context => '#stay' # type => 'HlCStringChar' if ($self->testHlCStringChar($text, 0, undef, 0, '#stay', 'String Char')) { return 1 } # attribute => 'String' # char => ''' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop', 'String')) { return 1 } return 0; }; 1; __END__ =head1 NAME Syntax::Highlight::Engine::Kate::Spice - a Plugin for Spice syntax highlighting =head1 SYNOPSIS require Syntax::Highlight::Engine::Kate::Spice; my $sh = new Syntax::Highlight::Engine::Kate::Spice([ ]); =head1 DESCRIPTION Syntax::Highlight::Engine::Kate::Spice is a plugin module that provides syntax highlighting for Spice to the Syntax::Haghlight::Engine::Kate highlighting engine. This code is generated from the syntax definition files used by the Kate project. It works quite fine, but can use refinement and optimization. It inherits Syntax::Higlight::Engine::Kate::Template. See also there. =head1 AUTHOR Hans Jeuken (haje toneel demon nl) =head1 BUGS Unknown. If you find any, please contact the authorlibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/Engine/Kate/Pike.pm0000644000175000017500000003043212150556557031217 0ustar gregoagregoa# Copyright (c) 2005 - 2006 Hans Jeuken. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. # This file was generated from the 'pike.xml' file of the syntax highlight # engine of the kate text editor (http://www.kate-editor.org #kate xml version 1.07 #kate version 2.4 #kate author Paul Pogonyshev #generated: Sun Feb 3 22:02:06 2008, localtime package Syntax::Highlight::Engine::Kate::Pike; our $VERSION = '0.07'; use strict; use warnings; use base('Syntax::Highlight::Engine::Kate::Template'); sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = $class->SUPER::new(@_); $self->attributes({ 'Binary' => 'BaseN', 'Builtin Function' => 'Function', 'Char' => 'Char', 'Comment' => 'Comment', 'Data Type' => 'DataType', 'Decimal' => 'DecVal', 'Float' => 'Float', 'Hex' => 'BaseN', 'Keyword' => 'Keyword', 'Normal Text' => 'Normal', 'Note' => 'Alert', 'Octal' => 'BaseN', 'Preprocessor' => 'Others', 'Preprocessor Lib' => 'String', 'String' => 'String', 'String Char' => 'Char', }); $self->listAdd('builtins', 'catch', 'gauge', 'sscanf', 'typeof', ); $self->listAdd('keywords', 'break', 'case', 'class', 'continue', 'default', 'do', 'else', 'for', 'foreach', 'if', 'return', 'switch', 'while', ); $self->listAdd('types', 'array', 'float', 'function', 'int', 'mapping', 'mixed', 'multiset>', 'object', 'program', 'static', 'string', 'void', ); $self->contextdata({ 'Block Comment' => { callback => \&parseBlockComment, attribute => 'Comment', }, 'Line Comment' => { callback => \&parseLineComment, attribute => 'Comment', lineending => '#pop', }, 'Normal' => { callback => \&parseNormal, attribute => 'Normal Text', }, 'Outscoped' => { callback => \&parseOutscoped, attribute => 'Comment', }, 'Outscoped intern' => { callback => \&parseOutscopedintern, attribute => 'Comment', }, 'Preprocessor' => { callback => \&parsePreprocessor, attribute => 'Preprocessor', lineending => '#pop', }, 'String' => { callback => \&parseString, attribute => 'String', lineending => '#pop', }, }); $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); $self->basecontext('Normal'); $self->keywordscase(0); $self->initialize; bless ($self, $class); return $self; } sub language { return 'Pike'; } sub parseBlockComment { my ($self, $text) = @_; # attribute => 'Comment' # char => '*' # char1 => '/' # context => '#pop' # endRegion => 'Comment' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop', 'Comment')) { return 1 } # String => '(FIXME|TODO|NOT(IC)?E):?' # attribute => 'Note' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '(FIXME|TODO|NOT(IC)?E):?', 0, 0, 0, undef, 0, '#stay', 'Note')) { return 1 } return 0; }; sub parseLineComment { my ($self, $text) = @_; # String => '(FIXME|TODO|NOT(IC)?E):?' # attribute => 'Note' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '(FIXME|TODO|NOT(IC)?E):?', 0, 0, 0, undef, 0, '#stay', 'Note')) { return 1 } return 0; }; sub parseNormal { my ($self, $text) = @_; # String => 'keywords' # attribute => 'Keyword' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'types' # attribute => 'Data Type' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'types', 0, undef, 0, '#stay', 'Data Type')) { return 1 } # String => 'builtins' # attribute => 'Builtin Function' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'builtins', 0, undef, 0, '#stay', 'Builtin Function')) { return 1 } # String => '`([\+\-\*/%~&\|^]|[!=<>]=|<>?|(\[\]|->)=?)' # attribute => 'Builtin Function' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '`([\\+\\-\\*/%~&\\|^]|[!=<>]=|<>?|(\\[\\]|->)=?)', 0, 0, 0, undef, 0, '#stay', 'Builtin Function')) { return 1 } # attribute => 'Float' # context => '#stay' # type => 'Float' if ($self->testFloat($text, 0, undef, 0, '#stay', 'Float')) { return 1 } # String => '0[bB][01]+' # attribute => 'Binary' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '0[bB][01]+', 0, 0, 0, undef, 0, '#stay', 'Binary')) { return 1 } # attribute => 'Octal' # context => '#stay' # type => 'HlCOct' if ($self->testHlCOct($text, 0, undef, 0, '#stay', 'Octal')) { return 1 } # attribute => 'Hex' # context => '#stay' # type => 'HlCHex' if ($self->testHlCHex($text, 0, undef, 0, '#stay', 'Hex')) { return 1 } # attribute => 'Decimal' # context => '#stay' # type => 'Int' if ($self->testInt($text, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # attribute => 'Char' # context => '#stay' # type => 'HlCChar' if ($self->testHlCChar($text, 0, undef, 0, '#stay', 'Char')) { return 1 } # attribute => 'Normal Text' # beginRegion => 'Brace' # char => '{' # context => '#stay' # type => 'DetectChar' if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { return 1 } # attribute => 'Normal Text' # char => '}' # context => '#stay' # endRegion => 'Brace' # type => 'DetectChar' if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) { return 1 } # attribute => 'String' # char => '"' # context => 'String' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) { return 1 } # attribute => 'Comment' # char => '/' # char1 => '/' # context => 'Line Comment' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'Line Comment', 'Comment')) { return 1 } # attribute => 'Comment' # char => '#' # char1 => '!' # context => 'Line Comment' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '#', '!', 0, 0, 0, undef, 0, 'Line Comment', 'Comment')) { return 1 } # attribute => 'Comment' # beginRegion => 'Comment' # char => '/' # char1 => '*' # context => 'Block Comment' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'Block Comment', 'Comment')) { return 1 } # String => '#\s*if\s+0' # attribute => 'Preprocessor' # beginRegion => 'Outscoped' # context => 'Outscoped' # firstNonSpace => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '#\\s*if\\s+0', 0, 0, 0, undef, 1, 'Outscoped', 'Preprocessor')) { return 1 } # attribute => 'Preprocessor' # char => '#' # context => 'Preprocessor' # firstNonSpace => 'true' # type => 'DetectChar' if ($self->testDetectChar($text, '#', 0, 0, 0, undef, 1, 'Preprocessor', 'Preprocessor')) { return 1 } return 0; }; sub parseOutscoped { my ($self, $text) = @_; # String => '(FIXME|TODO|NOT(IC)?E):?' # attribute => 'Note' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '(FIXME|TODO|NOT(IC)?E):?', 0, 0, 0, undef, 0, '#stay', 'Note')) { return 1 } # attribute => 'Comment' # beginRegion => 'Comment' # char => '/' # char1 => '*' # context => 'Block Comment' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'Block Comment', 'Comment')) { return 1 } # String => '#\s*if' # attribute => 'Comment' # beginRegion => 'Outscoped' # context => 'Outscoped intern' # firstNonSpace => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '#\\s*if', 0, 0, 0, undef, 1, 'Outscoped intern', 'Comment')) { return 1 } # String => '#\s*(endif|elif|else)' # attribute => 'Preprocessor' # context => '#pop' # endRegion => 'Outscoped' # firstNonSpace => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '#\\s*(endif|elif|else)', 0, 0, 0, undef, 1, '#pop', 'Preprocessor')) { return 1 } return 0; }; sub parseOutscopedintern { my ($self, $text) = @_; # attribute => 'Comment' # beginRegion => 'Comment' # char => '/' # char1 => '*' # context => 'Block Comment' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'Block Comment', 'Comment')) { return 1 } # String => '#\s*if' # attribute => 'Comment' # beginRegion => 'Outscoped' # context => 'Outscoped intern' # firstNonSpace => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '#\\s*if', 0, 0, 0, undef, 1, 'Outscoped intern', 'Comment')) { return 1 } # String => '#\s*endif' # attribute => 'Comment' # context => '#pop' # endRegion => 'Outscoped' # firstNonSpace => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '#\\s*endif', 0, 0, 0, undef, 1, '#pop', 'Comment')) { return 1 } return 0; }; sub parsePreprocessor { my ($self, $text) = @_; # attribute => 'Preprocessor Lib' # char => '"' # char1 => '"' # context => '#stay' # type => 'RangeDetect' if ($self->testRangeDetect($text, '"', '"', 0, 0, undef, 0, '#stay', 'Preprocessor Lib')) { return 1 } # attribute => 'Preprocessor Lib' # char => '<' # char1 => '>' # context => '#stay' # type => 'RangeDetect' if ($self->testRangeDetect($text, '<', '>', 0, 0, undef, 0, '#stay', 'Preprocessor Lib')) { return 1 } # attribute => 'Comment' # char => '/' # char1 => '/' # context => 'Line Comment' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'Line Comment', 'Comment')) { return 1 } # attribute => 'Comment' # char => '/' # char1 => '*' # context => 'Block Comment' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'Block Comment', 'Comment')) { return 1 } # attribute => 'Preprocessor' # context => '#stay' # type => 'LineContinue' if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'Preprocessor')) { return 1 } return 0; }; sub parseString { my ($self, $text) = @_; # String => '\\d[0-9]+' # attribute => 'String Char' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\\\d[0-9]+', 0, 0, 0, undef, 0, '#stay', 'String Char')) { return 1 } # attribute => 'String Char' # context => '#stay' # type => 'HlCStringChar' if ($self->testHlCStringChar($text, 0, undef, 0, '#stay', 'String Char')) { return 1 } # attribute => 'String' # char => '"' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) { return 1 } # attribute => 'String' # context => '#stay' # type => 'LineContinue' if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'String')) { return 1 } return 0; }; 1; __END__ =head1 NAME Syntax::Highlight::Engine::Kate::Pike - a Plugin for Pike syntax highlighting =head1 SYNOPSIS require Syntax::Highlight::Engine::Kate::Pike; my $sh = new Syntax::Highlight::Engine::Kate::Pike([ ]); =head1 DESCRIPTION Syntax::Highlight::Engine::Kate::Pike is a plugin module that provides syntax highlighting for Pike to the Syntax::Haghlight::Engine::Kate highlighting engine. This code is generated from the syntax definition files used by the Kate project. It works quite fine, but can use refinement and optimization. It inherits Syntax::Higlight::Engine::Kate::Template. See also there. =head1 AUTHOR Hans Jeuken (haje toneel demon nl) =head1 BUGS Unknown. If you find any, please contact the authorlibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/Engine/Kate/Scilab.pm0000644000175000017500000005632212150556557031532 0ustar gregoagregoa# Copyright (c) 2005 - 2006 Hans Jeuken. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. # This file was generated from the 'sci.xml' file of the syntax highlight # engine of the kate text editor (http://www.kate-editor.org #kate xml version 1.03 #kate version 2.3 #generated: Sun Feb 3 22:02:06 2008, localtime package Syntax::Highlight::Engine::Kate::Scilab; our $VERSION = '0.07'; use strict; use warnings; use base('Syntax::Highlight::Engine::Kate::Template'); sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = $class->SUPER::new(@_); $self->attributes({ 'Comment' => 'Comment', 'Constants-keyword' => 'Variable', 'Control-keywords' => 'Operator', 'Decimal' => 'DecVal', 'Float' => 'Float', 'Function-keywords' => 'Function', 'Normal Text' => 'Normal', 'String' => 'String', 'Structure-keywords' => 'Keyword', 'Warning-keywords' => 'Others', 'functions' => 'Function', }); $self->listAdd('Constants-keyword', '$', '%F', '%T', '%e', '%eps', '%f', '%i', '%inf', '%io', '%nan', '%pi', '%s', '%t', '%z', 'MSDOS', ); $self->listAdd('Control-keywords', 'abort', 'break', 'pause', 'quit', 'resume', 'return', ); $self->listAdd('Function-keywords', 'endfunction', 'function', ); $self->listAdd('Structure-keywords', 'do', 'else', 'elseif', 'end', 'for', 'if', 'select', 'then', 'while', ); $self->listAdd('Warning-keywords', 'error', 'warning', ); $self->listAdd('functions', '%asn', '%helps', '%k', '%sn', 'ABSBLK_f', 'AFFICH_f', 'ANDLOG_f', 'ANIMXY_f', 'AdCommunications', 'BIGSOM_f', 'CLINDUMMY_f', 'CLKINV_f', 'CLKIN_f', 'CLKOUTV_f', 'CLKOUT_f', 'CLKSOMV_f', 'CLKSOM_f', 'CLKSPLIT_f', 'CLOCK_f', 'CLR_f', 'CLSS_f', 'CONST_f', 'COSBLK_f', 'CURV_f', 'Communications', 'CreateLink', 'DELAYV_f', 'DELAY_f', 'DEMUX_f', 'DLRADAPT_f', 'DLR_f', 'DLSS_f', 'DestroyLink', 'EVENTSCOPE_f', 'EVTDLY_f', 'EVTGEN_f', 'EXPBLK_f', 'Example', 'ExecAppli', 'ExecScilab', 'ExeclScilab', 'GAINBLK_f', 'GAIN_f', 'GENERAL_f', 'GENERIC_f', 'GENSIN_f', 'GENSQR_f', 'G_make', 'GetMsg', 'Graphics', 'HALT_f', 'IFTHEL_f', 'INTEGRAL_f', 'INTRP2BLK_f', 'INTRPLBLK_f', 'INVBLK_f', 'IN_f', 'LOGBLK_f', 'LOOKUP_f', 'MAX_f', 'MCLOCK_f', 'MFCLCK_f', 'MIN_f', 'MUX_f', 'Matplot', 'Matplot1', 'NEGTOPOS_f', 'OUT_f', 'POSTONEG_f', 'POWBLK_f', 'PROD_f', 'QUANT_f', 'RAND_f', 'READC_f', 'REGISTER_f', 'RELAY_f', 'RFILE_f', 'SAMPLEHOLD_f', 'SAT_f', 'SAWTOOTH_f', 'SCOPE_f', 'SCOPXY_f', 'SELECT_f', 'SINBLK_f', 'SOM_f', 'SPLIT_f', 'STOP_f', 'SUPER_f', 'ScilabEval', 'SendMsg', 'Sfgrayplot', 'Sgrayplot', 'TANBLK_f', 'TCLSS_f', 'TEXT_f', 'TIME_f', 'TK_EvalFile', 'TK_EvalStr', 'TK_GetVar', 'TK_SetVar', 'TRASH_f', 'WFILE_f', 'WRITEC_f', 'WaitMsg', 'ZCROSS_f', 'abcd', 'abinv', 'abs', 'acos', 'acosh', 'acoshm', 'acosm', 'add_edge', 'add_node', 'addcolor', 'addf', 'addinter', 'addmenu', 'adj2sp', 'adj_lists', 'aff2ab', 'alufunctions', 'amell', 'analpf', 'analyze', 'and', 'ans', 'apropos', 'arc_graph', 'arc_number', 'argn', 'arhnk', 'arl2', 'arma', 'arma2p', 'armac', 'armax', 'armax1', 'arsimul', 'artest', 'articul', 'ascii', 'asin', 'asinh', 'asinhm', 'asinm', 'atan', 'atanh', 'atanhm', 'atanm', 'augment', 'auread', 'auwrite', 'backslash', 'balanc', 'balreal', 'bandwr', 'bdiag', 'besseli', 'besselj', 'besselk', 'bessely', 'best_match', 'bezout', 'bifish', 'bilin', 'binomial', 'black', 'bloc2exp', 'bloc2ss', 'bode', 'bool2s', 'boolean', 'boucle', 'bstap', 'buttmag', 'bvode', 'c_link', 'cainv', 'calerf', 'calfrq', 'call', 'canon', 'casc', 'ccontrg', 'cdfbet', 'cdfbin', 'cdfchi', 'cdfchn', 'cdff', 'cdffnc', 'cdfgam', 'cdfnbn', 'cdfnor', 'cdfpoi', 'cdft', 'ceil', 'cepstrum', 'chain_struct', 'chaintest', 'champ', 'champ1', 'chart', 'chdir', 'cheb1mag', 'cheb2mag', 'check_graph', 'chepol', 'chfact', 'chol', 'chsolve', 'circuit', 'classmarkov', 'clean', 'clear', 'clearfun', 'clearglobal', 'close', 'cls2dls', 'cmb_lin', 'cmndred', 'code2str', 'coeff', 'coff', 'coffg', 'colcomp', 'colcompr', 'colinout', 'colnew', 'colon', 'colormap', 'colregul', 'comp', 'companion', 'con_nodes', 'cond', 'conj', 'connex', 'cont_frm', 'cont_mat', 'contour', 'contour2d', 'contour2di', 'contourf', 'contr', 'contract_edge', 'contrss', 'convex_hull', 'convol', 'convstr', 'copfac', 'corr', 'cos', 'cosh', 'coshm', 'cosm', 'cotg', 'coth', 'cothm', 'csim', 'cspect', 'ctr_gram', 'cumprod', 'cumsum', 'curblock', 'cycle_basis', 'czt', 'dasrt', 'dassl', 'datafit', 'date', 'dbphi', 'dcf', 'ddp', 'debug', 'dec2hex', 'deff', 'degree', 'delbpt', 'delete_arcs', 'delete_nodes', 'delip', 'delmenu', 'demos', 'denom', 'derivat', 'derivative-', 'des2ss', 'des2tf', 'det', 'determ', 'detr', 'dft', 'dhnorm', 'diag', 'diary', 'diophant', 'disp', 'dispbpt', 'dispfile', 'dlgamma', 'dot', 'double', 'dragrect', 'drawaxis', 'driver', 'dscr', 'dsimul', 'dt_ility', 'dtsi', 'edge_number', 'edit', 'edit_curv', 'eigenmarkov', 'ell1mag', 'empty', 'emptystr', 'eqfir', 'eqiir', 'equal', 'equil', 'equil1', 'ereduc', 'erf', 'erfc', 'erfcx', 'errbar', 'errcatch', 'errclear', 'error', 'eval', 'eval3d', 'eval3dp', 'evans', 'evstr', 'excel2sci', 'exec', 'execstr', 'exists', 'exit', 'exp', 'expm', 'external', 'extraction', 'eye', 'fac3d', 'factors', 'faurre', 'fchamp', 'fcontour', 'fcontour2d', 'fec', 'feedback', 'feval', 'ffilt', 'fft', 'fgrayplot', 'figure', 'file', 'fileinfo', 'filter', 'find', 'find_freq', 'find_path', 'findm', 'findobj', 'fit_dat', 'fix', 'floor', 'flts', 'format', 'formatman', 'fort', 'fourplan', 'fplot2d', 'fplot3d', 'fplot3d1', 'fprintf', 'fprintfMat', 'frep2tf', 'freq', 'freson', 'frexp', 'frfit', 'frmag', 'fscanf', 'fscanfMat', 'fsfirlin', 'fsolve', 'fspecg', 'fstabst', 'fstair', 'full', 'fullrf', 'fullrfk', 'fun2string', 'funcprot', 'funptr', 'fusee', 'g_margin', 'gainplot', 'gamitg', 'gamma', 'gammaln', 'gcare', 'gcd', 'gcf', 'gen_net', 'genfac3d', 'genlib', 'genmarkov', 'geom3d', 'get', 'get_function_path', 'getblocklabel', 'getcolor', 'getcwd', 'getd', 'getdate', 'getenv', 'getf', 'getfield', 'getfont', 'getio', 'getlinestyle', 'getmark', 'getpid', 'getscicosvars', 'getsymbol', 'getvalue', 'getversion', 'gfare', 'gfrancis', 'girth', 'givens', 'glever', 'glist', 'global', 'gpeche', 'gr_menu', 'graduate', 'grand', 'graph-list', 'graph_2_mat', 'graph_center', 'graph_complement', 'graph_diameter', 'graph_power', 'graph_simp', 'graph_sum', 'graph_union', 'graycolormap', 'grayplot', 'graypolarplot', 'grep', 'group', 'gschur', 'gsort', 'gspec', 'gstacksize', 'gtild', 'h2norm', 'h_cl', 'h_inf', 'h_inf_st', 'h_norm', 'halt', 'hamilton', 'hank', 'hankelsv', 'hat', 'havewindow', 'help', 'hermit', 'hess', 'hex2dec', 'hilb', 'hist3d', 'histplot', 'horner', 'host', 'hotcolormap', 'householder', 'hrmt', 'htrianr', 'hypermat', 'hypermatrices', 'iconvert', 'ieee', 'iir', 'iirgroup', 'iirlp', 'ilib_build', 'ilib_compile', 'ilib_for_link', 'ilib_gen_Make', 'ilib_gen_gateway', 'ilib_gen_loader', 'im_inv', 'imag', 'impl', 'imrep2ss', 'input', 'insertion', 'int', 'int16', 'int2d', 'int32', 'int3d', 'int8', 'intc', 'intdec', 'integrate', 'interp', 'interpln', 'intersci', 'intersect', 'intg', 'intl', 'intppty', 'intsplin', 'inttrap', 'inttype', 'inv', 'inv_coeff', 'invr', 'invsyslin', 'is_connex', 'isdef', 'iserror', 'isglobal', 'isinf', 'isnan', 'isoview', 'isreal', 'jmat', 'kalm', 'karmarkar', 'kernel', 'keyboard', 'knapsack', 'kpure', 'krac2', 'kron', 'kroneck', 'lasterror', 'lattn', 'lattp', 'lcf', 'lcm', 'lcmdiag', 'ldiv', 'ldivf', 'leastsq', 'left', 'legends', 'length', 'leqr', 'less', 'lev', 'levin', 'lex_sort', 'lft', 'lgfft', 'lib', 'lin', 'lin2mu', 'lindquist', 'line_graph', 'lines', 'linf', 'linfn', 'link', 'linpro', 'linsolve', 'linspace', 'list', 'lmisolver', 'lmitool', 'load', 'load_graph', 'loadwave', 'locate', 'log', 'log10', 'log2', 'logm', 'logspace', 'lotest', 'lqe', 'lqg', 'lqg2stan', 'lqg_ltr', 'lqr', 'lsslist', 'lstcat', 'ltitr', 'lu', 'ludel', 'lufact', 'luget', 'lusolve', 'lyap', 'm_circle', 'macglov', 'macr2lst', 'macro', 'macrovar', 'make_graph', 'man', 'manedit', 'mapsound', 'markp2ss', 'mat_2_graph', 'matrices', 'matrix', 'max', 'max_cap_path', 'max_clique', 'max_flow', 'maxi', 'mclearerr', 'mclose', 'mean', 'median', 'meof', 'mese', 'mesh2d', 'metanet', 'metanet_sync', 'mfft', 'mfile2sci', 'mfprintf', 'mfscanf', 'mget', 'mgeti', 'mgetl', 'mgetstr', 'milk_drop', 'min', 'min_lcost_cflow', 'min_lcost_flow1', 'min_lcost_flow2', 'min_qcost_flow', 'min_weight_tree', 'mine', 'mini', 'minreal', 'minss', 'minus', 'mlist', 'mode', 'modulo', 'mopen', 'mprintf', 'mps2linpro', 'mput', 'mputl', 'mputstr', 'mrfit', 'mscanf', 'mseek', 'msprintf', 'msscanf', 'mtell', 'mtlb_load', 'mtlb_mode', 'mtlb_save', 'mtlb_sparse', 'mu2lin', 'mulf', 'names', 'narsimul', 'nehari', 'neighbors', 'netclose', 'netwindow', 'netwindows', 'newest', 'newfun', 'nf3d', 'nlev', 'nnz', 'node_number', 'nodes_2_path', 'nodes_degrees', 'noisegen', 'norm', 'not', 'null', 'numer', 'nyquist', 'obs_gram', 'obscont', 'obscont1', 'observer', 'obsv_mat', 'obsvss', 'ode', 'ode_discrete', 'ode_root', 'odedc', 'odedi', 'odeoptions', 'oldload', 'oldsave', 'ones', 'optim', 'or', 'orth', 'overloading', 'p_margin', 'param3d', 'param3d1', 'paramfplot2d', 'parents', 'parrot', 'part', 'path_2_nodes', 'pbig', 'pdiv', 'pen2ea', 'pencan', 'penlaur', 'percent', 'perfect_match', 'pertrans', 'pfss', 'phasemag', 'phc', 'pinv', 'pipe_network', 'playsnd', 'plot', 'plot2d', 'plot2d1', 'plot2d2', 'plot2d3', 'plot2d4', 'plot3d', 'plot3d1', 'plot3d2', 'plot3d3', 'plot_graph', 'plotframe', 'plotprofile', 'plus', 'plzr', 'pmodulo', 'pol2des', 'pol2str', 'pol2tex', 'polar', 'polarplot', 'polfact', 'poly', 'portr3d', 'portrait', 'power', 'ppol', 'prbs_a', 'predecessors', 'predef', 'print', 'printf', 'printf_conversion', 'printing', 'prod', 'profile', 'proj', 'projsl', 'projspec', 'psmall', 'pspect', 'pvm', 'pvm_addhosts', 'pvm_bcast', 'pvm_bufinfo', 'pvm_config', 'pvm_delhosts', 'pvm_error', 'pvm_exit', 'pvm_get_timer', 'pvm_getinst', 'pvm_gsize', 'pvm_halt', 'pvm_joingroup', 'pvm_kill', 'pvm_lvgroup', 'pvm_mytid', 'pvm_probe', 'pvm_recv', 'pvm_reduce', 'pvm_sci2f77', 'pvm_send', 'pvm_set_timer', 'pvm_spawn', 'pvm_spawn_independent', 'pvm_start', 'pvm_tidtohost', 'pvmd3', 'pwd', 'qassign', 'qr', 'quapro', 'quaskro', 'quit', 'quote', 'rand', 'randpencil', 'range', 'rank', 'rat', 'rational', 'rcond', 'rdivf', 'read', 'read4b', 'readb', 'readc_', 'readmps', 'real', 'recur', 'reglin', 'remez', 'remezb', 'repfreq', 'replot', 'residu', 'ric_desc', 'ricc', 'riccati', 'rlist', 'roots', 'rotate', 'round', 'routh_t', 'rowcomp', 'rowcompr', 'rowinout', 'rowregul', 'rowshuff', 'rpem', 'rref', 'rtitr', 'salesman', 'save', 'save_graph', 'savewave', 'scaling', 'scanf', 'scanf_conversion', 'schur', 'sci2exp', 'sci2for', 'sci2map', 'sciargs', 'scicos', 'scicos_block', 'scicos_cpr', 'scicos_graphics', 'scicos_link', 'scicos_main', 'scicos_menus', 'scicos_model', 'scicosim', 'scifunc_block', 'scilab', 'scilink', 'sd2sci', 'secto3d', 'semi', 'semicolumn', 'semidef', 'sensi', 'set', 'setbpt', 'setfield', 'setmenu', 'setscicosvars', 'sfact', 'sgrid', 'shortest_path', 'show_arcs', 'show_graph', 'show_nodes', 'showprofile', 'sign', 'signm', 'simp', 'simp_mode', 'sin', 'sinc', 'sincd', 'sinh', 'sinhm', 'sinm', 'size', 'slash', 'sm2des', 'sm2ss', 'smooth', 'solve', 'sort', 'sound', 'sp2adj', 'spaninter', 'spanplus', 'spantwo', 'sparse', 'spchol', 'spcompack', 'spec', 'specfact', 'speye', 'spget', 'splin', 'split_edge', 'spones', 'sprand', 'sprintf', 'spzeros', 'sqroot', 'sqrt', 'sqrtm', 'square', 'squarewave', 'srfaur', 'srkf', 'ss2des', 'ss2ss', 'ss2tf', 'sscanf', 'sskf', 'ssprint', 'ssrand', 'st_deviation', 'st_ility', 'stabil', 'stacksize', 'standard_define', 'standard_draw', 'standard_input', 'standard_origin', 'standard_output', 'star', 'startup', 'str2code', 'strcat', 'strindex', 'string', 'strings', 'stripblanks', 'strong_con_nodes', 'strong_connex', 'strsubst', 'subf', 'subgraph', 'subplot', 'successors', 'sum', 'supernode', 'sva', 'svd', 'svplot', 'sylm', 'sylv', 'symbols', 'sysconv', 'sysdiag', 'sysfact-', 'syslin', 'syssize', 'system', 'systems', 'systmat', 'tan', 'tangent', 'tanh', 'tanhm', 'tanm', 'tdinit', 'testmatrix', 'texprint', 'tf2des', 'tf2ss', 'tilda', 'time_id', 'timer', 'titlepage', 'tlist', 'toeplitz', 'trace', 'trans', 'trans_closure', 'translatepaths', 'trfmod', 'trianfml', 'tril', 'trisolve', 'triu', 'trzeros', 'type', 'typename', 'typeof', 'ui_observer', 'uicontrol', 'uimenu', 'uint16', 'uint32', 'uint8', 'ulink', 'union', 'unique', 'unix', 'unix_g', 'unix_s', 'unix_w', 'unix_x', 'unobs', 'unsetmenu', 'user', 'varargin', 'varargout', 'varn', 'warning', 'wavread', 'wavwrite', 'wfir', 'what', 'where', 'whereami', 'whereis', 'who', 'whos', 'wiener', 'wigner', 'window', 'winsid', 'writb', 'write', 'write4b', 'x_choices', 'x_choose', 'x_dialog', 'x_matrix', 'x_mdialog', 'x_message', 'x_message_modeless', 'xarc', 'xarcs', 'xarrows', 'xaxis', 'xbasc', 'xbasimp', 'xbasr', 'xchange', 'xclea', 'xclear', 'xclick', 'xclip', 'xdel', 'xend', 'xfarc', 'xfarcs', 'xfpoly', 'xfpolys', 'xfrect', 'xget', 'xgetech', 'xgetfile', 'xgetmouse', 'xgraduate', 'xgrid', 'xinfo', 'xinit', 'xlfont', 'xload', 'xname', 'xnumb', 'xpause', 'xpoly', 'xpolys', 'xrect', 'xrects', 'xrpoly', 'xs2fig', 'xsave', 'xsegs', 'xselect', 'xset', 'xsetech', 'xsetm', 'xstring', 'xstringb', 'xstringl', 'xtape', 'xtitle', 'yulewalk', 'zeropen', 'zeros', 'zgrid', 'zpbutt', 'zpch1', 'zpch2', 'zpell', ); $self->contextdata({ 'main' => { callback => \&parsemain, attribute => 'Normal Text', }, }); $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\|\\%|\\$'); $self->basecontext('main'); $self->keywordscase(0); $self->initialize; bless ($self, $class); return $self; } sub language { return 'scilab'; } sub parsemain { my ($self, $text) = @_; # String => 'Structure-keywords' # attribute => 'Structure-keywords' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'Structure-keywords', 0, undef, 0, '#stay', 'Structure-keywords')) { return 1 } # String => 'Control-keywords' # attribute => 'Control-keywords' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'Control-keywords', 0, undef, 0, '#stay', 'Control-keywords')) { return 1 } # String => 'Function-keywords' # attribute => 'Function-keywords' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'Function-keywords', 0, undef, 0, '#stay', 'Function-keywords')) { return 1 } # String => 'Warning-keywords' # attribute => 'Warning-keywords' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'Warning-keywords', 0, undef, 0, '#stay', 'Warning-keywords')) { return 1 } # String => 'Constants-keyword' # attribute => 'Constants-keyword' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'Constants-keyword', 0, undef, 0, '#stay', 'Constants-keyword')) { return 1 } # String => 'functions' # attribute => 'functions' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'functions', 0, undef, 0, '#stay', 'functions')) { return 1 } # attribute => 'Float' # context => '#stay' # type => 'Float' if ($self->testFloat($text, 0, undef, 0, '#stay', 'Float')) { return 1 } # attribute => 'Decimal' # context => '#stay' # type => 'Int' if ($self->testInt($text, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => '//.*$' # attribute => 'Comment' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '//.*$', 0, 0, 0, undef, 0, '#stay', 'Comment')) { return 1 } # attribute => 'String' # char => '"' # char1 => '"' # context => '#stay' # type => 'RangeDetect' if ($self->testRangeDetect($text, '"', '"', 0, 0, undef, 0, '#stay', 'String')) { return 1 } return 0; }; 1; __END__ =head1 NAME Syntax::Highlight::Engine::Kate::Scilab - a Plugin for scilab syntax highlighting =head1 SYNOPSIS require Syntax::Highlight::Engine::Kate::Scilab; my $sh = new Syntax::Highlight::Engine::Kate::Scilab([ ]); =head1 DESCRIPTION Syntax::Highlight::Engine::Kate::Scilab is a plugin module that provides syntax highlighting for scilab to the Syntax::Haghlight::Engine::Kate highlighting engine. This code is generated from the syntax definition files used by the Kate project. It works quite fine, but can use refinement and optimization. It inherits Syntax::Higlight::Engine::Kate::Template. See also there. =head1 AUTHOR Hans Jeuken (haje toneel demon nl) =head1 BUGS Unknown. If you find any, please contact the authorlibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/Engine/Kate/Yacas.pm0000644000175000017500000002211512150556557031366 0ustar gregoagregoa# Copyright (c) 2005 - 2006 Hans Jeuken. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. # This file was generated from the 'yacas.xml' file of the syntax highlight # engine of the kate text editor (http://www.kate-editor.org #kate xml version 1.02 #kate version 2.3 #generated: Sun Feb 3 22:02:06 2008, localtime package Syntax::Highlight::Engine::Kate::Yacas; our $VERSION = '0.07'; use strict; use warnings; use base('Syntax::Highlight::Engine::Kate::Template'); sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = $class->SUPER::new(@_); $self->attributes({ 'Char' => 'Char', 'Comment' => 'Comment', 'Decimal' => 'DecVal', 'Float' => 'Float', 'Highlight' => 'Alert', 'Keyword' => 'Keyword', 'Normal Text' => 'Normal', 'Parens' => 'Normal', 'String' => 'String', 'Symbol' => 'Others', }); $self->listAdd('keywords', '=', 'And', 'ApplyPure', 'ArrayCreate', 'ArrayGet', 'ArraySet', 'ArraySize', 'Atom', 'Berlekamp', 'BitAnd', 'BitOr', 'BitXor', 'Bodied', 'CTokenizer', 'Check', 'Clear', 'CommonLispTokenizer', 'Concat', 'ConcatStrings', 'CurrentFile', 'CurrentLine', 'CustomEval', 'CustomEval\\\'Expression', 'CustomEval\\\'Locals', 'CustomEval\\\'Result', 'CustomEval\\\'Stop', 'DefLoad', 'DefLoadFunction', 'DefMacroRuleBase', 'DefMacroRuleBaseListed', 'DefaultDirectory', 'DefaultTokenizer', 'Delete', 'DestructiveDelete', 'DestructiveInsert', 'DestructiveReplace', 'DestructiveReverse', 'DllEnumerate', 'DllLoad', 'DllUnload', 'Equals', 'Eval', 'FastArcCos', 'FastArcSin', 'FastArcTan', 'FastAssoc', 'FastCos', 'FastExp', 'FastIsPrime', 'FastLog', 'FastPower', 'FastSin', 'FastTan', 'FindFile', 'FindFunction', 'FlatCopy', 'FromBase', 'FromFile', 'FromString', 'FullForm', 'GarbageCollect', 'GenericTypeName', 'GetExtraInfo', 'GetPrecision', 'GreaterThan', 'Head', 'Hold', 'HoldArg', 'If', 'Infix', 'Insert', 'IsAtom', 'IsBodied', 'IsBound', 'IsFunction', 'IsGeneric', 'IsInfix', 'IsInteger', 'IsList', 'IsNumber', 'IsPostfix', 'IsPrefix', 'IsString', 'LazyGlobal', 'LeftPrecedence', 'Length', 'LessThan', 'LispRead', 'LispReadListed', 'List', 'Listify', 'Load', 'Local', 'LocalSymbols', 'MacroClear', 'MacroLocal', 'MacroRule', 'MacroRuleBase', 'MacroRuleBaseListed', 'MacroRulePattern', 'MacroSet', 'MathAbs', 'MathAdd', 'MathAnd', 'MathArcCos', 'MathArcSin', 'MathArcTan', 'MathCeil', 'MathCos', 'MathDiv', 'MathDivide', 'MathExp', 'MathFac', 'MathFloor', 'MathGcd', 'MathGetExactBits', 'MathLibrary', 'MathLog', 'MathMod', 'MathMultiply', 'MathNot', 'MathNth', 'MathOr', 'MathPi', 'MathPower', 'MathSetExactBits', 'MathSin', 'MathSqrt', 'MathSubtract', 'MathTan', 'MaxEvalDepth', 'Not', 'OpLeftPrecedence', 'OpPrecedence', 'OpRightPrecedence', 'Or', 'PatchLoad', 'PatchString', 'PatternCreate', 'PatternMatches', 'Postfix', 'Precision', 'Prefix', 'PrettyPrinter', 'Prog', 'Read', 'ReadToken', 'Replace', 'Retract', 'RightAssociative', 'RightPrecedence', 'Rule', 'RuleBase', 'RuleBaseArgList', 'RuleBaseDefined', 'RuleBaseListed', 'RulePattern', 'Secure', 'Set', 'SetExtraInfo', 'SetStringMid', 'ShiftLeft', 'ShiftRight', 'String', 'StringMid', 'Subst', 'SystemCall', 'Tail', 'ToBase', 'ToFile', 'ToString', 'TraceRule', 'TraceStack', 'Type', 'UnFence', 'UnList', 'Use', 'Version', 'While', 'Write', 'WriteString', 'XmlExplodeTag', 'XmlTokenizer', '`', ); $self->contextdata({ 'default' => { callback => \&parsedefault, attribute => 'Normal Text', }, 'linecomment' => { callback => \&parselinecomment, attribute => 'Comment', lineending => '#pop', }, 'multilinecomment' => { callback => \&parsemultilinecomment, attribute => 'Comment', }, 'string' => { callback => \&parsestring, attribute => 'String', lineending => '#pop', }, }); $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\|=|`'); $self->basecontext('default'); $self->keywordscase(0); $self->initialize; bless ($self, $class); return $self; } sub language { return 'yacas'; } sub parsedefault { my ($self, $text) = @_; # attribute => 'String' # char => '"' # context => 'string' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'string', 'String')) { return 1 } # attribute => 'Comment' # char => '/' # char1 => '/' # context => 'linecomment' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'linecomment', 'Comment')) { return 1 } # attribute => 'Comment' # char => '/' # char1 => '*' # context => 'multilinecomment' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'multilinecomment', 'Comment')) { return 1 } # String => 'keywords' # attribute => 'Keyword' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => '{[(' # attribute => 'Parens' # beginRegion => 'brace' # context => '#stay' # type => 'AnyChar' if ($self->testAnyChar($text, '{[(', 0, 0, undef, 0, '#stay', 'Parens')) { return 1 } # String => '}])' # attribute => 'Parens' # context => '#stay' # endRegion => 'brace' # type => 'AnyChar' if ($self->testAnyChar($text, '}])', 0, 0, undef, 0, '#stay', 'Parens')) { return 1 } # String => '+-*/=`~:!@#$^&*_|<>' # attribute => 'Symbol' # context => '#stay' # type => 'AnyChar' if ($self->testAnyChar($text, '+-*/=`~:!@#$^&*_|<>', 0, 0, undef, 0, '#stay', 'Symbol')) { return 1 } # attribute => 'Float' # context => '#stay' # type => 'Float' if ($self->testFloat($text, 0, undef, 0, '#stay', 'Float')) { return 1 } # attribute => 'Decimal' # context => '#stay' # type => 'Int' if ($self->testInt($text, 0, undef, 0, '#stay', 'Decimal')) { return 1 } return 0; }; sub parselinecomment { my ($self, $text) = @_; # String => '(FIXME|TODO)' # attribute => 'Highlight' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '(FIXME|TODO)', 0, 0, 0, undef, 0, '#stay', 'Highlight')) { return 1 } return 0; }; sub parsemultilinecomment { my ($self, $text) = @_; # attribute => 'Comment' # char => '*' # char1 => '/' # context => '#pop' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop', 'Comment')) { return 1 } # String => '(FIXME|TODO)' # attribute => 'Highlight' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '(FIXME|TODO)', 0, 0, 0, undef, 0, '#stay', 'Highlight')) { return 1 } return 0; }; sub parsestring { my ($self, $text) = @_; # attribute => 'String' # context => '#stay' # type => 'LineContinue' if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'String')) { return 1 } # attribute => 'String' # char => '"' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) { return 1 } return 0; }; 1; __END__ =head1 NAME Syntax::Highlight::Engine::Kate::Yacas - a Plugin for yacas syntax highlighting =head1 SYNOPSIS require Syntax::Highlight::Engine::Kate::Yacas; my $sh = new Syntax::Highlight::Engine::Kate::Yacas([ ]); =head1 DESCRIPTION Syntax::Highlight::Engine::Kate::Yacas is a plugin module that provides syntax highlighting for yacas to the Syntax::Haghlight::Engine::Kate highlighting engine. This code is generated from the syntax definition files used by the Kate project. It works quite fine, but can use refinement and optimization. It inherits Syntax::Higlight::Engine::Kate::Template. See also there. =head1 AUTHOR Hans Jeuken (haje toneel demon nl) =head1 BUGS Unknown. If you find any, please contact the authorlibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/Engine/Kate/Tcl_Tk.pm0000644000175000017500000003354512150556557031517 0ustar gregoagregoa# Copyright (c) 2005 - 2006 Hans Jeuken. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. # This file was generated from the 'tcl.xml' file of the syntax highlight # engine of the kate text editor (http://www.kate-editor.org #kate xml version 1.08 #kate version 2.4 #generated: Sun Feb 3 22:02:06 2008, localtime package Syntax::Highlight::Engine::Kate::Tcl_Tk; our $VERSION = '0.07'; use strict; use warnings; use base('Syntax::Highlight::Engine::Kate::Template'); sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = $class->SUPER::new(@_); $self->attributes({ 'Char' => 'Char', 'Comment' => 'Comment', 'Decimal' => 'DecVal', 'Float' => 'Float', 'Keyword' => 'Keyword', 'Normal Text' => 'Normal', 'Parameter' => 'Others', 'Region Marker' => 'RegionMarker', 'String' => 'String', 'Variable' => 'DataType', }); $self->listAdd('keywords', 'AppleScript', 'OptProc', 'after', 'append', 'argc', 'argv', 'array', 'auto_execk', 'auto_load', 'auto_mkindex', 'auto_path', 'auto_reset', 'beep', 'bell', 'bgerror', 'binary', 'bind', 'bindtags', 'break', 'button', 'canvas', 'case', 'catch', 'cd', 'checkbutton', 'clipboard', 'clock', 'close', 'concat', 'console', 'continue', 'dde', 'destroy', 'else', 'elseif', 'encoding', 'entry', 'env', 'eof', 'error', 'errorCode', 'errorInfo', 'eval', 'event', 'exec', 'exit', 'expr', 'fblocked', 'fconfigure', 'fcopy', 'file', 'fileevent', 'flush', 'focus', 'font', 'for', 'foreach', 'format', 'frame', 'gets', 'glob', 'global', 'grab', 'grid', 'history', 'if', 'image', 'incr', 'info', 'interp', 'join', 'label', 'lappend', 'lindex', 'linsert', 'list', 'listbox', 'llength', 'load', 'lower', 'lrange', 'lreplace', 'lsearch', 'lsort', 'menu', 'menubutton', 'message', 'namespace', 'open', 'option', 'pack', 'package', 'parray', 'pid', 'pkg_mkindex', 'place', 'proc', 'puts', 'pwd', 'radiobutton', 'raise', 'read', 'regexp', 'registry', 'regsub', 'rename', 'resource', 'return', 'scale', 'scan', 'scrollbar', 'seek', 'selection', 'send', 'set', 'socket', 'source', 'split', 'string', 'subst', 'switch', 'tclLog', 'tcl_endOfWord', 'tcl_findLibrary', 'tcl_library', 'tcl_patchLevel', 'tcl_platform', 'tcl_precision', 'tcl_rcFileName', 'tcl_rcRsrcName', 'tcl_startOfNextWord', 'tcl_startOfPreviousWord', 'tcl_traceCompile', 'tcl_traceExec', 'tcl_version', 'tcl_wordBreakAfter', 'tcl_wordBreakBefore', 'tell', 'text', 'time', 'tk', 'tkTabToWindow', 'tk_chooseColor', 'tk_chooseDirectory', 'tk_focusFollowMouse', 'tk_focusNext', 'tk_focusPrev', 'tk_getOpenFile', 'tk_getSaveFile', 'tk_library', 'tk_messageBox', 'tk_optionMenu', 'tk_patchLevel', 'tk_popup', 'tk_strictMotif', 'tk_version', 'tkwait', 'toplevel', 'trace', 'unknown', 'unset', 'update', 'uplevel', 'upvar', 'variable', 'vwait', 'while', 'winfo', 'wm', ); $self->listAdd('keywords-opt', 'activate', 'actual', 'add', 'addtag', 'append', 'appname', 'args', 'aspect', 'atime', 'atom', 'atomname', 'attributes', 'bbox', 'bind', 'body', 'broadcast', 'bytelength', 'cancel', 'canvasx', 'canvasy', 'caret', 'cells', 'cget', 'channels', 'children', 'class', 'clear', 'clicks', 'client', 'clone', 'cmdcount', 'colormapfull', 'colormapwindows', 'command', 'commands', 'compare', 'complete', 'configure', 'containing', 'convertfrom', 'convertto', 'coords', 'copy', 'create', 'current', 'curselection', 'dchars', 'debug', 'default', 'deiconify', 'delete', 'delta', 'depth', 'deselect', 'dirname', 'dlineinfo', 'dtag', 'dump', 'edit', 'entrycget', 'entryconfigure', 'equal', 'executable', 'exists', 'extension', 'families', 'find', 'first', 'flash', 'focus', 'focusmodel', 'forget', 'format', 'fpixels', 'fraction', 'frame', 'functions', 'generate', 'geometry', 'get', 'gettags', 'globals', 'grid', 'group', 'handle', 'height', 'hide', 'hostname', 'iconbitmap', 'iconify', 'iconmask', 'iconname', 'iconposition', 'iconwindow', 'icursor', 'id', 'identify', 'idle', 'ifneeded', 'image', 'index', 'info', 'insert', 'interps', 'inuse', 'invoke', 'is', 'isdirectory', 'isfile', 'ismapped', 'itemcget', 'itemconfigure', 'join', 'keys', 'last', 'length', 'level', 'library', 'link', 'loaded', 'locals', 'lower', 'lstat', 'manager', 'map', 'mark', 'match', 'maxsize', 'measure', 'metrics', 'minsize', 'mkdir', 'move', 'mtime', 'name', 'nameofexecutable', 'names', 'nativename', 'nearest', 'normalize', 'number', 'overrideredirect', 'own', 'owned', 'panecget', 'paneconfigure', 'panes', 'parent', 'patchlevel', 'pathname', 'pathtype', 'pixels', 'pointerx', 'pointerxy', 'pointery', 'positionfrom', 'post', 'postcascade', 'postscript', 'present', 'procs', 'protocol', 'provide', 'proxy', 'raise', 'range', 'readable', 'readlink', 'release', 'remove', 'rename', 'repeat', 'replace', 'reqheight', 'require', 'reqwidth', 'resizable', 'rgb', 'rootname', 'rootx', 'rooty', 'scale', 'scaling', 'scan', 'screen', 'screencells', 'screendepth', 'screenheight', 'screenmmheight', 'screenmmwidth', 'screenvisual', 'screenwidth', 'script', 'search', 'seconds', 'see', 'select', 'selection', 'separator', 'server', 'set', 'sharedlibextension', 'show', 'size', 'sizefrom', 'split', 'stackorder', 'stat', 'state', 'status', 'system', 'tag', 'tail', 'tclversion', 'title', 'tolower', 'toplevel', 'totitle', 'toupper', 'transient', 'trim', 'trimleft', 'trimright', 'type', 'types', 'unknown', 'unpost', 'useinputmethods', 'validate', 'values', 'variable', 'vars', 'vcompare', 'vdelete', 'versions', 'viewable', 'vinfo', 'visual', 'visualid', 'visualsavailable', 'volumes', 'vrootheight', 'vrootwidth', 'vrootx', 'vrooty', 'vsatisfies', 'width', 'window', 'windowingsystem', 'withdraw', 'wordend', 'wordstart', 'writable', 'x', 'xview', 'y', ); $self->contextdata({ 'Base' => { callback => \&parseBase, attribute => 'Normal Text', }, 'String' => { callback => \&parseString, attribute => 'String', }, }); $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); $self->basecontext('Base'); $self->keywordscase(0); $self->initialize; bless ($self, $class); return $self; } sub language { return 'Tcl/Tk'; } sub parseBase { my ($self, $text) = @_; # String => '#\s*BEGIN.*$' # attribute => 'Region Marker' # beginRegion => 'region' # context => '#stay' # firstNonSpace => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '#\\s*BEGIN.*$', 0, 0, 0, undef, 1, '#stay', 'Region Marker')) { return 1 } # String => '#\s*END.*$' # attribute => 'Region Marker' # context => '#stay' # endRegion => 'region' # firstNonSpace => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '#\\s*END.*$', 0, 0, 0, undef, 1, '#stay', 'Region Marker')) { return 1 } # String => 'keywords' # attribute => 'Keyword' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'keywords-opt' # attribute => 'Parameter' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'keywords-opt', 0, undef, 0, '#stay', 'Parameter')) { return 1 } # attribute => 'Float' # context => '#stay' # type => 'Float' if ($self->testFloat($text, 0, undef, 0, '#stay', 'Float')) { return 1 } # attribute => 'Decimal' # context => '#stay' # type => 'Int' if ($self->testInt($text, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => '\\.' # attribute => 'Char' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\\\.', 0, 0, 0, undef, 0, '#stay', 'Char')) { return 1 } # String => '\W-\w+' # attribute => 'Parameter' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\W-\\w+', 0, 0, 0, undef, 0, '#stay', 'Parameter')) { return 1 } # String => '\$\{[^\}]+\}' # attribute => 'Variable' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\$\\{[^\\}]+\\}', 0, 0, 0, undef, 0, '#stay', 'Variable')) { return 1 } # String => '\$(::)?[\S\D]\w+' # attribute => 'Variable' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\$(::)?[\\S\\D]\\w+', 0, 0, 0, undef, 0, '#stay', 'Variable')) { return 1 } # String => '[^\\]""' # attribute => 'String' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '[^\\\\]""', 0, 0, 0, undef, 0, '#stay', 'String')) { return 1 } # String => '[^\\]"' # attribute => 'String' # context => 'String' # type => 'RegExpr' if ($self->testRegExpr($text, '[^\\\\]"', 0, 0, 0, undef, 0, 'String', 'String')) { return 1 } # String => '#.*$' # attribute => 'Comment' # context => '#stay' # firstNonSpace => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '#.*$', 0, 0, 0, undef, 1, '#stay', 'Comment')) { return 1 } # String => ';\s*#.*$' # attribute => 'Comment' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, ';\\s*#.*$', 0, 0, 0, undef, 0, '#stay', 'Comment')) { return 1 } # attribute => 'Keyword' # beginRegion => 'block' # char => '{' # context => '#stay' # type => 'DetectChar' if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # attribute => 'Keyword' # char => '}' # context => '#stay' # endRegion => 'block' # type => 'DetectChar' if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # attribute => 'Keyword' # char => '[' # context => '#stay' # type => 'DetectChar' if ($self->testDetectChar($text, '[', 0, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } # attribute => 'Keyword' # char => ']' # context => '#stay' # type => 'DetectChar' if ($self->testDetectChar($text, ']', 0, 0, 0, undef, 0, '#stay', 'Keyword')) { return 1 } return 0; }; sub parseString { my ($self, $text) = @_; # String => '\\.' # attribute => 'Char' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\\\\.', 0, 0, 0, undef, 0, '#stay', 'Char')) { return 1 } # attribute => 'String' # char => '"' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) { return 1 } # attribute => 'Variable' # char => '$' # context => '#stay' # type => 'DetectChar' if ($self->testDetectChar($text, '$', 0, 0, 0, undef, 0, '#stay', 'Variable')) { return 1 } return 0; }; 1; __END__ =head1 NAME Syntax::Highlight::Engine::Kate::Tcl_Tk - a Plugin for Tcl/Tk syntax highlighting =head1 SYNOPSIS require Syntax::Highlight::Engine::Kate::Tcl_Tk; my $sh = new Syntax::Highlight::Engine::Kate::Tcl_Tk([ ]); =head1 DESCRIPTION Syntax::Highlight::Engine::Kate::Tcl_Tk is a plugin module that provides syntax highlighting for Tcl/Tk to the Syntax::Haghlight::Engine::Kate highlighting engine. This code is generated from the syntax definition files used by the Kate project. It works quite fine, but can use refinement and optimization. It inherits Syntax::Higlight::Engine::Kate::Template. See also there. =head1 AUTHOR Hans Jeuken (haje toneel demon nl) =head1 BUGS Unknown. If you find any, please contact the authorlibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/Engine/Kate/Modulaminus2.pm0000644000175000017500000001736112150556557032714 0ustar gregoagregoa# Copyright (c) 2005 - 2006 Hans Jeuken. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. # This file was generated from the 'modula-2.xml' file of the syntax highlight # engine of the kate text editor (http://www.kate-editor.org #kate xml version 1.03 #kate version 2.1 #generated: Sun Feb 3 22:02:05 2008, localtime package Syntax::Highlight::Engine::Kate::Modulaminus2; our $VERSION = '0.07'; use strict; use warnings; use base('Syntax::Highlight::Engine::Kate::Template'); sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = $class->SUPER::new(@_); $self->attributes({ 'Comment' => 'Comment', 'Directive' => 'Others', 'Keyword' => 'Keyword', 'Normal Text' => 'Normal', 'Number' => 'DecVal', 'String' => 'String', 'Type' => 'DataType', }); $self->listAdd('directives', 'ALLOCATE', 'ASSEMBLER', 'Accessible', 'Append', 'Assign', 'CAPS', 'Close', 'Concat', 'Copy', 'DEALLOCATE', 'Delete', 'Done', 'EOF', 'EmptyString', 'Erase', 'GetArgs', 'GetCard', 'GetChar', 'GetEnv', 'GetInt', 'GetLongReal', 'GetReal', 'GetString', 'Insert', 'Length', 'Open', 'OpenInput', 'OpenOutput', 'PutBf', 'PutCard', 'PutChar', 'PutInt', 'PutLn', 'PutLongReal', 'PutReal', 'PutString', 'Read', 'ReadCard', 'ReadInt', 'ReadLongReal', 'ReadReal', 'ReadString', 'ResetClock', 'SIZE', 'StrEq', 'SystemTime', 'UserTime', 'Write', 'WriteBf', 'WriteCard', 'WriteInt', 'WriteLn', 'WriteLongReal', 'WriteReal', 'WriteString', 'compare', 'pos', ); $self->listAdd('keywords', 'ABS', 'AND', 'ARRAY', 'ASM', 'BEGIN', 'BITSET', 'BY', 'CAP', 'CASE', 'CHR', 'CONST', 'DEC', 'DEFINITION', 'DIV', 'DO', 'ELSE', 'ELSIF', 'END', 'EXCL', 'EXIT', 'EXPORT', 'FALSE', 'FOR', 'FOREIGN', 'FROM', 'HALT', 'HIGH', 'IF', 'IMPLEMENTATION', 'IMPORT', 'IN', 'INC', 'INCL', 'IOTRANSFER', 'LOOP', 'MAX', 'MIN', 'MOD', 'MODULE', 'NEWPROCESS', 'NIL', 'NOT', 'ODD', 'OF', 'OR', 'ORD', 'PROC', 'PROCEDURE', 'QUALIFIED', 'RECORD', 'REPEAT', 'RETURN', 'SET', 'THEN', 'TO', 'TRANSFER', 'TRUE', 'TRUNC', 'TYPE', 'UNTIL', 'VAL', 'VAR', 'WHILE', 'WITH', ); $self->listAdd('types', 'ADDRESS', 'ADR', 'BOOLEAN', 'CARDINAL', 'CHAR', 'File', 'INTEGER', 'LONGINT', 'LONGREAL', 'POINTER', 'REAL', 'SHORTCARD', 'SHORTINT', ); $self->contextdata({ 'Comment2' => { callback => \&parseComment2, attribute => 'Comment', }, 'Comment3' => { callback => \&parseComment3, attribute => 'Comment', lineending => '#pop', }, 'Normal' => { callback => \&parseNormal, attribute => 'Normal Text', }, 'Prep1' => { callback => \&parsePrep1, attribute => 'Directive', }, 'String1' => { callback => \&parseString1, attribute => 'String', lineending => '#pop', }, 'String2' => { callback => \&parseString2, attribute => 'String', lineending => '#pop', }, }); $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); $self->basecontext('Normal'); $self->keywordscase(0); $self->initialize; bless ($self, $class); return $self; } sub language { return 'Modula-2'; } sub parseComment2 { my ($self, $text) = @_; # attribute => 'Comment' # char => '*' # char1 => ')' # context => '#pop' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '*', ')', 0, 0, 0, undef, 0, '#pop', 'Comment')) { return 1 } return 0; }; sub parseComment3 { my ($self, $text) = @_; return 0; }; sub parseNormal { my ($self, $text) = @_; # String => 'keywords' # attribute => 'Keyword' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'directives' # attribute => 'Directive' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'directives', 0, undef, 0, '#stay', 'Directive')) { return 1 } # String => 'types' # attribute => 'Type' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'types', 0, undef, 0, '#stay', 'Type')) { return 1 } # attribute => 'Number' # context => '#stay' # type => 'Float' if ($self->testFloat($text, 0, undef, 0, '#stay', 'Number')) { return 1 } # attribute => 'Number' # context => '#stay' # type => 'Int' if ($self->testInt($text, 0, undef, 0, '#stay', 'Number')) { return 1 } # attribute => 'String' # char => '"' # context => 'String1' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String1', 'String')) { return 1 } # attribute => 'String' # char => ''' # context => 'String2' # type => 'DetectChar' if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'String2', 'String')) { return 1 } # String => '(*$' # attribute => 'Directive' # context => 'Prep1' # type => 'StringDetect' if ($self->testStringDetect($text, '(*$', 0, 0, 0, undef, 0, 'Prep1', 'Directive')) { return 1 } # attribute => 'Comment' # char => '(' # char1 => '*' # context => 'Comment2' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '(', '*', 0, 0, 0, undef, 0, 'Comment2', 'Comment')) { return 1 } return 0; }; sub parsePrep1 { my ($self, $text) = @_; # String => '$*)' # attribute => 'Directive' # context => 'Prep1' # type => 'StringDetect' if ($self->testStringDetect($text, '$*)', 0, 0, 0, undef, 0, 'Prep1', 'Directive')) { return 1 } return 0; }; sub parseString1 { my ($self, $text) = @_; # attribute => 'String' # char => '"' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) { return 1 } return 0; }; sub parseString2 { my ($self, $text) = @_; # attribute => 'String' # char => ''' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop', 'String')) { return 1 } return 0; }; 1; __END__ =head1 NAME Syntax::Highlight::Engine::Kate::Modulaminus2 - a Plugin for Modula-2 syntax highlighting =head1 SYNOPSIS require Syntax::Highlight::Engine::Kate::Modulaminus2; my $sh = new Syntax::Highlight::Engine::Kate::Modulaminus2([ ]); =head1 DESCRIPTION Syntax::Highlight::Engine::Kate::Modulaminus2 is a plugin module that provides syntax highlighting for Modula-2 to the Syntax::Haghlight::Engine::Kate highlighting engine. This code is generated from the syntax definition files used by the Kate project. It works quite fine, but can use refinement and optimization. It inherits Syntax::Higlight::Engine::Kate::Template. See also there. =head1 AUTHOR Hans Jeuken (haje toneel demon nl) =head1 BUGS Unknown. If you find any, please contact the authorlibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/Engine/Kate/Email.pm0000644000175000017500000003710112150556557031356 0ustar gregoagregoa# Copyright (c) 2005 - 2006 Hans Jeuken. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. # This file was generated from the 'email.xml' file of the syntax highlight # engine of the kate text editor (http://www.kate-editor.org #kate xml version 1.00 #kate version 2.4 #kate author Carl A Joslin (carl.joslin@joslin.dyndns.org) #generated: Sun Feb 3 22:02:04 2008, localtime package Syntax::Highlight::Engine::Kate::Email; our $VERSION = '0.07'; use strict; use warnings; use base('Syntax::Highlight::Engine::Kate::Template'); sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = $class->SUPER::new(@_); $self->attributes({ 'Normal Text' => 'Normal', 'base64' => 'RegionMarker', 'common' => 'Keyword', 'email' => 'Function', 'indent1' => 'DataType', 'indent2' => 'DecVal', 'indent3' => 'Float', 'indent4' => 'BaseN', 'indent5' => 'BString', 'indent6' => 'Reserved', 'marker' => 'Alert', 'other' => 'Others', 'rfc' => 'Operator', 'rfc-main' => 'Alert', 'sign' => 'Comment', 'string' => 'String', }); $self->contextdata({ 'headder' => { callback => \&parseheadder, attribute => 'Normal Text', }, }); $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); $self->basecontext('headder'); $self->keywordscase(0); $self->initialize; bless ($self, $class); return $self; } sub language { return 'Email'; } sub parseheadder { my ($self, $text) = @_; # String => '^[Tt]o:.*$' # attribute => 'rfc-main' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^[Tt]o:.*$', 0, 0, 0, undef, 0, '#stay', 'rfc-main')) { return 1 } # String => '^[Ff]rom:.*$' # attribute => 'rfc-main' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^[Ff]rom:.*$', 0, 0, 0, undef, 0, '#stay', 'rfc-main')) { return 1 } # String => '^[Cc][Cc]:.*$' # attribute => 'rfc-main' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^[Cc][Cc]:.*$', 0, 0, 0, undef, 0, '#stay', 'rfc-main')) { return 1 } # String => '^[Bb][Cc][Cc]:.*$' # attribute => 'rfc-main' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^[Bb][Cc][Cc]:.*$', 0, 0, 0, undef, 0, '#stay', 'rfc-main')) { return 1 } # String => '^[Ss]ubject:.*$' # attribute => 'rfc-main' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^[Ss]ubject:.*$', 0, 0, 0, undef, 0, '#stay', 'rfc-main')) { return 1 } # String => '^[Dd]ate:.*$' # attribute => 'rfc-main' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^[Dd]ate:.*$', 0, 0, 0, undef, 0, '#stay', 'rfc-main')) { return 1 } # String => '^[Ss]ender:' # attribute => 'rfc' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^[Ss]ender:', 0, 0, 0, undef, 0, '#stay', 'rfc')) { return 1 } # String => '^[Rr]eply-[Tt]o:' # attribute => 'rfc' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^[Rr]eply-[Tt]o:', 0, 0, 0, undef, 0, '#stay', 'rfc')) { return 1 } # String => '^[Mm]essage-[Ii][Dd]:' # attribute => 'rfc' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^[Mm]essage-[Ii][Dd]:', 0, 0, 0, undef, 0, '#stay', 'rfc')) { return 1 } # String => '^[Ii]n-[Rr]eply-[Tt]o:' # attribute => 'rfc' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^[Ii]n-[Rr]eply-[Tt]o:', 0, 0, 0, undef, 0, '#stay', 'rfc')) { return 1 } # String => '^[Rr]eferences:' # attribute => 'rfc' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^[Rr]eferences:', 0, 0, 0, undef, 0, '#stay', 'rfc')) { return 1 } # String => '^[Cc]omments:' # attribute => 'rfc' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^[Cc]omments:', 0, 0, 0, undef, 0, '#stay', 'rfc')) { return 1 } # String => '^[Kk]eywors:' # attribute => 'rfc' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^[Kk]eywors:', 0, 0, 0, undef, 0, '#stay', 'rfc')) { return 1 } # String => '^[Rr]esent-[Dd]ate:' # attribute => 'rfc' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^[Rr]esent-[Dd]ate:', 0, 0, 0, undef, 0, '#stay', 'rfc')) { return 1 } # String => '^[Rr]esent-[Ff]rom:' # attribute => 'rfc' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^[Rr]esent-[Ff]rom:', 0, 0, 0, undef, 0, '#stay', 'rfc')) { return 1 } # String => '^[Rr]esent-[Ss]ender:' # attribute => 'rfc' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^[Rr]esent-[Ss]ender:', 0, 0, 0, undef, 0, '#stay', 'rfc')) { return 1 } # String => '^[Rr]esent-[Tt]o:' # attribute => 'rfc' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^[Rr]esent-[Tt]o:', 0, 0, 0, undef, 0, '#stay', 'rfc')) { return 1 } # String => '^[Rr]esent-[Cc][Cc]:' # attribute => 'rfc' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^[Rr]esent-[Cc][Cc]:', 0, 0, 0, undef, 0, '#stay', 'rfc')) { return 1 } # String => '^[Rr]esent-[Bb][Cc][Cc]:' # attribute => 'rfc' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^[Rr]esent-[Bb][Cc][Cc]:', 0, 0, 0, undef, 0, '#stay', 'rfc')) { return 1 } # String => '^[Rr]esent-[Mm]essage-[Ii][Dd]:' # attribute => 'rfc' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^[Rr]esent-[Mm]essage-[Ii][Dd]:', 0, 0, 0, undef, 0, '#stay', 'rfc')) { return 1 } # String => '^[Rr]esent-[Rr]eply-[Tt]o:' # attribute => 'rfc' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^[Rr]esent-[Rr]eply-[Tt]o:', 0, 0, 0, undef, 0, '#stay', 'rfc')) { return 1 } # String => '^[Rr]eturn-[Pp]ath:' # attribute => 'rfc' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^[Rr]eturn-[Pp]ath:', 0, 0, 0, undef, 0, '#stay', 'rfc')) { return 1 } # String => '^[Rr]eceived:' # attribute => 'rfc' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^[Rr]eceived:', 0, 0, 0, undef, 0, '#stay', 'rfc')) { return 1 } # String => '^[Xx]-[Mm]ozilla-[Ss]tatus:' # attribute => 'common' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^[Xx]-[Mm]ozilla-[Ss]tatus:', 0, 0, 0, undef, 0, '#stay', 'common')) { return 1 } # String => '^[Xx]-[Mm]ozilla-[Ss]tatus2:' # attribute => 'common' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^[Xx]-[Mm]ozilla-[Ss]tatus2:', 0, 0, 0, undef, 0, '#stay', 'common')) { return 1 } # String => '^[Ee]nverlope-[Tt]o:' # attribute => 'common' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^[Ee]nverlope-[Tt]o:', 0, 0, 0, undef, 0, '#stay', 'common')) { return 1 } # String => '^[Dd]elivery-[Dd]ate:' # attribute => 'common' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^[Dd]elivery-[Dd]ate:', 0, 0, 0, undef, 0, '#stay', 'common')) { return 1 } # String => '^[Xx]-[Oo]riginating-[Ii][Pp]:' # attribute => 'common' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^[Xx]-[Oo]riginating-[Ii][Pp]:', 0, 0, 0, undef, 0, '#stay', 'common')) { return 1 } # String => '^[Xx]-[Oo]riginating-[Ee]mail:' # attribute => 'common' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^[Xx]-[Oo]riginating-[Ee]mail:', 0, 0, 0, undef, 0, '#stay', 'common')) { return 1 } # String => '^[Xx]-[Ss]ender:' # attribute => 'common' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^[Xx]-[Ss]ender:', 0, 0, 0, undef, 0, '#stay', 'common')) { return 1 } # String => '^[Mm]ime-[Vv]ersion:' # attribute => 'common' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^[Mm]ime-[Vv]ersion:', 0, 0, 0, undef, 0, '#stay', 'common')) { return 1 } # String => '^[Cc]ontent-[Tt]ype:' # attribute => 'common' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^[Cc]ontent-[Tt]ype:', 0, 0, 0, undef, 0, '#stay', 'common')) { return 1 } # String => '^[Xx]-[Mm]ailing-[Ll]ist:' # attribute => 'common' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^[Xx]-[Mm]ailing-[Ll]ist:', 0, 0, 0, undef, 0, '#stay', 'common')) { return 1 } # String => '^[Xx]-[Ll]oop:' # attribute => 'common' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^[Xx]-[Ll]oop:', 0, 0, 0, undef, 0, '#stay', 'common')) { return 1 } # String => '^[Ll]ist-[Pp]ost:' # attribute => 'common' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^[Ll]ist-[Pp]ost:', 0, 0, 0, undef, 0, '#stay', 'common')) { return 1 } # String => '^[Ll]ist-[Hh]elp:' # attribute => 'common' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^[Ll]ist-[Hh]elp:', 0, 0, 0, undef, 0, '#stay', 'common')) { return 1 } # String => '^[Ll]ist-[Uu]nsubscribe:' # attribute => 'common' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^[Ll]ist-[Uu]nsubscribe:', 0, 0, 0, undef, 0, '#stay', 'common')) { return 1 } # String => '^[Pp]recedence:' # attribute => 'common' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^[Pp]recedence:', 0, 0, 0, undef, 0, '#stay', 'common')) { return 1 } # String => '^[Cc]ontent-[Tt]ransfer-[Ee]ncoding:' # attribute => 'common' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^[Cc]ontent-[Tt]ransfer-[Ee]ncoding:', 0, 0, 0, undef, 0, '#stay', 'common')) { return 1 } # String => '^[Cc]ontent-[Tt]ype:' # attribute => 'common' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^[Cc]ontent-[Tt]ype:', 0, 0, 0, undef, 0, '#stay', 'common')) { return 1 } # String => '^[Xx]-[Bb]ulkmail:' # attribute => 'common' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^[Xx]-[Bb]ulkmail:', 0, 0, 0, undef, 0, '#stay', 'common')) { return 1 } # String => '^[Pp]recedence:' # attribute => 'common' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^[Pp]recedence:', 0, 0, 0, undef, 0, '#stay', 'common')) { return 1 } # String => '^[Cc]ontent-[Dd]isposition:' # attribute => 'common' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^[Cc]ontent-[Dd]isposition:', 0, 0, 0, undef, 0, '#stay', 'common')) { return 1 } # String => '^[0-9a-zA-Z-.]+:' # attribute => 'other' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^[0-9a-zA-Z-.]+:', 0, 0, 0, undef, 0, '#stay', 'other')) { return 1 } # String => '[a-zA-Z0-9.\-]+\@[a-zA-Z0-9.\-]+' # attribute => 'email' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '[a-zA-Z0-9.\\-]+\\@[a-zA-Z0-9.\\-]+', 0, 0, 0, undef, 0, '#stay', 'email')) { return 1 } # String => '[a-zA-Z0-9.\-]*\s*<[a-zA-Z0-9.\-]+\@[a-zA-Z0-9.\-]+>' # attribute => 'email' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '[a-zA-Z0-9.\\-]*\\s*<[a-zA-Z0-9.\\-]+\\@[a-zA-Z0-9.\\-]+>', 0, 0, 0, undef, 0, '#stay', 'email')) { return 1 } # String => '"[a-zA-Z0-9. \-]+"\s*<[a-zA-Z0-9.\-]+\@[a-zA-Z0-9.\-]+>' # attribute => 'email' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '"[a-zA-Z0-9. \\-]+"\\s*<[a-zA-Z0-9.\\-]+\\@[a-zA-Z0-9.\\-]+>', 0, 0, 0, undef, 0, '#stay', 'email')) { return 1 } # String => '".*"' # attribute => 'string' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '".*"', 0, 0, 0, undef, 0, '#stay', 'string')) { return 1 } # String => ''.*'' # attribute => 'string' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '\'.*\'', 0, 0, 0, undef, 0, '#stay', 'string')) { return 1 } # String => '^[|>]\s*[|>]\s*[|>]\s*[|>]\s*[|>]\s*[|>].*' # attribute => 'indent6' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^[|>]\\s*[|>]\\s*[|>]\\s*[|>]\\s*[|>]\\s*[|>].*', 0, 0, 0, undef, 0, '#stay', 'indent6')) { return 1 } # String => '^[|>]\s*[|>]\s*[|>]\s*[|>]\s*[|>].*' # attribute => 'indent5' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^[|>]\\s*[|>]\\s*[|>]\\s*[|>]\\s*[|>].*', 0, 0, 0, undef, 0, '#stay', 'indent5')) { return 1 } # String => '^[|>]\s*[|>]\s*[|>]\s*[|>].*' # attribute => 'indent4' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^[|>]\\s*[|>]\\s*[|>]\\s*[|>].*', 0, 0, 0, undef, 0, '#stay', 'indent4')) { return 1 } # String => '^[|>]\s*[|>]\s*[|>].*' # attribute => 'indent3' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^[|>]\\s*[|>]\\s*[|>].*', 0, 0, 0, undef, 0, '#stay', 'indent3')) { return 1 } # String => '^[|>]\s*[|>].*' # attribute => 'indent2' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^[|>]\\s*[|>].*', 0, 0, 0, undef, 0, '#stay', 'indent2')) { return 1 } # String => '^[|>].*' # attribute => 'indent1' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^[|>].*', 0, 0, 0, undef, 0, '#stay', 'indent1')) { return 1 } # String => '^([A-Za-z0-9+/][A-Za-z0-9+/][A-Za-z0-9+/][A-Za-z0-9+/]){10,20}$' # attribute => 'base64' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^([A-Za-z0-9+/][A-Za-z0-9+/][A-Za-z0-9+/][A-Za-z0-9+/]){10,20}$', 0, 0, 0, undef, 0, '#stay', 'base64')) { return 1 } # String => '^[A-Za-z0-9+=/]+=$' # attribute => 'base64' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^[A-Za-z0-9+=/]+=$', 0, 0, 0, undef, 0, '#stay', 'base64')) { return 1 } # String => '^(- )?--(--.*)?' # attribute => 'marker' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '^(- )?--(--.*)?', 0, 0, 0, undef, 0, '#stay', 'marker')) { return 1 } return 0; }; 1; __END__ =head1 NAME Syntax::Highlight::Engine::Kate::Email - a Plugin for Email syntax highlighting =head1 SYNOPSIS require Syntax::Highlight::Engine::Kate::Email; my $sh = new Syntax::Highlight::Engine::Kate::Email([ ]); =head1 DESCRIPTION Syntax::Highlight::Engine::Kate::Email is a plugin module that provides syntax highlighting for Email to the Syntax::Haghlight::Engine::Kate highlighting engine. This code is generated from the syntax definition files used by the Kate project. It works quite fine, but can use refinement and optimization. It inherits Syntax::Higlight::Engine::Kate::Template. See also there. =head1 AUTHOR Hans Jeuken (haje toneel demon nl) =head1 BUGS Unknown. If you find any, please contact the authorlibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/Engine/Kate/C.pm0000644000175000017500000004242112150556557030512 0ustar gregoagregoa# Copyright (c) 2005 - 2006 Hans Jeuken. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. # This file was generated from the 'c.xml' file of the syntax highlight # engine of the kate text editor (http://www.kate-editor.org #kate xml version 1.25 #kate version 2.4 #generated: Sun Feb 3 22:02:04 2008, localtime package Syntax::Highlight::Engine::Kate::C; our $VERSION = '0.07'; use strict; use warnings; use base('Syntax::Highlight::Engine::Kate::Template'); sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = $class->SUPER::new(@_); $self->attributes({ 'Alert' => 'Alert', 'Char' => 'Char', 'Comment' => 'Comment', 'Data Type' => 'DataType', 'Decimal' => 'DecVal', 'Float' => 'Float', 'Hex' => 'BaseN', 'Keyword' => 'Keyword', 'Normal Text' => 'Normal', 'Octal' => 'BaseN', 'Prep. Lib' => 'Others', 'Preprocessor' => 'Others', 'Region Marker' => 'RegionMarker', 'String' => 'String', 'String Char' => 'Char', 'Symbol' => 'Normal', }); $self->listAdd('keywords', 'break', 'case', 'continue', 'default', 'do', 'else', 'enum', 'extern', 'for', 'goto', 'if', 'inline', 'return', 'sizeof', 'struct', 'switch', 'typedef', 'union', 'while', ); $self->listAdd('types', '_Bool', '_Complex', '_Imaginary', 'auto', 'char', 'const', 'double', 'float', 'int', 'long', 'register', 'restrict', 'short', 'signed', 'static', 'unsigned', 'void', 'volatile', ); $self->contextdata({ 'Commentar 1' => { callback => \&parseCommentar1, attribute => 'Comment', lineending => '#pop', }, 'Commentar 2' => { callback => \&parseCommentar2, attribute => 'Comment', }, 'Commentar/Preprocessor' => { callback => \&parseCommentarPreprocessor, attribute => 'Comment', }, 'Define' => { callback => \&parseDefine, attribute => 'Preprocessor', lineending => '#pop', }, 'Normal' => { callback => \&parseNormal, attribute => 'Normal Text', }, 'Outscoped' => { callback => \&parseOutscoped, attribute => 'Comment', }, 'Outscoped intern' => { callback => \&parseOutscopedintern, attribute => 'Comment', }, 'Preprocessor' => { callback => \&parsePreprocessor, attribute => 'Preprocessor', lineending => '#pop', }, 'Region Marker' => { callback => \&parseRegionMarker, attribute => 'Region Marker', lineending => '#pop', }, 'String' => { callback => \&parseString, attribute => 'String', lineending => '#pop', }, }); $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); $self->basecontext('Normal'); $self->keywordscase(0); $self->initialize; bless ($self, $class); return $self; } sub language { return 'C'; } sub parseCommentar1 { my ($self, $text) = @_; # context => '##Alerts' # type => 'IncludeRules' if ($self->includePlugin('Alerts', $text)) { return 1 } return 0; }; sub parseCommentar2 { my ($self, $text) = @_; # attribute => 'Comment' # char => '*' # char1 => '/' # context => '#pop' # endRegion => 'Comment' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop', 'Comment')) { return 1 } # context => '##Alerts' # type => 'IncludeRules' if ($self->includePlugin('Alerts', $text)) { return 1 } return 0; }; sub parseCommentarPreprocessor { my ($self, $text) = @_; # attribute => 'Comment' # char => '*' # char1 => '/' # context => '#pop' # endRegion => 'Comment2' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop', 'Comment')) { return 1 } return 0; }; sub parseDefine { my ($self, $text) = @_; # attribute => 'Preprocessor' # context => '#stay' # type => 'LineContinue' if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'Preprocessor')) { return 1 } return 0; }; sub parseNormal { my ($self, $text) = @_; # type => 'DetectSpaces' if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { return 1 } # String => '#\s*if\s+0' # attribute => 'Preprocessor' # beginRegion => 'Outscoped' # context => 'Outscoped' # firstNonSpace => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '#\\s*if\\s+0', 0, 0, 0, undef, 1, 'Outscoped', 'Preprocessor')) { return 1 } # attribute => 'Preprocessor' # char => '#' # context => 'Preprocessor' # firstNonSpace => 'true' # type => 'DetectChar' if ($self->testDetectChar($text, '#', 0, 0, 0, undef, 1, 'Preprocessor', 'Preprocessor')) { return 1 } # String => '//BEGIN' # attribute => 'Region Marker' # beginRegion => 'Region1' # context => 'Region Marker' # firstNonSpace => 'true' # type => 'StringDetect' if ($self->testStringDetect($text, '//BEGIN', 0, 0, 0, undef, 1, 'Region Marker', 'Region Marker')) { return 1 } # String => '//END' # attribute => 'Region Marker' # context => 'Region Marker' # endRegion => 'Region1' # firstNonSpace => 'true' # type => 'StringDetect' if ($self->testStringDetect($text, '//END', 0, 0, 0, undef, 1, 'Region Marker', 'Region Marker')) { return 1 } # String => 'keywords' # attribute => 'Keyword' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'types' # attribute => 'Data Type' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'types', 0, undef, 0, '#stay', 'Data Type')) { return 1 } # type => 'DetectIdentifier' if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) { return 1 } # attribute => 'Symbol' # beginRegion => 'Brace1' # char => '{' # context => '#stay' # type => 'DetectChar' if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, '#stay', 'Symbol')) { return 1 } # attribute => 'Symbol' # char => '}' # context => '#stay' # endRegion => 'Brace1' # type => 'DetectChar' if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#stay', 'Symbol')) { return 1 } # attribute => 'Float' # context => '#stay' # items => 'ARRAY(0x12df8b0)' # type => 'Float' if ($self->testFloat($text, 0, undef, 0, '#stay', 'Float')) { # String => 'fF' # attribute => 'Float' # context => '#stay' # type => 'AnyChar' if ($self->testAnyChar($text, 'fF', 0, 0, undef, 0, '#stay', 'Float')) { return 1 } } # attribute => 'Octal' # context => '#stay' # type => 'HlCOct' if ($self->testHlCOct($text, 0, undef, 0, '#stay', 'Octal')) { return 1 } # attribute => 'Hex' # context => '#stay' # type => 'HlCHex' if ($self->testHlCHex($text, 0, undef, 0, '#stay', 'Hex')) { return 1 } # attribute => 'Decimal' # context => '#stay' # items => 'ARRAY(0x12207d0)' # type => 'Int' if ($self->testInt($text, 0, undef, 0, '#stay', 'Decimal')) { # String => 'ULL' # attribute => 'Decimal' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'ULL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'LUL' # attribute => 'Decimal' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'LUL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'LLU' # attribute => 'Decimal' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'LLU', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'UL' # attribute => 'Decimal' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'UL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'LU' # attribute => 'Decimal' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'LU', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'LL' # attribute => 'Decimal' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'LL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'U' # attribute => 'Decimal' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'U', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'L' # attribute => 'Decimal' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'L', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } } # attribute => 'Char' # context => '#stay' # type => 'HlCChar' if ($self->testHlCChar($text, 0, undef, 0, '#stay', 'Char')) { return 1 } # attribute => 'String' # char => '"' # context => 'String' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) { return 1 } # context => '##Doxygen' # type => 'IncludeRules' if ($self->includePlugin('Doxygen', $text)) { return 1 } # attribute => 'Comment' # char => '/' # char1 => '/' # context => 'Commentar 1' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'Commentar 1', 'Comment')) { return 1 } # attribute => 'Comment' # beginRegion => 'Comment' # char => '/' # char1 => '*' # context => 'Commentar 2' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'Commentar 2', 'Comment')) { return 1 } # String => ':!%&()+,-/.*<=>?[]|~^;' # attribute => 'Symbol' # context => '#stay' # type => 'AnyChar' if ($self->testAnyChar($text, ':!%&()+,-/.*<=>?[]|~^;', 0, 0, undef, 0, '#stay', 'Symbol')) { return 1 } return 0; }; sub parseOutscoped { my ($self, $text) = @_; # type => 'DetectSpaces' if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { return 1 } # context => '##Alerts' # type => 'IncludeRules' if ($self->includePlugin('Alerts', $text)) { return 1 } # type => 'DetectIdentifier' if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) { return 1 } # attribute => 'String' # char => '"' # context => 'String' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) { return 1 } # context => '##Doxygen' # type => 'IncludeRules' if ($self->includePlugin('Doxygen', $text)) { return 1 } # attribute => 'Comment' # char => '/' # char1 => '/' # context => 'Commentar 1' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'Commentar 1', 'Comment')) { return 1 } # attribute => 'Comment' # beginRegion => 'Comment' # char => '/' # char1 => '*' # context => 'Commentar 2' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'Commentar 2', 'Comment')) { return 1 } # String => '#\s*if' # attribute => 'Comment' # beginRegion => 'Outscoped' # context => 'Outscoped intern' # firstNonSpace => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '#\\s*if', 0, 0, 0, undef, 1, 'Outscoped intern', 'Comment')) { return 1 } # String => '#\s*(endif|else|elif)' # attribute => 'Preprocessor' # context => '#pop' # endRegion => 'Outscoped' # firstNonSpace => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '#\\s*(endif|else|elif)', 0, 0, 0, undef, 1, '#pop', 'Preprocessor')) { return 1 } return 0; }; sub parseOutscopedintern { my ($self, $text) = @_; # type => 'DetectSpaces' if ($self->testDetectSpaces($text, 0, undef, 0, '#stay', undef)) { return 1 } # context => '##Alerts' # type => 'IncludeRules' if ($self->includePlugin('Alerts', $text)) { return 1 } # type => 'DetectIdentifier' if ($self->testDetectIdentifier($text, 0, undef, 0, '#stay', undef)) { return 1 } # attribute => 'String' # char => '"' # context => 'String' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) { return 1 } # context => '##Doxygen' # type => 'IncludeRules' if ($self->includePlugin('Doxygen', $text)) { return 1 } # attribute => 'Comment' # char => '/' # char1 => '/' # context => 'Commentar 1' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'Commentar 1', 'Comment')) { return 1 } # attribute => 'Comment' # beginRegion => 'Comment' # char => '/' # char1 => '*' # context => 'Commentar 2' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'Commentar 2', 'Comment')) { return 1 } # String => '#\s*if' # attribute => 'Comment' # beginRegion => 'Outscoped' # context => 'Outscoped intern' # firstNonSpace => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '#\\s*if', 0, 0, 0, undef, 1, 'Outscoped intern', 'Comment')) { return 1 } # String => '#\s*endif' # attribute => 'Comment' # context => '#pop' # endRegion => 'Outscoped' # firstNonSpace => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '#\\s*endif', 0, 0, 0, undef, 1, '#pop', 'Comment')) { return 1 } return 0; }; sub parsePreprocessor { my ($self, $text) = @_; # attribute => 'Preprocessor' # context => '#stay' # type => 'LineContinue' if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'Preprocessor')) { return 1 } # String => 'define.*((?=\\))' # attribute => 'Preprocessor' # context => 'Define' # type => 'RegExpr' if ($self->testRegExpr($text, 'define.*((?=\\\\))', 0, 0, 0, undef, 0, 'Define', 'Preprocessor')) { return 1 } # String => 'define.*' # attribute => 'Preprocessor' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, 'define.*', 0, 0, 0, undef, 0, '#stay', 'Preprocessor')) { return 1 } # attribute => 'Prep. Lib' # char => '"' # char1 => '"' # context => '#stay' # type => 'RangeDetect' if ($self->testRangeDetect($text, '"', '"', 0, 0, undef, 0, '#stay', 'Prep. Lib')) { return 1 } # attribute => 'Prep. Lib' # char => '<' # char1 => '>' # context => '#stay' # type => 'RangeDetect' if ($self->testRangeDetect($text, '<', '>', 0, 0, undef, 0, '#stay', 'Prep. Lib')) { return 1 } # context => '##Doxygen' # type => 'IncludeRules' if ($self->includePlugin('Doxygen', $text)) { return 1 } # attribute => 'Comment' # beginRegion => 'Comment2' # char => '/' # char1 => '*' # context => 'Commentar/Preprocessor' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'Commentar/Preprocessor', 'Comment')) { return 1 } return 0; }; sub parseRegionMarker { my ($self, $text) = @_; return 0; }; sub parseString { my ($self, $text) = @_; # attribute => 'String' # context => '#stay' # type => 'LineContinue' if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'String')) { return 1 } # attribute => 'String Char' # context => '#stay' # type => 'HlCStringChar' if ($self->testHlCStringChar($text, 0, undef, 0, '#stay', 'String Char')) { return 1 } # attribute => 'String' # char => '"' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) { return 1 } return 0; }; 1; __END__ =head1 NAME Syntax::Highlight::Engine::Kate::C - a Plugin for C syntax highlighting =head1 SYNOPSIS require Syntax::Highlight::Engine::Kate::C; my $sh = new Syntax::Highlight::Engine::Kate::C([ ]); =head1 DESCRIPTION Syntax::Highlight::Engine::Kate::C is a plugin module that provides syntax highlighting for C to the Syntax::Haghlight::Engine::Kate highlighting engine. This code is generated from the syntax definition files used by the Kate project. It works quite fine, but can use refinement and optimization. It inherits Syntax::Higlight::Engine::Kate::Template. See also there. =head1 AUTHOR Hans Jeuken (haje toneel demon nl) =head1 BUGS Unknown. If you find any, please contact the author././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootlibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/Engine/Kate/SQL_PostgreSQL.pmlibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/Engine/Kate/SQL_PostgreSQL.0000644000175000017500000005312312150556557032516 0ustar gregoagregoa# Copyright (c) 2005 - 2006 Hans Jeuken. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. # This file was generated from the 'sql-postgresql.xml' file of the syntax highlight # engine of the kate text editor (http://www.kate-editor.org #kate xml version 1.08 #kate version 2.4 #kate author Shane Wright (me@shanewright.co.uk) #generated: Sun Feb 3 22:02:06 2008, localtime package Syntax::Highlight::Engine::Kate::SQL_PostgreSQL; our $VERSION = '0.07'; use strict; use warnings; use base('Syntax::Highlight::Engine::Kate::Template'); sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = $class->SUPER::new(@_); $self->attributes({ 'Comment' => 'Comment', 'Data Type' => 'DataType', 'Decimal' => 'DecVal', 'Float' => 'Float', 'Function' => 'Function', 'Identifier' => 'Others', 'Keyword' => 'Keyword', 'Normal Text' => 'Normal', 'Operator' => 'Normal', 'Preprocessor' => 'Others', 'String' => 'String', 'String Char' => 'Char', 'Symbol' => 'Char', }); $self->listAdd('functions', 'ABBREV', 'ABS', 'ACOS', 'AGE', 'AREA', 'ASCII', 'ASIN', 'ATAN', 'ATAN2', 'AVG', 'BIT_LENGTH', 'BOX', 'BOX', 'BROADCAST', 'BTRIM', 'CBRT', 'CEIL', 'CENTER', 'CHARACTER_LENGTH', 'CHAR_LENGTH', 'CHR', 'CIRCLE', 'COALESCE', 'COL_DESCRIPTION', 'CONVERT', 'COS', 'COT', 'COUNT', 'CURRVAL', 'DATE_PART', 'DATE_TRUNC', 'DECODE', 'DEGREES', 'DIAMETER', 'ENCODE', 'EXP', 'EXTRACT', 'EXTRACT', 'FLOOR', 'HAS_TABLE_PRIVILEGE', 'HEIGHT', 'HOST', 'INITCAP', 'ISCLOSED', 'ISFINITE', 'ISOPEN', 'LENGTH', 'LN', 'LOG', 'LOWER', 'LPAD', 'LSEG', 'LTRIM', 'MASKLEN', 'MAX', 'MIN', 'MOD', 'NETMASK', 'NETWORK', 'NEXTVAL', 'NOW', 'NPOINT', 'NULLIF', 'OBJ_DESCRIPTION', 'OCTET_LENGTH', 'PATH', 'PCLOSE', 'PG_CLIENT_ENCODING', 'PG_GET_INDEXDEF', 'PG_GET_RULEDEF', 'PG_GET_USERBYID', 'PG_GET_VIEWDEF', 'PI', 'POINT', 'POLYGON', 'POPEN', 'POSITION', 'POW', 'RADIANS', 'RADIUS', 'RANDOM', 'REPEAT', 'ROUND', 'RPAD', 'RTRIM', 'SETVAL', 'SET_MASKLEN', 'SIGN', 'SIN', 'SQRT', 'STDDEV', 'STRPOS', 'SUBSTR', 'SUBSTRING', 'SUM', 'TAN', 'TIMEOFDAY', 'TIMESTAMP', 'TO_ASCII', 'TO_CHAR', 'TO_DATE', 'TO_NUMBER', 'TO_TIMESTAMP', 'TRANSLATE', 'TRIM', 'TRUNC', 'UPPER', 'VARIANCE', 'WIDTH', ); $self->listAdd('keywords', 'ABORT', 'ACCESS', 'ACTION', 'ADD', 'ADMIN', 'AFTER', 'AGGREGATE', 'ALIAS', 'ALL', 'ALLOCATE', 'ALTER', 'ANALYSE', 'ANALYZE', 'ANY', 'ARE', 'AS', 'ASC', 'ASENSITIVE', 'ASSERTION', 'ASSIGNMENT', 'ASYMMETRIC', 'AT', 'ATOMIC', 'AUTHORIZATION', 'BACKWARD', 'BEFORE', 'BEGIN', 'BETWEEN', 'BINARY', 'BOTH', 'BREADTH', 'BY', 'C', 'CACHE', 'CALL', 'CALLED', 'CARDINALITY', 'CASCADE', 'CASCADED', 'CASE', 'CAST', 'CATALOG', 'CATALOG_NAME', 'CHAIN', 'CHARACTERISTICS', 'CHARACTER_LENGTH', 'CHARACTER_SET_CATALOG', 'CHARACTER_SET_NAME', 'CHARACTER_SET_SCHEMA', 'CHAR_LENGTH', 'CHECK', 'CHECKED', 'CHECKPOINT', 'CLASS', 'CLASS_ORIGIN', 'CLOB', 'CLOSE', 'CLUSTER', 'COALESCE', 'COBOL', 'COLLATE', 'COLLATION', 'COLLATION_CATALOG', 'COLLATION_NAME', 'COLLATION_SCHEMA', 'COLUMN', 'COLUMN_NAME', 'COMMAND_FUNCTION', 'COMMAND_FUNCTION_CODE', 'COMMENT', 'COMMIT', 'COMMITTED', 'COMPLETION', 'CONDITION_NUMBER', 'CONNECT', 'CONNECTION', 'CONNECTION_NAME', 'CONSTRAINT', 'CONSTRAINTS', 'CONSTRAINT_CATALOG', 'CONSTRAINT_NAME', 'CONSTRAINT_SCHEMA', 'CONSTRUCTOR', 'CONTAINS', 'CONTINUE', 'CONVERT', 'COPY', 'CORRESPONDING', 'COUNT', 'CREATE', 'CREATEDB', 'CREATEUSER', 'CROSS', 'CUBE', 'CURRENT', 'CURRENT_DATE', 'CURRENT_PATH', 'CURRENT_ROLE', 'CURRENT_TIME', 'CURRENT_TIMESTAMP', 'CURRENT_USER', 'CURSOR', 'CURSOR_NAME', 'CYCLE', 'DATA', 'DATABASE', 'DATE', 'DATETIME_INTERVAL_CODE', 'DATETIME_INTERVAL_PRECISION', 'DAY', 'DEALLOCATE', 'DEC', 'DECIMAL', 'DECLARE', 'DEFAULT', 'DEFERRABLE', 'DEFERRED', 'DEFINED', 'DEFINER', 'DELETE', 'DELIMITERS', 'DEPTH', 'DEREF', 'DESC', 'DESCRIBE', 'DESCRIPTOR', 'DESTROY', 'DESTRUCTOR', 'DETERMINISTIC', 'DIAGNOSTICS', 'DICTIONARY', 'DISCONNECT', 'DISPATCH', 'DISTINCT', 'DO', 'DOMAIN', 'DOUBLE', 'DROP', 'DYNAMIC', 'DYNAMIC_FUNCTION', 'DYNAMIC_FUNCTION_CODE', 'EACH', 'ELSE', 'ENCODING', 'ENCRYPTED', 'END', 'END-EXEC', 'EQUALS', 'ESCAPE', 'EVERY', 'EXCEPT', 'EXCEPTION', 'EXCLUSIVE', 'EXEC', 'EXECUTE', 'EXISTING', 'EXISTS', 'EXPLAIN', 'EXTERNAL', 'FALSE', 'FETCH', 'FINAL', 'FIRST', 'FOR', 'FORCE', 'FOREIGN', 'FORTRAN', 'FORWARD', 'FOUND', 'FREE', 'FREEZE', 'FROM', 'FULL', 'FUNCTION', 'G', 'GENERAL', 'GENERATED', 'GET', 'GLOBAL', 'GO', 'GOTO', 'GRANT', 'GRANTED', 'GROUP', 'GROUPING', 'HANDLER', 'HAVING', 'HIERARCHY', 'HOLD', 'HOST', 'HOUR', 'IDENTITY', 'IGNORE', 'ILIKE', 'IMMEDIATE', 'IMMUTABLE', 'IMPLEMENTATION', 'IN', 'INCREMENT', 'INDEX', 'INDICATOR', 'INFIX', 'INHERITS', 'INITIALIZE', 'INITIALLY', 'INNER', 'INOUT', 'INPUT', 'INSENSITIVE', 'INSERT', 'INSTANCE', 'INSTANTIABLE', 'INSTEAD', 'INTERSECT', 'INTERVAL', 'INTO', 'INVOKER', 'IS', 'ISNULL', 'ISOLATION', 'ITERATE', 'JOIN', 'K', 'KEY', 'KEY_MEMBER', 'KEY_TYPE', 'LANCOMPILER', 'LANGUAGE', 'LARGE', 'LAST', 'LATERAL', 'LEADING', 'LEFT', 'LENGTH', 'LESS', 'LEVEL', 'LIKE', 'LIMIT', 'LISTEN', 'LOAD', 'LOCAL', 'LOCALTIME', 'LOCALTIMESTAMP', 'LOCATION', 'LOCATOR', 'LOCK', 'LOWER', 'M', 'MAP', 'MATCH', 'MAX', 'MAXVALUE', 'MESSAGE_LENGTH', 'MESSAGE_OCTET_LENGTH', 'MESSAGE_TEXT', 'METHOD', 'MIN', 'MINUTE', 'MINVALUE', 'MOD', 'MODE', 'MODIFIES', 'MODIFY', 'MODULE', 'MONTH', 'MORE', 'MOVE', 'MUMPS', 'NAME', 'NAMES', 'NATIONAL', 'NATURAL', 'NEW', 'NEXT', 'NO', 'NOCREATEDB', 'NOCREATEUSER', 'NONE', 'NOT', 'NOTHING', 'NOTIFY', 'NOTNULL', 'NULL', 'NULLABLE', 'NULLIF', 'NUMBER', 'NUMERIC', 'OBJECT', 'OCTET_LENGTH', 'OF', 'OFF', 'OFFSET', 'OIDS', 'OLD', 'ON', 'ONLY', 'OPEN', 'OPERATION', 'OPERATOR', 'OPTION', 'OPTIONS', 'ORDER', 'ORDINALITY', 'OUT', 'OUTER', 'OUTPUT', 'OVERLAPS', 'OVERLAY', 'OVERRIDING', 'OWNER', 'PAD', 'PARAMETER', 'PARAMETERS', 'PARAMETER_MODE', 'PARAMETER_NAME', 'PARAMETER_ORDINAL_POSITION', 'PARAMETER_SPECIFIC_CATALOG', 'PARAMETER_SPECIFIC_NAME', 'PARAMETER_SPECIFIC_SCHEMA', 'PARTIAL', 'PASCAL', 'PASSWORD', 'PATH', 'PENDANT', 'PLI', 'POSITION', 'POSTFIX', 'PRECISION', 'PREFIX', 'PREORDER', 'PREPARE', 'PRESERVE', 'PRIMARY', 'PRIOR', 'PRIVILEGES', 'PROCEDURAL', 'PROCEDURE', 'PUBLIC', 'READ', 'READS', 'REAL', 'RECURSIVE', 'REF', 'REFERENCES', 'REFERENCING', 'REINDEX', 'RELATIVE', 'RENAME', 'REPEATABLE', 'REPLACE', 'RESET', 'RESTRICT', 'RESULT', 'RETURN', 'RETURNED_LENGTH', 'RETURNED_OCTET_LENGTH', 'RETURNED_SQLSTATE', 'RETURNS', 'REVOKE', 'RIGHT', 'ROLE', 'ROLLBACK', 'ROLLUP', 'ROUTINE', 'ROUTINE_CATALOG', 'ROUTINE_NAME', 'ROUTINE_SCHEMA', 'ROW', 'ROWS', 'ROW_COUNT', 'RULE', 'SAVEPOINT', 'SCALE', 'SCHEMA', 'SCHEMA_NAME', 'SCOPE', 'SCROLL', 'SEARCH', 'SECOND', 'SECTION', 'SECURITY', 'SELECT', 'SELF', 'SENSITIVE', 'SEQUENCE', 'SERIALIZABLE', 'SERVER_NAME', 'SESSION', 'SESSION_USER', 'SET', 'SETOF', 'SETS', 'SHARE', 'SHOW', 'SIMILAR', 'SIMPLE', 'SIZE', 'SOME', 'SOURCE', 'SPACE', 'SPECIFIC', 'SPECIFICTYPE', 'SPECIFIC_NAME', 'SQL', 'SQLCODE', 'SQLERROR', 'SQLEXCEPTION', 'SQLSTATE', 'SQLWARNING', 'STABLE', 'START', 'STATE', 'STATEMENT', 'STATIC', 'STATISTICS', 'STDIN', 'STDOUT', 'STRUCTURE', 'STYLE', 'SUBCLASS_ORIGIN', 'SUBLIST', 'SUBSTRING', 'SUM', 'SYMMETRIC', 'SYSID', 'SYSTEM', 'SYSTEM_USER', 'TABLE', 'TABLE_NAME', 'TEMP', 'TEMPLATE', 'TEMPORARY', 'TERMINATE', 'THAN', 'THEN', 'TIMEZONE_HOUR', 'TIMEZONE_MINUTE', 'TO', 'TOAST', 'TRAILING', 'TRANSACTION', 'TRANSACTIONS_COMMITTED', 'TRANSACTIONS_ROLLED_BACK', 'TRANSACTION_ACTIVE', 'TRANSFORM', 'TRANSFORMS', 'TRANSLATE', 'TRANSLATION', 'TREAT', 'TRIGGER', 'TRIGGER_CATALOG', 'TRIGGER_NAME', 'TRIGGER_SCHEMA', 'TRIM', 'TRUE', 'TRUNCATE', 'TRUSTED', 'TYPE', 'UNCOMMITTED', 'UNDER', 'UNENCRYPTED', 'UNION', 'UNIQUE', 'UNKNOWN', 'UNLISTEN', 'UNNAMED', 'UNNEST', 'UNTIL', 'UPDATE', 'UPPER', 'USAGE', 'USER', 'USER_DEFINED_TYPE_CATALOG', 'USER_DEFINED_TYPE_NAME', 'USER_DEFINED_TYPE_SCHEMA', 'USING', 'VACUUM', 'VALID', 'VALUE', 'VALUES', 'VARIABLE', 'VARYING', 'VERBOSE', 'VERSION', 'VIEW', 'VOLATILE', 'WHEN', 'WHENEVER', 'WHERE', 'WITH', 'WITHOUT', 'WORK', 'WRITE', 'YEAR', 'ZONE', ); $self->listAdd('operators', '!', '!!', '!=', '!~', '!~*', '#', '##', '%', '&', '&&', '&<', '&>', '*', '**', '+', '-', '..', '/', ':=', '<', '<->', '<<', '<<=', '<=', '<>', '<^', '=', '=>', '>', '>=', '>>', '>>=', '>^', '?#', '?-', '?-|', '?|', '?||', '@', '@-@', '@@', 'AND', 'NOT', 'OR', '^', '^=', '|', '|/', '||', '||/', '~', '~*', '~=', ); $self->listAdd('types', 'BIGINT', 'BIGSERIAL', 'BIT', 'BIT VARYING', 'BOOL', 'BOOLEAN', 'BOX', 'BYTEA', 'CHAR', 'CHARACTER', 'CHARACTER VARYING', 'CIDR', 'CIRCLE', 'DATE', 'DECIMAL', 'DOUBLE PRECISION', 'FLOAT8', 'INET', 'INT', 'INT2', 'INT4', 'INT8', 'INTEGER', 'INTERVAL', 'LINE', 'LSEG', 'LZTEXT', 'MACADDR', 'MONEY', 'NUMERIC', 'OID', 'PATH', 'POINT', 'POLYGON', 'REAL', 'SERIAL', 'SERIAL8', 'SMALLINT', 'TEXT', 'TIME', 'TIMESTAMP', 'TIMESTAMP WITH TIMEZONE', 'TIMESTAMPTZ', 'TIMETZ', 'VARBIT', 'VARCHAR', ); $self->contextdata({ 'Identifier' => { callback => \&parseIdentifier, attribute => 'Identifier', lineending => '#pop', }, 'MultiLineComment' => { callback => \&parseMultiLineComment, attribute => 'Comment', }, 'Normal' => { callback => \&parseNormal, attribute => 'Normal Text', }, 'Preprocessor' => { callback => \&parsePreprocessor, attribute => 'Preprocessor', lineending => '#pop', }, 'SingleLineComment' => { callback => \&parseSingleLineComment, attribute => 'Comment', lineending => '#pop', }, 'String' => { callback => \&parseString, attribute => 'String', }, }); $self->deliminators('\\s||\\(|\\)|,|;|\\[|\\]|\\{|\\}|\\\\|\\+|-|\\*|\\/|\\||\\!|@|\\&|#|<|>|\\%|\\^|=|\\~|:|\\.|\\?'); $self->basecontext('Normal'); $self->keywordscase(0); $self->initialize; bless ($self, $class); return $self; } sub language { return 'SQL (PostgreSQL)'; } sub parseIdentifier { my ($self, $text) = @_; # attribute => 'Identifier' # char => '"' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'Identifier')) { return 1 } return 0; }; sub parseMultiLineComment { my ($self, $text) = @_; # attribute => 'Comment' # context => '#pop' # type => 'LineContinue' if ($self->testLineContinue($text, 0, undef, 0, '#pop', 'Comment')) { return 1 } # attribute => 'Comment' # char => '*' # char1 => '/' # context => '#pop' # endRegion => 'Comment' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop', 'Comment')) { return 1 } return 0; }; sub parseNormal { my ($self, $text) = @_; # String => 'keywords' # attribute => 'Keyword' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'operators' # attribute => 'Operator' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'operators', 0, undef, 0, '#stay', 'Operator')) { return 1 } # String => 'functions' # attribute => 'Function' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'functions', 0, undef, 0, '#stay', 'Function')) { return 1 } # String => 'types' # attribute => 'Data Type' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'types', 0, undef, 0, '#stay', 'Data Type')) { return 1 } # String => '%bulk_exceptions\b' # attribute => 'Data Type' # context => '#stay' # insensitive => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '%bulk_exceptions\\b', 1, 0, 0, undef, 0, '#stay', 'Data Type')) { return 1 } # String => '%bulk_rowcount\b' # attribute => 'Data Type' # context => '#stay' # insensitive => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '%bulk_rowcount\\b', 1, 0, 0, undef, 0, '#stay', 'Data Type')) { return 1 } # String => '%found\b' # attribute => 'Data Type' # context => '#stay' # insensitive => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '%found\\b', 1, 0, 0, undef, 0, '#stay', 'Data Type')) { return 1 } # String => '%isopen\b' # attribute => 'Data Type' # context => '#stay' # insensitive => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '%isopen\\b', 1, 0, 0, undef, 0, '#stay', 'Data Type')) { return 1 } # String => '%notfound\b' # attribute => 'Data Type' # context => '#stay' # insensitive => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '%notfound\\b', 1, 0, 0, undef, 0, '#stay', 'Data Type')) { return 1 } # String => '%rowcount\b' # attribute => 'Data Type' # context => '#stay' # insensitive => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '%rowcount\\b', 1, 0, 0, undef, 0, '#stay', 'Data Type')) { return 1 } # String => '%rowtype\b' # attribute => 'Data Type' # context => '#stay' # insensitive => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '%rowtype\\b', 1, 0, 0, undef, 0, '#stay', 'Data Type')) { return 1 } # String => '%type\b' # attribute => 'Data Type' # context => '#stay' # insensitive => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, '%type\\b', 1, 0, 0, undef, 0, '#stay', 'Data Type')) { return 1 } # attribute => 'Float' # context => '#stay' # type => 'Float' if ($self->testFloat($text, 0, undef, 0, '#stay', 'Float')) { return 1 } # attribute => 'Decimal' # context => '#stay' # type => 'Int' if ($self->testInt($text, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # attribute => 'String' # char => ''' # context => 'String' # type => 'DetectChar' if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'String', 'String')) { return 1 } # attribute => 'Comment' # char => '#' # context => 'SingleLineComment' # type => 'DetectChar' if ($self->testDetectChar($text, '#', 0, 0, 0, undef, 0, 'SingleLineComment', 'Comment')) { return 1 } # attribute => 'Comment' # char => '-' # char1 => '-' # context => 'SingleLineComment' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '-', '-', 0, 0, 0, undef, 0, 'SingleLineComment', 'Comment')) { return 1 } # attribute => 'Comment' # beginRegion => 'Comment' # char => '/' # char1 => '*' # context => 'MultiLineComment' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'MultiLineComment', 'Comment')) { return 1 } # String => 'rem\b' # attribute => 'Comment' # column => '0' # context => 'SingleLineComment' # insensitive => 'true' # type => 'RegExpr' if ($self->testRegExpr($text, 'rem\\b', 1, 0, 0, 0, 0, 'SingleLineComment', 'Comment')) { return 1 } # attribute => 'Comment' # char => '"' # context => 'Identifier' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'Identifier', 'Comment')) { return 1 } # String => ':&' # attribute => 'Symbol' # context => '#stay' # type => 'AnyChar' if ($self->testAnyChar($text, ':&', 0, 0, undef, 0, '#stay', 'Symbol')) { return 1 } # String => '/$' # attribute => 'Symbol' # column => '0' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '/$', 0, 0, 0, 0, 0, '#stay', 'Symbol')) { return 1 } # String => '@@?[^@ \t\r\n]' # attribute => 'Preprocessor' # column => '0' # context => 'Preprocessor' # type => 'RegExpr' if ($self->testRegExpr($text, '@@?[^@ \\t\\r\\n]', 0, 0, 0, 0, 0, 'Preprocessor', 'Preprocessor')) { return 1 } return 0; }; sub parsePreprocessor { my ($self, $text) = @_; return 0; }; sub parseSingleLineComment { my ($self, $text) = @_; return 0; }; sub parseString { my ($self, $text) = @_; # attribute => 'String' # context => '#pop' # type => 'LineContinue' if ($self->testLineContinue($text, 0, undef, 0, '#pop', 'String')) { return 1 } # attribute => 'String Char' # context => '#stay' # type => 'HlCStringChar' if ($self->testHlCStringChar($text, 0, undef, 0, '#stay', 'String Char')) { return 1 } # attribute => 'Symbol' # char => '&' # context => '#stay' # type => 'DetectChar' if ($self->testDetectChar($text, '&', 0, 0, 0, undef, 0, '#stay', 'Symbol')) { return 1 } # attribute => 'String' # char => ''' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop', 'String')) { return 1 } return 0; }; 1; __END__ =head1 NAME Syntax::Highlight::Engine::Kate::SQL_PostgreSQL - a Plugin for SQL (PostgreSQL) syntax highlighting =head1 SYNOPSIS require Syntax::Highlight::Engine::Kate::SQL_PostgreSQL; my $sh = new Syntax::Highlight::Engine::Kate::SQL_PostgreSQL([ ]); =head1 DESCRIPTION Syntax::Highlight::Engine::Kate::SQL_PostgreSQL is a plugin module that provides syntax highlighting for SQL (PostgreSQL) to the Syntax::Haghlight::Engine::Kate highlighting engine. This code is generated from the syntax definition files used by the Kate project. It works quite fine, but can use refinement and optimization. It inherits Syntax::Higlight::Engine::Kate::Template. See also there. =head1 AUTHOR Hans Jeuken (haje toneel demon nl) =head1 BUGS Unknown. If you find any, please contact the authorlibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/Engine/Kate/Ferite.pm0000644000175000017500000002773712150556557031563 0ustar gregoagregoa# Copyright (c) 2005 - 2006 Hans Jeuken. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. # This file was generated from the 'ferite.xml' file of the syntax highlight # engine of the kate text editor (http://www.kate-editor.org #kate xml version 1.04 #kate version 2.4 #generated: Sun Feb 3 22:02:04 2008, localtime package Syntax::Highlight::Engine::Kate::Ferite; our $VERSION = '0.07'; use strict; use warnings; use base('Syntax::Highlight::Engine::Kate::Template'); sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = $class->SUPER::new(@_); $self->attributes({ 'Alert' => 'Alert', 'Char' => 'Char', 'Comment' => 'Comment', 'Data Type' => 'DataType', 'Decimal' => 'DecVal', 'Float' => 'Float', 'Hex' => 'BaseN', 'Keyword' => 'Keyword', 'Normal Text' => 'Normal', 'Octal' => 'BaseN', 'Prep. Lib' => 'Others', 'Preprocessor' => 'Others', 'String' => 'String', 'String Char' => 'Char', 'Symbol' => 'Normal', }); $self->listAdd('keywords', 'break', 'case', 'class', 'continue', 'do', 'else', 'fix', 'for', 'function', 'global', 'if', 'iferr', 'namespace', 'new', 'null', 'return', 'self', 'super', 'uses', 'while', ); $self->listAdd('types', 'array', 'final', 'number', 'object', 'static', 'string', 'void', ); $self->contextdata({ 'Comment' => { callback => \&parseComment, attribute => 'Comment', lineending => '#pop', }, 'Default' => { callback => \&parseDefault, attribute => 'Normal Text', }, 'Multiline Comment' => { callback => \&parseMultilineComment, attribute => 'Comment', }, 'Multiline Comment 2' => { callback => \&parseMultilineComment2, attribute => 'Comment', }, 'Preprocessor' => { callback => \&parsePreprocessor, attribute => 'Preprocessor', lineending => '#pop', }, 'String' => { callback => \&parseString, attribute => 'String', lineending => '#pop', }, 'Undeffed' => { callback => \&parseUndeffed, attribute => 'Comment', }, 'unknown' => { callback => \&parseunknown, attribute => 'Normal Text', lineending => '#pop', }, 'unknown 2' => { callback => \&parseunknown2, attribute => 'Normal Text', lineending => '#pop', }, }); $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\'); $self->basecontext('Default'); $self->keywordscase(0); $self->initialize; bless ($self, $class); return $self; } sub language { return 'ferite'; } sub parseComment { my ($self, $text) = @_; # String => '(FIXME|TODO)' # attribute => 'Alert' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '(FIXME|TODO)', 0, 0, 0, undef, 0, '#stay', 'Alert')) { return 1 } return 0; }; sub parseDefault { my ($self, $text) = @_; # String => 'keywords' # attribute => 'Keyword' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) { return 1 } # String => 'types' # attribute => 'Data Type' # context => '#stay' # type => 'keyword' if ($self->testKeyword($text, 'types', 0, undef, 0, '#stay', 'Data Type')) { return 1 } # attribute => 'Float' # context => '#stay' # items => 'ARRAY(0xfd97c0)' # type => 'Float' if ($self->testFloat($text, 0, undef, 0, '#stay', 'Float')) { # String => 'fF' # attribute => 'Float' # context => '#stay' # type => 'AnyChar' if ($self->testAnyChar($text, 'fF', 0, 0, undef, 0, '#stay', 'Float')) { return 1 } } # attribute => 'Octal' # context => '#stay' # type => 'HlCOct' if ($self->testHlCOct($text, 0, undef, 0, '#stay', 'Octal')) { return 1 } # attribute => 'Hex' # context => '#stay' # type => 'HlCHex' if ($self->testHlCHex($text, 0, undef, 0, '#stay', 'Hex')) { return 1 } # attribute => 'Decimal' # context => '#stay' # items => 'ARRAY(0x11bdd60)' # type => 'Int' if ($self->testInt($text, 0, undef, 0, '#stay', 'Decimal')) { # String => 'ULL' # attribute => 'Decimal' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'ULL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'LUL' # attribute => 'Decimal' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'LUL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'LLU' # attribute => 'Decimal' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'LLU', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'UL' # attribute => 'Decimal' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'UL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'LU' # attribute => 'Decimal' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'LU', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'LL' # attribute => 'Decimal' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'LL', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'U' # attribute => 'Decimal' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'U', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } # String => 'L' # attribute => 'Decimal' # context => '#stay' # insensitive => 'TRUE' # type => 'StringDetect' if ($self->testStringDetect($text, 'L', 1, 0, 0, undef, 0, '#stay', 'Decimal')) { return 1 } } # attribute => 'Char' # context => '#stay' # type => 'HlCChar' if ($self->testHlCChar($text, 0, undef, 0, '#stay', 'Char')) { return 1 } # attribute => 'String' # char => '"' # context => 'String' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) { return 1 } # attribute => 'Comment' # char => '/' # char1 => '/' # context => 'Comment' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'Comment', 'Comment')) { return 1 } # attribute => 'Comment' # char => '/' # char1 => '*' # context => 'Multiline Comment' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'Multiline Comment', 'Comment')) { return 1 } # String => '!%&()+,-<=>?[]^{|}~' # attribute => 'Symbol' # context => '#stay' # type => 'AnyChar' if ($self->testAnyChar($text, '!%&()+,-<=>?[]^{|}~', 0, 0, undef, 0, '#stay', 'Symbol')) { return 1 } # String => '#if 0' # attribute => 'Comment' # context => 'Undeffed' # insensitive => 'FALSE' # type => 'StringDetect' if ($self->testStringDetect($text, '#if 0', 0, 0, 0, undef, 0, 'Undeffed', 'Comment')) { return 1 } # attribute => 'Preprocessor' # char => '#' # column => '0' # context => 'Preprocessor' # type => 'DetectChar' if ($self->testDetectChar($text, '#', 0, 0, 0, 0, 0, 'Preprocessor', 'Preprocessor')) { return 1 } return 0; }; sub parseMultilineComment { my ($self, $text) = @_; # attribute => 'Comment' # char => '*' # char1 => '/' # context => '#pop' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop', 'Comment')) { return 1 } # String => '(FIXME|TODO)' # attribute => 'Alert' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '(FIXME|TODO)', 0, 0, 0, undef, 0, '#stay', 'Alert')) { return 1 } return 0; }; sub parseMultilineComment2 { my ($self, $text) = @_; # attribute => 'Comment' # char => '*' # char1 => '/' # context => '#pop' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop', 'Comment')) { return 1 } return 0; }; sub parsePreprocessor { my ($self, $text) = @_; # attribute => 'Preprocessor' # context => '#stay' # type => 'LineContinue' if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'Preprocessor')) { return 1 } # attribute => 'Prep. Lib' # char => '"' # char1 => '"' # context => '#stay' # type => 'RangeDetect' if ($self->testRangeDetect($text, '"', '"', 0, 0, undef, 0, '#stay', 'Prep. Lib')) { return 1 } # attribute => 'Prep. Lib' # char => '<' # char1 => '>' # context => '#stay' # type => 'RangeDetect' if ($self->testRangeDetect($text, '<', '>', 0, 0, undef, 0, '#stay', 'Prep. Lib')) { return 1 } # attribute => 'Comment' # char => '/' # char1 => '/' # context => 'Comment' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'Comment', 'Comment')) { return 1 } # attribute => 'Comment' # char => '/' # char1 => '*' # context => 'Multiline Comment 2' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'Multiline Comment 2', 'Comment')) { return 1 } return 0; }; sub parseString { my ($self, $text) = @_; # attribute => 'String' # context => '#stay' # type => 'LineContinue' if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'String')) { return 1 } # attribute => 'String Char' # context => '#stay' # type => 'HlCStringChar' if ($self->testHlCStringChar($text, 0, undef, 0, '#stay', 'String Char')) { return 1 } # attribute => 'String' # char => '"' # context => '#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) { return 1 } return 0; }; sub parseUndeffed { my ($self, $text) = @_; # String => '(FIXME|TODO)' # attribute => 'Alert' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '(FIXME|TODO)', 0, 0, 0, undef, 0, '#stay', 'Alert')) { return 1 } # String => '#endif' # attribute => 'Comment' # column => '0' # context => '#pop' # type => 'StringDetect' if ($self->testStringDetect($text, '#endif', 0, 0, 0, 0, 0, '#pop', 'Comment')) { return 1 } return 0; }; sub parseunknown { my ($self, $text) = @_; return 0; }; sub parseunknown2 { my ($self, $text) = @_; return 0; }; 1; __END__ =head1 NAME Syntax::Highlight::Engine::Kate::Ferite - a Plugin for ferite syntax highlighting =head1 SYNOPSIS require Syntax::Highlight::Engine::Kate::Ferite; my $sh = new Syntax::Highlight::Engine::Kate::Ferite([ ]); =head1 DESCRIPTION Syntax::Highlight::Engine::Kate::Ferite is a plugin module that provides syntax highlighting for ferite to the Syntax::Haghlight::Engine::Kate highlighting engine. This code is generated from the syntax definition files used by the Kate project. It works quite fine, but can use refinement and optimization. It inherits Syntax::Higlight::Engine::Kate::Template. See also there. =head1 AUTHOR Hans Jeuken (haje toneel demon nl) =head1 BUGS Unknown. If you find any, please contact the authorlibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/lib/Syntax/Highlight/Engine/Kate/Xslt.pm0000644000175000017500000005364612150556557031275 0ustar gregoagregoa# Copyright (c) 2005 - 2006 Hans Jeuken. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. # This file was generated from the 'xslt.xml' file of the syntax highlight # engine of the kate text editor (http://www.kate-editor.org #kate xml version 1.03 #kate version 2.1 #kate author Peter Lammich (views@gmx.de) #generated: Sun Feb 3 22:02:06 2008, localtime package Syntax::Highlight::Engine::Kate::Xslt; our $VERSION = '0.07'; use strict; use warnings; use base('Syntax::Highlight::Engine::Kate::Template'); sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = $class->SUPER::new(@_); $self->attributes({ 'Alert' => 'Alert', 'Attribute' => 'Others', 'Attribute Value' => 'BaseN', 'Comment' => 'Comment', 'Entity Reference' => 'Char', 'Invalid' => 'Error', 'Normal Text' => 'Normal', 'Tag' => 'Keyword', 'Variable' => 'Variable', 'XPath' => 'Others', 'XPath 2.0/ XSLT 2.0 Function' => 'Operator', 'XPath Attribute' => 'Float', 'XPath Axis' => 'DecVal', 'XPath String' => 'BaseN', 'XPath/ XSLT Function' => 'Function', 'XSLT 2.0 Tag' => 'Reserved', 'XSLT Tag' => 'Reserved', }); $self->listAdd('functions', 'boolean', 'ceiling', 'concat', 'contains', 'count', 'current', 'document', 'element-available', 'false', 'floor', 'format-number', 'function-available', 'generate-id', 'id', 'key', 'lang', 'last', 'local-name', 'name', 'namespace-uri', 'normalize-space', 'not', 'number', 'position', 'round', 'starts-with', 'string', 'string-length', 'substring', 'substring-after', 'substring-before', 'sum', 'system-property', 'text', 'translate', 'true', 'unparsed-entity-uri', ); $self->listAdd('functions_2.0', 'QName', 'abs', 'adjust-date-to-timezone', 'adjust-dateTime-to-timezone', 'adjust-time-to-timezone', 'avg', 'base-uri', 'codepoints-to-string', 'collection', 'compare', 'current-date', 'current-dateTime', 'current-group', 'current-grouping-key', 'current-time', 'data', 'dateTime', 'day-from-date', 'day-from-dateTime', 'days-from-duration', 'deep-equal', 'default-collation', 'distinct-values', 'doc', 'document-uri', 'empty', 'ends-with', 'error', 'escape-uri', 'exactly-one', 'exists', 'expanded-QName', 'format-date', 'format-dateTime', 'format-time', 'hours-from-dateTime', 'hours-from-duration', 'hours-from-time', 'idref', 'implicit-timezone', 'in-scope-prefixes', 'index-of', 'input', 'insert-before', 'local-name-from-QName', 'lower-case', 'matches', 'max', 'min', 'minutes-from-dateTime', 'minutes-from-duration', 'minutes-from-time', 'month-from-date', 'month-from-dateTime', 'months-from-duration', 'namespace-uri-for-prefix', 'namespace-uri-from-QName', 'node-kind', 'node-name', 'normalize-unicode', 'one-or-more', 'regex-group', 'remove', 'replace', 'resolve-QName', 'resolve-uri', 'reverse', 'root', 'round-half-to-even', 'seconds-from-dateTime', 'seconds-from-duration', 'seconds-from-time', 'sequence-node-identical', 'static-base-uri', 'string-join', 'string-to-codepoints', 'subsequence', 'subtract-dateTimes-yielding-dayTimeDuration', 'subtract-dateTimes-yielding-yearMonthDuration', 'subtract-dates-yielding-dayTimeDuration', 'subtract-dates-yielding-yearMonthDuration', 'timezone-from-date', 'timezone-from-dateTime', 'timezone-from-time', 'tokenize', 'trace', 'unordered', 'unparsed-entity-public-id', 'unparsed-text', 'upper-case', 'year-from-date', 'year-from-dateTime', 'years-from-duration', 'zero-or-one', ); $self->listAdd('keytags', 'xsl:apply-imports', 'xsl:apply-templates', 'xsl:attribute', 'xsl:attribute-set', 'xsl:call-template', 'xsl:choose', 'xsl:comment', 'xsl:copy', 'xsl:copy-of', 'xsl:decimal-format', 'xsl:element', 'xsl:fallback', 'xsl:for-each', 'xsl:if', 'xsl:import', 'xsl:include', 'xsl:key', 'xsl:message', 'xsl:namespace-alias', 'xsl:number', 'xsl:otherwise', 'xsl:output', 'xsl:param', 'xsl:preserve-space', 'xsl:processing-instruction', 'xsl:sort', 'xsl:strip-space', 'xsl:stylesheet', 'xsl:template', 'xsl:text', 'xsl:transform', 'xsl:value-of', 'xsl:variable', 'xsl:when', 'xsl:with-param', ); $self->listAdd('keytags_2.0', 'xsl:analyze-string', 'xsl:character-map', 'xsl:document', 'xsl:for-each-group', 'xsl:function', 'xsl:import-schema', 'xsl:matching-substring', 'xsl:namespace', 'xsl:next-match', 'xsl:non-matching-substring', 'xsl:output-character', 'xsl:perform-sort', 'xsl:result-document', 'xsl:sequence', ); $self->contextdata({ 'attrValue' => { callback => \&parseattrValue, attribute => 'Invalid', }, 'attributes' => { callback => \&parseattributes, attribute => 'Attribute', }, 'comment' => { callback => \&parsecomment, attribute => 'Comment', }, 'detectEntRef' => { callback => \&parsedetectEntRef, attribute => 'Normal Text', }, 'normalText' => { callback => \&parsenormalText, attribute => 'Normal Text', }, 'sqstring' => { callback => \&parsesqstring, attribute => 'Attribute Value', }, 'sqxpath' => { callback => \&parsesqxpath, attribute => 'XPath', }, 'sqxpathstring' => { callback => \&parsesqxpathstring, attribute => 'XPath String', }, 'string' => { callback => \&parsestring, attribute => 'Attribute Value', }, 'tagname' => { callback => \&parsetagname, attribute => 'Tag', }, 'xattrValue' => { callback => \&parsexattrValue, attribute => 'Invalid', }, 'xattributes' => { callback => \&parsexattributes, attribute => 'Attribute', }, 'xpath' => { callback => \&parsexpath, attribute => 'XPath', }, 'xpathstring' => { callback => \&parsexpathstring, attribute => 'XPath String', }, }); $self->deliminators('\\s||\\.|\\(|\\)|\\!|\\+|,|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\|-|:'); $self->basecontext('normalText'); $self->keywordscase(0); $self->initialize; bless ($self, $class); return $self; } sub language { return 'xslt'; } sub parseattrValue { my ($self, $text) = @_; # attribute => 'Invalid' # char => '/' # char1 => '>' # context => '#pop#pop#pop' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '>', 0, 0, 0, undef, 0, '#pop#pop#pop', 'Invalid')) { return 1 } # attribute => 'Invalid' # char => '>' # context => '#pop#pop#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '#pop#pop#pop', 'Invalid')) { return 1 } # attribute => 'Attribute Value' # char => '"' # context => 'string' # type => 'DetectChar' if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'string', 'Attribute Value')) { return 1 } # attribute => 'Attribute Value' # char => ''' # context => 'sqstring' # type => 'DetectChar' if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'sqstring', 'Attribute Value')) { return 1 } return 0; }; sub parseattributes { my ($self, $text) = @_; # attribute => 'Tag' # char => '/' # char1 => '>' # context => '#pop#pop' # type => 'Detect2Chars' if ($self->testDetect2Chars($text, '/', '>', 0, 0, 0, undef, 0, '#pop#pop', 'Tag')) { return 1 } # attribute => 'Tag' # char => '>' # context => '#pop#pop' # type => 'DetectChar' if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '#pop#pop', 'Tag')) { return 1 } # String => '\s*=\s*' # attribute => 'Normal Text' # context => 'attrValue' # type => 'RegExpr' if ($self->testRegExpr($text, '\\s*=\\s*', 0, 0, 0, undef, 0, 'attrValue', 'Normal Text')) { return 1 } return 0; }; sub parsecomment { my ($self, $text) = @_; # String => '-->' # attribute => 'Comment' # context => '#pop' # endRegion => 'comment' # type => 'StringDetect' if ($self->testStringDetect($text, '-->', 0, 0, 0, undef, 0, '#pop', 'Comment')) { return 1 } # String => '-(-(?!->))+' # attribute => 'Invalid' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '-(-(?!->))+', 0, 0, 0, undef, 0, '#stay', 'Invalid')) { return 1 } # String => '(FIXME|TODO|HACK)' # attribute => 'Alert' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '(FIXME|TODO|HACK)', 0, 0, 0, undef, 0, '#stay', 'Alert')) { return 1 } return 0; }; sub parsedetectEntRef { my ($self, $text) = @_; # String => '&(#[0-9]+|#[xX][0-9A-Fa-f]+|[A-Za-z_:][\w.:_-]*);' # attribute => 'Entity Reference' # context => '#stay' # type => 'RegExpr' if ($self->testRegExpr($text, '&(#[0-9]+|#[xX][0-9A-Fa-f]+|[A-Za-z_:][\\w.:_-]*);', 0, 0, 0, undef, 0, '#stay', 'Entity Reference')) { return 1 } return 0; }; sub parsenormalText { my ($self, $text) = @_; # String => ' Linux at Home Links <xsl:value-of select="h:a/h:strong"/> <xsl:value-of select="normalize-space($title)"/> libsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/samples/highlight.desktop0000644000175000017500000000056112027556043026734 0ustar gregoagregoa[Desktop Entry] Comment= Comment[en_US]= Encoding=UTF-8 Exec=timidity -iA -B 2,8 -EFreverb=0 -EFchorus=0 GenericName= GenericName[en_US]= Icon= MimeType= Name=Start timidity server Name[en_US]=Start timidity server Path= StartupNotify=false Terminal=true TerminalOptions=\s--noclose Type=Application X-DCOP-ServiceType=none X-KDE-SubstituteUID=true X-KDE-Username=root libsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/samples/highlight.abc0000644000175000017500000000047712027556043026016 0ustar gregoagregoa% Taken from http://www.gre.ac.uk/~c.walshaw/abc/#examples T:Paddy O'Rafferty C:Trad. M:6/8 K:D dff cee|def gfe|dff cee|dfe dBA|dff cee|def gfe|faf gfe|1 dfe dBA:|2 dfe dcB|| ~A3 B3|gfe fdB|AFA B2c|dfe dcB|~A3 ~B3|efe efg|faf gfe|1 dfe dcB:|2 dfe dBA|| fAA eAA|def gfe|fAA eAA|dfe dBA|fAA eAA|def gfe|faf gfe|dfe dBA:| libsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/samples/highlight.hs0000644000175000017500000001057012027556043025676 0ustar gregoagregoa-- test file for Haskell syntax highlighting in KDE's Kate -- The test file for literate Haskell can be easily created like this: -- cat highlight.hs | sed -e "s|^|> |" -e "s|> -- ||" -e "s|^> $||" > highlight.lhs -- You only have to manually edit the multi-line comment below. -- this is a single-line comment {- this is a multi-line comment Things like "a string" or a 'c' character shouldn't be highlighted in here. -- I could even start a new -- one-line comment. -} -- a data definition data Tree a = Br (Tree a) (Tree a) | Leaf a | Nil deriving (Show, Eq) -- function definition, "funnyfunction::", "Integer", "Int", "Bool" should be highlighted funnyfunction::(Tree a)=>[a]->Integer->Int->Bool -- strings and chars -- first line of function definitions (type declaration) should be highlighted strangefunction::Int->String strangefunction 1 = "hello" strangefunction 2 = "what's up" strangefunction 3 = (strangefunction 1) ++ ", " ++ (strangefunction 2) strangefunction 4 = 'a':'b':'c':'"':[] -- will return "abc" strangefunction 5 = '\n':[] strangefunction 6 = '\invalidhaskell':[] -- function name including the single quote character -- and infix operator (`div`) justtesting'::Int->Int justtesting' 2 = 2+1 justtesting' 9 = 7 `div` 2 -- same definition as above, slightly different function name and a couple more whitespaces justtesting'' :: Int -> Int justtesting'' 2 = 3 justtesting'' 9 = 3 + 9 - 9 -- the following lines are copied out of Haskell's "Prelude.hs" infixl 7 *, /, `quot`, `rem`, `div`, `mod`, :%, % -- everything highlighted except the "a" class Bounded a where minBound, maxBound :: a class (Num a, Ord a) => Real a where toRational :: a -> Rational -- finally, some keyword lists -- keywords case, class, data, deriving, do, else, if, in, infixl, infixr, instance, let, module, of, primitive, then, type, where -- infix operators quot, rem, div, mod, elem, notElem, seq -- this stuff is not handled yet !!, %, &&, $!, $, *, **, -,., /=, <, <=, =<<, ==, >, >=, >>, >>=, ^, ^^, ++, || -- functions FilePath, IOError, abs, acos, acosh, all, and, any, appendFile, approxRational, asTypeOf, asin, asinh, atan, atan2, atanh, basicIORun, break, catch, ceiling, chr, compare, concat, concatMap, const, cos, cosh, curry, cycle, decodeFloat, denominator, digitToInt, div, divMod, drop, dropWhile, either, elem, encodeFloat, enumFrom, enumFromThen, enumFromThenTo, enumFromTo, error, even, exp, exponent, fail, filter, flip, floatDigits, floatRadix, floatRange, floor, fmap, foldl, foldl1, foldr, foldr1, fromDouble, fromEnum, fromInt, fromInteger, fromIntegral, fromRational, fst, gcd, getChar, getContents, getLine, head, id, inRange, index, init, intToDigit, interact, ioError, isAlpha, isAlphaNum, isAscii, isControl, isDenormalized, isDigit, isHexDigit, isIEEE, isInfinite, isLower, isNaN, isNegativeZero, isOctDigit, isPrint, isSpace, isUpper, iterate, last, lcm, length, lex, lexDigits, lexLitChar, lines, log, logBase, lookup, map, mapM, mapM_, max, maxBound, maximum, maybe, min, minBound, minimum, mod, negate, not, notElem, null, numerator, odd, or, ord, otherwise, pi, pred, primExitWith, print, product, properFraction, putChar, putStr, putStrLn, quot, quotRem, range, rangeSize, read, readDec, readFile, readFloat, readHex, readIO, readInt, readList, readLitChar, readLn, readOct, readParen, readSigned, reads, readsPrec, realToFrac, recip, rem, repeat, replicate, return, reverse, round, scaleFloat, scanl, scanl1, scanr, scanr1, seq, sequence, sequence_, show, showChar, showInt, showList, showLitChar, showParen, showSigned, showString, shows, showsPrec, significand, signum, sin, sinh, snd, span, splitAt, sqrt, subtract, succ, sum, tail, take, either, elem, encodeFloat, enumFrom, enumFromThen, enumFromThenTo, enumFromTo, error, even, exp, exponent, fail, filter, flip, floatDigits, floatRadix, floatRange, floor, fmap, takeWhile, tan, tanh, threadToIOResult, toEnum, toInt, toInteger, toLower, toRational, toUpper, truncate, uncurry, undefined, unlines, until, unwords, unzip, unzip3, userError, words, writeFile, zip, zip3, zipWith, zipWith3 -- type constructors Bool, Char, Double, Either, Float, IO, Integer, Int, Maybe, Ordering, Rational, Ratio, ReadS, ShowS, String -- classes Bounded, Enum, Eq, Floating, Fractional, Functor, Integral, Ix, Monad, Num, Ord, Read, RealFloat, RealFrac, Real, Show -- data constructors EQ, False, GT, Just, LT, Left, Nothing, Right, True libsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/samples/highlight.dox0000644000175000017500000002540212027556043026056 0ustar gregoagregoaThis is a pseudo doxygen file to test Kate's doxyge syntax highlighting. Normal text, no HL. =================== a multiline comment may begin with a /*! */, too. That should work, because it is the same "entrance rule". popping tests: /** multiline */ end of doxygen HL mode /*! multiline */ end of doxygen HL mode //! singleline, where */ should be ignored! still doxygen HL mode /// singleline, where */ should be ignored! still doxygen HL mode ///< singleline, where */ should be ignored! still doxygen HL mode begin and end immediately: /********/ actually no doxygen comment - used for "info boxes" :) /**/ <-- it really works --- end of doxygen HL mode /*!*/ end of doxygen HL mode /** \code rest of line is normal comment HL */ end of doxygen HL mode /** \code rest of line is normal comment HL * comment HL mode */ end of doxygen HL mode /** \file aword rest of line is normal comment HL */ end of doxygen HL mode /** \file */aword <-- pop! no doxygen HL mode /** \file aword rest of line is normal comment HL * comment HL mode */ end of doxygen HL mode /** \brief A short description */ end of doxygen HL mode /** \brief */A <-- pop! end of doxygen HL mode /** \brief A short description * comment HL mode */ end of doxygen HL mode /** \page aword rest of line is string */ end of doxygen HL mode /** \page */aword <-- pop! end of doxygen HL mode /** \page aword rest of line is string * comment HL mode */ end of doxygen HL mode /** \image aword aword rest of line is normal HL */ end of doxygen HL mode /** \image aword */aword <-- pop! end of doxygen HL mode /** \image */aword aword <-- pop! end of doxygen HL mode /** \image aword aword rest of line is normal HL * comment HL mode */ end of doxygen HL mode Tests for HTML tags in doxygen HL mode: ======================================= /** */ end of doxygen HL mode /** end of doxygen HL mode /** end of doxygen HL mode /** end of doxygen HL mode /** end of doxygen HL mode /** end of doxygen HL mode /** end of doxygen HL mode /** end of doxygen HL mode /** end of doxygen HL mode /** end of doxygen HL mode /** */ end of doxygen HL mode /** end of doxygen HL mode /** end of doxygen HL mode /** end of doxygen HL mode /** end of doxygen HL mode /** end of doxygen HL mode /** end of doxygen HL mode /** end of doxygen HL mode /** end of doxygen HL mode /** end of doxygen HL mode /** <*/a href="blubb"> end of doxygen HL mode //! */ stay in doygen HL mode //! stay in doygen HL mode //! stay in doygen HL mode //! stay in doygen HL mode //! stay in doygen HL mode //! stay in doygen HL mode //! */ stay in doygen HL mode //! stay in doygen HL mode //! stay in doygen HL mode //! stay in doygen HL mode //! stay in doygen HL mode //! stay in doygen HL mode //! stay in doygen HL mode //! stay in doygen HL mode //! stay in doygen HL mode //! stay in doygen HL mode //! <*/a href="blubb"> stay in doygen HL mode //! stay in doygen HL /** \code rest of line is normal comment HL */ end of doxygen HL mode /** \code rest of end of doxygen HL mode /** \code rest of end of doxygen HL mode /** \code rest of end of doxygen HL mode /** \code rest of end of doxygen HL mode /** \code rest of end of doxygen HL mode /** \code rest of end of doxygen HL mode /** \code rest of end of doxygen HL mode /** \code rest <*/a href="blubb"> of end of doxygen HL mode /** \code rest of line is normal comment HL * comment HL mode text */ end of doxygen HL mode /** \file aword rest of line is normal comment HL */ end of doxygen HL mode /** \file awo*/rd end of doxygen HL mode /** \file aword end of doxygen HL mode /** \file awo<*/html_should_be_ignored_here>rd end of doxygen HL mode /** \file a*/word end of doxygen HL mode /** \file aword rest of line is normal comment HL * comment HL mode */ end of doxygen HL mode /** \brief A short of description */ end of doxygen HL mode /** \brief A short of end of doxygen HL mode /** \brief A short of end of doxygen HL mode /** \brief A short of end of doxygen HL mode /** \brief A short of end of doxygen HL mode /** \brief A short of end of doxygen HL mode /** \brief A short of <*//a href='blubb'> end of doxygen HL mode /** \brief A short of end of doxygen HL mode /** \brief A short of end of doxygen HL mode /** \brief A short of end of doxygen HL mode /** \brief A short of end of doxygen HL mode /** \brief A short of end of doxygen HL mode /** \brief A short of end of doxygen HL mode /** \brief A short of description * comment HL mode */ end of doxygen HL mode /** \page aword A short of description */ end of doxygen HL mode /** \page aword A short of end of doxygen HL mode /** \page aword A short of end of doxygen HL mode /** \page aword A short of end of doxygen HL mode /** \page aword A short of end of doxygen HL mode /** \page aword A short of end of doxygen HL mode /** \page aword A short of <*//a href='blubb'> end of doxygen HL mode /** \page aword A short of end of doxygen HL mode /** \page aword A short of end of doxygen HL mode /** \page aword A short of end of doxygen HL mode /** \page aword A short of end of doxygen HL mode /** \page aword A short of end of doxygen HL mode /** \page aword A short of end of doxygen HL mode /** \page aword A short <*/a href="blubb"> of end of doxygen HL mode /** \page aword A shor*/t of end of doxygen HL mode /** \page awor*/d A short of end of doxygen HL mode /** \page */aword A short of end of doxygen HL mode /** \page aword A short of description * comment HL mode */ end of doxygen HL mode /** \image aword aword rest of line is normal HL */ end of doxygen HL mode /** \image aword aword rest of line is*/ end of doxygen HL mode /** \image aword aword*/ end of doxygen HL mode /** \image aword aw*/ord end of doxygen HL mode /** \image aword */aword end of doxygen HL mode /** \image aword*/ end of doxygen HL mode /** \image awo*/rd end of doxygen HL mode /** \image */aword end of doxygen HL mode /** \ima*/ge end of doxygen HL mode /** \image aword aword rest of line is normal HL * comment HL mode */ end of doxygen HL mode Some further tests for singlelinecomments (* / should not pop!) =============================================================== /// a singlelinecommment blubb blubb */. stay in doxygen HL mode /// \code a singlelinecommment blubb b*/lubb. stay in doxygen HL mode /// \code*/ a singlelinecommment blubb blubb. stay in doxygen HL mode /// \code a singlelinecommment blubb blubb /// \brief a descriptive text (string) stay in doxygen HL mode /// \brief a descriptive text (string)*/ description should go on here /// \brief a descriptive text */(string) description should go on here /// \brief */a descriptive text (string) description should go on here /// \ref aword a descriptive text (string) */ description should go on here /// \ref aword a descriptive text (str*/ing) description should go on here /// \ref aword a des*/criptive text (string) description should go on here /// \ref aword*/ a descriptive text (string) description should go on here /// \ref aw*/ord a descriptive text (string) description should go on here /// \ref */aword a descriptive text (string) description should go on here HTML comment tests: =================== //! \ref word descriptive text (string) normal HL mode. //! \ref w descriptive text (string) /** \ref word descriptive text (string) normal HL mode. /** \ref w * normal doxygen HL mode. */ And final tests for a word: a single char: =========================================== //! \ref word descriptive text (string) //! \ref w descriptive text (string) //! \image word1 word2 b descriptive text (string) //! \image a word b descriptive text (string) //! \brief A b c d e description should go on here //! \file word rest of line is normal comment HL //! \file a word rest of line is normal comment HL no doxygen HL mode here. == END OF TESTFILE ==libsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/samples/highlight.uc0000644000175000017500000001360712027556043025677 0ustar gregoagregoa//============================================================================= // Shield Gun //============================================================================= class ShieldGun extends Weapon config(user); #EXEC OBJ LOAD FILE=InterfaceContent.utx var Sound ShieldHitSound; var String ShieldHitForce; replication { reliable if (Role == ROLE_Authority) ClientTakeHit; } simulated function DoAutoSwitch() { } simulated event RenderOverlays( Canvas Canvas ) { local int m; if ((Hand < -1.0) || (Hand > 1.0)) { for (m = 0; m < NUM_FIRE_MODES; m++) { if (FireMode[m] != None) { FireMode[m].DrawMuzzleFlash(Canvas); } } } Super.RenderOverlays(Canvas); } // AI Interface function GiveTo(Pawn Other, optional Pickup Pickup) { Super.GiveTo(Other, Pickup); if ( Bot(Other.Controller) != None ) Bot(Other.Controller).bHasImpactHammer = true; } function bool CanAttack(Actor Other) { return true; } simulated function Timer() { local Bot B; if (ClientState == WS_BringUp) { // check if owner is bot waiting to do impact jump B = Bot(Instigator.Controller); if ( (B != None) && B.bPreparingMove && (B.ImpactTarget != None) ) { B.ImpactJump(); B = None; } } Super.Timer(); if ( (B != None) && (B.Enemy != None) ) BotFire(false); } function FireHack(byte Mode) { if ( Mode == 0 ) { FireMode[0].PlayFiring(); FireMode[0].FlashMuzzleFlash(); FireMode[0].StartMuzzleSmoke(); IncrementFlashCount(0); } } /* BestMode() choose between regular or alt-fire */ function byte BestMode() { local float EnemyDist; local bot B; B = Bot(Instigator.Controller); if ( (B == None) || (B.Enemy == None) ) return 1; EnemyDist = VSize(B.Enemy.Location - Instigator.Location); if ( EnemyDist > 2 * Instigator.GroundSpeed ) return 1; if ( (B.MoveTarget != B.Enemy) && ((EnemyDist > 0.5 * Instigator.GroundSpeed) || (((B.Enemy.Location - Instigator.Location) Dot vector(Instigator.Rotation)) <= 0)) ) return 1; return 0; } // super desireable for bot waiting to impact jump function float GetAIRating() { local Bot B; local float EnemyDist; B = Bot(Instigator.Controller); if ( B == None ) return AIRating; if ( B.bPreparingMove && (B.ImpactTarget != None) ) return 9; if ( B.PlayerReplicationInfo.HasFlag != None ) { if ( Instigator.Health < 50 ) return AIRating + 0.35; return AIRating + 0.25; } if ( B.Enemy == None ) return AIRating; EnemyDist = VSize(B.Enemy.Location - Instigator.Location); if ( B.Stopped() && (EnemyDist > 100) ) return 0.1; if ( (EnemyDist < 750) && (B.Skill <= 2) && !B.Enemy.IsA('Bot') && (ShieldGun(B.Enemy.Weapon) != None) ) return FClamp(300/(EnemyDist + 1), 0.6, 0.75); if ( EnemyDist > 400 ) return 0.1; if ( (Instigator.Weapon != self) && (EnemyDist < 120) ) return 0.25; return ( FMin(0.6, 90/(EnemyDist + 1)) ); } // End AI interface function AdjustPlayerDamage( out int Damage, Pawn InstigatedBy, Vector HitLocation, out Vector Momentum, class DamageType) { local int Drain; local vector Reflect; local vector HitNormal; local float DamageMax; DamageMax = 100.0; if ( DamageType == class'Fell' ) DamageMax = 20.0; else if( !DamageType.default.bArmorStops || (DamageType == class'DamTypeShieldImpact' && InstigatedBy == Instigator) ) return; if ( CheckReflect(HitLocation, HitNormal, 0) ) { Drain = Min( Ammo[1].AmmoAmount*2, Damage ); Drain = Min(Drain,DamageMax); Reflect = MirrorVectorByNormal( Normal(Location - HitLocation), Vector(Instigator.Rotation) ); Damage -= Drain; Momentum *= 1.25; Ammo[1].UseAmmo(Drain/2); DoReflectEffect(Drain/2); } } function DoReflectEffect(int Drain) { PlaySound(ShieldHitSound, SLOT_None); ShieldAltFire(FireMode[1]).TakeHit(Drain); ClientTakeHit(Drain); } simulated function ClientTakeHit(int Drain) { ClientPlayForceFeedback(ShieldHitForce); ShieldAltFire(FireMode[1]).TakeHit(Drain); } function bool CheckReflect( Vector HitLocation, out Vector RefNormal, int AmmoDrain ) { local Vector HitDir; local Vector FaceDir; if (!FireMode[1].bIsFiring || Ammo[0].AmmoAmount == 0) return false; FaceDir = Vector(Instigator.Controller.Rotation); HitDir = Normal(Instigator.Location - HitLocation + Vect(0,0,8)); //Log(self@"HitDir"@(FaceDir dot HitDir)); RefNormal = FaceDir; if ( FaceDir dot HitDir < -0.37 ) // 68 degree protection arc { if (AmmoDrain > 0) Ammo[0].UseAmmo(AmmoDrain); return true; } return false; } function AnimEnd(int channel) { if (FireMode[0].bIsFiring) { LoopAnim('Charged'); } else if (!FireMode[1].bIsFiring) { Super.AnimEnd(channel); } } function float SuggestAttackStyle() { return 0.8; } function float SuggestDefenseStyle() { return -0.8; } simulated function float ChargeBar() { return FMin(1,FireMode[0].HoldTime/ShieldFire(FireMode[0]).FullyChargedTime); } defaultproperties { ItemName="Shield Gun" IconMaterial=Material'InterfaceContent.Hud.SkinA' IconCoords=(X1=200,Y1=281,X2=321,Y2=371) bShowChargingBar=true bCanThrow=false FireModeClass(0)=ShieldFire FireModeClass(1)=ShieldAltFire InventoryGroup=1 Mesh=mesh'Weapons.ShieldGun_1st' BobDamping=2.2 PickupClass=class'ShieldGunPickup' EffectOffset=(X=15.0,Y=6.7,Z=1.2) bMeleeWeapon=true ShieldHitSound=Sound'WeaponSounds.ShieldGun.ShieldReflection' DrawScale=0.4 PutDownAnim=PutDown DisplayFOV=60 PlayerViewOffset=(X=2,Y=-0.7,Z=-2.7) PlayerViewPivot=(Pitch=500,Roll=0,Yaw=500) UV2Texture=Material'XGameShaders.WeaponEnvShader' AttachmentClass=class'ShieldAttachment' SelectSound=Sound'WeaponSounds.ShieldGun_change' SelectForce="ShieldGun_change" ShieldHitForce="ShieldReflection" AIRating=0.35 CurrentRating=0.35 DefaultPriority=2 } libsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/samples/xorg.conf0000644000175000017500000001211111735774352025224 0ustar gregoagregoa# nvidia-settings: X configuration file generated by nvidia-settings # nvidia-settings: version 1.0 (buildmeister@builder26) Wed Sep 12 14:29:53 PDT 2007 # /.../ # SaX generated X11 config file # Created on: 2007-10-20T17:28:54+0200. # # Version: 8.1 # Contact: Marcus Schaefer , 2005 # Contact: SaX-User list # # Automatically generated by [ISaX] (8.1) # PLEASE DO NOT EDIT THIS FILE! # Section "ServerLayout" Identifier "Layout[all]" Screen 0 "Screen0" 0 0 InputDevice "Keyboard[0]" "CoreKeyboard" InputDevice "Mouse[1]" "CorePointer" Option "Clone" "off" Option "Xinerama" "off" EndSection Section "Files" InputDevices "/dev/gpmdata" InputDevices "/dev/input/mice" FontPath "/usr/share/fonts/misc:unscaled" FontPath "/usr/share/fonts/local" FontPath "/usr/share/fonts/75dpi:unscaled" FontPath "/usr/share/fonts/100dpi:unscaled" FontPath "/usr/share/fonts/Type1" FontPath "/usr/share/fonts/URW" FontPath "/usr/share/fonts/Speedo" FontPath "/usr/share/fonts/PEX" FontPath "/usr/share/fonts/cyrillic" FontPath "/usr/share/fonts/latin2/misc:unscaled" FontPath "/usr/share/fonts/latin2/75dpi:unscaled" FontPath "/usr/share/fonts/latin2/100dpi:unscaled" FontPath "/usr/share/fonts/latin2/Type1" FontPath "/usr/share/fonts/latin7/75dpi:unscaled" FontPath "/usr/share/fonts/baekmuk:unscaled" FontPath "/usr/share/fonts/japanese:unscaled" FontPath "/usr/share/fonts/kwintv" FontPath "/usr/share/fonts/truetype" FontPath "/usr/share/fonts/uni:unscaled" FontPath "/usr/share/fonts/CID" FontPath "/usr/share/fonts/ucs/misc:unscaled" FontPath "/usr/share/fonts/ucs/75dpi:unscaled" FontPath "/usr/share/fonts/ucs/100dpi:unscaled" FontPath "/usr/share/fonts/hellas/misc:unscaled" FontPath "/usr/share/fonts/hellas/75dpi:unscaled" FontPath "/usr/share/fonts/hellas/100dpi:unscaled" FontPath "/usr/share/fonts/hellas/Type1" FontPath "/usr/share/fonts/misc/sgi:unscaled" FontPath "/usr/share/fonts/xtest" FontPath "/opt/kde3/share/fonts" EndSection Section "Module" Load "dbe" Load "type1" Load "freetype" Load "extmod" Load "glx" EndSection Section "ServerFlags" Option "AllowMouseOpenFail" "on" Option "Xinerama" "0" EndSection Section "InputDevice" Identifier "Keyboard[0]" Driver "kbd" Option "Protocol" "Standard" Option "XkbLayout" "us" Option "XkbModel" "microsoftpro" Option "XkbRules" "xfree86" EndSection Section "InputDevice" Identifier "Mouse[1]" Driver "mouse" Option "Buttons" "14" Option "Device" "/dev/input/mice" Option "Name" "Logitech USB Receiver" Option "Protocol" "explorerps/2" Option "Vendor" "Sysp" Option "ZAxisMapping" "4 5" EndSection Section "Modes" Identifier "Modes[0]" ModeLine "1024x768" 78.8 1024 1040 1136 1312 768 769 772 800 ModeLine "1024x768" 78.0 1024 1040 1136 1312 768 769 772 800 -hsync -vsync EndSection Section "Monitor" Identifier "Monitor[0]" VendorName "DELL" ModelName "E771P" UseModes "Modes[0]" DisplaySize 300 225 HorizSync 30.0 - 70.0 VertRefresh 50.0 - 80.0 Option "CalcAlgorithm" "XServerPool" Option "DPMS" EndSection Section "Monitor" Identifier "Monitor0" VendorName "Unknown" ModelName "DELL E771p" HorizSync 30.0 - 70.0 VertRefresh 50.0 - 160.0 EndSection Section "Device" Identifier "Device[0]" Driver "nvidia" VendorName "NVIDIA" BoardName "GeForce 6200 TurboCache(TM)" BusID "2:0:0" EndSection Section "Device" Identifier "Videocard0" Driver "nvidia" VendorName "NVIDIA Corporation" BoardName "GeForce 6200 TurboCache(TM)" EndSection Section "Screen" Identifier "Screen[0]" Device "Device[0]" Monitor "Monitor[0]" DefaultDepth 24 SubSection "Display" Depth 15 Modes "1024x768" "800x600" EndSubSection SubSection "Display" Depth 16 Modes "1024x768" "800x600" EndSubSection SubSection "Display" Depth 24 Modes "1024x768" "800x600" EndSubSection SubSection "Display" Depth 8 Modes "1024x768" "800x600" EndSubSection EndSection Section "Screen" Identifier "Screen0" Device "Videocard0" Monitor "Monitor0" DefaultDepth 24 Option "TwinView" "0" Option "metamodes" "1280x960 +0+0; 800x600 +0+0" EndSection libsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/samples/highlight.do0000644000175000017500000000560412027556043025670 0ustar gregoagregoa/* Test file for kate's stata syntax highlighting */ *! version 1.2.0 2mar2003 E. Leuven program define spellsplit version 7 syntax [anything], spell(varlist min=2 max=2) [ by(varlist)] tokenize `spell' local date0 `1' local date1 `2' local f0 : format `date0' local f1 : format `date1' /* set default statistic */ local current "mean" gettoken left anything : anything, match(prns) while "`left'"!="" { if "`prns'"!="" { if !inlist("`left'","mean","sum") { di as error "Statistic `left' not supported" exit 198 } local current "`left'" } else { local `current'vars ``current'vars' `left' } gettoken left anything : anything, match(prns) } if ("`meanvars'"!="") { confirm var `meanvars' unab meanvars : `meanvars' } if ("`sumvars'"!="") { confirm var `sumvars' unab sumvars : `sumvars' } quietly { g _count = 1 local xvars `meanvars' `sumvars' _count /* create dummy by-var if no by option is specified */ if "`by'"=="" { tempvar by g byte `by' = 1 } tempvar `xvars' `by' /* create negative for subtraction when spell ends */ cap foreach v of varlist `xvars' { g double ``v'' = -`v' local txvars `txvars' ``v'' } cap foreach v of varlist `by' { g double ``v'' = `v' local txvars `txvars' ``v'' } stack `date0' `xvars' `by' `date1' `txvars', into(`date0' `xvars' `by') clear /* calculate totals per date */ cap foreach v of varlist `xvars' { egen double ``v'' = sum(`v'), by(`by' `date0') } /* unique dates only */ by `by' `date0', sort: keep if _n==1 /* calculate totals (+ when spell starts - when ends) */ sort `by' cap foreach v of varlist `xvars' { by `by': replace `v' = sum(``v'') } by `by': g `date1' = `date0'[_n + 1] drop if `date0'>`date1' drop _stack drop if _count==0 order `by' `date0' `date1' `xvars' format `date0' `f0' format `date1' `f1' cap for var `meanvars': replace X = X/_count compress } endlibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/samples/highlight.sp0000644000175000017500000000124512027556043025705 0ustar gregoagregoa*current sink p-type inverter - dc sweep of voltage I/O *file:invcsp0.sp *parameters .PARAM ww=38.5 $ parameter for width which will be swept *circuit net list Vdd vdd GND dc 5.0 Vbias bias GND dc 2.5 Vin src GND dc 0.0 Mn out bias GND GND nmosl1 W=16 L=8 Mp out in vdd vdd pmosl1 W=ww L=8 Cl out GND 0.01P Rs src in 10K *options & analysis .OPTIONS POST=2 SCALE=1U $ output results for plot; scale mosfet L & W dimensions .DC Vin 0 5 0.1 $sweep I/P voltage .MEASURE DC vin_bal WHEN V(out)=2.5 *output .plot DC v(src) v(in) v(out) *mosfet models - level 1 .INC 'l1typ.inc' $ a comment * another comment .END libsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/samples/highlight.pike0000644000175000017500000000114712027556043026214 0ustar gregoagregoa#! /bin/env pike /* This file is a syntax highlight test for Kate. * FIXME: Improve it to contain more (and more unusual) syntax examples. */ #define PIKE_ON_THE_WEB /* Is this address correct? */ "http://pike.ida.liu.se/" int main(int argc, array(string) args) { // Write funny things with Pike :) write(`+("Command line arguments (%d of them): ", @map(args, `+, " ")) + "\n", argc); write("\nVisit Pike site at %s\n\n", PIKE_ON_THE_WEB); for (int i = 1; i <= 3; i++) write(":" + ")" * i + " "); write("\n" + ({"Bye", "bye"}) * "-" + "!\n"); return 0; } libsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/samples/highlight.pl0000644000175000017500000000142412027556043025675 0ustar gregoagregoa#!/usr/bin/perl -w # This is a pseudo Perl file to test Kate's Perl syntax highlighting. # TODO: this is incomplete, add more syntax examples! $VERSION = sprintf '4.%03d', q$Revision: #24 $ =~ /\D(\d+)\s*$/; sub prg($) { my $var = shift; '\'\\' $var =~ s/bla/foo/igs; $var =~ s!bla!foo!igs; $var =~ s#bla#foo#igs; $var =~ tr/a-z/A-Z/; ($match) = ($var =~ m/(.*?)/igs); $test = 2/453453.21; $test /= 2; print qq~d fsd fsdf sdfl sd~ $" = '/'; $foo = <<__EOF; d ahfdklf klsdfl sdf sd fsd sdf sdfsdlkf sd __EOF $x = "dasds"; next if( $match eq "two" ); next if( $match =~ /go/i ); @array = (1,2,3); # a comment @array = qw(apple foo bar); push(@array, 4); %hash = (red => 'rot', blue => 'blau'); print keys(%hash); } sub blah { } &blah; prg("test"); libsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/samples/highlight.html0000644000175000017500000000614412027556043026232 0ustar gregoagregoa Tk::CodeText - a TextUndo widget with syntax highlighting capabilities


NAME

Tk::CodeText - a TextUndo widget with syntax highlighting capabilities


SYNOPSIS

 use Tk;
 require Tk::CodeText;
 my $m = new MainWindow;
 my $e = $m->Scrolled('CodeText',
        -disablemenu => 1,
        -syntax => 'Perl',
        -scrollbars => 'se',
 )->pack(-expand => 1, -fill => 'both');
 $m->configure(-menu => $e->menu);
 $m->MainLoop;


DESCRIPTION

Tk::CodeText inherits Tk::TextUndo and all its options and methods. Besides syntax highlighting, methods are provided for commenting and uncommenting as well as indenting and unindenting a selected area, matching pairs of braces, brackets and brackets and curlies and automatic indenting of new lines.

Syntax highlighting is done through a plugin approach. Currently there is support for Perl, Pod, HTML and Xresources. Adding languages is a matter of writing plugin modules. Theoretically this is not limited to programming languages. The plugin approach could also provide the possibility for grammar or spell checking in spoken languages.


OPTIONS

Name: autoindent
Class: Autoindent
Switch: -autoindent
Boolean, when you press the enter button, should the next line begin at the same position as the current line or not. By default false.

Name: commentchar
Class: Commentchar
Switch: -commentchar
By default ``#''.
libsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/samples/highlight.js0000644000175000017500000000650712027556043025705 0ustar gregoagregoa/* test.js - test for javascript.xml syntax file */ // Note: this script will not, and is not supposed to, comile in any js engine. /* NOTE: The words "todo", "fixme" and "note" should be rendered in a different style within comments, match should be caseless (to test for regexp insensitive attribute). The regex used for this rule is */ String = /\b(?:fixme|todo|note)\b/ /* Thus, for example "Notebook" is not caught by this rule. (the "?:" in the subpattern is there to avoid the regex engine wasting time saving a backref, which is not used for anything. I do not know if the overhead of parsing that is greater than the time saved by not capturing the text...) The rule for catching these words is placed in a context "Comment common", which is used by both comment contexts (single line, multiline) using the new "IncludeRules" item. */ // test if regex support works - nice with new fallthrough prop in context:) somestring.replace( /dooh/ , "bah!"); re=/foo/ig; // hehe somestring.search( /^foo\w+\s\d{0,15}$/ ); re = /dooh/; // This is supposedly legal: re = somebool ? /foo/ : /bar/; // NOTE - Special case: an empty regex, not a comment. // The rule uses a positive lookahead assertion to catch it: "//(?=;)". re = //; re = /a|b/; /* Tests for the regex parser. It will parse classes, quanitfiers, special characters and regex operaters, as specified in the netscape documentation for javascript. Regexps are only parsed in their clean form, as the RegExp(string) constructor is using a quoted string. TODO: Find out if more regex feats should be supported. Consider using more itemDatas - assertion, quantifier are options. */ re = /^text\s+\d+\s*$/; re = /a pattern with caret \(^\) in it/; re = /(\d{0,4})\D/; re = /[a-zA-Z_]+/; re = /[^\d^]+/; re = /\s+?\w+\.$/; re = /\/\//; re = /a|b/; // a test if #pop back from a comment will work re = /*/foo/*/ /bar/; // ^ POP // ^ we got back after pop in comment, if there is regexp attribs here :-) /* Some tests if the fallthrough works. The fallthrough happens if a regexp is not found in a possible (!) position, which is after "search(" or "replace(" or "=" or "?" or ":" in version 0.1 of the xml file */ var foo = 'bar'; // ^ fallthrough! somestring.replace( new RegExp("\\b\\w+\\b"), "word: $1"); // ^ fallthrough expected. ("new" whould be bold) something.method = function ( a, b, c ) { /* ... */ } // ^ fallthrough ?! something.other = function ( d, e, f ) { /* ... */ } // fallthrough expected at col 0 ("function" should be bold) var ary = new Array(5); // ^ fallthrough ? (if keyword is correctly rendered) var b = a ? 1 : 0; // ^ ^ fallthroughs. numbers must be rendered correctly. var c = d ? true : false; var conditinalstring = b ? "something" : "something else"; // guess... /* Normal program flow... */ if (something) dostuff(); else dont(); return; try { bla() } catch (e) { alert("ERROR! : " + e) } for (int i=0; i < j; i++) document.write("i is" + i + "
"); while (something) { block(); picky: if (!1) break; else continue; } with (a) { do { stuff( b ); // a.b if it exists } while (itmakessense); } switch (i) { case 0: f(); break; default: break; } libsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/samples/highlight.m3u0000644000175000017500000000141311735774352025776 0ustar gregoagregoa#EXTM3U #EXTINF:189,Amália Rodrigues - Who Will Buy 01. Amália Rodrigues - Who Will Buy.mp3 #EXTINF:210,Amália Rodrigues - Long Ago And Far Away 02. Amália Rodrigues - Long Ago And Far Away.mp3 #EXTINF:232,Amália Rodrigues - All The Things You Are 03. Amália Rodrigues - All The Things You Are.mp3 #EXTINF:174,Amália Rodrigues - Blue Moon 04. Amália Rodrigues - Blue Moon.mp3 #EXTINF:200,Amália Rodrigues - Summertime 05. Amália Rodrigues - Summertime.mp3 #EXTINF:179,Amália Rodrigues - The Nearness Of You 06. Amália Rodrigues - The Nearness Of You.mp3 #EXTINF:177,Amália Rodrigues - I Can't Begin To Tell You 07. Amália Rodrigues - I Can't Begin To Tell You.mp3 #EXTINF:170,Amália Rodrigues - I Can't Help Loving The Man 08. Amália Rodrigues - I Can't Help Loving The Man.mp3 libsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/samples/highlight.jsp0000644000175000017500000001270212027556043026057 0ustar gregoagregoa<%-- This page won't actually work, as it is simply designed to display jsp syntax highlighting. --%> <%@ page info="A Page to Test Kate Jsp Syntax Highlighting" language="java" errorPage="/test-error-page.jsp"%> <%@ include file="/include/myglobalvars.jsp"%> --%> <%@ page import="java.util.*, java.io.*, java.math.*" %> <%@ taglib uri="/WEB-INF/lib/si_taglib.tld" prefix="si"%> <% // We can decipher our expected parameters here. String parm1 = noNull(request.getParameter(PARAMETER_1)).trim(); String parm2 = noNull(request.getParameter(PARAMETER_2)).trim(); String parm3 = noNull(request.getParameter(PARAMETER_3)).trim(); String parm4 = noNull(request.getParameter(PARAMETER_4)).trim(); String parm5 = noNull(request.getParameter(PARAMETER_5)).trim(); // A sample collection of Integers to display some code folding. List intList = getIntList(10); %> A Sample Jsp <%-- The top label table. --%>
The following parameters were detected:
<%-- Display the parameters which might have been passed in. --%> <%-- Label; Actual Parameter String; Value Detected --%> <%-- Label; Actual Parameter String; Value Detected --%> <%-- Label; Actual Parameter String; Value Detected --%> <%-- Label; Actual Parameter String; Value Detected --%> <%-- Label; Actual Parameter String; Value Detected --%>
PARAMETER_1 <%=PARAMETER_1%> "<%=parm1%>"
PARAMETER_2 <%=PARAMETER_2%> "<%=parm2%>"
PARAMETER_3 <%=PARAMETER_3%> "<%=parm3%>"
PARAMETER_4 <%=PARAMETER_4%> "<%=parm4%>"
PARAMETER_5 <%=PARAMETER_5%> "<%=parm5%>"


<%-- Display our list of random Integers (shows code folding). --%> <% if (intList != null && intList.size() > 0) { %> <% Iterator intListIt = intList.iterator(); while (intListIt.hasNext()) { Integer i = (Integer) intListIt.next(); %> <% } } else { %> <% } %>
Here are the elements of intList...
<%=i.toString()%>
Oooops, we forgot to initialize intList!


<%-- We can call javascript functions. --%>
Test our javascript...


<%-- If we actually had defined a tag library. --%>


<%-- Expression language. --%>
myParam's value: ""
<%! /* A place for class variables and functions... */ // Define some sample parameter names that this page might understand. private static final String PARAMETER_1 = "p1"; private static final String PARAMETER_2 = "p2"; private static final String PARAMETER_3 = "p3"; private static final String PARAMETER_4 = "p4"; private static final String PARAMETER_5 = "p5"; // Returns str trimmed, or an empty string if str is null. private static String noNull(String str) { String retStr; if (str == null) retStr = ""; else retStr = str.trim(); return retStr; } // Returns a list of Integers with listSize elements. private static List getIntList(int listSize) { ArrayList retList = new ArrayList(listSize); for (int i = 0; i < listSize; i++) retList.add(new Integer( (int) (Math.random() * 100) )); return retList; } %>libsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/samples/highlight_octave.m0000644000175000017500000000363512027556043027065 0ustar gregoagregoa##===================================================== % Octave test code for Kate/Kwrite syntax highlighting % (shamelessly copied from Matlab's, since the two % are very similar) % kate: hl Octave; ##===================================================== % Numbers _____________________________________________ 5, 5.5, .1, 0.1, 0.4e5, 1.2e-5, 5i, 5.3i, 6j, .345+3i 5', 5.5', .1', 0.1', 0.4e5', 1.2e-5', 5i', 5.3i', 6j', .345+3i' % Operators ___________________________________________ % relational operators 'asdf'~=4, c<=4, d>=4, ab, a==b, b||c, b&&c % elementwise arithmetic operators a.^b, a.*b a./b, 1:4:5 % single-character binary arithmetic a+3, a-3, a*2, a^3, a/3, a\3, a|b, a&b % unary operators a = ~g; g = @sfdgdsf(sdfsd,345); g.' + 1i.' - ('asdf').' % separators and delimiter (asd),[sadf];{asdf},;;,;;;() % continuation a = 1+ ... 2; % Strings and adjoint _________________________________ % incomplete strings 'string 'str'' 'str''ing 'str''\' % complete strings 'string' % simple string '''' '\'' % strings containing ' 'str''ing' % one string containing ' 'string' 'string' % two strings 'asdf' "asdf""" variable % two strings and a variable 'asdf''asdf'' fsgdfg' + (asdf)' - 'asdf'.' + []''''.';'' 'sadf'.' % string transpose % adjoint {'asdf'}' + 1 ('asdf')' + 1 ['asdf']' + 1 '' var''' % empty string, var with >1 adjoints [5]'*{5}'*('asd')'.'+(5)'*6'*asdf'*asdf'.' % many adjoints A'*B + 1 % adjoint A.'*B + 1 % transpose A.'.'*B + 1 % double transpose A'.' + 1 % adjoint, then transpose A.'' % transpose, then adjoint % System command ______________________________________ !hostname !cp * /tmp % Reserved keywords ___________________________________ function, persistent, global endfunction switch, case, otherwise endswitch if, else, elseif endif try, end_try_catch for, while, break, continue endfor endwhile return function, FUNCTION, Function % case sensitive! endfunctionlibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/samples/highlight.xml0000644000175000017500000000267312027556043026071 0ustar gregoagregoa This is a pseudo XML file to test Kate's XML syntax highlighting. Doctype: Processing instruction: Comments: Comment inside element: content Markup inside comment: Empty element: Simple element plus content: some content some content Namespace for elements and attributes: content content Elements containing allowed characters: Elements containing allowed start characters: <:element foo="test"/> <_element foo="test"/> Single quotes (the same as double quotes): content Allowed Whitespace: content Entities:   å å å И 水 Illegal XML, should not be highlighted: <0foobar> -- no digit as first character <-foo> -- no dash as first character libsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/samples/highlight.m0000644000175000017500000000336412027556043025523 0ustar gregoagregoa%%===================================================== % MATLAB test code for Kate/Kwrite syntax highlighting %%===================================================== % Numbers _____________________________________________ 5, 5.5, .1, 0.1, 0.4e5, 1.2e-5, 5i, 5.3i, 6j, .345+3i 5', 5.5', .1', 0.1', 0.4e5', 1.2e-5', 5i', 5.3i', 6j', .345+3i' % Operators ___________________________________________ % relational operators 'asdf'~=4, c<=4, d>=4, ab, a==b, b||c, b&&c % elementwise arithmetic operators a.^b, a.*b a./b, 1:4:5 % single-character binary arithmetic a+3, a-3, a*2, a^3, a/3, a\3, a|b, a&b % unary operators a = ~g; g = @sfdgdsf(sdfsd,345); g.' + 1i.' - ('asdf').' % separators and delimiter (asd),[sadf];{asdf},;;,;;;() % continuation a = 1+ ... 2; % Strings and adjoint _________________________________ % incomplete strings 'string 'str'' 'str''ing % complete strings 'string' % simple string '''' % string containing ' 'str''ing' % one string containing ' 'string' 'string' % two strings 'asdf' 'asdf''' variable % two strings and a variable 'asdf''asdf'' fsgdfg' + (asdf)' - 'asdf'.' + []''''.';'' 'sadf'.' % string transpose % adjoint {'asdf'}' + 1 ('asdf')' + 1 ['asdf']' + 1 '' var''' % empty string, var with >1 adjoints [5]'*{5}'*('asd')'.'+(5)'*6'*asdf'*asdf'.' % many adjoints A'*B + 1 % adjoint A.'*B + 1 % transpose A.'.'*B + 1 % double transpose A'.' + 1 % adjoint, then transpose A.'' % transpose, then adjoint % System command ______________________________________ !hostname !cp * /tmp % Reserved keywords ___________________________________ function, persistent, global switch, case, otherwise if, else, elseif try, catch for, while, break, continue end, return function, FUNCTION, Function % case sensitive!libsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/samples/highlight.awk0000644000175000017500000000066512027556043026052 0ustar gregoagregoa#!/usr # AWK hl test # BEGIN and END are also matched as patterns BEGIN { p = 0; } /some pattern/ { p++; } # / inside brackets is not considered end of expression # a loose division operator (/) is not mismatched as a pattern. $1 =~ /[^abc/]def/ || b == 3 / 5 { gsub ( FILENAME ); } # TODO and FIXME also work in comments in Awk. # Also backslash in patterns works. /\/usr\/bin\/awk/ { print "This is me"; } END { print p; } libsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/samples/highlight.scheme0000644000175000017500000001101012027556043026516 0ustar gregoagregoa; This is a test file to test kates scheme highlighting ; This is a comment ;; Another comment, usually used. ;BEGIN region marker ;; a vektor #(1 2 3 4 5) ;END region marker ;; this represents integer 28 (FIXME: does not work perfectly atm!) 28 028 #e28 #i28 ;; Normal, normal, exact, inexact #b11100 #o34 #d28 #x1c ;; Bin, okt, dec, hex #oe34 #eo34 ;; combined. ;; char. (#\y #\space) ;; list: `y' space. (#\ #\\ #\)) ;; list of spaces, backslash and`)'. #\newline ;; a newline-char #\NewLine ;; another one :) "Hello, world" ;; a string "hoho, what do you want to do ;; this is NO comment with that?" ;; R5RS definiert diese beiden. "Das ist \"in Anführungszeichen\" und mit \\ Backslash." (let ((x (+ 1 2)) (y "blah")) ;; `let' highlighting. (and (number? x) ;; `and' highlighting. (string? y))) (let* ((x 2) (y (+ x 1))) ;; `let*' too. (or (negative? x) ;; `or' anyways. (negative? y))) (do ((vec (make-vector 5)) ;; `do' you may guess! (i 0 (+ i 1))) ((= i 5) vec) (vector-set! vec i i)) (quasiquote ((+ 1 2) (unquote (+ 1 2)))) ;; same as: `((+ 1 2) ,(+ 1 2)) ;; see above. (quasiquote ((+ 1 2) (unquote-splicing (list 1 2 3)))) ;; same as: `((+ 1 2) ,@(+ 1 2)) ;; not necessary. (quote ()) (cond ((string? x) (string->symbol x)) ;; `cond' highlighting. ((symbol? x) => (lambda (x) x)) ;; `=>' highlighting. (else ;; `else' highlighting. (error "Blah"))) (case x ;; `case' highlighting. ((#t) 'true) ((#f) 'false) ((()) 'null) ((0) 'zero)) ;; highlight `let-syntax' and `syntax-rules' . (let-syntax ((when (syntax-rules () ((when test stmt1 stmt2 ...) ;; hl `begin' . (if test (begin stmt1 stmt2 ...)))))) (let ((if #t)) ;; here`if' is actually no keyword. (when if (set! if 'now)) ;; nor here. if)) (letrec-syntax ...) ;; hl `letrec-syntax'. (define-syntax when (syntax-rules () ((when test stmt1 stmt2 ...) (if test (begin stmt1 stmt2 ...)))))) ;; variable definitions. (define natural-numbers ;; hl `define' and the var name ;; endless stream of all natual numbers. (letrec ((next-cell ;; hl `letrec'. (lambda (x) ;; hl `lambda'. ;; hl `delay' . (cons x (delay (next-cell (+ x 1))))))) (next-cell 0))) ;; a procedure with unusual but allowed name. (define 1+ (lambda (x) (+ x 1))) ;; a predicate (define between? (lambda (x y z) (if (and (>= x y) (<= x z)) #t ;; True #f))) ;; False. ;; imperative procedure (define set-something! (lambda (required-argument another-one . all-remaining-args) (set-car! another-one (lambda all-args (set-cdr! required-argument (append all-remaining-args all-args)))))) (define compose (lambda (f g) (lambda (x) (f (g x))))) ;; syntactical sugar for procedure-definitions. (define (compose f g) (lambda (x) (f (g x)))) ;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; NOW: Guile extensions ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; procedure-generator. (define ((compose f g) x) (f (g x))) ;; scheme doesn't say, which chars may be in variables... ;; At least: Guile accepts umlauts (define-private (timetr??? sprache) ;; hl `define-private'. (list-dialekt? sprache)) (define-public x #t) ;; hl `define-public'. (define-module (foo bar)) ;; hl `define-module'. (define-macro (neither . exprs) ;; hl `define-macro'. `(and ,@(map (lambda (x) `(not ,x)) exprs))) (defmacro neither exprs ;; `defmacro' as well. `(and ,@(map (lambda (x) `(not ,x)) exprs))) ;; hl, but I really don't know what this is supposed to do :-) (define-syntax-macro ...) ;; hl GOOPS-`defines' (define-method (foo bar (baz ) qux) ...) (define-class ...) (define-generic foo) (define-accessor bar) ;; Keywords! (blah #:foo 33 #:bar 44) ;; another convention for symbols: #{foo}# #{a few lines}# #{4711}# ;; more chars. #\nul #\nl #\esc #\bs #\bel #\syn #\ack #\sp ;; etc, utc, itc, oops (this is boring) #! guile block-comment. !# ;; now, a bit hairy: #! comment !# still comment!!! !# 'now-no-comment-anymore ;; more precise: #! comment !# still comment !# still comment! !# 'now-no-comment-anymore (while (> foo 10) ;; Highlight `while'. (set! foo (- foo 1)) (catch #t ;; Highlight `catch'. (lambda () (display foo)) (lambda (key . args) (if (eq? key 'system-error) (break) ;; Highlight `break'. (continue))))) ;; Highlight `continue'.libsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/samples/highlight.lex0000644000175000017500000000250212027556043026050 0ustar gregoagregoa/* This test file tests kates Lex/Flex highlighting */ %option c++ %option yyclass="KateTester" %option yylineno /* This is a C(++) comment */ /* This one is a lex comment ! */ %{ #include #include "realparser.hpp" using namespace std; %} /* Some definitions */ DIGIT [0-9] LETTER [_a-zA-Z] %% /* Comment *shall be indented here* */ [ \t\n\r]+ /* Note: there is a bad } just here vvv */ \/\*([^\*]|\*[^/])*\*\/ { foo(a, b, c); } } /* A start condition scope... */ { "a" { /* C mode ! */ return 0; } "b" %{ /* C mode, too ! */ return 0; %} "c" return 0; // C++ comment } /* Big rule */ \"([^"\\]|\\.)*\" { yylval.string_val = new char[strlen(yytext) + 1]; int j = 0, i = 1; while (yytext[i] != '"') if (yytext[i] != '\\') yylval.string_val[j++] = yytext[i++]; else switch (yytext[i + 1]) { case 'n': yylval.string_val[j++] = '\n'; i += 2; break; default: yylval.string_val[j++] << yytext[i + 1], i += 2; } yylval.string_val[j] = 0; return TOK_STRING; } /* Dot (match all) */ . {return yylval.int_val = yytext[0];} %% // Here is pure C(++) #include int main(void) { std::cout << "Hello, World\n"; return 0; } libsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/samples/highlight.pov0000644000175000017500000000214212027556043026064 0ustar gregoagregoa//BEGIN TEST // test scene for POV-Ray syntax highlighting /* test comment */ /* nested /* comments */ do not work */ #version 3.5; //END global_settings { assumed_gamma 1.0 } // ---------------------------------------- camera { location <5.0, -12.0, 2.0> up z sky z look_at <0.0, 0.0, 0.5> angle 40 } sky_sphere { pigment { gradient z color_map { [0.0 rgb <0.6,0.7,1.0>] [0.2 rgb <0.2,0.3,0.9>] } } } light_source { <3, 1, 2>*1000 color rgb <2.2, 1.8, 1.5> } // ---------------------------------------- #declare TEST=0; #ifdef (TEST) plane { z, 0 texture { pigment { checker color rgb 1, color rgb 0 } } } #end #macro Sphere(Pos, Radius) sphere { , Radius texture { pigment { color rgb 1 } finish{ diffuse 0.3 ambient 0.0 specular 0.6 reflection 0.8 } } } #end #local Cnt=0; #local Seed=seed(0); #while (Cnt<10000) Sphere( -100+*200, 0.3+pow(rand(Seed),2)*0.7 ) #local Cnt=Cnt+1; #endlibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/samples/highlight.ahdl0000644000175000017500000000106612027556043026174 0ustar gregoagregoa-- Test file for kate's syntax highlighting Title "Test file"; -- BEGIN region (a region marker region) :) % multiline comment goes on here % -- END FUNCTION FCT (Clk, Key) RETURNS (pulse); SUBDESIGN CDCLOCK2 ( in : INPUT; -- go in out[3..0] : OUTPUT; -- come out ) VARIABLE start : soft; usec[3..0] : node; BEGIN in = FCT(clock, some_key); -- senseless code -- comment blubb = (blobb[] == H"3ff"); IF in THEN asdf -- folde me END IF; TABLE -- missing code END TABLE END; -- hex, octal, binary H"0" => B"1000000"; O"01234567";libsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/samples/highlight.css0000644000175000017500000000124312027556043026051 0ustar gregoagregoa/** * This is a pseudo CSS file to test Kate's CSS syntax highlighting. */ @import url("othersheet.css") screen, tv; body { font-size: 15pt; font-family: Verdana,Helvetica,"Bitstream Vera Sans", sans-serif; margin-top: 0px; /* yet another comment */ margin-bottom: 0px; // this is no comment, it's just broken! margin-left: 0px; margin-right: 0px; } .something { margin-right: 0px; } a:hover { } #header, p.intro:first-letter, p:lang(nl), img[align="right"] { border: 1px solid red !important; -moz-border-radius: 15px; /* unknown properties render as error */ } @media print { #header { display: none; } } /* TODO: add more tests, e.g. media */ libsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/samples/highlight.tex0000644000175000017500000000212412027556043026060 0ustar gregoagregoa% LaTeX test file for kate's syntax highlighting and code folding \ordinaryLaTeXcommandwithoption[10pt,a4paper]{article} % BEGIN region %comment, this is all ok % $ \%no comments please \\%comment % END of region \newcommand{\nohighlighting} \section{normal} \ref{blue} \pageref{blue} \cite{blue} \begin{environmentshavespecialcolors} normal \end{environmentshavespecialcolors} $equations are green, \commands somewhat darker$ normal $$equations are green, \commands somewhat darker$$ normal \( \frac{1}{2} \begin{test} \end{test} \) normal \[ %comment displaymath \] normal \begin{equation} green\darkergreen \begin{test} \test \end{test} \end{equation} \begin{equation*} green\darkergreen %comment \begin{test} \test \end{test} \%no comment \end{equation*} \{ %this should be comment \verb%this shouldn't be%and this should be normal text \begin{verbatim} text inside a verbatim environment is also treated special $ %, you can even put a \begin{verbatim} inside \end{verbatim} normal \begin{Verbatim} &@@#^%&^#$ \end{Verbatim} \begin{Verbatim*} @*&^#@*(^#(*@& \end{Verbatim*} normallibsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/samples/highlight.asm-nasm0000644000175000017500000000062712027556043027002 0ustar gregoagregoa; Example file for nasm.xml kate syntax file ; compile with `nasm example.asm -f elf -o example.o` ; and link with 'gcc example.o -o example` ; Public domain ; kate: hl Intel x86 (NASM); section .data hello dd 'Hello World', 0x0A, 0h printf_param dd '%s', 0q section .text extern printf global main main: push ebp mov ebp, esp push hello push printf_param call printf mov eax, 0b leave ret libsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/samples/highlight_lpc.c0000644000175000017500000000275112027556043026346 0ustar gregoagregoa// NOTE: This is a test file for kate's LPC syntax highlighting. // This is a Single-Line Comment /* This is a Multi- Line Comment */ // This again is a Single-Line Comment which should end here /* // And this is an evil single line comment \ which should include this and the next line because of the \ Do not use this style at home, kids. // BEGIN region marker // END of region marker private void create() { // Some Preprocessor stuff: #define SOME_STUFF if(foo("bar")) \ { \ bar("foo"); \ } // Preprocessor, Keyword, Preprocessor-String, Multiline // Some closures: #'create; #'?!; /* Some other Data Types: */ int i = 1; // Integer. float b = 2.34; // Float. int c = 0b001; // Binary int e = 0x019Beef; // Hexadecimal int f = 0o2345; // Octal string a = "Wheee"; // String string x = "Wheee\ heee"; // Multi-Line String, again, don't use this. /* Some keywords: */ if(1) { switch(2) { case 3: 4; break; } } else { return 0; } } /* WARNING: If the above function is part of a multi-line comment, it's buggy. The WARNING: itself should be a comment-keyword. That's not actually part of the language, but simply used to highlight important stuff inside comments like TODO: etc. */ libsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/samples/highlight.lhs0000644000175000017500000001064412027556043026054 0ustar gregoagregoatest file for Haskell syntax highlighting in KDE's Kate The test file for literate Haskell can be easily created like this: cat highlight.hs | sed -e "s|^|> |" -e "s|> -- ||" -e "s|^> $||" > highlight.lhs You only have to manually edit the multi-line comment below. this is a single-line comment {- this is a multi-line comment Things like "a string" or a 'c' character shouldn't be highlighted in here. I could even start a new one-line comment. -} a data definition > data Tree a = Br (Tree a) (Tree a) | Leaf a | Nil deriving (Show, Eq) function definition, "funnyfunction::", "Integer", "Int", "Bool" should be highlighted > funnyfunction::(Tree a)=>[a]->Integer->Int->Bool strings and chars first line of function definitions (type declaration) should be highlighted > strangefunction::Int->String > strangefunction 1 = "hello" > strangefunction 2 = "what's up" > strangefunction 3 = (strangefunction 1) ++ ", " ++ (strangefunction 2) > strangefunction 4 = 'a':'b':'c':'"':[] -- will return "abc" > strangefunction 5 = '\n':[] > strangefunction 6 = '\invalidhaskell':[] function name including the single quote character and infix operator (`div`) > justtesting'::Int->Int > justtesting' 2 = 2+1 > justtesting' 9 = 7 `div` 2 same definition as above, slightly different function name and a couple more whitespaces > justtesting'' :: Int -> Int > justtesting'' 2 = 3 > justtesting'' 9 = 3 + 9 - 9 the following lines are copied out of Haskell's "Prelude.hs" > infixl 7 *, /, `quot`, `rem`, `div`, `mod`, :%, % everything highlighted except the "a" > class Bounded a where > minBound, maxBound :: a > class (Num a, Ord a) => Real a where > toRational :: a -> Rational finally, some keyword lists keywords > case, class, data, deriving, do, else, if, in, infixl, infixr, instance, let, module, of, primitive, > then, type, where infix operators > quot, rem, div, mod, elem, notElem, seq this stuff is not handled yet > !!, %, &&, $!, $, *, **, -,., /=, <, <=, =<<, ==, >, >=, >>, >>=, ^, ^^, ++, || functions > FilePath, IOError, abs, acos, acosh, all, and, any, appendFile, > approxRational, asTypeOf, asin, asinh, atan, atan2, atanh, basicIORun, > break, catch, ceiling, chr, compare, concat, concatMap, const, cos, cosh, > curry, cycle, decodeFloat, denominator, digitToInt, div, divMod, drop, > dropWhile, either, elem, encodeFloat, enumFrom, enumFromThen, > enumFromThenTo, enumFromTo, error, even, exp, exponent, fail, filter, flip, > floatDigits, floatRadix, floatRange, floor, fmap, foldl, foldl1, foldr, > foldr1, fromDouble, fromEnum, fromInt, fromInteger, fromIntegral, > fromRational, fst, gcd, getChar, getContents, getLine, head, id, inRange, > index, init, intToDigit, interact, ioError, isAlpha, isAlphaNum, isAscii, > isControl, isDenormalized, isDigit, isHexDigit, isIEEE, isInfinite, isLower, > isNaN, isNegativeZero, isOctDigit, isPrint, isSpace, isUpper, iterate, last, > lcm, length, lex, lexDigits, lexLitChar, lines, log, logBase, lookup, map, > mapM, mapM_, max, maxBound, maximum, maybe, min, minBound, minimum, mod, > negate, not, notElem, null, numerator, odd, or, ord, otherwise, pi, pred, > primExitWith, print, product, properFraction, putChar, putStr, putStrLn, > quot, quotRem, range, rangeSize, read, readDec, readFile, readFloat, > readHex, readIO, readInt, readList, readLitChar, readLn, readOct, readParen, > readSigned, reads, readsPrec, realToFrac, recip, rem, repeat, replicate, > return, reverse, round, scaleFloat, scanl, scanl1, scanr, scanr1, seq, > sequence, sequence_, show, showChar, showInt, showList, showLitChar, > showParen, showSigned, showString, shows, showsPrec, significand, signum, > sin, sinh, snd, span, splitAt, sqrt, subtract, succ, sum, tail, take, > either, elem, encodeFloat, enumFrom, enumFromThen, enumFromThenTo, > enumFromTo, error, even, exp, exponent, fail, filter, flip, floatDigits, > floatRadix, floatRange, floor, fmap, takeWhile, tan, tanh, threadToIOResult, > toEnum, toInt, toInteger, toLower, toRational, toUpper, truncate, uncurry, > undefined, unlines, until, unwords, unzip, unzip3, userError, words, > writeFile, zip, zip3, zipWith, zipWith3 type constructors > Bool, Char, Double, Either, Float, IO, Integer, Int, Maybe, Ordering, Rational, Ratio, ReadS, > ShowS, String classes > Bounded, Enum, Eq, Floating, Fractional, Functor, Integral, Ix, Monad, Num, Ord, Read, RealFloat, > RealFrac, Real, Show data constructors > EQ, False, GT, Just, LT, Left, Nothing, Right, True libsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/samples/highlight.php0000644000175000017500000000051712027556043026053 0ustar gregoagregoa test"; ?> libsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/samples/highlight.exu0000644000175000017500000000417412027556043026070 0ustar gregoagregoa-- Test file for Kate's Euphoria syntax highlighting/code folding. -- BEGIN region marker test -- code here -- END region marker test -- The N Queens Problem: -- Place N Queens on an NxN chess board -- such that they don't threaten each other. constant N = 8 -- try some other sizes constant ROW = 1, COLUMN = 2 constant TRUE = 1, FALSE = 0 type square(sequence x) -- a square on the board return length(x) = 2 end type type row(integer x) -- a row on the board return x >= 1 and x <= N end type function threat(square q1, square q2) -- do two queens threaten each other? if q1[COLUMN] = q2[COLUMN] then return TRUE elsif q1[ROW] - q1[COLUMN] = q2[ROW] - q2[COLUMN] then return TRUE elsif q1[ROW] + q1[COLUMN] = q2[ROW] + q2[COLUMN] then return TRUE elsif q1[ROW] = q2[ROW] then return TRUE else return FALSE end if end function function conflict(square q, sequence queens) -- Would square p cause a conflict with other queens on board so far? for i = 1 to length(queens) do if threat(q, queens[i]) then return TRUE end if end for return FALSE end function integer soln soln = 0 -- solution number procedure print_board(sequence queens) -- print a solution, showing the Queens on the board integer k position(1, 1) printf(1, "Solution #%d\n\n ", soln) for c = 'a' to 'a' + N - 1 do printf(1, "%2s", c) end for puts(1, "\n") for r = 1 to N do printf(1, "%2d ", r) for c = 1 to N do if find({r,c}, queens) then puts(1, "Q ") else puts(1, ". ") end if end for puts(1, "\n") end for puts(1, "\nPress Enter. (q to quit) ") while TRUE do k = get_key() if k = 'q' then abort(0) elsif k != -1 then exit end if end while end procedure procedure place_queen(sequence queens) -- place queens on a NxN chess board -- (recursive procedure) row r -- only need to consider one row for each queen if length(queens) = N then soln += 1 print_board(queens) return end if r = length(queens)+1 for c = 1 to N do if not conflict({r,c}, queens) then place_queen(append(queens, {r,c})) end if end for end procedure libsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/samples/highlight.tcl0000644000175000017500000000146712027556043026053 0ustar gregoagregoa# tcl syntax highlighting sample script for Kate # # author: JM. Philippe 15/03/04 # escaped characters set String \{ set String \{ set String \" set String " \" " set String " \{ " #comments and not comments # is comments ;#is comments # is comments #

is html comment

puts ok; # is comments set String [string map { {»is not comments}} $String] set String \#not_a_comment # blocks proc test {arg1 {arg2 {}} {arg3 {fr fq r}}} { if {1} {; #comments set String \{; # not a block start } } proc test args { set String \}; # not a block end } # BEGIN - collapsable comments # blablabla # END # strings set String "feqr feqr $gqer gqe" set String "feqr feqr \" $gqer \ gqe " set String {feqr feqr \{ $gqer \ gqe } # variables set b+1 [incr b] set {incr-b} ${b+1} puts ${incr-b} libsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/samples/highlight.y0000644000175000017500000000201512027556043025527 0ustar gregoagregoa/* Yacc / Bison hl test file. * It won't compile :-) Sure ! */ %{ #include using namespace std; extern KateParser *parser; %} %locations %union { int int_val; double double_val; bool bool_val; char *string_val; char *ident_val; struct var *v; void *ptr; } %token TOK_NOT_EQUAL "!=" %token TOK_LESSER_E "<=" %token TOK_GREATER_E ">=" %token TOK_EQUAL_2 "==" %type type type_proc %% prog: KW_PROGRAM ident { parser->start($2); } prog_beg_glob_decl instructions { parser->endproc(0); } dev_procedures KW_ENDP ; number: integer_number | TOK_DOUBLE { $$ = new var; $$->type = KW_REEL; $$->cl = var::LITTERAL; $$->real = $1; }; %% #include int main(void) { puts("Hello, World!"); return 0; } libsyntax-highlight-engine-kate-perl-0.08+dfsg.orig/samples/highlight.wrl0000644000175000017500000000275412027556043026075 0ustar gregoagregoa#VRML V2.0 utf8 # # VRML highlighting test for Kate's syntax highlighting # # Keywords DEF, EXTERNPROTO, FALSE, IS, NULL, PROTO, ROUTE, TO, TRUE, USE, eventIn, eventOut, exposedField, field # Data types MFColor, MFFloat, MFInt32, MFNode. MFRotation, MFString, MFTime, MFVec2f, MFVec3f, SFBool, SFColor, SFFloat, SFImage, SFInt32, SFNode, SFRotation, SFString, SFTime, SFVec2f, SFVec3f # Predefined nodes Anchor, Appearance, AudioClip, Background, Billboard, Box, Collision, Color, ColorInterpolator, Cone, Coordinate, CoordinateInterpolator, Cylinder, CylinderSensor, DirectionalLight, ElevationGrid, Extrusion, Fog, FontStyle, Group, ImageTexture, IndexedFaceSet, IndexedLineSet, Inline, LOD, Material, MovieTexture, NavigationInfo, Normal, NormalInterpolator, OrientationInterpolator, PixelTexture, PlaneSensor, PointLight, PointSet, PositionInterpolator, ProximitySensor, ScalarInterpolator, Script, Shape, Sound, Sphere, SphereSensor, SpotLight, Switch, Text, TextureCoordinate, TextureTransform, TimeSensor, TouchSensor, Transform, Viewpoint, VisibilitySensor, WorldInfo # Some real VRML constructs to see if highlighting of int, float etc. works NavigationInfo { avatarSize [0.25, 1.6, 0.75] headlight TRUE speed 1 type ["WALK", "ANY"] visibilityLimit 0.0 } # some further testing for strings: linefeeds are allowed within strings Text { string ["some special in-string characters: \" \\ some more text in the next line and yet another line"] }