File Coverage

blib/lib/Syntax/Highlight/Engine/Kate/Clipper.pm
Criterion Covered Total %
statement 101 134 75.3
branch 66 96 68.7
condition 1 3 33.3
subroutine 10 12 83.3
pod 0 9 0.0
total 178 254 70.0


line stmt bran cond sub pod time code
1             # Copyright (c) 2005 - 2006 Hans Jeuken. All rights reserved.
2             # This program is free software; you can redistribute it and/or
3             # modify it under the same terms as Perl itself.
4              
5             # This file was generated from the 'clipper.xml' file of the syntax highlight
6             # engine of the kate text editor (http://www.kate-editor.org
7              
8             #kate xml version 1.05
9             #kate version 2.3
10             #kate author Andrey Cherepanov (sibskull@mail.ru)
11             #generated: Sun Feb 3 22:02:04 2008, localtime
12              
13             package Syntax::Highlight::Engine::Kate::Clipper;
14              
15             our $VERSION = '0.16';
16              
17 1     1   1070 use strict;
  1         3  
  1         43  
18 1     1   6 use warnings;
  1         3  
  1         123  
19 1     1   9 use base('Syntax::Highlight::Engine::Kate::Template');
  1         3  
  1         2713  
20              
21             sub new {
22 2     2 0 1489 my $proto = shift;
23 2   33     16 my $class = ref($proto) || $proto;
24 2         18 my $self = $class->SUPER::new(@_);
25 2         33 $self->attributes({
26             'Command' => 'DataType',
27             'Comment' => 'Comment',
28             'Decimal' => 'DecVal',
29             'Eval Block' => 'Others',
30             'Function' => 'Function',
31             'Hex' => 'BaseN',
32             'Keyword' => 'Keyword',
33             'Normal Text' => 'Normal',
34             'Prep. Lib' => 'Others',
35             'Preprocessor' => 'Others',
36             'Region Marker' => 'RegionMarker',
37             'String' => 'String',
38             'String Char' => 'Char',
39             'Symbol' => 'Normal',
40             });
41 2         14 $self->listAdd('commands',
42             '?',
43             '??',
44             '@',
45             'accept',
46             'all',
47             'alternate',
48             'append',
49             'ascending',
50             'average',
51             'bell',
52             'blank',
53             'box',
54             'century',
55             'clear',
56             'close',
57             'coclor',
58             'color',
59             'commit',
60             'confirm',
61             'console',
62             'continue',
63             'copy',
64             'count',
65             'create',
66             'cursor',
67             'date',
68             'decimals',
69             'default',
70             'delete',
71             'deleted',
72             'delimiters',
73             'descending',
74             'device',
75             'display',
76             'do',
77             'eject',
78             'epoch',
79             'erase',
80             'escape',
81             'eval',
82             'every',
83             'exact',
84             'extended',
85             'file',
86             'filter',
87             'fixed',
88             'form',
89             'from',
90             'get',
91             'gets',
92             'go',
93             'goto',
94             'index',
95             'input',
96             'intensity',
97             'join',
98             'key',
99             'keyboard',
100             'label',
101             'list',
102             'locate',
103             'margin',
104             'memory',
105             'menu',
106             'message',
107             'new',
108             'on',
109             'order',
110             'pack',
111             'path',
112             'pict',
113             'printer',
114             'prompt',
115             'quit',
116             'range',
117             'read',
118             'recall',
119             'record',
120             'reindex',
121             'relation',
122             'release',
123             'rename',
124             'replace',
125             'report',
126             'rest',
127             'restore',
128             'run',
129             'save',
130             'say',
131             'scoreboard',
132             'seek',
133             'select',
134             'set',
135             'skip',
136             'softseek',
137             'sort',
138             'structure',
139             'sum',
140             'tag',
141             'to',
142             'total',
143             'type',
144             'typeahead',
145             'unique',
146             'unlock',
147             'update',
148             'use',
149             'valid',
150             'wait',
151             'when',
152             'with',
153             'wrap',
154             'zap',
155             );
156 2         17 $self->listAdd('functions',
157             'aadd',
158             'abs',
159             'achoice',
160             'aclone',
161             'acopy',
162             'adel',
163             'aeval',
164             'afill',
165             'ains',
166             'alert',
167             'alias',
168             'alltrim',
169             'altd',
170             'array',
171             'ascan',
172             'asize',
173             'asort',
174             'at',
175             'atail',
176             'bin2i',
177             'bin2l',
178             'bin2w',
179             'bof',
180             'break',
181             'browse',
182             'cdowchr',
183             'chr',
184             'cmonth',
185             'col',
186             'colorselect',
187             'ctod',
188             'curdir',
189             'date',
190             'day',
191             'dbappend',
192             'dbclearall',
193             'dbclearfilter',
194             'dbclearindex',
195             'dbclearrelation',
196             'dbcloseall',
197             'dbclosearea',
198             'dbcommit',
199             'dbcommitall',
200             'dbcreate',
201             'dbcreateindex',
202             'dbdelete',
203             'dbedit',
204             'dbeval',
205             'dbf',
206             'dbfilter',
207             'dbgobottom',
208             'dbgoto',
209             'dbgotop',
210             'dbrecall',
211             'dbreindex',
212             'dbrelation',
213             'dbrlock',
214             'dbrlocklist',
215             'dbrselect',
216             'dbrunlock',
217             'dbseek',
218             'dbselectarea',
219             'dbsetfilter',
220             'dbsetindex',
221             'dbsetorder',
222             'dbsetrelation',
223             'dbskip',
224             'dbstruct',
225             'dbunlock',
226             'dbunlockall',
227             'dbusearea',
228             'deleted',
229             'descend',
230             'devout',
231             'devpos',
232             'directory',
233             'dispbegin',
234             'dispbox',
235             'dispcount',
236             'dispend',
237             'dispout',
238             'dispspace',
239             'doserror',
240             'dow',
241             'dtoc',
242             'dtos',
243             'empty',
244             'eof',
245             'errorblock',
246             'errorinhandler',
247             'errorlevel',
248             'eval',
249             'exp',
250             'fclose',
251             'fcount',
252             'fcreate',
253             'ferase',
254             'ferror',
255             'field',
256             'fieldblock',
257             'fieldget',
258             'fieldname',
259             'fieldpos',
260             'fieldput',
261             'fieldwblock',
262             'file',
263             'flock',
264             'fopen',
265             'found',
266             'fread',
267             'freadstr',
268             'frename',
269             'fseek',
270             'fwrite',
271             'getactive',
272             'getenv',
273             'hardcr',
274             'header',
275             'i2bin',
276             'iif',
277             'indexext',
278             'indexkey',
279             'indexord',
280             'inkey',
281             'int',
282             'isalpha',
283             'iscolor',
284             'isdigit',
285             'islower',
286             'isprinter',
287             'isupper',
288             'l2bin',
289             'lastkey',
290             'lastrec',
291             'left',
292             'len',
293             'lock',
294             'log',
295             'lower',
296             'ltrim',
297             'lupdate',
298             'max',
299             'maxcol',
300             'maxrow',
301             'memoedit',
302             'memoline',
303             'memoread',
304             'memory',
305             'memotran',
306             'memowrit',
307             'memvarblock',
308             'min',
309             'mlcount',
310             'mlctopos',
311             'mlpos',
312             'mod',
313             'month',
314             'mpostolc',
315             'neterr',
316             'netname',
317             'nextkey',
318             'nosnow',
319             'ordbagext',
320             'ordbagname',
321             'ordcreate',
322             'orddestroy',
323             'ordfor',
324             'ordkey',
325             'ordlistadd',
326             'ordlistclear',
327             'ordlistrebuild',
328             'ordname',
329             'ordnumber',
330             'ordsetfocus',
331             'os',
332             'outerr',
333             'outstd',
334             'padc',
335             'padl',
336             'padr',
337             'pcol',
338             'pcount',
339             'proclineprocname',
340             'prow',
341             'qout',
342             'qqout',
343             'rat',
344             'rddlist',
345             'rddname',
346             'rddsetdefault',
347             'readexit',
348             'readinsert',
349             'readmodal',
350             'readvar',
351             'reccount',
352             'recno',
353             'recsize',
354             'replicate',
355             'restscreen',
356             'right',
357             'rlock',
358             'round',
359             'row',
360             'rtrim',
361             'savesreen',
362             'scroll',
363             'seconds',
364             'select',
365             'setblink',
366             'setcancel',
367             'setcolor',
368             'setcursor',
369             'setkey',
370             'setmode',
371             'setpos',
372             'setprc',
373             'soundex',
374             'space',
375             'sqrt',
376             'str',
377             'strtran',
378             'stuff',
379             'substr',
380             'time',
381             'tone',
382             'transform',
383             'trim',
384             'updated',
385             'upper',
386             'used',
387             'val',
388             'valtype',
389             'version',
390             );
391 2         9 $self->listAdd('keywords',
392             '.and.',
393             '.f.',
394             '.not.',
395             '.or.',
396             '.t.',
397             'announce',
398             'begin',
399             'case',
400             'command',
401             'define',
402             'do',
403             'else',
404             'elseif',
405             'endcase',
406             'enddo',
407             'endif',
408             'error',
409             'exit',
410             'field',
411             'for',
412             'function',
413             'if',
414             'ifdef',
415             'include',
416             'init',
417             'inndef',
418             'local',
419             'memvar',
420             'next',
421             'nil',
422             'other',
423             'parameters',
424             'private',
425             'procedure',
426             'public',
427             'request',
428             'return',
429             'sequence',
430             'static',
431             'stdout',
432             'traslate',
433             'undef',
434             'while',
435             'xcommand',
436             'xtranslate',
437             );
438 2         62 $self->contextdata({
439             'BlockComment' => {
440             callback => \&parseBlockComment,
441             attribute => 'Comment',
442             },
443             'EvalBlock' => {
444             callback => \&parseEvalBlock,
445             attribute => 'Eval Block',
446             },
447             'LineComment' => {
448             callback => \&parseLineComment,
449             attribute => 'Comment',
450             lineending => '#pop',
451             },
452             'Normal' => {
453             callback => \&parseNormal,
454             attribute => 'Normal Text',
455             },
456             'Preprocessor' => {
457             callback => \&parsePreprocessor,
458             attribute => 'Preprocessor',
459             lineending => '#pop',
460             },
461             'String' => {
462             callback => \&parseString,
463             attribute => 'String',
464             lineending => '#pop',
465             },
466             'String2' => {
467             callback => \&parseString2,
468             attribute => 'String',
469             lineending => '#pop',
470             },
471             });
472 2         13 $self->deliminators('\\s||\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\|\\?|\\.');
473 2         10 $self->basecontext('Normal');
474 2         9 $self->keywordscase(0);
475 2         8 $self->initialize;
476 2         6 bless ($self, $class);
477 2         17 return $self;
478             }
479              
480             sub language {
481 0     0 0 0 return 'Clipper';
482             }
483              
484             sub parseBlockComment {
485 114     114 0 308 my ($self, $text) = @_;
486             # attribute => 'Comment'
487             # char => '*'
488             # char1 => '/'
489             # context => '#pop'
490             # endRegion => 'Comment2'
491             # type => 'Detect2Chars'
492 114 100       751 if ($self->testDetect2Chars($text, '*', '/', 0, 0, 0, undef, 0, '#pop', 'Comment')) {
493 6         19 return 1
494             }
495             # String => '(FIXME|TODO|NOT(IC)?E)'
496             # attribute => 'Command'
497             # context => '#stay'
498             # type => 'RegExpr'
499 108 50       357 if ($self->testRegExpr($text, '(FIXME|TODO|NOT(IC)?E)', 0, 0, 0, undef, 0, '#stay', 'Command')) {
500 0         0 return 1
501             }
502 108         252 return 0;
503             };
504              
505             sub parseEvalBlock {
506 36     36 0 63 my ($self, $text) = @_;
507             # attribute => 'Eval Block'
508             # context => '#stay'
509             # type => 'LineContinue'
510 36 50       91 if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'Eval Block')) {
511 0         0 return 1
512             }
513             # attribute => 'Eval Block'
514             # char => '}'
515             # context => '#pop'
516             # type => 'DetectChar'
517 36 100       88 if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#pop', 'Eval Block')) {
518 2         6 return 1
519             }
520 34         63 return 0;
521             };
522              
523             sub parseLineComment {
524 194     194 0 335 my ($self, $text) = @_;
525             # String => '(FIXME|TODO|NOT(IC)?E)'
526             # attribute => 'Command'
527             # context => '#stay'
528             # type => 'RegExpr'
529 194 50       506 if ($self->testRegExpr($text, '(FIXME|TODO|NOT(IC)?E)', 0, 0, 0, undef, 0, '#stay', 'Command')) {
530 0         0 return 1
531             }
532 194         395 return 0;
533             };
534              
535             sub parseNormal {
536 1340     1340 0 6341 my ($self, $text) = @_;
537             # String => '\bfunction\b'
538             # attribute => 'Keyword'
539             # beginRegion => 'regFunction'
540             # context => '#stay'
541             # insensitive => 'TRUE'
542             # type => 'RegExpr'
543 1340 100       5121 if ($self->testRegExpr($text, '\\bfunction\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
544 6         23 return 1
545             }
546             # String => '^return\b'
547             # attribute => 'Keyword'
548             # context => '#stay'
549             # endRegion => 'regFunction'
550             # insensitive => 'TRUE'
551             # type => 'RegExpr'
552 1334 100       6198 if ($self->testRegExpr($text, '^return\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
553 6         21 return 1
554             }
555             # String => '\bbegin\s+sequence\b'
556             # attribute => 'Keyword'
557             # beginRegion => 'regSequence'
558             # context => '#stay'
559             # insensitive => 'TRUE'
560             # type => 'RegExpr'
561 1328 50       4795 if ($self->testRegExpr($text, '\\bbegin\\s+sequence\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
562 0         0 return 1
563             }
564             # String => '\bend\s+sequence\b'
565             # attribute => 'Keyword'
566             # context => '#stay'
567             # endRegion => 'regSequence'
568             # insensitive => 'TRUE'
569             # type => 'RegExpr'
570 1328 50       8304 if ($self->testRegExpr($text, '\\bend\\s+sequence\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
571 0         0 return 1
572             }
573             # String => '\bdo\s+case\b'
574             # attribute => 'Keyword'
575             # beginRegion => 'regDoCase'
576             # context => '#stay'
577             # insensitive => 'TRUE'
578             # type => 'RegExpr'
579 1328 50       6886 if ($self->testRegExpr($text, '\\bdo\\s+case\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
580 0         0 return 1
581             }
582             # String => '\bendcase\b'
583             # attribute => 'Keyword'
584             # context => '#stay'
585             # endRegion => 'regDoCase'
586             # insensitive => 'TRUE'
587             # type => 'RegExpr'
588 1328 50       4378 if ($self->testRegExpr($text, '\\bendcase\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
589 0         0 return 1
590             }
591             # String => '\bdo\s+while\b'
592             # attribute => 'Keyword'
593             # beginRegion => 'regDoWhile'
594             # context => '#stay'
595             # insensitive => 'TRUE'
596             # type => 'RegExpr'
597 1328 50       4205 if ($self->testRegExpr($text, '\\bdo\\s+while\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
598 0         0 return 1
599             }
600             # String => '\benddo\b'
601             # attribute => 'Keyword'
602             # context => '#stay'
603             # endRegion => 'regDoWhile'
604             # insensitive => 'TRUE'
605             # type => 'RegExpr'
606 1328 50       4601 if ($self->testRegExpr($text, '\\benddo\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
607 0         0 return 1
608             }
609             # String => '\bfor\b'
610             # attribute => 'Keyword'
611             # beginRegion => 'regFor'
612             # context => '#stay'
613             # insensitive => 'TRUE'
614             # type => 'RegExpr'
615 1328 50       3994 if ($self->testRegExpr($text, '\\bfor\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
616 0         0 return 1
617             }
618             # String => '\bnext\b'
619             # attribute => 'Keyword'
620             # context => '#stay'
621             # endRegion => 'regFor'
622             # insensitive => 'TRUE'
623             # type => 'RegExpr'
624 1328 50       10380 if ($self->testRegExpr($text, '\\bnext\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
625 0         0 return 1
626             }
627             # String => '\bif\b'
628             # attribute => 'Keyword'
629             # beginRegion => 'regIf'
630             # context => '#stay'
631             # insensitive => 'TRUE'
632             # type => 'RegExpr'
633 1328 100       4070 if ($self->testRegExpr($text, '\\bif\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
634 4         17 return 1
635             }
636             # String => '\belseif\b'
637             # attribute => 'Keyword'
638             # beginRegion => 'regIf'
639             # context => '#stay'
640             # endRegion => 'regIf'
641             # insensitive => 'TRUE'
642             # type => 'RegExpr'
643 1324 50       3990 if ($self->testRegExpr($text, '\\belseif\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
644 0         0 return 1
645             }
646             # String => '\belse\b'
647             # attribute => 'Keyword'
648             # beginRegion => 'regIf'
649             # context => '#stay'
650             # endRegion => 'regIf'
651             # insensitive => 'TRUE'
652             # type => 'RegExpr'
653 1324 100       3992 if ($self->testRegExpr($text, '\\belse\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
654 2         9 return 1
655             }
656             # String => '\bendif\b'
657             # attribute => 'Keyword'
658             # context => '#stay'
659             # endRegion => 'regIf'
660             # insensitive => 'TRUE'
661             # type => 'RegExpr'
662 1322 100       4021 if ($self->testRegExpr($text, '\\bendif\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
663 4         15 return 1
664             }
665             # String => '\bswitch\b'
666             # attribute => 'Keyword'
667             # beginRegion => 'regSwitch'
668             # context => '#stay'
669             # insensitive => 'TRUE'
670             # type => 'RegExpr'
671 1318 50       5715 if ($self->testRegExpr($text, '\\bswitch\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
672 0         0 return 1
673             }
674             # String => '\bendswitch\b'
675             # attribute => 'Keyword'
676             # context => '#stay'
677             # endRegion => 'regSwitch'
678             # insensitive => 'TRUE'
679             # type => 'RegExpr'
680 1318 50       4413 if ($self->testRegExpr($text, '\\bendswitch\\b', 1, 0, 0, undef, 0, '#stay', 'Keyword')) {
681 0         0 return 1
682             }
683             # String => 'keywords'
684             # attribute => 'Keyword'
685             # context => '#stay'
686             # type => 'keyword'
687 1318 100       4900 if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) {
688 14         60 return 1
689             }
690             # String => 'commands'
691             # attribute => 'Command'
692             # context => '#stay'
693             # type => 'keyword'
694 1304 100       7464 if ($self->testKeyword($text, 'commands', 0, undef, 0, '#stay', 'Command')) {
695 10         38 return 1
696             }
697             # String => 'functions'
698             # attribute => 'Function'
699             # context => '#stay'
700             # type => 'keyword'
701 1294 100       3828 if ($self->testKeyword($text, 'functions', 0, undef, 0, '#stay', 'Function')) {
702 2         12 return 1
703             }
704             # attribute => 'String Char'
705             # context => '#stay'
706             # type => 'HlCHex'
707 1292 50       4803 if ($self->testHlCHex($text, 0, undef, 0, '#stay', 'String Char')) {
708 0         0 return 1
709             }
710             # attribute => 'String'
711             # char => '"'
712             # context => 'String'
713             # type => 'DetectChar'
714 1292 100       4777 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'String', 'String')) {
715 12         47 return 1
716             }
717             # String => '//\s*BEGIN.*$'
718             # attribute => 'Region Marker'
719             # beginRegion => 'regMarker'
720             # context => '#stay'
721             # type => 'RegExpr'
722 1280 50       4596 if ($self->testRegExpr($text, '//\\s*BEGIN.*$', 0, 0, 0, undef, 0, '#stay', 'Region Marker')) {
723 0         0 return 1
724             }
725             # String => '//\s*END.*$'
726             # attribute => 'Region Marker'
727             # context => '#stay'
728             # endRegion => 'regMarker'
729             # type => 'RegExpr'
730 1280 100       8171 if ($self->testRegExpr($text, '//\\s*END.*$', 0, 0, 0, undef, 0, '#stay', 'Region Marker')) {
731 2         6 return 1
732             }
733             # attribute => 'Comment'
734             # char => '/'
735             # char1 => '/'
736             # context => 'LineComment'
737             # type => 'Detect2Chars'
738 1278 100       6067 if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'LineComment', 'Comment')) {
739 10         27 return 1
740             }
741             # String => '^\s*\*.*$'
742             # attribute => 'Comment'
743             # context => 'LineComment'
744             # type => 'RegExpr'
745 1268 50       4826 if ($self->testRegExpr($text, '^\\s*\\*.*$', 0, 0, 0, undef, 0, 'LineComment', 'Comment')) {
746 0         0 return 1
747             }
748             # attribute => 'Comment'
749             # beginRegion => 'Comment2'
750             # char => '/'
751             # char1 => '*'
752             # context => 'BlockComment'
753             # type => 'Detect2Chars'
754 1268 100       4216 if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'BlockComment', 'Comment')) {
755 6         41 return 1
756             }
757             # String => '!%&()+,-<:=>[]^~'
758             # attribute => 'Symbol'
759             # context => '#stay'
760             # type => 'AnyChar'
761 1262 100       7705 if ($self->testAnyChar($text, '!%&()+,-<:=>[]^~', 0, 0, undef, 0, '#stay', 'Symbol')) {
762 238         822 return 1
763             }
764             # String => '#'
765             # attribute => 'Preprocessor'
766             # context => 'Preprocessor'
767             # type => 'RegExpr'
768 1024 100       3365 if ($self->testRegExpr($text, '#', 0, 0, 0, undef, 0, 'Preprocessor', 'Preprocessor')) {
769 6         20 return 1
770             }
771             # attribute => 'Eval Block'
772             # char => '{'
773             # char1 => '|'
774             # context => 'EvalBlock'
775             # type => 'Detect2Chars'
776 1018 100       4005 if ($self->testDetect2Chars($text, '{', '|', 0, 0, 0, undef, 0, 'EvalBlock', 'Eval Block')) {
777 2         7 return 1
778             }
779             # attribute => 'String'
780             # char => '''
781             # context => 'String2'
782             # type => 'DetectChar'
783 1016 50       3107 if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'String2', 'String')) {
784 0         0 return 1
785             }
786 1016         2830 return 0;
787             };
788              
789             sub parsePreprocessor {
790 74     74 0 192 my ($self, $text) = @_;
791             # attribute => 'Preprocessor'
792             # context => '#stay'
793             # type => 'LineContinue'
794 74 50       279 if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'Preprocessor')) {
795 0         0 return 1
796             }
797             # attribute => 'Prep. Lib'
798             # char => '"'
799             # char1 => '"'
800             # context => '#stay'
801             # type => 'RangeDetect'
802 74 100       236 if ($self->testRangeDetect($text, '"', '"', 0, 0, undef, 0, '#stay', 'Prep. Lib')) {
803 4         13 return 1
804             }
805             # attribute => 'Prep. Lib'
806             # char => '<'
807             # char1 => '>'
808             # context => '#stay'
809             # type => 'RangeDetect'
810 70 100       236 if ($self->testRangeDetect($text, '<', '>', 0, 0, undef, 0, '#stay', 'Prep. Lib')) {
811 2         7 return 1
812             }
813             # String => '//\s*BEGIN.*$'
814             # attribute => 'Region Marker'
815             # beginRegion => 'regMarker'
816             # context => '#stay'
817             # type => 'RegExpr'
818 68 50       193 if ($self->testRegExpr($text, '//\\s*BEGIN.*$', 0, 0, 0, undef, 0, '#stay', 'Region Marker')) {
819 0         0 return 1
820             }
821             # String => '//\s*END.*$'
822             # attribute => 'Region Marker'
823             # context => '#stay'
824             # endRegion => 'regMarker'
825             # type => 'RegExpr'
826 68 50       230 if ($self->testRegExpr($text, '//\\s*END.*$', 0, 0, 0, undef, 0, '#stay', 'Region Marker')) {
827 0         0 return 1
828             }
829             # attribute => 'Comment'
830             # char => '/'
831             # char1 => '/'
832             # context => 'LineComment'
833             # type => 'Detect2Chars'
834 68 50       246 if ($self->testDetect2Chars($text, '/', '/', 0, 0, 0, undef, 0, 'LineComment', 'Comment')) {
835 0         0 return 1
836             }
837             # attribute => 'Comment'
838             # beginRegion => 'Comment2'
839             # char => '/'
840             # char1 => '*'
841             # context => 'BlockComment'
842             # type => 'Detect2Chars'
843 68 50       222 if ($self->testDetect2Chars($text, '/', '*', 0, 0, 0, undef, 0, 'BlockComment', 'Comment')) {
844 0         0 return 1
845             }
846 68         168 return 0;
847             };
848              
849             sub parseString {
850 216     216 0 434 my ($self, $text) = @_;
851             # attribute => 'String'
852             # context => '#stay'
853             # type => 'LineContinue'
854 216 50       671 if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'String')) {
855 0         0 return 1
856             }
857             # attribute => 'String Char'
858             # context => '#stay'
859             # type => 'HlCStringChar'
860 216 100       750 if ($self->testHlCStringChar($text, 0, undef, 0, '#stay', 'String Char')) {
861 4         14 return 1
862             }
863             # attribute => 'String'
864             # char => '"'
865             # context => '#pop'
866             # type => 'DetectChar'
867 212 100       619 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) {
868 12         37 return 1
869             }
870 200         465 return 0;
871             };
872              
873             sub parseString2 {
874 0     0 0   my ($self, $text) = @_;
875             # attribute => 'String'
876             # context => '#stay'
877             # type => 'LineContinue'
878 0 0         if ($self->testLineContinue($text, 0, undef, 0, '#stay', 'String')) {
879 0           return 1
880             }
881             # attribute => 'String Char'
882             # context => '#stay'
883             # type => 'HlCStringChar'
884 0 0         if ($self->testHlCStringChar($text, 0, undef, 0, '#stay', 'String Char')) {
885 0           return 1
886             }
887             # attribute => 'String'
888             # char => '''
889             # context => '#pop'
890             # type => 'DetectChar'
891 0 0         if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop', 'String')) {
892 0           return 1
893             }
894 0           return 0;
895             };
896              
897              
898             1;
899              
900             __END__