5 <expected>OK</expected>
8 <pattern>(|\$.*)\.class</pattern>
9 <expected>OK</expected>
12 <pattern>abc</pattern>
13 <expected>OK</expected>
16 <pattern>multiple words of text</pattern>
17 <expected>OK</expected>
20 <pattern>ab|cd</pattern>
21 <expected>OK</expected>
25 <expected>OK</expected>
28 <pattern>ab*c</pattern>
29 <expected>OK</expected>
32 <pattern>ab*bc</pattern>
33 <expected>OK</expected>
36 <pattern>ab+bc</pattern>
37 <expected>OK</expected>
40 <pattern>ab?bc</pattern>
41 <expected>OK</expected>
44 <pattern>ab?c</pattern>
45 <expected>OK</expected>
48 <pattern>a.c</pattern>
49 <expected>OK</expected>
52 <pattern>a.*c</pattern>
53 <expected>OK</expected>
57 <expected>ERR</expected>
59 <test verify="false" info="true">
60 <pattern><![CDATA[a<weak_warning descr="Single repetition">{1}</weak_warning>]]></pattern>
61 <expected>OK</expected>
64 <pattern>a{}</pattern>
65 <expected>ERR</expected>
69 <expected>ERR</expected>
73 <expected>OK</expected>
76 <pattern>a{1,}</pattern>
77 <expected>OK</expected>
80 <pattern>a{1,2}</pattern>
81 <expected>OK</expected>
84 <pattern>a{1,foo}</pattern>
85 <expected>ERR</expected>
87 <test info="true" verify="false">
88 <pattern><![CDATA[<weak_warning descr="Redundant character escape">\;</weak_warning>]]></pattern>
89 <expected>OK</expected>
95 <expected>OK</expected>
99 <expected>OK</expected>
102 <pattern>a*</pattern>
103 <expected>OK</expected>
106 <pattern>a??</pattern>
107 <expected>OK</expected>
110 <pattern>a+?</pattern>
111 <expected>OK</expected>
114 <pattern>a*?</pattern>
115 <expected>OK</expected>
118 <pattern>a?+</pattern>
119 <expected>OK</expected>
122 <pattern>a++</pattern>
123 <expected>OK</expected>
126 <pattern>a*+</pattern>
127 <expected>OK</expected>
130 <pattern>a**</pattern>
131 <expected>ERR</expected>
134 <pattern>a{2}</pattern>
135 <expected>OK</expected>
138 <pattern>a{1,2}</pattern>
139 <expected>OK</expected>
142 <pattern>a{2,1}</pattern>
143 <expected>ERR</expected>
145 <test verify="false" info="true">
146 <pattern><![CDATA[a<weak_warning descr="Repetition range replaceable by '?'">{0,1}</weak_warning>]]></pattern>
147 <expected>OK</expected>
149 <test verify="false" info="true">
150 <pattern><![CDATA[a<weak_warning descr="Repetition range replaceable by '+'">{1,}</weak_warning>]]></pattern>
151 <expected>OK</expected>
153 <test verify="false" info="true">
154 <pattern><![CDATA[a<weak_warning descr="Repetition range replaceable by '*'">{0,}</weak_warning>]]></pattern>
155 <expected>OK</expected>
157 <test verify="false" info="true">
158 <pattern><![CDATA[a<weak_warning descr="Single repetition">{1}</weak_warning>]]></pattern>
159 <expected>OK</expected>
161 <test verify="false" info="true">
162 <pattern><![CDATA[a<weak_warning descr="Fixed repetition range">{3,3}</weak_warning>]]></pattern>
163 <expected>OK</expected>
166 <pattern>a{</pattern>
167 <expected>ERR</expected>
170 <pattern>a}</pattern>
171 <expected>OK</expected>
174 <pattern>a{}</pattern>
175 <expected>ERR</expected>
180 <pattern>a[bc]d</pattern>
181 <expected>OK</expected>
184 <pattern>a[b-d]e</pattern>
185 <expected>OK</expected>
188 <pattern>a[b-d]</pattern>
189 <expected>OK</expected>
192 <pattern>a[b-a]</pattern>
193 <expected>ERR</expected>
196 <pattern>a[-b]</pattern>
197 <expected>OK</expected>
200 <pattern>a[b-]</pattern>
201 <expected>OK</expected>
204 <pattern>[a-[b]]</pattern>
205 <expected jdk="OK">OK</expected>
208 <pattern>a[b&&[cd]]</pattern>
209 <expected>OK</expected>
212 <pattern>a[b-&&[cd]]</pattern>
213 <expected>ERR</expected>
216 <pattern>a[b&&-]</pattern>
217 <expected>OK</expected>
220 <pattern>a[b&&-b]</pattern>
221 <expected jdk="OK">OK</expected>
224 <pattern>[&&]</pattern>
225 <expected>ERR</expected>
228 <pattern>a[b&&c&&d]</pattern>
229 <expected>OK</expected>
232 <pattern>a[b&&c&&d-e&&f]</pattern>
233 <expected>OK</expected>
236 <pattern>a[a[b][c]]</pattern>
237 <expected>OK</expected>
240 <pattern>[a-[]]</pattern>
241 <expected>ERR</expected>
244 <pattern>[a-[b</pattern>
245 <expected>ERR</expected>
248 <pattern>[a[^b]]</pattern>
249 <expected>OK</expected>
252 <pattern>a[a[b[c]][d]]</pattern>
253 <expected>OK</expected>
256 <pattern>a[\t--]</pattern>
257 <expected>OK</expected>
260 <pattern>a[\t--]</pattern>
261 <expected>OK</expected>
264 <pattern>a[\t---]</pattern>
265 <expected>OK</expected>
268 <pattern>a[-]?c</pattern>
269 <expected>OK</expected>
272 <pattern>a[</pattern>
273 <expected>ERR</expected>
276 <pattern>a]</pattern>
277 <expected>OK</expected>
280 <pattern>[a-[</pattern>
281 <expected>ERR</expected>
284 <pattern>a[]]</pattern>
285 <expected>OK</expected>
288 <pattern>a[^bc]d</pattern>
289 <expected>OK</expected>
292 <pattern>a[^bc]</pattern>
293 <expected>OK</expected>
296 <pattern>a[]b</pattern>
297 <expected>ERR</expected>
300 <pattern>[abhgefdc]ij</pattern>
301 <expected>OK</expected>
304 <pattern>[a-zA-Z_][a-zA-Z0-9_]*</pattern>
305 <expected>OK</expected>
308 <pattern>([a-c]+?)c</pattern>
309 <expected>OK</expected>
312 <pattern>([ab]*?)b</pattern>
313 <expected>OK</expected>
316 <pattern>([ab]*)b</pattern>
317 <expected>OK</expected>
320 <pattern>([ab]??)b</pattern>
321 <expected>OK</expected>
324 <pattern>(c[ab]?)b</pattern>
325 <expected>OK</expected>
328 <pattern>(c[ab]??)b</pattern>
329 <expected>OK</expected>
332 <pattern>(c[ab]*?)b</pattern>
333 <expected>OK</expected>
336 <pattern>a[bcd]+dcdcde</pattern>
337 <expected>OK</expected>
340 <pattern>[k]</pattern>
341 <expected>OK</expected>
344 <pattern>a[bcd]*dcdcde</pattern>
345 <expected>OK</expected>
348 <pattern>[^ab]*</pattern>
349 <expected>OK</expected>
352 <pattern>a[.]b</pattern>
353 <expected>OK</expected>
356 <pattern>a[+*?]b</pattern>
357 <expected>OK</expected>
360 <pattern>a[\p{IsDigit}\p{IsAlpha}]b</pattern>
361 <expected>OK</expected>
364 <pattern>[\p{L}&&[^\p{Lu}]]</pattern>
365 <expected>OK</expected>
368 <pattern>a\p</pattern>
369 <expected>ERR</expected>
372 <pattern>a\p{}</pattern>
373 <expected>ERR</expected>
376 <pattern>a\p}</pattern>
377 <expected>ERR</expected>
380 <pattern>a\p{123}</pattern>
381 <expected>ERR</expected>
383 <test verify="false">
384 <pattern><![CDATA[a\p{<error descr="Character family name expected">*</error>}b]]></pattern>
385 <expected>OK</expected>
387 <test verify="false">
388 <pattern><![CDATA[[<warning descr="Redundant character range">\w-\w</warning>]]]></pattern>
389 <expected>OK</expected>
392 <pattern>[a-\w]</pattern>
393 <expected>ERR</expected>
396 <pattern>(?x)abc #foo \q bar
398 (?-xi)xyz(?i:ABC)</pattern>
399 <expected>OK</expected>
404 <test warning="false">
405 <pattern>()ef</pattern>
406 <expected>OK</expected>
408 <test warning="false">
409 <pattern>()*</pattern>
410 <expected>OK</expected>
412 <test verify="false">
413 <pattern><![CDATA[<warning descr="Empty group">()</warning>]]></pattern>
414 <expected>OK</expected>
416 <test verify="false">
417 <pattern><![CDATA[<warning descr="Empty group">(|)</warning>]]></pattern>
418 <expected>OK</expected>
421 <pattern>(*)b</pattern>
422 <expected>ERR</expected>
424 <test verify="false">
425 <pattern><![CDATA[<warning descr="Redundant group nesting">((a))</warning>]]></pattern>
426 <expected>OK</expected>
429 <pattern>(a)b(c)</pattern>
430 <expected>OK</expected>
433 <pattern>(a*)*</pattern>
434 <expected>OK</expected>
437 <pattern>(a*)+</pattern>
438 <expected>OK</expected>
441 <pattern>(a|)*</pattern>
442 <expected>OK</expected>
445 <pattern>(ab|cd)e</pattern>
446 <expected>OK</expected>
449 <pattern>(.*)c(.*)</pattern>
450 <expected>OK</expected>
453 <pattern>\((.*), (.*)\)</pattern>
454 <expected>OK</expected>
457 <pattern>a(bc)d</pattern>
458 <expected>OK</expected>
461 <pattern>([abc])*d</pattern>
462 <expected>OK</expected>
464 <test warning="false">
465 <pattern>((((((((((a)))))))))</pattern>
466 <expected>ERR</expected>
469 <pattern>([abc])*bcd</pattern>
470 <expected>OK</expected>
473 <pattern>(a|b)c*d</pattern>
474 <expected>OK</expected>
477 <pattern>a([bc]*)c*</pattern>
478 <expected>OK</expected>
481 <pattern>((a)(b)c)(d)</pattern>
482 <expected>OK</expected>
485 <pattern>(ab|a)b*c</pattern>
486 <expected>OK</expected>
489 <pattern>(ab|ab*)bc</pattern>
490 <expected>OK</expected>
493 <pattern>(a|b|c|d|e)f</pattern>
494 <expected>OK</expected>
497 <pattern>a([bc]*)(c*d)</pattern>
498 <expected>OK</expected>
501 <pattern>a([bc]+)(c*d)</pattern>
502 <expected>OK</expected>
505 <pattern>a([bc]*)(c+d)</pattern>
506 <expected>OK</expected>
509 <pattern>(a+|b)*</pattern>
510 <expected>OK</expected>
513 <pattern>(a+|b)+</pattern>
514 <expected>OK</expected>
517 <pattern>(a+|b)?</pattern>
518 <expected>OK</expected>
521 <pattern>(^*</pattern>
522 <expected>ERR</expected>
525 <pattern>)(</pattern>
526 <expected>ERR</expected>
529 <pattern>(?i:*)</pattern>
530 <expected>ERR</expected>
535 <pattern>\q</pattern>
536 <expected>ERR</expected>
539 <pattern>\#</pattern>
540 <expected>OK</expected>
543 <pattern>a\</pattern>
544 <expected>ERR</expected>
547 <pattern>a\(b</pattern>
548 <expected>OK</expected>
551 <pattern>a\(*b</pattern>
552 <expected>OK</expected>
555 <pattern>a\\b</pattern>
556 <expected>OK</expected>
559 <pattern>\u004a</pattern>
560 <expected>OK</expected>
563 <pattern>\0123</pattern>
564 <expected>OK</expected>
567 <pattern>\0</pattern>
568 <expected>ERR</expected>
571 <pattern>\x4a</pattern>
572 <expected>OK</expected>
575 <pattern>[\x4a-\x4b]</pattern>
576 <expected>OK</expected>
578 <test verify="false">
579 <pattern><![CDATA[[<warning descr="Redundant character range">a-a</warning>]]]></pattern>
580 <expected>OK</expected>
583 <pattern>[\x4a-\x3f]</pattern>
584 <expected>ERR</expected>
587 <pattern>a\Qabc?*+.))]][]\Eb</pattern>
588 <expected>OK</expected>
591 <pattern>(a\Qabc?*+.))]][]\Eb)</pattern>
592 <expected>OK</expected>
595 <pattern>[\Qabc?*+.))]][]\E]</pattern>
596 <expected>OK</expected>
599 <pattern>a\Qabc?*+.))]][]\E)</pattern>
600 <expected>ERR</expected>
606 <pattern>^*</pattern>
607 <expected>OK</expected>
610 <pattern>$*</pattern>
611 <expected>OK</expected>
614 <pattern>^abc</pattern>
615 <expected>OK</expected>
618 <pattern>^abc$</pattern>
619 <expected>OK</expected>
622 <pattern>abc$</pattern>
623 <expected>OK</expected>
627 <expected>OK</expected>
631 <expected>OK</expected>
634 <pattern>$b</pattern>
635 <expected>OK</expected>
638 <pattern>^(ab|cd)e</pattern>
639 <expected>OK</expected>
642 <pattern>^a(bc+|b[eh])g|.h$</pattern>
643 <expected>OK</expected>
648 <pattern>a*b\s+c</pattern>
649 <expected>OK</expected>
652 <pattern>\d+</pattern>
653 <expected>OK</expected>
656 <pattern>^\p{javaJavaIdentifierStart}+\p{javaJavaIdentifierPart}+$</pattern>
657 <expected>OK</expected>
660 <pattern>\p{IsDigit}\p{IsAlpha}</pattern>
661 <expected>OK</expected>
664 <pattern>[a-e]?d\\e</pattern>
665 <expected>OK</expected>
668 <pattern>((\w+)/)*(\w+)</pattern>
669 <expected>OK</expected>
672 <pattern>\p{Digit}+</pattern>
673 <expected>OK</expected>
676 <pattern>[:xdigit:]+</pattern>
677 <expected>OK</expected>
680 <pattern>\p{unknown}+</pattern>
681 <expected>ERR</expected>
686 <pattern>(ac*)c*d[ac]*\1</pattern>
687 <expected>OK</expected>
690 <pattern>(.)=\1</pattern>
691 <expected>OK</expected>
694 <pattern>([ab])=\1</pattern>
695 <expected>OK</expected>
698 <pattern>([ab]+)=\1</pattern>
699 <expected>OK</expected>
701 <test verify="false">
702 <pattern>([ab]+)=\2</pattern>
703 <expected>ERR</expected>
705 <test verify="false">
706 <pattern>([ab]+)=\3</pattern>
707 <expected>ERR</expected>
709 <test verify="false">
710 <pattern><![CDATA[([ab]+=<warning descr="Backreference is nested into the capturing group it refers to">\1</warning>)]]></pattern>
711 <expected>OK</expected>
716 <pattern>z(\w\s+(?:\w\s+\w)+)z</pattern>
717 <expected>OK</expected>
720 <pattern>(([hH][tT]{2}[pP]|[fF][tT][pP]):\/\/)?[a-zA-Z0-9\-]+(\.[a-zA-Z0-9\-]+)*</pattern>
721 <expected>OK</expected>
724 <pattern>((?:[hH][tT]{2}[pP]|[fF][tT][pP]):\/\/)?[a-zA-Z0-9\-]+(\.[a-zA-Z0-9\-]+)*</pattern>
725 <expected>OK</expected>
728 <pattern>(([hH][tT]{2}[pP]|[fF][tT][pP]):\/\/)?[a-zA-Z0-9\-]+(?:\.[a-zA-Z0-9\-]+)*</pattern>
729 <expected>OK</expected>
732 <pattern>(?:([hH][tT]{2}[pP]|[fF][tT][pP]):\/\/)?[a-zA-Z0-9\-]+(\.[a-zA-Z0-9\-]+)*</pattern>
733 <expected>OK</expected>
736 <pattern>^(?:([hH][tT]{2}[pP]|[fF][tT][pP]):\/\/)?[a-zA-Z0-9\-]+(\.[a-zA-Z0-9\-]+)*$</pattern>
737 <expected>OK</expected>
740 <pattern>^(?:(?:[hH][tT]{2}[pP]|[fF][tT][pP]):\/\/)?[a-zA-Z0-9\-]+(?:\.[a-zA-Z0-9\-]+)*$</pattern>
741 <expected>OK</expected>
747 <pattern>abc\</pattern>
748 <expected>ERR</expected>
751 <pattern>abc[\</pattern>
752 <expected>ERR</expected>
755 <pattern>abc\x</pattern>
756 <expected>ERR</expected>
759 <pattern>abc\x1</pattern>
760 <expected>ERR</expected>
763 <pattern>abc\u</pattern>
764 <expected>ERR</expected>
767 <pattern>abc\u22</pattern>
768 <expected>ERR</expected>
771 <pattern>\Qabc</pattern>
772 <expected>OK</expected>
775 <pattern>\Q</pattern>
776 <expected>OK</expected>
779 <pattern>\E</pattern>
780 <expected>ERR</expected>
785 <!-- caused NPE in Annotator -->
788 <expected>ERR</expected>
790 <!-- broke by TokenType modifications -->
792 <pattern>[^^]</pattern>
793 <expected>OK</expected>
795 <!-- caused "Probably a bug: eating token without its type checking" errors in Diana -->
796 <test verify="false">
797 <pattern><![CDATA[a<error>)</error>b]]></pattern>
798 <expected>OK</expected>
800 <test verify="false">
801 <pattern><![CDATA[\s*@return(?:s)?\s*(?:(?:\{|:)?\s*(?<error>(</error>[^\s\}]+)\s*\}?\s*)?(.*)]]></pattern>
802 <expected>OK</expected>
807 <pattern>abc)</pattern>
808 <expected>ERR</expected>
811 <pattern>(abc</pattern>
812 <expected>ERR</expected>
815 <pattern>a+b+c</pattern>
816 <expected>OK</expected>
819 <pattern>a**</pattern>
820 <expected>ERR</expected>
823 <pattern>a++</pattern>
824 <expected>OK</expected>
827 <pattern>ab*</pattern>
828 <expected>OK</expected>
831 <pattern>abcd*efg</pattern>
832 <expected>OK</expected>
835 <pattern>a|b|c|d|e</pattern>
836 <expected>OK</expected>
839 <pattern>(bc+d$|ef*g.|h?i(j|k))</pattern>
840 <expected>OK</expected>
843 <pattern>a*(b*c*)</pattern>
844 <expected>OK</expected>
847 <pattern>a?b+c*</pattern>
848 <expected>OK</expected>
851 <pattern>i am a green (giant|man|martian)</pattern>
852 <expected>OK</expected>
855 <pattern>(wee|week)(knights|knight)</pattern>
856 <expected>OK</expected>
859 <pattern>(a.*b)(a.*b)</pattern>
860 <expected>OK</expected>
863 <pattern>(\s*\w+)?</pattern>
864 <expected>OK</expected>
867 <pattern>(?:a)</pattern>
868 <expected>OK</expected>
871 <pattern>(?:\w)</pattern>
872 <expected>OK</expected>
875 <pattern>(?:\w\s\w)+</pattern>
876 <expected>OK</expected>
879 <pattern>(a\w)(?:,(a\w))+</pattern>
880 <expected>OK</expected>
883 <pattern>abc.*?x+yz</pattern>
884 <expected>OK</expected>
887 <pattern>abc.+?x+yz</pattern>
888 <expected>OK</expected>
891 <pattern>a.+?(c|d)</pattern>
892 <expected>OK</expected>
895 <pattern>a.+(c|d)</pattern>
896 <expected>OK</expected>
899 <pattern>a+?b+?c+?</pattern>
900 <expected>OK</expected>
904 <pattern>x:found="(true|false)"</pattern>
905 <expected>OK</expected>
908 <pattern>(?:\s)|(?:/\*.*\*/)|(?://[^\n]*)</pattern>
909 <expected>OK</expected>
912 <pattern>((?:\p{Alpha}\:)?[0-9 a-z_A-Z\-\\./]+)</pattern>
913 <expected>OK</expected>
916 <pattern>^[\w\+\.\-]{2,}:</pattern>
917 <expected>OK</expected>
920 <pattern>#(.*)$</pattern>
921 <expected>OK</expected>
924 <pattern>^(([^:]+)://)?([^:/]+)(:([0-9]+))?(/.*)</pattern>
925 <expected>OK</expected>
928 <pattern>(([^:]+)://)?([^:/]+)(:([0-9]+))?(/.*)</pattern>
929 <expected>OK</expected>
932 <pattern>usd [+-]?[0-9]+.[0-9][0-9]</pattern>
933 <expected>OK</expected>
936 <pattern>\b(\w+)(\s+\1)+\b</pattern>
937 <expected>OK</expected>
940 <pattern>.*?(<(error|warning|info)(?: descr="((?:[^"\\]|\\")*)")?(?: type="([0-9A-Z_]+)")?(?: foreground="([0-9xa-f]+)")?(?: background="([0-9xa-f]+)")?(?: effectcolor="([0-9xa-f]+)")?(?: effecttype="([A-Z]+)")?(?: fonttype="([0-9]+)")?(/)?>)(.*)</pattern>
941 <expected>OK</expected>