mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-06 03:21:12 +07:00
regexp: lex character class starting with escaped caret correctly
This commit is contained in:
@@ -63,128 +63,147 @@ class _RegExLexer implements FlexLexer {
|
||||
|
||||
/**
|
||||
* Translates characters to character classes
|
||||
* Chosen bits are [11, 6, 4]
|
||||
* Total runtime size is 13728 bytes
|
||||
*/
|
||||
public static int ZZ_CMAP(int ch) {
|
||||
return ZZ_CMAP_A[(ZZ_CMAP_Y[(ZZ_CMAP_Z[ch>>10]<<6)|((ch>>4)&0x3f)]<<4)|(ch&0xf)];
|
||||
}
|
||||
private static final String ZZ_CMAP_PACKED =
|
||||
"\10\0\2\61\1\76\1\0\1\61\1\76\22\0\1\14\1\74\1\0"+
|
||||
"\1\75\1\16\1\0\1\72\1\64\1\2\1\3\1\20\1\21\1\56"+
|
||||
"\1\13\1\1\1\0\1\53\3\55\4\54\2\47\1\70\1\0\1\63"+
|
||||
"\1\71\1\73\1\17\1\0\1\30\1\30\1\37\1\35\1\45\1\46"+
|
||||
"\1\31\1\57\1\40\2\66\1\44\1\67\1\60\1\66\1\42\1\50"+
|
||||
"\1\65\1\34\1\66\1\43\1\33\1\33\1\33\1\66\1\32\1\6"+
|
||||
"\1\10\1\7\1\23\1\12\1\0\1\25\1\26\1\36\1\35\1\25"+
|
||||
"\1\25\1\27\1\57\1\40\1\66\1\62\1\43\1\66\1\24\1\66"+
|
||||
"\1\41\1\66\1\24\1\33\1\24\1\52\1\33\1\33\1\51\1\66"+
|
||||
"\1\31\1\4\1\22\1\5\54\0\1\11\12\0\1\11\4\0\1\11"+
|
||||
"\5\0\27\11\1\0\37\11\1\0\u01ca\11\4\0\14\11\16\0\5\11"+
|
||||
"\7\0\1\11\1\0\1\11\201\0\5\11\1\0\2\11\2\0\4\11"+
|
||||
"\1\0\1\11\6\0\1\11\1\0\3\11\1\0\1\11\1\0\24\11"+
|
||||
"\1\0\123\11\1\0\213\11\10\0\246\11\1\0\46\11\2\0\1\11"+
|
||||
"\7\0\47\11\110\0\33\11\5\0\3\11\55\0\53\11\25\0\12\15"+
|
||||
"\4\0\2\11\1\0\143\11\1\0\1\11\17\0\2\11\7\0\2\11"+
|
||||
"\12\15\3\11\2\0\1\11\20\0\1\11\1\0\36\11\35\0\131\11"+
|
||||
"\13\0\1\11\16\0\12\15\41\11\11\0\2\11\4\0\1\11\5\0"+
|
||||
"\26\11\4\0\1\11\11\0\1\11\3\0\1\11\27\0\31\11\107\0"+
|
||||
"\25\11\117\0\66\11\3\0\1\11\22\0\1\11\7\0\12\11\4\0"+
|
||||
"\12\15\1\0\20\11\4\0\10\11\2\0\2\11\2\0\26\11\1\0"+
|
||||
"\7\11\1\0\1\11\3\0\4\11\3\0\1\11\20\0\1\11\15\0"+
|
||||
"\2\11\1\0\3\11\4\0\12\15\2\11\23\0\6\11\4\0\2\11"+
|
||||
"\2\0\26\11\1\0\7\11\1\0\2\11\1\0\2\11\1\0\2\11"+
|
||||
"\37\0\4\11\1\0\1\11\7\0\12\15\2\0\3\11\20\0\11\11"+
|
||||
"\1\0\3\11\1\0\26\11\1\0\7\11\1\0\2\11\1\0\5\11"+
|
||||
"\3\0\1\11\22\0\1\11\17\0\2\11\4\0\12\15\11\0\1\11"+
|
||||
"\13\0\10\11\2\0\2\11\2\0\26\11\1\0\7\11\1\0\2\11"+
|
||||
"\1\0\5\11\3\0\1\11\36\0\2\11\1\0\3\11\4\0\12\15"+
|
||||
"\1\0\1\11\21\0\1\11\1\0\6\11\3\0\3\11\1\0\4\11"+
|
||||
"\3\0\2\11\1\0\1\11\1\0\2\11\3\0\2\11\3\0\3\11"+
|
||||
"\3\0\14\11\26\0\1\11\25\0\12\15\25\0\10\11\1\0\3\11"+
|
||||
"\1\0\27\11\1\0\20\11\3\0\1\11\32\0\3\11\5\0\2\11"+
|
||||
"\4\0\12\15\25\0\10\11\1\0\3\11\1\0\27\11\1\0\12\11"+
|
||||
"\1\0\5\11\3\0\1\11\40\0\1\11\1\0\2\11\4\0\12\15"+
|
||||
"\1\0\2\11\22\0\10\11\1\0\3\11\1\0\51\11\2\0\1\11"+
|
||||
"\20\0\1\11\20\0\3\11\4\0\12\15\12\0\6\11\5\0\22\11"+
|
||||
"\3\0\30\11\1\0\11\11\1\0\1\11\2\0\7\11\37\0\12\15"+
|
||||
"\21\0\60\11\1\0\2\11\14\0\7\11\11\0\12\15\47\0\2\11"+
|
||||
"\1\0\1\11\2\0\2\11\1\0\1\11\2\0\1\11\6\0\4\11"+
|
||||
"\1\0\7\11\1\0\3\11\1\0\1\11\1\0\1\11\2\0\2\11"+
|
||||
"\1\0\4\11\1\0\2\11\11\0\1\11\2\0\5\11\1\0\1\11"+
|
||||
"\11\0\12\15\2\0\4\11\40\0\1\11\37\0\12\15\26\0\10\11"+
|
||||
"\1\0\44\11\33\0\5\11\163\0\53\11\24\0\1\11\12\15\6\0"+
|
||||
"\6\11\4\0\4\11\3\0\1\11\3\0\2\11\7\0\3\11\4\0"+
|
||||
"\15\11\14\0\1\11\1\0\12\15\6\0\46\11\1\0\1\11\5\0"+
|
||||
"\1\11\2\0\53\11\1\0\u014d\11\1\0\4\11\2\0\7\11\1\0"+
|
||||
"\1\11\1\0\4\11\2\0\51\11\1\0\4\11\2\0\41\11\1\0"+
|
||||
"\4\11\2\0\7\11\1\0\1\11\1\0\4\11\2\0\17\11\1\0"+
|
||||
"\71\11\1\0\4\11\2\0\103\11\45\0\20\11\20\0\126\11\2\0"+
|
||||
"\6\11\3\0\u026c\11\2\0\21\11\1\0\32\11\5\0\113\11\6\0"+
|
||||
"\10\11\7\0\15\11\1\0\4\11\16\0\22\11\16\0\22\11\16\0"+
|
||||
"\15\11\1\0\3\11\17\0\64\11\43\0\1\11\4\0\1\11\3\0"+
|
||||
"\12\15\46\0\12\15\6\0\130\11\10\0\51\11\1\0\1\11\5\0"+
|
||||
"\106\11\12\0\37\11\47\0\12\15\36\11\2\0\5\11\13\0\54\11"+
|
||||
"\4\0\32\11\6\0\12\15\46\0\27\11\11\0\65\11\53\0\12\15"+
|
||||
"\6\0\12\15\15\0\1\11\135\0\57\11\21\0\7\11\4\0\12\15"+
|
||||
"\51\0\36\11\15\0\2\11\12\15\54\11\32\0\44\11\34\0\12\15"+
|
||||
"\3\0\3\11\12\15\44\11\153\0\4\11\1\0\4\11\3\0\2\11"+
|
||||
"\11\0\300\11\100\0\u0116\11\2\0\6\11\2\0\46\11\2\0\6\11"+
|
||||
"\2\0\10\11\1\0\1\11\1\0\1\11\1\0\1\11\1\0\37\11"+
|
||||
"\2\0\65\11\1\0\7\11\1\0\1\11\3\0\3\11\1\0\7\11"+
|
||||
"\3\0\4\11\2\0\6\11\4\0\15\11\5\0\3\11\1\0\7\11"+
|
||||
"\164\0\1\11\15\0\1\11\20\0\15\11\145\0\1\11\4\0\1\11"+
|
||||
"\2\0\12\11\1\0\1\11\3\0\5\11\6\0\1\11\1\0\1\11"+
|
||||
"\1\0\1\11\1\0\4\11\1\0\13\11\2\0\4\11\5\0\5\11"+
|
||||
"\4\0\1\11\64\0\2\11\u0a7b\0\57\11\1\0\57\11\1\0\205\11"+
|
||||
"\6\0\4\11\3\0\2\11\14\0\46\11\1\0\1\11\5\0\1\11"+
|
||||
"\2\0\70\11\7\0\1\11\20\0\27\11\11\0\7\11\1\0\7\11"+
|
||||
"\1\0\7\11\1\0\7\11\1\0\7\11\1\0\7\11\1\0\7\11"+
|
||||
"\1\0\7\11\120\0\1\11\u01d5\0\2\11\52\0\5\11\5\0\2\11"+
|
||||
"\4\0\126\11\6\0\3\11\1\0\132\11\1\0\4\11\5\0\51\11"+
|
||||
"\3\0\136\11\21\0\33\11\65\0\20\11\u0200\0\u19b6\11\112\0\u51d6\11"+
|
||||
"\52\0\u048d\11\103\0\56\11\2\0\u010d\11\3\0\20\11\12\15\2\11"+
|
||||
"\24\0\57\11\20\0\37\11\2\0\106\11\61\0\11\11\2\0\147\11"+
|
||||
"\2\0\43\11\2\0\10\11\77\0\13\11\1\0\3\11\1\0\4\11"+
|
||||
"\1\0\27\11\35\0\64\11\16\0\62\11\34\0\12\15\30\0\6\11"+
|
||||
"\3\0\1\11\1\0\1\11\2\0\12\15\34\11\12\0\27\11\31\0"+
|
||||
"\35\11\7\0\57\11\34\0\1\11\12\15\6\0\5\11\1\0\12\11"+
|
||||
"\12\15\5\11\1\0\51\11\27\0\3\11\1\0\10\11\4\0\12\15"+
|
||||
"\6\0\27\11\3\0\1\11\3\0\62\11\1\0\1\11\3\0\2\11"+
|
||||
"\2\0\5\11\2\0\1\11\1\0\1\11\30\0\3\11\2\0\13\11"+
|
||||
"\7\0\3\11\14\0\6\11\2\0\6\11\2\0\6\11\11\0\7\11"+
|
||||
"\1\0\7\11\1\0\53\11\1\0\12\11\12\0\163\11\15\0\12\15"+
|
||||
"\6\0\u2ba4\11\14\0\27\11\4\0\61\11\u2104\0\u016e\11\2\0\152\11"+
|
||||
"\46\0\7\11\14\0\5\11\5\0\1\11\1\0\12\11\1\0\15\11"+
|
||||
"\1\0\5\11\1\0\1\11\1\0\2\11\1\0\2\11\1\0\154\11"+
|
||||
"\41\0\u016b\11\22\0\100\11\2\0\66\11\50\0\14\11\164\0\5\11"+
|
||||
"\1\0\207\11\23\0\12\15\7\0\32\11\6\0\32\11\13\0\131\11"+
|
||||
"\3\0\6\11\2\0\6\11\2\0\6\11\2\0\3\11\43\0\14\11"+
|
||||
"\1\0\32\11\1\0\23\11\1\0\2\11\1\0\17\11\2\0\16\11"+
|
||||
"\42\0\173\11\u0185\0\35\11\3\0\61\11\57\0\40\11\20\0\21\11"+
|
||||
"\1\0\10\11\6\0\46\11\12\0\36\11\2\0\44\11\4\0\10\11"+
|
||||
"\60\0\236\11\2\0\12\15\126\0\50\11\10\0\64\11\234\0\u0137\11"+
|
||||
"\11\0\26\11\12\0\10\11\230\0\6\11\2\0\1\11\1\0\54\11"+
|
||||
"\1\0\2\11\3\0\1\11\2\0\27\11\12\0\27\11\11\0\37\11"+
|
||||
"\101\0\23\11\1\0\2\11\12\0\26\11\12\0\32\11\106\0\70\11"+
|
||||
"\6\0\2\11\100\0\1\11\17\0\4\11\1\0\3\11\1\0\33\11"+
|
||||
"\54\0\35\11\3\0\35\11\43\0\10\11\1\0\34\11\33\0\66\11"+
|
||||
"\12\0\26\11\12\0\23\11\15\0\22\11\156\0\111\11\67\0\63\11"+
|
||||
"\15\0\63\11\u0310\0\65\11\56\0\12\15\23\0\55\11\40\0\31\11"+
|
||||
"\7\0\12\15\11\0\44\11\17\0\12\15\20\0\43\11\3\0\1\11"+
|
||||
"\14\0\60\11\16\0\4\11\13\0\12\15\1\11\1\0\1\11\43\0"+
|
||||
"\22\11\1\0\31\11\124\0\7\11\1\0\1\11\1\0\4\11\1\0"+
|
||||
"\17\11\1\0\12\11\7\0\57\11\21\0\12\15\13\0\10\11\2\0"+
|
||||
"\2\11\2\0\26\11\1\0\7\11\1\0\2\11\1\0\5\11\3\0"+
|
||||
"\1\11\22\0\1\11\14\0\5\11\u011e\0\60\11\24\0\2\11\1\0"+
|
||||
"\1\11\10\0\12\15\246\0\57\11\51\0\4\11\44\0\60\11\24\0"+
|
||||
"\1\11\13\0\12\15\46\0\53\11\25\0\12\15\66\0\32\11\26\0"+
|
||||
"\12\15\u0166\0\100\11\12\15\25\0\1\11\u01c0\0\71\11\u0507\0\u039a\11"+
|
||||
"\346\0\304\11\u0abc\0\u042f\11\u0fd1\0\u0247\11\u21b9\0\u0239\11\7\0\37\11"+
|
||||
"\1\0\12\15\146\0\36\11\22\0\60\11\20\0\4\11\14\0\12\15"+
|
||||
"\11\0\25\11\5\0\23\11\u0370\0\105\11\13\0\1\11\102\0\15\11"+
|
||||
"\u4060\0\2\11\u0bfe\0\153\11\5\0\15\11\3\0\11\11\7\0\12\11"+
|
||||
"\u1766\0\125\11\1\0\107\11\1\0\2\11\2\0\1\11\2\0\2\11"+
|
||||
"\2\0\4\11\1\0\14\11\1\0\1\11\1\0\7\11\1\0\101\11"+
|
||||
"\1\0\4\11\2\0\10\11\1\0\7\11\1\0\34\11\1\0\4\11"+
|
||||
"\1\0\5\11\1\0\1\11\3\0\7\11\1\0\u0154\11\2\0\31\11"+
|
||||
"\1\0\31\11\1\0\37\11\1\0\31\11\1\0\37\11\1\0\31\11"+
|
||||
"\1\0\37\11\1\0\31\11\1\0\37\11\1\0\31\11\1\0\10\11"+
|
||||
"\2\0\62\15\u1000\0\305\11\u053b\0\4\11\1\0\33\11\1\0\2\11"+
|
||||
"\1\0\1\11\2\0\1\11\1\0\12\11\1\0\4\11\1\0\1\11"+
|
||||
"\1\0\1\11\6\0\1\11\4\0\1\11\1\0\1\11\1\0\1\11"+
|
||||
"\1\0\3\11\1\0\2\11\1\0\1\11\2\0\1\11\1\0\1\11"+
|
||||
"\1\0\1\11\1\0\1\11\1\0\1\11\1\0\2\11\1\0\1\11"+
|
||||
"\2\0\4\11\1\0\7\11\1\0\4\11\1\0\4\11\1\0\1\11"+
|
||||
"\1\0\12\11\1\0\21\11\5\0\3\11\1\0\5\11\1\0\21\11"+
|
||||
"\u1144\0\ua6d7\11\51\0\u1035\11\13\0\336\11\2\0\u1682\11\u295e\0\u021e\11"+
|
||||
"\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\u05f0\0";
|
||||
|
||||
/* The ZZ_CMAP_Z table has 1088 entries */
|
||||
static final char ZZ_CMAP_Z[] = zzUnpackCMap(
|
||||
"\1\0\1\1\1\2\1\3\1\4\1\5\1\6\1\7\1\10\2\11\1\12\1\13\6\14\1\15\23\14\1\16"+
|
||||
"\1\14\1\17\1\20\12\14\1\21\10\11\1\22\1\23\1\24\1\25\1\26\1\27\1\30\1\31\1"+
|
||||
"\32\1\11\1\33\1\34\2\11\1\14\1\35\3\11\1\36\10\11\1\37\1\40\20\11\1\41\2\11"+
|
||||
"\1\42\5\11\1\43\4\11\1\44\1\45\4\11\51\14\1\46\3\14\1\47\1\50\4\14\1\51\12"+
|
||||
"\11\1\52\u0381\11");
|
||||
|
||||
/* The ZZ_CMAP_Y table has 2752 entries */
|
||||
static final char ZZ_CMAP_Y[] = zzUnpackCMap(
|
||||
"\1\0\1\1\1\2\1\3\1\4\1\5\1\6\1\7\2\1\1\10\1\11\1\12\1\13\1\12\1\13\34\12\1"+
|
||||
"\14\1\15\1\16\10\1\1\17\1\20\1\12\1\21\4\12\1\22\10\12\1\23\12\12\1\24\1\12"+
|
||||
"\1\25\1\24\1\12\1\26\4\1\1\12\1\27\1\30\2\1\2\12\1\27\1\1\1\31\1\24\5\12\1"+
|
||||
"\32\1\33\1\34\1\1\1\35\1\12\1\1\1\36\5\12\1\37\1\40\1\41\1\12\1\27\1\42\1"+
|
||||
"\12\1\43\1\44\1\1\1\12\1\45\4\1\1\12\1\46\4\1\1\47\2\12\1\50\1\1\1\51\1\52"+
|
||||
"\1\24\1\53\1\54\1\55\1\56\1\57\1\60\1\52\1\15\1\61\1\54\1\55\1\62\1\1\1\63"+
|
||||
"\1\64\1\65\1\66\1\21\1\55\1\67\1\1\1\70\1\52\1\71\1\72\1\54\1\55\1\67\1\1"+
|
||||
"\1\60\1\52\1\40\1\73\1\74\1\75\1\76\1\1\1\70\1\64\1\1\1\77\1\35\1\55\1\50"+
|
||||
"\1\1\1\100\1\52\1\1\1\77\1\35\1\55\1\101\1\1\1\57\1\52\1\102\1\77\1\35\1\12"+
|
||||
"\1\103\1\57\1\104\1\52\1\105\1\106\1\107\1\12\1\110\1\111\1\1\1\64\1\1\1\24"+
|
||||
"\2\12\1\112\1\111\1\113\2\1\1\114\1\115\1\116\1\117\1\120\1\121\2\1\1\70\1"+
|
||||
"\1\1\113\1\1\1\122\1\12\1\123\1\1\1\124\7\1\2\12\1\27\1\104\1\113\1\125\1"+
|
||||
"\126\1\127\1\130\1\113\2\12\1\131\2\12\1\132\24\12\1\133\1\134\2\12\1\133"+
|
||||
"\2\12\1\135\1\136\1\13\3\12\1\136\3\12\1\27\2\1\1\12\1\1\5\12\1\137\1\24\45"+
|
||||
"\12\1\140\1\12\1\24\1\27\4\12\1\27\1\141\1\142\1\15\1\12\1\15\1\12\1\15\1"+
|
||||
"\142\1\70\3\12\1\143\1\1\1\144\1\113\2\1\1\113\5\12\1\26\2\12\1\145\4\12\1"+
|
||||
"\37\1\12\1\146\2\1\1\64\1\12\1\147\1\46\2\12\1\150\1\12\1\76\1\113\2\1\1\12"+
|
||||
"\1\111\3\12\1\46\2\1\2\113\1\151\5\1\1\106\2\12\1\143\1\152\1\113\2\1\1\153"+
|
||||
"\1\12\1\154\1\41\2\12\1\37\1\1\2\12\1\143\1\1\1\155\1\41\1\12\1\147\6\1\1"+
|
||||
"\156\1\157\14\12\4\1\21\12\1\137\2\12\1\137\1\160\1\12\1\147\3\12\1\161\1"+
|
||||
"\162\1\163\1\123\1\162\7\1\1\164\1\1\1\123\6\1\1\165\1\166\1\167\1\170\1\171"+
|
||||
"\3\1\1\172\147\1\2\12\1\146\2\12\1\146\10\12\1\173\1\174\2\12\1\131\3\12\1"+
|
||||
"\175\1\1\1\12\1\111\4\176\4\1\1\104\35\1\1\177\2\1\1\200\1\24\4\12\1\201\1"+
|
||||
"\24\4\12\1\132\1\106\1\12\1\147\1\24\4\12\1\146\1\1\1\12\1\27\3\1\1\12\40"+
|
||||
"\1\133\12\1\37\4\1\135\12\1\37\2\1\10\12\1\123\4\1\2\12\1\147\20\12\1\123"+
|
||||
"\1\12\1\202\1\1\2\12\1\146\1\104\1\12\1\147\4\12\1\37\2\1\1\203\1\204\5\12"+
|
||||
"\1\205\1\12\1\147\1\26\3\1\1\203\1\206\1\12\1\30\1\1\3\12\1\143\1\204\2\12"+
|
||||
"\1\143\1\1\1\113\1\1\1\207\1\41\1\12\1\37\1\12\1\111\1\1\1\12\1\123\1\47\2"+
|
||||
"\12\1\30\1\104\1\113\1\210\1\211\2\12\1\45\1\1\1\212\1\113\1\12\1\213\3\12"+
|
||||
"\1\214\1\215\1\216\1\27\1\65\1\217\1\220\1\176\2\12\1\132\1\37\7\12\1\30\1"+
|
||||
"\113\72\12\1\143\1\12\1\221\2\12\1\150\20\1\26\12\1\147\6\12\1\76\2\1\1\111"+
|
||||
"\1\222\1\55\1\223\1\224\6\12\1\15\1\1\1\153\25\12\1\147\1\1\4\12\1\204\2\12"+
|
||||
"\1\26\2\1\1\150\7\1\1\210\7\12\1\123\1\1\1\113\1\24\1\27\1\24\1\27\1\225\4"+
|
||||
"\12\1\146\1\226\1\227\2\1\1\230\1\12\1\13\1\231\2\147\2\1\7\12\1\27\30\1\1"+
|
||||
"\12\1\123\3\12\1\70\2\1\2\12\1\1\1\12\1\232\2\12\1\37\1\12\1\147\2\12\1\233"+
|
||||
"\3\1\11\12\1\147\1\113\5\1\2\12\1\26\3\12\1\143\11\1\23\12\1\111\1\12\1\37"+
|
||||
"\1\26\11\1\1\234\2\12\1\235\1\12\1\37\1\12\1\111\1\12\1\146\4\1\1\12\1\236"+
|
||||
"\1\12\1\37\1\12\1\76\4\1\3\12\1\237\4\1\1\70\1\240\1\12\1\143\2\1\1\12\1\123"+
|
||||
"\1\12\1\123\2\1\1\122\1\12\1\46\1\1\3\12\1\37\1\12\1\37\1\12\1\30\1\12\1\15"+
|
||||
"\6\1\4\12\1\45\3\1\3\12\1\30\3\12\1\30\60\1\1\153\2\12\1\26\2\1\1\64\1\1\1"+
|
||||
"\153\2\12\2\1\1\12\1\45\1\113\1\153\1\12\1\111\1\64\1\1\2\12\1\241\1\153\2"+
|
||||
"\12\1\30\1\242\1\243\2\1\1\12\1\21\1\150\5\1\1\244\1\245\1\45\2\12\1\146\1"+
|
||||
"\1\1\113\1\72\1\54\1\55\1\67\1\1\1\246\1\15\21\1\3\12\1\1\1\247\1\113\12\1"+
|
||||
"\2\12\1\146\2\1\1\250\2\1\3\12\1\1\1\251\1\113\2\1\2\12\1\27\1\1\1\113\3\1"+
|
||||
"\1\12\1\76\1\1\1\113\26\1\4\12\1\113\1\104\34\1\3\12\1\45\20\1\71\12\1\76"+
|
||||
"\16\1\14\12\1\143\53\1\2\12\1\146\75\1\44\12\1\111\33\1\43\12\1\45\1\12\1"+
|
||||
"\146\1\113\6\1\1\12\1\147\1\1\3\12\1\1\1\143\1\113\1\153\1\252\1\12\67\1\4"+
|
||||
"\12\1\46\1\70\3\1\1\153\6\1\1\15\77\1\6\12\1\27\1\123\1\45\1\76\66\1\5\12"+
|
||||
"\1\210\3\12\1\142\1\253\1\254\1\255\3\12\1\256\1\257\1\12\1\260\1\261\1\35"+
|
||||
"\24\12\1\262\1\12\1\35\1\132\1\12\1\132\1\12\1\210\1\12\1\210\1\146\1\12\1"+
|
||||
"\146\1\12\1\55\1\12\1\55\1\12\1\263\3\264\14\12\1\46\123\1\1\255\1\12\1\265"+
|
||||
"\1\266\1\267\1\270\1\271\1\272\1\273\1\150\1\274\1\150\24\1\55\12\1\111\2"+
|
||||
"\1\103\12\1\46\15\12\1\147\150\12\1\15\25\1\41\12\1\147\36\1");
|
||||
|
||||
/* The ZZ_CMAP_A table has 3024 entries */
|
||||
static final char ZZ_CMAP_A[] = zzUnpackCMap(
|
||||
"\10\0\2\61\1\76\1\0\1\61\1\76\22\0\1\14\1\74\1\0\1\75\1\16\1\0\1\72\1\64\1"+
|
||||
"\2\1\3\1\20\1\21\1\56\1\13\1\1\1\0\1\53\3\55\4\54\2\47\1\70\1\0\1\63\1\71"+
|
||||
"\1\73\1\17\1\0\2\30\1\37\1\35\1\45\1\46\1\31\1\57\1\40\2\66\1\44\1\67\1\60"+
|
||||
"\1\66\1\42\1\50\1\65\1\34\1\66\1\43\3\33\1\66\1\32\1\6\1\10\1\7\1\23\1\12"+
|
||||
"\1\0\1\25\1\26\1\36\1\35\2\25\1\27\1\57\1\40\1\66\1\62\1\43\1\66\1\24\1\66"+
|
||||
"\1\41\1\66\1\24\1\33\1\24\1\52\2\33\1\51\1\66\1\31\1\4\1\22\1\5\14\0\1\11"+
|
||||
"\12\0\1\11\4\0\1\11\5\0\27\11\1\0\12\11\4\0\14\11\16\0\5\11\7\0\1\11\1\0\1"+
|
||||
"\11\1\0\5\11\1\0\2\11\2\0\4\11\1\0\1\11\6\0\1\11\1\0\3\11\1\0\1\11\1\0\4\11"+
|
||||
"\1\0\23\11\1\0\13\11\10\0\6\11\1\0\26\11\2\0\1\11\6\0\10\11\10\0\13\11\5\0"+
|
||||
"\3\11\15\0\12\15\4\0\6\11\1\0\1\11\17\0\2\11\7\0\2\11\12\15\3\11\2\0\2\11"+
|
||||
"\1\0\16\11\15\0\11\11\13\0\1\11\16\0\12\15\6\11\4\0\2\11\4\0\1\11\5\0\6\11"+
|
||||
"\4\0\1\11\11\0\1\11\3\0\1\11\7\0\11\11\7\0\5\11\17\0\26\11\3\0\1\11\2\0\1"+
|
||||
"\11\7\0\12\11\4\0\12\15\1\11\4\0\10\11\2\0\2\11\2\0\26\11\1\0\7\11\1\0\1\11"+
|
||||
"\3\0\4\11\3\0\1\11\20\0\1\11\15\0\2\11\1\0\1\11\5\0\6\11\4\0\2\11\1\0\2\11"+
|
||||
"\1\0\2\11\1\0\2\11\17\0\4\11\1\0\1\11\7\0\12\15\2\0\3\11\20\0\11\11\1\0\2"+
|
||||
"\11\1\0\2\11\1\0\5\11\3\0\1\11\2\0\1\11\30\0\1\11\13\0\10\11\2\0\1\11\3\0"+
|
||||
"\1\11\1\0\6\11\3\0\3\11\1\0\4\11\3\0\2\11\1\0\1\11\1\0\2\11\3\0\2\11\3\0\3"+
|
||||
"\11\3\0\14\11\13\0\10\11\1\0\2\11\10\0\3\11\5\0\4\11\1\0\5\11\3\0\1\11\3\0"+
|
||||
"\2\11\15\0\13\11\2\0\1\11\21\0\1\11\12\0\6\11\5\0\22\11\3\0\10\11\1\0\11\11"+
|
||||
"\1\0\1\11\2\0\7\11\11\0\1\11\1\0\2\11\14\0\12\15\7\0\2\11\1\0\1\11\2\0\2\11"+
|
||||
"\1\0\1\11\2\0\1\11\6\0\4\11\1\0\7\11\1\0\3\11\1\0\1\11\1\0\1\11\2\0\2\11\1"+
|
||||
"\0\4\11\1\0\2\11\11\0\1\11\2\0\5\11\1\0\1\11\11\0\12\15\2\0\14\11\1\0\24\11"+
|
||||
"\13\0\5\11\3\0\6\11\4\0\4\11\3\0\1\11\3\0\2\11\7\0\3\11\4\0\15\11\14\0\1\11"+
|
||||
"\1\0\6\11\1\0\1\11\5\0\1\11\2\0\13\11\1\0\15\11\1\0\4\11\2\0\7\11\1\0\1\11"+
|
||||
"\1\0\4\11\2\0\1\11\1\0\4\11\2\0\7\11\1\0\1\11\1\0\4\11\2\0\16\11\2\0\6\11"+
|
||||
"\2\0\15\11\2\0\1\11\1\0\10\11\7\0\15\11\1\0\6\11\23\0\1\11\4\0\1\11\3\0\11"+
|
||||
"\11\1\0\1\11\5\0\17\11\1\0\16\11\2\0\14\11\13\0\1\11\15\0\7\11\7\0\16\11\15"+
|
||||
"\0\2\11\12\15\3\0\3\11\11\0\4\11\1\0\4\11\3\0\2\11\11\0\10\11\1\0\1\11\1\0"+
|
||||
"\1\11\1\0\1\11\1\0\6\11\1\0\7\11\1\0\1\11\3\0\3\11\1\0\7\11\3\0\4\11\2\0\6"+
|
||||
"\11\5\0\1\11\15\0\1\11\2\0\1\11\4\0\1\11\2\0\12\11\1\0\1\11\3\0\5\11\6\0\1"+
|
||||
"\11\1\0\1\11\1\0\1\11\1\0\4\11\1\0\13\11\2\0\4\11\5\0\5\11\4\0\1\11\4\0\2"+
|
||||
"\11\13\0\5\11\6\0\4\11\3\0\2\11\14\0\10\11\7\0\10\11\1\0\7\11\6\0\2\11\12"+
|
||||
"\0\5\11\5\0\2\11\3\0\7\11\6\0\3\11\12\15\2\11\13\0\11\11\2\0\27\11\2\0\7\11"+
|
||||
"\1\0\3\11\1\0\4\11\1\0\4\11\2\0\6\11\3\0\1\11\1\0\1\11\2\0\5\11\1\0\12\11"+
|
||||
"\12\15\5\11\1\0\3\11\1\0\10\11\4\0\7\11\3\0\1\11\3\0\2\11\1\0\1\11\3\0\2\11"+
|
||||
"\2\0\5\11\2\0\1\11\1\0\1\11\30\0\3\11\3\0\6\11\2\0\6\11\2\0\6\11\11\0\7\11"+
|
||||
"\4\0\5\11\3\0\5\11\5\0\1\11\1\0\10\11\1\0\5\11\1\0\1\11\1\0\2\11\1\0\2\11"+
|
||||
"\1\0\12\11\6\0\12\11\2\0\6\11\2\0\6\11\2\0\6\11\2\0\3\11\3\0\14\11\1\0\16"+
|
||||
"\11\1\0\2\11\1\0\2\11\1\0\10\11\6\0\4\11\4\0\16\11\2\0\1\11\1\0\14\11\1\0"+
|
||||
"\2\11\3\0\1\11\2\0\4\11\1\0\2\11\12\0\10\11\6\0\6\11\1\0\3\11\1\0\12\11\3"+
|
||||
"\0\1\11\12\0\4\11\13\0\12\15\1\11\1\0\1\11\3\0\7\11\1\0\1\11\1\0\4\11\1\0"+
|
||||
"\17\11\1\0\2\11\14\0\3\11\4\0\2\11\1\0\1\11\20\0\4\11\10\0\1\11\13\0\10\11"+
|
||||
"\5\0\3\11\2\0\1\11\2\0\2\11\2\0\4\11\1\0\14\11\1\0\1\11\1\0\7\11\1\0\21\11"+
|
||||
"\1\0\4\11\2\0\10\11\1\0\7\11\1\0\14\11\1\0\4\11\1\0\5\11\1\0\1\11\3\0\14\11"+
|
||||
"\2\0\13\11\1\0\10\11\2\0\22\15\1\0\2\11\1\0\1\11\2\0\1\11\1\0\12\11\1\0\4"+
|
||||
"\11\1\0\1\11\1\0\1\11\6\0\1\11\4\0\1\11\1\0\1\11\1\0\1\11\1\0\3\11\1\0\2\11"+
|
||||
"\1\0\1\11\2\0\1\11\1\0\1\11\1\0\1\11\1\0\1\11\1\0\1\11\1\0\2\11\1\0\1\11\2"+
|
||||
"\0\4\11\1\0\7\11\1\0\4\11\1\0\4\11\1\0\1\11\1\0\12\11\1\0\5\11\1\0\3\11\1"+
|
||||
"\0\5\11\1\0\5\11");
|
||||
/**
|
||||
* Translates characters to character classes
|
||||
*/
|
||||
private static final int ZZ_SX = 0x0700;
|
||||
private static final int ZZ_MX = 0x10000;
|
||||
private static final int ZZ_LX = 0x110000;
|
||||
private static char [] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED, ZZ_SX);
|
||||
private static class M { static final char [] MAP = zzUnpackCMap(ZZ_CMAP_PACKED, ZZ_MX); }
|
||||
private static class L { static final char [] MAP = zzUnpackCMap(ZZ_CMAP_PACKED, ZZ_LX); }
|
||||
|
||||
/**
|
||||
* Translates DFA states to action switch labels.
|
||||
@@ -577,18 +596,14 @@ class _RegExLexer implements FlexLexer {
|
||||
* @param packed the packed character translation table
|
||||
* @return the unpacked character translation table
|
||||
*/
|
||||
private static char [] zzUnpackCMap(String packed) {
|
||||
int size = 0;
|
||||
for (int i = 0, length = packed.length(); i < length; i += 2) {
|
||||
size += packed.charAt(i);
|
||||
}
|
||||
char[] map = new char[size];
|
||||
private static char [] zzUnpackCMap(String packed, int limit) {
|
||||
char [] map = new char[limit];
|
||||
int i = 0; /* index in packed string */
|
||||
int j = 0; /* index in unpacked array */
|
||||
while (i < packed.length()) {
|
||||
while (i < 2590 && j < limit) {
|
||||
int count = packed.charAt(i++);
|
||||
char value = packed.charAt(i++);
|
||||
do map[j++] = value; while (--count > 0);
|
||||
do map[j++] = value; while (--count > 0 && j < limit);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
@@ -731,6 +746,7 @@ class _RegExLexer implements FlexLexer {
|
||||
int zzMarkedPosL;
|
||||
int zzEndReadL = zzEndRead;
|
||||
CharSequence zzBufferL = zzBuffer;
|
||||
char [] zzCMapL = ZZ_CMAP;
|
||||
|
||||
int [] zzTransL = ZZ_TRANS;
|
||||
int [] zzRowMapL = ZZ_ROWMAP;
|
||||
@@ -782,7 +798,8 @@ class _RegExLexer implements FlexLexer {
|
||||
zzCurrentPosL += Character.charCount(zzInput);
|
||||
}
|
||||
}
|
||||
int zzNext = zzTransL[ zzRowMapL[zzState] + ZZ_CMAP(zzInput) ];
|
||||
if (zzInput >= zzCMapL.length) ZZ_CMAP = zzCMapL = zzInput >= ZZ_MX ? L.MAP : M.MAP;
|
||||
int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ];
|
||||
if (zzNext == -1) break zzForAction;
|
||||
zzState = zzNext;
|
||||
|
||||
@@ -1141,7 +1158,7 @@ class _RegExLexer implements FlexLexer {
|
||||
}
|
||||
case 183: break;
|
||||
case 72:
|
||||
{ yypushstate(CLASS2); return RegExpTT.ESC_CHARACTER;
|
||||
{ yybegin(CLASS2); return RegExpTT.ESC_CHARACTER;
|
||||
}
|
||||
case 184: break;
|
||||
case 73:
|
||||
|
||||
@@ -322,7 +322,7 @@ HEX_CHAR=[0-9a-fA-F]
|
||||
}
|
||||
|
||||
<CLASS1> {
|
||||
{ESCAPE} "^" { yypushstate(CLASS2); return RegExpTT.ESC_CHARACTER; }
|
||||
{ESCAPE} "^" { yybegin(CLASS2); return RegExpTT.ESC_CHARACTER; }
|
||||
{ESCAPE} "Q" { yypushstate(QUOTED_CLASS1); return RegExpTT.QUOTE_BEGIN; }
|
||||
{ESCAPE} {RBRACKET} { yybegin(CLASS2); return allowEmptyCharacterClass ? RegExpTT.ESC_CHARACTER : RegExpTT.REDUNDANT_ESCAPE; }
|
||||
{RBRACKET} { if (allowEmptyCharacterClass) { yypopstate(); return RegExpTT.CLASS_END; } yybegin(CLASS2); return RegExpTT.CHARACTER; }
|
||||
|
||||
@@ -157,6 +157,7 @@ public class RegExpParsingTest extends ParsingTestCase {
|
||||
public void testCharClasses69() throws IOException { doCodeTest("\\p{^L}"); }
|
||||
public void testCharClasses70() throws IOException { doCodeTest("[&&&&a]"); }
|
||||
public void testCharClasses71() throws IOException { doCodeTest("[a-\\Qz\\E]"); }
|
||||
public void testCharClasses72() throws IOException { doCodeTest("([\\^])"); }
|
||||
|
||||
public void testGroups1() throws IOException { doCodeTest("()ef"); }
|
||||
public void testGroups2() throws IOException { doCodeTest("()*"); }
|
||||
|
||||
13
RegExpSupport/testData/psi/CharClasses72.txt
Normal file
13
RegExpSupport/testData/psi/CharClasses72.txt
Normal file
@@ -0,0 +1,13 @@
|
||||
REGEXP_FILE
|
||||
RegExpPatternImpl: <([\^])>
|
||||
RegExpBranchImpl: <([\^])>
|
||||
RegExpGroupImpl: <([\^])>
|
||||
PsiElement(GROUP_BEGIN)('(')
|
||||
RegExpPatternImpl: <[\^]>
|
||||
RegExpBranchImpl: <[\^]>
|
||||
RegExpClassImpl: <[\^]>
|
||||
PsiElement(CLASS_BEGIN)('[')
|
||||
RegExpCharImpl: <\^>
|
||||
PsiElement(ESC_CHARACTER)('\^')
|
||||
PsiElement(CLASS_END)(']')
|
||||
PsiElement(GROUP_END)(')')
|
||||
Reference in New Issue
Block a user