From 6f9533289686dfc0ad91cd0d33c1a778efaf7d34 Mon Sep 17 00:00:00 2001 From: jothepro Date: Mon, 16 Nov 2020 15:03:56 +0100 Subject: [PATCH] fixed new `flags` support: `all` and `none` must not interpreted as language keywords. (#16) --- CHANGELOG.md | 4 + gradle.properties | 2 +- .../parser/DjinniParser.java | 12 +- .../psi/DjinniFlagsMember.java | 6 - .../psi/DjinniTypes.java | 2 - .../psi/impl/DjinniFlagsMemberImpl.java | 12 - .../djinni_intellij_plugin/Djinni.bnf | 4 +- .../djinni_intellij_plugin/_DjinniLexer.flex | 2 - .../djinni_intellij_plugin/_DjinniLexer.java | 265 ++++++++---------- 9 files changed, 136 insertions(+), 173 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 28a05df..9e15a2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ # djinni-intellij-plugin Changelog ## [Unreleased] +### Fixed +- problem with new `flags` support: `all` and `none` must not interpreted as language keywords. + +## [0.10.0] ### Added - support for the `flags` data structure diff --git a/gradle.properties b/gradle.properties index 08b145a..e3415ae 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,7 @@ pluginGroup = com.github.cross_language_cpp.djinni_intellij_plugin pluginName_ = djinni-intellij-plugin -pluginVersion = 0.10.0 +pluginVersion = 0.10.1 pluginSinceBuild = 193 pluginUntilBuild = 202.* diff --git a/src/main/gen/java/com/github/cross_language_cpp/djinni_intellij_plugin/parser/DjinniParser.java b/src/main/gen/java/com/github/cross_language_cpp/djinni_intellij_plugin/parser/DjinniParser.java index 368533a..12205ba 100644 --- a/src/main/gen/java/com/github/cross_language_cpp/djinni_intellij_plugin/parser/DjinniParser.java +++ b/src/main/gen/java/com/github/cross_language_cpp/djinni_intellij_plugin/parser/DjinniParser.java @@ -333,7 +333,7 @@ private static boolean flagsDescription_2(PsiBuilder b, int l) { } /* ********************************************************** */ - // flagsValue [ EQ ( all | none ) ] SEMICOLON + // flagsValue [ EQ ( 'all' | 'none' ) ] SEMICOLON public static boolean flagsMember(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "flagsMember")) return false; if (!nextTokenIs(b, IDENTIFIER)) return false; @@ -346,14 +346,14 @@ public static boolean flagsMember(PsiBuilder b, int l) { return r; } - // [ EQ ( all | none ) ] + // [ EQ ( 'all' | 'none' ) ] private static boolean flagsMember_1(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "flagsMember_1")) return false; flagsMember_1_0(b, l + 1); return true; } - // EQ ( all | none ) + // EQ ( 'all' | 'none' ) private static boolean flagsMember_1_0(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "flagsMember_1_0")) return false; boolean r; @@ -364,12 +364,12 @@ private static boolean flagsMember_1_0(PsiBuilder b, int l) { return r; } - // all | none + // 'all' | 'none' private static boolean flagsMember_1_0_1(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "flagsMember_1_0_1")) return false; boolean r; - r = consumeToken(b, ALL); - if (!r) r = consumeToken(b, NONE); + r = consumeToken(b, "all"); + if (!r) r = consumeToken(b, "none"); return r; } diff --git a/src/main/gen/java/com/github/cross_language_cpp/djinni_intellij_plugin/psi/DjinniFlagsMember.java b/src/main/gen/java/com/github/cross_language_cpp/djinni_intellij_plugin/psi/DjinniFlagsMember.java index 1375ffa..0295a6e 100644 --- a/src/main/gen/java/com/github/cross_language_cpp/djinni_intellij_plugin/psi/DjinniFlagsMember.java +++ b/src/main/gen/java/com/github/cross_language_cpp/djinni_intellij_plugin/psi/DjinniFlagsMember.java @@ -16,10 +16,4 @@ public interface DjinniFlagsMember extends PsiElement { @NotNull PsiElement getSemicolon(); - @Nullable - PsiElement getAll(); - - @Nullable - PsiElement getNone(); - } diff --git a/src/main/gen/java/com/github/cross_language_cpp/djinni_intellij_plugin/psi/DjinniTypes.java b/src/main/gen/java/com/github/cross_language_cpp/djinni_intellij_plugin/psi/DjinniTypes.java index d5bdccf..59fe887 100644 --- a/src/main/gen/java/com/github/cross_language_cpp/djinni_intellij_plugin/psi/DjinniTypes.java +++ b/src/main/gen/java/com/github/cross_language_cpp/djinni_intellij_plugin/psi/DjinniTypes.java @@ -40,7 +40,6 @@ public interface DjinniTypes { IElementType TYPE_DEFINITION = new DjinniElementType("TYPE_DEFINITION"); IElementType TYPE_REFERENCE = new DjinniElementType("TYPE_REFERENCE"); - IElementType ALL = new DjinniTokenType("all"); IElementType AT = new DjinniTokenType("@"); IElementType COLON = new DjinniTokenType(":"); IElementType COMMENT = new DjinniTokenType("comment"); @@ -59,7 +58,6 @@ public interface DjinniTypes { IElementType LIST = new DjinniTokenType("list"); IElementType LIST_SEPARATOR = new DjinniTokenType(","); IElementType MAP = new DjinniTokenType("map"); - IElementType NONE = new DjinniTokenType("none"); IElementType NUMBER_LITERAL = new DjinniTokenType("number_literal"); IElementType OPTIONAL = new DjinniTokenType("optional"); IElementType ORD = new DjinniTokenType("ord"); diff --git a/src/main/gen/java/com/github/cross_language_cpp/djinni_intellij_plugin/psi/impl/DjinniFlagsMemberImpl.java b/src/main/gen/java/com/github/cross_language_cpp/djinni_intellij_plugin/psi/impl/DjinniFlagsMemberImpl.java index 37d32f7..3c356fe 100644 --- a/src/main/gen/java/com/github/cross_language_cpp/djinni_intellij_plugin/psi/impl/DjinniFlagsMemberImpl.java +++ b/src/main/gen/java/com/github/cross_language_cpp/djinni_intellij_plugin/psi/impl/DjinniFlagsMemberImpl.java @@ -44,16 +44,4 @@ public PsiElement getSemicolon() { return findNotNullChildByType(SEMICOLON); } - @Override - @Nullable - public PsiElement getAll() { - return findChildByType(ALL); - } - - @Override - @Nullable - public PsiElement getNone() { - return findChildByType(NONE); - } - } diff --git a/src/main/java/com/github/cross_language_cpp/djinni_intellij_plugin/Djinni.bnf b/src/main/java/com/github/cross_language_cpp/djinni_intellij_plugin/Djinni.bnf index ffb144f..51ba7a6 100644 --- a/src/main/java/com/github/cross_language_cpp/djinni_intellij_plugin/Djinni.bnf +++ b/src/main/java/com/github/cross_language_cpp/djinni_intellij_plugin/Djinni.bnf @@ -49,8 +49,6 @@ comment="regexp:#.*" enum="enum" flags="flags" - all="all" - none="none" record="record" eq_keyword="eq" ord="ord" @@ -101,7 +99,7 @@ private flagsDescription ::= flagsTypeVariant LEFT_BLOCK_BRACE flagsMember* RIGH flagsTypeVariant ::= flags -flagsMember ::= flagsValue [ EQ ( all | none ) ] SEMICOLON +flagsMember ::= flagsValue [ EQ ( 'all' | 'none' ) ] SEMICOLON flagsValue ::= identifier { mixin="com.github.cross_language_cpp.djinni_intellij_plugin.psi.impl.DjinniReferenceImpl" diff --git a/src/main/java/com/github/cross_language_cpp/djinni_intellij_plugin/_DjinniLexer.flex b/src/main/java/com/github/cross_language_cpp/djinni_intellij_plugin/_DjinniLexer.flex index d386ea2..f7a908e 100644 --- a/src/main/java/com/github/cross_language_cpp/djinni_intellij_plugin/_DjinniLexer.flex +++ b/src/main/java/com/github/cross_language_cpp/djinni_intellij_plugin/_DjinniLexer.flex @@ -50,8 +50,6 @@ TEXT=[a-zA-Z_0-9]+ "@" { return AT; } "enum" { return ENUM; } "flags" { return FLAGS; } - "all" { return ALL; } - "none" { return NONE; } "record" { return RECORD; } "eq" { return EQ_KEYWORD; } "ord" { return ORD; } diff --git a/src/main/java/com/github/cross_language_cpp/djinni_intellij_plugin/_DjinniLexer.java b/src/main/java/com/github/cross_language_cpp/djinni_intellij_plugin/_DjinniLexer.java index bb6e7cd..7731950 100644 --- a/src/main/java/com/github/cross_language_cpp/djinni_intellij_plugin/_DjinniLexer.java +++ b/src/main/java/com/github/cross_language_cpp/djinni_intellij_plugin/_DjinniLexer.java @@ -114,8 +114,8 @@ public static int ZZ_CMAP(int ch) { static final char ZZ_CMAP_A[] = zzUnpackCMap( "\11\0\1\2\4\1\22\0\1\2\1\0\1\6\1\3\3\0\1\4\1\26\1\27\1\0\1\21\1\20\1\7\1\11"+ "\1\0\12\10\1\16\1\17\1\24\1\15\1\25\1\0\1\30\32\14\1\0\1\5\2\0\1\13\1\0\1"+ - "\37\1\14\1\44\1\45\1\31\1\35\1\40\1\14\1\47\2\14\1\36\1\34\1\32\1\42\1\52"+ - "\1\46\1\43\1\41\1\50\1\33\2\14\1\51\2\14\1\22\1\0\1\23\7\0\1\1\12\0\1\2\11"+ + "\37\1\14\1\43\1\45\1\31\1\35\1\40\1\14\1\47\2\14\1\36\1\34\1\32\1\44\1\52"+ + "\1\46\1\42\1\41\1\50\1\33\2\14\1\51\2\14\1\22\1\0\1\23\7\0\1\1\12\0\1\2\11"+ "\0\1\12\12\0\1\12\4\0\1\12\5\0\27\12\1\0\12\12\4\0\14\12\16\0\5\12\7\0\1\12"+ "\1\0\1\12\1\0\5\12\1\0\2\12\2\0\4\12\1\0\1\12\6\0\1\12\1\0\3\12\1\0\1\12\1"+ "\0\4\12\1\0\23\12\1\0\13\12\10\0\6\12\1\0\26\12\2\0\1\12\6\0\10\12\10\0\13"+ @@ -168,15 +168,14 @@ public static int ZZ_CMAP(int ch) { private static final String ZZ_ACTION_PACKED_0 = "\1\0\1\1\1\2\1\3\3\1\1\4\1\1\1\5"+ "\1\6\1\7\1\10\1\11\1\12\1\13\1\14\1\15"+ - "\1\16\1\17\1\20\1\21\1\22\13\5\1\0\1\23"+ - "\3\0\2\4\1\5\1\24\16\5\1\23\3\5\1\25"+ - "\2\5\1\26\1\27\1\5\1\30\5\5\1\31\1\5"+ - "\1\32\1\5\1\33\7\5\1\34\3\5\1\35\2\5"+ - "\1\36\1\37\1\5\1\40\1\5\1\41\2\5\1\42"+ - "\1\5\1\43"; + "\1\16\1\17\1\20\1\21\1\22\11\5\1\0\1\23"+ + "\3\0\2\4\1\5\1\24\14\5\1\23\2\5\1\25"+ + "\2\5\1\26\3\5\1\27\3\5\1\30\2\5\1\31"+ + "\7\5\1\32\2\5\1\33\3\5\1\34\1\35\1\36"+ + "\2\5\1\37\2\5\1\40\1\5\1\41"; private static int [] zzUnpackAction() { - int [] result = new int[103]; + int [] result = new int[96]; int offset = 0; offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); return result; @@ -205,18 +204,17 @@ private static int zzUnpackAction(String packed, int offset, int [] result) { "\0\u0158\0\u0183\0\u01ae\0\53\0\53\0\53\0\53\0\53"+ "\0\53\0\53\0\53\0\53\0\53\0\53\0\53\0\u01d9"+ "\0\u0204\0\u022f\0\u025a\0\u0285\0\u02b0\0\u02db\0\u0306\0\u0331"+ - "\0\u035c\0\u0387\0\254\0\53\0\u03b2\0\327\0\u03dd\0\u0408"+ - "\0\u0158\0\u0433\0\u0183\0\u045e\0\u0489\0\u04b4\0\u04df\0\u050a"+ - "\0\u0535\0\u0560\0\u058b\0\u05b6\0\u05e1\0\u060c\0\u0637\0\u0662"+ - "\0\u068d\0\327\0\u06b8\0\u06e3\0\u070e\0\u0183\0\u0739\0\u0764"+ - "\0\u0183\0\u0183\0\u078f\0\u0183\0\u07ba\0\u07e5\0\u0810\0\u083b"+ - "\0\u0866\0\u0183\0\u0891\0\u0183\0\u08bc\0\u0183\0\u08e7\0\u0912"+ - "\0\u093d\0\u0968\0\u0993\0\u09be\0\u09e9\0\u0183\0\u0a14\0\u0a3f"+ - "\0\u0a6a\0\u0183\0\u0a95\0\u0ac0\0\u0183\0\u0183\0\u0aeb\0\u0183"+ - "\0\u0b16\0\u0183\0\u0b41\0\u0b6c\0\u0183\0\u0b97\0\u0183"; + "\0\254\0\53\0\u035c\0\327\0\u0387\0\u03b2\0\u0158\0\u03dd"+ + "\0\u0183\0\u0408\0\u0433\0\u045e\0\u0489\0\u04b4\0\u04df\0\u050a"+ + "\0\u0535\0\u0560\0\u058b\0\u05b6\0\u05e1\0\327\0\u060c\0\u0637"+ + "\0\u0183\0\u0662\0\u068d\0\u0183\0\u06b8\0\u06e3\0\u070e\0\u0183"+ + "\0\u0739\0\u0764\0\u078f\0\u0183\0\u07ba\0\u07e5\0\u0183\0\u0810"+ + "\0\u083b\0\u0866\0\u0891\0\u08bc\0\u08e7\0\u0912\0\u0183\0\u093d"+ + "\0\u0968\0\u0183\0\u0993\0\u09be\0\u09e9\0\u0183\0\u0183\0\u0183"+ + "\0\u0a14\0\u0a3f\0\u0183\0\u0a6a\0\u0a95\0\u0183\0\u0ac0\0\u0183"; private static int [] zzUnpackRowMap() { - int [] result = new int[103]; + int [] result = new int[96]; int offset = 0; offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); return result; @@ -242,73 +240,68 @@ private static int zzUnpackRowMap(String packed, int offset, int [] result) { "\1\2\2\3\1\4\1\5\1\2\1\6\1\7\1\10"+ "\1\11\1\12\1\13\1\12\1\14\1\15\1\16\1\17"+ "\1\20\1\21\1\22\1\23\1\24\1\25\1\26\1\27"+ - "\1\30\1\31\1\12\1\32\1\33\1\34\1\35\1\12"+ - "\1\36\1\37\1\40\1\41\2\12\1\42\3\12\54\0"+ - "\2\3\50\0\1\4\1\0\51\4\4\43\1\44\1\45"+ - "\45\43\5\46\1\47\1\44\44\46\10\0\1\50\52\0"+ - "\1\10\1\51\1\0\2\13\14\0\22\13\10\0\1\51"+ - "\52\0\1\12\2\0\2\12\14\0\22\12\10\0\1\13"+ - "\2\0\2\13\14\0\22\13\10\0\1\12\2\0\2\12"+ - "\14\0\1\12\1\52\13\12\1\53\2\12\1\54\1\12"+ - "\10\0\1\12\2\0\2\12\14\0\11\12\1\55\10\12"+ - "\10\0\1\12\2\0\2\12\14\0\6\12\1\56\13\12"+ - "\10\0\1\12\2\0\2\12\14\0\5\12\1\57\14\12"+ - "\10\0\1\12\2\0\2\12\14\0\16\12\1\60\3\12"+ - "\10\0\1\12\2\0\2\12\14\0\5\12\1\61\14\12"+ - "\10\0\1\12\2\0\2\12\14\0\1\62\16\12\1\63"+ - "\2\12\10\0\1\12\2\0\2\12\14\0\12\12\1\64"+ - "\6\12\1\65\10\0\1\12\2\0\2\12\14\0\1\66"+ - "\21\12\10\0\1\12\2\0\2\12\14\0\11\12\1\67"+ - "\10\12\10\0\1\12\2\0\2\12\14\0\1\12\1\70"+ - "\1\12\1\71\16\12\1\43\1\0\51\43\5\46\1\47"+ - "\1\72\44\46\10\0\1\50\1\51\51\0\1\12\2\0"+ - "\2\12\14\0\2\12\1\73\17\12\10\0\1\12\2\0"+ - "\2\12\14\0\17\12\1\74\2\12\10\0\1\12\2\0"+ - "\2\12\14\0\1\12\1\75\20\12\10\0\1\12\2\0"+ - "\2\12\14\0\21\12\1\76\10\0\1\12\2\0\2\12"+ - "\14\0\6\12\1\77\13\12\10\0\1\12\2\0\2\12"+ - "\14\0\10\12\1\100\11\12\10\0\1\12\2\0\2\12"+ - "\14\0\5\12\1\101\14\12\10\0\1\12\2\0\2\12"+ - "\14\0\17\12\1\102\2\12\10\0\1\12\2\0\2\12"+ - "\14\0\6\12\1\103\13\12\10\0\1\12\2\0\2\12"+ - "\14\0\14\12\1\104\5\12\10\0\1\12\2\0\2\12"+ - "\14\0\17\12\1\105\2\12\10\0\1\12\2\0\2\12"+ - "\14\0\13\12\1\106\6\12\10\0\1\12\2\0\2\12"+ - "\14\0\1\12\1\107\20\12\10\0\1\12\2\0\2\12"+ - "\14\0\17\12\1\110\2\12\10\0\1\12\2\0\2\12"+ - "\14\0\21\12\1\111\10\0\1\12\2\0\2\12\14\0"+ - "\3\12\1\112\16\12\10\0\1\12\2\0\2\12\14\0"+ - "\1\113\21\12\10\0\1\12\2\0\2\12\14\0\1\114"+ - "\21\12\10\0\1\12\2\0\2\12\14\0\7\12\1\115"+ - "\12\12\10\0\1\12\2\0\2\12\14\0\17\12\1\116"+ - "\2\12\10\0\1\12\2\0\2\12\14\0\17\12\1\117"+ - "\2\12\10\0\1\12\2\0\2\12\14\0\16\12\1\120"+ - "\3\12\10\0\1\12\2\0\2\12\14\0\11\12\1\121"+ - "\10\12\10\0\1\12\2\0\2\12\14\0\10\12\1\122"+ - "\11\12\10\0\1\12\2\0\2\12\14\0\1\123\21\12"+ - "\10\0\1\12\2\0\2\12\14\0\11\12\1\124\10\12"+ - "\10\0\1\12\2\0\2\12\14\0\12\12\1\125\7\12"+ - "\10\0\1\12\2\0\2\12\14\0\10\12\1\126\11\12"+ - "\10\0\1\12\2\0\2\12\14\0\16\12\1\127\3\12"+ - "\10\0\1\12\2\0\2\12\14\0\11\12\1\130\10\12"+ - "\10\0\1\12\2\0\2\12\14\0\12\12\1\131\7\12"+ - "\10\0\1\12\2\0\2\12\14\0\17\12\1\132\2\12"+ - "\10\0\1\12\2\0\2\12\14\0\12\12\1\133\7\12"+ - "\10\0\1\12\2\0\2\12\14\0\12\12\1\134\7\12"+ - "\10\0\1\12\2\0\2\12\14\0\1\12\1\135\20\12"+ - "\10\0\1\12\2\0\2\12\14\0\13\12\1\136\6\12"+ - "\10\0\1\12\2\0\2\12\14\0\1\12\1\137\20\12"+ - "\10\0\1\12\2\0\2\12\14\0\14\12\1\140\5\12"+ - "\10\0\1\12\2\0\2\12\14\0\4\12\1\141\15\12"+ - "\10\0\1\12\2\0\2\12\14\0\17\12\1\142\2\12"+ - "\10\0\1\12\2\0\2\12\14\0\6\12\1\143\13\12"+ - "\10\0\1\12\2\0\2\12\14\0\6\12\1\144\13\12"+ - "\10\0\1\12\2\0\2\12\14\0\5\12\1\145\14\12"+ - "\10\0\1\12\2\0\2\12\14\0\13\12\1\146\6\12"+ - "\10\0\1\12\2\0\2\12\14\0\1\147\21\12"; + "\1\30\2\12\1\31\1\32\1\33\2\12\1\34\1\35"+ + "\1\36\1\37\2\12\1\40\3\12\54\0\2\3\50\0"+ + "\1\4\1\0\51\4\4\41\1\42\1\43\45\41\5\44"+ + "\1\45\1\42\44\44\10\0\1\46\52\0\1\10\1\47"+ + "\1\0\2\13\14\0\22\13\10\0\1\47\52\0\1\12"+ + "\2\0\2\12\14\0\22\12\10\0\1\13\2\0\2\13"+ + "\14\0\22\13\10\0\1\12\2\0\2\12\14\0\1\12"+ + "\1\50\13\12\1\51\2\12\1\52\1\12\10\0\1\12"+ + "\2\0\2\12\14\0\6\12\1\53\13\12\10\0\1\12"+ + "\2\0\2\12\14\0\5\12\1\54\14\12\10\0\1\12"+ + "\2\0\2\12\14\0\16\12\1\55\3\12\10\0\1\12"+ + "\2\0\2\12\14\0\1\56\16\12\1\57\2\12\10\0"+ + "\1\12\2\0\2\12\14\0\1\60\21\12\10\0\1\12"+ + "\2\0\2\12\14\0\13\12\1\61\6\12\10\0\1\12"+ + "\2\0\2\12\14\0\11\12\1\62\7\12\1\63\10\0"+ + "\1\12\2\0\2\12\14\0\1\12\1\64\1\12\1\65"+ + "\16\12\1\41\1\0\51\41\5\44\1\45\1\66\44\44"+ + "\10\0\1\46\1\47\51\0\1\12\2\0\2\12\14\0"+ + "\2\12\1\67\17\12\10\0\1\12\2\0\2\12\14\0"+ + "\17\12\1\70\2\12\10\0\1\12\2\0\2\12\14\0"+ + "\21\12\1\71\10\0\1\12\2\0\2\12\14\0\6\12"+ + "\1\72\13\12\10\0\1\12\2\0\2\12\14\0\10\12"+ + "\1\73\11\12\10\0\1\12\2\0\2\12\14\0\17\12"+ + "\1\74\2\12\10\0\1\12\2\0\2\12\14\0\6\12"+ + "\1\75\13\12\10\0\1\12\2\0\2\12\14\0\12\12"+ + "\1\76\7\12\10\0\1\12\2\0\2\12\14\0\1\12"+ + "\1\77\20\12\10\0\1\12\2\0\2\12\14\0\14\12"+ + "\1\100\5\12\10\0\1\12\2\0\2\12\14\0\17\12"+ + "\1\101\2\12\10\0\1\12\2\0\2\12\14\0\17\12"+ + "\1\102\2\12\10\0\1\12\2\0\2\12\14\0\21\12"+ + "\1\103\10\0\1\12\2\0\2\12\14\0\3\12\1\104"+ + "\16\12\10\0\1\12\2\0\2\12\14\0\1\105\21\12"+ + "\10\0\1\12\2\0\2\12\14\0\7\12\1\106\12\12"+ + "\10\0\1\12\2\0\2\12\14\0\17\12\1\107\2\12"+ + "\10\0\1\12\2\0\2\12\14\0\17\12\1\110\2\12"+ + "\10\0\1\12\2\0\2\12\14\0\13\12\1\111\6\12"+ + "\10\0\1\12\2\0\2\12\14\0\10\12\1\112\11\12"+ + "\10\0\1\12\2\0\2\12\14\0\16\12\1\113\3\12"+ + "\10\0\1\12\2\0\2\12\14\0\1\114\21\12\10\0"+ + "\1\12\2\0\2\12\14\0\13\12\1\115\6\12\10\0"+ + "\1\12\2\0\2\12\14\0\11\12\1\116\10\12\10\0"+ + "\1\12\2\0\2\12\14\0\10\12\1\117\11\12\10\0"+ + "\1\12\2\0\2\12\14\0\16\12\1\120\3\12\10\0"+ + "\1\12\2\0\2\12\14\0\11\12\1\121\10\12\10\0"+ + "\1\12\2\0\2\12\14\0\17\12\1\122\2\12\10\0"+ + "\1\12\2\0\2\12\14\0\13\12\1\123\6\12\10\0"+ + "\1\12\2\0\2\12\14\0\11\12\1\124\10\12\10\0"+ + "\1\12\2\0\2\12\14\0\11\12\1\125\10\12\10\0"+ + "\1\12\2\0\2\12\14\0\1\12\1\126\20\12\10\0"+ + "\1\12\2\0\2\12\14\0\12\12\1\127\7\12\10\0"+ + "\1\12\2\0\2\12\14\0\14\12\1\130\5\12\10\0"+ + "\1\12\2\0\2\12\14\0\1\12\1\131\20\12\10\0"+ + "\1\12\2\0\2\12\14\0\4\12\1\132\15\12\10\0"+ + "\1\12\2\0\2\12\14\0\17\12\1\133\2\12\10\0"+ + "\1\12\2\0\2\12\14\0\6\12\1\134\13\12\10\0"+ + "\1\12\2\0\2\12\14\0\6\12\1\135\13\12\10\0"+ + "\1\12\2\0\2\12\14\0\5\12\1\136\14\12\10\0"+ + "\1\12\2\0\2\12\14\0\12\12\1\137\7\12\10\0"+ + "\1\12\2\0\2\12\14\0\1\140\21\12"; private static int [] zzUnpackTrans() { - int [] result = new int[3010]; + int [] result = new int[2795]; int offset = 0; offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result); return result; @@ -346,11 +339,11 @@ private static int zzUnpackTrans(String packed, int offset, int [] result) { private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute(); private static final String ZZ_ATTRIBUTE_PACKED_0 = - "\1\0\1\11\11\1\14\11\13\1\1\0\1\11\3\0"+ - "\100\1"; + "\1\0\1\11\11\1\14\11\11\1\1\0\1\11\3\0"+ + "\73\1"; private static int [] zzUnpackAttribute() { - int [] result = new int[103]; + int [] result = new int[96]; int offset = 0; offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result); return result; @@ -659,177 +652,167 @@ else if (zzAtEOF) { { return BAD_CHARACTER; } // fall through - case 36: break; + case 34: break; case 2: { return WHITE_SPACE; } // fall through - case 37: break; + case 35: break; case 3: { return COMMENT; } // fall through - case 38: break; + case 36: break; case 4: { return NUMBER_LITERAL; } // fall through - case 39: break; + case 37: break; case 5: { return IDENTIFIER; } // fall through - case 40: break; + case 38: break; case 6: { return TEXT; } // fall through - case 41: break; + case 39: break; case 7: { return EQ; } // fall through - case 42: break; + case 40: break; case 8: { return COLON; } // fall through - case 43: break; + case 41: break; case 9: { return SEMICOLON; } // fall through - case 44: break; + case 42: break; case 10: { return LIST_SEPARATOR; } // fall through - case 45: break; + case 43: break; case 11: { return PLUS; } // fall through - case 46: break; + case 44: break; case 12: { return LEFT_BLOCK_BRACE; } // fall through - case 47: break; + case 45: break; case 13: { return RIGHT_BLOCK_BRACE; } // fall through - case 48: break; + case 46: break; case 14: { return LEFT_GENERICS_BRACE; } // fall through - case 49: break; + case 47: break; case 15: { return RIGHT_GENERICS_BRACE; } // fall through - case 50: break; + case 48: break; case 16: { return LEFT_PARAM_BRACE; } // fall through - case 51: break; + case 49: break; case 17: { return RIGHT_PARAM_BRACE; } // fall through - case 52: break; + case 50: break; case 18: { return AT; } // fall through - case 53: break; + case 51: break; case 19: { return STRING_LITERAL; } // fall through - case 54: break; + case 52: break; case 20: { return EQ_KEYWORD; } // fall through - case 55: break; + case 53: break; case 21: { return MAP; } // fall through - case 56: break; + case 54: break; case 22: - { return ALL; - } - // fall through - case 57: break; - case 23: { return SET; } // fall through - case 58: break; - case 24: + case 55: break; + case 23: { return ORD; } // fall through - case 59: break; - case 25: + case 56: break; + case 24: { return ENUM; } // fall through - case 60: break; - case 26: - { return NONE; - } - // fall through - case 61: break; - case 27: + case 57: break; + case 25: { return LIST; } // fall through - case 62: break; - case 28: + case 58: break; + case 26: { return FLAGS; } // fall through - case 63: break; - case 29: + case 59: break; + case 27: { return CONST; } // fall through - case 64: break; - case 30: + case 60: break; + case 28: { return EXTERN; } // fall through - case 65: break; - case 31: + case 61: break; + case 29: { return STATIC; } // fall through - case 66: break; - case 32: + case 62: break; + case 30: { return RECORD; } // fall through - case 67: break; - case 33: + case 63: break; + case 31: { return IMPORT; } // fall through - case 68: break; - case 34: + case 64: break; + case 32: { return OPTIONAL; } // fall through - case 69: break; - case 35: + case 65: break; + case 33: { return INTERFACE; } // fall through - case 70: break; + case 66: break; default: zzScanError(ZZ_NO_MATCH); }