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.
5 # This file was generated from the 'katexml/xmldebug.xml' file of the syntax highlight
6 # engine of the kate text editor (http://kate.kde.org
10 #generated: Wed Nov 1 21:17:55 2006, localtime
12 package Syntax::Highlight::Engine::Kate::XML_Debug;
14 our $VERSION = '0.06';
18 use base('Syntax::Highlight::Engine::Kate::Template');
22 my $class = ref($proto) || $proto;
23 my $self = $class->SUPER::new(@_);
25 'Attribute' => 'DataType',
26 'Comment' => 'Comment',
27 'Doctype Declaration' => 'Keyword',
30 'Normal Tag' => 'Keyword',
31 'Normal Text' => 'Normal',
32 'PI content' => 'Others',
33 'Processing Instruction' => 'Keyword',
34 'Stylesheet' => 'Keyword',
37 $self->listAdd('AttType',
49 callback => \&parse0prolog,
52 '10:XMLDecl Standalone' => {
53 callback => \&parse10XMLDeclStandalone,
56 '11:Misc after XMLDecl' => {
57 callback => \&parse11MiscafterXMLDecl,
60 '12:Comment after XMLDecl' => {
61 callback => \&parse12CommentafterXMLDecl,
62 attribute => 'Comment',
64 '13:PI after XMLDecl' => {
65 callback => \&parse13PIafterXMLDecl,
66 attribute => 'Processing Instruction Body',
68 '14:Doctype Decl Name' => {
69 callback => \&parse14DoctypeDeclName,
72 '15:Doctype Decl ExternalID' => {
73 callback => \&parse15DoctypeDeclExternalID,
76 '16:Doctype Decl PublicID' => {
77 callback => \&parse16DoctypeDeclPublicID,
80 '17:Doctype Decl PublicID qq' => {
81 callback => \&parse17DoctypeDeclPublicIDqq,
84 '18:Doctype Decl PublicID q' => {
85 callback => \&parse18DoctypeDeclPublicIDq,
88 '19:Doctype Decl SystemID' => {
89 callback => \&parse19DoctypeDeclSystemID,
92 '1:XMLDecl Version' => {
93 callback => \&parse1XMLDeclVersion,
96 '20:Doctype Decl SystemID qq' => {
97 callback => \&parse20DoctypeDeclSystemIDqq,
100 '21:Doctype Decl SystemID q' => {
101 callback => \&parse21DoctypeDeclSystemIDq,
102 attribute => 'Value',
104 '22:Doctype Decl IS or end' => {
105 callback => \&parse22DoctypeDeclISorend,
106 attribute => 'Error',
108 '23:Doctype Decl IS' => {
109 callback => \&parse23DoctypeDeclIS,
110 attribute => 'Error',
112 '24:elementdecl' => {
113 callback => \&parse24elementdecl,
114 attribute => 'Error',
116 '25:contentspec' => {
117 callback => \&parse25contentspec,
118 attribute => 'Error',
120 '26:MixedOrChildren' => {
121 callback => \&parse26MixedOrChildren,
122 attribute => 'Error',
125 callback => \&parse27MixedShort,
126 attribute => 'Error',
129 callback => \&parse28MixedLong,
130 attribute => 'Error',
132 '29:MixedLong endOrContinue' => {
133 callback => \&parse29MixedLongendOrContinue,
134 attribute => 'Error',
136 '2:XMLDecl Version Eq' => {
137 callback => \&parse2XMLDeclVersionEq,
138 attribute => 'Error',
139 lineending => '5:XMLDecl Encoding Eq',
141 '30:children unknown' => {
142 callback => \&parse30childrenunknown,
143 attribute => 'Error',
145 '31:children unknownOrEnd' => {
146 callback => \&parse31childrenunknownOrEnd,
147 attribute => 'Error',
149 '32:children unknownName' => {
150 callback => \&parse32childrenunknownName,
151 attribute => 'Error',
153 '33:children choice' => {
154 callback => \&parse33childrenchoice,
155 attribute => 'Error',
157 '34:children choiceOrEnd' => {
158 callback => \&parse34childrenchoiceOrEnd,
159 attribute => 'Error',
161 '35:children seq' => {
162 callback => \&parse35childrenseq,
163 attribute => 'Error',
165 '36:children seqOrEnd' => {
166 callback => \&parse36childrenseqOrEnd,
167 attribute => 'Error',
169 '37:element end' => {
170 callback => \&parse37elementend,
171 attribute => 'Error',
173 '38:AttlistDecl' => {
174 callback => \&parse38AttlistDecl,
175 attribute => 'Error',
178 callback => \&parse39AttDef,
179 attribute => 'Error',
181 '3:XMLDecl Version' => {
182 callback => \&parse3XMLDeclVersion,
183 attribute => 'Error',
186 callback => \&parse40AttType,
187 attribute => 'Error',
189 '41:NotationStart' => {
190 callback => \&parse41NotationStart,
191 attribute => 'Error',
194 callback => \&parse42Notation,
195 attribute => 'Error',
197 '43:Notation or End' => {
198 callback => \&parse43NotationorEnd,
199 attribute => 'Error',
201 '44:Enumeration' => {
202 callback => \&parse44Enumeration,
203 attribute => 'Error',
205 '45:Enumeration or End' => {
206 callback => \&parse45EnumerationorEnd,
207 attribute => 'Error',
209 '46:DefaultDecl' => {
210 callback => \&parse46DefaultDecl,
211 attribute => 'Error',
213 '47:DefaultDecl AttValue' => {
214 callback => \&parse47DefaultDeclAttValue,
215 attribute => 'Error',
217 '48:DefaultDecl AttValue qq' => {
218 callback => \&parse48DefaultDeclAttValueqq,
219 attribute => 'Value',
221 '49:DefaultDecl AttValue q' => {
222 callback => \&parse49DefaultDeclAttValueq,
223 attribute => 'Value',
225 '4:XMLDecl Encoding' => {
226 callback => \&parse4XMLDeclEncoding,
227 attribute => 'Error',
230 callback => \&parse50EntityDecl,
231 attribute => 'Error',
234 callback => \&parse51unused,
235 attribute => 'Error',
237 '52:GEDecl EntityValueOrExternalID' => {
238 callback => \&parse52GEDeclEntityValueOrExternalID,
239 attribute => 'Error',
241 '53:GEDecl EntityValue qq' => {
242 callback => \&parse53GEDeclEntityValueqq,
243 attribute => 'Value',
245 '54:GEDecl EntityValue q' => {
246 callback => \&parse54GEDeclEntityValueq,
247 attribute => 'Value',
249 '55:GEDecl PublicID' => {
250 callback => \&parse55GEDeclPublicID,
251 attribute => 'Error',
253 '56:GEDecl PublicID qq' => {
254 callback => \&parse56GEDeclPublicIDqq,
255 attribute => 'Error',
257 '57:GEDecl PublicID q' => {
258 callback => \&parse57GEDeclPublicIDq,
259 attribute => 'Value',
261 '58:GEDecl SystemID' => {
262 callback => \&parse58GEDeclSystemID,
263 attribute => 'Error',
265 '59:GEDecl SystemID qq' => {
266 callback => \&parse59GEDeclSystemIDqq,
267 attribute => 'Value',
269 '5:XMLDecl Encoding Eq' => {
270 callback => \&parse5XMLDeclEncodingEq,
271 attribute => 'Error',
273 '60:GEDecl SystemID q' => {
274 callback => \&parse60GEDeclSystemIDq,
275 attribute => 'Value',
278 callback => \&parse61PEDecl,
279 attribute => 'Error',
281 '62:PEDecl EntityValueOrExternalID' => {
282 callback => \&parse62PEDeclEntityValueOrExternalID,
283 attribute => 'Error',
285 '63:PEDecl PublicID' => {
286 callback => \&parse63PEDeclPublicID,
287 attribute => 'Error',
289 '64:PEDecl PublicID qq' => {
290 callback => \&parse64PEDeclPublicIDqq,
291 attribute => 'Error',
293 '65:PEDecl PublicID q' => {
294 callback => \&parse65PEDeclPublicIDq,
295 attribute => 'Value',
297 '66:PEDecl SystemID' => {
298 callback => \&parse66PEDeclSystemID,
299 attribute => 'Error',
301 '67:PEDecl SystemID qq' => {
302 callback => \&parse67PEDeclSystemIDqq,
303 attribute => 'Value',
305 '68:PEDecl SystemID q' => {
306 callback => \&parse68PEDeclSystemIDq,
307 attribute => 'Value',
309 '69:GEDecl endOrNDATA' => {
310 callback => \&parse69GEDeclendOrNDATA,
311 attribute => 'Error',
313 '6:XMLDecl Encoding' => {
314 callback => \&parse6XMLDeclEncoding,
315 attribute => 'Error',
317 '70:GEDecl NDATA' => {
318 callback => \&parse70GEDeclNDATA,
319 attribute => 'Error',
321 '71:NotationDecl Name' => {
322 callback => \&parse71NotationDeclName,
323 attribute => 'Error',
325 '72:NotationDecl ExternalID' => {
326 callback => \&parse72NotationDeclExternalID,
327 attribute => 'Error',
329 '73:NotationDecl PublicID' => {
330 callback => \&parse73NotationDeclPublicID,
331 attribute => 'Error',
333 '74:NotationDecl PublicID qq' => {
334 callback => \&parse74NotationDeclPublicIDqq,
335 attribute => 'Error',
337 '75:NotationDecl PublicID q' => {
338 callback => \&parse75NotationDeclPublicIDq,
339 attribute => 'Value',
341 '76:NotationDecl SystemIDOrEnd' => {
342 callback => \&parse76NotationDeclSystemIDOrEnd,
343 attribute => 'Error',
345 '77:Comment inside IS' => {
346 callback => \&parse77CommentinsideIS,
347 attribute => 'Comment',
349 '78:PI inside IS' => {
350 callback => \&parse78PIinsideIS,
351 attribute => 'Processing Instruction Body',
354 callback => \&parse79Outside,
355 attribute => 'Normal Text',
357 '7:XMLDecl Standalone' => {
358 callback => \&parse7XMLDeclStandalone,
359 attribute => 'Error',
362 callback => \&parse80STag,
363 attribute => 'Error',
365 '81:STag Attribute' => {
366 callback => \&parse81STagAttribute,
367 attribute => 'Error',
369 '82:STag Attribute Value' => {
370 callback => \&parse82STagAttributeValue,
371 attribute => 'Error',
373 '83:STag Value qq' => {
374 callback => \&parse83STagValueqq,
375 attribute => 'Value',
377 '84:STag Value q' => {
378 callback => \&parse84STagValueq,
379 attribute => 'Value',
382 callback => \&parse85ETag,
383 attribute => 'Error',
386 callback => \&parse86CDSect,
387 attribute => 'Normal Text',
389 '87:Comment inside IS' => {
390 callback => \&parse87CommentinsideIS,
391 attribute => 'Comment',
393 '88:PI inside IS' => {
394 callback => \&parse88PIinsideIS,
395 attribute => 'Processing Instruction Body',
397 '8:XMLDecl Standalone Eq' => {
398 callback => \&parse8XMLDeclStandaloneEq,
399 attribute => 'Error',
401 '9:XMLDecl Standalone' => {
402 callback => \&parse9XMLDeclStandalone,
403 attribute => 'Error',
406 $self->deliminators('\\s||\\.|\\(|\\)|:|\\!|\\+|,|-|<|=|>|\\%|\\&|\\*|\\/|;|\\?|\\[|\\]|\\^|\\{|\\||\\}|\\~|\\\\');
407 $self->basecontext('0:prolog');
408 $self->keywordscase(1);
410 bless ($self, $class);
415 return 'XML (Debug)';
419 my ($self, $text) = @_;
421 if ($self->testRegExpr($text, '<\\?xml(\\s+|$)', 0, 0, 0, undef, 0, '1:XMLDecl Version', 'Doctype Declaration')) {
427 sub parse10XMLDeclStandalone {
428 my ($self, $text) = @_;
430 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Doctype Declaration')) {
434 if ($self->testRegExpr($text, '\\?>', 0, 0, 0, undef, 0, '11:Misc after XMLDecl', 'Doctype Declaration')) {
440 sub parse11MiscafterXMLDecl {
441 my ($self, $text) = @_;
443 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Normal Text')) {
447 if ($self->testRegExpr($text, '\\s*<!--\\s*', 0, 0, 0, undef, 0, '12:Comment after XMLDecl', 'Comment')) {
451 if ($self->testRegExpr($text, '\\s*<\\?xml-stylesheet(\\s+|$)', 0, 0, 0, undef, 0, '13:PI after XMLDecl', 'Processing Instruction')) {
455 if ($self->testRegExpr($text, '\\s*<\\??[xX][mM][lL]', 0, 0, 0, undef, 0, '13:PI after XMLDecl', 'Error')) {
459 if ($self->testRegExpr($text, '\\s*<\\?[a-zA-Z_][a-zA-Z0-9_-]*(:[a-zA-Z0-9_-]*)?(\\s+|$)', 0, 0, 0, undef, 0, '13:PI after XMLDecl', 'Processing Instruction')) {
463 if ($self->testRegExpr($text, '<!DOCTYPE(\\s+|$)', 0, 0, 0, undef, 0, '14:Doctype Decl Name', 'Doctype Declaration')) {
467 if ($self->testRegExpr($text, '<[xX][mM][lL](\\w|[_.-])*(:(\\w|[_.-])+)?', 0, 0, 0, undef, 0, '80:STag', 'Error')) {
471 if ($self->testRegExpr($text, '<(?![٠-٩۰-۹०-९০-৯੦-੯૦-૯୦-୯௧-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩]|\\d)(\\w|_)(\\w|[_.-])*(:(\\w|[_.-])+)?', 0, 0, 0, undef, 0, '80:STag', 'Normal Tag')) {
475 if ($self->testRegExpr($text, '<(?![٠-٩۰-۹०-९০-৯੦-੯૦-૯୦-୯௧-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩]|\\d)(\\w|[:_])(\\w|[:_.-])*', 0, 0, 0, undef, 0, '80:STag', 'Error')) {
479 if ($self->testRegExpr($text, '</[xX][mM][lL](\\w|[_.-])*(:(\\w|[_.-])+)?', 0, 0, 0, undef, 0, '85:ETag', 'Error')) {
483 if ($self->testRegExpr($text, '</(?![٠-٩۰-۹०-९০-৯੦-੯૦-૯୦-୯௧-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩]|\\d)(\\w|_)(\\w|[_.-])*(:(\\w|[_.-])+)?', 0, 0, 0, undef, 0, '85:ETag', 'Normal Tag')) {
487 if ($self->testRegExpr($text, '</(?![٠-٩۰-۹०-९০-৯੦-੯૦-૯୦-୯௧-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩]|\\d)(\\w|[:_])(\\w|[:_.-])*', 0, 0, 0, undef, 0, '85:ETag', 'Error')) {
491 if ($self->testRegExpr($text, '&(?![٠-٩۰-۹०-९০-৯੦-੯૦-૯୦-୯௧-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩]|\\d)(\\w|[_:])(\\w|[_:.-])*;', 0, 0, 0, undef, 0, '79:Outside', 'Entity')) {
495 if ($self->testRegExpr($text, '&#(x[0-9a-fA-F]+|[0-9]+);', 0, 0, 0, undef, 0, '79:Outside', 'Entity')) {
499 if ($self->testRegExpr($text, '<!\\[CDATA\\[', 0, 0, 0, undef, 0, '86:CDSect', 'Entity')) {
503 if ($self->testRegExpr($text, '<!--', 0, 0, 0, undef, 0, '87:Comment inside IS', 'Comment')) {
507 if ($self->testRegExpr($text, '<\\?xml-stylesheet(\\s|$)', 0, 0, 0, undef, 0, '88:PI inside IS', 'Normal Tag')) {
511 if ($self->testRegExpr($text, '<\\?[xX][mM][lL](\\w|[_.-])*(:(\\w|[_.-])+)?', 0, 0, 0, undef, 0, '88:PI inside IS', 'Error')) {
515 if ($self->testRegExpr($text, '<\\?(?![٠-٩۰-۹०-९০-৯੦-੯૦-૯୦-୯௧-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩]|\\d)(\\w|_)(\\w|[_.-])*(:(\\w|[_.-])+)?', 0, 0, 0, undef, 0, '88:PI inside IS', 'Normal Tag')) {
519 if ($self->testRegExpr($text, '<\\?(?![٠-٩۰-۹०-९০-৯੦-੯૦-૯୦-୯௧-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩]|\\d)(\\w|[:_])(\\w|[:_.-])*', 0, 0, 0, undef, 0, '88:PI inside IS', 'Error')) {
523 if ($self->testDetectChar($text, '<', 0, 0, 0, undef, 0, '79:Outside', 'Error')) {
527 if ($self->testDetectChar($text, '&', 0, 0, 0, undef, 0, '79:Outside', 'Error')) {
531 if ($self->testRegExpr($text, '\\]\\]>', 0, 0, 0, undef, 0, '79:Outside', 'Error')) {
537 sub parse12CommentafterXMLDecl {
538 my ($self, $text) = @_;
540 if ($self->testRegExpr($text, '--->', 0, 0, 0, undef, 0, '#pop', 'Error')) {
544 if ($self->testRegExpr($text, '-->', 0, 0, 0, undef, 0, '#pop', 'Comment')) {
547 # type => Detect2Chars
548 if ($self->testDetect2Chars($text, '-', '-', 0, 0, 0, undef, 0, '#stay', 'Error')) {
554 sub parse13PIafterXMLDecl {
555 my ($self, $text) = @_;
556 # type => Detect2Chars
557 if ($self->testDetect2Chars($text, '?', '>', 0, 0, 0, undef, 0, '#pop', 'Processing Instruction')) {
563 sub parse14DoctypeDeclName {
564 my ($self, $text) = @_;
566 if ($self->testRegExpr($text, '(?![٠-٩۰-۹०-९০-৯੦-੯૦-૯୦-୯௧-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩]|\\d)(\\w|[_:])(\\w|[_:.-])*(\\s+|$)', 0, 0, 0, undef, 0, '15:Doctype Decl ExternalID', 'Doctype Declaration')) {
570 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Doctype Declaration')) {
576 sub parse15DoctypeDeclExternalID {
577 my ($self, $text) = @_;
579 if ($self->testRegExpr($text, 'PUBLIC(\\s+|$)', 0, 0, 0, undef, 0, '16:Doctype Decl PublicID', 'Doctype Declaration')) {
583 if ($self->testRegExpr($text, 'SYSTEM(\\s+|$)', 0, 0, 0, undef, 0, '19:Doctype Decl SystemID', 'Doctype Declaration')) {
587 if ($self->testDetectChar($text, '[', 0, 0, 0, undef, 0, '23:Doctype Decl IS', 'Doctype Declaration')) {
591 if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '23:Doctype Decl IS', 'Doctype Declaration')) {
595 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Doctype Declaration')) {
601 sub parse16DoctypeDeclPublicID {
602 my ($self, $text) = @_;
604 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '17:Doctype Decl PublicID qq', 'Value')) {
608 if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '18:Doctype Decl PublicID q', 'Value')) {
612 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Doctype Declaration')) {
618 sub parse17DoctypeDeclPublicIDqq {
619 my ($self, $text) = @_;
621 if ($self->testDetectChar($text, '"(\\s+|$)', 0, 0, 0, undef, 0, '19:Doctype Decl SystemID', 'Value')) {
625 if ($self->testRegExpr($text, '[
\r
626 a-zA-Z0-9\'()+,./:=?;!*#@$_%-]', 0, 0, 0, undef, 0, '#stay', 'Value')) {
632 sub parse18DoctypeDeclPublicIDq {
633 my ($self, $text) = @_;
635 if ($self->testDetectChar($text, '\'(\\s+|$)', 0, 0, 0, undef, 0, '19:Doctype Decl SystemID', 'Value')) {
639 if ($self->testRegExpr($text, '[
\r
640 a-zA-Z0-9()+,./:=?;!*#@$_%-]', 0, 0, 0, undef, 0, '#stay', 'Value')) {
646 sub parse19DoctypeDeclSystemID {
647 my ($self, $text) = @_;
649 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '20:Doctype Decl SystemID qq', 'Value')) {
653 if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '21:Doctype Decl SystemID q', 'Value')) {
657 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Doctype Declaration')) {
663 sub parse1XMLDeclVersion {
664 my ($self, $text) = @_;
666 if ($self->testRegExpr($text, '\\s*version\\s*', 0, 0, 0, undef, 0, '2:XMLDecl Version Eq', 'Attribute')) {
670 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Doctype Declaration')) {
676 sub parse20DoctypeDeclSystemIDqq {
677 my ($self, $text) = @_;
679 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '22:Doctype Decl IS or end', 'Value')) {
685 sub parse21DoctypeDeclSystemIDq {
686 my ($self, $text) = @_;
688 if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '22:Doctype Decl IS or end', 'Value')) {
694 sub parse22DoctypeDeclISorend {
695 my ($self, $text) = @_;
697 if ($self->testDetectChar($text, '[', 0, 0, 0, undef, 0, '23:Doctype Decl IS', 'Doctype Declaration')) {
701 if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '79:Outside', 'Doctype Declaration')) {
705 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Doctype Declaration')) {
711 sub parse23DoctypeDeclIS {
712 my ($self, $text) = @_;
714 if ($self->testRegExpr($text, '%(?![٠-٩۰-۹०-९০-৯੦-੯૦-૯୦-୯௧-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩]|\\d)(\\w|[_:])(\\w|[_:.-])*;', 0, 0, 0, undef, 0, '#stay', 'Entity')) {
718 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Doctype Declaration')) {
722 if ($self->testRegExpr($text, '<!ELEMENT(\\s+|$)', 0, 0, 0, undef, 0, '24:elementdecl', 'Doctype Declaration')) {
726 if ($self->testRegExpr($text, '<!ATTLIST(\\s+|$)', 0, 0, 0, undef, 0, '38:AttlistDecl', 'Doctype Declaration')) {
730 if ($self->testRegExpr($text, '<!ENTITY(\\s+|$)', 0, 0, 0, undef, 0, '50:EntityDecl', 'Doctype Declaration')) {
734 if ($self->testRegExpr($text, '<!NOTATION(\\s+|$)', 0, 0, 0, undef, 0, '71:NotationDecl Name', 'Doctype Declaration')) {
738 if ($self->testRegExpr($text, '\\s*<!--\\s*', 0, 0, 0, undef, 0, '77:Comment inside IS', 'Comment')) {
742 if ($self->testRegExpr($text, '\\s*<\\?xml-stylesheet(\\s+|$)', 0, 0, 0, undef, 0, '78:PI inside IS', 'Processing Instruction')) {
746 if ($self->testRegExpr($text, '\\s*<\\??[xX][mM][lL]', 0, 0, 0, undef, 0, '78:PI inside IS', 'Error')) {
750 if ($self->testRegExpr($text, '\\s*<\\?[a-zA-Z_][a-zA-Z0-9_-]*(:[a-zA-Z0-9_-]*)?(\\s+|$)', 0, 0, 0, undef, 0, '78:PI inside IS', 'Processing Instruction')) {
753 # type => Detect2Chars
754 if ($self->testDetect2Chars($text, ']', '>', 0, 0, 0, undef, 0, '79:Outside', 'Doctype Declaration')) {
760 sub parse24elementdecl {
761 my ($self, $text) = @_;
763 if ($self->testRegExpr($text, '(?![٠-٩۰-۹०-९০-৯੦-੯૦-૯୦-୯௧-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩]|\\d)(\\w|[_:])(\\w|[_:.-])*', 0, 0, 0, undef, 0, '25:contentspec', 'Normal Tag')) {
767 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Doctype Declaration')) {
773 sub parse25contentspec {
774 my ($self, $text) = @_;
776 if ($self->testRegExpr($text, '(EMPTY|ANY)', 0, 0, 0, undef, 0, '37:element end', 'Attribute')) {
780 if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, '26:MixedOrChildren', 'Attribute')) {
784 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Doctype Declaration')) {
790 sub parse26MixedOrChildren {
791 my ($self, $text) = @_;
793 if ($self->testRegExpr($text, '#PCDATA', 0, 0, 0, undef, 0, '27:MixedShort', 'Attribute')) {
797 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Doctype Declaration')) {
801 if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, '30:children unknown', 'Doctype Declaration')) {
805 if ($self->testRegExpr($text, '(?![٠-٩۰-۹०-९০-৯੦-੯૦-૯୦-୯௧-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩]|\\d)(\\w|[_:])(\\w|[_:.-])*[\\?\\*\\+]?', 0, 0, 0, undef, 0, '30:children unknown', 'Value')) {
811 sub parse27MixedShort {
812 my ($self, $text) = @_;
814 if ($self->testDetectChar($text, '|', 0, 0, 0, undef, 0, '28:MixedLong', 'Doctype Declaration')) {
818 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Doctype Declaration')) {
822 if ($self->testDetectChar($text, ')', 0, 0, 0, undef, 0, '37:element end', 'Doctype Declaration')) {
828 sub parse28MixedLong {
829 my ($self, $text) = @_;
831 if ($self->testRegExpr($text, '(?![٠-٩۰-۹०-९০-৯੦-੯૦-૯୦-୯௧-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩]|\\d)(\\w|[_:])(\\w|[_:.-])*', 0, 0, 0, undef, 0, '29:MixedLong endOrContinue', 'Value')) {
835 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Doctype Declaration')) {
841 sub parse29MixedLongendOrContinue {
842 my ($self, $text) = @_;
844 if ($self->testDetectChar($text, '|', 0, 0, 0, undef, 0, '#pop', 'Doctype Declaration')) {
848 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#pop#pop', 'Doctype Declaration')) {
851 # type => Detect2Chars
852 if ($self->testDetect2Chars($text, ')', '*', 0, 0, 0, undef, 0, '37:element end', 'Doctype Declaration')) {
858 sub parse2XMLDeclVersionEq {
859 my ($self, $text) = @_;
861 if ($self->testRegExpr($text, '\\s*=\\s*', 0, 0, 0, undef, 0, '3:XMLDecl Version', 'Attribute')) {
865 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Attribute')) {
871 sub parse30childrenunknown {
872 my ($self, $text) = @_;
874 if ($self->testDetectChar($text, '|', 0, 0, 0, undef, 0, '33:children choice', 'Doctype Declaration')) {
878 if ($self->testDetectChar($text, ',', 0, 0, 0, undef, 0, '35:children seq', 'Doctype Declaration')) {
882 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Doctype Declaration')) {
886 if ($self->testRegExpr($text, '\\)[\\?\\*\\+]?', 0, 0, 0, undef, 0, '31:children unknownOrEnd', 'Doctype Declaration')) {
892 sub parse31childrenunknownOrEnd {
893 my ($self, $text) = @_;
895 if ($self->testDetectChar($text, '|', 0, 0, 0, undef, 0, '33:children choice', 'Doctype Declaration')) {
899 if ($self->testDetectChar($text, ',', 0, 0, 0, undef, 0, '35:children seq', 'Doctype Declaration')) {
903 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Doctype Declaration')) {
907 if ($self->testRegExpr($text, '\\)[\\?\\*\\+]?', 0, 0, 0, undef, 0, '#stay', 'Doctype Declaration')) {
911 if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '23:Doctype Decl IS', 'Doctype Declaration')) {
917 sub parse32childrenunknownName {
918 my ($self, $text) = @_;
920 if ($self->testRegExpr($text, '(?![٠-٩۰-۹०-९০-৯੦-੯૦-૯୦-୯௧-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩]|\\d)(\\w|[_:])(\\w|[_:.-])*[\\?\\*\\+]?', 0, 0, 0, undef, 0, '30:children unknown', 'Value')) {
924 if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, '#stay', 'Doctype Declaration')) {
928 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Doctype Declaration')) {
934 sub parse33childrenchoice {
935 my ($self, $text) = @_;
937 if ($self->testRegExpr($text, '(?![٠-٩۰-۹०-९০-৯੦-੯૦-૯୦-୯௧-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩]|\\d)(\\w|[_:])(\\w|[_:.-])*[\\?\\*\\+]?', 0, 0, 0, undef, 0, '34:children choiceOrEnd', 'Value')) {
941 if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, '32:children unknownName', 'Doctype Declaration')) {
945 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Doctype Declaration')) {
951 sub parse34childrenchoiceOrEnd {
952 my ($self, $text) = @_;
954 if ($self->testDetectChar($text, '|', 0, 0, 0, undef, 0, '#pop', 'Doctype Declaration')) {
958 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Doctype Declaration')) {
962 if ($self->testRegExpr($text, '\\)[\\?\\*\\+]?', 0, 0, 0, undef, 0, '31:children unknownOrEnd', 'Doctype Declaration')) {
968 sub parse35childrenseq {
969 my ($self, $text) = @_;
971 if ($self->testRegExpr($text, '(?![٠-٩۰-۹०-९০-৯੦-੯૦-૯୦-୯௧-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩]|\\d)(\\w|[_:])(\\w|[_:.-])*[\\?\\*\\+]?', 0, 0, 0, undef, 0, '36:children seqOrEnd', 'Value')) {
975 if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, '32:children unknownName', 'Doctype Declaration')) {
979 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Doctype Declaration')) {
985 sub parse36childrenseqOrEnd {
986 my ($self, $text) = @_;
988 if ($self->testDetectChar($text, ',', 0, 0, 0, undef, 0, '#pop', 'Doctype Declaration')) {
992 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Doctype Declaration')) {
996 if ($self->testRegExpr($text, '\\)[\\?\\*\\+]?', 0, 0, 0, undef, 0, '31:children unknownOrEnd', 'Doctype Declaration')) {
1002 sub parse37elementend {
1003 my ($self, $text) = @_;
1004 # type => DetectChar
1005 if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '23:Doctype Decl IS', 'Doctype Declaration')) {
1009 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Doctype Declaration')) {
1015 sub parse38AttlistDecl {
1016 my ($self, $text) = @_;
1018 if ($self->testRegExpr($text, '(?![٠-٩۰-۹०-९০-৯੦-੯૦-૯୦-୯௧-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩]|\\d)(\\w|[_:])(\\w|[_:.-])*(\\s+|$)', 0, 0, 0, undef, 0, '39:AttDef', 'Normal Tag')) {
1022 if ($self->testRegExpr($text, '(?![٠-٩۰-۹०-९০-৯੦-੯૦-૯୦-୯௧-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩]|\\d)(\\w|[_:])(\\w|[_:.-])*>', 0, 0, 0, undef, 0, '23:Doctype Decl IS', 'Normal Tag')) {
1026 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Doctype Declaration')) {
1033 my ($self, $text) = @_;
1035 if ($self->testRegExpr($text, '(?![٠-٩۰-۹०-९০-৯੦-੯૦-૯୦-୯௧-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩]|\\d)(\\w|[_:])(\\w|[_:.-])*(\\s+|$)', 0, 0, 0, undef, 0, '40:AttType', 'Attribute')) {
1039 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Doctype Declaration')) {
1042 # type => DetectChar
1043 if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '23:Doctype Decl IS', 'Doctype Declaration')) {
1049 sub parse3XMLDeclVersion {
1050 my ($self, $text) = @_;
1052 if ($self->testRegExpr($text, '\\s*("[A-Za-z0-9:._-]*"|\'[A-Za-z0-9:._-]*\')(?!e)\\s*', 0, 0, 0, undef, 0, '4:XMLDecl Encoding', 'Value')) {
1056 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Attribute')) {
1062 sub parse40AttType {
1063 my ($self, $text) = @_;
1065 if ($self->testKeyword($text, 'AttType', 0, 0, undef, 0, '46:DefaultDecl', 'Doctype Declaration')) {
1069 if ($self->testRegExpr($text, 'NOTATION(\\s+|$)', 0, 0, 0, undef, 0, '41:NotationStart', 'Doctype Declaration')) {
1072 # type => DetectChar
1073 if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, '42:Notation', 'Doctype Declaration')) {
1077 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#pop', 'Doctype Declaration')) {
1083 sub parse41NotationStart {
1084 my ($self, $text) = @_;
1085 # type => DetectChar
1086 if ($self->testDetectChar($text, '(', 0, 0, 0, undef, 0, '42:Notation', 'Doctype Declaration')) {
1090 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#pop#pop', 'Doctype Declaration')) {
1096 sub parse42Notation {
1097 my ($self, $text) = @_;
1099 if ($self->testRegExpr($text, '(?![٠-٩۰-۹०-९০-৯੦-੯૦-૯୦-୯௧-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩]|\\d)(\\w|[_:])(\\w|[_:.-])*', 0, 0, 0, undef, 0, '43:Notation or End', 'Value')) {
1103 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Doctype Declaration')) {
1109 sub parse43NotationorEnd {
1110 my ($self, $text) = @_;
1111 # type => DetectChar
1112 if ($self->testDetectChar($text, '|', 0, 0, 0, undef, 0, '#pop', 'Doctype Declaration')) {
1116 if ($self->testRegExpr($text, '\\)(\\s+|$)', 0, 0, 0, undef, 0, '46:DefaultDecl', 'Doctype Declaration')) {
1120 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Doctype Declaration')) {
1126 sub parse44Enumeration {
1127 my ($self, $text) = @_;
1129 if ($self->testRegExpr($text, '(\\w|[_:.-])+', 0, 0, 0, undef, 0, '#stay', 'Value')) {
1133 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Doctype Declaration')) {
1139 sub parse45EnumerationorEnd {
1140 my ($self, $text) = @_;
1141 # type => DetectChar
1142 if ($self->testDetectChar($text, '|', 0, 0, 0, undef, 0, '44:Enumeration', 'Doctype Declaration')) {
1146 if ($self->testRegExpr($text, '\\)(\\s+|$)', 0, 0, 0, undef, 0, '46:DefaultDecl', 'Doctype Declaration')) {
1150 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Doctype Declaration')) {
1156 sub parse46DefaultDecl {
1157 my ($self, $text) = @_;
1159 if ($self->testRegExpr($text, '(#REQUIRED|#IMPLIED)(\\s+|$)', 0, 0, 0, undef, 0, '39:AttDef', 'Attribute')) {
1163 if ($self->testRegExpr($text, '#FIXED(\\s+|$)', 0, 0, 0, undef, 0, '47:DefaultDecl AttValue', 'Attribute')) {
1167 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Doctype Declaration')) {
1171 if ($self->testRegExpr($text, '"', 0, 0, 0, undef, 0, '48:DefaultDecl AttValue qq', 'Value')) {
1175 if ($self->testRegExpr($text, '\'', 0, 0, 0, undef, 0, '49:DefaultDecl AttValue q', 'Value')) {
1181 sub parse47DefaultDeclAttValue {
1182 my ($self, $text) = @_;
1184 if ($self->testRegExpr($text, '"', 0, 0, 0, undef, 0, '48:DefaultDecl AttValue qq', 'Value')) {
1188 if ($self->testRegExpr($text, '\'', 0, 0, 0, undef, 0, '49:DefaultDecl AttValue q', 'Value')) {
1194 sub parse48DefaultDeclAttValueqq {
1195 my ($self, $text) = @_;
1197 if ($self->testRegExpr($text, '&(?![٠-٩۰-۹०-९০-৯੦-੯૦-૯୦-୯௧-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩]|\\d)(\\w|[_:])(\\w|[_:.-])*;', 0, 0, 0, undef, 0, '#stay', 'Entity')) {
1201 if ($self->testRegExpr($text, '&#(x[0-9a-fA-F]+|[0-9]+);', 0, 0, 0, undef, 0, '#stay', 'Entity')) {
1204 # type => DetectChar
1205 if ($self->testDetectChar($text, '&', 0, 0, 0, undef, 0, '#stay', 'Error')) {
1208 # type => DetectChar
1209 if ($self->testDetectChar($text, '<', 0, 0, 0, undef, 0, '#stay', 'Error')) {
1212 # type => DetectChar
1213 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '39:AttDef', 'Value')) {
1219 sub parse49DefaultDeclAttValueq {
1220 my ($self, $text) = @_;
1222 if ($self->testRegExpr($text, '&(?![٠-٩۰-۹०-९০-৯੦-੯૦-૯୦-୯௧-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩]|\\d)(\\w|[_:])(\\w|[_:.-])*;', 0, 0, 0, undef, 0, '#stay', 'Entity')) {
1226 if ($self->testRegExpr($text, '&#(x[0-9a-fA-F]+|[0-9]+);', 0, 0, 0, undef, 0, '#stay', 'Entity')) {
1229 # type => DetectChar
1230 if ($self->testDetectChar($text, '&', 0, 0, 0, undef, 0, '#stay', 'Error')) {
1233 # type => DetectChar
1234 if ($self->testDetectChar($text, '<', 0, 0, 0, undef, 0, '#stay', 'Error')) {
1237 # type => DetectChar
1238 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '39:AttDef', 'Value')) {
1244 sub parse4XMLDeclEncoding {
1245 my ($self, $text) = @_;
1247 if ($self->testRegExpr($text, '\\s*encoding\\s*', 0, 0, 0, undef, 0, '5:XMLDecl Encoding Eq', 'Attribute')) {
1251 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Doctype Declaration')) {
1255 if ($self->testRegExpr($text, '\\?>', 0, 0, 0, undef, 0, '11:Misc after XMLDecl', 'Doctype Declaration')) {
1261 sub parse50EntityDecl {
1262 my ($self, $text) = @_;
1264 if ($self->testRegExpr($text, '(?![٠-٩۰-۹०-९০-৯੦-੯૦-૯୦-୯௧-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩]|\\d)(\\w|[_:])(\\w|[_:.-])*(\\s+|$)', 0, 0, 0, undef, 0, '52:GEDecl EntityValueOrExternalID', 'Entity')) {
1267 # type => DetectChar
1268 if ($self->testDetectChar($text, '%', 0, 0, 0, undef, 0, '61:PEDecl', 'Entity')) {
1272 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Doctype Declaration')) {
1279 my ($self, $text) = @_;
1283 sub parse52GEDeclEntityValueOrExternalID {
1284 my ($self, $text) = @_;
1286 if ($self->testRegExpr($text, '"', 0, 0, 0, undef, 0, '53:GEDecl EntityValue qq', 'Value')) {
1290 if ($self->testRegExpr($text, '\'', 0, 0, 0, undef, 0, '54:GEDecl EntityValue q', 'Value')) {
1294 if ($self->testRegExpr($text, 'PUBLIC(\\s+|$)', 0, 0, 0, undef, 0, '55:GEDecl PublicID', 'Doctype Declaration')) {
1298 if ($self->testRegExpr($text, 'SYSTEM(\\s+|$)', 0, 0, 0, undef, 0, '58:GEDecl SystemID', 'Doctype Declaration')) {
1304 sub parse53GEDeclEntityValueqq {
1305 my ($self, $text) = @_;
1307 if ($self->testRegExpr($text, '[&%](?![٠-٩۰-۹०-९০-৯੦-੯૦-૯୦-୯௧-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩]|\\d)(\\w|[_:])(\\w|[_:.-])*;', 0, 0, 0, undef, 0, '#stay', 'Entity')) {
1311 if ($self->testRegExpr($text, '&#(x[0-9a-fA-F]+|[0-9]+);', 0, 0, 0, undef, 0, '#stay', 'Entity')) {
1314 # type => DetectChar
1315 if ($self->testDetectChar($text, '&', 0, 0, 0, undef, 0, '#stay', 'Error')) {
1318 # type => DetectChar
1319 if ($self->testDetectChar($text, '%', 0, 0, 0, undef, 0, '#stay', 'Error')) {
1322 # type => DetectChar
1323 if ($self->testDetectChar($text, '<', 0, 0, 0, undef, 0, '#stay', 'Error')) {
1326 # type => DetectChar
1327 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '69:GEDecl endOrNDATA', 'Value')) {
1333 sub parse54GEDeclEntityValueq {
1334 my ($self, $text) = @_;
1336 if ($self->testRegExpr($text, '[&%](?![٠-٩۰-۹०-९০-৯੦-੯૦-૯୦-୯௧-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩]|\\d)(\\w|[_:])(\\w|[_:.-])*;', 0, 0, 0, undef, 0, '#stay', 'Entity')) {
1340 if ($self->testRegExpr($text, '&#(x[0-9a-fA-F]+|[0-9]+);', 0, 0, 0, undef, 0, '#stay', 'Entity')) {
1343 # type => DetectChar
1344 if ($self->testDetectChar($text, '&', 0, 0, 0, undef, 0, '#stay', 'Error')) {
1347 # type => DetectChar
1348 if ($self->testDetectChar($text, '%', 0, 0, 0, undef, 0, '#stay', 'Error')) {
1351 # type => DetectChar
1352 if ($self->testDetectChar($text, '<', 0, 0, 0, undef, 0, '#stay', 'Error')) {
1355 # type => DetectChar
1356 if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '69:GEDecl endOrNDATA', 'Value')) {
1362 sub parse55GEDeclPublicID {
1363 my ($self, $text) = @_;
1364 # type => DetectChar
1365 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '56:GEDecl PublicID qq', 'Value')) {
1368 # type => DetectChar
1369 if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '57:GEDecl PublicID q', 'Value')) {
1373 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Doctype Declaration')) {
1379 sub parse56GEDeclPublicIDqq {
1380 my ($self, $text) = @_;
1381 # type => DetectChar
1382 if ($self->testDetectChar($text, '"(\\s+|$)', 0, 0, 0, undef, 0, '58:GEDecl SystemID', 'Value')) {
1386 if ($self->testRegExpr($text, '[
\r
1387 a-zA-Z0-9\'()+,./:=?;!*#@$_%-]', 0, 0, 0, undef, 0, '#stay', 'Value')) {
1393 sub parse57GEDeclPublicIDq {
1394 my ($self, $text) = @_;
1395 # type => DetectChar
1396 if ($self->testDetectChar($text, '\'(\\s+|$)', 0, 0, 0, undef, 0, '58:GEDecl SystemID', 'Value')) {
1400 if ($self->testRegExpr($text, '[
\r
1401 a-zA-Z0-9()+,./:=?;!*#@$_%-]', 0, 0, 0, undef, 0, '#stay', 'Value')) {
1407 sub parse58GEDeclSystemID {
1408 my ($self, $text) = @_;
1409 # type => DetectChar
1410 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '59:GEDecl SystemID qq', 'Value')) {
1413 # type => DetectChar
1414 if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '60:GEDecl SystemID q', 'Value')) {
1418 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Doctype Declaration')) {
1424 sub parse59GEDeclSystemIDqq {
1425 my ($self, $text) = @_;
1426 # type => DetectChar
1427 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '69:GEDecl endOrNDATA', 'Value')) {
1433 sub parse5XMLDeclEncodingEq {
1434 my ($self, $text) = @_;
1436 if ($self->testRegExpr($text, '\\s*=\\s*', 0, 0, 0, undef, 0, '6:XMLDecl Encoding', 'Attribute')) {
1440 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Attribute')) {
1446 sub parse60GEDeclSystemIDq {
1447 my ($self, $text) = @_;
1448 # type => DetectChar
1449 if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '69:GEDecl endOrNDATA', 'Value')) {
1456 my ($self, $text) = @_;
1458 if ($self->testRegExpr($text, '(?![٠-٩۰-۹०-९০-৯੦-੯૦-૯୦-୯௧-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩]|\\d)(\\w|[_:])(\\w|[_:.-])*(\\s+|$)', 0, 0, 0, undef, 0, '62:PEDecl EntityValueOrExternalID', 'Entity')) {
1462 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Doctype Declaration')) {
1468 sub parse62PEDeclEntityValueOrExternalID {
1469 my ($self, $text) = @_;
1471 if ($self->testRegExpr($text, '"', 0, 0, 0, undef, 0, '53:GEDecl EntityValue qq', 'Value')) {
1475 if ($self->testRegExpr($text, '\'', 0, 0, 0, undef, 0, '54:GEDecl EntityValue q', 'Value')) {
1479 if ($self->testRegExpr($text, 'PUBLIC(\\s+|$)', 0, 0, 0, undef, 0, '63:PEDecl PublicID', 'Doctype Declaration')) {
1483 if ($self->testRegExpr($text, 'SYSTEM(\\s+|$)', 0, 0, 0, undef, 0, '66:PEDecl SystemID', 'Doctype Declaration')) {
1489 sub parse63PEDeclPublicID {
1490 my ($self, $text) = @_;
1491 # type => DetectChar
1492 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '64:PEDecl PublicID qq', 'Value')) {
1495 # type => DetectChar
1496 if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '65:PEDecl PublicID q', 'Value')) {
1500 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Doctype Declaration')) {
1506 sub parse64PEDeclPublicIDqq {
1507 my ($self, $text) = @_;
1508 # type => DetectChar
1509 if ($self->testDetectChar($text, '"(\\s+|$)', 0, 0, 0, undef, 0, '66:PEDecl SystemID', 'Value')) {
1513 if ($self->testRegExpr($text, '[
\r
1514 a-zA-Z0-9\'()+,./:=?;!*#@$_%-]', 0, 0, 0, undef, 0, '#stay', 'Value')) {
1520 sub parse65PEDeclPublicIDq {
1521 my ($self, $text) = @_;
1522 # type => DetectChar
1523 if ($self->testDetectChar($text, '\'(\\s+|$)', 0, 0, 0, undef, 0, '66:PEDecl SystemID', 'Value')) {
1527 if ($self->testRegExpr($text, '[
\r
1528 a-zA-Z0-9()+,./:=?;!*#@$_%-]', 0, 0, 0, undef, 0, '#stay', 'Value')) {
1534 sub parse66PEDeclSystemID {
1535 my ($self, $text) = @_;
1536 # type => DetectChar
1537 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '67:PEDecl SystemID qq', 'Value')) {
1540 # type => DetectChar
1541 if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '68:PEDecl SystemID q', 'Value')) {
1545 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Doctype Declaration')) {
1551 sub parse67PEDeclSystemIDqq {
1552 my ($self, $text) = @_;
1553 # type => DetectChar
1554 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '37:element end', 'Value')) {
1560 sub parse68PEDeclSystemIDq {
1561 my ($self, $text) = @_;
1562 # type => DetectChar
1563 if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '37:element end', 'Value')) {
1569 sub parse69GEDeclendOrNDATA {
1570 my ($self, $text) = @_;
1571 # type => DetectChar
1572 if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '23:Doctype Decl IS', 'Doctype Declaration')) {
1576 if ($self->testRegExpr($text, 'NDATA(\\s+|$)', 0, 0, 0, undef, 0, '70:GEDecl NDATA', 'Doctype Declaration')) {
1580 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Doctype Declaration')) {
1586 sub parse6XMLDeclEncoding {
1587 my ($self, $text) = @_;
1589 if ($self->testRegExpr($text, '\\s*("[A-Za-z][A-Za-z0-9._-]*"|\'[A-Za-z][A-Za-z0-9._-]*\')(?!s)\\s*', 0, 0, 0, undef, 0, '7:XMLDecl Standalone', 'Value')) {
1593 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Attribute')) {
1599 sub parse70GEDeclNDATA {
1600 my ($self, $text) = @_;
1602 if ($self->testRegExpr($text, '(?![٠-٩۰-۹०-९০-৯੦-੯૦-૯୦-୯௧-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩]|\\d)(\\w|[_:])(\\w|[_:.-])*', 0, 0, 0, undef, 0, '37:element end', 'Entity')) {
1606 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Doctype Declaration')) {
1612 sub parse71NotationDeclName {
1613 my ($self, $text) = @_;
1615 if ($self->testRegExpr($text, '(?![٠-٩۰-۹०-९০-৯੦-੯૦-૯୦-୯௧-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩]|\\d)(\\w|[_:])(\\w|[_:.-])*(\\s+|$)', 0, 0, 0, undef, 0, '72:NotationDecl ExternalID', 'Entity')) {
1619 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Doctype Declaration')) {
1625 sub parse72NotationDeclExternalID {
1626 my ($self, $text) = @_;
1628 if ($self->testRegExpr($text, 'PUBLIC(\\s+|$)', 0, 0, 0, undef, 0, '73:NotationDecl PublicID', 'Doctype Declaration')) {
1632 if ($self->testRegExpr($text, 'SYSTEM(\\s+|$)', 0, 0, 0, undef, 0, '66:PEDecl SystemID', 'Doctype Declaration')) {
1636 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Doctype Declaration')) {
1642 sub parse73NotationDeclPublicID {
1643 my ($self, $text) = @_;
1644 # type => DetectChar
1645 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '74:NotationDecl PublicID qq', 'Value')) {
1648 # type => DetectChar
1649 if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '75:NotationDecl PublicID q', 'Value')) {
1653 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Doctype Declaration')) {
1659 sub parse74NotationDeclPublicIDqq {
1660 my ($self, $text) = @_;
1661 # type => DetectChar
1662 if ($self->testDetectChar($text, '"(\\s+|$)', 0, 0, 0, undef, 0, '76:NotationDecl SystemIDOrEnd', 'Value')) {
1666 if ($self->testRegExpr($text, '[
\r
1667 a-zA-Z0-9\'()+,./:=?;!*#@$_%-]', 0, 0, 0, undef, 0, '#stay', 'Value')) {
1673 sub parse75NotationDeclPublicIDq {
1674 my ($self, $text) = @_;
1675 # type => DetectChar
1676 if ($self->testDetectChar($text, '\'(\\s+|$)', 0, 0, 0, undef, 0, '76:NotationDecl SystemIDOrEnd', 'Value')) {
1680 if ($self->testRegExpr($text, '[
\r
1681 a-zA-Z0-9()+,./:=?;!*#@$_%-]', 0, 0, 0, undef, 0, '#stay', 'Value')) {
1687 sub parse76NotationDeclSystemIDOrEnd {
1688 my ($self, $text) = @_;
1689 # type => DetectChar
1690 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '67:PEDecl SystemID qq', 'Value')) {
1693 # type => DetectChar
1694 if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '68:PEDecl SystemID q', 'Value')) {
1697 # type => DetectChar
1698 if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '23:Doctype Decl IS', 'Doctype Declaration')) {
1702 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Doctype Declaration')) {
1708 sub parse77CommentinsideIS {
1709 my ($self, $text) = @_;
1711 if ($self->testRegExpr($text, '--->', 0, 0, 0, undef, 0, '23:Doctype Decl IS', 'Error')) {
1715 if ($self->testRegExpr($text, '-->', 0, 0, 0, undef, 0, '23:Doctype Decl IS', 'Comment')) {
1718 # type => Detect2Chars
1719 if ($self->testDetect2Chars($text, '-', '-', 0, 0, 0, undef, 0, '#stay', 'Error')) {
1725 sub parse78PIinsideIS {
1726 my ($self, $text) = @_;
1727 # type => Detect2Chars
1728 if ($self->testDetect2Chars($text, '?', '>', 0, 0, 0, undef, 0, '23:Doctype Decl IS', 'Processing Instruction')) {
1734 sub parse79Outside {
1735 my ($self, $text) = @_;
1737 if ($self->testRegExpr($text, '<[xX][mM][lL](\\w|[_.-])*(:(\\w|[_.-])+)?', 0, 0, 0, undef, 0, '80:STag', 'Error')) {
1741 if ($self->testRegExpr($text, '<(?![٠-٩۰-۹०-९০-৯੦-੯૦-૯୦-୯௧-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩]|\\d)(\\w|_)(\\w|[_.-])*(:(\\w|[_.-])+)?', 0, 0, 0, undef, 0, '80:STag', 'Normal Tag')) {
1745 if ($self->testRegExpr($text, '<(?![٠-٩۰-۹०-९০-৯੦-੯૦-૯୦-୯௧-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩]|\\d)(\\w|[:_])(\\w|[:_.-])*', 0, 0, 0, undef, 0, '80:STag', 'Error')) {
1749 if ($self->testRegExpr($text, '</[xX][mM][lL](\\w|[_.-])*(:(\\w|[_.-])+)?', 0, 0, 0, undef, 0, '85:ETag', 'Error')) {
1753 if ($self->testRegExpr($text, '</(?![٠-٩۰-۹०-९০-৯੦-੯૦-૯୦-୯௧-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩]|\\d)(\\w|_)(\\w|[_.-])*(:(\\w|[_.-])+)?', 0, 0, 0, undef, 0, '85:ETag', 'Normal Tag')) {
1757 if ($self->testRegExpr($text, '</(?![٠-٩۰-۹०-९০-৯੦-੯૦-૯୦-୯௧-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩]|\\d)(\\w|[:_])(\\w|[:_.-])*', 0, 0, 0, undef, 0, '85:ETag', 'Error')) {
1761 if ($self->testRegExpr($text, '&(?![٠-٩۰-۹०-९০-৯੦-੯૦-૯୦-୯௧-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩]|\\d)(\\w|[_:])(\\w|[_:.-])*;', 0, 0, 0, undef, 0, '#stay', 'Entity')) {
1765 if ($self->testRegExpr($text, '&#(x[0-9a-fA-F]+|[0-9]+);', 0, 0, 0, undef, 0, '#stay', 'Entity')) {
1769 if ($self->testRegExpr($text, '<!\\[CDATA\\[', 0, 0, 0, undef, 0, '86:CDSect', 'Entity')) {
1773 if ($self->testRegExpr($text, '<!--', 0, 0, 0, undef, 0, '87:Comment inside IS', 'Comment')) {
1777 if ($self->testRegExpr($text, '<\\?xml-stylesheet(\\s|$)', 0, 0, 0, undef, 0, '88:PI inside IS', 'Normal Tag')) {
1781 if ($self->testRegExpr($text, '<\\?[xX][mM][lL](\\w|[_.-])*(:(\\w|[_.-])+)?', 0, 0, 0, undef, 0, '88:PI inside IS', 'Error')) {
1785 if ($self->testRegExpr($text, '<\\?(?![٠-٩۰-۹०-९০-৯੦-੯૦-૯୦-୯௧-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩]|\\d)(\\w|_)(\\w|[_.-])*(:(\\w|[_.-])+)?', 0, 0, 0, undef, 0, '88:PI inside IS', 'Normal Tag')) {
1789 if ($self->testRegExpr($text, '<\\?(?![٠-٩۰-۹०-९০-৯੦-੯૦-૯୦-୯௧-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩]|\\d)(\\w|[:_])(\\w|[:_.-])*', 0, 0, 0, undef, 0, '88:PI inside IS', 'Error')) {
1792 # type => DetectChar
1793 if ($self->testDetectChar($text, '<', 0, 0, 0, undef, 0, '#stay', 'Error')) {
1796 # type => DetectChar
1797 if ($self->testDetectChar($text, '&', 0, 0, 0, undef, 0, '#stay', 'Error')) {
1801 if ($self->testRegExpr($text, '\\]\\]>', 0, 0, 0, undef, 0, '#stay', 'Error')) {
1807 sub parse7XMLDeclStandalone {
1808 my ($self, $text) = @_;
1810 if ($self->testRegExpr($text, '\\s*standalone\\s*', 0, 0, 0, undef, 0, '8:XMLDecl Standalone Eq', 'Attribute')) {
1814 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Doctype Declaration')) {
1818 if ($self->testRegExpr($text, '\\?>', 0, 0, 0, undef, 0, '11:Misc after XMLDecl', 'Doctype Declaration')) {
1825 my ($self, $text) = @_;
1826 # type => Detect2Chars
1827 if ($self->testDetect2Chars($text, '/', '>', 0, 0, 0, undef, 0, '79:Outside', 'Normal Tag')) {
1830 # type => DetectChar
1831 if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '79:Outside', 'Normal Tag')) {
1835 if ($self->testRegExpr($text, '(xmlns:(\\w|[_.-])*|xmlns|xml:(lang|base|space))', 0, 0, 0, undef, 0, '81:STag Attribute', 'Attribute')) {
1839 if ($self->testRegExpr($text, '[xX][mM][lL](\\w|[_.-])*(:(\\w|[_.-])+)?', 0, 0, 0, undef, 0, '81:STag Attribute', 'Error')) {
1843 if ($self->testRegExpr($text, '(?![٠-٩۰-۹०-९০-৯੦-੯૦-૯୦-୯௧-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩]|\\d)(\\w|_)(\\w|[_.-])*(:(\\w|[_.-])+)?', 0, 0, 0, undef, 0, '81:STag Attribute', 'Attribute')) {
1847 if ($self->testRegExpr($text, '(?![٠-٩۰-۹०-९০-৯੦-੯૦-૯୦-୯௧-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩]|\\d)(\\w|[:_])(\\w|[:_.-])*', 0, 0, 0, undef, 0, '81:STag Attribute', 'Error')) {
1851 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Normal Tag')) {
1857 sub parse81STagAttribute {
1858 my ($self, $text) = @_;
1859 # type => DetectChar
1860 if ($self->testDetectChar($text, '=', 0, 0, 0, undef, 0, '82:STag Attribute Value', 'Attribute')) {
1864 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Normal Tag')) {
1870 sub parse82STagAttributeValue {
1871 my ($self, $text) = @_;
1872 # type => DetectChar
1873 if ($self->testDetectChar($text, '"', 0, 0, 0, undef, 0, '83:STag Value qq', 'Value')) {
1876 # type => DetectChar
1877 if ($self->testDetectChar($text, '\'', 0, 0, 0, undef, 0, '84:STag Value q', 'Value')) {
1881 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Normal Tag')) {
1887 sub parse83STagValueqq {
1888 my ($self, $text) = @_;
1890 if ($self->testRegExpr($text, '&(?![٠-٩۰-۹०-९০-৯੦-੯૦-૯୦-୯௧-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩]|\\d)(\\w|[_:])(\\w|[_:.-])*;', 0, 0, 0, undef, 0, '#stay', 'Entity')) {
1894 if ($self->testRegExpr($text, '&#(x[0-9a-fA-F]+|[0-9]+);', 0, 0, 0, undef, 0, '#stay', 'Entity')) {
1897 # type => DetectChar
1898 if ($self->testDetectChar($text, '&', 0, 0, 0, undef, 0, '#stay', 'Error')) {
1901 # type => DetectChar
1902 if ($self->testDetectChar($text, '<', 0, 0, 0, undef, 0, '#stay', 'Error')) {
1906 if ($self->testRegExpr($text, '"(?=(?![٠-٩۰-۹०-९০-৯੦-੯૦-૯୦-୯௧-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩]|\\d)(\\w|[_:]))', 0, 0, 0, undef, 0, '80:STag', 'Error')) {
1910 if ($self->testRegExpr($text, '"(?=>|/>|\\s|$)', 0, 0, 0, undef, 0, '80:STag', 'Value')) {
1916 sub parse84STagValueq {
1917 my ($self, $text) = @_;
1919 if ($self->testRegExpr($text, '&(?![٠-٩۰-۹०-९০-৯੦-੯૦-૯୦-୯௧-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩]|\\d)(\\w|[_:])(\\w|[_:.-])*;', 0, 0, 0, undef, 0, '#stay', 'Entity')) {
1923 if ($self->testRegExpr($text, '&#(x[0-9a-fA-F]+|[0-9]+);', 0, 0, 0, undef, 0, '#stay', 'Entity')) {
1926 # type => DetectChar
1927 if ($self->testDetectChar($text, '&', 0, 0, 0, undef, 0, '#stay', 'Error')) {
1930 # type => DetectChar
1931 if ($self->testDetectChar($text, '<', 0, 0, 0, undef, 0, '#stay', 'Error')) {
1935 if ($self->testRegExpr($text, '\'(?=(?![٠-٩۰-۹०-९০-৯੦-੯૦-૯୦-୯௧-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩]|\\d)(\\w|[_:]))', 0, 0, 0, undef, 0, '80:STag', 'Error')) {
1939 if ($self->testRegExpr($text, '\'(?=>|/>|\\s|$)', 0, 0, 0, undef, 0, '80:STag', 'Value')) {
1946 my ($self, $text) = @_;
1947 # type => DetectChar
1948 if ($self->testDetectChar($text, '>', 0, 0, 0, undef, 0, '79:Outside', 'Normal Tag')) {
1952 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Normal Tag')) {
1959 my ($self, $text) = @_;
1961 if ($self->testRegExpr($text, '\\]\\]>', 0, 0, 0, undef, 0, '79:Outside', 'Entity')) {
1967 sub parse87CommentinsideIS {
1968 my ($self, $text) = @_;
1970 if ($self->testRegExpr($text, '--->', 0, 0, 0, undef, 0, '79:Outside', 'Error')) {
1974 if ($self->testRegExpr($text, '-->', 0, 0, 0, undef, 0, '79:Outside', 'Comment')) {
1977 # type => Detect2Chars
1978 if ($self->testDetect2Chars($text, '-', '-', 0, 0, 0, undef, 0, '#stay', 'Error')) {
1984 sub parse88PIinsideIS {
1985 my ($self, $text) = @_;
1986 # type => Detect2Chars
1987 if ($self->testDetect2Chars($text, '?', '>', 0, 0, 0, undef, 0, '79:Outside', 'Processing Instruction')) {
1993 sub parse8XMLDeclStandaloneEq {
1994 my ($self, $text) = @_;
1996 if ($self->testRegExpr($text, '\\s*=\\s*', 0, 0, 0, undef, 0, '9:XMLDecl Standalone', 'Attribute')) {
2000 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Attribute')) {
2006 sub parse9XMLDeclStandalone {
2007 my ($self, $text) = @_;
2009 if ($self->testRegExpr($text, '\\s*"(yes|no)"|\'(yes|no)\'\\s*', 0, 0, 0, undef, 0, '10:XMLDecl Standalone', 'Value')) {
2013 if ($self->testRegExpr($text, '\\s+', 0, 0, 0, undef, 0, '#stay', 'Attribute')) {
2026 Syntax::Highlight::Engine::Kate::XML_Debug - a Plugin for XML (Debug) syntax highlighting
2030 require Syntax::Highlight::Engine::Kate::XML_Debug;
2031 my $sh = new Syntax::Highlight::Engine::Kate::XML_Debug([
2036 Syntax::Highlight::Engine::Kate::XML_Debug is a plugin module that provides syntax highlighting
2037 for XML (Debug) to the Syntax::Haghlight::Engine::Kate highlighting engine.
2039 This code is generated from the syntax definition files used
2040 by the Kate project.
2041 It works quite fine, but can use refinement and optimization.
2043 It inherits Syntax::Higlight::Engine::Kate::Template. See also there.
2049 Hans Jeuken (haje <at> toneel <dot> demon <dot> nl)
2055 Unknown. If you find any, please contact the author