diff --git a/RegExpSupport/gen/org/intellij/lang/regexp/_RegExLexer.java b/RegExpSupport/gen/org/intellij/lang/regexp/_RegExLexer.java
index 490aa24913ab..79a6cf7a80ac 100644
--- a/RegExpSupport/gen/org/intellij/lang/regexp/_RegExLexer.java
+++ b/RegExpSupport/gen/org/intellij/lang/regexp/_RegExLexer.java
@@ -9,16 +9,16 @@ import com.intellij.lexer.FlexLexer;
import com.intellij.psi.StringEscapesTokenTypes;
import com.intellij.psi.tree.IElementType;
+import com.intellij.util.containers.IntArrayList;
import java.util.EnumSet;
-import static java.lang.Boolean.FALSE;
-import static java.lang.Boolean.TRUE;
+import static java.lang.Boolean.*;
import static org.intellij.lang.regexp.RegExpCapability.*;
@SuppressWarnings("ALL")
/**
- * This class is a scanner generated by
+ * This class is a scanner generated by
* JFlex 1.7.0
* from the specification file regexp-lexer.flex
*/
@@ -59,13 +59,13 @@ class _RegExLexer implements FlexLexer {
* at the beginning of a line
* l is of the form l = 2*k, k a non negative integer
*/
- private static final int ZZ_LEXSTATE[] = {
- 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7,
- 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15,
+ private static final int ZZ_LEXSTATE[] = {
+ 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7,
+ 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15,
16, 16, 17, 17, 18, 18, 19, 19, 20, 20
};
- /**
+ /**
* Translates characters to character classes
* Chosen bits are [11, 6, 4]
* Total runtime size is 14272 bytes
@@ -194,7 +194,7 @@ class _RegExLexer implements FlexLexer {
"\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 DFA states to action switch labels.
*/
private static final int [] ZZ_ACTION = zzUnpackAction();
@@ -208,22 +208,22 @@ class _RegExLexer implements FlexLexer {
"\1\43\1\44\1\2\1\45\1\46\1\24\1\47\1\50"+
"\1\51\1\52\1\53\1\54\1\26\1\55\1\56\1\57"+
"\1\60\3\57\1\26\1\57\1\26\1\57\1\61\1\62"+
- "\3\0\1\63\1\64\1\65\1\66\1\67\1\70\1\71"+
- "\1\72\1\73\1\12\1\73\1\74\2\75\1\76\1\77"+
- "\1\12\1\100\1\101\1\102\1\103\1\104\1\105\1\106"+
- "\1\12\1\107\1\110\1\111\1\112\1\113\1\114\1\115"+
- "\1\116\1\117\1\120\1\121\1\122\1\12\1\123\1\124"+
- "\1\0\1\125\2\26\1\126\2\61\1\127\1\130\1\0"+
- "\1\131\1\132\1\133\1\134\1\135\1\0\1\136\1\137"+
- "\1\140\1\141\2\0\1\142\6\0\1\143\1\144\1\145"+
- "\1\146\2\147\1\101\1\150\1\151\1\152\1\153\1\154"+
- "\1\155\1\156\1\157\1\160\1\161\1\162\1\163\1\0"+
- "\1\164\1\165\1\166\1\0\1\167\1\0\1\170\4\0"+
- "\1\143\2\147\1\101\1\171\1\153\1\172\1\173\1\174"+
- "\1\143\1\0\1\175\1\153\1\0\1\176";
+ "\3\0\1\63\1\64\1\65\1\66\1\67\1\66\1\70"+
+ "\1\71\1\72\1\73\1\12\1\73\1\74\2\75\1\76"+
+ "\1\77\1\12\1\100\1\101\1\102\1\103\1\104\1\105"+
+ "\1\106\1\12\1\107\1\110\1\111\1\112\1\113\1\114"+
+ "\1\115\1\116\1\117\1\120\1\121\1\122\1\12\1\123"+
+ "\1\124\1\0\1\125\2\26\1\126\2\61\1\127\1\130"+
+ "\1\0\1\131\1\132\1\133\1\134\1\135\1\0\1\136"+
+ "\1\137\1\140\1\141\2\0\1\142\6\0\1\143\1\144"+
+ "\1\145\1\146\2\147\1\101\1\150\1\151\1\152\1\153"+
+ "\1\154\1\155\1\156\1\157\1\160\1\161\1\162\1\163"+
+ "\1\0\1\164\1\165\1\166\1\0\1\167\1\0\1\170"+
+ "\4\0\1\143\2\147\1\101\1\171\1\153\1\172\1\173"+
+ "\1\174\1\143\1\0\1\175\1\153\1\0\1\176";
private static int [] zzUnpackAction() {
- int [] result = new int[203];
+ int [] result = new int[204];
int offset = 0;
offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
return result;
@@ -242,7 +242,7 @@ class _RegExLexer implements FlexLexer {
}
- /**
+ /**
* Translates a state to a row index in the transition table
*/
private static final int [] ZZ_ROWMAP = zzUnpackRowMap();
@@ -260,23 +260,23 @@ class _RegExLexer implements FlexLexer {
"\0\u052b\0\u052b\0\u052b\0\u052b\0\u0999\0\u09d8\0\u0a17\0\u0a56"+
"\0\u0a95\0\u0ad4\0\u0b13\0\u0b52\0\u0b91\0\u0bd0\0\u0c0f\0\u0c4e"+
"\0\u052b\0\u052b\0\u052b\0\u0c8d\0\u052b\0\u052b\0\u052b\0\u052b"+
- "\0\u0ccc\0\u0d0b\0\u052b\0\u052b\0\u0d4a\0\u052b\0\u052b\0\u052b"+
- "\0\u052b\0\u0d89\0\u0dc8\0\u052b\0\u0e07\0\u0e46\0\u052b\0\u052b"+
- "\0\u0e85\0\u052b\0\u052b\0\u052b\0\u052b\0\u052b\0\u052b\0\u052b"+
- "\0\u052b\0\u052b\0\u052b\0\u052b\0\u052b\0\u0ec4\0\u052b\0\u052b"+
- "\0\u0f03\0\u052b\0\u0f42\0\u052b\0\u052b\0\u052b\0\u0f81\0\u052b"+
- "\0\u052b\0\u0fc0\0\u0fff\0\u052b\0\u052b\0\u052b\0\u052b\0\u103e"+
- "\0\u052b\0\u052b\0\u052b\0\u052b\0\u107d\0\u10bc\0\u052b\0\u10fb"+
- "\0\u113a\0\u1179\0\u11b8\0\u11f7\0\u1236\0\u1275\0\u052b\0\u052b"+
- "\0\u052b\0\u12b4\0\u12f3\0\u1332\0\u052b\0\u1371\0\u052b\0\u13b0"+
- "\0\u052b\0\u052b\0\u052b\0\u052b\0\u052b\0\u052b\0\u052b\0\u052b"+
- "\0\u13ef\0\u052b\0\u052b\0\u052b\0\u142e\0\u052b\0\u146d\0\u052b"+
- "\0\u14ac\0\u14eb\0\u152a\0\u1569\0\u15a8\0\u15e7\0\u052b\0\u052b"+
- "\0\u052b\0\u1626\0\u052b\0\u052b\0\u052b\0\u052b\0\u1665\0\u052b"+
- "\0\u16a4\0\u16e3\0\u052b";
+ "\0\u052b\0\u0ccc\0\u0d0b\0\u052b\0\u052b\0\u0d4a\0\u052b\0\u052b"+
+ "\0\u052b\0\u052b\0\u0d89\0\u0dc8\0\u052b\0\u0e07\0\u0e46\0\u052b"+
+ "\0\u052b\0\u0e85\0\u052b\0\u052b\0\u052b\0\u052b\0\u052b\0\u052b"+
+ "\0\u052b\0\u052b\0\u052b\0\u052b\0\u052b\0\u052b\0\u0ec4\0\u052b"+
+ "\0\u052b\0\u0f03\0\u052b\0\u0f42\0\u052b\0\u052b\0\u052b\0\u0f81"+
+ "\0\u052b\0\u052b\0\u0fc0\0\u0fff\0\u052b\0\u052b\0\u052b\0\u052b"+
+ "\0\u103e\0\u052b\0\u052b\0\u052b\0\u052b\0\u107d\0\u10bc\0\u052b"+
+ "\0\u10fb\0\u113a\0\u1179\0\u11b8\0\u11f7\0\u1236\0\u1275\0\u052b"+
+ "\0\u052b\0\u052b\0\u12b4\0\u12f3\0\u1332\0\u052b\0\u1371\0\u052b"+
+ "\0\u13b0\0\u052b\0\u052b\0\u052b\0\u052b\0\u052b\0\u052b\0\u052b"+
+ "\0\u052b\0\u13ef\0\u052b\0\u052b\0\u052b\0\u142e\0\u052b\0\u146d"+
+ "\0\u052b\0\u14ac\0\u14eb\0\u152a\0\u1569\0\u15a8\0\u15e7\0\u052b"+
+ "\0\u052b\0\u052b\0\u1626\0\u052b\0\u052b\0\u052b\0\u052b\0\u1665"+
+ "\0\u052b\0\u16a4\0\u16e3\0\u052b";
private static int [] zzUnpackRowMap() {
- int [] result = new int[203];
+ int [] result = new int[204];
int offset = 0;
offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
return result;
@@ -293,7 +293,7 @@ class _RegExLexer implements FlexLexer {
return j;
}
- /**
+ /**
* The transition table of the DFA
*/
private static final int [] ZZ_TRANS = zzUnpackTrans();
@@ -334,77 +334,77 @@ class _RegExLexer implements FlexLexer {
"\2\122\1\121\1\122\2\121\2\122\1\123\3\121\1\122"+
"\3\121\4\0\1\124\210\0\1\125\67\0\1\126\4\0"+
"\1\127\31\0\2\127\3\0\2\127\1\130\43\0\1\131"+
- "\53\0\1\132\3\133\1\134\1\135\1\133\1\132\1\133"+
- "\2\132\1\136\1\137\1\132\6\133\2\140\1\141\1\142"+
- "\3\143\3\144\1\145\2\146\2\147\3\150\1\151\1\152"+
- "\1\153\1\154\1\155\1\156\2\153\1\132\1\157\1\160"+
- "\1\137\1\161\2\132\1\144\1\151\3\132\1\162\1\151"+
- "\2\132\1\137\45\0\1\163\33\0\2\53\5\0\5\53"+
+ "\53\0\1\132\3\133\1\134\1\135\1\133\1\136\1\133"+
+ "\2\132\1\137\1\140\1\132\6\133\2\141\1\142\1\143"+
+ "\3\144\3\145\1\146\2\147\2\150\3\151\1\152\1\153"+
+ "\1\154\1\155\1\156\1\157\2\154\1\132\1\160\1\161"+
+ "\1\140\1\162\2\132\1\145\1\152\3\132\1\163\1\152"+
+ "\2\132\1\140\45\0\1\164\33\0\2\53\5\0\5\53"+
"\6\0\32\53\1\0\2\53\1\0\1\53\2\0\2\53"+
"\4\0\1\53\20\0\1\55\31\0\2\55\3\0\2\55"+
- "\26\0\1\164\72\0\1\165\21\0\1\166\43\0\1\165"+
- "\1\167\15\0\1\170\13\0\1\171\25\0\1\172\26\0"+
- "\1\173\21\0\1\174\43\0\2\173\6\0\6\132\3\133"+
- "\2\132\1\136\1\175\7\132\3\140\1\176\3\151\3\144"+
- "\1\145\2\146\2\147\3\150\1\151\1\152\1\153\1\154"+
- "\1\155\1\156\2\153\1\132\1\157\1\160\1\175\1\151"+
- "\2\132\2\151\3\132\1\162\1\151\2\132\1\175\71\0"+
- "\1\177\5\0\6\132\1\133\1\132\1\133\2\132\1\136"+
- "\10\132\2\140\1\151\1\176\3\151\3\144\1\145\2\146"+
- "\2\147\3\150\1\151\1\152\1\153\1\154\1\155\1\156"+
- "\2\153\1\132\1\157\1\160\1\132\1\151\2\132\2\151"+
- "\3\132\1\162\1\151\3\132\11\0\1\105\12\0\23\105"+
+ "\26\0\1\165\72\0\1\166\21\0\1\167\43\0\1\166"+
+ "\1\170\15\0\1\171\13\0\1\172\25\0\1\173\26\0"+
+ "\1\174\21\0\1\175\43\0\2\174\6\0\6\132\3\133"+
+ "\2\132\1\137\1\176\7\132\3\141\1\177\3\152\3\145"+
+ "\1\146\2\147\2\150\3\151\1\152\1\153\1\154\1\155"+
+ "\1\156\1\157\2\154\1\132\1\160\1\161\1\176\1\152"+
+ "\2\132\2\152\3\132\1\163\1\152\2\132\1\176\71\0"+
+ "\1\200\5\0\6\132\1\133\1\132\1\133\2\132\1\137"+
+ "\10\132\2\141\1\152\1\177\3\152\3\145\1\146\2\147"+
+ "\2\150\3\151\1\152\1\153\1\154\1\155\1\156\1\157"+
+ "\2\154\1\132\1\160\1\161\1\132\1\152\2\132\2\152"+
+ "\3\132\1\163\1\152\3\132\11\0\1\105\12\0\23\105"+
"\2\0\3\105\3\0\2\105\1\0\1\105\2\0\2\105"+
"\4\0\1\105\14\0\1\106\12\0\23\106\2\0\3\106"+
"\3\0\2\106\1\0\1\106\2\0\2\106\4\0\1\106"+
"\13\0\7\110\5\0\32\110\1\0\2\110\1\0\1\110"+
- "\2\0\2\110\4\0\1\110\12\0\1\200\70\0\1\201"+
- "\76\0\1\201\5\0\1\202\70\0\1\201\7\0\1\203"+
- "\1\0\1\203\1\0\1\204\6\0\23\203\2\204\3\203"+
- "\2\204\1\0\2\203\1\0\1\203\2\0\2\203\4\0"+
- "\1\203\72\0\1\201\11\0\2\53\5\0\5\53\6\0"+
- "\32\53\1\0\2\53\1\0\1\53\2\0\2\53\1\201"+
- "\3\0\1\53\12\0\1\205\57\0\1\201\14\0\1\206"+
- "\17\0\2\207\1\0\1\207\4\0\3\207\5\0\4\207"+
- "\3\0\2\207\23\0\1\210\17\0\1\211\17\0\1\212"+
- "\20\0\1\213\1\214\2\0\1\215\1\216\1\217\1\220"+
- "\1\0\1\221\1\222\6\0\1\223\76\0\1\224\2\0"+
- "\1\225\4\0\1\127\31\0\2\127\3\0\2\127\1\226"+
- "\25\0\1\227\2\0\1\230\4\0\1\231\31\0\2\231"+
- "\3\0\2\231\36\0\1\232\31\0\2\232\3\0\2\232"+
- "\1\233\24\0\1\234\76\0\1\235\43\0\1\236\3\0"+
- "\2\236\5\0\1\237\1\240\12\0\77\241\47\0\1\242"+
- "\4\0\1\243\1\242\70\0\2\244\3\0\2\244\25\0"+
- "\1\245\20\0\2\246\1\0\1\246\4\0\3\246\5\0"+
- "\4\246\3\0\2\246\25\0\1\247\20\0\2\250\1\0"+
- "\1\250\4\0\3\250\5\0\4\250\3\0\2\250\104\0"+
- "\1\251\1\252\16\0\1\235\43\0\1\236\3\0\2\236"+
- "\30\0\1\253\100\0\1\203\1\0\1\203\1\0\1\204"+
- "\6\0\23\203\2\204\3\203\2\204\1\0\2\203\1\0"+
- "\1\203\2\0\2\203\4\0\1\203\10\0\1\254\17\0"+
- "\2\207\1\0\1\207\4\0\3\207\5\0\4\207\3\0"+
- "\2\207\104\0\1\255\3\0\1\256\4\0\1\217\71\0"+
- "\1\257\5\0\1\260\1\0\3\261\1\0\73\261\5\0"+
- "\1\262\76\0\1\224\2\0\1\225\4\0\1\226\31\0"+
- "\2\226\3\0\2\226\26\0\1\263\76\0\1\264\2\0"+
- "\1\265\4\0\1\231\31\0\2\231\3\0\2\231\26\0"+
- "\1\266\7\0\1\232\31\0\2\232\3\0\2\232\1\267"+
- "\25\0\1\270\7\0\1\271\31\0\2\271\3\0\2\271"+
- "\50\0\1\272\62\0\1\273\34\0\1\274\3\0\2\274"+
- "\70\0\2\275\3\0\2\275\70\0\1\276\4\0\2\276"+
- "\70\0\1\277\4\0\2\277\70\0\2\300\3\0\2\300"+
- "\46\0\2\301\1\0\1\301\4\0\3\301\5\0\4\301"+
- "\3\0\2\301\46\0\2\302\1\0\1\302\4\0\3\302"+
- "\5\0\4\302\3\0\2\302\21\0\3\261\1\303\73\261"+
- "\5\0\1\304\76\0\1\266\7\0\1\267\31\0\2\267"+
- "\3\0\2\267\26\0\1\305\7\0\1\271\31\0\2\271"+
- "\3\0\2\271\26\0\1\143\141\0\1\274\3\0\2\274"+
- "\26\0\1\306\41\0\2\307\3\0\2\307\70\0\2\306"+
- "\3\0\2\306\70\0\1\310\4\0\2\310\46\0\2\311"+
- "\1\0\1\311\4\0\3\311\5\0\4\311\3\0\2\311"+
- "\26\0\1\306\41\0\2\312\3\0\2\312\46\0\2\313"+
- "\1\0\1\313\4\0\3\313\5\0\4\313\3\0\2\313"+
- "\26\0\1\306\71\0";
+ "\2\0\2\110\4\0\1\110\12\0\1\201\70\0\1\202"+
+ "\76\0\1\202\5\0\1\203\70\0\1\202\7\0\1\204"+
+ "\1\0\1\204\1\0\1\205\6\0\23\204\2\205\3\204"+
+ "\2\205\1\0\2\204\1\0\1\204\2\0\2\204\4\0"+
+ "\1\204\72\0\1\202\11\0\2\53\5\0\5\53\6\0"+
+ "\32\53\1\0\2\53\1\0\1\53\2\0\2\53\1\202"+
+ "\3\0\1\53\12\0\1\206\57\0\1\202\14\0\1\207"+
+ "\17\0\2\210\1\0\1\210\4\0\3\210\5\0\4\210"+
+ "\3\0\2\210\23\0\1\211\17\0\1\212\17\0\1\213"+
+ "\20\0\1\214\1\215\2\0\1\216\1\217\1\220\1\221"+
+ "\1\0\1\222\1\223\6\0\1\224\76\0\1\225\2\0"+
+ "\1\226\4\0\1\127\31\0\2\127\3\0\2\127\1\227"+
+ "\25\0\1\230\2\0\1\231\4\0\1\232\31\0\2\232"+
+ "\3\0\2\232\36\0\1\233\31\0\2\233\3\0\2\233"+
+ "\1\234\24\0\1\235\76\0\1\236\43\0\1\237\3\0"+
+ "\2\237\5\0\1\240\1\241\12\0\77\242\47\0\1\243"+
+ "\4\0\1\244\1\243\70\0\2\245\3\0\2\245\25\0"+
+ "\1\246\20\0\2\247\1\0\1\247\4\0\3\247\5\0"+
+ "\4\247\3\0\2\247\25\0\1\250\20\0\2\251\1\0"+
+ "\1\251\4\0\3\251\5\0\4\251\3\0\2\251\104\0"+
+ "\1\252\1\253\16\0\1\236\43\0\1\237\3\0\2\237"+
+ "\30\0\1\254\100\0\1\204\1\0\1\204\1\0\1\205"+
+ "\6\0\23\204\2\205\3\204\2\205\1\0\2\204\1\0"+
+ "\1\204\2\0\2\204\4\0\1\204\10\0\1\255\17\0"+
+ "\2\210\1\0\1\210\4\0\3\210\5\0\4\210\3\0"+
+ "\2\210\104\0\1\256\3\0\1\257\4\0\1\220\71\0"+
+ "\1\260\5\0\1\261\1\0\3\262\1\0\73\262\5\0"+
+ "\1\263\76\0\1\225\2\0\1\226\4\0\1\227\31\0"+
+ "\2\227\3\0\2\227\26\0\1\264\76\0\1\265\2\0"+
+ "\1\266\4\0\1\232\31\0\2\232\3\0\2\232\26\0"+
+ "\1\267\7\0\1\233\31\0\2\233\3\0\2\233\1\270"+
+ "\25\0\1\271\7\0\1\272\31\0\2\272\3\0\2\272"+
+ "\50\0\1\273\62\0\1\274\34\0\1\275\3\0\2\275"+
+ "\70\0\2\276\3\0\2\276\70\0\1\277\4\0\2\277"+
+ "\70\0\1\300\4\0\2\300\70\0\2\301\3\0\2\301"+
+ "\46\0\2\302\1\0\1\302\4\0\3\302\5\0\4\302"+
+ "\3\0\2\302\46\0\2\303\1\0\1\303\4\0\3\303"+
+ "\5\0\4\303\3\0\2\303\21\0\3\262\1\304\73\262"+
+ "\5\0\1\305\76\0\1\267\7\0\1\270\31\0\2\270"+
+ "\3\0\2\270\26\0\1\306\7\0\1\272\31\0\2\272"+
+ "\3\0\2\272\26\0\1\144\141\0\1\275\3\0\2\275"+
+ "\26\0\1\307\41\0\2\310\3\0\2\310\70\0\2\307"+
+ "\3\0\2\307\70\0\1\311\4\0\2\311\46\0\2\312"+
+ "\1\0\1\312\4\0\3\312\5\0\4\312\3\0\2\312"+
+ "\26\0\1\307\41\0\2\313\3\0\2\313\46\0\2\314"+
+ "\1\0\1\314\4\0\3\314\5\0\4\314\3\0\2\314"+
+ "\26\0\1\307\71\0";
private static int [] zzUnpackTrans() {
int [] result = new int[5922];
@@ -450,7 +450,7 @@ class _RegExLexer implements FlexLexer {
"\1\1\1\11\1\0\2\11\1\1\1\11\1\1\1\11"+
"\1\1\1\11\1\1\1\11\1\1\3\11\1\1\2\11"+
"\1\1\3\11\2\1\1\11\1\1\4\11\11\1\3\0"+
- "\3\11\1\1\4\11\2\1\2\11\1\1\4\11\2\1"+
+ "\3\11\1\1\5\11\2\1\2\11\1\1\4\11\2\1"+
"\1\11\2\1\2\11\1\1\14\11\1\1\2\11\1\0"+
"\1\11\1\1\3\11\1\1\2\11\1\0\1\1\4\11"+
"\1\0\4\11\2\0\1\11\6\0\1\1\3\11\3\1"+
@@ -459,7 +459,7 @@ class _RegExLexer implements FlexLexer {
"\1\0\1\11\1\1\1\0\1\11";
private static int [] zzUnpackAttribute() {
- int [] result = new int[203];
+ int [] result = new int[204];
int offset = 0;
offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
return result;
@@ -516,7 +516,7 @@ class _RegExLexer implements FlexLexer {
/* user code: */
// This adds support for nested states. I'm no JFlex pro, so maybe this is overkill, but it works quite well.
- final it.unimi.dsi.fastutil.ints.IntArrayList states = new it.unimi.dsi.fastutil.ints.IntArrayList();
+ final IntArrayList states = new IntArrayList();
// This was an idea to use the regex implementation for XML schema regexes (which use a slightly different syntax)
// as well, but is currently unfinished as it requires to tweak more places than just the lexer.
@@ -608,7 +608,7 @@ class _RegExLexer implements FlexLexer {
}
- /**
+ /**
* Unpacks the compressed character translation table.
*
* @param packed the packed character translation table
@@ -842,330 +842,330 @@ class _RegExLexer implements FlexLexer {
}
else {
switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
- case 1:
+ case 1:
{ yypopstate(); return RegExpTT.COMMENT;
- }
+ }
// fall through
case 127: break;
- case 2:
+ case 2:
{ return RegExpTT.CHARACTER;
- }
+ }
// fall through
case 128: break;
- case 3:
+ case 3:
{ return RegExpTT.DOT;
- }
+ }
// fall through
case 129: break;
- case 4:
+ case 4:
{ capturingGroupCount++; return RegExpTT.GROUP_BEGIN;
- }
+ }
// fall through
case 130: break;
- case 5:
+ case 5:
{ return RegExpTT.GROUP_END;
- }
+ }
// fall through
case 131: break;
- case 6:
+ case 6:
{ if (allowDanglingMetacharacters != TRUE) { yypushstate(QUANTIFIER); return RegExpTT.LBRACE; } return RegExpTT.CHARACTER;
- }
+ }
// fall through
case 132: break;
- case 7:
+ case 7:
{ return (allowDanglingMetacharacters != FALSE) ? RegExpTT.CHARACTER : RegExpTT.RBRACE;
- }
+ }
// fall through
case 133: break;
- case 8:
+ case 8:
{ yypushstate(CLASS1); return RegExpTT.CLASS_BEGIN;
- }
+ }
// fall through
case 134: break;
- case 9:
+ case 9:
{ return allowDanglingMetacharacters == FALSE ? RegExpTT.CLASS_END : RegExpTT.CHARACTER;
- }
+ }
// fall through
case 135: break;
- case 10:
+ case 10:
{ return StringEscapesTokenTypes.INVALID_CHARACTER_ESCAPE_TOKEN;
- }
+ }
// fall through
case 136: break;
- case 11:
+ case 11:
{ return commentMode ? com.intellij.psi.TokenType.WHITE_SPACE : RegExpTT.CHARACTER;
- }
+ }
// fall through
case 137: break;
- case 12:
+ case 12:
{ return RegExpTT.DOLLAR;
- }
+ }
// fall through
case 138: break;
- case 13:
+ case 13:
{ return RegExpTT.QUEST;
- }
+ }
// fall through
case 139: break;
- case 14:
+ case 14:
{ return RegExpTT.STAR;
- }
+ }
// fall through
case 140: break;
- case 15:
+ case 15:
{ return RegExpTT.PLUS;
- }
+ }
// fall through
case 141: break;
- case 16:
+ case 16:
{ return RegExpTT.UNION;
- }
+ }
// fall through
case 142: break;
- case 17:
+ case 17:
{ return RegExpTT.CARET;
- }
+ }
// fall through
case 143: break;
- case 18:
+ case 18:
{ return commentMode ? com.intellij.psi.TokenType.WHITE_SPACE : RegExpTT.CTRL_CHARACTER;
- }
+ }
// fall through
case 144: break;
- case 19:
+ case 19:
{ if (commentMode) { yypushstate(COMMENT); } else return RegExpTT.CHARACTER;
- }
+ }
// fall through
case 145: break;
- case 20:
+ case 20:
{ yypopstate(); yypushback(1);
- }
+ }
// fall through
case 146: break;
- case 21:
+ case 21:
{ yypopstate(); return RegExpTT.RBRACE;
- }
+ }
// fall through
case 147: break;
- case 22:
+ case 22:
{ return RegExpTT.NAME;
- }
+ }
// fall through
case 148: break;
- case 23:
+ case 23:
{ return RegExpTT.EQ;
- }
+ }
// fall through
case 149: break;
- case 24:
+ case 24:
{ return RegExpTT.NUMBER;
- }
+ }
// fall through
case 150: break;
- case 25:
+ case 25:
{ return RegExpTT.COMMA;
- }
+ }
// fall through
case 151: break;
- case 26:
+ case 26:
{ yybegin(CLASS1); return RegExpTT.CARET;
- }
+ }
// fall through
case 152: break;
- case 27:
+ case 27:
{ states.set(states.size() - 1, CLASS2); return RegExpTT.CHARACTER;
- }
+ }
// fall through
case 153: break;
- case 28:
+ case 28:
{ yypushback(1); yybegin(CLASS2);
- }
+ }
// fall through
case 154: break;
- case 29:
+ case 29:
{ yybegin(CLASS2); if (allowNestedCharacterClasses) { yypushstate(CLASS1); return RegExpTT.CLASS_BEGIN; } return RegExpTT.CHARACTER;
- }
+ }
// fall through
case 155: break;
- case 30:
+ case 30:
{ if (allowEmptyCharacterClass) { yypopstate(); return RegExpTT.CLASS_END; } yybegin(CLASS2); return RegExpTT.CHARACTER;
- }
+ }
// fall through
case 156: break;
- case 31:
+ case 31:
{ if (commentMode && whitespaceInClass) return com.intellij.psi.TokenType.WHITE_SPACE; yypushback(1); yybegin(CLASS2);
- }
+ }
// fall through
case 157: break;
- case 32:
+ case 32:
{ if (allowNestedCharacterClasses) { yypushstate(CLASS1); return RegExpTT.CLASS_BEGIN; } return RegExpTT.CHARACTER;
- }
+ }
// fall through
case 158: break;
- case 33:
+ case 33:
{ yypopstate(); return RegExpTT.CLASS_END;
- }
+ }
// fall through
case 159: break;
- case 34:
+ case 34:
{ return RegExpTT.MINUS;
- }
+ }
// fall through
case 160: break;
- case 35:
+ case 35:
{ return (commentMode && whitespaceInClass) ? com.intellij.psi.TokenType.WHITE_SPACE : RegExpTT.CHARACTER;
- }
+ }
// fall through
case 161: break;
- case 36:
+ case 36:
{ return (commentMode && whitespaceInClass) ? com.intellij.psi.TokenType.WHITE_SPACE : RegExpTT.CTRL_CHARACTER;
- }
+ }
// fall through
case 162: break;
- case 37:
+ case 37:
{ if (commentMode && whitespaceInClass) yypushstate(COMMENT); else return RegExpTT.CHARACTER;
- }
+ }
// fall through
case 163: break;
- case 38:
+ case 38:
{ yypopstate(); yypushstate(EMBRACED); return RegExpTT.LBRACE;
- }
+ }
// fall through
case 164: break;
- case 39:
+ case 39:
{ yypopstate(); return RegExpTT.CATEGORY_SHORT_HAND;
- }
+ }
// fall through
case 165: break;
- case 40:
+ case 40:
{ yybegin(YYINITIAL); yypushback(1);
- }
+ }
// fall through
case 166: break;
- case 41:
+ case 41:
{ yybegin(YYINITIAL); return RegExpTT.GROUP_END;
- }
+ }
// fall through
case 167: break;
- case 42:
+ case 42:
{ handleOptions(); return RegExpTT.OPTIONS_ON;
- }
+ }
// fall through
case 168: break;
- case 43:
+ case 43:
{ handleOptions(); return RegExpTT.OPTIONS_OFF;
- }
+ }
// fall through
case 169: break;
- case 44:
+ case 44:
{ yybegin(YYINITIAL); return RegExpTT.COLON;
- }
+ }
// fall through
case 170: break;
- case 45:
+ case 45:
{ yybegin(YYINITIAL); return RegExpTT.GT;
- }
+ }
// fall through
case 171: break;
- case 46:
+ case 46:
{ yybegin(YYINITIAL); return RegExpTT.QUOTE;
- }
+ }
// fall through
case 172: break;
- case 47:
+ case 47:
{ return RegExpTT.BAD_CHARACTER;
- }
+ }
// fall through
case 173: break;
- case 48:
+ case 48:
{ return allowMysqlBracketExpressions ? RegExpTT.NAME : RegExpTT.BAD_CHARACTER;
- }
+ }
// fall through
case 174: break;
- case 49:
+ case 49:
{ yypopstate(); return (yycharat(-1) == 'u') ? StringEscapesTokenTypes.INVALID_UNICODE_ESCAPE_TOKEN : RegExpTT.BAD_HEX_VALUE;
- }
+ }
// fall through
case 175: break;
- case 50:
+ case 50:
{ yybegin(OPTIONS); return RegExpTT.SET_OPTIONS;
- }
+ }
// fall through
case 176: break;
- case 51:
+ case 51:
// lookahead expression with fixed base length
zzMarkedPos = Character.offsetByCodePoints
(zzBufferL/*, zzStartRead, zzEndRead - zzStartRead*/, zzStartRead, 1);
{ yypushstate(NEGATED_CLASS); return RegExpTT.CLASS_BEGIN;
- }
+ }
// fall through
case 177: break;
- case 52:
+ case 52:
{ return RegExpTT.REDUNDANT_ESCAPE;
- }
+ }
// fall through
case 178: break;
- case 53:
+ case 53:
{ return RegExpTT.ESC_CHARACTER;
- }
+ }
// fall through
case 179: break;
- case 54:
+ case 54:
{ return (allowDanglingMetacharacters != TRUE) ? RegExpTT.ESC_CHARACTER : RegExpTT.REDUNDANT_ESCAPE;
- }
+ }
// fall through
case 180: break;
- case 55:
+ case 55:
{ return (allowDanglingMetacharacters == FALSE) ? RegExpTT.ESC_CHARACTER : RegExpTT.REDUNDANT_ESCAPE;
- }
+ }
// fall through
case 181: break;
- case 56:
+ case 56:
{ return (yystate() == CLASS2) ? RegExpTT.ESC_CHARACTER : RegExpTT.REDUNDANT_ESCAPE;
- }
+ }
// fall through
case 182: break;
- case 57:
+ case 57:
{ return commentMode ? RegExpTT.ESC_CTRL_CHARACTER : RegExpTT.REDUNDANT_ESCAPE;
- }
+ }
// fall through
case 183: break;
- case 58:
+ case 58:
{ return RegExpTT.ESC_CTRL_CHARACTER;
- }
+ }
// fall through
case 184: break;
- case 59:
+ case 59:
{ return RegExpTT.BOUNDARY;
- }
+ }
// fall through
case 185: break;
- case 60:
+ case 60:
{ return RegExpTT.CHAR_CLASS;
- }
+ }
// fall through
case 186: break;
- case 61:
+ case 61:
{ if (xmlSchemaMode) return RegExpTT.CHAR_CLASS; else return StringEscapesTokenTypes.INVALID_CHARACTER_ESCAPE_TOKEN;
- }
+ }
// fall through
case 187: break;
- case 62:
+ case 62:
{ yypushstate(PROP); return RegExpTT.PROPERTY;
- }
+ }
// fall through
case 188: break;
- case 63:
+ case 63:
{ return allowTransformationEscapes ? RegExpTT.CHAR_CLASS : StringEscapesTokenTypes.INVALID_CHARACTER_ESCAPE_TOKEN;
- }
+ }
// fall through
case 189: break;
- case 64:
+ case 64:
{ return (allowOctalNoLeadingZero ? RegExpTT.OCT_CHAR : RegExpTT.BAD_OCT_VALUE);
- }
+ }
// fall through
case 190: break;
- case 65:
+ case 65:
{ String text = yytext().toString().substring(1);
if (allowOctalNoLeadingZero) {
if (Integer.parseInt(text) <= capturingGroupCount && yystate() != CLASS2) return RegExpTT.BACKREF;
@@ -1206,89 +1206,89 @@ class _RegExLexer implements FlexLexer {
}
return RegExpTT.BACKREF;
}
- }
+ }
// fall through
case 191: break;
- case 66:
+ case 66:
{ yypushstate(QUOTED); return RegExpTT.QUOTE_BEGIN;
- }
+ }
// fall through
case 192: break;
- case 67:
+ case 67:
{ return RegExpTT.BAD_HEX_VALUE;
- }
+ }
// fall through
case 193: break;
- case 68:
+ case 68:
{ return allowTransformationEscapes ? RegExpTT.CHAR_CLASS : StringEscapesTokenTypes.INVALID_UNICODE_ESCAPE_TOKEN;
- }
+ }
// fall through
case 194: break;
- case 69:
+ case 69:
{ return (allowHexDigitClass || allowHorizontalWhitespaceClass ? RegExpTT.CHAR_CLASS : StringEscapesTokenTypes.INVALID_CHARACTER_ESCAPE_TOKEN);
- }
+ }
// fall through
case 195: break;
- case 70:
+ case 70:
{ yypushstate(NAMED); return RegExpTT.NAMED_CHARACTER;
- }
+ }
// fall through
case 196: break;
- case 71:
+ case 71:
{ return commentMode ? RegExpTT.ESC_CHARACTER : RegExpTT.REDUNDANT_ESCAPE;
- }
+ }
// fall through
case 197: break;
- case 72:
+ case 72:
{ yypopstate(); return RegExpTT.QUOTE_END;
- }
+ }
// fall through
case 198: break;
- case 73:
+ case 73:
{ yypopstate(); return RegExpTT.ESC_CHARACTER;
- }
+ }
// fall through
case 199: break;
- case 74:
+ case 74:
// lookahead expression with fixed base length
zzMarkedPos = Character.offsetByCodePoints
(zzBufferL/*, zzStartRead, zzEndRead - zzStartRead*/, zzStartRead, 1);
{ yybegin(CLASS2); if (allowMysqlBracketExpressions) { yypushback(1); } else if (allowNestedCharacterClasses) { yypushstate(CLASS1); return RegExpTT.CLASS_BEGIN; } else { return RegExpTT.CHARACTER; }
- }
+ }
// fall through
case 200: break;
- case 75:
+ case 75:
// lookahead expression with fixed base length
zzMarkedPos = Character.offsetByCodePoints
(zzBufferL/*, zzStartRead, zzEndRead - zzStartRead*/, zzStartRead, 1);
{ yybegin(CLASS2); if (allowNestedCharacterClasses) { yypushstate(NEGATED_CLASS); return RegExpTT.CLASS_BEGIN; } return RegExpTT.CHARACTER;
- }
+ }
// fall through
case 201: break;
- case 76:
+ case 76:
// lookahead expression with fixed base length
zzMarkedPos = Character.offsetByCodePoints
(zzBufferL/*, zzStartRead, zzEndRead - zzStartRead*/, zzStartRead, 1);
{ yybegin(CLASS2); if (allowPosixBracketExpressions) { yypushback(1); } else if (allowNestedCharacterClasses) { yypushstate(CLASS1); return RegExpTT.CLASS_BEGIN; } else { return RegExpTT.CHARACTER; }
- }
+ }
// fall through
case 202: break;
- case 77:
+ case 77:
{ yybegin(CLASS2); return allowEmptyCharacterClass ? RegExpTT.ESC_CHARACTER : RegExpTT.REDUNDANT_ESCAPE;
- }
+ }
// fall through
case 203: break;
- case 78:
+ case 78:
{ yybegin(CLASS2); return RegExpTT.ESC_CHARACTER;
- }
+ }
// fall through
case 204: break;
- case 79:
+ case 79:
{ yypushstate(QUOTED_CLASS1); return RegExpTT.QUOTE_BEGIN;
- }
+ }
// fall through
case 205: break;
- case 80:
+ case 80:
{ char c = yycharat(1);
if (allowPosixBracketExpressions && c == ':') {
yybegin(BRACKET_EXPRESSION);
@@ -1308,279 +1308,279 @@ class _RegExLexer implements FlexLexer {
return RegExpTT.CHARACTER;
}
}
- }
+ }
// fall through
case 206: break;
- case 81:
+ case 81:
// lookahead expression with fixed base length
zzMarkedPos = Character.offsetByCodePoints
(zzBufferL/*, zzStartRead, zzEndRead - zzStartRead*/, zzStartRead, 1);
{ if (allowNestedCharacterClasses) { yypushstate(NEGATED_CLASS); return RegExpTT.CLASS_BEGIN; } return RegExpTT.CHARACTER;
- }
+ }
// fall through
case 207: break;
- case 82:
+ case 82:
{ return (commentMode && whitespaceInClass) ? RegExpTT.ESC_CTRL_CHARACTER : RegExpTT.REDUNDANT_ESCAPE;
- }
+ }
// fall through
case 208: break;
- case 83:
+ case 83:
{ if (allowNestedCharacterClasses) return RegExpTT.ANDAND; else yypushback(1); return RegExpTT.CHARACTER;
- }
+ }
// fall through
case 209: break;
- case 84:
+ case 84:
{ yybegin(CLASS2); return RegExpTT.BRACKET_EXPRESSION_END;
- }
+ }
// fall through
case 210: break;
- case 85:
+ case 85:
{ yybegin(CLASS2); return RegExpTT.MYSQL_CHAR_END;
- }
+ }
// fall through
case 211: break;
- case 86:
+ case 86:
{ yybegin(CLASS2); return RegExpTT.MYSQL_CHAR_EQ_END;
- }
+ }
// fall through
case 212: break;
- case 87:
+ case 87:
{ yybegin(PY_COND_REF); return RegExpTT.PYTHON_COND_REF;
- }
+ }
// fall through
case 213: break;
- case 88:
+ case 88:
{ return RegExpTT.PCRE_BRANCH_RESET;
- }
+ }
// fall through
case 214: break;
- case 89:
+ case 89:
{ yybegin(NAMED_GROUP); capturingGroupCount++; return RegExpTT.RUBY_NAMED_GROUP;
- }
+ }
// fall through
case 215: break;
- case 90:
+ case 90:
{ yybegin(QUOTED_NAMED_GROUP); capturingGroupCount++; return RegExpTT.RUBY_QUOTED_NAMED_GROUP;
- }
+ }
// fall through
case 216: break;
- case 91:
+ case 91:
{ return RegExpTT.POS_LOOKAHEAD;
- }
+ }
// fall through
case 217: break;
- case 92:
+ case 92:
{ return RegExpTT.NON_CAPT_GROUP;
- }
+ }
// fall through
case 218: break;
- case 93:
+ case 93:
{ yybegin(NAMED_GROUP); return RegExpTT.PCRE_RECURSIVE_NAMED_GROUP_REF;
- }
+ }
// fall through
case 219: break;
- case 94:
+ case 94:
{ return RegExpTT.ATOMIC_GROUP;
- }
+ }
// fall through
case 220: break;
- case 95:
+ case 95:
{ return RegExpTT.NEG_LOOKAHEAD;
- }
+ }
// fall through
case 221: break;
- case 96:
+ case 96:
// lookahead expression with fixed base length
zzMarkedPos = Character.offsetByCodePoints
(zzBufferL/*, zzStartRead, zzEndRead - zzStartRead*/, zzStartRead, 1);
{ return (allowDanglingMetacharacters != TRUE) ? RegExpTT.LBRACE : RegExpTT.CHARACTER;
- }
+ }
// fall through
case 222: break;
- case 97:
+ case 97:
// lookahead expression with fixed base length
zzMarkedPos = Character.offsetByCodePoints
(zzBufferL/*, zzStartRead, zzEndRead - zzStartRead*/, zzStartRead, 1);
{ yypushstate(QUANTIFIER); return RegExpTT.LBRACE;
- }
+ }
// fall through
case 223: break;
- case 98:
+ case 98:
// lookahead expression with fixed base length
zzMarkedPos = Character.offsetByCodePoints
(zzBufferL/*, zzStartRead, zzEndRead - zzStartRead*/, zzStartRead, 1);
{ if (allowOmitBothNumbersInQuantifiers || allowDanglingMetacharacters != TRUE) { yypushstate(QUANTIFIER); return RegExpTT.LBRACE; } else return RegExpTT.CHARACTER;
- }
+ }
// fall through
case 224: break;
- case 99:
+ case 99:
{ return allowPcreBackReferences ? RegExpTT.BACKREF : StringEscapesTokenTypes.INVALID_CHARACTER_ESCAPE_TOKEN;
- }
+ }
// fall through
case 225: break;
- case 100:
+ case 100:
{ yybegin(NAMED_GROUP); return RegExpTT.RUBY_NAMED_GROUP_CALL;
- }
+ }
// fall through
case 226: break;
- case 101:
+ case 101:
{ yybegin(QUOTED_NAMED_GROUP); return RegExpTT.RUBY_QUOTED_NAMED_GROUP_CALL;
- }
+ }
// fall through
case 227: break;
- case 102:
+ case 102:
{ if (xmlSchemaMode) { yypushback(1); return RegExpTT.CHAR_CLASS; } else return RegExpTT.CTRL;
- }
+ }
// fall through
case 228: break;
- case 103:
+ case 103:
{ return RegExpTT.OCT_CHAR;
- }
+ }
// fall through
case 229: break;
- case 104:
+ case 104:
// lookahead expression with fixed base length
zzMarkedPos = Character.offsetByCodePoints
(zzBufferL/*, zzStartRead, zzEndRead - zzStartRead*/, zzStartRead, 2);
{ if (allowExtendedUnicodeCharacter) yypushstate(EMBRACED_HEX); else return RegExpTT.BAD_HEX_VALUE;
- }
+ }
// fall through
case 230: break;
- case 105:
+ case 105:
{ if (allowOneHexCharEscape) { return RegExpTT.HEX_CHAR; } else { yypushback(1); return RegExpTT.BAD_HEX_VALUE; }
- }
+ }
// fall through
case 231: break;
- case 106:
+ case 106:
// lookahead expression with fixed base length
zzMarkedPos = Character.offsetByCodePoints
(zzBufferL/*, zzStartRead, zzEndRead - zzStartRead*/, zzStartRead, 2);
{ if (allowExtendedUnicodeCharacter) yypushstate(EMBRACED_HEX); else return StringEscapesTokenTypes.INVALID_UNICODE_ESCAPE_TOKEN;
- }
+ }
// fall through
case 232: break;
- case 107:
+ case 107:
{ yypushback(yylength() - 2); return StringEscapesTokenTypes.INVALID_UNICODE_ESCAPE_TOKEN;
- }
+ }
// fall through
case 233: break;
- case 108:
+ case 108:
{ yybegin(NAMED_GROUP); return RegExpTT.RUBY_NAMED_GROUP_REF;
- }
+ }
// fall through
case 234: break;
- case 109:
+ case 109:
{ yybegin(QUOTED_NAMED_GROUP); return RegExpTT.RUBY_QUOTED_NAMED_GROUP_REF;
- }
+ }
// fall through
case 235: break;
- case 110:
+ case 110:
// lookahead expression with fixed base length
zzMarkedPos = Character.offsetByCodePoints
(zzBufferL/*, zzStartRead, zzEndRead - zzStartRead*/, zzStartRead, 1);
{ return RegExpTT.CHARACTER;
- }
+ }
// fall through
case 236: break;
- case 111:
+ case 111:
{ yypopstate(); return (yycharat(-1) == 'u') ? RegExpTT.UNICODE_CHAR : RegExpTT.HEX_CHAR;
- }
+ }
// fall through
case 237: break;
- case 112:
+ case 112:
{ yybegin(NAMED_GROUP); capturingGroupCount++; return RegExpTT.PYTHON_NAMED_GROUP;
- }
+ }
// fall through
case 238: break;
- case 113:
+ case 113:
{ yybegin(PY_NAMED_GROUP_REF); return RegExpTT.PYTHON_NAMED_GROUP_REF;
- }
+ }
// fall through
case 239: break;
- case 114:
+ case 114:
{ return RegExpTT.POS_LOOKBEHIND;
- }
+ }
// fall through
case 240: break;
- case 115:
+ case 115:
{ return RegExpTT.NEG_LOOKBEHIND;
- }
+ }
// fall through
case 241: break;
- case 116:
+ case 116:
// lookahead expression with fixed base length
zzMarkedPos = Character.offsetByCodePoints
(zzBufferL/*, zzStartRead, zzEndRead - zzStartRead*/, zzStartRead, 1);
{ if (allowDanglingMetacharacters != TRUE) { yypushstate(QUANTIFIER); return RegExpTT.LBRACE; } else { yypushstate(NON_QUANTIFIER); return RegExpTT.CHARACTER; }
- }
+ }
// fall through
case 242: break;
- case 117:
+ case 117:
// lookahead expression with fixed base length
zzMarkedPos = Character.offsetByCodePoints
(zzBufferL/*, zzStartRead, zzEndRead - zzStartRead*/, zzStartRead, 1);
{ if (allowDanglingMetacharacters == TRUE) { if (allowOmitBothNumbersInQuantifiers) yypushstate(NON_QUANTIFIER); return RegExpTT.CHARACTER; } else { yypushstate(QUANTIFIER); return RegExpTT.LBRACE; }
- }
+ }
// fall through
case 243: break;
- case 118:
+ case 118:
// lookahead expression with fixed base length
zzMarkedPos = Character.offsetByCodePoints
(zzBufferL/*, zzStartRead, zzEndRead - zzStartRead*/, zzStartRead, 1);
{ if (allowOmitNumbersInQuantifiers || allowDanglingMetacharacters != TRUE) { yypushstate(QUANTIFIER); return RegExpTT.LBRACE; } else return RegExpTT.CHARACTER;
- }
+ }
// fall through
case 244: break;
- case 119:
+ case 119:
// lookahead expression with fixed base length
zzMarkedPos = Character.offsetByCodePoints
(zzBufferL/*, zzStartRead, zzEndRead - zzStartRead*/, zzStartRead, 2);
{ return RegExpTT.ESC_CHARACTER;
- }
+ }
// fall through
case 245: break;
- case 120:
+ case 120:
// lookahead expression with fixed base length
zzMarkedPos = Character.offsetByCodePoints
(zzBufferL/*, zzStartRead, zzEndRead - zzStartRead*/, zzStartRead, 2);
{ return allowOmitBothNumbersInQuantifiers ? RegExpTT.ESC_CHARACTER : RegExpTT.REDUNDANT_ESCAPE;
- }
+ }
// fall through
case 246: break;
- case 121:
+ case 121:
{ return RegExpTT.HEX_CHAR;
- }
+ }
// fall through
case 247: break;
- case 122:
+ case 122:
{ return RegExpTT.COMMENT;
- }
+ }
// fall through
case 248: break;
- case 123:
+ case 123:
// lookahead expression with fixed base length
zzMarkedPos = Character.offsetByCodePoints
(zzBufferL/*, zzStartRead, zzEndRead - zzStartRead*/, zzStartRead, 1);
{ if (allowDanglingMetacharacters != TRUE) { yypushstate(QUANTIFIER); return RegExpTT.LBRACE; } else if (allowOmitNumbersInQuantifiers) yypushstate(NON_QUANTIFIER); return RegExpTT.CHARACTER;
- }
+ }
// fall through
case 249: break;
- case 124:
+ case 124:
// lookahead expression with fixed base length
zzMarkedPos = Character.offsetByCodePoints
(zzBufferL/*, zzStartRead, zzEndRead - zzStartRead*/, zzStartRead, 2);
{ return allowOmitNumbersInQuantifiers ? RegExpTT.ESC_CHARACTER : RegExpTT.REDUNDANT_ESCAPE;
- }
+ }
// fall through
case 250: break;
- case 125:
+ case 125:
{ if (allowOctalNoLeadingZero) yypushback(1); return RegExpTT.OCT_CHAR;
- }
+ }
// fall through
case 251: break;
- case 126:
+ case 126:
{ return RegExpTT.UNICODE_CHAR;
- }
+ }
// fall through
case 252: break;
default:
diff --git a/RegExpSupport/src/org/intellij/lang/regexp/regexp-lexer.flex b/RegExpSupport/src/org/intellij/lang/regexp/regexp-lexer.flex
index 894580b9ca7e..7f92c0ff365b 100644
--- a/RegExpSupport/src/org/intellij/lang/regexp/regexp-lexer.flex
+++ b/RegExpSupport/src/org/intellij/lang/regexp/regexp-lexer.flex
@@ -253,6 +253,7 @@ BACK_REFERENCES_GROUP = [1-9][0-9]{0,2}
{ESCAPE} {LBRACE} { return (allowDanglingMetacharacters != TRUE) ? RegExpTT.ESC_CHARACTER : RegExpTT.REDUNDANT_ESCAPE; }
{ESCAPE} {RBRACE} { return (allowDanglingMetacharacters == FALSE) ? RegExpTT.ESC_CHARACTER : RegExpTT.REDUNDANT_ESCAPE; }
+ {ESCAPE} {RBRACKET} { return (allowDanglingMetacharacters != TRUE) ? RegExpTT.ESC_CHARACTER : RegExpTT.REDUNDANT_ESCAPE; }
{ESCAPE} {META2} { return RegExpTT.ESC_CHARACTER; }
}
{ESCAPE} {META1} { return RegExpTT.ESC_CHARACTER; }
diff --git a/RegExpSupport/test/org/intellij/lang/regexp/ecmascript/EcmaScriptRegExpParsingTest.java b/RegExpSupport/test/org/intellij/lang/regexp/ecmascript/EcmaScriptRegExpParsingTest.java
index da1187e04276..c3d04b4f0126 100644
--- a/RegExpSupport/test/org/intellij/lang/regexp/ecmascript/EcmaScriptRegExpParsingTest.java
+++ b/RegExpSupport/test/org/intellij/lang/regexp/ecmascript/EcmaScriptRegExpParsingTest.java
@@ -1,4 +1,4 @@
-// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.intellij.lang.regexp.ecmascript;
import com.intellij.openapi.application.ex.PathManagerEx;
@@ -33,6 +33,11 @@ public class EcmaScriptRegExpParsingTest extends ParsingTestCase {
doCodeTest("]");
}
+ public void testEscapedMetaCharacter() throws IOException {
+ //noinspection RegExpRedundantEscape
+ doCodeTest("\\]");
+ }
+
public void testExtendedUnicode() throws IOException {
doCodeTest("\\u{9}");
}
diff --git a/RegExpSupport/testData/ecmascript_psi/EscapedMetaCharacter.txt b/RegExpSupport/testData/ecmascript_psi/EscapedMetaCharacter.txt
new file mode 100644
index 000000000000..dd86cf606253
--- /dev/null
+++ b/RegExpSupport/testData/ecmascript_psi/EscapedMetaCharacter.txt
@@ -0,0 +1,5 @@
+JS_UNICODE_REGEXP_FILE
+ RegExpPatternImpl: <\]>
+ RegExpBranchImpl: <\]>
+ RegExpCharImpl: <\]>
+ PsiElement(ESC_CHARACTER)('\]')
\ No newline at end of file