Add built local::lib
[catagits/Gitalist.git] / local-lib5 / lib / perl5 / Syntax / Highlight / Engine / Kate / Ruby.pm
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 'ruby.xml' file of the syntax highlight
6 # engine of the kate text editor (http://www.kate-editor.org
7
8 #kate xml version 1.16
9 #kate version 2.4
10 #kate author Stefan Lang (langstefan@gmx.at), Sebastian Vuorinen (sebastian.vuorinen@helsinki.fi)
11 #generated: Sun Feb  3 22:02:06 2008, localtime
12
13 package Syntax::Highlight::Engine::Kate::Ruby;
14
15 our $VERSION = '0.06';
16
17 use strict;
18 use warnings;
19 use base('Syntax::Highlight::Engine::Kate::Template');
20
21 sub new {
22    my $proto = shift;
23    my $class = ref($proto) || $proto;
24    my $self = $class->SUPER::new(@_);
25    $self->attributes({
26       'Access Control' => 'Keyword',
27       'Alert' => 'Alert',
28       'Attribute Definition' => 'Others',
29       'Bin' => 'BaseN',
30       'Blockcomment' => 'Comment',
31       'Char' => 'Char',
32       'Class Variable' => 'Others',
33       'Command' => 'String',
34       'Comment' => 'Comment',
35       'Constant' => 'DataType',
36       'Constant Value' => 'DataType',
37       'Data' => 'Normal',
38       'Dec' => 'DecVal',
39       'Default globals' => 'DataType',
40       'Definition' => 'Keyword',
41       'Delimiter' => 'Char',
42       'Error' => 'Error',
43       'Expression' => 'Others',
44       'Float' => 'Float',
45       'GDL input' => 'Others',
46       'Global Constant' => 'DataType',
47       'Global Variable' => 'DataType',
48       'Hex' => 'BaseN',
49       'Instance Variable' => 'Others',
50       'Kernel methods' => 'Normal',
51       'Keyword' => 'Keyword',
52       'Member' => 'Normal',
53       'Message' => 'Normal',
54       'Normal Text' => 'Normal',
55       'Octal' => 'BaseN',
56       'Operator' => 'Char',
57       'Pseudo variable' => 'DecVal',
58       'RDoc Value' => 'Others',
59       'Raw String' => 'String',
60       'Region Marker' => 'Normal',
61       'Regular Expression' => 'Others',
62       'String' => 'String',
63       'Substitution' => 'Others',
64       'Symbol' => 'String',
65    });
66    $self->listAdd('access-control',
67       'private',
68       'private_class_method',
69       'protected',
70       'public',
71       'public_class_method',
72    );
73    $self->listAdd('attention',
74       'FIXME',
75       'NOTE',
76       'TODO',
77    );
78    $self->listAdd('attribute-definitions',
79       'attr_accessor',
80       'attr_reader',
81       'attr_writer',
82    );
83    $self->listAdd('default-globals',
84       '$deferr',
85       '$defout',
86       '$stderr',
87       '$stdin',
88       '$stdout',
89    );
90    $self->listAdd('definitions',
91       'alias',
92       'class',
93       'def',
94       'module',
95       'undef',
96    );
97    $self->listAdd('kernel-methods',
98       'abort',
99       'at_exit',
100       'autoload',
101       'autoload?',
102       'binding',
103       'block_given?',
104       'callcc',
105       'caller',
106       'catch',
107       'chomp',
108       'chomp!',
109       'chop',
110       'chop!',
111       'eval',
112       'exec',
113       'exit',
114       'exit!',
115       'fail',
116       'fork',
117       'format',
118       'getc',
119       'gets',
120       'global_variables',
121       'gsub',
122       'gsub!',
123       'iterator?',
124       'lambda',
125       'load',
126       'local_variables',
127       'loop',
128       'method_missing',
129       'open',
130       'p',
131       'print',
132       'printf',
133       'proc',
134       'putc',
135       'puts',
136       'raise',
137       'rand',
138       'readline',
139       'readlines',
140       'require',
141       'scan',
142       'select',
143       'set_trace_func',
144       'sleep',
145       'split',
146       'sprintf',
147       'srand',
148       'sub',
149       'sub!',
150       'syscall',
151       'system',
152       'test',
153       'throw',
154       'trace_var',
155       'trap',
156       'untrace_var',
157       'warn',
158    );
159    $self->listAdd('keywords',
160       'BEGIN',
161       'END',
162       'and',
163       'begin',
164       'break',
165       'case',
166       'defined?',
167       'do',
168       'else',
169       'elsif',
170       'end',
171       'ensure',
172       'for',
173       'if',
174       'in',
175       'include',
176       'next',
177       'not',
178       'or',
179       'redo',
180       'rescue',
181       'retry',
182       'return',
183       'then',
184       'unless',
185       'until',
186       'when',
187       'while',
188       'yield',
189    );
190    $self->listAdd('pseudo-variables',
191       '__FILE__',
192       '__LINE__',
193       'caller',
194       'false',
195       'nil',
196       'self',
197       'super',
198       'true',
199    );
200    $self->contextdata({
201       'Apostrophed String' => {
202          callback => \&parseApostrophedString,
203          attribute => 'Raw String',
204       },
205       'Command String' => {
206          callback => \&parseCommandString,
207          attribute => 'Command',
208       },
209       'Comment Line' => {
210          callback => \&parseCommentLine,
211          attribute => 'Comment',
212          lineending => '#pop',
213       },
214       'DATA' => {
215          callback => \&parseDATA,
216          attribute => 'Data',
217       },
218       'Embedded documentation' => {
219          callback => \&parseEmbeddeddocumentation,
220          attribute => 'Comment',
221       },
222       'General Comment' => {
223          callback => \&parseGeneralComment,
224          attribute => 'Comment',
225          lineending => '#pop',
226       },
227       'Line Continue' => {
228          callback => \&parseLineContinue,
229          attribute => 'Normal Text',
230          lineending => '#pop',
231       },
232       'Member Access' => {
233          callback => \&parseMemberAccess,
234          attribute => 'Member',
235          lineending => '#pop',
236       },
237       'Normal' => {
238          callback => \&parseNormal,
239          attribute => 'Normal Text',
240       },
241       'Quoted String' => {
242          callback => \&parseQuotedString,
243          attribute => 'String',
244       },
245       'RDoc Label' => {
246          callback => \&parseRDocLabel,
247          attribute => 'RDoc Value',
248          lineending => '#pop',
249       },
250       'RegEx 1' => {
251          callback => \&parseRegEx1,
252          attribute => 'Regular Expression',
253       },
254       'Short Subst' => {
255          callback => \&parseShortSubst,
256          attribute => 'Substitution',
257          lineending => '#pop',
258       },
259       'Subst' => {
260          callback => \&parseSubst,
261          attribute => 'Normal Text',
262       },
263       'apostrophed_indented_heredoc' => {
264          callback => \&parseapostrophed_indented_heredoc,
265          attribute => 'Normal Text',
266          dynamic => 1,
267       },
268       'apostrophed_normal_heredoc' => {
269          callback => \&parseapostrophed_normal_heredoc,
270          attribute => 'Normal Text',
271          dynamic => 1,
272       },
273       'apostrophed_rules' => {
274          callback => \&parseapostrophed_rules,
275          attribute => 'Raw String',
276       },
277       'dq_string_rules' => {
278          callback => \&parsedq_string_rules,
279          attribute => 'String',
280       },
281       'find_gdl_input' => {
282          callback => \&parsefind_gdl_input,
283          attribute => 'Normal Text',
284          lineending => '#pop',
285       },
286       'find_heredoc' => {
287          callback => \&parsefind_heredoc,
288          attribute => 'Normal Text',
289          lineending => '#pop',
290       },
291       'find_indented_heredoc' => {
292          callback => \&parsefind_indented_heredoc,
293          attribute => 'Normal Text',
294          lineending => '#pop',
295       },
296       'gdl_apostrophed_1' => {
297          callback => \&parsegdl_apostrophed_1,
298          attribute => 'Raw String',
299       },
300       'gdl_apostrophed_1_nested' => {
301          callback => \&parsegdl_apostrophed_1_nested,
302          attribute => 'Raw String',
303       },
304       'gdl_apostrophed_2' => {
305          callback => \&parsegdl_apostrophed_2,
306          attribute => 'Raw String',
307       },
308       'gdl_apostrophed_2_nested' => {
309          callback => \&parsegdl_apostrophed_2_nested,
310          attribute => 'Raw String',
311       },
312       'gdl_apostrophed_3' => {
313          callback => \&parsegdl_apostrophed_3,
314          attribute => 'Raw String',
315       },
316       'gdl_apostrophed_3_nested' => {
317          callback => \&parsegdl_apostrophed_3_nested,
318          attribute => 'Raw String',
319       },
320       'gdl_apostrophed_4' => {
321          callback => \&parsegdl_apostrophed_4,
322          attribute => 'Raw String',
323       },
324       'gdl_apostrophed_4_nested' => {
325          callback => \&parsegdl_apostrophed_4_nested,
326          attribute => 'Raw String',
327       },
328       'gdl_apostrophed_5' => {
329          callback => \&parsegdl_apostrophed_5,
330          attribute => 'Raw String',
331          dynamic => 1,
332       },
333       'gdl_dq_string_1' => {
334          callback => \&parsegdl_dq_string_1,
335          attribute => 'String',
336       },
337       'gdl_dq_string_1_nested' => {
338          callback => \&parsegdl_dq_string_1_nested,
339          attribute => 'String',
340       },
341       'gdl_dq_string_2' => {
342          callback => \&parsegdl_dq_string_2,
343          attribute => 'String',
344       },
345       'gdl_dq_string_2_nested' => {
346          callback => \&parsegdl_dq_string_2_nested,
347          attribute => 'String',
348       },
349       'gdl_dq_string_3' => {
350          callback => \&parsegdl_dq_string_3,
351          attribute => 'String',
352       },
353       'gdl_dq_string_3_nested' => {
354          callback => \&parsegdl_dq_string_3_nested,
355          attribute => 'String',
356       },
357       'gdl_dq_string_4' => {
358          callback => \&parsegdl_dq_string_4,
359          attribute => 'String',
360       },
361       'gdl_dq_string_4_nested' => {
362          callback => \&parsegdl_dq_string_4_nested,
363          attribute => 'String',
364       },
365       'gdl_dq_string_5' => {
366          callback => \&parsegdl_dq_string_5,
367          attribute => 'String',
368          dynamic => 1,
369       },
370       'gdl_regexpr_1' => {
371          callback => \&parsegdl_regexpr_1,
372          attribute => 'Regular Expression',
373       },
374       'gdl_regexpr_1_nested' => {
375          callback => \&parsegdl_regexpr_1_nested,
376          attribute => 'Regular Expression',
377       },
378       'gdl_regexpr_2' => {
379          callback => \&parsegdl_regexpr_2,
380          attribute => 'Regular Expression',
381       },
382       'gdl_regexpr_2_nested' => {
383          callback => \&parsegdl_regexpr_2_nested,
384          attribute => 'Regular Expression',
385       },
386       'gdl_regexpr_3' => {
387          callback => \&parsegdl_regexpr_3,
388          attribute => 'Regular Expression',
389       },
390       'gdl_regexpr_3_nested' => {
391          callback => \&parsegdl_regexpr_3_nested,
392          attribute => 'Regular Expression',
393       },
394       'gdl_regexpr_4' => {
395          callback => \&parsegdl_regexpr_4,
396          attribute => 'Regular Expression',
397       },
398       'gdl_regexpr_4_nested' => {
399          callback => \&parsegdl_regexpr_4_nested,
400          attribute => 'Regular Expression',
401       },
402       'gdl_regexpr_5' => {
403          callback => \&parsegdl_regexpr_5,
404          attribute => 'Regular Expression',
405          dynamic => 1,
406       },
407       'gdl_shell_command_1' => {
408          callback => \&parsegdl_shell_command_1,
409          attribute => 'Command',
410       },
411       'gdl_shell_command_1_nested' => {
412          callback => \&parsegdl_shell_command_1_nested,
413          attribute => 'Command',
414       },
415       'gdl_shell_command_2' => {
416          callback => \&parsegdl_shell_command_2,
417          attribute => 'Command',
418       },
419       'gdl_shell_command_2_nested' => {
420          callback => \&parsegdl_shell_command_2_nested,
421          attribute => 'Command',
422       },
423       'gdl_shell_command_3' => {
424          callback => \&parsegdl_shell_command_3,
425          attribute => 'Command',
426       },
427       'gdl_shell_command_3_nested' => {
428          callback => \&parsegdl_shell_command_3_nested,
429          attribute => 'Command',
430       },
431       'gdl_shell_command_4' => {
432          callback => \&parsegdl_shell_command_4,
433          attribute => 'Command',
434       },
435       'gdl_shell_command_4_nested' => {
436          callback => \&parsegdl_shell_command_4_nested,
437          attribute => 'Command',
438       },
439       'gdl_shell_command_5' => {
440          callback => \&parsegdl_shell_command_5,
441          attribute => 'Command',
442          dynamic => 1,
443       },
444       'gdl_token_array_1' => {
445          callback => \&parsegdl_token_array_1,
446          attribute => 'String',
447       },
448       'gdl_token_array_1_nested' => {
449          callback => \&parsegdl_token_array_1_nested,
450          attribute => 'String',
451       },
452       'gdl_token_array_2' => {
453          callback => \&parsegdl_token_array_2,
454          attribute => 'String',
455       },
456       'gdl_token_array_2_nested' => {
457          callback => \&parsegdl_token_array_2_nested,
458          attribute => 'String',
459       },
460       'gdl_token_array_3' => {
461          callback => \&parsegdl_token_array_3,
462          attribute => 'String',
463       },
464       'gdl_token_array_3_nested' => {
465          callback => \&parsegdl_token_array_3_nested,
466          attribute => 'String',
467       },
468       'gdl_token_array_4' => {
469          callback => \&parsegdl_token_array_4,
470          attribute => 'String',
471       },
472       'gdl_token_array_4_nested' => {
473          callback => \&parsegdl_token_array_4_nested,
474          attribute => 'String',
475       },
476       'gdl_token_array_5' => {
477          callback => \&parsegdl_token_array_5,
478          attribute => 'String',
479          dynamic => 1,
480       },
481       'heredoc_rules' => {
482          callback => \&parseheredoc_rules,
483          attribute => 'Normal Text',
484       },
485       'indented_heredoc' => {
486          callback => \&parseindented_heredoc,
487          attribute => 'Normal Text',
488          dynamic => 1,
489       },
490       'normal_heredoc' => {
491          callback => \&parsenormal_heredoc,
492          attribute => 'Normal Text',
493          dynamic => 1,
494       },
495       'regexpr_rules' => {
496          callback => \&parseregexpr_rules,
497          attribute => 'Regular Expression',
498       },
499       'shell_command_rules' => {
500          callback => \&parseshell_command_rules,
501          attribute => 'Command',
502       },
503       'token_array_rules' => {
504          callback => \&parsetoken_array_rules,
505          attribute => 'String',
506       },
507    });
508    $self->deliminators('\\s||\\.|\\(|\\)|:|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\|\\!|\\?');
509    $self->basecontext('Normal');
510    $self->keywordscase(0);
511    $self->initialize;
512    bless ($self, $class);
513    return $self;
514 }
515
516 sub language {
517    return 'Ruby';
518 }
519
520 sub parseApostrophedString {
521    my ($self, $text) = @_;
522    # String => '\\'
523    # attribute => 'String'
524    # context => '#stay'
525    # type => 'StringDetect'
526    if ($self->testStringDetect($text, '\\\\', 0, 0, 0, undef, 0, '#stay', 'String')) {
527       return 1
528    }
529    # String => '\\\''
530    # attribute => 'String'
531    # context => '#stay'
532    # type => 'RegExpr'
533    if ($self->testRegExpr($text, '\\\\\\\'', 0, 0, 0, undef, 0, '#stay', 'String')) {
534       return 1
535    }
536    # attribute => 'Raw String'
537    # char => '''
538    # context => '#pop'
539    # type => 'DetectChar'
540    if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '#pop', 'Raw String')) {
541       return 1
542    }
543    return 0;
544 };
545
546 sub parseCommandString {
547    my ($self, $text) = @_;
548    # String => '\\'
549    # attribute => 'String'
550    # context => '#stay'
551    # type => 'StringDetect'
552    if ($self->testStringDetect($text, '\\\\', 0, 0, 0, undef, 0, '#stay', 'String')) {
553       return 1
554    }
555    # String => '\\\`'
556    # attribute => 'String'
557    # context => '#stay'
558    # type => 'RegExpr'
559    if ($self->testRegExpr($text, '\\\\\\`', 0, 0, 0, undef, 0, '#stay', 'String')) {
560       return 1
561    }
562    # String => '#@{1,2}'
563    # attribute => 'Substitution'
564    # context => 'Short Subst'
565    # type => 'RegExpr'
566    if ($self->testRegExpr($text, '#@{1,2}', 0, 0, 0, undef, 0, 'Short Subst', 'Substitution')) {
567       return 1
568    }
569    # attribute => 'Substitution'
570    # char => '#'
571    # char1 => '{'
572    # context => 'Subst'
573    # type => 'Detect2Chars'
574    if ($self->testDetect2Chars($text, '#', '{', 0, 0, 0, undef, 0, 'Subst', 'Substitution')) {
575       return 1
576    }
577    # attribute => 'Char'
578    # context => '#pop'
579    # type => 'HlCChar'
580    if ($self->testHlCChar($text, 0, undef, 0, '#pop', 'Char')) {
581       return 1
582    }
583    # attribute => 'Command'
584    # char => '`'
585    # context => '#pop'
586    # type => 'DetectChar'
587    if ($self->testDetectChar($text, '`', 0, 0, 0, undef, 0, '#pop', 'Command')) {
588       return 1
589    }
590    return 0;
591 };
592
593 sub parseCommentLine {
594    my ($self, $text) = @_;
595    # String => '\w\:\:\s'
596    # attribute => 'Comment'
597    # context => 'RDoc Label'
598    # type => 'RegExpr'
599    if ($self->testRegExpr($text, '\\w\\:\\:\\s', 0, 0, 0, undef, 0, 'RDoc Label', 'Comment')) {
600       return 1
601    }
602    # String => 'attention'
603    # attribute => 'Alert'
604    # context => '#stay'
605    # type => 'keyword'
606    if ($self->testKeyword($text, 'attention', 0, undef, 0, '#stay', 'Alert')) {
607       return 1
608    }
609    return 0;
610 };
611
612 sub parseDATA {
613    my ($self, $text) = @_;
614    return 0;
615 };
616
617 sub parseEmbeddeddocumentation {
618    my ($self, $text) = @_;
619    # String => '=end'
620    # attribute => 'Comment'
621    # column => '0'
622    # context => '#pop'
623    # endRegion => 'comment block'
624    # type => 'StringDetect'
625    if ($self->testStringDetect($text, '=end', 0, 0, 0, 0, 0, '#pop', 'Comment')) {
626       return 1
627    }
628    return 0;
629 };
630
631 sub parseGeneralComment {
632    my ($self, $text) = @_;
633    # String => 'attention'
634    # attribute => 'Dec'
635    # context => '#stay'
636    # type => 'keyword'
637    if ($self->testKeyword($text, 'attention', 0, undef, 0, '#stay', 'Dec')) {
638       return 1
639    }
640    return 0;
641 };
642
643 sub parseLineContinue {
644    my ($self, $text) = @_;
645    # String => '(while|until)\b(?!.*\bdo\b)'
646    # attribute => 'Keyword'
647    # context => '#stay'
648    # firstNonSpace => 'true'
649    # type => 'RegExpr'
650    if ($self->testRegExpr($text, '(while|until)\\b(?!.*\\bdo\\b)', 0, 0, 0, undef, 1, '#stay', 'Keyword')) {
651       return 1
652    }
653    # String => '(if|unless)\b'
654    # attribute => 'Keyword'
655    # context => '#stay'
656    # firstNonSpace => 'true'
657    # type => 'RegExpr'
658    if ($self->testRegExpr($text, '(if|unless)\\b', 0, 0, 0, undef, 1, '#stay', 'Keyword')) {
659       return 1
660    }
661    # context => 'Normal'
662    # type => 'IncludeRules'
663    if ($self->includeRules('Normal', $text)) {
664       return 1
665    }
666    return 0;
667 };
668
669 sub parseMemberAccess {
670    my ($self, $text) = @_;
671    # String => '\.?[_a-z]\w*(\?|\!)?(?=[^\w\d\.\:])'
672    # attribute => 'Message'
673    # context => '#pop'
674    # type => 'RegExpr'
675    if ($self->testRegExpr($text, '\\.?[_a-z]\\w*(\\?|\\!)?(?=[^\\w\\d\\.\\:])', 0, 0, 0, undef, 0, '#pop', 'Message')) {
676       return 1
677    }
678    # String => '\.?[_a-z]\w*(\?|\!)?'
679    # attribute => 'Message'
680    # context => '#stay'
681    # type => 'RegExpr'
682    if ($self->testRegExpr($text, '\\.?[_a-z]\\w*(\\?|\\!)?', 0, 0, 0, undef, 0, '#stay', 'Message')) {
683       return 1
684    }
685    # String => '[A-Z]+_*(\d|[a-z])\w*(?=[^\w\d\.\:])'
686    # attribute => 'Constant'
687    # context => '#pop'
688    # type => 'RegExpr'
689    if ($self->testRegExpr($text, '[A-Z]+_*(\\d|[a-z])\\w*(?=[^\\w\\d\\.\\:])', 0, 0, 0, undef, 0, '#pop', 'Constant')) {
690       return 1
691    }
692    # String => '[A-Z]+_*([0-9]|[a-z])\w*'
693    # attribute => 'Constant'
694    # context => '#stay'
695    # type => 'RegExpr'
696    if ($self->testRegExpr($text, '[A-Z]+_*([0-9]|[a-z])\\w*', 0, 0, 0, undef, 0, '#stay', 'Constant')) {
697       return 1
698    }
699    # String => '[_A-Z][_A-Z0-9]*(?=[^\w\d\.\:])'
700    # attribute => 'Constant Value'
701    # context => '#pop'
702    # type => 'RegExpr'
703    if ($self->testRegExpr($text, '[_A-Z][_A-Z0-9]*(?=[^\\w\\d\\.\\:])', 0, 0, 0, undef, 0, '#pop', 'Constant Value')) {
704       return 1
705    }
706    # String => '[_A-Z][_A-Z0-9]*'
707    # attribute => 'Constant Value'
708    # context => '#stay'
709    # type => 'RegExpr'
710    if ($self->testRegExpr($text, '[_A-Z][_A-Z0-9]*', 0, 0, 0, undef, 0, '#stay', 'Constant Value')) {
711       return 1
712    }
713    # attribute => 'Operator'
714    # char => ':'
715    # char1 => ':'
716    # context => '#stay'
717    # type => 'Detect2Chars'
718    if ($self->testDetect2Chars($text, ':', ':', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
719       return 1
720    }
721    # attribute => 'Member'
722    # char => '.'
723    # context => '#stay'
724    # type => 'DetectChar'
725    if ($self->testDetectChar($text, '.', 0, 0, 0, undef, 0, '#stay', 'Member')) {
726       return 1
727    }
728    # String => '=+-*/%|&[]{}~'
729    # attribute => 'Operator'
730    # context => '#pop'
731    # type => 'AnyChar'
732    if ($self->testAnyChar($text, '=+-*/%|&[]{}~', 0, 0, undef, 0, '#pop', 'Operator')) {
733       return 1
734    }
735    # attribute => 'Comment'
736    # char => '#'
737    # context => '#pop'
738    # type => 'DetectChar'
739    if ($self->testDetectChar($text, '#', 0, 0, 0, undef, 0, '#pop', 'Comment')) {
740       return 1
741    }
742    # String => '()\'
743    # attribute => 'Normal Text'
744    # context => '#pop'
745    # type => 'AnyChar'
746    if ($self->testAnyChar($text, '()\\', 0, 0, undef, 0, '#pop', 'Normal Text')) {
747       return 1
748    }
749    # String => '\W'
750    # attribute => 'Member'
751    # context => '#pop'
752    # type => 'RegExpr'
753    if ($self->testRegExpr($text, '\\W', 0, 0, 0, undef, 0, '#pop', 'Member')) {
754       return 1
755    }
756    return 0;
757 };
758
759 sub parseNormal {
760    my ($self, $text) = @_;
761    # attribute => 'Normal Text'
762    # context => 'Line Continue'
763    # type => 'LineContinue'
764    if ($self->testLineContinue($text, 0, undef, 0, 'Line Continue', 'Normal Text')) {
765       return 1
766    }
767    # String => '__END__$'
768    # attribute => 'Keyword'
769    # column => '0'
770    # context => 'DATA'
771    # type => 'RegExpr'
772    if ($self->testRegExpr($text, '__END__$', 0, 0, 0, 0, 0, 'DATA', 'Keyword')) {
773       return 1
774    }
775    # String => '#!\/.*'
776    # attribute => 'Keyword'
777    # column => '0'
778    # context => '#stay'
779    # type => 'RegExpr'
780    if ($self->testRegExpr($text, '#!\\/.*', 0, 0, 0, 0, 0, '#stay', 'Keyword')) {
781       return 1
782    }
783    # String => '(\=|\(|\[|\{)\s*(if|unless|while|until)\b'
784    # attribute => 'Keyword'
785    # beginRegion => 'def block'
786    # context => '#stay'
787    # type => 'RegExpr'
788    if ($self->testRegExpr($text, '(\\=|\\(|\\[|\\{)\\s*(if|unless|while|until)\\b', 0, 0, 0, undef, 0, '#stay', 'Keyword')) {
789       return 1
790    }
791    # String => '(while|until)\b(?!.*\bdo\b)'
792    # attribute => 'Keyword'
793    # beginRegion => 'def block'
794    # context => '#stay'
795    # firstNonSpace => 'true'
796    # type => 'RegExpr'
797    if ($self->testRegExpr($text, '(while|until)\\b(?!.*\\bdo\\b)', 0, 0, 0, undef, 1, '#stay', 'Keyword')) {
798       return 1
799    }
800    # String => '\;\s*(while|until)\b(?!.*\bdo\b)'
801    # attribute => 'Keyword'
802    # beginRegion => 'def block'
803    # context => '#stay'
804    # type => 'RegExpr'
805    if ($self->testRegExpr($text, '\\;\\s*(while|until)\\b(?!.*\\bdo\\b)', 0, 0, 0, undef, 0, '#stay', 'Keyword')) {
806       return 1
807    }
808    # String => '(if|unless)\b'
809    # attribute => 'Keyword'
810    # beginRegion => 'def block'
811    # context => '#stay'
812    # firstNonSpace => 'true'
813    # type => 'RegExpr'
814    if ($self->testRegExpr($text, '(if|unless)\\b', 0, 0, 0, undef, 1, '#stay', 'Keyword')) {
815       return 1
816    }
817    # String => '\;\s*(if|unless)\b'
818    # attribute => 'Keyword'
819    # beginRegion => 'def block'
820    # context => '#stay'
821    # type => 'RegExpr'
822    if ($self->testRegExpr($text, '\\;\\s*(if|unless)\\b', 0, 0, 0, undef, 0, '#stay', 'Keyword')) {
823       return 1
824    }
825    # String => '\bclass\b'
826    # attribute => 'Keyword'
827    # beginRegion => 'def block'
828    # context => '#stay'
829    # type => 'RegExpr'
830    if ($self->testRegExpr($text, '\\bclass\\b', 0, 0, 0, undef, 0, '#stay', 'Keyword')) {
831       return 1
832    }
833    # String => '\bmodule\b'
834    # attribute => 'Keyword'
835    # beginRegion => 'def block'
836    # context => '#stay'
837    # type => 'RegExpr'
838    if ($self->testRegExpr($text, '\\bmodule\\b', 0, 0, 0, undef, 0, '#stay', 'Keyword')) {
839       return 1
840    }
841    # String => '\bbegin\b'
842    # attribute => 'Keyword'
843    # beginRegion => 'def block'
844    # context => '#stay'
845    # type => 'RegExpr'
846    if ($self->testRegExpr($text, '\\bbegin\\b', 0, 0, 0, undef, 0, '#stay', 'Keyword')) {
847       return 1
848    }
849    # String => '\bfor\b(?!.*\bdo\b)'
850    # attribute => 'Keyword'
851    # beginRegion => 'def block'
852    # context => '#stay'
853    # type => 'RegExpr'
854    if ($self->testRegExpr($text, '\\bfor\\b(?!.*\\bdo\\b)', 0, 0, 0, undef, 0, '#stay', 'Keyword')) {
855       return 1
856    }
857    # String => '\bcase\b'
858    # attribute => 'Keyword'
859    # beginRegion => 'def block'
860    # context => '#stay'
861    # type => 'RegExpr'
862    if ($self->testRegExpr($text, '\\bcase\\b', 0, 0, 0, undef, 0, '#stay', 'Keyword')) {
863       return 1
864    }
865    # String => '\bdo\b'
866    # attribute => 'Keyword'
867    # beginRegion => 'def block'
868    # context => '#stay'
869    # type => 'RegExpr'
870    if ($self->testRegExpr($text, '\\bdo\\b', 0, 0, 0, undef, 0, '#stay', 'Keyword')) {
871       return 1
872    }
873    # String => '\bdef\b'
874    # attribute => 'Keyword'
875    # beginRegion => 'def block'
876    # context => '#stay'
877    # type => 'RegExpr'
878    if ($self->testRegExpr($text, '\\bdef\\b', 0, 0, 0, undef, 0, '#stay', 'Keyword')) {
879       return 1
880    }
881    # String => '\bend\b'
882    # attribute => 'Keyword'
883    # context => '#stay'
884    # endRegion => 'def block'
885    # type => 'RegExpr'
886    if ($self->testRegExpr($text, '\\bend\\b', 0, 0, 0, undef, 0, '#stay', 'Keyword')) {
887       return 1
888    }
889    # String => '(\b|^\s*)(else|elsif|rescue|ensure)(\s+|$)'
890    # attribute => 'Keyword'
891    # beginRegion => 'def block'
892    # context => '#stay'
893    # endRegion => 'def block'
894    # type => 'RegExpr'
895    if ($self->testRegExpr($text, '(\\b|^\\s*)(else|elsif|rescue|ensure)(\\s+|$)', 0, 0, 0, undef, 0, '#stay', 'Keyword')) {
896       return 1
897    }
898    # String => '...'
899    # attribute => 'Operator'
900    # context => '#stay'
901    # type => 'StringDetect'
902    if ($self->testStringDetect($text, '...', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
903       return 1
904    }
905    # attribute => 'Operator'
906    # char => '.'
907    # char1 => '.'
908    # context => '#stay'
909    # type => 'Detect2Chars'
910    if ($self->testDetect2Chars($text, '.', '.', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
911       return 1
912    }
913    # String => '\.[_a-z][_a-zA-Z0-9]*(\?|\!|\b)'
914    # attribute => 'Message'
915    # context => '#stay'
916    # type => 'RegExpr'
917    if ($self->testRegExpr($text, '\\.[_a-z][_a-zA-Z0-9]*(\\?|\\!|\\b)', 0, 0, 0, undef, 0, '#stay', 'Message')) {
918       return 1
919    }
920    # String => '\s\?(\\M\-)?(\\C\-)?\\?\S'
921    # attribute => 'Dec'
922    # context => '#stay'
923    # type => 'RegExpr'
924    if ($self->testRegExpr($text, '\\s\\?(\\\\M\\-)?(\\\\C\\-)?\\\\?\\S', 0, 0, 0, undef, 0, '#stay', 'Dec')) {
925       return 1
926    }
927    # String => 'keywords'
928    # attribute => 'Keyword'
929    # context => '#stay'
930    # type => 'keyword'
931    if ($self->testKeyword($text, 'keywords', 0, undef, 0, '#stay', 'Keyword')) {
932       return 1
933    }
934    # String => 'attribute-definitions'
935    # attribute => 'Attribute Definition'
936    # context => '#stay'
937    # type => 'keyword'
938    if ($self->testKeyword($text, 'attribute-definitions', 0, undef, 0, '#stay', 'Attribute Definition')) {
939       return 1
940    }
941    # String => 'access-control'
942    # attribute => 'Access Control'
943    # context => '#stay'
944    # type => 'keyword'
945    if ($self->testKeyword($text, 'access-control', 0, undef, 0, '#stay', 'Access Control')) {
946       return 1
947    }
948    # String => 'definitions'
949    # attribute => 'Definition'
950    # context => '#stay'
951    # type => 'keyword'
952    if ($self->testKeyword($text, 'definitions', 0, undef, 0, '#stay', 'Definition')) {
953       return 1
954    }
955    # String => 'pseudo-variables'
956    # attribute => 'Pseudo variable'
957    # context => '#stay'
958    # type => 'keyword'
959    if ($self->testKeyword($text, 'pseudo-variables', 0, undef, 0, '#stay', 'Pseudo variable')) {
960       return 1
961    }
962    # String => 'default-globals'
963    # attribute => 'Default globals'
964    # context => '#stay'
965    # type => 'keyword'
966    if ($self->testKeyword($text, 'default-globals', 0, undef, 0, '#stay', 'Default globals')) {
967       return 1
968    }
969    # String => 'kernel-methods'
970    # attribute => 'Kernel methods'
971    # context => '#stay'
972    # type => 'keyword'
973    if ($self->testKeyword($text, 'kernel-methods', 0, undef, 0, '#stay', 'Kernel methods')) {
974       return 1
975    }
976    # String => '\$[a-zA-Z_0-9]+'
977    # attribute => 'Global Variable'
978    # context => '#stay'
979    # type => 'RegExpr'
980    if ($self->testRegExpr($text, '\\$[a-zA-Z_0-9]+', 0, 0, 0, undef, 0, '#stay', 'Global Variable')) {
981       return 1
982    }
983    # String => '\$\-[a-zA-z_]\b'
984    # attribute => 'Global Variable'
985    # context => '#stay'
986    # type => 'RegExpr'
987    if ($self->testRegExpr($text, '\\$\\-[a-zA-z_]\\b', 0, 0, 0, undef, 0, '#stay', 'Global Variable')) {
988       return 1
989    }
990    # String => '\$[\d_*`\!:?'/\\\-\&]'
991    # attribute => 'Default globals'
992    # context => '#stay'
993    # type => 'RegExpr'
994    if ($self->testRegExpr($text, '\\$[\\d_*`\\!:?\'/\\\\\\-\\&]', 0, 0, 0, undef, 0, '#stay', 'Default globals')) {
995       return 1
996    }
997    # String => '\b[_A-Z]+[A-Z_0-9]+\b'
998    # attribute => 'Global Constant'
999    # context => '#stay'
1000    # type => 'RegExpr'
1001    if ($self->testRegExpr($text, '\\b[_A-Z]+[A-Z_0-9]+\\b', 0, 0, 0, undef, 0, '#stay', 'Global Constant')) {
1002       return 1
1003    }
1004    # String => '\b[A-Z]+_*([0-9]|[a-z])[_a-zA-Z0-9]*\b'
1005    # attribute => 'Constant'
1006    # context => '#stay'
1007    # type => 'RegExpr'
1008    if ($self->testRegExpr($text, '\\b[A-Z]+_*([0-9]|[a-z])[_a-zA-Z0-9]*\\b', 0, 0, 0, undef, 0, '#stay', 'Constant')) {
1009       return 1
1010    }
1011    # String => '\b\-?0[xX][_0-9a-fA-F]+'
1012    # attribute => 'Hex'
1013    # context => '#stay'
1014    # type => 'RegExpr'
1015    if ($self->testRegExpr($text, '\\b\\-?0[xX][_0-9a-fA-F]+', 0, 0, 0, undef, 0, '#stay', 'Hex')) {
1016       return 1
1017    }
1018    # String => '\b\-?0[bB][_01]+'
1019    # attribute => 'Bin'
1020    # context => '#stay'
1021    # type => 'RegExpr'
1022    if ($self->testRegExpr($text, '\\b\\-?0[bB][_01]+', 0, 0, 0, undef, 0, '#stay', 'Bin')) {
1023       return 1
1024    }
1025    # String => '\b\-?0[1-7][_0-7]*'
1026    # attribute => 'Octal'
1027    # context => '#stay'
1028    # type => 'RegExpr'
1029    if ($self->testRegExpr($text, '\\b\\-?0[1-7][_0-7]*', 0, 0, 0, undef, 0, '#stay', 'Octal')) {
1030       return 1
1031    }
1032    # String => '\b\-?[0-9][0-9_]*\.[0-9][0-9_]*([eE]\-?[1-9][0-9]*(\.[0-9]*)?)?'
1033    # attribute => 'Float'
1034    # context => '#stay'
1035    # type => 'RegExpr'
1036    if ($self->testRegExpr($text, '\\b\\-?[0-9][0-9_]*\\.[0-9][0-9_]*([eE]\\-?[1-9][0-9]*(\\.[0-9]*)?)?', 0, 0, 0, undef, 0, '#stay', 'Float')) {
1037       return 1
1038    }
1039    # String => '\b\-?[1-9][0-9_]*\b'
1040    # attribute => 'Dec'
1041    # context => '#stay'
1042    # type => 'RegExpr'
1043    if ($self->testRegExpr($text, '\\b\\-?[1-9][0-9_]*\\b', 0, 0, 0, undef, 0, '#stay', 'Dec')) {
1044       return 1
1045    }
1046    # attribute => 'Dec'
1047    # context => '#stay'
1048    # type => 'Int'
1049    if ($self->testInt($text, 0, undef, 0, '#stay', 'Dec')) {
1050       return 1
1051    }
1052    # attribute => 'Char'
1053    # context => '#stay'
1054    # type => 'HlCChar'
1055    if ($self->testHlCChar($text, 0, undef, 0, '#stay', 'Char')) {
1056       return 1
1057    }
1058    # String => '=begin'
1059    # attribute => 'Blockcomment'
1060    # beginRegion => 'comment block'
1061    # column => '0'
1062    # context => 'Embedded documentation'
1063    # type => 'StringDetect'
1064    if ($self->testStringDetect($text, '=begin', 0, 0, 0, 0, 0, 'Embedded documentation', 'Blockcomment')) {
1065       return 1
1066    }
1067    # String => '\s*<<-(?=\w+|["'])'
1068    # attribute => 'Operator'
1069    # beginRegion => 'HereDocument'
1070    # context => 'find_indented_heredoc'
1071    # type => 'RegExpr'
1072    if ($self->testRegExpr($text, '\\s*<<-(?=\\w+|["\'])', 0, 0, 0, undef, 0, 'find_indented_heredoc', 'Operator')) {
1073       return 1
1074    }
1075    # String => '\s*<<(?=\w+|["'])'
1076    # attribute => 'Operator'
1077    # beginRegion => 'HereDocument'
1078    # context => 'find_heredoc'
1079    # type => 'RegExpr'
1080    if ($self->testRegExpr($text, '\\s*<<(?=\\w+|["\'])', 0, 0, 0, undef, 0, 'find_heredoc', 'Operator')) {
1081       return 1
1082    }
1083    # attribute => 'Operator'
1084    # char => '.'
1085    # context => '#stay'
1086    # type => 'DetectChar'
1087    if ($self->testDetectChar($text, '.', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
1088       return 1
1089    }
1090    # attribute => 'Operator'
1091    # char => '&'
1092    # char1 => '&'
1093    # context => '#stay'
1094    # type => 'Detect2Chars'
1095    if ($self->testDetect2Chars($text, '&', '&', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
1096       return 1
1097    }
1098    # attribute => 'Operator'
1099    # char => '|'
1100    # char1 => '|'
1101    # context => '#stay'
1102    # type => 'Detect2Chars'
1103    if ($self->testDetect2Chars($text, '|', '|', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
1104       return 1
1105    }
1106    # String => '\s[\?\:\%/]\s'
1107    # attribute => 'Operator'
1108    # context => '#stay'
1109    # type => 'RegExpr'
1110    if ($self->testRegExpr($text, '\\s[\\?\\:\\%/]\\s', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
1111       return 1
1112    }
1113    # String => '[|&<>\^\+*~\-=]+'
1114    # attribute => 'Operator'
1115    # context => '#stay'
1116    # type => 'RegExpr'
1117    if ($self->testRegExpr($text, '[|&<>\\^\\+*~\\-=]+', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
1118       return 1
1119    }
1120    # String => '\s!'
1121    # attribute => 'Operator'
1122    # context => '#stay'
1123    # type => 'RegExpr'
1124    if ($self->testRegExpr($text, '\\s!', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
1125       return 1
1126    }
1127    # String => '/=\s'
1128    # attribute => 'Operator'
1129    # context => '#stay'
1130    # insensitive => '0'
1131    # type => 'RegExpr'
1132    if ($self->testRegExpr($text, '/=\\s', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
1133       return 1
1134    }
1135    # String => '%='
1136    # attribute => 'Operator'
1137    # context => '#stay'
1138    # insensitive => '0'
1139    # type => 'StringDetect'
1140    if ($self->testStringDetect($text, '%=', 0, 0, 0, undef, 0, '#stay', 'Operator')) {
1141       return 1
1142    }
1143    # attribute => 'Operator'
1144    # char => ':'
1145    # char1 => ':'
1146    # context => 'Member Access'
1147    # type => 'Detect2Chars'
1148    if ($self->testDetect2Chars($text, ':', ':', 0, 0, 0, undef, 0, 'Member Access', 'Operator')) {
1149       return 1
1150    }
1151    # String => ':[a-zA-Z_][a-zA-Z0-9_]*'
1152    # attribute => 'Symbol'
1153    # context => '#stay'
1154    # type => 'RegExpr'
1155    if ($self->testRegExpr($text, ':[a-zA-Z_][a-zA-Z0-9_]*', 0, 0, 0, undef, 0, '#stay', 'Symbol')) {
1156       return 1
1157    }
1158    # attribute => 'String'
1159    # char => '"'
1160    # context => 'Quoted String'
1161    # type => 'DetectChar'
1162    if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, 'Quoted String', 'String')) {
1163       return 1
1164    }
1165    # attribute => 'Raw String'
1166    # char => '''
1167    # context => 'Apostrophed String'
1168    # type => 'DetectChar'
1169    if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, 'Apostrophed String', 'Raw String')) {
1170       return 1
1171    }
1172    # attribute => 'Command'
1173    # char => '`'
1174    # context => 'Command String'
1175    # type => 'DetectChar'
1176    if ($self->testDetectChar($text, '`', 0, 0, 0, undef, 0, 'Command String', 'Command')) {
1177       return 1
1178    }
1179    # String => '?#'
1180    # attribute => 'Normal Text'
1181    # context => '#stay'
1182    # type => 'StringDetect'
1183    if ($self->testStringDetect($text, '?#', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) {
1184       return 1
1185    }
1186    # String => '#\s*BEGIN.*$'
1187    # attribute => 'Comment'
1188    # beginRegion => 'marker'
1189    # column => '0'
1190    # context => '#stay'
1191    # type => 'RegExpr'
1192    if ($self->testRegExpr($text, '#\\s*BEGIN.*$', 0, 0, 0, 0, 0, '#stay', 'Comment')) {
1193       return 1
1194    }
1195    # String => '#\s*END.*$'
1196    # attribute => 'Comment'
1197    # column => '0'
1198    # context => '#stay'
1199    # endRegion => 'marker'
1200    # type => 'RegExpr'
1201    if ($self->testRegExpr($text, '#\\s*END.*$', 0, 0, 0, 0, 0, '#stay', 'Comment')) {
1202       return 1
1203    }
1204    # String => '#'
1205    # attribute => 'Comment'
1206    # context => 'Comment Line'
1207    # firstNonSpace => 'true'
1208    # type => 'RegExpr'
1209    if ($self->testRegExpr($text, '#', 0, 0, 0, undef, 1, 'Comment Line', 'Comment')) {
1210       return 1
1211    }
1212    # String => '\s#'
1213    # attribute => 'Comment'
1214    # context => 'General Comment'
1215    # type => 'RegExpr'
1216    if ($self->testRegExpr($text, '\\s#', 0, 0, 0, undef, 0, 'General Comment', 'Comment')) {
1217       return 1
1218    }
1219    # String => '[\[\]]+'
1220    # attribute => 'Delimiter'
1221    # context => '#stay'
1222    # type => 'RegExpr'
1223    if ($self->testRegExpr($text, '[\\[\\]]+', 0, 0, 0, undef, 0, '#stay', 'Delimiter')) {
1224       return 1
1225    }
1226    # attribute => 'Delimiter'
1227    # beginRegion => 'def block'
1228    # char => '{'
1229    # context => '#stay'
1230    # type => 'DetectChar'
1231    if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, '#stay', 'Delimiter')) {
1232       return 1
1233    }
1234    # attribute => 'Delimiter'
1235    # char => '}'
1236    # context => '#stay'
1237    # endRegion => 'def block'
1238    # type => 'DetectChar'
1239    if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#stay', 'Delimiter')) {
1240       return 1
1241    }
1242    # String => '@[a-zA-Z_0-9]+'
1243    # attribute => 'Instance Variable'
1244    # context => '#stay'
1245    # type => 'RegExpr'
1246    if ($self->testRegExpr($text, '@[a-zA-Z_0-9]+', 0, 0, 0, undef, 0, '#stay', 'Instance Variable')) {
1247       return 1
1248    }
1249    # String => '@@[a-zA-Z_0-9]+'
1250    # attribute => 'Class Variable'
1251    # context => '#stay'
1252    # type => 'RegExpr'
1253    if ($self->testRegExpr($text, '@@[a-zA-Z_0-9]+', 0, 0, 0, undef, 0, '#stay', 'Class Variable')) {
1254       return 1
1255    }
1256    # attribute => 'Regular Expression'
1257    # char => '/'
1258    # context => 'RegEx 1'
1259    # type => 'DetectChar'
1260    if ($self->testDetectChar($text, '/', 0, 0, 0, undef, 0, 'RegEx 1', 'Regular Expression')) {
1261       return 1
1262    }
1263    # String => '\s*[%](?=[Qqxw]?[^\s])'
1264    # attribute => 'GDL input'
1265    # beginRegion => 'GdlInput'
1266    # context => 'find_gdl_input'
1267    # type => 'RegExpr'
1268    if ($self->testRegExpr($text, '\\s*[%](?=[Qqxw]?[^\\s])', 0, 0, 0, undef, 0, 'find_gdl_input', 'GDL input')) {
1269       return 1
1270    }
1271    return 0;
1272 };
1273
1274 sub parseQuotedString {
1275    my ($self, $text) = @_;
1276    # String => '\\'
1277    # attribute => 'String'
1278    # context => '#stay'
1279    # type => 'StringDetect'
1280    if ($self->testStringDetect($text, '\\\\', 0, 0, 0, undef, 0, '#stay', 'String')) {
1281       return 1
1282    }
1283    # String => '\\\"'
1284    # attribute => 'String'
1285    # context => '#stay'
1286    # type => 'RegExpr'
1287    if ($self->testRegExpr($text, '\\\\\\"', 0, 0, 0, undef, 0, '#stay', 'String')) {
1288       return 1
1289    }
1290    # String => '#@{1,2}'
1291    # attribute => 'Substitution'
1292    # context => 'Short Subst'
1293    # type => 'RegExpr'
1294    if ($self->testRegExpr($text, '#@{1,2}', 0, 0, 0, undef, 0, 'Short Subst', 'Substitution')) {
1295       return 1
1296    }
1297    # attribute => 'Substitution'
1298    # char => '#'
1299    # char1 => '{'
1300    # context => 'Subst'
1301    # type => 'Detect2Chars'
1302    if ($self->testDetect2Chars($text, '#', '{', 0, 0, 0, undef, 0, 'Subst', 'Substitution')) {
1303       return 1
1304    }
1305    # attribute => 'String'
1306    # char => '"'
1307    # context => '#pop'
1308    # type => 'DetectChar'
1309    if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '#pop', 'String')) {
1310       return 1
1311    }
1312    return 0;
1313 };
1314
1315 sub parseRDocLabel {
1316    my ($self, $text) = @_;
1317    return 0;
1318 };
1319
1320 sub parseRegEx1 {
1321    my ($self, $text) = @_;
1322    # String => '\\\/'
1323    # attribute => 'Regular Expression'
1324    # context => '#stay'
1325    # type => 'RegExpr'
1326    if ($self->testRegExpr($text, '\\\\\\/', 0, 0, 0, undef, 0, '#stay', 'Regular Expression')) {
1327       return 1
1328    }
1329    # String => '[^\\]$'
1330    # attribute => 'Regular Expression'
1331    # context => '#pop'
1332    # type => 'RegExpr'
1333    if ($self->testRegExpr($text, '[^\\\\]$', 0, 0, 0, undef, 0, '#pop', 'Regular Expression')) {
1334       return 1
1335    }
1336    # String => '#@{1,2}'
1337    # attribute => 'Substitution'
1338    # context => 'Short Subst'
1339    # type => 'RegExpr'
1340    if ($self->testRegExpr($text, '#@{1,2}', 0, 0, 0, undef, 0, 'Short Subst', 'Substitution')) {
1341       return 1
1342    }
1343    # attribute => 'Substitution'
1344    # char => '#'
1345    # char1 => '{'
1346    # context => 'Subst'
1347    # type => 'Detect2Chars'
1348    if ($self->testDetect2Chars($text, '#', '{', 0, 0, 0, undef, 0, 'Subst', 'Substitution')) {
1349       return 1
1350    }
1351    # String => '/[uiomxn]*'
1352    # attribute => 'Regular Expression'
1353    # context => '#pop'
1354    # type => 'RegExpr'
1355    if ($self->testRegExpr($text, '/[uiomxn]*', 0, 0, 0, undef, 0, '#pop', 'Regular Expression')) {
1356       return 1
1357    }
1358    return 0;
1359 };
1360
1361 sub parseShortSubst {
1362    my ($self, $text) = @_;
1363    # String => '#@{1,2}'
1364    # attribute => 'Substitution'
1365    # context => '#stay'
1366    # type => 'RegExpr'
1367    if ($self->testRegExpr($text, '#@{1,2}', 0, 0, 0, undef, 0, '#stay', 'Substitution')) {
1368       return 1
1369    }
1370    # String => '\w(?!\w)'
1371    # attribute => 'Substitution'
1372    # context => '#pop'
1373    # type => 'RegExpr'
1374    if ($self->testRegExpr($text, '\\w(?!\\w)', 0, 0, 0, undef, 0, '#pop', 'Substitution')) {
1375       return 1
1376    }
1377    return 0;
1378 };
1379
1380 sub parseSubst {
1381    my ($self, $text) = @_;
1382    # attribute => 'Substitution'
1383    # char => '}'
1384    # context => '#pop'
1385    # type => 'DetectChar'
1386    if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#pop', 'Substitution')) {
1387       return 1
1388    }
1389    # context => 'Normal'
1390    # type => 'IncludeRules'
1391    if ($self->includeRules('Normal', $text)) {
1392       return 1
1393    }
1394    return 0;
1395 };
1396
1397 sub parseapostrophed_indented_heredoc {
1398    my ($self, $text) = @_;
1399    # String => '%1$'
1400    # attribute => 'Keyword'
1401    # context => '#pop#pop'
1402    # dynamic => 'true'
1403    # endRegion => 'HereDocument'
1404    # firstNonSpace => 'true'
1405    # type => 'RegExpr'
1406    if ($self->testRegExpr($text, '%1$', 0, 1, 0, undef, 1, '#pop#pop', 'Keyword')) {
1407       return 1
1408    }
1409    return 0;
1410 };
1411
1412 sub parseapostrophed_normal_heredoc {
1413    my ($self, $text) = @_;
1414    # String => '%1$'
1415    # attribute => 'Keyword'
1416    # column => '0'
1417    # context => '#pop#pop'
1418    # dynamic => 'true'
1419    # endRegion => 'HereDocument'
1420    # type => 'RegExpr'
1421    if ($self->testRegExpr($text, '%1$', 0, 1, 0, 0, 0, '#pop#pop', 'Keyword')) {
1422       return 1
1423    }
1424    return 0;
1425 };
1426
1427 sub parseapostrophed_rules {
1428    my ($self, $text) = @_;
1429    # attribute => 'Raw String'
1430    # char => '\'
1431    # char1 => '\'
1432    # context => '#stay'
1433    # type => 'Detect2Chars'
1434    if ($self->testDetect2Chars($text, '\\', '\\', 0, 0, 0, undef, 0, '#stay', 'Raw String')) {
1435       return 1
1436    }
1437    return 0;
1438 };
1439
1440 sub parsedq_string_rules {
1441    my ($self, $text) = @_;
1442    # attribute => 'String'
1443    # char => '\'
1444    # char1 => '\'
1445    # context => '#stay'
1446    # type => 'Detect2Chars'
1447    if ($self->testDetect2Chars($text, '\\', '\\', 0, 0, 0, undef, 0, '#stay', 'String')) {
1448       return 1
1449    }
1450    # String => '#@{1,2}'
1451    # attribute => 'Substitution'
1452    # context => 'Short Subst'
1453    # type => 'RegExpr'
1454    if ($self->testRegExpr($text, '#@{1,2}', 0, 0, 0, undef, 0, 'Short Subst', 'Substitution')) {
1455       return 1
1456    }
1457    # attribute => 'Substitution'
1458    # char => '#'
1459    # char1 => '{'
1460    # context => 'Subst'
1461    # type => 'Detect2Chars'
1462    if ($self->testDetect2Chars($text, '#', '{', 0, 0, 0, undef, 0, 'Subst', 'Substitution')) {
1463       return 1
1464    }
1465    return 0;
1466 };
1467
1468 sub parsefind_gdl_input {
1469    my ($self, $text) = @_;
1470    # String => 'w\('
1471    # attribute => 'GDL input'
1472    # context => 'gdl_token_array_1'
1473    # type => 'RegExpr'
1474    if ($self->testRegExpr($text, 'w\\(', 0, 0, 0, undef, 0, 'gdl_token_array_1', 'GDL input')) {
1475       return 1
1476    }
1477    # String => 'w\{'
1478    # attribute => 'GDL input'
1479    # context => 'gdl_token_array_2'
1480    # type => 'RegExpr'
1481    if ($self->testRegExpr($text, 'w\\{', 0, 0, 0, undef, 0, 'gdl_token_array_2', 'GDL input')) {
1482       return 1
1483    }
1484    # String => 'w\['
1485    # attribute => 'GDL input'
1486    # context => 'gdl_token_array_3'
1487    # type => 'RegExpr'
1488    if ($self->testRegExpr($text, 'w\\[', 0, 0, 0, undef, 0, 'gdl_token_array_3', 'GDL input')) {
1489       return 1
1490    }
1491    # String => 'w<'
1492    # attribute => 'GDL input'
1493    # context => 'gdl_token_array_4'
1494    # type => 'RegExpr'
1495    if ($self->testRegExpr($text, 'w<', 0, 0, 0, undef, 0, 'gdl_token_array_4', 'GDL input')) {
1496       return 1
1497    }
1498    # String => 'w([^\s\w])'
1499    # attribute => 'GDL input'
1500    # context => 'gdl_token_array_5'
1501    # type => 'RegExpr'
1502    if ($self->testRegExpr($text, 'w([^\\s\\w])', 0, 0, 0, undef, 0, 'gdl_token_array_5', 'GDL input')) {
1503       return 1
1504    }
1505    # String => 'q\('
1506    # attribute => 'GDL input'
1507    # context => 'gdl_apostrophed_1'
1508    # type => 'RegExpr'
1509    if ($self->testRegExpr($text, 'q\\(', 0, 0, 0, undef, 0, 'gdl_apostrophed_1', 'GDL input')) {
1510       return 1
1511    }
1512    # String => 'q\{'
1513    # attribute => 'GDL input'
1514    # context => 'gdl_apostrophed_2'
1515    # type => 'RegExpr'
1516    if ($self->testRegExpr($text, 'q\\{', 0, 0, 0, undef, 0, 'gdl_apostrophed_2', 'GDL input')) {
1517       return 1
1518    }
1519    # String => 'q\['
1520    # attribute => 'GDL input'
1521    # context => 'gdl_apostrophed_3'
1522    # type => 'RegExpr'
1523    if ($self->testRegExpr($text, 'q\\[', 0, 0, 0, undef, 0, 'gdl_apostrophed_3', 'GDL input')) {
1524       return 1
1525    }
1526    # String => 'q<'
1527    # attribute => 'GDL input'
1528    # context => 'gdl_apostrophed_4'
1529    # type => 'RegExpr'
1530    if ($self->testRegExpr($text, 'q<', 0, 0, 0, undef, 0, 'gdl_apostrophed_4', 'GDL input')) {
1531       return 1
1532    }
1533    # String => 'q([^\s\w])'
1534    # attribute => 'GDL input'
1535    # context => 'gdl_apostrophed_5'
1536    # type => 'RegExpr'
1537    if ($self->testRegExpr($text, 'q([^\\s\\w])', 0, 0, 0, undef, 0, 'gdl_apostrophed_5', 'GDL input')) {
1538       return 1
1539    }
1540    # String => 'x\('
1541    # attribute => 'GDL input'
1542    # context => 'gdl_shell_command_1'
1543    # type => 'RegExpr'
1544    if ($self->testRegExpr($text, 'x\\(', 0, 0, 0, undef, 0, 'gdl_shell_command_1', 'GDL input')) {
1545       return 1
1546    }
1547    # String => 'x\{'
1548    # attribute => 'GDL input'
1549    # context => 'gdl_shell_command_2'
1550    # type => 'RegExpr'
1551    if ($self->testRegExpr($text, 'x\\{', 0, 0, 0, undef, 0, 'gdl_shell_command_2', 'GDL input')) {
1552       return 1
1553    }
1554    # String => 'x\['
1555    # attribute => 'GDL input'
1556    # context => 'gdl_shell_command_3'
1557    # type => 'RegExpr'
1558    if ($self->testRegExpr($text, 'x\\[', 0, 0, 0, undef, 0, 'gdl_shell_command_3', 'GDL input')) {
1559       return 1
1560    }
1561    # String => 'x<'
1562    # attribute => 'GDL input'
1563    # context => 'gdl_shell_command_4'
1564    # type => 'RegExpr'
1565    if ($self->testRegExpr($text, 'x<', 0, 0, 0, undef, 0, 'gdl_shell_command_4', 'GDL input')) {
1566       return 1
1567    }
1568    # String => 'x([^\s\w])'
1569    # attribute => 'GDL input'
1570    # context => 'gdl_shell_command_5'
1571    # type => 'RegExpr'
1572    if ($self->testRegExpr($text, 'x([^\\s\\w])', 0, 0, 0, undef, 0, 'gdl_shell_command_5', 'GDL input')) {
1573       return 1
1574    }
1575    # String => 'r\('
1576    # attribute => 'GDL input'
1577    # context => 'gdl_regexpr_1'
1578    # type => 'RegExpr'
1579    if ($self->testRegExpr($text, 'r\\(', 0, 0, 0, undef, 0, 'gdl_regexpr_1', 'GDL input')) {
1580       return 1
1581    }
1582    # String => 'r\{'
1583    # attribute => 'GDL input'
1584    # context => 'gdl_regexpr_2'
1585    # type => 'RegExpr'
1586    if ($self->testRegExpr($text, 'r\\{', 0, 0, 0, undef, 0, 'gdl_regexpr_2', 'GDL input')) {
1587       return 1
1588    }
1589    # String => 'r\['
1590    # attribute => 'GDL input'
1591    # context => 'gdl_regexpr_3'
1592    # type => 'RegExpr'
1593    if ($self->testRegExpr($text, 'r\\[', 0, 0, 0, undef, 0, 'gdl_regexpr_3', 'GDL input')) {
1594       return 1
1595    }
1596    # String => 'r<'
1597    # attribute => 'GDL input'
1598    # context => 'gdl_regexpr_4'
1599    # type => 'RegExpr'
1600    if ($self->testRegExpr($text, 'r<', 0, 0, 0, undef, 0, 'gdl_regexpr_4', 'GDL input')) {
1601       return 1
1602    }
1603    # String => 'r([^\s\w])'
1604    # attribute => 'GDL input'
1605    # context => 'gdl_regexpr_5'
1606    # type => 'RegExpr'
1607    if ($self->testRegExpr($text, 'r([^\\s\\w])', 0, 0, 0, undef, 0, 'gdl_regexpr_5', 'GDL input')) {
1608       return 1
1609    }
1610    # String => 'Q?\('
1611    # attribute => 'GDL input'
1612    # context => 'gdl_dq_string_1'
1613    # type => 'RegExpr'
1614    if ($self->testRegExpr($text, 'Q?\\(', 0, 0, 0, undef, 0, 'gdl_dq_string_1', 'GDL input')) {
1615       return 1
1616    }
1617    # String => 'Q?\{'
1618    # attribute => 'GDL input'
1619    # context => 'gdl_dq_string_2'
1620    # type => 'RegExpr'
1621    if ($self->testRegExpr($text, 'Q?\\{', 0, 0, 0, undef, 0, 'gdl_dq_string_2', 'GDL input')) {
1622       return 1
1623    }
1624    # String => 'Q?\['
1625    # attribute => 'GDL input'
1626    # context => 'gdl_dq_string_3'
1627    # type => 'RegExpr'
1628    if ($self->testRegExpr($text, 'Q?\\[', 0, 0, 0, undef, 0, 'gdl_dq_string_3', 'GDL input')) {
1629       return 1
1630    }
1631    # String => 'Q?<'
1632    # attribute => 'GDL input'
1633    # context => 'gdl_dq_string_4'
1634    # type => 'RegExpr'
1635    if ($self->testRegExpr($text, 'Q?<', 0, 0, 0, undef, 0, 'gdl_dq_string_4', 'GDL input')) {
1636       return 1
1637    }
1638    # String => 'Q?([^\s\w])'
1639    # attribute => 'GDL input'
1640    # context => 'gdl_dq_string_5'
1641    # type => 'RegExpr'
1642    if ($self->testRegExpr($text, 'Q?([^\\s\\w])', 0, 0, 0, undef, 0, 'gdl_dq_string_5', 'GDL input')) {
1643       return 1
1644    }
1645    return 0;
1646 };
1647
1648 sub parsefind_heredoc {
1649    my ($self, $text) = @_;
1650    # String => ''(\w+)''
1651    # attribute => 'Keyword'
1652    # context => 'apostrophed_normal_heredoc'
1653    # type => 'RegExpr'
1654    if ($self->testRegExpr($text, '\'(\\w+)\'', 0, 0, 0, undef, 0, 'apostrophed_normal_heredoc', 'Keyword')) {
1655       return 1
1656    }
1657    # String => '"?(\w+)"?'
1658    # attribute => 'Keyword'
1659    # context => 'normal_heredoc'
1660    # type => 'RegExpr'
1661    if ($self->testRegExpr($text, '"?(\\w+)"?', 0, 0, 0, undef, 0, 'normal_heredoc', 'Keyword')) {
1662       return 1
1663    }
1664    return 0;
1665 };
1666
1667 sub parsefind_indented_heredoc {
1668    my ($self, $text) = @_;
1669    # String => ''(\w+)''
1670    # attribute => 'Keyword'
1671    # context => 'apostrophed_indented_heredoc'
1672    # type => 'RegExpr'
1673    if ($self->testRegExpr($text, '\'(\\w+)\'', 0, 0, 0, undef, 0, 'apostrophed_indented_heredoc', 'Keyword')) {
1674       return 1
1675    }
1676    # String => '"?(\w+)"?'
1677    # attribute => 'Keyword'
1678    # context => 'indented_heredoc'
1679    # type => 'RegExpr'
1680    if ($self->testRegExpr($text, '"?(\\w+)"?', 0, 0, 0, undef, 0, 'indented_heredoc', 'Keyword')) {
1681       return 1
1682    }
1683    return 0;
1684 };
1685
1686 sub parsegdl_apostrophed_1 {
1687    my ($self, $text) = @_;
1688    # context => 'apostrophed_rules'
1689    # type => 'IncludeRules'
1690    if ($self->includeRules('apostrophed_rules', $text)) {
1691       return 1
1692    }
1693    # attribute => 'Raw String'
1694    # char => '\'
1695    # char1 => ')'
1696    # context => '#stay'
1697    # type => 'Detect2Chars'
1698    if ($self->testDetect2Chars($text, '\\', ')', 0, 0, 0, undef, 0, '#stay', 'Raw String')) {
1699       return 1
1700    }
1701    # attribute => 'Raw String'
1702    # char => '('
1703    # context => 'gdl_apostrophed_1_nested'
1704    # type => 'DetectChar'
1705    if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'gdl_apostrophed_1_nested', 'Raw String')) {
1706       return 1
1707    }
1708    # attribute => 'GDL input'
1709    # char => ')'
1710    # context => '#pop#pop'
1711    # endRegion => 'GdlInput'
1712    # type => 'DetectChar'
1713    if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop#pop', 'GDL input')) {
1714       return 1
1715    }
1716    return 0;
1717 };
1718
1719 sub parsegdl_apostrophed_1_nested {
1720    my ($self, $text) = @_;
1721    # context => 'apostrophed_rules'
1722    # type => 'IncludeRules'
1723    if ($self->includeRules('apostrophed_rules', $text)) {
1724       return 1
1725    }
1726    # attribute => 'Raw String'
1727    # char => '('
1728    # context => 'gdl_apostrophed_1_nested'
1729    # type => 'DetectChar'
1730    if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'gdl_apostrophed_1_nested', 'Raw String')) {
1731       return 1
1732    }
1733    # attribute => 'Raw String'
1734    # char => ')'
1735    # context => '#pop'
1736    # type => 'DetectChar'
1737    if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop', 'Raw String')) {
1738       return 1
1739    }
1740    return 0;
1741 };
1742
1743 sub parsegdl_apostrophed_2 {
1744    my ($self, $text) = @_;
1745    # context => 'apostrophed_rules'
1746    # type => 'IncludeRules'
1747    if ($self->includeRules('apostrophed_rules', $text)) {
1748       return 1
1749    }
1750    # attribute => 'Raw String'
1751    # char => '\'
1752    # char1 => '}'
1753    # context => '#stay'
1754    # type => 'Detect2Chars'
1755    if ($self->testDetect2Chars($text, '\\', '}', 0, 0, 0, undef, 0, '#stay', 'Raw String')) {
1756       return 1
1757    }
1758    # attribute => 'GDL input'
1759    # char => '}'
1760    # context => '#pop#pop'
1761    # endRegion => 'GdlInput'
1762    # type => 'DetectChar'
1763    if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#pop#pop', 'GDL input')) {
1764       return 1
1765    }
1766    # attribute => 'Raw String'
1767    # char => '{'
1768    # context => 'gdl_apostrophed_2_nested'
1769    # type => 'DetectChar'
1770    if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, 'gdl_apostrophed_2_nested', 'Raw String')) {
1771       return 1
1772    }
1773    return 0;
1774 };
1775
1776 sub parsegdl_apostrophed_2_nested {
1777    my ($self, $text) = @_;
1778    # context => 'apostrophed_rules'
1779    # type => 'IncludeRules'
1780    if ($self->includeRules('apostrophed_rules', $text)) {
1781       return 1
1782    }
1783    # attribute => 'Raw String'
1784    # char => '{'
1785    # context => 'gdl_apostrophed_2_nested'
1786    # type => 'DetectChar'
1787    if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, 'gdl_apostrophed_2_nested', 'Raw String')) {
1788       return 1
1789    }
1790    # attribute => 'Raw String'
1791    # char => '}'
1792    # context => '#pop'
1793    # type => 'DetectChar'
1794    if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#pop', 'Raw String')) {
1795       return 1
1796    }
1797    return 0;
1798 };
1799
1800 sub parsegdl_apostrophed_3 {
1801    my ($self, $text) = @_;
1802    # context => 'apostrophed_rules'
1803    # type => 'IncludeRules'
1804    if ($self->includeRules('apostrophed_rules', $text)) {
1805       return 1
1806    }
1807    # attribute => 'Raw String'
1808    # char => '\'
1809    # char1 => ']'
1810    # context => '#stay'
1811    # type => 'Detect2Chars'
1812    if ($self->testDetect2Chars($text, '\\', ']', 0, 0, 0, undef, 0, '#stay', 'Raw String')) {
1813       return 1
1814    }
1815    # attribute => 'Raw String'
1816    # char => '['
1817    # context => 'gdl_apostrophed_3_nested'
1818    # type => 'DetectChar'
1819    if ($self->testDetectChar($text, '[', 0, 0, 0, undef, 0, 'gdl_apostrophed_3_nested', 'Raw String')) {
1820       return 1
1821    }
1822    # attribute => 'GDL input'
1823    # char => ']'
1824    # context => '#pop#pop'
1825    # endRegion => 'GdlInput'
1826    # type => 'DetectChar'
1827    if ($self->testDetectChar($text, ']', 0, 0, 0, undef, 0, '#pop#pop', 'GDL input')) {
1828       return 1
1829    }
1830    return 0;
1831 };
1832
1833 sub parsegdl_apostrophed_3_nested {
1834    my ($self, $text) = @_;
1835    # context => 'apostrophed_rules'
1836    # type => 'IncludeRules'
1837    if ($self->includeRules('apostrophed_rules', $text)) {
1838       return 1
1839    }
1840    # attribute => 'Raw String'
1841    # char => '['
1842    # context => 'gdl_apostrophed_3_nested'
1843    # type => 'DetectChar'
1844    if ($self->testDetectChar($text, '[', 0, 0, 0, undef, 0, 'gdl_apostrophed_3_nested', 'Raw String')) {
1845       return 1
1846    }
1847    # attribute => 'Raw String'
1848    # char => ']'
1849    # context => '#pop'
1850    # type => 'DetectChar'
1851    if ($self->testDetectChar($text, ']', 0, 0, 0, undef, 0, '#pop', 'Raw String')) {
1852       return 1
1853    }
1854    return 0;
1855 };
1856
1857 sub parsegdl_apostrophed_4 {
1858    my ($self, $text) = @_;
1859    # context => 'apostrophed_rules'
1860    # type => 'IncludeRules'
1861    if ($self->includeRules('apostrophed_rules', $text)) {
1862       return 1
1863    }
1864    # attribute => 'Raw String'
1865    # char => '\'
1866    # char1 => '>'
1867    # context => '#stay'
1868    # type => 'Detect2Chars'
1869    if ($self->testDetect2Chars($text, '\\', '>', 0, 0, 0, undef, 0, '#stay', 'Raw String')) {
1870       return 1
1871    }
1872    # attribute => 'Raw String'
1873    # char => '<'
1874    # context => 'gdl_apostrophed_4_nested'
1875    # type => 'DetectChar'
1876    if ($self->testDetectChar($text, '<', 0, 0, 0, undef, 0, 'gdl_apostrophed_4_nested', 'Raw String')) {
1877       return 1
1878    }
1879    # attribute => 'GDL input'
1880    # char => '>'
1881    # context => '#pop#pop'
1882    # endRegion => 'GdlInput'
1883    # type => 'DetectChar'
1884    if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '#pop#pop', 'GDL input')) {
1885       return 1
1886    }
1887    return 0;
1888 };
1889
1890 sub parsegdl_apostrophed_4_nested {
1891    my ($self, $text) = @_;
1892    # context => 'apostrophed_rules'
1893    # type => 'IncludeRules'
1894    if ($self->includeRules('apostrophed_rules', $text)) {
1895       return 1
1896    }
1897    # attribute => 'Raw String'
1898    # char => '<'
1899    # context => 'gdl_apostrophed_4_nested'
1900    # type => 'DetectChar'
1901    if ($self->testDetectChar($text, '<', 0, 0, 0, undef, 0, 'gdl_apostrophed_4_nested', 'Raw String')) {
1902       return 1
1903    }
1904    # attribute => 'Raw String'
1905    # char => '>'
1906    # context => '#pop'
1907    # type => 'DetectChar'
1908    if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '#pop', 'Raw String')) {
1909       return 1
1910    }
1911    return 0;
1912 };
1913
1914 sub parsegdl_apostrophed_5 {
1915    my ($self, $text) = @_;
1916    # context => 'apostrophed_rules'
1917    # type => 'IncludeRules'
1918    if ($self->includeRules('apostrophed_rules', $text)) {
1919       return 1
1920    }
1921    # String => '\\%1'
1922    # attribute => 'Raw String'
1923    # context => '#stay'
1924    # dynamic => 'true'
1925    # type => 'RegExpr'
1926    if ($self->testRegExpr($text, '\\\\%1', 0, 1, 0, undef, 0, '#stay', 'Raw String')) {
1927       return 1
1928    }
1929    # String => '\s*%1'
1930    # attribute => 'GDL input'
1931    # context => '#pop#pop'
1932    # dynamic => 'true'
1933    # endRegion => 'GdlInput'
1934    # type => 'RegExpr'
1935    if ($self->testRegExpr($text, '\\s*%1', 0, 1, 0, undef, 0, '#pop#pop', 'GDL input')) {
1936       return 1
1937    }
1938    return 0;
1939 };
1940
1941 sub parsegdl_dq_string_1 {
1942    my ($self, $text) = @_;
1943    # context => 'dq_string_rules'
1944    # type => 'IncludeRules'
1945    if ($self->includeRules('dq_string_rules', $text)) {
1946       return 1
1947    }
1948    # attribute => 'String'
1949    # char => '\'
1950    # char1 => ')'
1951    # context => '#stay'
1952    # type => 'Detect2Chars'
1953    if ($self->testDetect2Chars($text, '\\', ')', 0, 0, 0, undef, 0, '#stay', 'String')) {
1954       return 1
1955    }
1956    # attribute => 'String'
1957    # char => '('
1958    # context => 'gdl_dq_string_1_nested'
1959    # type => 'DetectChar'
1960    if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'gdl_dq_string_1_nested', 'String')) {
1961       return 1
1962    }
1963    # attribute => 'GDL input'
1964    # char => ')'
1965    # context => '#pop#pop'
1966    # endRegion => 'GdlInput'
1967    # type => 'DetectChar'
1968    if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop#pop', 'GDL input')) {
1969       return 1
1970    }
1971    return 0;
1972 };
1973
1974 sub parsegdl_dq_string_1_nested {
1975    my ($self, $text) = @_;
1976    # context => 'dq_string_rules'
1977    # type => 'IncludeRules'
1978    if ($self->includeRules('dq_string_rules', $text)) {
1979       return 1
1980    }
1981    # attribute => 'String'
1982    # char => '('
1983    # context => 'gdl_dq_string_1_nested'
1984    # type => 'DetectChar'
1985    if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'gdl_dq_string_1_nested', 'String')) {
1986       return 1
1987    }
1988    # attribute => 'String'
1989    # char => ')'
1990    # context => '#pop'
1991    # type => 'DetectChar'
1992    if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop', 'String')) {
1993       return 1
1994    }
1995    return 0;
1996 };
1997
1998 sub parsegdl_dq_string_2 {
1999    my ($self, $text) = @_;
2000    # context => 'dq_string_rules'
2001    # type => 'IncludeRules'
2002    if ($self->includeRules('dq_string_rules', $text)) {
2003       return 1
2004    }
2005    # attribute => 'String'
2006    # char => '\'
2007    # char1 => '}'
2008    # context => '#stay'
2009    # type => 'Detect2Chars'
2010    if ($self->testDetect2Chars($text, '\\', '}', 0, 0, 0, undef, 0, '#stay', 'String')) {
2011       return 1
2012    }
2013    # attribute => 'GDL input'
2014    # char => '}'
2015    # context => '#pop#pop'
2016    # endRegion => 'GdlInput'
2017    # type => 'DetectChar'
2018    if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#pop#pop', 'GDL input')) {
2019       return 1
2020    }
2021    # attribute => 'String'
2022    # char => '{'
2023    # context => 'gdl_dq_string_2_nested'
2024    # type => 'DetectChar'
2025    if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, 'gdl_dq_string_2_nested', 'String')) {
2026       return 1
2027    }
2028    return 0;
2029 };
2030
2031 sub parsegdl_dq_string_2_nested {
2032    my ($self, $text) = @_;
2033    # attribute => 'String'
2034    # char => '{'
2035    # context => 'gdl_dq_string_2_nested'
2036    # type => 'DetectChar'
2037    if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, 'gdl_dq_string_2_nested', 'String')) {
2038       return 1
2039    }
2040    # attribute => 'String'
2041    # char => '}'
2042    # context => '#pop'
2043    # type => 'DetectChar'
2044    if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#pop', 'String')) {
2045       return 1
2046    }
2047    # context => 'dq_string_rules'
2048    # type => 'IncludeRules'
2049    if ($self->includeRules('dq_string_rules', $text)) {
2050       return 1
2051    }
2052    return 0;
2053 };
2054
2055 sub parsegdl_dq_string_3 {
2056    my ($self, $text) = @_;
2057    # context => 'dq_string_rules'
2058    # type => 'IncludeRules'
2059    if ($self->includeRules('dq_string_rules', $text)) {
2060       return 1
2061    }
2062    # attribute => 'String'
2063    # char => '\'
2064    # char1 => ']'
2065    # context => '#stay'
2066    # type => 'Detect2Chars'
2067    if ($self->testDetect2Chars($text, '\\', ']', 0, 0, 0, undef, 0, '#stay', 'String')) {
2068       return 1
2069    }
2070    # attribute => 'String'
2071    # char => '['
2072    # context => 'gdl_dq_string_3_nested'
2073    # type => 'DetectChar'
2074    if ($self->testDetectChar($text, '[', 0, 0, 0, undef, 0, 'gdl_dq_string_3_nested', 'String')) {
2075       return 1
2076    }
2077    # attribute => 'GDL input'
2078    # char => ']'
2079    # context => '#pop#pop'
2080    # endRegion => 'GdlInput'
2081    # type => 'DetectChar'
2082    if ($self->testDetectChar($text, ']', 0, 0, 0, undef, 0, '#pop#pop', 'GDL input')) {
2083       return 1
2084    }
2085    return 0;
2086 };
2087
2088 sub parsegdl_dq_string_3_nested {
2089    my ($self, $text) = @_;
2090    # attribute => 'String'
2091    # char => '['
2092    # context => 'gdl_dq_string_3_nested'
2093    # type => 'DetectChar'
2094    if ($self->testDetectChar($text, '[', 0, 0, 0, undef, 0, 'gdl_dq_string_3_nested', 'String')) {
2095       return 1
2096    }
2097    # attribute => 'String'
2098    # char => ']'
2099    # context => '#pop'
2100    # type => 'DetectChar'
2101    if ($self->testDetectChar($text, ']', 0, 0, 0, undef, 0, '#pop', 'String')) {
2102       return 1
2103    }
2104    # context => 'dq_string_rules'
2105    # type => 'IncludeRules'
2106    if ($self->includeRules('dq_string_rules', $text)) {
2107       return 1
2108    }
2109    return 0;
2110 };
2111
2112 sub parsegdl_dq_string_4 {
2113    my ($self, $text) = @_;
2114    # context => 'dq_string_rules'
2115    # type => 'IncludeRules'
2116    if ($self->includeRules('dq_string_rules', $text)) {
2117       return 1
2118    }
2119    # attribute => 'String'
2120    # char => '\'
2121    # char1 => '>'
2122    # context => '#stay'
2123    # type => 'Detect2Chars'
2124    if ($self->testDetect2Chars($text, '\\', '>', 0, 0, 0, undef, 0, '#stay', 'String')) {
2125       return 1
2126    }
2127    # attribute => 'String'
2128    # char => '<'
2129    # context => 'gdl_dq_string_4_nested'
2130    # type => 'DetectChar'
2131    if ($self->testDetectChar($text, '<', 0, 0, 0, undef, 0, 'gdl_dq_string_4_nested', 'String')) {
2132       return 1
2133    }
2134    # attribute => 'GDL input'
2135    # char => '>'
2136    # context => '#pop#pop'
2137    # endRegion => 'GdlInput'
2138    # type => 'DetectChar'
2139    if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '#pop#pop', 'GDL input')) {
2140       return 1
2141    }
2142    return 0;
2143 };
2144
2145 sub parsegdl_dq_string_4_nested {
2146    my ($self, $text) = @_;
2147    # attribute => 'String'
2148    # char => '<'
2149    # context => 'gdl_dq_string_4_nested'
2150    # type => 'DetectChar'
2151    if ($self->testDetectChar($text, '<', 0, 0, 0, undef, 0, 'gdl_dq_string_4_nested', 'String')) {
2152       return 1
2153    }
2154    # attribute => 'String'
2155    # char => '>'
2156    # context => '#pop'
2157    # type => 'DetectChar'
2158    if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '#pop', 'String')) {
2159       return 1
2160    }
2161    # context => 'dq_string_rules'
2162    # type => 'IncludeRules'
2163    if ($self->includeRules('dq_string_rules', $text)) {
2164       return 1
2165    }
2166    return 0;
2167 };
2168
2169 sub parsegdl_dq_string_5 {
2170    my ($self, $text) = @_;
2171    # context => 'dq_string_rules'
2172    # type => 'IncludeRules'
2173    if ($self->includeRules('dq_string_rules', $text)) {
2174       return 1
2175    }
2176    # String => '\\%1'
2177    # attribute => 'String'
2178    # context => '#stay'
2179    # dynamic => 'true'
2180    # type => 'RegExpr'
2181    if ($self->testRegExpr($text, '\\\\%1', 0, 1, 0, undef, 0, '#stay', 'String')) {
2182       return 1
2183    }
2184    # String => '\s*%1'
2185    # attribute => 'GDL input'
2186    # context => '#pop#pop'
2187    # dynamic => 'true'
2188    # endRegion => 'GdlInput'
2189    # type => 'RegExpr'
2190    if ($self->testRegExpr($text, '\\s*%1', 0, 1, 0, undef, 0, '#pop#pop', 'GDL input')) {
2191       return 1
2192    }
2193    return 0;
2194 };
2195
2196 sub parsegdl_regexpr_1 {
2197    my ($self, $text) = @_;
2198    # context => 'regexpr_rules'
2199    # type => 'IncludeRules'
2200    if ($self->includeRules('regexpr_rules', $text)) {
2201       return 1
2202    }
2203    # attribute => 'Regular Expression'
2204    # char => '\'
2205    # char1 => ')'
2206    # context => '#stay'
2207    # type => 'Detect2Chars'
2208    if ($self->testDetect2Chars($text, '\\', ')', 0, 0, 0, undef, 0, '#stay', 'Regular Expression')) {
2209       return 1
2210    }
2211    # attribute => 'Regular Expression'
2212    # char => '('
2213    # context => 'gdl_regexpr_1_nested'
2214    # type => 'DetectChar'
2215    if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'gdl_regexpr_1_nested', 'Regular Expression')) {
2216       return 1
2217    }
2218    # String => '\)[uiomxn]*'
2219    # attribute => 'GDL input'
2220    # context => '#pop#pop'
2221    # endRegion => 'GdlInput'
2222    # type => 'RegExpr'
2223    if ($self->testRegExpr($text, '\\)[uiomxn]*', 0, 0, 0, undef, 0, '#pop#pop', 'GDL input')) {
2224       return 1
2225    }
2226    return 0;
2227 };
2228
2229 sub parsegdl_regexpr_1_nested {
2230    my ($self, $text) = @_;
2231    # context => 'regexpr_rules'
2232    # type => 'IncludeRules'
2233    if ($self->includeRules('regexpr_rules', $text)) {
2234       return 1
2235    }
2236    # attribute => 'Regular Expression'
2237    # char => '('
2238    # context => 'gdl_regexpr_1_nested'
2239    # type => 'DetectChar'
2240    if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'gdl_regexpr_1_nested', 'Regular Expression')) {
2241       return 1
2242    }
2243    # attribute => 'Regular Expression'
2244    # char => ')'
2245    # context => '#pop'
2246    # type => 'DetectChar'
2247    if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop', 'Regular Expression')) {
2248       return 1
2249    }
2250    return 0;
2251 };
2252
2253 sub parsegdl_regexpr_2 {
2254    my ($self, $text) = @_;
2255    # context => 'regexpr_rules'
2256    # type => 'IncludeRules'
2257    if ($self->includeRules('regexpr_rules', $text)) {
2258       return 1
2259    }
2260    # attribute => 'Regular Expression'
2261    # char => '\'
2262    # char1 => '}'
2263    # context => '#stay'
2264    # type => 'Detect2Chars'
2265    if ($self->testDetect2Chars($text, '\\', '}', 0, 0, 0, undef, 0, '#stay', 'Regular Expression')) {
2266       return 1
2267    }
2268    # String => '\}[uiomxn]*'
2269    # attribute => 'GDL input'
2270    # context => '#pop#pop'
2271    # endRegion => 'GdlInput'
2272    # type => 'RegExpr'
2273    if ($self->testRegExpr($text, '\\}[uiomxn]*', 0, 0, 0, undef, 0, '#pop#pop', 'GDL input')) {
2274       return 1
2275    }
2276    # attribute => 'Regular Expression'
2277    # char => '{'
2278    # context => 'gdl_regexpr_2_nested'
2279    # type => 'DetectChar'
2280    if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, 'gdl_regexpr_2_nested', 'Regular Expression')) {
2281       return 1
2282    }
2283    return 0;
2284 };
2285
2286 sub parsegdl_regexpr_2_nested {
2287    my ($self, $text) = @_;
2288    # context => 'regexpr_rules'
2289    # type => 'IncludeRules'
2290    if ($self->includeRules('regexpr_rules', $text)) {
2291       return 1
2292    }
2293    # attribute => 'Regular Expression'
2294    # char => '{'
2295    # context => 'gdl_regexpr_2_nested'
2296    # type => 'DetectChar'
2297    if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, 'gdl_regexpr_2_nested', 'Regular Expression')) {
2298       return 1
2299    }
2300    # attribute => 'Regular Expression'
2301    # char => '}'
2302    # context => '#pop'
2303    # type => 'DetectChar'
2304    if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#pop', 'Regular Expression')) {
2305       return 1
2306    }
2307    return 0;
2308 };
2309
2310 sub parsegdl_regexpr_3 {
2311    my ($self, $text) = @_;
2312    # context => 'regexpr_rules'
2313    # type => 'IncludeRules'
2314    if ($self->includeRules('regexpr_rules', $text)) {
2315       return 1
2316    }
2317    # attribute => 'Regular Expression'
2318    # char => '\'
2319    # char1 => ']'
2320    # context => '#stay'
2321    # type => 'Detect2Chars'
2322    if ($self->testDetect2Chars($text, '\\', ']', 0, 0, 0, undef, 0, '#stay', 'Regular Expression')) {
2323       return 1
2324    }
2325    # attribute => 'Regular Expression'
2326    # char => '['
2327    # context => 'gdl_regexpr_3_nested'
2328    # type => 'DetectChar'
2329    if ($self->testDetectChar($text, '[', 0, 0, 0, undef, 0, 'gdl_regexpr_3_nested', 'Regular Expression')) {
2330       return 1
2331    }
2332    # String => '\][uiomxn]*'
2333    # attribute => 'GDL input'
2334    # context => '#pop#pop'
2335    # endRegion => 'GdlInput'
2336    # type => 'RegExpr'
2337    if ($self->testRegExpr($text, '\\][uiomxn]*', 0, 0, 0, undef, 0, '#pop#pop', 'GDL input')) {
2338       return 1
2339    }
2340    return 0;
2341 };
2342
2343 sub parsegdl_regexpr_3_nested {
2344    my ($self, $text) = @_;
2345    # context => 'regexpr_rules'
2346    # type => 'IncludeRules'
2347    if ($self->includeRules('regexpr_rules', $text)) {
2348       return 1
2349    }
2350    # attribute => 'Regular Expression'
2351    # char => '['
2352    # context => 'gdl_regexpr_3_nested'
2353    # type => 'DetectChar'
2354    if ($self->testDetectChar($text, '[', 0, 0, 0, undef, 0, 'gdl_regexpr_3_nested', 'Regular Expression')) {
2355       return 1
2356    }
2357    # attribute => 'Regular Expression'
2358    # char => ']'
2359    # context => '#pop'
2360    # type => 'DetectChar'
2361    if ($self->testDetectChar($text, ']', 0, 0, 0, undef, 0, '#pop', 'Regular Expression')) {
2362       return 1
2363    }
2364    return 0;
2365 };
2366
2367 sub parsegdl_regexpr_4 {
2368    my ($self, $text) = @_;
2369    # context => 'regexpr_rules'
2370    # type => 'IncludeRules'
2371    if ($self->includeRules('regexpr_rules', $text)) {
2372       return 1
2373    }
2374    # attribute => 'Regular Expression'
2375    # char => '\'
2376    # char1 => '>'
2377    # context => '#stay'
2378    # type => 'Detect2Chars'
2379    if ($self->testDetect2Chars($text, '\\', '>', 0, 0, 0, undef, 0, '#stay', 'Regular Expression')) {
2380       return 1
2381    }
2382    # attribute => 'Regular Expression'
2383    # char => '<'
2384    # context => 'gdl_regexpr_4_nested'
2385    # type => 'DetectChar'
2386    if ($self->testDetectChar($text, '<', 0, 0, 0, undef, 0, 'gdl_regexpr_4_nested', 'Regular Expression')) {
2387       return 1
2388    }
2389    # String => '>[uiomxn]*'
2390    # attribute => 'GDL input'
2391    # context => '#pop#pop'
2392    # endRegion => 'GdlInput'
2393    # type => 'RegExpr'
2394    if ($self->testRegExpr($text, '>[uiomxn]*', 0, 0, 0, undef, 0, '#pop#pop', 'GDL input')) {
2395       return 1
2396    }
2397    return 0;
2398 };
2399
2400 sub parsegdl_regexpr_4_nested {
2401    my ($self, $text) = @_;
2402    # context => 'regexpr_rules'
2403    # type => 'IncludeRules'
2404    if ($self->includeRules('regexpr_rules', $text)) {
2405       return 1
2406    }
2407    # attribute => 'Regular Expression'
2408    # char => '<'
2409    # context => 'gdl_regexpr_4_nested'
2410    # type => 'DetectChar'
2411    if ($self->testDetectChar($text, '<', 0, 0, 0, undef, 0, 'gdl_regexpr_4_nested', 'Regular Expression')) {
2412       return 1
2413    }
2414    # attribute => 'Regular Expression'
2415    # char => '>'
2416    # context => '#pop'
2417    # type => 'DetectChar'
2418    if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '#pop', 'Regular Expression')) {
2419       return 1
2420    }
2421    return 0;
2422 };
2423
2424 sub parsegdl_regexpr_5 {
2425    my ($self, $text) = @_;
2426    # context => 'regexpr_rules'
2427    # type => 'IncludeRules'
2428    if ($self->includeRules('regexpr_rules', $text)) {
2429       return 1
2430    }
2431    # String => '\\%1'
2432    # attribute => 'Regular Expression'
2433    # context => '#stay'
2434    # dynamic => 'true'
2435    # type => 'RegExpr'
2436    if ($self->testRegExpr($text, '\\\\%1', 0, 1, 0, undef, 0, '#stay', 'Regular Expression')) {
2437       return 1
2438    }
2439    # String => '\s*%1[uiomxn]*'
2440    # attribute => 'GDL input'
2441    # context => '#pop#pop'
2442    # dynamic => 'true'
2443    # endRegion => 'GdlInput'
2444    # type => 'RegExpr'
2445    if ($self->testRegExpr($text, '\\s*%1[uiomxn]*', 0, 1, 0, undef, 0, '#pop#pop', 'GDL input')) {
2446       return 1
2447    }
2448    return 0;
2449 };
2450
2451 sub parsegdl_shell_command_1 {
2452    my ($self, $text) = @_;
2453    # context => 'shell_command_rules'
2454    # type => 'IncludeRules'
2455    if ($self->includeRules('shell_command_rules', $text)) {
2456       return 1
2457    }
2458    # attribute => 'Command'
2459    # char => '\'
2460    # char1 => ')'
2461    # context => '#stay'
2462    # type => 'Detect2Chars'
2463    if ($self->testDetect2Chars($text, '\\', ')', 0, 0, 0, undef, 0, '#stay', 'Command')) {
2464       return 1
2465    }
2466    # attribute => 'Command'
2467    # char => '('
2468    # context => 'gdl_shell_command_1_nested'
2469    # type => 'DetectChar'
2470    if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'gdl_shell_command_1_nested', 'Command')) {
2471       return 1
2472    }
2473    # attribute => 'GDL input'
2474    # char => ')'
2475    # context => '#pop#pop'
2476    # endRegion => 'GdlInput'
2477    # type => 'DetectChar'
2478    if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop#pop', 'GDL input')) {
2479       return 1
2480    }
2481    return 0;
2482 };
2483
2484 sub parsegdl_shell_command_1_nested {
2485    my ($self, $text) = @_;
2486    # context => 'shell_command_rules'
2487    # type => 'IncludeRules'
2488    if ($self->includeRules('shell_command_rules', $text)) {
2489       return 1
2490    }
2491    # attribute => 'Command'
2492    # char => '('
2493    # context => 'gdl_shell_command_1_nested'
2494    # type => 'DetectChar'
2495    if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'gdl_shell_command_1_nested', 'Command')) {
2496       return 1
2497    }
2498    # attribute => 'Command'
2499    # char => ')'
2500    # context => '#pop'
2501    # type => 'DetectChar'
2502    if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop', 'Command')) {
2503       return 1
2504    }
2505    return 0;
2506 };
2507
2508 sub parsegdl_shell_command_2 {
2509    my ($self, $text) = @_;
2510    # context => 'shell_command_rules'
2511    # type => 'IncludeRules'
2512    if ($self->includeRules('shell_command_rules', $text)) {
2513       return 1
2514    }
2515    # attribute => 'Command'
2516    # char => '\'
2517    # char1 => '}'
2518    # context => '#stay'
2519    # type => 'Detect2Chars'
2520    if ($self->testDetect2Chars($text, '\\', '}', 0, 0, 0, undef, 0, '#stay', 'Command')) {
2521       return 1
2522    }
2523    # attribute => 'GDL input'
2524    # char => '}'
2525    # context => '#pop#pop'
2526    # endRegion => 'GdlInput'
2527    # type => 'DetectChar'
2528    if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#pop#pop', 'GDL input')) {
2529       return 1
2530    }
2531    # attribute => 'Command'
2532    # char => '{'
2533    # context => 'gdl_shell_command_2_nested'
2534    # type => 'DetectChar'
2535    if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, 'gdl_shell_command_2_nested', 'Command')) {
2536       return 1
2537    }
2538    return 0;
2539 };
2540
2541 sub parsegdl_shell_command_2_nested {
2542    my ($self, $text) = @_;
2543    # context => 'shell_command_rules'
2544    # type => 'IncludeRules'
2545    if ($self->includeRules('shell_command_rules', $text)) {
2546       return 1
2547    }
2548    # attribute => 'Command'
2549    # char => '{'
2550    # context => 'gdl_shell_command_2_nested'
2551    # type => 'DetectChar'
2552    if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, 'gdl_shell_command_2_nested', 'Command')) {
2553       return 1
2554    }
2555    # attribute => 'Command'
2556    # char => '}'
2557    # context => '#pop'
2558    # type => 'DetectChar'
2559    if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#pop', 'Command')) {
2560       return 1
2561    }
2562    return 0;
2563 };
2564
2565 sub parsegdl_shell_command_3 {
2566    my ($self, $text) = @_;
2567    # context => 'shell_command_rules'
2568    # type => 'IncludeRules'
2569    if ($self->includeRules('shell_command_rules', $text)) {
2570       return 1
2571    }
2572    # attribute => 'Command'
2573    # char => '\'
2574    # char1 => ']'
2575    # context => '#stay'
2576    # type => 'Detect2Chars'
2577    if ($self->testDetect2Chars($text, '\\', ']', 0, 0, 0, undef, 0, '#stay', 'Command')) {
2578       return 1
2579    }
2580    # attribute => 'Command'
2581    # char => '['
2582    # context => 'gdl_shell_command_3_nested'
2583    # type => 'DetectChar'
2584    if ($self->testDetectChar($text, '[', 0, 0, 0, undef, 0, 'gdl_shell_command_3_nested', 'Command')) {
2585       return 1
2586    }
2587    # attribute => 'GDL input'
2588    # char => ']'
2589    # context => '#pop#pop'
2590    # endRegion => 'GdlInput'
2591    # type => 'DetectChar'
2592    if ($self->testDetectChar($text, ']', 0, 0, 0, undef, 0, '#pop#pop', 'GDL input')) {
2593       return 1
2594    }
2595    return 0;
2596 };
2597
2598 sub parsegdl_shell_command_3_nested {
2599    my ($self, $text) = @_;
2600    # context => 'shell_command_rules'
2601    # type => 'IncludeRules'
2602    if ($self->includeRules('shell_command_rules', $text)) {
2603       return 1
2604    }
2605    # attribute => 'Command'
2606    # char => '['
2607    # context => 'gdl_shell_command_3_nested'
2608    # type => 'DetectChar'
2609    if ($self->testDetectChar($text, '[', 0, 0, 0, undef, 0, 'gdl_shell_command_3_nested', 'Command')) {
2610       return 1
2611    }
2612    # attribute => 'Command'
2613    # char => ']'
2614    # context => '#pop'
2615    # type => 'DetectChar'
2616    if ($self->testDetectChar($text, ']', 0, 0, 0, undef, 0, '#pop', 'Command')) {
2617       return 1
2618    }
2619    return 0;
2620 };
2621
2622 sub parsegdl_shell_command_4 {
2623    my ($self, $text) = @_;
2624    # context => 'shell_command_rules'
2625    # type => 'IncludeRules'
2626    if ($self->includeRules('shell_command_rules', $text)) {
2627       return 1
2628    }
2629    # attribute => 'Command'
2630    # char => '\'
2631    # char1 => '>'
2632    # context => '#stay'
2633    # type => 'Detect2Chars'
2634    if ($self->testDetect2Chars($text, '\\', '>', 0, 0, 0, undef, 0, '#stay', 'Command')) {
2635       return 1
2636    }
2637    # attribute => 'Command'
2638    # char => '<'
2639    # context => 'gdl_shell_command_4_nested'
2640    # type => 'DetectChar'
2641    if ($self->testDetectChar($text, '<', 0, 0, 0, undef, 0, 'gdl_shell_command_4_nested', 'Command')) {
2642       return 1
2643    }
2644    # attribute => 'GDL input'
2645    # char => '>'
2646    # context => '#pop#pop'
2647    # endRegion => 'GdlInput'
2648    # type => 'DetectChar'
2649    if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '#pop#pop', 'GDL input')) {
2650       return 1
2651    }
2652    return 0;
2653 };
2654
2655 sub parsegdl_shell_command_4_nested {
2656    my ($self, $text) = @_;
2657    # context => 'shell_command_rules'
2658    # type => 'IncludeRules'
2659    if ($self->includeRules('shell_command_rules', $text)) {
2660       return 1
2661    }
2662    # attribute => 'Command'
2663    # char => '<'
2664    # context => 'gdl_shell_command_4_nested'
2665    # type => 'DetectChar'
2666    if ($self->testDetectChar($text, '<', 0, 0, 0, undef, 0, 'gdl_shell_command_4_nested', 'Command')) {
2667       return 1
2668    }
2669    # attribute => 'Command'
2670    # char => '>'
2671    # context => '#pop'
2672    # type => 'DetectChar'
2673    if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '#pop', 'Command')) {
2674       return 1
2675    }
2676    return 0;
2677 };
2678
2679 sub parsegdl_shell_command_5 {
2680    my ($self, $text) = @_;
2681    # context => 'shell_command_rules'
2682    # type => 'IncludeRules'
2683    if ($self->includeRules('shell_command_rules', $text)) {
2684       return 1
2685    }
2686    # String => '\\%1'
2687    # attribute => 'Command'
2688    # context => '#stay'
2689    # dynamic => 'true'
2690    # type => 'RegExpr'
2691    if ($self->testRegExpr($text, '\\\\%1', 0, 1, 0, undef, 0, '#stay', 'Command')) {
2692       return 1
2693    }
2694    # String => '\s*%1'
2695    # attribute => 'GDL input'
2696    # context => '#pop#pop'
2697    # dynamic => 'true'
2698    # endRegion => 'GdlInput'
2699    # type => 'RegExpr'
2700    if ($self->testRegExpr($text, '\\s*%1', 0, 1, 0, undef, 0, '#pop#pop', 'GDL input')) {
2701       return 1
2702    }
2703    return 0;
2704 };
2705
2706 sub parsegdl_token_array_1 {
2707    my ($self, $text) = @_;
2708    # context => 'token_array_rules'
2709    # type => 'IncludeRules'
2710    if ($self->includeRules('token_array_rules', $text)) {
2711       return 1
2712    }
2713    # attribute => 'String'
2714    # char => '\'
2715    # char1 => ')'
2716    # context => '#stay'
2717    # type => 'Detect2Chars'
2718    if ($self->testDetect2Chars($text, '\\', ')', 0, 0, 0, undef, 0, '#stay', 'String')) {
2719       return 1
2720    }
2721    # attribute => 'String'
2722    # char => '('
2723    # context => 'gdl_token_array_1_nested'
2724    # type => 'DetectChar'
2725    if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'gdl_token_array_1_nested', 'String')) {
2726       return 1
2727    }
2728    # attribute => 'GDL input'
2729    # char => ')'
2730    # context => '#pop#pop'
2731    # endRegion => 'GdlInput'
2732    # type => 'DetectChar'
2733    if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop#pop', 'GDL input')) {
2734       return 1
2735    }
2736    return 0;
2737 };
2738
2739 sub parsegdl_token_array_1_nested {
2740    my ($self, $text) = @_;
2741    # context => 'token_array_rules'
2742    # type => 'IncludeRules'
2743    if ($self->includeRules('token_array_rules', $text)) {
2744       return 1
2745    }
2746    # attribute => 'String'
2747    # char => '('
2748    # context => 'gdl_token_array_1_nested'
2749    # type => 'DetectChar'
2750    if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, 'gdl_token_array_1_nested', 'String')) {
2751       return 1
2752    }
2753    # attribute => 'String'
2754    # char => ')'
2755    # context => '#pop'
2756    # type => 'DetectChar'
2757    if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '#pop', 'String')) {
2758       return 1
2759    }
2760    return 0;
2761 };
2762
2763 sub parsegdl_token_array_2 {
2764    my ($self, $text) = @_;
2765    # context => 'token_array_rules'
2766    # type => 'IncludeRules'
2767    if ($self->includeRules('token_array_rules', $text)) {
2768       return 1
2769    }
2770    # attribute => 'String'
2771    # char => '\'
2772    # char1 => '}'
2773    # context => '#stay'
2774    # type => 'Detect2Chars'
2775    if ($self->testDetect2Chars($text, '\\', '}', 0, 0, 0, undef, 0, '#stay', 'String')) {
2776       return 1
2777    }
2778    # attribute => 'GDL input'
2779    # char => '}'
2780    # context => '#pop#pop'
2781    # endRegion => 'GdlInput'
2782    # type => 'DetectChar'
2783    if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#pop#pop', 'GDL input')) {
2784       return 1
2785    }
2786    # attribute => 'String'
2787    # char => '{'
2788    # context => 'gdl_token_array_2_nested'
2789    # type => 'DetectChar'
2790    if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, 'gdl_token_array_2_nested', 'String')) {
2791       return 1
2792    }
2793    return 0;
2794 };
2795
2796 sub parsegdl_token_array_2_nested {
2797    my ($self, $text) = @_;
2798    # context => 'token_array_rules'
2799    # type => 'IncludeRules'
2800    if ($self->includeRules('token_array_rules', $text)) {
2801       return 1
2802    }
2803    # attribute => 'String'
2804    # char => '{'
2805    # context => 'gdl_token_array_2_nested'
2806    # type => 'DetectChar'
2807    if ($self->testDetectChar($text, '{', 0, 0, 0, undef, 0, 'gdl_token_array_2_nested', 'String')) {
2808       return 1
2809    }
2810    # attribute => 'String'
2811    # char => '}'
2812    # context => '#pop'
2813    # type => 'DetectChar'
2814    if ($self->testDetectChar($text, '}', 0, 0, 0, undef, 0, '#pop', 'String')) {
2815       return 1
2816    }
2817    return 0;
2818 };
2819
2820 sub parsegdl_token_array_3 {
2821    my ($self, $text) = @_;
2822    # context => 'token_array_rules'
2823    # type => 'IncludeRules'
2824    if ($self->includeRules('token_array_rules', $text)) {
2825       return 1
2826    }
2827    # attribute => 'String'
2828    # char => '\'
2829    # char1 => ']'
2830    # context => '#stay'
2831    # type => 'Detect2Chars'
2832    if ($self->testDetect2Chars($text, '\\', ']', 0, 0, 0, undef, 0, '#stay', 'String')) {
2833       return 1
2834    }
2835    # attribute => 'String'
2836    # char => '['
2837    # context => 'gdl_token_array_3_nested'
2838    # type => 'DetectChar'
2839    if ($self->testDetectChar($text, '[', 0, 0, 0, undef, 0, 'gdl_token_array_3_nested', 'String')) {
2840       return 1
2841    }
2842    # attribute => 'GDL input'
2843    # char => ']'
2844    # context => '#pop#pop'
2845    # endRegion => 'GdlInput'
2846    # type => 'DetectChar'
2847    if ($self->testDetectChar($text, ']', 0, 0, 0, undef, 0, '#pop#pop', 'GDL input')) {
2848       return 1
2849    }
2850    return 0;
2851 };
2852
2853 sub parsegdl_token_array_3_nested {
2854    my ($self, $text) = @_;
2855    # context => 'token_array_rules'
2856    # type => 'IncludeRules'
2857    if ($self->includeRules('token_array_rules', $text)) {
2858       return 1
2859    }
2860    # attribute => 'String'
2861    # char => '['
2862    # context => 'gdl_token_array_3_nested'
2863    # type => 'DetectChar'
2864    if ($self->testDetectChar($text, '[', 0, 0, 0, undef, 0, 'gdl_token_array_3_nested', 'String')) {
2865       return 1
2866    }
2867    # attribute => 'String'
2868    # char => ']'
2869    # context => '#pop'
2870    # type => 'DetectChar'
2871    if ($self->testDetectChar($text, ']', 0, 0, 0, undef, 0, '#pop', 'String')) {
2872       return 1
2873    }
2874    return 0;
2875 };
2876
2877 sub parsegdl_token_array_4 {
2878    my ($self, $text) = @_;
2879    # context => 'token_array_rules'
2880    # type => 'IncludeRules'
2881    if ($self->includeRules('token_array_rules', $text)) {
2882       return 1
2883    }
2884    # attribute => 'String'
2885    # char => '\'
2886    # char1 => '>'
2887    # context => '#stay'
2888    # type => 'Detect2Chars'
2889    if ($self->testDetect2Chars($text, '\\', '>', 0, 0, 0, undef, 0, '#stay', 'String')) {
2890       return 1
2891    }
2892    # attribute => 'String'
2893    # char => '<'
2894    # context => 'gdl_token_array_4_nested'
2895    # type => 'DetectChar'
2896    if ($self->testDetectChar($text, '<', 0, 0, 0, undef, 0, 'gdl_token_array_4_nested', 'String')) {
2897       return 1
2898    }
2899    # attribute => 'GDL input'
2900    # char => '>'
2901    # context => '#pop#pop'
2902    # endRegion => 'GdlInput'
2903    # type => 'DetectChar'
2904    if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '#pop#pop', 'GDL input')) {
2905       return 1
2906    }
2907    return 0;
2908 };
2909
2910 sub parsegdl_token_array_4_nested {
2911    my ($self, $text) = @_;
2912    # context => 'token_array_rules'
2913    # type => 'IncludeRules'
2914    if ($self->includeRules('token_array_rules', $text)) {
2915       return 1
2916    }
2917    # attribute => 'String'
2918    # char => '<'
2919    # context => 'gdl_token_array_4_nested'
2920    # type => 'DetectChar'
2921    if ($self->testDetectChar($text, '<', 0, 0, 0, undef, 0, 'gdl_token_array_4_nested', 'String')) {
2922       return 1
2923    }
2924    # attribute => 'String'
2925    # char => '>'
2926    # context => '#pop'
2927    # type => 'DetectChar'
2928    if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '#pop', 'String')) {
2929       return 1
2930    }
2931    return 0;
2932 };
2933
2934 sub parsegdl_token_array_5 {
2935    my ($self, $text) = @_;
2936    # context => 'token_array_rules'
2937    # type => 'IncludeRules'
2938    if ($self->includeRules('token_array_rules', $text)) {
2939       return 1
2940    }
2941    # String => '\\%1'
2942    # attribute => 'String'
2943    # context => '#stay'
2944    # dynamic => 'true'
2945    # type => 'RegExpr'
2946    if ($self->testRegExpr($text, '\\\\%1', 0, 1, 0, undef, 0, '#stay', 'String')) {
2947       return 1
2948    }
2949    # String => '\s*%1'
2950    # attribute => 'GDL input'
2951    # context => '#pop#pop'
2952    # dynamic => 'true'
2953    # endRegion => 'GdlInput'
2954    # type => 'RegExpr'
2955    if ($self->testRegExpr($text, '\\s*%1', 0, 1, 0, undef, 0, '#pop#pop', 'GDL input')) {
2956       return 1
2957    }
2958    return 0;
2959 };
2960
2961 sub parseheredoc_rules {
2962    my ($self, $text) = @_;
2963    # String => '#@{1,2}'
2964    # attribute => 'Substitution'
2965    # context => 'Short Subst'
2966    # type => 'RegExpr'
2967    if ($self->testRegExpr($text, '#@{1,2}', 0, 0, 0, undef, 0, 'Short Subst', 'Substitution')) {
2968       return 1
2969    }
2970    # attribute => 'Substitution'
2971    # char => '#'
2972    # char1 => '{'
2973    # context => 'Subst'
2974    # type => 'Detect2Chars'
2975    if ($self->testDetect2Chars($text, '#', '{', 0, 0, 0, undef, 0, 'Subst', 'Substitution')) {
2976       return 1
2977    }
2978    return 0;
2979 };
2980
2981 sub parseindented_heredoc {
2982    my ($self, $text) = @_;
2983    # String => '%1$'
2984    # attribute => 'Keyword'
2985    # context => '#pop#pop'
2986    # dynamic => 'true'
2987    # endRegion => 'HereDocument'
2988    # firstNonSpace => 'true'
2989    # type => 'RegExpr'
2990    if ($self->testRegExpr($text, '%1$', 0, 1, 0, undef, 1, '#pop#pop', 'Keyword')) {
2991       return 1
2992    }
2993    # context => 'heredoc_rules'
2994    # type => 'IncludeRules'
2995    if ($self->includeRules('heredoc_rules', $text)) {
2996       return 1
2997    }
2998    return 0;
2999 };
3000
3001 sub parsenormal_heredoc {
3002    my ($self, $text) = @_;
3003    # String => '%1$'
3004    # attribute => 'Keyword'
3005    # column => '0'
3006    # context => '#pop#pop'
3007    # dynamic => 'true'
3008    # endRegion => 'HereDocument'
3009    # type => 'RegExpr'
3010    if ($self->testRegExpr($text, '%1$', 0, 1, 0, 0, 0, '#pop#pop', 'Keyword')) {
3011       return 1
3012    }
3013    # context => 'heredoc_rules'
3014    # type => 'IncludeRules'
3015    if ($self->includeRules('heredoc_rules', $text)) {
3016       return 1
3017    }
3018    return 0;
3019 };
3020
3021 sub parseregexpr_rules {
3022    my ($self, $text) = @_;
3023    # attribute => 'Regular Expression'
3024    # char => '\'
3025    # char1 => '\'
3026    # context => '#stay'
3027    # type => 'Detect2Chars'
3028    if ($self->testDetect2Chars($text, '\\', '\\', 0, 0, 0, undef, 0, '#stay', 'Regular Expression')) {
3029       return 1
3030    }
3031    # String => '#@{1,2}'
3032    # attribute => 'Substitution'
3033    # context => 'Short Subst'
3034    # type => 'RegExpr'
3035    if ($self->testRegExpr($text, '#@{1,2}', 0, 0, 0, undef, 0, 'Short Subst', 'Substitution')) {
3036       return 1
3037    }
3038    # attribute => 'Substitution'
3039    # char => '#'
3040    # char1 => '{'
3041    # context => 'Subst'
3042    # type => 'Detect2Chars'
3043    if ($self->testDetect2Chars($text, '#', '{', 0, 0, 0, undef, 0, 'Subst', 'Substitution')) {
3044       return 1
3045    }
3046    return 0;
3047 };
3048
3049 sub parseshell_command_rules {
3050    my ($self, $text) = @_;
3051    # attribute => 'Command'
3052    # char => '\'
3053    # char1 => '\'
3054    # context => '#stay'
3055    # type => 'Detect2Chars'
3056    if ($self->testDetect2Chars($text, '\\', '\\', 0, 0, 0, undef, 0, '#stay', 'Command')) {
3057       return 1
3058    }
3059    # String => '#@{1,2}'
3060    # attribute => 'Substitution'
3061    # context => 'Short Subst'
3062    # type => 'RegExpr'
3063    if ($self->testRegExpr($text, '#@{1,2}', 0, 0, 0, undef, 0, 'Short Subst', 'Substitution')) {
3064       return 1
3065    }
3066    # attribute => 'Substitution'
3067    # char => '#'
3068    # char1 => '{'
3069    # context => 'Subst'
3070    # type => 'Detect2Chars'
3071    if ($self->testDetect2Chars($text, '#', '{', 0, 0, 0, undef, 0, 'Subst', 'Substitution')) {
3072       return 1
3073    }
3074    return 0;
3075 };
3076
3077 sub parsetoken_array_rules {
3078    my ($self, $text) = @_;
3079    # String => '\\'
3080    # attribute => 'String'
3081    # context => '#stay'
3082    # type => 'StringDetect'
3083    if ($self->testStringDetect($text, '\\\\', 0, 0, 0, undef, 0, '#stay', 'String')) {
3084       return 1
3085    }
3086    return 0;
3087 };
3088
3089
3090 1;
3091
3092 __END__
3093
3094 =head1 NAME
3095
3096 Syntax::Highlight::Engine::Kate::Ruby - a Plugin for Ruby syntax highlighting
3097
3098 =head1 SYNOPSIS
3099
3100  require Syntax::Highlight::Engine::Kate::Ruby;
3101  my $sh = new Syntax::Highlight::Engine::Kate::Ruby([
3102  ]);
3103
3104 =head1 DESCRIPTION
3105
3106 Syntax::Highlight::Engine::Kate::Ruby is a  plugin module that provides syntax highlighting
3107 for Ruby to the Syntax::Haghlight::Engine::Kate highlighting engine.
3108
3109 This code is generated from the syntax definition files used
3110 by the Kate project.
3111 It works quite fine, but can use refinement and optimization.
3112
3113 It inherits Syntax::Higlight::Engine::Kate::Template. See also there.
3114
3115 =cut
3116
3117 =head1 AUTHOR
3118
3119 Hans Jeuken (haje <at> toneel <dot> demon <dot> nl)
3120
3121 =cut
3122
3123 =head1 BUGS
3124
3125 Unknown. If you find any, please contact the author
3126
3127 =cut
3128