diff --git a/CHANGELOG.md b/CHANGELOG.md index 609ebf0..64f8816 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,15 @@ # RedLib-Command-File Changelog ## [Unreleased] +- Disabled postarg for base commands and the children of consuming commands +- Optimized file size +- Added support for consuming args with constraints +- Added support for consuming args with constraints with default values +- Added support for constraints +- Fixed a bug where it would allow consuming arguments after one non-consuming subcommand +- Fixed a bug where context and assert would only accept 2 words and nothing else +- Fixed a bug where you can't have postargs in the command if it has a consuming argument +## [0.2.10] - Fixed a bug where you can't have empty lines between commands ## [0.2.9] - Added brace matching diff --git a/gradle.properties b/gradle.properties index 2f8aae1..e98335e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,7 @@ pluginGroup = com.github.shuaiouke.redlibcommandfile pluginName = RedLib-Command-File -pluginVersion = 0.2.10 +pluginVersion = 0.2.11 # See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html # for insight into build numbers and IntelliJ Platform versions. diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/RedLibCommandLexer.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/RedLibCommandLexer.java index d0e1e99..ff390a8 100644 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/RedLibCommandLexer.java +++ b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/RedLibCommandLexer.java @@ -139,58 +139,58 @@ public static int ZZ_CMAP(int ch) { /* The ZZ_CMAP_A table has 3264 entries */ static final char ZZ_CMAP_A[] = zzUnpackCMap( - "\11\0\1\16\1\2\2\4\1\3\22\0\1\16\7\0\1\44\1\45\1\5\1\0\1\42\1\11\1\12\1\1"+ - "\12\10\1\15\4\0\1\6\1\0\32\10\1\13\1\7\1\14\1\0\1\10\1\0\1\35\1\36\1\37\1"+ - "\10\1\20\1\10\1\25\1\17\1\27\1\10\1\33\1\21\1\23\1\31\1\30\1\22\1\10\1\26"+ - "\1\24\1\34\1\32\1\47\1\10\1\40\1\46\1\10\1\43\1\0\1\41\7\0\1\4\12\0\1\16\11"+ - "\0\1\10\12\0\1\10\4\0\1\10\5\0\27\10\1\0\12\10\4\0\14\10\16\0\5\10\7\0\1\10"+ - "\1\0\1\10\1\0\5\10\1\0\2\10\2\0\4\10\1\0\1\10\6\0\1\10\1\0\3\10\1\0\1\10\1"+ - "\0\4\10\1\0\23\10\1\0\20\10\2\0\1\10\6\0\10\10\10\0\16\10\1\0\1\10\1\0\2\10"+ - "\1\0\2\10\1\0\1\10\10\0\13\10\5\0\3\10\15\0\12\10\4\0\6\10\1\0\10\10\2\0\12"+ - "\10\1\0\23\10\2\0\14\10\2\0\11\10\4\0\1\10\5\0\16\10\2\0\14\10\4\0\5\10\1"+ - "\0\10\10\6\0\20\10\2\0\13\10\2\0\16\10\1\0\1\10\3\0\4\10\2\0\11\10\2\0\2\10"+ - "\2\0\4\10\10\0\1\10\4\0\2\10\1\0\1\10\1\0\3\10\1\0\6\10\4\0\2\10\1\0\2\10"+ - "\1\0\2\10\1\0\2\10\2\0\1\10\1\0\5\10\4\0\2\10\2\0\3\10\3\0\1\10\7\0\4\10\1"+ - "\0\1\10\7\0\20\10\13\0\3\10\1\0\11\10\1\0\2\10\1\0\2\10\1\0\5\10\2\0\12\10"+ - "\1\0\3\10\1\0\3\10\2\0\1\10\30\0\1\10\7\0\3\10\1\0\10\10\2\0\6\10\2\0\2\10"+ - "\2\0\3\10\10\0\2\10\4\0\2\10\1\0\1\10\1\0\1\10\20\0\2\10\1\0\6\10\3\0\3\10"+ - "\1\0\4\10\3\0\2\10\1\0\1\10\1\0\2\10\3\0\2\10\3\0\3\10\3\0\5\10\3\0\3\10\1"+ - "\0\4\10\2\0\1\10\6\0\1\10\10\0\4\10\1\0\10\10\1\0\3\10\1\0\30\10\3\0\10\10"+ - "\1\0\3\10\1\0\4\10\7\0\2\10\1\0\3\10\5\0\4\10\1\0\5\10\2\0\4\10\5\0\2\10\7"+ - "\0\1\10\2\0\2\10\16\0\3\10\1\0\10\10\1\0\7\10\1\0\3\10\1\0\5\10\5\0\4\10\7"+ - "\0\1\10\12\0\6\10\2\0\2\10\1\0\22\10\3\0\10\10\1\0\11\10\1\0\1\10\2\0\7\10"+ - "\3\0\1\10\4\0\6\10\1\0\1\10\1\0\10\10\2\0\2\10\14\0\17\10\1\0\12\10\7\0\2"+ - "\10\1\0\1\10\2\0\2\10\1\0\1\10\2\0\1\10\6\0\4\10\1\0\7\10\1\0\3\10\1\0\1\10"+ - "\1\0\1\10\2\0\2\10\1\0\15\10\1\0\3\10\2\0\5\10\1\0\1\10\1\0\6\10\2\0\12\10"+ - "\2\0\4\10\10\0\2\10\13\0\1\10\1\0\1\10\1\0\1\10\4\0\12\10\1\0\24\10\3\0\5"+ - "\10\1\0\12\10\6\0\1\10\11\0\6\10\1\0\1\10\5\0\1\10\2\0\13\10\1\0\15\10\1\0"+ - "\4\10\2\0\7\10\1\0\1\10\1\0\4\10\2\0\1\10\1\0\4\10\2\0\7\10\1\0\1\10\1\0\4"+ - "\10\2\0\16\10\2\0\6\10\2\0\1\16\32\10\3\0\13\10\7\0\15\10\1\0\7\10\13\0\4"+ - "\10\14\0\1\10\1\0\2\10\14\0\4\10\3\0\1\10\4\0\2\10\15\0\3\10\11\0\1\10\23"+ - "\0\10\10\1\0\23\10\1\0\2\10\6\0\6\10\5\0\15\10\1\0\1\10\1\0\1\10\1\0\1\10"+ - "\1\0\6\10\1\0\7\10\1\0\1\10\3\0\3\10\1\0\7\10\3\0\4\10\2\0\6\10\4\0\13\16"+ - "\15\0\2\4\5\0\1\16\17\0\1\10\4\0\1\10\12\0\1\16\1\0\1\10\15\0\1\10\2\0\1\10"+ - "\4\0\1\10\2\0\12\10\1\0\1\10\3\0\5\10\6\0\1\10\1\0\1\10\1\0\1\10\1\0\4\10"+ - "\1\0\1\10\5\0\5\10\4\0\1\10\1\0\5\10\6\0\15\10\7\0\10\10\11\0\7\10\1\0\7\10"+ - "\1\0\1\16\4\0\3\10\11\0\5\10\2\0\5\10\3\0\7\10\2\0\2\10\2\0\3\10\5\0\16\10"+ - "\1\0\12\10\1\0\1\10\7\0\11\10\2\0\27\10\2\0\15\10\3\0\1\10\1\0\1\10\2\0\1"+ - "\10\16\0\1\10\2\0\5\10\12\0\6\10\2\0\6\10\2\0\6\10\11\0\13\10\1\0\2\10\2\0"+ - "\7\10\4\0\5\10\3\0\5\10\5\0\12\10\1\0\5\10\1\0\1\10\1\0\2\10\1\0\2\10\1\0"+ - "\12\10\3\0\15\10\3\0\2\10\30\0\16\10\4\0\1\10\2\0\6\10\2\0\6\10\2\0\6\10\2"+ - "\0\3\10\3\0\14\10\1\0\16\10\1\0\2\10\1\0\1\10\15\0\1\10\2\0\4\10\4\0\10\10"+ - "\1\0\5\10\12\0\6\10\2\0\1\10\1\0\14\10\1\0\2\10\3\0\1\10\2\0\4\10\1\0\2\10"+ - "\12\0\10\10\6\0\6\10\1\0\2\10\5\0\10\10\1\0\3\10\1\0\13\10\4\0\3\10\4\0\5"+ - "\10\2\0\1\10\11\0\5\10\5\0\3\10\3\0\13\10\1\0\1\10\3\0\10\10\6\0\1\10\1\0"+ - "\7\10\1\0\1\10\1\0\4\10\1\0\2\10\6\0\1\10\5\0\7\10\2\0\7\10\3\0\6\10\1\0\1"+ - "\10\10\0\6\10\2\0\10\10\10\0\6\10\2\0\1\10\3\0\1\10\13\0\10\10\5\0\15\10\3"+ - "\0\2\10\6\0\5\10\3\0\6\10\10\0\10\10\2\0\7\10\16\0\4\10\4\0\3\10\15\0\1\10"+ - "\2\0\2\10\2\0\4\10\1\0\14\10\1\0\1\10\1\0\7\10\1\0\21\10\1\0\4\10\2\0\10\10"+ - "\1\0\7\10\1\0\14\10\1\0\4\10\1\0\5\10\1\0\1\10\3\0\11\10\1\0\10\10\2\0\2\10"+ - "\5\0\1\10\16\0\1\10\13\0\2\10\1\0\2\10\1\0\5\10\6\0\2\10\1\0\1\10\2\0\1\10"+ - "\1\0\12\10\1\0\4\10\1\0\1\10\1\0\1\10\6\0\1\10\4\0\1\10\1\0\1\10\1\0\1\10"+ - "\1\0\3\10\1\0\2\10\1\0\1\10\2\0\1\10\1\0\1\10\1\0\1\10\1\0\1\10\1\0\1\10\1"+ - "\0\2\10\1\0\1\10\2\0\4\10\1\0\7\10\1\0\4\10\1\0\4\10\1\0\1\10\1\0\12\10\1"+ - "\0\5\10\1\0\3\10\1\0\5\10\1\0\5\10"); + "\11\0\1\16\1\2\2\4\1\3\22\0\1\16\7\0\1\47\1\10\1\5\1\0\1\45\1\15\1\11\1\1"+ + "\12\14\1\21\1\0\1\20\1\0\1\17\1\6\1\0\32\14\1\12\1\7\1\13\1\0\1\14\1\0\1\40"+ + "\1\41\1\42\1\14\1\23\1\14\1\30\1\22\1\32\1\14\1\36\1\24\1\26\1\34\1\33\1\25"+ + "\1\14\1\31\1\27\1\37\1\35\1\51\1\14\1\43\1\50\1\14\1\46\1\0\1\44\7\0\1\4\12"+ + "\0\1\16\11\0\1\14\12\0\1\14\4\0\1\14\5\0\27\14\1\0\12\14\4\0\14\14\16\0\5"+ + "\14\7\0\1\14\1\0\1\14\1\0\5\14\1\0\2\14\2\0\4\14\1\0\1\14\6\0\1\14\1\0\3\14"+ + "\1\0\1\14\1\0\4\14\1\0\23\14\1\0\20\14\2\0\1\14\6\0\10\14\10\0\16\14\1\0\1"+ + "\14\1\0\2\14\1\0\2\14\1\0\1\14\10\0\13\14\5\0\3\14\15\0\12\14\4\0\6\14\1\0"+ + "\10\14\2\0\12\14\1\0\23\14\2\0\14\14\2\0\11\14\4\0\1\14\5\0\16\14\2\0\14\14"+ + "\4\0\5\14\1\0\10\14\6\0\20\14\2\0\13\14\2\0\16\14\1\0\1\14\3\0\4\14\2\0\11"+ + "\14\2\0\2\14\2\0\4\14\10\0\1\14\4\0\2\14\1\0\1\14\1\0\3\14\1\0\6\14\4\0\2"+ + "\14\1\0\2\14\1\0\2\14\1\0\2\14\2\0\1\14\1\0\5\14\4\0\2\14\2\0\3\14\3\0\1\14"+ + "\7\0\4\14\1\0\1\14\7\0\20\14\13\0\3\14\1\0\11\14\1\0\2\14\1\0\2\14\1\0\5\14"+ + "\2\0\12\14\1\0\3\14\1\0\3\14\2\0\1\14\30\0\1\14\7\0\3\14\1\0\10\14\2\0\6\14"+ + "\2\0\2\14\2\0\3\14\10\0\2\14\4\0\2\14\1\0\1\14\1\0\1\14\20\0\2\14\1\0\6\14"+ + "\3\0\3\14\1\0\4\14\3\0\2\14\1\0\1\14\1\0\2\14\3\0\2\14\3\0\3\14\3\0\5\14\3"+ + "\0\3\14\1\0\4\14\2\0\1\14\6\0\1\14\10\0\4\14\1\0\10\14\1\0\3\14\1\0\30\14"+ + "\3\0\10\14\1\0\3\14\1\0\4\14\7\0\2\14\1\0\3\14\5\0\4\14\1\0\5\14\2\0\4\14"+ + "\5\0\2\14\7\0\1\14\2\0\2\14\16\0\3\14\1\0\10\14\1\0\7\14\1\0\3\14\1\0\5\14"+ + "\5\0\4\14\7\0\1\14\12\0\6\14\2\0\2\14\1\0\22\14\3\0\10\14\1\0\11\14\1\0\1"+ + "\14\2\0\7\14\3\0\1\14\4\0\6\14\1\0\1\14\1\0\10\14\2\0\2\14\14\0\17\14\1\0"+ + "\12\14\7\0\2\14\1\0\1\14\2\0\2\14\1\0\1\14\2\0\1\14\6\0\4\14\1\0\7\14\1\0"+ + "\3\14\1\0\1\14\1\0\1\14\2\0\2\14\1\0\15\14\1\0\3\14\2\0\5\14\1\0\1\14\1\0"+ + "\6\14\2\0\12\14\2\0\4\14\10\0\2\14\13\0\1\14\1\0\1\14\1\0\1\14\4\0\12\14\1"+ + "\0\24\14\3\0\5\14\1\0\12\14\6\0\1\14\11\0\6\14\1\0\1\14\5\0\1\14\2\0\13\14"+ + "\1\0\15\14\1\0\4\14\2\0\7\14\1\0\1\14\1\0\4\14\2\0\1\14\1\0\4\14\2\0\7\14"+ + "\1\0\1\14\1\0\4\14\2\0\16\14\2\0\6\14\2\0\1\16\32\14\3\0\13\14\7\0\15\14\1"+ + "\0\7\14\13\0\4\14\14\0\1\14\1\0\2\14\14\0\4\14\3\0\1\14\4\0\2\14\15\0\3\14"+ + "\11\0\1\14\23\0\10\14\1\0\23\14\1\0\2\14\6\0\6\14\5\0\15\14\1\0\1\14\1\0\1"+ + "\14\1\0\1\14\1\0\6\14\1\0\7\14\1\0\1\14\3\0\3\14\1\0\7\14\3\0\4\14\2\0\6\14"+ + "\4\0\13\16\15\0\2\4\5\0\1\16\17\0\1\14\4\0\1\14\12\0\1\16\1\0\1\14\15\0\1"+ + "\14\2\0\1\14\4\0\1\14\2\0\12\14\1\0\1\14\3\0\5\14\6\0\1\14\1\0\1\14\1\0\1"+ + "\14\1\0\4\14\1\0\1\14\5\0\5\14\4\0\1\14\1\0\5\14\6\0\15\14\7\0\10\14\11\0"+ + "\7\14\1\0\7\14\1\0\1\16\4\0\3\14\11\0\5\14\2\0\5\14\3\0\7\14\2\0\2\14\2\0"+ + "\3\14\5\0\16\14\1\0\12\14\1\0\1\14\7\0\11\14\2\0\27\14\2\0\15\14\3\0\1\14"+ + "\1\0\1\14\2\0\1\14\16\0\1\14\2\0\5\14\12\0\6\14\2\0\6\14\2\0\6\14\11\0\13"+ + "\14\1\0\2\14\2\0\7\14\4\0\5\14\3\0\5\14\5\0\12\14\1\0\5\14\1\0\1\14\1\0\2"+ + "\14\1\0\2\14\1\0\12\14\3\0\15\14\3\0\2\14\30\0\16\14\4\0\1\14\2\0\6\14\2\0"+ + "\6\14\2\0\6\14\2\0\3\14\3\0\14\14\1\0\16\14\1\0\2\14\1\0\1\14\15\0\1\14\2"+ + "\0\4\14\4\0\10\14\1\0\5\14\12\0\6\14\2\0\1\14\1\0\14\14\1\0\2\14\3\0\1\14"+ + "\2\0\4\14\1\0\2\14\12\0\10\14\6\0\6\14\1\0\2\14\5\0\10\14\1\0\3\14\1\0\13"+ + "\14\4\0\3\14\4\0\5\14\2\0\1\14\11\0\5\14\5\0\3\14\3\0\13\14\1\0\1\14\3\0\10"+ + "\14\6\0\1\14\1\0\7\14\1\0\1\14\1\0\4\14\1\0\2\14\6\0\1\14\5\0\7\14\2\0\7\14"+ + "\3\0\6\14\1\0\1\14\10\0\6\14\2\0\10\14\10\0\6\14\2\0\1\14\3\0\1\14\13\0\10"+ + "\14\5\0\15\14\3\0\2\14\6\0\5\14\3\0\6\14\10\0\10\14\2\0\7\14\16\0\4\14\4\0"+ + "\3\14\15\0\1\14\2\0\2\14\2\0\4\14\1\0\14\14\1\0\1\14\1\0\7\14\1\0\21\14\1"+ + "\0\4\14\2\0\10\14\1\0\7\14\1\0\14\14\1\0\4\14\1\0\5\14\1\0\1\14\3\0\11\14"+ + "\1\0\10\14\2\0\2\14\5\0\1\14\16\0\1\14\13\0\2\14\1\0\2\14\1\0\5\14\6\0\2\14"+ + "\1\0\1\14\2\0\1\14\1\0\12\14\1\0\4\14\1\0\1\14\1\0\1\14\6\0\1\14\4\0\1\14"+ + "\1\0\1\14\1\0\1\14\1\0\3\14\1\0\2\14\1\0\1\14\2\0\1\14\1\0\1\14\1\0\1\14\1"+ + "\0\1\14\1\0\1\14\1\0\2\14\1\0\1\14\2\0\4\14\1\0\7\14\1\0\4\14\1\0\4\14\1\0"+ + "\1\14\1\0\12\14\1\0\5\14\1\0\3\14\1\0\5\14\1\0\5\14"); /** * Translates DFA states to action switch labels. @@ -202,16 +202,16 @@ public static int ZZ_CMAP(int ch) { "\1\6\7\7\1\10\1\11\1\12\1\13\1\14\1\15"+ "\1\16\1\1\1\15\1\17\1\2\1\15\1\20\1\21"+ "\1\22\1\23\3\4\1\24\1\25\1\26\1\27\1\30"+ - "\1\31\1\32\1\33\1\34\1\35\1\36\1\37\1\40"+ - "\1\41\1\42\1\43\1\44\1\3\1\4\10\7\3\0"+ - "\1\33\2\0\1\45\1\46\11\7\5\0\1\47\1\50"+ - "\4\7\1\51\2\7\3\0\1\52\4\7\1\53\2\7"+ - "\3\0\3\7\1\54\1\55\1\7\1\0\1\56\1\0"+ - "\1\57\1\7\1\60\1\61\1\0\1\62\1\7\1\63"+ - "\1\7\1\64"; + "\1\31\1\32\2\4\1\33\1\34\1\4\1\35\1\36"+ + "\1\37\1\40\1\41\1\42\1\43\1\44\1\45\2\3"+ + "\1\46\10\7\4\0\1\47\2\0\1\50\1\51\1\52"+ + "\11\7\3\0\1\50\1\53\1\54\4\7\1\55\2\7"+ + "\3\0\4\7\1\56\2\7\3\0\3\7\1\57\1\60"+ + "\1\7\1\0\1\61\1\0\1\62\1\7\1\63\1\64"+ + "\1\0\1\65\1\7\1\66\1\7\1\67"; private static int [] zzUnpackAction() { - int [] result = new int[142]; + int [] result = new int[147]; int offset = 0; offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); return result; @@ -236,27 +236,28 @@ private static int zzUnpackAction(String packed, int offset, int [] result) { private static final int [] ZZ_ROWMAP = zzUnpackRowMap(); private static final String ZZ_ROWMAP_PACKED_0 = - "\0\0\0\50\0\120\0\170\0\240\0\310\0\360\0\u0118"+ - "\0\u0140\0\u0168\0\u0190\0\u01b8\0\u01e0\0\u0208\0\u0230\0\u0258"+ - "\0\u0280\0\u02a8\0\u02d0\0\u02f8\0\u0320\0\u0348\0\u0370\0\u0348"+ - "\0\u0348\0\u0398\0\u03c0\0\u03e8\0\u0410\0\u0438\0\u0460\0\u0488"+ - "\0\u0348\0\u0348\0\u04b0\0\u0348\0\u0348\0\u0348\0\u0348\0\u04d8"+ - "\0\u04d8\0\u0348\0\u0500\0\u0500\0\u0348\0\u0528\0\u0348\0\u0348"+ - "\0\u0550\0\u0578\0\u05a0\0\u0348\0\u05c8\0\u0348\0\u05f0\0\u0348"+ - "\0\u0618\0\u0348\0\u0640\0\u0668\0\u0348\0\u0690\0\u06b8\0\u0348"+ - "\0\u0348\0\u06e0\0\u0708\0\u0348\0\u0730\0\u0758\0\u0780\0\u07a8"+ - "\0\u07d0\0\u07f8\0\u0820\0\u0848\0\u0870\0\u0898\0\u08c0\0\u08e8"+ - "\0\u0910\0\u0938\0\u0960\0\u0988\0\u0348\0\u0348\0\u09b0\0\u09d8"+ - "\0\u0a00\0\u0a28\0\u0a50\0\u0a78\0\u0aa0\0\u0ac8\0\u0af0\0\u0b18"+ - "\0\u0b40\0\u0b68\0\u0b90\0\u0bb8\0\u0be0\0\u0398\0\u0c08\0\u0c30"+ - "\0\u0c58\0\u0c80\0\u0398\0\u0ca8\0\u0cd0\0\u0cf8\0\u0d20\0\u0d48"+ - "\0\u0348\0\u0d70\0\u0d98\0\u0dc0\0\u0de8\0\u0398\0\u0e10\0\u0e38"+ - "\0\u0e60\0\u0e88\0\u0eb0\0\u0ed8\0\u0f00\0\u0f28\0\u0398\0\u0398"+ - "\0\u0f50\0\u0f78\0\u0348\0\u0fa0\0\u0398\0\u0fc8\0\u0398\0\u0398"+ - "\0\u0ff0\0\u0348\0\u1018\0\u0348\0\u1040\0\u0398"; + "\0\0\0\52\0\124\0\176\0\250\0\322\0\374\0\u0126"+ + "\0\u0150\0\u017a\0\u01a4\0\u01ce\0\u01f8\0\u0222\0\u024c\0\u0276"+ + "\0\u02a0\0\u02ca\0\u02f4\0\u031e\0\u0348\0\u0372\0\u039c\0\u0372"+ + "\0\u0372\0\u03c6\0\u03f0\0\u041a\0\u0444\0\u046e\0\u0498\0\u04c2"+ + "\0\u0372\0\u0372\0\u04ec\0\u0372\0\u0372\0\u0372\0\u0372\0\u0516"+ + "\0\u0516\0\u0372\0\u0540\0\u0540\0\u0372\0\u0372\0\u056a\0\u0372"+ + "\0\u0594\0\u05be\0\u05e8\0\u0372\0\u0612\0\u0372\0\u063c\0\u0372"+ + "\0\u0666\0\u0372\0\u0690\0\u06ba\0\u06e4\0\u070e\0\u0738\0\u0762"+ + "\0\u0372\0\u078c\0\u0372\0\u0372\0\u07b6\0\u07e0\0\u0372\0\u080a"+ + "\0\u0834\0\u085e\0\u0888\0\u08b2\0\u08dc\0\u0906\0\u0930\0\u095a"+ + "\0\u0984\0\u09ae\0\u09d8\0\u0a02\0\u0a2c\0\u0a56\0\u0a80\0\u0372"+ + "\0\u0738\0\u0aaa\0\u0372\0\u0762\0\u0372\0\u0ad4\0\u0afe\0\u0b28"+ + "\0\u0b52\0\u0b7c\0\u0ba6\0\u0bd0\0\u0bfa\0\u0c24\0\u0c4e\0\u0c78"+ + "\0\u0ca2\0\u0738\0\u0ccc\0\u03c6\0\u0cf6\0\u0d20\0\u0d4a\0\u0d74"+ + "\0\u03c6\0\u0d9e\0\u0dc8\0\u0df2\0\u0e1c\0\u0e46\0\u0e70\0\u0e9a"+ + "\0\u0ec4\0\u0eee\0\u03c6\0\u0f18\0\u0f42\0\u0f6c\0\u0f96\0\u0fc0"+ + "\0\u0fea\0\u1014\0\u103e\0\u03c6\0\u03c6\0\u1068\0\u1092\0\u0372"+ + "\0\u10bc\0\u03c6\0\u10e6\0\u03c6\0\u03c6\0\u1110\0\u0372\0\u113a"+ + "\0\u0372\0\u1164\0\u03c6"; private static int [] zzUnpackRowMap() { - int [] result = new int[142]; + int [] result = new int[147]; int offset = 0; offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); return result; @@ -279,91 +280,94 @@ private static int zzUnpackRowMap(String packed, int offset, int [] result) { private static final int [] ZZ_TRANS = zzUnpackTrans(); private static final String ZZ_TRANS_PACKED_0 = - "\1\26\1\27\2\30\1\31\3\26\1\32\5\26\1\31"+ - "\1\33\2\32\1\34\6\32\1\35\1\36\2\32\1\37"+ - "\1\32\1\40\1\32\1\41\4\26\2\32\2\26\2\30"+ - "\1\42\3\26\1\43\5\26\1\42\22\43\1\26\1\44"+ - "\1\45\2\26\2\43\2\26\2\46\46\26\2\46\1\47"+ - "\11\26\1\47\31\26\2\50\1\46\1\51\44\50\2\26"+ - "\2\46\1\52\11\26\1\52\31\26\2\53\1\46\1\54"+ - "\44\53\2\26\2\46\1\55\11\26\1\55\33\26\2\46"+ - "\4\26\1\56\1\26\1\57\4\26\22\56\5\26\2\56"+ - "\2\26\2\46\1\60\11\26\1\60\33\26\2\46\14\26"+ - "\1\61\1\26\1\62\14\26\1\63\12\26\2\46\1\64"+ - "\11\26\1\64\33\26\2\46\4\26\1\65\6\26\22\65"+ - "\5\26\2\65\2\26\2\46\1\66\11\26\1\66\33\26"+ - "\2\46\1\31\3\26\1\67\5\26\1\31\22\67\5\26"+ - "\2\67\2\26\2\46\1\70\11\26\1\70\33\26\2\46"+ - "\1\31\3\26\1\71\5\26\1\31\22\71\5\26\2\71"+ - "\2\26\2\72\1\31\3\26\1\73\1\74\4\26\1\31"+ - "\22\73\2\26\1\45\2\26\2\73\2\26\3\42\1\75"+ - "\2\26\1\76\1\77\4\26\1\42\22\76\1\26\1\100"+ - "\1\26\1\101\1\26\2\76\2\26\2\72\1\42\1\102"+ - "\1\103\7\26\1\42\25\26\1\101\1\104\2\26\7\105"+ - "\1\26\34\105\1\26\1\104\2\105\51\0\1\106\56\0"+ - "\2\32\5\0\22\32\5\0\2\32\10\0\2\32\5\0"+ - "\1\32\1\107\7\32\1\110\10\32\5\0\2\32\10\0"+ - "\2\32\5\0\1\32\1\111\7\32\1\112\10\32\5\0"+ - "\2\32\10\0\2\32\5\0\11\32\1\113\10\32\5\0"+ - "\2\32\10\0\2\32\5\0\5\32\1\114\14\32\5\0"+ - "\2\32\10\0\2\32\5\0\5\32\1\115\14\32\5\0"+ - "\2\32\10\0\2\32\5\0\11\32\1\116\10\32\5\0"+ - "\2\32\10\0\2\43\5\0\22\43\5\0\2\43\2\50"+ - "\1\0\45\50\2\53\1\0\45\53\10\0\2\56\5\0"+ - "\22\56\5\0\2\56\47\0\1\117\21\0\1\120\56\0"+ - "\1\121\27\0\2\65\5\0\22\65\5\0\2\65\10\0"+ - "\2\67\5\0\22\67\5\0\2\67\10\0\2\71\5\0"+ - "\22\71\5\0\2\71\10\0\1\73\1\122\1\123\1\124"+ - "\1\0\1\125\1\0\22\73\5\0\2\73\11\0\1\74"+ - "\46\0\2\76\5\0\22\76\5\0\2\76\11\0\1\77"+ - "\44\0\1\126\46\0\1\126\42\0\7\105\1\0\34\105"+ - "\2\0\2\105\2\106\3\0\43\106\10\0\2\32\5\0"+ - "\2\32\1\127\17\32\5\0\2\32\10\0\2\32\5\0"+ - "\11\32\1\130\10\32\5\0\2\32\10\0\2\32\5\0"+ - "\7\32\1\131\12\32\5\0\2\32\10\0\2\32\5\0"+ - "\5\32\1\132\14\32\5\0\2\32\10\0\2\32\5\0"+ - "\1\133\14\32\1\134\4\32\5\0\2\32\10\0\2\32"+ - "\5\0\1\32\1\135\20\32\5\0\2\32\10\0\2\32"+ - "\5\0\5\32\1\136\14\32\5\0\2\32\10\0\2\32"+ - "\5\0\12\32\1\137\7\32\5\0\2\32\20\0\1\140"+ - "\64\0\1\141\43\0\1\142\26\0\2\122\1\123\1\124"+ - "\3\0\22\122\5\0\2\122\12\0\1\143\51\0\1\144"+ - "\43\0\2\32\5\0\3\32\1\145\16\32\5\0\2\32"+ - "\10\0\2\32\5\0\14\32\1\146\5\32\5\0\2\32"+ - "\10\0\2\32\5\0\4\32\1\147\15\32\5\0\2\32"+ - "\10\0\2\32\5\0\15\32\1\150\4\32\5\0\2\32"+ - "\10\0\2\32\5\0\1\32\1\151\20\32\5\0\2\32"+ - "\10\0\2\32\5\0\16\32\1\152\3\32\5\0\2\32"+ - "\10\0\2\32\5\0\7\32\1\153\12\32\5\0\2\32"+ - "\10\0\2\32\5\0\1\32\1\154\20\32\5\0\2\32"+ - "\10\0\2\32\5\0\15\32\1\155\4\32\5\0\2\32"+ - "\26\0\1\156\67\0\1\157\25\0\1\160\35\0\1\144"+ - "\52\0\1\161\42\0\2\32\5\0\4\32\1\162\15\32"+ - "\5\0\2\32\10\0\2\32\5\0\10\32\1\163\11\32"+ - "\5\0\2\32\10\0\2\32\5\0\16\32\1\164\3\32"+ - "\5\0\2\32\10\0\2\32\5\0\2\32\1\165\17\32"+ - "\5\0\2\32\10\0\2\32\5\0\17\32\1\166\2\32"+ - "\5\0\2\32\10\0\2\32\5\0\7\32\1\167\12\32"+ - "\5\0\2\32\10\0\2\32\5\0\1\32\1\170\20\32"+ - "\5\0\2\32\46\0\1\171\21\0\1\172\57\0\1\173"+ - "\27\0\2\32\5\0\5\32\1\174\14\32\5\0\2\32"+ - "\10\0\2\32\5\0\5\32\1\175\14\32\5\0\2\32"+ - "\10\0\2\32\5\0\7\32\1\176\12\32\5\0\2\32"+ - "\10\0\2\32\5\0\3\32\1\177\16\32\5\0\2\32"+ - "\10\0\2\32\5\0\15\32\1\200\4\32\5\0\2\32"+ - "\10\0\2\32\5\0\21\32\1\201\5\0\2\32\30\0"+ - "\1\202\45\0\1\203\42\0\1\204\36\0\2\32\5\0"+ - "\6\32\1\205\13\32\5\0\2\32\10\0\2\32\5\0"+ - "\5\32\1\206\14\32\5\0\2\32\10\0\2\32\5\0"+ - "\6\32\1\207\13\32\5\0\2\32\10\0\2\32\5\0"+ - "\15\32\1\210\4\32\5\0\2\32\31\0\1\211\36\0"+ - "\1\212\37\0\2\32\5\0\10\32\1\213\11\32\5\0"+ - "\2\32\20\0\1\214\37\0\2\32\5\0\11\32\1\215"+ - "\10\32\5\0\2\32\10\0\2\32\5\0\12\32\1\216"+ - "\7\32\5\0\2\32"; + "\1\26\1\27\2\30\1\31\7\26\1\32\1\26\1\31"+ + "\3\26\1\33\2\32\1\34\6\32\1\35\1\36\2\32"+ + "\1\37\1\32\1\40\1\32\1\41\3\26\2\32\2\26"+ + "\2\30\1\42\7\26\1\43\1\26\1\42\3\26\22\43"+ + "\1\26\1\44\1\45\1\26\2\43\2\26\2\46\50\26"+ + "\2\46\1\47\11\26\1\47\33\26\2\50\1\46\1\51"+ + "\46\50\2\26\2\46\1\52\11\26\1\52\33\26\2\53"+ + "\1\46\1\54\46\53\2\26\2\46\1\55\11\26\1\55"+ + "\35\26\2\46\5\26\1\56\2\26\1\57\5\26\22\57"+ + "\4\26\2\57\2\26\2\46\1\60\11\26\1\60\35\26"+ + "\2\46\17\26\1\61\1\26\1\62\14\26\1\63\11\26"+ + "\2\46\1\64\11\26\1\64\35\26\2\46\10\26\1\65"+ + "\5\26\22\65\4\26\2\65\2\26\2\46\1\66\11\26"+ + "\1\66\35\26\2\46\1\31\7\26\1\67\1\26\1\31"+ + "\3\26\22\67\4\26\2\67\2\26\2\46\1\70\11\26"+ + "\1\70\35\26\2\46\1\31\7\26\1\71\1\26\1\31"+ + "\3\26\22\71\4\26\2\71\2\26\2\72\1\31\4\26"+ + "\1\73\1\74\1\26\1\75\1\76\1\31\1\26\1\77"+ + "\1\100\22\75\2\26\1\45\1\26\2\75\2\26\3\42"+ + "\1\101\6\26\1\102\1\26\1\42\3\26\22\102\1\26"+ + "\1\103\1\26\1\104\2\102\2\26\2\72\1\42\1\105"+ + "\1\106\1\26\1\107\3\26\1\110\1\26\1\42\3\26"+ + "\22\110\3\26\1\104\2\110\2\111\1\26\4\111\1\112"+ + "\1\107\36\111\1\26\2\111\53\0\1\113\64\0\2\32"+ + "\4\0\22\32\4\0\2\32\14\0\2\32\4\0\1\32"+ + "\1\114\7\32\1\115\10\32\4\0\2\32\14\0\2\32"+ + "\4\0\1\32\1\116\7\32\1\117\10\32\4\0\2\32"+ + "\14\0\2\32\4\0\11\32\1\120\10\32\4\0\2\32"+ + "\14\0\2\32\4\0\5\32\1\121\14\32\4\0\2\32"+ + "\14\0\2\32\4\0\5\32\1\122\14\32\4\0\2\32"+ + "\14\0\2\32\4\0\11\32\1\123\10\32\4\0\2\32"+ + "\14\0\2\43\4\0\22\43\4\0\2\43\2\50\1\0"+ + "\47\50\2\53\1\0\47\53\14\0\2\57\4\0\22\57"+ + "\4\0\2\57\51\0\1\124\24\0\1\125\60\0\1\126"+ + "\32\0\2\65\4\0\22\65\4\0\2\65\14\0\2\67"+ + "\4\0\22\67\4\0\2\67\14\0\2\71\4\0\22\71"+ + "\4\0\2\71\11\0\1\127\53\0\1\130\52\0\1\75"+ + "\5\0\22\75\4\0\2\75\15\0\1\76\34\0\2\131"+ + "\1\0\4\131\1\132\7\131\1\133\1\0\31\131\15\0"+ + "\1\134\50\0\2\102\4\0\22\102\4\0\2\102\6\0"+ + "\1\135\50\0\1\135\60\0\2\110\4\0\22\110\4\0"+ + "\2\110\2\111\1\0\4\111\1\112\1\0\36\111\1\0"+ + "\4\111\1\0\4\111\1\112\42\111\2\113\3\0\45\113"+ + "\14\0\2\32\4\0\2\32\1\136\17\32\4\0\2\32"+ + "\14\0\2\32\4\0\11\32\1\137\10\32\4\0\2\32"+ + "\14\0\2\32\4\0\7\32\1\140\12\32\4\0\2\32"+ + "\14\0\2\32\4\0\5\32\1\141\14\32\4\0\2\32"+ + "\14\0\2\32\4\0\1\142\14\32\1\143\4\32\4\0"+ + "\2\32\14\0\2\32\4\0\1\32\1\144\20\32\4\0"+ + "\2\32\14\0\2\32\4\0\5\32\1\145\14\32\4\0"+ + "\2\32\14\0\2\32\4\0\12\32\1\146\7\32\4\0"+ + "\2\32\23\0\1\147\66\0\1\150\45\0\1\151\26\0"+ + "\1\130\40\0\2\131\1\0\4\131\1\132\7\131\1\152"+ + "\32\131\14\0\2\32\4\0\3\32\1\153\16\32\4\0"+ + "\2\32\14\0\2\32\4\0\14\32\1\154\5\32\4\0"+ + "\2\32\14\0\2\32\4\0\4\32\1\155\15\32\4\0"+ + "\2\32\14\0\2\32\4\0\15\32\1\156\4\32\4\0"+ + "\2\32\14\0\2\32\4\0\1\32\1\157\20\32\4\0"+ + "\2\32\14\0\2\32\4\0\16\32\1\160\3\32\4\0"+ + "\2\32\14\0\2\32\4\0\7\32\1\161\12\32\4\0"+ + "\2\32\14\0\2\32\4\0\1\32\1\162\20\32\4\0"+ + "\2\32\14\0\2\32\4\0\15\32\1\163\4\32\4\0"+ + "\2\32\31\0\1\164\70\0\1\165\30\0\1\166\36\0"+ + "\2\32\4\0\4\32\1\167\15\32\4\0\2\32\14\0"+ + "\2\32\4\0\10\32\1\170\11\32\4\0\2\32\14\0"+ + "\2\32\4\0\16\32\1\171\3\32\4\0\2\32\14\0"+ + "\2\32\4\0\2\32\1\172\17\32\4\0\2\32\14\0"+ + "\2\32\4\0\17\32\1\173\2\32\4\0\2\32\14\0"+ + "\2\32\4\0\7\32\1\174\12\32\4\0\2\32\14\0"+ + "\2\32\4\0\1\32\1\175\20\32\4\0\2\32\50\0"+ + "\1\176\24\0\1\177\61\0\1\200\32\0\2\32\4\0"+ + "\5\32\1\201\14\32\4\0\2\32\14\0\2\32\4\0"+ + "\5\32\1\202\14\32\4\0\2\32\14\0\2\32\4\0"+ + "\7\32\1\203\12\32\4\0\2\32\14\0\2\32\4\0"+ + "\3\32\1\204\16\32\4\0\2\32\14\0\2\32\4\0"+ + "\15\32\1\205\4\32\4\0\2\32\14\0\2\32\4\0"+ + "\21\32\1\206\4\0\2\32\33\0\1\207\47\0\1\210"+ + "\44\0\1\211\41\0\2\32\4\0\6\32\1\212\13\32"+ + "\4\0\2\32\14\0\2\32\4\0\5\32\1\213\14\32"+ + "\4\0\2\32\14\0\2\32\4\0\6\32\1\214\13\32"+ + "\4\0\2\32\14\0\2\32\4\0\15\32\1\215\4\32"+ + "\4\0\2\32\34\0\1\216\40\0\1\217\42\0\2\32"+ + "\4\0\10\32\1\220\11\32\4\0\2\32\23\0\1\221"+ + "\42\0\2\32\4\0\11\32\1\222\10\32\4\0\2\32"+ + "\14\0\2\32\4\0\12\32\1\223\7\32\4\0\2\32"; private static int [] zzUnpackTrans() { - int [] result = new int[4200]; + int [] result = new int[4494]; int offset = 0; offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result); return result; @@ -403,14 +407,14 @@ private static int zzUnpackTrans(String packed, int offset, int [] result) { private static final String ZZ_ATTRIBUTE_PACKED_0 = "\4\0\1\1\1\0\1\1\15\0\1\1\1\11\1\1"+ "\2\11\7\1\2\11\1\1\4\11\2\1\1\11\2\1"+ - "\1\11\1\1\2\11\3\1\1\11\1\1\1\11\1\1"+ - "\1\11\1\1\1\11\2\1\1\11\2\1\2\11\2\1"+ - "\1\11\12\1\3\0\1\1\2\0\2\11\11\1\5\0"+ - "\11\1\3\0\1\11\7\1\3\0\6\1\1\0\1\11"+ - "\1\0\4\1\1\0\1\11\1\1\1\11\2\1"; + "\2\11\1\1\1\11\3\1\1\11\1\1\1\11\1\1"+ + "\1\11\1\1\1\11\6\1\1\11\1\1\2\11\2\1"+ + "\1\11\14\1\4\0\1\11\2\0\1\11\1\1\1\11"+ + "\11\1\3\0\12\1\3\0\7\1\3\0\6\1\1\0"+ + "\1\11\1\0\4\1\1\0\1\11\1\1\1\11\2\1"; private static int [] zzUnpackAttribute() { - int [] result = new int[142]; + int [] result = new int[147]; int offset = 0; offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result); return result; @@ -719,262 +723,277 @@ else if (zzAtEOF) { { return HELPMESSAGE; } // fall through - case 53: break; + case 56: break; case 2: { return HELPMSGKEY; } // fall through - case 54: break; + case 57: break; case 3: { return DEFAULT_VALUE; } // fall through - case 55: break; + case 58: break; case 4: - { return COMMENT; + { return BAD_CHARACTER; } // fall through - case 56: break; + case 59: break; case 5: { return NEWLINE; } // fall through - case 57: break; + case 60: break; case 6: { return SPACE; } // fall through - case 58: break; + case 61: break; case 7: { yybegin(COMMAND);return COMMANDNAME; } // fall through - case 59: break; + case 62: break; case 8: { return CBRACKET; } // fall through - case 60: break; + case 63: break; case 9: { yybegin(ARGS);return SPACE; } // fall through - case 61: break; + case 64: break; case 10: { return ALIAS; } // fall through - case 62: break; + case 65: break; case 11: { return ALIASSEPARATOR; } // fall through - case 63: break; + case 66: break; case 12: { yybegin(YYINITIAL);return OBRACKET; } // fall through - case 64: break; + case 67: break; case 13: { yybegin(YYINITIAL);return NEWLINE; } // fall through - case 65: break; + case 68: break; case 14: { yybegin(HELPVALUE);return SEPARATOR; } // fall through - case 66: break; + case 69: break; case 15: { yybegin(HELPMSGVALUE);return SEPARATOR; } // fall through - case 67: break; + case 70: break; case 16: { yybegin(PERMISSIONVALUE);return SEPARATOR; } // fall through - case 68: break; + case 71: break; case 17: - { return PERMISSION_VALUE; + { return DOT; } // fall through - case 69: break; + case 72: break; case 18: - { return DOT; + { return PERMISSION_VALUE; } // fall through - case 70: break; + case 73: break; case 19: { yybegin(USERVALUE);return SEPARATOR; } // fall through - case 71: break; + case 74: break; case 20: { yybegin(HOOKVALUE);return SEPARATOR; } // fall through - case 72: break; + case 75: break; case 21: { return HOOKNAME; } // fall through - case 73: break; + case 76: break; case 22: { yybegin(CONTEXTVALUE);return SEPARATOR; } // fall through - case 74: break; + case 77: break; case 23: { return CONTEXTNAME; } // fall through - case 75: break; + case 78: break; case 24: { yybegin(ASSERTVALUE);return SEPARATOR; } // fall through - case 76: break; + case 79: break; case 25: { return ASSERTNAME; } // fall through - case 77: break; + case 80: break; case 26: { yybegin(COMMAND);return NEWLINE; } // fall through - case 78: break; + case 81: break; case 27: - { yybegin(ARG);return ARG_NAME; + { return ARG_TYPE; } // fall through - case 79: break; + case 82: break; case 28: { yybegin(FLAG);return DASHES; } // fall through - case 80: break; + case 83: break; case 29: - { return FLAG_MODIFIER; + { yybegin(ARG);return COLON; } // fall through - case 81: break; + case 84: break; case 30: - { return FLAG_NAME; + { return FLAG_MODIFIER; } // fall through - case 82: break; + case 85: break; case 31: - { return DASHES; + { return FLAG_NAME; } // fall through - case 83: break; + case 86: break; case 32: { return COMMA; } // fall through - case 84: break; + case 87: break; case 33: { yybegin(DEFAULTVALUE);return BRACKET_OPEN; } // fall through - case 85: break; + case 88: break; case 34: { return NOSHOWTYPE; } // fall through - case 86: break; + case 89: break; case 35: { return NOTREQUIRED; } // fall through - case 87: break; + case 90: break; case 36: { yybegin(ARGS);return BRACKET_CLOSE; } // fall through - case 88: break; + case 91: break; case 37: - { return ARG_TYPE; + { return ARG_NAME; } // fall through - case 89: break; + case 92: break; case 38: - { return BOTHMODIFIERS; + { return COMMENT; } // fall through - case 90: break; + case 93: break; case 39: - { yybegin(HELP);return RedLibCommandTypes.HELP; + { return CONSUME_TOKEN; } // fall through - case 91: break; + case 94: break; case 40: - { yybegin(HOOK);return RedLibCommandTypes.HOOK; + { return CONSTRAINT; } // fall through - case 92: break; + case 95: break; case 41: - { yybegin(USER);return RedLibCommandTypes.USER; + { yybegin(FLAG);return FLAG_COLON; } // fall through - case 93: break; + case 96: break; case 42: - { return ARG_TYPE_CONSUME; + { return BOTHMODIFIERS; } // fall through - case 94: break; + case 97: break; case 43: - { yybegin(NOARG);return NOTAB; + { yybegin(HELP);return RedLibCommandTypes.HELP; } // fall through - case 95: break; + case 98: break; case 44: - { yybegin(NOARG);return NOHELP; + { yybegin(HOOK);return RedLibCommandTypes.HOOK; } // fall through - case 96: break; + case 99: break; case 45: - { yybegin(ASSERT);return RedLibCommandTypes.ASSERT; + { yybegin(USER);return RedLibCommandTypes.USER; } // fall through - case 97: break; + case 100: break; case 46: - { return PLAYER; + { yybegin(NOARG);return NOTAB; } // fall through - case 98: break; + case 101: break; case 47: - { yybegin(HELPMSG);return RedLibCommandTypes.HELPMSG; + { yybegin(NOARG);return NOHELP; } // fall through - case 99: break; + case 102: break; case 48: - { yybegin(NOARG);return POSTARG; + { yybegin(ASSERT);return RedLibCommandTypes.ASSERT; } // fall through - case 100: break; + case 103: break; case 49: - { yybegin(CONTEXT);return RedLibCommandTypes.CONTEXT; + { return PLAYER; } // fall through - case 101: break; + case 104: break; case 50: - { return CONSOLE; + { yybegin(HELPMSG);return RedLibCommandTypes.HELPMSG; } // fall through - case 102: break; + case 105: break; case 51: - { return EVERYONE; + { yybegin(NOARG);return POSTARG; } // fall through - case 103: break; + case 106: break; case 52: + { yybegin(CONTEXT);return RedLibCommandTypes.CONTEXT; + } + // fall through + case 107: break; + case 53: + { return CONSOLE; + } + // fall through + case 108: break; + case 54: + { return EVERYONE; + } + // fall through + case 109: break; + case 55: { yybegin(PERMISSION);return RedLibCommandTypes.PERMISSION; } // fall through - case 104: break; + case 110: break; default: zzScanError(ZZ_NO_MATCH); } diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/parser/RedLibCommandParser.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/parser/RedLibCommandParser.java index e8cea0a..47e57b1 100644 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/parser/RedLibCommandParser.java +++ b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/parser/RedLibCommandParser.java @@ -36,19 +36,19 @@ static boolean parse_root_(IElementType t, PsiBuilder b, int l) { } /* ********************************************************** */ - // ((ARG_TYPE? Flag) | (ARG_TYPE Argument)) (newline | SPACE) - public static boolean Arg(PsiBuilder b, int l) { + // (((ARG_TYPE CONSTRAINT? FLAG_COLON)? Flag) | (ARG_TYPE CONSTRAINT? COLON Argument)) (newline | SPACE) + static boolean Arg(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "Arg")) return false; - if (!nextTokenIs(b, "", ARG_TYPE, DASHES)) return false; + if (!nextTokenIs(b, "", ARG_TYPE, FLAG_NAME)) return false; boolean r; - Marker m = enter_section_(b, l, _NONE_, ARG, ""); + Marker m = enter_section_(b); r = Arg_0(b, l + 1); r = r && Arg_1(b, l + 1); - exit_section_(b, l, m, r, false, null); + exit_section_(b, m, null, r); return r; } - // (ARG_TYPE? Flag) | (ARG_TYPE Argument) + // ((ARG_TYPE CONSTRAINT? FLAG_COLON)? Flag) | (ARG_TYPE CONSTRAINT? COLON Argument) private static boolean Arg_0(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "Arg_0")) return false; boolean r; @@ -59,7 +59,7 @@ private static boolean Arg_0(PsiBuilder b, int l) { return r; } - // ARG_TYPE? Flag + // (ARG_TYPE CONSTRAINT? FLAG_COLON)? Flag private static boolean Arg_0_0(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "Arg_0_0")) return false; boolean r; @@ -70,24 +70,52 @@ private static boolean Arg_0_0(PsiBuilder b, int l) { return r; } - // ARG_TYPE? + // (ARG_TYPE CONSTRAINT? FLAG_COLON)? private static boolean Arg_0_0_0(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "Arg_0_0_0")) return false; - consumeToken(b, ARG_TYPE); + Arg_0_0_0_0(b, l + 1); return true; } - // ARG_TYPE Argument + // ARG_TYPE CONSTRAINT? FLAG_COLON + private static boolean Arg_0_0_0_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "Arg_0_0_0_0")) return false; + boolean r; + Marker m = enter_section_(b); + r = consumeToken(b, ARG_TYPE); + r = r && Arg_0_0_0_0_1(b, l + 1); + r = r && consumeToken(b, FLAG_COLON); + exit_section_(b, m, null, r); + return r; + } + + // CONSTRAINT? + private static boolean Arg_0_0_0_0_1(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "Arg_0_0_0_0_1")) return false; + consumeToken(b, CONSTRAINT); + return true; + } + + // ARG_TYPE CONSTRAINT? COLON Argument private static boolean Arg_0_1(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "Arg_0_1")) return false; boolean r; Marker m = enter_section_(b); r = consumeToken(b, ARG_TYPE); + r = r && Arg_0_1_1(b, l + 1); + r = r && consumeToken(b, COLON); r = r && Argument(b, l + 1); exit_section_(b, m, null, r); return r; } + // CONSTRAINT? + private static boolean Arg_0_1_1(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "Arg_0_1_1")) return false; + consumeToken(b, CONSTRAINT); + return true; + } + // newline | SPACE private static boolean Arg_1(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "Arg_1")) return false; @@ -99,102 +127,49 @@ private static boolean Arg_1(PsiBuilder b, int l) { /* ********************************************************** */ // Arg* - public static boolean Args(PsiBuilder b, int l) { + static boolean Args(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "Args")) return false; - Marker m = enter_section_(b, l, _NONE_, ARGS, ""); while (true) { int c = current_position_(b); if (!Arg(b, l + 1)) break; if (!empty_element_parsed_guard_(b, "Args", c)) break; } - exit_section_(b, l, m, true, false, null); return true; } /* ********************************************************** */ - // Arg* ConsumingArg (ARG_TYPE? Flag (newline | SPACE))* - public static boolean Args_Consume(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "Args_Consume")) return false; - boolean r; - Marker m = enter_section_(b, l, _NONE_, ARGS_CONSUME, ""); - r = Args_Consume_0(b, l + 1); - r = r && ConsumingArg(b, l + 1); - r = r && Args_Consume_2(b, l + 1); - exit_section_(b, l, m, r, false, null); - return r; - } - - // Arg* - private static boolean Args_Consume_0(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "Args_Consume_0")) return false; + // ConsumingArg* + static boolean Args_Can_Consume(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "Args_Can_Consume")) return false; while (true) { int c = current_position_(b); - if (!Arg(b, l + 1)) break; - if (!empty_element_parsed_guard_(b, "Args_Consume_0", c)) break; + if (!ConsumingArg(b, l + 1)) break; + if (!empty_element_parsed_guard_(b, "Args_Can_Consume", c)) break; } return true; } - // (ARG_TYPE? Flag (newline | SPACE))* - private static boolean Args_Consume_2(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "Args_Consume_2")) return false; - while (true) { - int c = current_position_(b); - if (!Args_Consume_2_0(b, l + 1)) break; - if (!empty_element_parsed_guard_(b, "Args_Consume_2", c)) break; - } - return true; - } - - // ARG_TYPE? Flag (newline | SPACE) - private static boolean Args_Consume_2_0(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "Args_Consume_2_0")) return false; - boolean r; - Marker m = enter_section_(b); - r = Args_Consume_2_0_0(b, l + 1); - r = r && Flag(b, l + 1); - r = r && Args_Consume_2_0_2(b, l + 1); - exit_section_(b, m, null, r); - return r; - } - - // ARG_TYPE? - private static boolean Args_Consume_2_0_0(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "Args_Consume_2_0_0")) return false; - consumeToken(b, ARG_TYPE); - return true; - } - - // newline | SPACE - private static boolean Args_Consume_2_0_2(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "Args_Consume_2_0_2")) return false; - boolean r; - r = consumeToken(b, NEWLINE); - if (!r) r = consumeToken(b, SPACE); - return r; - } - /* ********************************************************** */ - // ARG_NAME (noshowtype | ((notrequired | bothmodifiers) ( BRACKET_OPEN DEFAULT_VALUE? BRACKET_CLOSE)? ))? - public static boolean Argument(PsiBuilder b, int l) { + // ARG_NAME (noshowtype | ((noshowtype) ( BRACKET_OPEN DEFAULT_VALUE? BRACKET_CLOSE)? ))? + static boolean Argument(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "Argument")) return false; if (!nextTokenIs(b, ARG_NAME)) return false; boolean r; Marker m = enter_section_(b); r = consumeToken(b, ARG_NAME); r = r && Argument_1(b, l + 1); - exit_section_(b, m, ARGUMENT, r); + exit_section_(b, m, null, r); return r; } - // (noshowtype | ((notrequired | bothmodifiers) ( BRACKET_OPEN DEFAULT_VALUE? BRACKET_CLOSE)? ))? + // (noshowtype | ((noshowtype) ( BRACKET_OPEN DEFAULT_VALUE? BRACKET_CLOSE)? ))? private static boolean Argument_1(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "Argument_1")) return false; Argument_1_0(b, l + 1); return true; } - // noshowtype | ((notrequired | bothmodifiers) ( BRACKET_OPEN DEFAULT_VALUE? BRACKET_CLOSE)? ) + // noshowtype | ((noshowtype) ( BRACKET_OPEN DEFAULT_VALUE? BRACKET_CLOSE)? ) private static boolean Argument_1_0(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "Argument_1_0")) return false; boolean r; @@ -205,26 +180,17 @@ private static boolean Argument_1_0(PsiBuilder b, int l) { return r; } - // (notrequired | bothmodifiers) ( BRACKET_OPEN DEFAULT_VALUE? BRACKET_CLOSE)? + // (noshowtype) ( BRACKET_OPEN DEFAULT_VALUE? BRACKET_CLOSE)? private static boolean Argument_1_0_1(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "Argument_1_0_1")) return false; boolean r; Marker m = enter_section_(b); - r = Argument_1_0_1_0(b, l + 1); + r = consumeToken(b, NOSHOWTYPE); r = r && Argument_1_0_1_1(b, l + 1); exit_section_(b, m, null, r); return r; } - // notrequired | bothmodifiers - private static boolean Argument_1_0_1_0(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "Argument_1_0_1_0")) return false; - boolean r; - r = consumeToken(b, NOTREQUIRED); - if (!r) r = consumeToken(b, BOTHMODIFIERS); - return r; - } - // ( BRACKET_OPEN DEFAULT_VALUE? BRACKET_CLOSE)? private static boolean Argument_1_0_1_1(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "Argument_1_0_1_1")) return false; @@ -252,12 +218,12 @@ private static boolean Argument_1_0_1_1_0_1(PsiBuilder b, int l) { } /* ********************************************************** */ - // assert separator assertname (SPACE assertname) - public static boolean AssertLine(PsiBuilder b, int l) { + // assert separator assertname (SPACE assertname)* + static boolean AssertLine(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "AssertLine")) return false; if (!nextTokenIs(b, ASSERT)) return false; boolean r, p; - Marker m = enter_section_(b, l, _NONE_, ASSERT_LINE, null); + Marker m = enter_section_(b, l, _NONE_); r = consumeTokens(b, 2, ASSERT, SEPARATOR, ASSERTNAME); p = r; // pin = 2 r = r && AssertLine_3(b, l + 1); @@ -265,9 +231,20 @@ public static boolean AssertLine(PsiBuilder b, int l) { return r || p; } - // SPACE assertname + // (SPACE assertname)* private static boolean AssertLine_3(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "AssertLine_3")) return false; + while (true) { + int c = current_position_(b); + if (!AssertLine_3_0(b, l + 1)) break; + if (!empty_element_parsed_guard_(b, "AssertLine_3", c)) break; + } + return true; + } + + // SPACE assertname + private static boolean AssertLine_3_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "AssertLine_3_0")) return false; boolean r; Marker m = enter_section_(b); r = consumeTokens(b, 0, SPACE, ASSERTNAME); @@ -277,13 +254,13 @@ private static boolean AssertLine_3(PsiBuilder b, int l) { /* ********************************************************** */ // (SPACE* newline) | COMMENT - public static boolean Blank_Line(PsiBuilder b, int l) { + static boolean Blank_Line(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "Blank_Line")) return false; boolean r; - Marker m = enter_section_(b, l, _NONE_, BLANK_LINE, ""); + Marker m = enter_section_(b); r = Blank_Line_0(b, l + 1); if (!r) r = consumeToken(b, COMMENT); - exit_section_(b, l, m, r, false, null); + exit_section_(b, m, null, r); return r; } @@ -311,15 +288,15 @@ private static boolean Blank_Line_0_0(PsiBuilder b, int l) { /* ********************************************************** */ // SPACE* CBRACKET (newline|<>) - public static boolean Close_Bracket(PsiBuilder b, int l) { + static boolean Close_Bracket(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "Close_Bracket")) return false; - if (!nextTokenIs(b, "", CBRACKET, SPACE)) return false; + if (!nextTokenIs(b, "", CBRACKET, SPACE)) return false; boolean r; - Marker m = enter_section_(b, l, _NONE_, CLOSE_BRACKET, ""); + Marker m = enter_section_(b); r = Close_Bracket_0(b, l + 1); r = r && consumeToken(b, CBRACKET); r = r && Close_Bracket_2(b, l + 1); - exit_section_(b, l, m, r, false, null); + exit_section_(b, m, null, r); return r; } @@ -346,25 +323,44 @@ private static boolean Close_Bracket_2(PsiBuilder b, int l) { } /* ********************************************************** */ - // CommandDefinition | CommandDefinition_Consume | newline - public static boolean CommandDef(PsiBuilder b, int l) { + // CommandDefinition | CommandDefinition_Consuming | newline + static boolean CommandDef(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "CommandDef")) return false; boolean r; - Marker m = enter_section_(b, l, _NONE_, COMMAND_DEF, ""); r = CommandDefinition(b, l + 1); - if (!r) r = CommandDefinition_Consume(b, l + 1); + if (!r) r = CommandDefinition_Consuming(b, l + 1); + if (!r) r = consumeToken(b, NEWLINE); + return r; + } + + /* ********************************************************** */ + // CommandDefinition_Base | CommandDefinition_Consuming_Base + static boolean CommandDef_Base(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "CommandDef_Base")) return false; + if (!nextTokenIs(b, "", COMMANDNAME, SPACE)) return false; + boolean r; + r = CommandDefinition_Base(b, l + 1); + if (!r) r = CommandDefinition_Consuming_Base(b, l + 1); + return r; + } + + /* ********************************************************** */ + // CommandDefinition_Consumed | newline + static boolean CommandDef_Consumed(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "CommandDef_Consumed")) return false; + boolean r; + r = CommandDefinition_Consumed(b, l + 1); if (!r) r = consumeToken(b, NEWLINE); - exit_section_(b, l, m, r, false, null); return r; } /* ********************************************************** */ // SPACE* commandname (aliasseparator alias)* (SPACE Args)? newline? Open_Bracket (Line | Blank_Line)* Close_Bracket - public static boolean CommandDefinition(PsiBuilder b, int l) { + static boolean CommandDefinition(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "CommandDefinition")) return false; - if (!nextTokenIs(b, "", COMMANDNAME, SPACE)) return false; + if (!nextTokenIs(b, "", COMMANDNAME, SPACE)) return false; boolean r; - Marker m = enter_section_(b, l, _NONE_, COMMAND_DEFINITION, ""); + Marker m = enter_section_(b); r = CommandDefinition_0(b, l + 1); r = r && consumeToken(b, COMMANDNAME); r = r && CommandDefinition_2(b, l + 1); @@ -373,7 +369,7 @@ public static boolean CommandDefinition(PsiBuilder b, int l) { r = r && Open_Bracket(b, l + 1); r = r && CommandDefinition_6(b, l + 1); r = r && Close_Bracket(b, l + 1); - exit_section_(b, l, m, r, false, null); + exit_section_(b, m, null, r); return r; } @@ -455,49 +451,49 @@ private static boolean CommandDefinition_6_0(PsiBuilder b, int l) { } /* ********************************************************** */ - // SPACE* commandname (aliasseparator alias)* (SPACE Args_Consume)? newline? Open_Bracket (Line_Consume | Blank_Line)* Close_Bracket - public static boolean CommandDefinition_Consume(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "CommandDefinition_Consume")) return false; - if (!nextTokenIs(b, "", COMMANDNAME, SPACE)) return false; + // SPACE* commandname (aliasseparator alias)* (SPACE Args)? newline? Open_Bracket (Line_Base | Blank_Line)* Close_Bracket + static boolean CommandDefinition_Base(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "CommandDefinition_Base")) return false; + if (!nextTokenIs(b, "", COMMANDNAME, SPACE)) return false; boolean r; - Marker m = enter_section_(b, l, _NONE_, COMMAND_DEFINITION_CONSUME, ""); - r = CommandDefinition_Consume_0(b, l + 1); + Marker m = enter_section_(b); + r = CommandDefinition_Base_0(b, l + 1); r = r && consumeToken(b, COMMANDNAME); - r = r && CommandDefinition_Consume_2(b, l + 1); - r = r && CommandDefinition_Consume_3(b, l + 1); - r = r && CommandDefinition_Consume_4(b, l + 1); + r = r && CommandDefinition_Base_2(b, l + 1); + r = r && CommandDefinition_Base_3(b, l + 1); + r = r && CommandDefinition_Base_4(b, l + 1); r = r && Open_Bracket(b, l + 1); - r = r && CommandDefinition_Consume_6(b, l + 1); + r = r && CommandDefinition_Base_6(b, l + 1); r = r && Close_Bracket(b, l + 1); - exit_section_(b, l, m, r, false, null); + exit_section_(b, m, null, r); return r; } // SPACE* - private static boolean CommandDefinition_Consume_0(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "CommandDefinition_Consume_0")) return false; + private static boolean CommandDefinition_Base_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "CommandDefinition_Base_0")) return false; while (true) { int c = current_position_(b); if (!consumeToken(b, SPACE)) break; - if (!empty_element_parsed_guard_(b, "CommandDefinition_Consume_0", c)) break; + if (!empty_element_parsed_guard_(b, "CommandDefinition_Base_0", c)) break; } return true; } // (aliasseparator alias)* - private static boolean CommandDefinition_Consume_2(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "CommandDefinition_Consume_2")) return false; + private static boolean CommandDefinition_Base_2(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "CommandDefinition_Base_2")) return false; while (true) { int c = current_position_(b); - if (!CommandDefinition_Consume_2_0(b, l + 1)) break; - if (!empty_element_parsed_guard_(b, "CommandDefinition_Consume_2", c)) break; + if (!CommandDefinition_Base_2_0(b, l + 1)) break; + if (!empty_element_parsed_guard_(b, "CommandDefinition_Base_2", c)) break; } return true; } // aliasseparator alias - private static boolean CommandDefinition_Consume_2_0(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "CommandDefinition_Consume_2_0")) return false; + private static boolean CommandDefinition_Base_2_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "CommandDefinition_Base_2_0")) return false; boolean r; Marker m = enter_section_(b); r = consumeTokens(b, 0, ALIASSEPARATOR, ALIAS); @@ -505,61 +501,349 @@ private static boolean CommandDefinition_Consume_2_0(PsiBuilder b, int l) { return r; } - // (SPACE Args_Consume)? - private static boolean CommandDefinition_Consume_3(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "CommandDefinition_Consume_3")) return false; - CommandDefinition_Consume_3_0(b, l + 1); + // (SPACE Args)? + private static boolean CommandDefinition_Base_3(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "CommandDefinition_Base_3")) return false; + CommandDefinition_Base_3_0(b, l + 1); return true; } - // SPACE Args_Consume - private static boolean CommandDefinition_Consume_3_0(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "CommandDefinition_Consume_3_0")) return false; + // SPACE Args + private static boolean CommandDefinition_Base_3_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "CommandDefinition_Base_3_0")) return false; boolean r; Marker m = enter_section_(b); r = consumeToken(b, SPACE); - r = r && Args_Consume(b, l + 1); + r = r && Args(b, l + 1); exit_section_(b, m, null, r); return r; } // newline? - private static boolean CommandDefinition_Consume_4(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "CommandDefinition_Consume_4")) return false; + private static boolean CommandDefinition_Base_4(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "CommandDefinition_Base_4")) return false; consumeToken(b, NEWLINE); return true; } - // (Line_Consume | Blank_Line)* - private static boolean CommandDefinition_Consume_6(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "CommandDefinition_Consume_6")) return false; + // (Line_Base | Blank_Line)* + private static boolean CommandDefinition_Base_6(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "CommandDefinition_Base_6")) return false; while (true) { int c = current_position_(b); - if (!CommandDefinition_Consume_6_0(b, l + 1)) break; - if (!empty_element_parsed_guard_(b, "CommandDefinition_Consume_6", c)) break; + if (!CommandDefinition_Base_6_0(b, l + 1)) break; + if (!empty_element_parsed_guard_(b, "CommandDefinition_Base_6", c)) break; } return true; } - // Line_Consume | Blank_Line - private static boolean CommandDefinition_Consume_6_0(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "CommandDefinition_Consume_6_0")) return false; + // Line_Base | Blank_Line + private static boolean CommandDefinition_Base_6_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "CommandDefinition_Base_6_0")) return false; boolean r; - r = Line_Consume(b, l + 1); + r = Line_Base(b, l + 1); + if (!r) r = Blank_Line(b, l + 1); + return r; + } + + /* ********************************************************** */ + // SPACE* commandname (aliasseparator alias)* (SPACE Args_Can_Consume)? newline? Open_Bracket (Line_Consumed_Recovering | Blank_Line)* Close_Bracket + static boolean CommandDefinition_Consumed(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "CommandDefinition_Consumed")) return false; + if (!nextTokenIs(b, "", COMMANDNAME, SPACE)) return false; + boolean r; + Marker m = enter_section_(b); + r = CommandDefinition_Consumed_0(b, l + 1); + r = r && consumeToken(b, COMMANDNAME); + r = r && CommandDefinition_Consumed_2(b, l + 1); + r = r && CommandDefinition_Consumed_3(b, l + 1); + r = r && CommandDefinition_Consumed_4(b, l + 1); + r = r && Open_Bracket(b, l + 1); + r = r && CommandDefinition_Consumed_6(b, l + 1); + r = r && Close_Bracket(b, l + 1); + exit_section_(b, m, null, r); + return r; + } + + // SPACE* + private static boolean CommandDefinition_Consumed_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "CommandDefinition_Consumed_0")) return false; + while (true) { + int c = current_position_(b); + if (!consumeToken(b, SPACE)) break; + if (!empty_element_parsed_guard_(b, "CommandDefinition_Consumed_0", c)) break; + } + return true; + } + + // (aliasseparator alias)* + private static boolean CommandDefinition_Consumed_2(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "CommandDefinition_Consumed_2")) return false; + while (true) { + int c = current_position_(b); + if (!CommandDefinition_Consumed_2_0(b, l + 1)) break; + if (!empty_element_parsed_guard_(b, "CommandDefinition_Consumed_2", c)) break; + } + return true; + } + + // aliasseparator alias + private static boolean CommandDefinition_Consumed_2_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "CommandDefinition_Consumed_2_0")) return false; + boolean r; + Marker m = enter_section_(b); + r = consumeTokens(b, 0, ALIASSEPARATOR, ALIAS); + exit_section_(b, m, null, r); + return r; + } + + // (SPACE Args_Can_Consume)? + private static boolean CommandDefinition_Consumed_3(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "CommandDefinition_Consumed_3")) return false; + CommandDefinition_Consumed_3_0(b, l + 1); + return true; + } + + // SPACE Args_Can_Consume + private static boolean CommandDefinition_Consumed_3_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "CommandDefinition_Consumed_3_0")) return false; + boolean r; + Marker m = enter_section_(b); + r = consumeToken(b, SPACE); + r = r && Args_Can_Consume(b, l + 1); + exit_section_(b, m, null, r); + return r; + } + + // newline? + private static boolean CommandDefinition_Consumed_4(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "CommandDefinition_Consumed_4")) return false; + consumeToken(b, NEWLINE); + return true; + } + + // (Line_Consumed_Recovering | Blank_Line)* + private static boolean CommandDefinition_Consumed_6(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "CommandDefinition_Consumed_6")) return false; + while (true) { + int c = current_position_(b); + if (!CommandDefinition_Consumed_6_0(b, l + 1)) break; + if (!empty_element_parsed_guard_(b, "CommandDefinition_Consumed_6", c)) break; + } + return true; + } + + // Line_Consumed_Recovering | Blank_Line + private static boolean CommandDefinition_Consumed_6_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "CommandDefinition_Consumed_6_0")) return false; + boolean r; + r = Line_Consumed_Recovering(b, l + 1); + if (!r) r = Blank_Line(b, l + 1); + return r; + } + + /* ********************************************************** */ + // SPACE* commandname (aliasseparator alias)* (SPACE Args_Can_Consume)? newline? Open_Bracket (Line_Consumed | Blank_Line)* Close_Bracket + static boolean CommandDefinition_Consuming(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "CommandDefinition_Consuming")) return false; + if (!nextTokenIs(b, "", COMMANDNAME, SPACE)) return false; + boolean r; + Marker m = enter_section_(b); + r = CommandDefinition_Consuming_0(b, l + 1); + r = r && consumeToken(b, COMMANDNAME); + r = r && CommandDefinition_Consuming_2(b, l + 1); + r = r && CommandDefinition_Consuming_3(b, l + 1); + r = r && CommandDefinition_Consuming_4(b, l + 1); + r = r && Open_Bracket(b, l + 1); + r = r && CommandDefinition_Consuming_6(b, l + 1); + r = r && Close_Bracket(b, l + 1); + exit_section_(b, m, null, r); + return r; + } + + // SPACE* + private static boolean CommandDefinition_Consuming_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "CommandDefinition_Consuming_0")) return false; + while (true) { + int c = current_position_(b); + if (!consumeToken(b, SPACE)) break; + if (!empty_element_parsed_guard_(b, "CommandDefinition_Consuming_0", c)) break; + } + return true; + } + + // (aliasseparator alias)* + private static boolean CommandDefinition_Consuming_2(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "CommandDefinition_Consuming_2")) return false; + while (true) { + int c = current_position_(b); + if (!CommandDefinition_Consuming_2_0(b, l + 1)) break; + if (!empty_element_parsed_guard_(b, "CommandDefinition_Consuming_2", c)) break; + } + return true; + } + + // aliasseparator alias + private static boolean CommandDefinition_Consuming_2_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "CommandDefinition_Consuming_2_0")) return false; + boolean r; + Marker m = enter_section_(b); + r = consumeTokens(b, 0, ALIASSEPARATOR, ALIAS); + exit_section_(b, m, null, r); + return r; + } + + // (SPACE Args_Can_Consume)? + private static boolean CommandDefinition_Consuming_3(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "CommandDefinition_Consuming_3")) return false; + CommandDefinition_Consuming_3_0(b, l + 1); + return true; + } + + // SPACE Args_Can_Consume + private static boolean CommandDefinition_Consuming_3_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "CommandDefinition_Consuming_3_0")) return false; + boolean r; + Marker m = enter_section_(b); + r = consumeToken(b, SPACE); + r = r && Args_Can_Consume(b, l + 1); + exit_section_(b, m, null, r); + return r; + } + + // newline? + private static boolean CommandDefinition_Consuming_4(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "CommandDefinition_Consuming_4")) return false; + consumeToken(b, NEWLINE); + return true; + } + + // (Line_Consumed | Blank_Line)* + private static boolean CommandDefinition_Consuming_6(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "CommandDefinition_Consuming_6")) return false; + while (true) { + int c = current_position_(b); + if (!CommandDefinition_Consuming_6_0(b, l + 1)) break; + if (!empty_element_parsed_guard_(b, "CommandDefinition_Consuming_6", c)) break; + } + return true; + } + + // Line_Consumed | Blank_Line + private static boolean CommandDefinition_Consuming_6_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "CommandDefinition_Consuming_6_0")) return false; + boolean r; + r = Line_Consumed(b, l + 1); + if (!r) r = Blank_Line(b, l + 1); + return r; + } + + /* ********************************************************** */ + // SPACE* commandname (aliasseparator alias)* (SPACE Args_Can_Consume)? newline? Open_Bracket (Line_Base_Consuming | Blank_Line)* Close_Bracket + static boolean CommandDefinition_Consuming_Base(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "CommandDefinition_Consuming_Base")) return false; + if (!nextTokenIs(b, "", COMMANDNAME, SPACE)) return false; + boolean r; + Marker m = enter_section_(b); + r = CommandDefinition_Consuming_Base_0(b, l + 1); + r = r && consumeToken(b, COMMANDNAME); + r = r && CommandDefinition_Consuming_Base_2(b, l + 1); + r = r && CommandDefinition_Consuming_Base_3(b, l + 1); + r = r && CommandDefinition_Consuming_Base_4(b, l + 1); + r = r && Open_Bracket(b, l + 1); + r = r && CommandDefinition_Consuming_Base_6(b, l + 1); + r = r && Close_Bracket(b, l + 1); + exit_section_(b, m, null, r); + return r; + } + + // SPACE* + private static boolean CommandDefinition_Consuming_Base_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "CommandDefinition_Consuming_Base_0")) return false; + while (true) { + int c = current_position_(b); + if (!consumeToken(b, SPACE)) break; + if (!empty_element_parsed_guard_(b, "CommandDefinition_Consuming_Base_0", c)) break; + } + return true; + } + + // (aliasseparator alias)* + private static boolean CommandDefinition_Consuming_Base_2(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "CommandDefinition_Consuming_Base_2")) return false; + while (true) { + int c = current_position_(b); + if (!CommandDefinition_Consuming_Base_2_0(b, l + 1)) break; + if (!empty_element_parsed_guard_(b, "CommandDefinition_Consuming_Base_2", c)) break; + } + return true; + } + + // aliasseparator alias + private static boolean CommandDefinition_Consuming_Base_2_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "CommandDefinition_Consuming_Base_2_0")) return false; + boolean r; + Marker m = enter_section_(b); + r = consumeTokens(b, 0, ALIASSEPARATOR, ALIAS); + exit_section_(b, m, null, r); + return r; + } + + // (SPACE Args_Can_Consume)? + private static boolean CommandDefinition_Consuming_Base_3(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "CommandDefinition_Consuming_Base_3")) return false; + CommandDefinition_Consuming_Base_3_0(b, l + 1); + return true; + } + + // SPACE Args_Can_Consume + private static boolean CommandDefinition_Consuming_Base_3_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "CommandDefinition_Consuming_Base_3_0")) return false; + boolean r; + Marker m = enter_section_(b); + r = consumeToken(b, SPACE); + r = r && Args_Can_Consume(b, l + 1); + exit_section_(b, m, null, r); + return r; + } + + // newline? + private static boolean CommandDefinition_Consuming_Base_4(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "CommandDefinition_Consuming_Base_4")) return false; + consumeToken(b, NEWLINE); + return true; + } + + // (Line_Base_Consuming | Blank_Line)* + private static boolean CommandDefinition_Consuming_Base_6(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "CommandDefinition_Consuming_Base_6")) return false; + while (true) { + int c = current_position_(b); + if (!CommandDefinition_Consuming_Base_6_0(b, l + 1)) break; + if (!empty_element_parsed_guard_(b, "CommandDefinition_Consuming_Base_6", c)) break; + } + return true; + } + + // Line_Base_Consuming | Blank_Line + private static boolean CommandDefinition_Consuming_Base_6_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "CommandDefinition_Consuming_Base_6_0")) return false; + boolean r; + r = Line_Base_Consuming(b, l + 1); if (!r) r = Blank_Line(b, l + 1); return r; } /* ********************************************************** */ // (SPACE)* (HelpLine|PermissionLine|UserLine|HookLine|ContextLine|AssertLine|NoHelpLine|NoTabLine|PostArgLine|HelpMsgLine) newline - public static boolean CommandProperty(PsiBuilder b, int l) { + static boolean CommandProperty(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "CommandProperty")) return false; boolean r; - Marker m = enter_section_(b, l, _NONE_, COMMAND_PROPERTY, ""); + Marker m = enter_section_(b); r = CommandProperty_0(b, l + 1); r = r && CommandProperty_1(b, l + 1); r = r && consumeToken(b, NEWLINE); - exit_section_(b, l, m, r, false, null); + exit_section_(b, m, null, r); return r; } @@ -593,31 +877,71 @@ private static boolean CommandProperty_1(PsiBuilder b, int l) { /* ********************************************************** */ // (SPACE)* (HelpLine|PermissionLine|UserLine|HookLine|ContextLine|AssertLine|NoHelpLine|NoTabLine|HelpMsgLine) newline - public static boolean CommandProperty_Consume(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "CommandProperty_Consume")) return false; + static boolean CommandProperty_Base(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "CommandProperty_Base")) return false; + boolean r; + Marker m = enter_section_(b); + r = CommandProperty_Base_0(b, l + 1); + r = r && CommandProperty_Base_1(b, l + 1); + r = r && consumeToken(b, NEWLINE); + exit_section_(b, m, null, r); + return r; + } + + // (SPACE)* + private static boolean CommandProperty_Base_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "CommandProperty_Base_0")) return false; + while (true) { + int c = current_position_(b); + if (!consumeToken(b, SPACE)) break; + if (!empty_element_parsed_guard_(b, "CommandProperty_Base_0", c)) break; + } + return true; + } + + // HelpLine|PermissionLine|UserLine|HookLine|ContextLine|AssertLine|NoHelpLine|NoTabLine|HelpMsgLine + private static boolean CommandProperty_Base_1(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "CommandProperty_Base_1")) return false; + boolean r; + r = HelpLine(b, l + 1); + if (!r) r = PermissionLine(b, l + 1); + if (!r) r = UserLine(b, l + 1); + if (!r) r = HookLine(b, l + 1); + if (!r) r = ContextLine(b, l + 1); + if (!r) r = AssertLine(b, l + 1); + if (!r) r = NoHelpLine(b, l + 1); + if (!r) r = NoTabLine(b, l + 1); + if (!r) r = HelpMsgLine(b, l + 1); + return r; + } + + /* ********************************************************** */ + // (SPACE)* (HelpLine|PermissionLine|UserLine|HookLine|ContextLine|AssertLine|NoHelpLine|NoTabLine|HelpMsgLine) newline + static boolean CommandProperty_Consumed(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "CommandProperty_Consumed")) return false; boolean r; - Marker m = enter_section_(b, l, _NONE_, COMMAND_PROPERTY_CONSUME, ""); - r = CommandProperty_Consume_0(b, l + 1); - r = r && CommandProperty_Consume_1(b, l + 1); + Marker m = enter_section_(b); + r = CommandProperty_Consumed_0(b, l + 1); + r = r && CommandProperty_Consumed_1(b, l + 1); r = r && consumeToken(b, NEWLINE); - exit_section_(b, l, m, r, false, null); + exit_section_(b, m, null, r); return r; } // (SPACE)* - private static boolean CommandProperty_Consume_0(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "CommandProperty_Consume_0")) return false; + private static boolean CommandProperty_Consumed_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "CommandProperty_Consumed_0")) return false; while (true) { int c = current_position_(b); if (!consumeToken(b, SPACE)) break; - if (!empty_element_parsed_guard_(b, "CommandProperty_Consume_0", c)) break; + if (!empty_element_parsed_guard_(b, "CommandProperty_Consumed_0", c)) break; } return true; } // HelpLine|PermissionLine|UserLine|HookLine|ContextLine|AssertLine|NoHelpLine|NoTabLine|HelpMsgLine - private static boolean CommandProperty_Consume_1(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "CommandProperty_Consume_1")) return false; + private static boolean CommandProperty_Consumed_1(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "CommandProperty_Consumed_1")) return false; boolean r; r = HelpLine(b, l + 1); if (!r) r = PermissionLine(b, l + 1); @@ -632,22 +956,39 @@ private static boolean CommandProperty_Consume_1(PsiBuilder b, int l) { } /* ********************************************************** */ - // ARG_TYPE_CONSUME Argument (newline | SPACE) - public static boolean ConsumingArg(PsiBuilder b, int l) { + // ARG_TYPE CONSTRAINT? CONSUME_TOKEN? COLON Consuming_Argument (newline | SPACE) + static boolean ConsumingArg(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "ConsumingArg")) return false; - if (!nextTokenIs(b, ARG_TYPE_CONSUME)) return false; + if (!nextTokenIs(b, ARG_TYPE)) return false; boolean r; Marker m = enter_section_(b); - r = consumeToken(b, ARG_TYPE_CONSUME); - r = r && Argument(b, l + 1); + r = consumeToken(b, ARG_TYPE); + r = r && ConsumingArg_1(b, l + 1); r = r && ConsumingArg_2(b, l + 1); - exit_section_(b, m, CONSUMING_ARG, r); + r = r && consumeToken(b, COLON); + r = r && Consuming_Argument(b, l + 1); + r = r && ConsumingArg_5(b, l + 1); + exit_section_(b, m, null, r); return r; } - // newline | SPACE + // CONSTRAINT? + private static boolean ConsumingArg_1(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "ConsumingArg_1")) return false; + consumeToken(b, CONSTRAINT); + return true; + } + + // CONSUME_TOKEN? private static boolean ConsumingArg_2(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "ConsumingArg_2")) return false; + consumeToken(b, CONSUME_TOKEN); + return true; + } + + // newline | SPACE + private static boolean ConsumingArg_5(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "ConsumingArg_5")) return false; boolean r; r = consumeToken(b, NEWLINE); if (!r) r = consumeToken(b, SPACE); @@ -655,12 +996,89 @@ private static boolean ConsumingArg_2(PsiBuilder b, int l) { } /* ********************************************************** */ - // context separator contextname (SPACE contextname) - public static boolean ContextLine(PsiBuilder b, int l) { + // ARG_NAME (noshowtype | ((notrequired | bothmodifiers) ( BRACKET_OPEN DEFAULT_VALUE? BRACKET_CLOSE)? ))? + static boolean Consuming_Argument(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "Consuming_Argument")) return false; + if (!nextTokenIs(b, ARG_NAME)) return false; + boolean r; + Marker m = enter_section_(b); + r = consumeToken(b, ARG_NAME); + r = r && Consuming_Argument_1(b, l + 1); + exit_section_(b, m, null, r); + return r; + } + + // (noshowtype | ((notrequired | bothmodifiers) ( BRACKET_OPEN DEFAULT_VALUE? BRACKET_CLOSE)? ))? + private static boolean Consuming_Argument_1(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "Consuming_Argument_1")) return false; + Consuming_Argument_1_0(b, l + 1); + return true; + } + + // noshowtype | ((notrequired | bothmodifiers) ( BRACKET_OPEN DEFAULT_VALUE? BRACKET_CLOSE)? ) + private static boolean Consuming_Argument_1_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "Consuming_Argument_1_0")) return false; + boolean r; + Marker m = enter_section_(b); + r = consumeToken(b, NOSHOWTYPE); + if (!r) r = Consuming_Argument_1_0_1(b, l + 1); + exit_section_(b, m, null, r); + return r; + } + + // (notrequired | bothmodifiers) ( BRACKET_OPEN DEFAULT_VALUE? BRACKET_CLOSE)? + private static boolean Consuming_Argument_1_0_1(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "Consuming_Argument_1_0_1")) return false; + boolean r; + Marker m = enter_section_(b); + r = Consuming_Argument_1_0_1_0(b, l + 1); + r = r && Consuming_Argument_1_0_1_1(b, l + 1); + exit_section_(b, m, null, r); + return r; + } + + // notrequired | bothmodifiers + private static boolean Consuming_Argument_1_0_1_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "Consuming_Argument_1_0_1_0")) return false; + boolean r; + r = consumeToken(b, NOTREQUIRED); + if (!r) r = consumeToken(b, BOTHMODIFIERS); + return r; + } + + // ( BRACKET_OPEN DEFAULT_VALUE? BRACKET_CLOSE)? + private static boolean Consuming_Argument_1_0_1_1(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "Consuming_Argument_1_0_1_1")) return false; + Consuming_Argument_1_0_1_1_0(b, l + 1); + return true; + } + + // BRACKET_OPEN DEFAULT_VALUE? BRACKET_CLOSE + private static boolean Consuming_Argument_1_0_1_1_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "Consuming_Argument_1_0_1_1_0")) return false; + boolean r; + Marker m = enter_section_(b); + r = consumeToken(b, BRACKET_OPEN); + r = r && Consuming_Argument_1_0_1_1_0_1(b, l + 1); + r = r && consumeToken(b, BRACKET_CLOSE); + exit_section_(b, m, null, r); + return r; + } + + // DEFAULT_VALUE? + private static boolean Consuming_Argument_1_0_1_1_0_1(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "Consuming_Argument_1_0_1_1_0_1")) return false; + consumeToken(b, DEFAULT_VALUE); + return true; + } + + /* ********************************************************** */ + // context separator contextname (SPACE contextname)* + static boolean ContextLine(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "ContextLine")) return false; if (!nextTokenIs(b, CONTEXT)) return false; boolean r, p; - Marker m = enter_section_(b, l, _NONE_, CONTEXT_LINE, null); + Marker m = enter_section_(b, l, _NONE_); r = consumeTokens(b, 2, CONTEXT, SEPARATOR, CONTEXTNAME); p = r; // pin = 2 r = r && ContextLine_3(b, l + 1); @@ -668,9 +1086,20 @@ public static boolean ContextLine(PsiBuilder b, int l) { return r || p; } - // SPACE contextname + // (SPACE contextname)* private static boolean ContextLine_3(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "ContextLine_3")) return false; + while (true) { + int c = current_position_(b); + if (!ContextLine_3_0(b, l + 1)) break; + if (!empty_element_parsed_guard_(b, "ContextLine_3", c)) break; + } + return true; + } + + // SPACE contextname + private static boolean ContextLine_3_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "ContextLine_3_0")) return false; boolean r; Marker m = enter_section_(b); r = consumeTokens(b, 0, SPACE, CONTEXTNAME); @@ -679,34 +1108,34 @@ private static boolean ContextLine_3(PsiBuilder b, int l) { } /* ********************************************************** */ - // DASHES FLAG_NAME (COMMA DASHES FLAG_NAME)* FLAG_MODIFIER? (BRACKET_OPEN DEFAULT_VALUE? BRACKET_CLOSE)? - public static boolean Flag(PsiBuilder b, int l) { + // FLAG_NAME (COMMA DASHES FLAG_NAME)* FLAG_MODIFIER? (BRACKET_OPEN DEFAULT_VALUE? BRACKET_CLOSE)? + static boolean Flag(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "Flag")) return false; - if (!nextTokenIs(b, DASHES)) return false; + if (!nextTokenIs(b, FLAG_NAME)) return false; boolean r; Marker m = enter_section_(b); - r = consumeTokens(b, 0, DASHES, FLAG_NAME); + r = consumeToken(b, FLAG_NAME); + r = r && Flag_1(b, l + 1); r = r && Flag_2(b, l + 1); r = r && Flag_3(b, l + 1); - r = r && Flag_4(b, l + 1); - exit_section_(b, m, FLAG, r); + exit_section_(b, m, null, r); return r; } // (COMMA DASHES FLAG_NAME)* - private static boolean Flag_2(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "Flag_2")) return false; + private static boolean Flag_1(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "Flag_1")) return false; while (true) { int c = current_position_(b); - if (!Flag_2_0(b, l + 1)) break; - if (!empty_element_parsed_guard_(b, "Flag_2", c)) break; + if (!Flag_1_0(b, l + 1)) break; + if (!empty_element_parsed_guard_(b, "Flag_1", c)) break; } return true; } // COMMA DASHES FLAG_NAME - private static boolean Flag_2_0(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "Flag_2_0")) return false; + private static boolean Flag_1_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "Flag_1_0")) return false; boolean r; Marker m = enter_section_(b); r = consumeTokens(b, 0, COMMA, DASHES, FLAG_NAME); @@ -715,45 +1144,45 @@ private static boolean Flag_2_0(PsiBuilder b, int l) { } // FLAG_MODIFIER? - private static boolean Flag_3(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "Flag_3")) return false; + private static boolean Flag_2(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "Flag_2")) return false; consumeToken(b, FLAG_MODIFIER); return true; } // (BRACKET_OPEN DEFAULT_VALUE? BRACKET_CLOSE)? - private static boolean Flag_4(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "Flag_4")) return false; - Flag_4_0(b, l + 1); + private static boolean Flag_3(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "Flag_3")) return false; + Flag_3_0(b, l + 1); return true; } // BRACKET_OPEN DEFAULT_VALUE? BRACKET_CLOSE - private static boolean Flag_4_0(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "Flag_4_0")) return false; + private static boolean Flag_3_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "Flag_3_0")) return false; boolean r; Marker m = enter_section_(b); r = consumeToken(b, BRACKET_OPEN); - r = r && Flag_4_0_1(b, l + 1); + r = r && Flag_3_0_1(b, l + 1); r = r && consumeToken(b, BRACKET_CLOSE); exit_section_(b, m, null, r); return r; } // DEFAULT_VALUE? - private static boolean Flag_4_0_1(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "Flag_4_0_1")) return false; + private static boolean Flag_3_0_1(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "Flag_3_0_1")) return false; consumeToken(b, DEFAULT_VALUE); return true; } /* ********************************************************** */ // help separator helpmessage (SPACE helpmessage)* - public static boolean HelpLine(PsiBuilder b, int l) { + static boolean HelpLine(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "HelpLine")) return false; if (!nextTokenIs(b, HELP)) return false; boolean r, p; - Marker m = enter_section_(b, l, _NONE_, HELP_LINE, null); + Marker m = enter_section_(b, l, _NONE_); r = consumeTokens(b, 2, HELP, SEPARATOR, HELPMESSAGE); p = r; // pin = 2 r = r && HelpLine_3(b, l + 1); @@ -784,11 +1213,11 @@ private static boolean HelpLine_3_0(PsiBuilder b, int l) { /* ********************************************************** */ // helpmsg separator helpmsgkey (SPACE helpmessagekey)* - public static boolean HelpMsgLine(PsiBuilder b, int l) { + static boolean HelpMsgLine(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "HelpMsgLine")) return false; if (!nextTokenIs(b, HELPMSG)) return false; boolean r, p; - Marker m = enter_section_(b, l, _NONE_, HELP_MSG_LINE, null); + Marker m = enter_section_(b, l, _NONE_); r = consumeTokens(b, 2, HELPMSG, SEPARATOR, HELPMSGKEY); p = r; // pin = 2 r = r && HelpMsgLine_3(b, l + 1); @@ -819,11 +1248,11 @@ private static boolean HelpMsgLine_3_0(PsiBuilder b, int l) { /* ********************************************************** */ // hook separator hookname - public static boolean HookLine(PsiBuilder b, int l) { + static boolean HookLine(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "HookLine")) return false; if (!nextTokenIs(b, HOOK)) return false; boolean r, p; - Marker m = enter_section_(b, l, _NONE_, HOOK_LINE, null); + Marker m = enter_section_(b, l, _NONE_); r = consumeTokens(b, 2, HOOK, SEPARATOR, HOOKNAME); p = r; // pin = 2 exit_section_(b, l, m, r, p, null); @@ -832,62 +1261,76 @@ public static boolean HookLine(PsiBuilder b, int l) { /* ********************************************************** */ // CommandProperty | CommandDef - public static boolean Line(PsiBuilder b, int l) { + static boolean Line(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "Line")) return false; boolean r; - Marker m = enter_section_(b, l, _NONE_, LINE, ""); r = CommandProperty(b, l + 1); if (!r) r = CommandDef(b, l + 1); - exit_section_(b, l, m, r, false, null); return r; } /* ********************************************************** */ - // CommandProperty_Consume | CommandDef - public static boolean Line_Consume(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "Line_Consume")) return false; + // CommandProperty_Base | CommandDef + static boolean Line_Base(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "Line_Base")) return false; boolean r; - Marker m = enter_section_(b, l, _NONE_, LINE_CONSUME, ""); - r = CommandProperty_Consume(b, l + 1); + r = CommandProperty_Base(b, l + 1); if (!r) r = CommandDef(b, l + 1); - exit_section_(b, l, m, r, false, null); return r; } /* ********************************************************** */ - // nohelp - public static boolean NoHelpLine(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "NoHelpLine")) return false; - if (!nextTokenIs(b, NOHELP)) return false; + // CommandProperty_Base | CommandDefinition_Consumed + static boolean Line_Base_Consuming(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "Line_Base_Consuming")) return false; boolean r; - Marker m = enter_section_(b); - r = consumeToken(b, NOHELP); - exit_section_(b, m, NO_HELP_LINE, r); + r = CommandProperty_Base(b, l + 1); + if (!r) r = CommandDefinition_Consumed(b, l + 1); return r; } /* ********************************************************** */ - // notab - public static boolean NoTabLine(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "NoTabLine")) return false; - if (!nextTokenIs(b, NOTAB)) return false; + // CommandProperty | CommandDef_Consumed + static boolean Line_Consumed(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "Line_Consumed")) return false; boolean r; - Marker m = enter_section_(b); - r = consumeToken(b, NOTAB); - exit_section_(b, m, NO_TAB_LINE, r); + r = CommandProperty(b, l + 1); + if (!r) r = CommandDef_Consumed(b, l + 1); return r; } + /* ********************************************************** */ + // CommandProperty_Consumed | CommandDef + static boolean Line_Consumed_Recovering(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "Line_Consumed_Recovering")) return false; + boolean r; + r = CommandProperty_Consumed(b, l + 1); + if (!r) r = CommandDef(b, l + 1); + return r; + } + + /* ********************************************************** */ + // nohelp + static boolean NoHelpLine(PsiBuilder b, int l) { + return consumeToken(b, NOHELP); + } + + /* ********************************************************** */ + // notab + static boolean NoTabLine(PsiBuilder b, int l) { + return consumeToken(b, NOTAB); + } + /* ********************************************************** */ // SPACE* OBRACKET newline - public static boolean Open_Bracket(PsiBuilder b, int l) { + static boolean Open_Bracket(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "Open_Bracket")) return false; - if (!nextTokenIs(b, "", OBRACKET, SPACE)) return false; + if (!nextTokenIs(b, "", OBRACKET, SPACE)) return false; boolean r; - Marker m = enter_section_(b, l, _NONE_, OPEN_BRACKET, ""); + Marker m = enter_section_(b); r = Open_Bracket_0(b, l + 1); r = r && consumeTokens(b, 0, OBRACKET, NEWLINE); - exit_section_(b, l, m, r, false, null); + exit_section_(b, m, null, r); return r; } @@ -904,11 +1347,11 @@ private static boolean Open_Bracket_0(PsiBuilder b, int l) { /* ********************************************************** */ // permission separator PERMISSION_VALUE (DOT PERMISSION_VALUE)* - public static boolean PermissionLine(PsiBuilder b, int l) { + static boolean PermissionLine(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "PermissionLine")) return false; if (!nextTokenIs(b, PERMISSION)) return false; boolean r, p; - Marker m = enter_section_(b, l, _NONE_, PERMISSION_LINE, null); + Marker m = enter_section_(b, l, _NONE_); r = consumeTokens(b, 2, PERMISSION, SEPARATOR, PERMISSION_VALUE); p = r; // pin = 2 r = r && PermissionLine_3(b, l + 1); @@ -939,23 +1382,17 @@ private static boolean PermissionLine_3_0(PsiBuilder b, int l) { /* ********************************************************** */ // postarg - public static boolean PostArgLine(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "PostArgLine")) return false; - if (!nextTokenIs(b, POSTARG)) return false; - boolean r; - Marker m = enter_section_(b); - r = consumeToken(b, POSTARG); - exit_section_(b, m, POST_ARG_LINE, r); - return r; + static boolean PostArgLine(PsiBuilder b, int l) { + return consumeToken(b, POSTARG); } /* ********************************************************** */ // user separator (player | console | everyone) - public static boolean UserLine(PsiBuilder b, int l) { + static boolean UserLine(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "UserLine")) return false; if (!nextTokenIs(b, USER)) return false; boolean r, p; - Marker m = enter_section_(b, l, _NONE_, USER_LINE, null); + Marker m = enter_section_(b, l, _NONE_); r = consumeTokens(b, 2, USER, SEPARATOR); p = r; // pin = 2 r = r && UserLine_2(b, l + 1); @@ -986,7 +1423,7 @@ static boolean root(PsiBuilder b, int l) { } /* ********************************************************** */ - // (CommandDef) | COMMENT + // (CommandDef_Base) | COMMENT static boolean root_item(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "root_item")) return false; boolean r; @@ -997,12 +1434,12 @@ static boolean root_item(PsiBuilder b, int l) { return r; } - // (CommandDef) + // (CommandDef_Base) private static boolean root_item_0(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "root_item_0")) return false; boolean r; Marker m = enter_section_(b); - r = CommandDef(b, l + 1); + r = CommandDef_Base(b, l + 1); exit_section_(b, m, null, r); return r; } diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandArg.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandArg.java deleted file mode 100644 index 10b5bb6..0000000 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandArg.java +++ /dev/null @@ -1,16 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package com.github.shuaiouke.redlibcommandfile.language.psi; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.psi.PsiElement; - -public interface RedLibCommandArg extends PsiElement { - - @Nullable - RedLibCommandArgument getArgument(); - - @Nullable - RedLibCommandFlag getFlag(); - -} diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandArgs.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandArgs.java deleted file mode 100644 index d3919a4..0000000 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandArgs.java +++ /dev/null @@ -1,13 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package com.github.shuaiouke.redlibcommandfile.language.psi; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.psi.PsiElement; - -public interface RedLibCommandArgs extends PsiElement { - - @NotNull - List getArgList(); - -} diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandArgsConsume.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandArgsConsume.java deleted file mode 100644 index 57937df..0000000 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandArgsConsume.java +++ /dev/null @@ -1,19 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package com.github.shuaiouke.redlibcommandfile.language.psi; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.psi.PsiElement; - -public interface RedLibCommandArgsConsume extends PsiElement { - - @NotNull - List getArgList(); - - @NotNull - RedLibCommandConsumingArg getConsumingArg(); - - @NotNull - List getFlagList(); - -} diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandArgument.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandArgument.java deleted file mode 100644 index a2f7239..0000000 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandArgument.java +++ /dev/null @@ -1,10 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package com.github.shuaiouke.redlibcommandfile.language.psi; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.psi.PsiElement; - -public interface RedLibCommandArgument extends PsiElement { - -} diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandAssertLine.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandAssertLine.java deleted file mode 100644 index dd4bacd..0000000 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandAssertLine.java +++ /dev/null @@ -1,10 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package com.github.shuaiouke.redlibcommandfile.language.psi; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.psi.PsiElement; - -public interface RedLibCommandAssertLine extends PsiElement { - -} diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandBlankLine.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandBlankLine.java deleted file mode 100644 index 26fed7f..0000000 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandBlankLine.java +++ /dev/null @@ -1,10 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package com.github.shuaiouke.redlibcommandfile.language.psi; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.psi.PsiElement; - -public interface RedLibCommandBlankLine extends PsiElement { - -} diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandCloseBracket.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandCloseBracket.java deleted file mode 100644 index 94d21b1..0000000 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandCloseBracket.java +++ /dev/null @@ -1,10 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package com.github.shuaiouke.redlibcommandfile.language.psi; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.psi.PsiElement; - -public interface RedLibCommandCloseBracket extends PsiElement { - -} diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandCommandDef.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandCommandDef.java deleted file mode 100644 index 398e8a6..0000000 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandCommandDef.java +++ /dev/null @@ -1,16 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package com.github.shuaiouke.redlibcommandfile.language.psi; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.psi.PsiElement; - -public interface RedLibCommandCommandDef extends PsiElement { - - @Nullable - RedLibCommandCommandDefinition getCommandDefinition(); - - @Nullable - RedLibCommandCommandDefinitionConsume getCommandDefinitionConsume(); - -} diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandCommandDefinition.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandCommandDefinition.java deleted file mode 100644 index 6058401..0000000 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandCommandDefinition.java +++ /dev/null @@ -1,25 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package com.github.shuaiouke.redlibcommandfile.language.psi; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.psi.PsiElement; - -public interface RedLibCommandCommandDefinition extends PsiElement { - - @Nullable - RedLibCommandArgs getArgs(); - - @NotNull - List getBlankLineList(); - - @NotNull - RedLibCommandCloseBracket getCloseBracket(); - - @NotNull - List getLineList(); - - @NotNull - RedLibCommandOpenBracket getOpenBracket(); - -} diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandCommandDefinitionConsume.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandCommandDefinitionConsume.java deleted file mode 100644 index 5ea69dd..0000000 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandCommandDefinitionConsume.java +++ /dev/null @@ -1,25 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package com.github.shuaiouke.redlibcommandfile.language.psi; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.psi.PsiElement; - -public interface RedLibCommandCommandDefinitionConsume extends PsiElement { - - @Nullable - RedLibCommandArgsConsume getArgsConsume(); - - @NotNull - List getBlankLineList(); - - @NotNull - RedLibCommandCloseBracket getCloseBracket(); - - @NotNull - List getLineConsumeList(); - - @NotNull - RedLibCommandOpenBracket getOpenBracket(); - -} diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandCommandProperty.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandCommandProperty.java deleted file mode 100644 index 4a832f8..0000000 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandCommandProperty.java +++ /dev/null @@ -1,40 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package com.github.shuaiouke.redlibcommandfile.language.psi; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.psi.PsiElement; - -public interface RedLibCommandCommandProperty extends PsiElement { - - @Nullable - RedLibCommandAssertLine getAssertLine(); - - @Nullable - RedLibCommandContextLine getContextLine(); - - @Nullable - RedLibCommandHelpLine getHelpLine(); - - @Nullable - RedLibCommandHelpMsgLine getHelpMsgLine(); - - @Nullable - RedLibCommandHookLine getHookLine(); - - @Nullable - RedLibCommandNoHelpLine getNoHelpLine(); - - @Nullable - RedLibCommandNoTabLine getNoTabLine(); - - @Nullable - RedLibCommandPermissionLine getPermissionLine(); - - @Nullable - RedLibCommandPostArgLine getPostArgLine(); - - @Nullable - RedLibCommandUserLine getUserLine(); - -} diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandCommandPropertyConsume.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandCommandPropertyConsume.java deleted file mode 100644 index bf92ff4..0000000 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandCommandPropertyConsume.java +++ /dev/null @@ -1,37 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package com.github.shuaiouke.redlibcommandfile.language.psi; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.psi.PsiElement; - -public interface RedLibCommandCommandPropertyConsume extends PsiElement { - - @Nullable - RedLibCommandAssertLine getAssertLine(); - - @Nullable - RedLibCommandContextLine getContextLine(); - - @Nullable - RedLibCommandHelpLine getHelpLine(); - - @Nullable - RedLibCommandHelpMsgLine getHelpMsgLine(); - - @Nullable - RedLibCommandHookLine getHookLine(); - - @Nullable - RedLibCommandNoHelpLine getNoHelpLine(); - - @Nullable - RedLibCommandNoTabLine getNoTabLine(); - - @Nullable - RedLibCommandPermissionLine getPermissionLine(); - - @Nullable - RedLibCommandUserLine getUserLine(); - -} diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandConsumingArg.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandConsumingArg.java deleted file mode 100644 index d010d4e..0000000 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandConsumingArg.java +++ /dev/null @@ -1,13 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package com.github.shuaiouke.redlibcommandfile.language.psi; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.psi.PsiElement; - -public interface RedLibCommandConsumingArg extends PsiElement { - - @NotNull - RedLibCommandArgument getArgument(); - -} diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandContextLine.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandContextLine.java deleted file mode 100644 index 1a68b0f..0000000 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandContextLine.java +++ /dev/null @@ -1,10 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package com.github.shuaiouke.redlibcommandfile.language.psi; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.psi.PsiElement; - -public interface RedLibCommandContextLine extends PsiElement { - -} diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandFlag.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandFlag.java deleted file mode 100644 index fcf2d69..0000000 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandFlag.java +++ /dev/null @@ -1,10 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package com.github.shuaiouke.redlibcommandfile.language.psi; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.psi.PsiElement; - -public interface RedLibCommandFlag extends PsiElement { - -} diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandHelpLine.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandHelpLine.java deleted file mode 100644 index 5aee6ce..0000000 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandHelpLine.java +++ /dev/null @@ -1,10 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package com.github.shuaiouke.redlibcommandfile.language.psi; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.psi.PsiElement; - -public interface RedLibCommandHelpLine extends PsiElement { - -} diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandHelpMsgLine.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandHelpMsgLine.java deleted file mode 100644 index 5bc22a4..0000000 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandHelpMsgLine.java +++ /dev/null @@ -1,10 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package com.github.shuaiouke.redlibcommandfile.language.psi; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.psi.PsiElement; - -public interface RedLibCommandHelpMsgLine extends PsiElement { - -} diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandHookLine.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandHookLine.java deleted file mode 100644 index 4113c87..0000000 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandHookLine.java +++ /dev/null @@ -1,10 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package com.github.shuaiouke.redlibcommandfile.language.psi; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.psi.PsiElement; - -public interface RedLibCommandHookLine extends PsiElement { - -} diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandLine.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandLine.java deleted file mode 100644 index 88f0084..0000000 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandLine.java +++ /dev/null @@ -1,16 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package com.github.shuaiouke.redlibcommandfile.language.psi; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.psi.PsiElement; - -public interface RedLibCommandLine extends PsiElement { - - @Nullable - RedLibCommandCommandDef getCommandDef(); - - @Nullable - RedLibCommandCommandProperty getCommandProperty(); - -} diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandLineConsume.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandLineConsume.java deleted file mode 100644 index 7eee779..0000000 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandLineConsume.java +++ /dev/null @@ -1,16 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package com.github.shuaiouke.redlibcommandfile.language.psi; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.psi.PsiElement; - -public interface RedLibCommandLineConsume extends PsiElement { - - @Nullable - RedLibCommandCommandDef getCommandDef(); - - @Nullable - RedLibCommandCommandPropertyConsume getCommandPropertyConsume(); - -} diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandNoHelpLine.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandNoHelpLine.java deleted file mode 100644 index e34ddea..0000000 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandNoHelpLine.java +++ /dev/null @@ -1,10 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package com.github.shuaiouke.redlibcommandfile.language.psi; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.psi.PsiElement; - -public interface RedLibCommandNoHelpLine extends PsiElement { - -} diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandNoTabLine.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandNoTabLine.java deleted file mode 100644 index 32d1a01..0000000 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandNoTabLine.java +++ /dev/null @@ -1,10 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package com.github.shuaiouke.redlibcommandfile.language.psi; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.psi.PsiElement; - -public interface RedLibCommandNoTabLine extends PsiElement { - -} diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandOpenBracket.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandOpenBracket.java deleted file mode 100644 index 5271907..0000000 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandOpenBracket.java +++ /dev/null @@ -1,10 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package com.github.shuaiouke.redlibcommandfile.language.psi; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.psi.PsiElement; - -public interface RedLibCommandOpenBracket extends PsiElement { - -} diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandPermissionLine.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandPermissionLine.java deleted file mode 100644 index 9f1074e..0000000 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandPermissionLine.java +++ /dev/null @@ -1,10 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package com.github.shuaiouke.redlibcommandfile.language.psi; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.psi.PsiElement; - -public interface RedLibCommandPermissionLine extends PsiElement { - -} diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandPostArgLine.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandPostArgLine.java deleted file mode 100644 index 47fb3c4..0000000 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandPostArgLine.java +++ /dev/null @@ -1,10 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package com.github.shuaiouke.redlibcommandfile.language.psi; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.psi.PsiElement; - -public interface RedLibCommandPostArgLine extends PsiElement { - -} diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandTypes.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandTypes.java index 05c52c6..34f43e7 100644 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandTypes.java +++ b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandTypes.java @@ -4,58 +4,34 @@ import com.intellij.psi.tree.IElementType; import com.intellij.psi.PsiElement; import com.intellij.lang.ASTNode; -import com.github.shuaiouke.redlibcommandfile.language.psi.impl.*; public interface RedLibCommandTypes { - IElementType ARG = new RedLibCommandElementType("ARG"); - IElementType ARGS = new RedLibCommandElementType("ARGS"); - IElementType ARGS_CONSUME = new RedLibCommandElementType("ARGS_CONSUME"); - IElementType ARGUMENT = new RedLibCommandElementType("ARGUMENT"); - IElementType ASSERT_LINE = new RedLibCommandElementType("ASSERT_LINE"); - IElementType BLANK_LINE = new RedLibCommandElementType("BLANK_LINE"); - IElementType CLOSE_BRACKET = new RedLibCommandElementType("CLOSE_BRACKET"); - IElementType COMMAND_DEF = new RedLibCommandElementType("COMMAND_DEF"); - IElementType COMMAND_DEFINITION = new RedLibCommandElementType("COMMAND_DEFINITION"); - IElementType COMMAND_DEFINITION_CONSUME = new RedLibCommandElementType("COMMAND_DEFINITION_CONSUME"); - IElementType COMMAND_PROPERTY = new RedLibCommandElementType("COMMAND_PROPERTY"); - IElementType COMMAND_PROPERTY_CONSUME = new RedLibCommandElementType("COMMAND_PROPERTY_CONSUME"); - IElementType CONSUMING_ARG = new RedLibCommandElementType("CONSUMING_ARG"); - IElementType CONTEXT_LINE = new RedLibCommandElementType("CONTEXT_LINE"); - IElementType FLAG = new RedLibCommandElementType("FLAG"); - IElementType HELP_LINE = new RedLibCommandElementType("HELP_LINE"); - IElementType HELP_MSG_LINE = new RedLibCommandElementType("HELP_MSG_LINE"); - IElementType HOOK_LINE = new RedLibCommandElementType("HOOK_LINE"); - IElementType LINE = new RedLibCommandElementType("LINE"); - IElementType LINE_CONSUME = new RedLibCommandElementType("LINE_CONSUME"); - IElementType NO_HELP_LINE = new RedLibCommandElementType("NO_HELP_LINE"); - IElementType NO_TAB_LINE = new RedLibCommandElementType("NO_TAB_LINE"); - IElementType OPEN_BRACKET = new RedLibCommandElementType("OPEN_BRACKET"); - IElementType PERMISSION_LINE = new RedLibCommandElementType("PERMISSION_LINE"); - IElementType POST_ARG_LINE = new RedLibCommandElementType("POST_ARG_LINE"); - IElementType USER_LINE = new RedLibCommandElementType("USER_LINE"); IElementType ALIAS = new RedLibCommandTokenType("alias"); IElementType ALIASSEPARATOR = new RedLibCommandTokenType("aliasseparator"); IElementType ARG_NAME = new RedLibCommandTokenType("ARG_NAME"); IElementType ARG_TYPE = new RedLibCommandTokenType("ARG_TYPE"); - IElementType ARG_TYPE_CONSUME = new RedLibCommandTokenType("ARG_TYPE_CONSUME"); IElementType ASSERT = new RedLibCommandTokenType("assert"); IElementType ASSERTNAME = new RedLibCommandTokenType("assertname"); IElementType BOTHMODIFIERS = new RedLibCommandTokenType("bothmodifiers"); IElementType BRACKET_CLOSE = new RedLibCommandTokenType("BRACKET_CLOSE"); IElementType BRACKET_OPEN = new RedLibCommandTokenType("BRACKET_OPEN"); IElementType CBRACKET = new RedLibCommandTokenType("CBRACKET"); + IElementType COLON = new RedLibCommandTokenType("COLON"); IElementType COMMA = new RedLibCommandTokenType("COMMA"); IElementType COMMANDNAME = new RedLibCommandTokenType("commandname"); IElementType COMMENT = new RedLibCommandTokenType("COMMENT"); IElementType CONSOLE = new RedLibCommandTokenType("console"); + IElementType CONSTRAINT = new RedLibCommandTokenType("CONSTRAINT"); + IElementType CONSUME_TOKEN = new RedLibCommandTokenType("CONSUME_TOKEN"); IElementType CONTEXT = new RedLibCommandTokenType("context"); IElementType CONTEXTNAME = new RedLibCommandTokenType("contextname"); IElementType DASHES = new RedLibCommandTokenType("DASHES"); IElementType DEFAULT_VALUE = new RedLibCommandTokenType("DEFAULT_VALUE"); IElementType DOT = new RedLibCommandTokenType("DOT"); IElementType EVERYONE = new RedLibCommandTokenType("everyone"); + IElementType FLAG_COLON = new RedLibCommandTokenType("FLAG_COLON"); IElementType FLAG_MODIFIER = new RedLibCommandTokenType("FLAG_MODIFIER"); IElementType FLAG_NAME = new RedLibCommandTokenType("FLAG_NAME"); IElementType HELP = new RedLibCommandTokenType("help"); @@ -80,87 +56,5 @@ public interface RedLibCommandTypes { IElementType USER = new RedLibCommandTokenType("user"); class Factory { - public static PsiElement createElement(ASTNode node) { - IElementType type = node.getElementType(); - if (type == ARG) { - return new RedLibCommandArgImpl(node); - } - else if (type == ARGS) { - return new RedLibCommandArgsImpl(node); - } - else if (type == ARGS_CONSUME) { - return new RedLibCommandArgsConsumeImpl(node); - } - else if (type == ARGUMENT) { - return new RedLibCommandArgumentImpl(node); - } - else if (type == ASSERT_LINE) { - return new RedLibCommandAssertLineImpl(node); - } - else if (type == BLANK_LINE) { - return new RedLibCommandBlankLineImpl(node); - } - else if (type == CLOSE_BRACKET) { - return new RedLibCommandCloseBracketImpl(node); - } - else if (type == COMMAND_DEF) { - return new RedLibCommandCommandDefImpl(node); - } - else if (type == COMMAND_DEFINITION) { - return new RedLibCommandCommandDefinitionImpl(node); - } - else if (type == COMMAND_DEFINITION_CONSUME) { - return new RedLibCommandCommandDefinitionConsumeImpl(node); - } - else if (type == COMMAND_PROPERTY) { - return new RedLibCommandCommandPropertyImpl(node); - } - else if (type == COMMAND_PROPERTY_CONSUME) { - return new RedLibCommandCommandPropertyConsumeImpl(node); - } - else if (type == CONSUMING_ARG) { - return new RedLibCommandConsumingArgImpl(node); - } - else if (type == CONTEXT_LINE) { - return new RedLibCommandContextLineImpl(node); - } - else if (type == FLAG) { - return new RedLibCommandFlagImpl(node); - } - else if (type == HELP_LINE) { - return new RedLibCommandHelpLineImpl(node); - } - else if (type == HELP_MSG_LINE) { - return new RedLibCommandHelpMsgLineImpl(node); - } - else if (type == HOOK_LINE) { - return new RedLibCommandHookLineImpl(node); - } - else if (type == LINE) { - return new RedLibCommandLineImpl(node); - } - else if (type == LINE_CONSUME) { - return new RedLibCommandLineConsumeImpl(node); - } - else if (type == NO_HELP_LINE) { - return new RedLibCommandNoHelpLineImpl(node); - } - else if (type == NO_TAB_LINE) { - return new RedLibCommandNoTabLineImpl(node); - } - else if (type == OPEN_BRACKET) { - return new RedLibCommandOpenBracketImpl(node); - } - else if (type == PERMISSION_LINE) { - return new RedLibCommandPermissionLineImpl(node); - } - else if (type == POST_ARG_LINE) { - return new RedLibCommandPostArgLineImpl(node); - } - else if (type == USER_LINE) { - return new RedLibCommandUserLineImpl(node); - } - throw new AssertionError("Unknown element type: " + type); - } } } diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandUserLine.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandUserLine.java deleted file mode 100644 index a6ac3ce..0000000 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandUserLine.java +++ /dev/null @@ -1,10 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package com.github.shuaiouke.redlibcommandfile.language.psi; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.psi.PsiElement; - -public interface RedLibCommandUserLine extends PsiElement { - -} diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandVisitor.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandVisitor.java index 19e4074..4af17f5 100644 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandVisitor.java +++ b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/RedLibCommandVisitor.java @@ -7,110 +7,6 @@ public class RedLibCommandVisitor extends PsiElementVisitor { - public void visitArg(@NotNull RedLibCommandArg o) { - visitPsiElement(o); - } - - public void visitArgs(@NotNull RedLibCommandArgs o) { - visitPsiElement(o); - } - - public void visitArgsConsume(@NotNull RedLibCommandArgsConsume o) { - visitPsiElement(o); - } - - public void visitArgument(@NotNull RedLibCommandArgument o) { - visitPsiElement(o); - } - - public void visitAssertLine(@NotNull RedLibCommandAssertLine o) { - visitPsiElement(o); - } - - public void visitBlankLine(@NotNull RedLibCommandBlankLine o) { - visitPsiElement(o); - } - - public void visitCloseBracket(@NotNull RedLibCommandCloseBracket o) { - visitPsiElement(o); - } - - public void visitCommandDef(@NotNull RedLibCommandCommandDef o) { - visitPsiElement(o); - } - - public void visitCommandDefinition(@NotNull RedLibCommandCommandDefinition o) { - visitPsiElement(o); - } - - public void visitCommandDefinitionConsume(@NotNull RedLibCommandCommandDefinitionConsume o) { - visitPsiElement(o); - } - - public void visitCommandProperty(@NotNull RedLibCommandCommandProperty o) { - visitPsiElement(o); - } - - public void visitCommandPropertyConsume(@NotNull RedLibCommandCommandPropertyConsume o) { - visitPsiElement(o); - } - - public void visitConsumingArg(@NotNull RedLibCommandConsumingArg o) { - visitPsiElement(o); - } - - public void visitContextLine(@NotNull RedLibCommandContextLine o) { - visitPsiElement(o); - } - - public void visitFlag(@NotNull RedLibCommandFlag o) { - visitPsiElement(o); - } - - public void visitHelpLine(@NotNull RedLibCommandHelpLine o) { - visitPsiElement(o); - } - - public void visitHelpMsgLine(@NotNull RedLibCommandHelpMsgLine o) { - visitPsiElement(o); - } - - public void visitHookLine(@NotNull RedLibCommandHookLine o) { - visitPsiElement(o); - } - - public void visitLine(@NotNull RedLibCommandLine o) { - visitPsiElement(o); - } - - public void visitLineConsume(@NotNull RedLibCommandLineConsume o) { - visitPsiElement(o); - } - - public void visitNoHelpLine(@NotNull RedLibCommandNoHelpLine o) { - visitPsiElement(o); - } - - public void visitNoTabLine(@NotNull RedLibCommandNoTabLine o) { - visitPsiElement(o); - } - - public void visitOpenBracket(@NotNull RedLibCommandOpenBracket o) { - visitPsiElement(o); - } - - public void visitPermissionLine(@NotNull RedLibCommandPermissionLine o) { - visitPsiElement(o); - } - - public void visitPostArgLine(@NotNull RedLibCommandPostArgLine o) { - visitPsiElement(o); - } - - public void visitUserLine(@NotNull RedLibCommandUserLine o) { - visitPsiElement(o); - } - public void visitPsiElement(@NotNull PsiElement o) { visitElement(o); } diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandArgImpl.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandArgImpl.java deleted file mode 100644 index 130f1a5..0000000 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandArgImpl.java +++ /dev/null @@ -1,42 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package com.github.shuaiouke.redlibcommandfile.language.psi.impl; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.lang.ASTNode; -import com.intellij.psi.PsiElement; -import com.intellij.psi.PsiElementVisitor; -import com.intellij.psi.util.PsiTreeUtil; -import static com.github.shuaiouke.redlibcommandfile.language.psi.RedLibCommandTypes.*; -import com.intellij.extapi.psi.ASTWrapperPsiElement; -import com.github.shuaiouke.redlibcommandfile.language.psi.*; - -public class RedLibCommandArgImpl extends ASTWrapperPsiElement implements RedLibCommandArg { - - public RedLibCommandArgImpl(@NotNull ASTNode node) { - super(node); - } - - public void accept(@NotNull RedLibCommandVisitor visitor) { - visitor.visitArg(this); - } - - @Override - public void accept(@NotNull PsiElementVisitor visitor) { - if (visitor instanceof RedLibCommandVisitor) accept((RedLibCommandVisitor)visitor); - else super.accept(visitor); - } - - @Override - @Nullable - public RedLibCommandArgument getArgument() { - return findChildByClass(RedLibCommandArgument.class); - } - - @Override - @Nullable - public RedLibCommandFlag getFlag() { - return findChildByClass(RedLibCommandFlag.class); - } - -} diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandArgsConsumeImpl.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandArgsConsumeImpl.java deleted file mode 100644 index 2d83cd1..0000000 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandArgsConsumeImpl.java +++ /dev/null @@ -1,48 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package com.github.shuaiouke.redlibcommandfile.language.psi.impl; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.lang.ASTNode; -import com.intellij.psi.PsiElement; -import com.intellij.psi.PsiElementVisitor; -import com.intellij.psi.util.PsiTreeUtil; -import static com.github.shuaiouke.redlibcommandfile.language.psi.RedLibCommandTypes.*; -import com.intellij.extapi.psi.ASTWrapperPsiElement; -import com.github.shuaiouke.redlibcommandfile.language.psi.*; - -public class RedLibCommandArgsConsumeImpl extends ASTWrapperPsiElement implements RedLibCommandArgsConsume { - - public RedLibCommandArgsConsumeImpl(@NotNull ASTNode node) { - super(node); - } - - public void accept(@NotNull RedLibCommandVisitor visitor) { - visitor.visitArgsConsume(this); - } - - @Override - public void accept(@NotNull PsiElementVisitor visitor) { - if (visitor instanceof RedLibCommandVisitor) accept((RedLibCommandVisitor)visitor); - else super.accept(visitor); - } - - @Override - @NotNull - public List getArgList() { - return PsiTreeUtil.getChildrenOfTypeAsList(this, RedLibCommandArg.class); - } - - @Override - @NotNull - public RedLibCommandConsumingArg getConsumingArg() { - return findNotNullChildByClass(RedLibCommandConsumingArg.class); - } - - @Override - @NotNull - public List getFlagList() { - return PsiTreeUtil.getChildrenOfTypeAsList(this, RedLibCommandFlag.class); - } - -} diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandArgsImpl.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandArgsImpl.java deleted file mode 100644 index 352f563..0000000 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandArgsImpl.java +++ /dev/null @@ -1,36 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package com.github.shuaiouke.redlibcommandfile.language.psi.impl; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.lang.ASTNode; -import com.intellij.psi.PsiElement; -import com.intellij.psi.PsiElementVisitor; -import com.intellij.psi.util.PsiTreeUtil; -import static com.github.shuaiouke.redlibcommandfile.language.psi.RedLibCommandTypes.*; -import com.intellij.extapi.psi.ASTWrapperPsiElement; -import com.github.shuaiouke.redlibcommandfile.language.psi.*; - -public class RedLibCommandArgsImpl extends ASTWrapperPsiElement implements RedLibCommandArgs { - - public RedLibCommandArgsImpl(@NotNull ASTNode node) { - super(node); - } - - public void accept(@NotNull RedLibCommandVisitor visitor) { - visitor.visitArgs(this); - } - - @Override - public void accept(@NotNull PsiElementVisitor visitor) { - if (visitor instanceof RedLibCommandVisitor) accept((RedLibCommandVisitor)visitor); - else super.accept(visitor); - } - - @Override - @NotNull - public List getArgList() { - return PsiTreeUtil.getChildrenOfTypeAsList(this, RedLibCommandArg.class); - } - -} diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandArgumentImpl.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandArgumentImpl.java deleted file mode 100644 index a63bbf4..0000000 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandArgumentImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package com.github.shuaiouke.redlibcommandfile.language.psi.impl; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.lang.ASTNode; -import com.intellij.psi.PsiElement; -import com.intellij.psi.PsiElementVisitor; -import com.intellij.psi.util.PsiTreeUtil; -import static com.github.shuaiouke.redlibcommandfile.language.psi.RedLibCommandTypes.*; -import com.intellij.extapi.psi.ASTWrapperPsiElement; -import com.github.shuaiouke.redlibcommandfile.language.psi.*; - -public class RedLibCommandArgumentImpl extends ASTWrapperPsiElement implements RedLibCommandArgument { - - public RedLibCommandArgumentImpl(@NotNull ASTNode node) { - super(node); - } - - public void accept(@NotNull RedLibCommandVisitor visitor) { - visitor.visitArgument(this); - } - - @Override - public void accept(@NotNull PsiElementVisitor visitor) { - if (visitor instanceof RedLibCommandVisitor) accept((RedLibCommandVisitor)visitor); - else super.accept(visitor); - } - -} diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandAssertLineImpl.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandAssertLineImpl.java deleted file mode 100644 index 7d203fb..0000000 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandAssertLineImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package com.github.shuaiouke.redlibcommandfile.language.psi.impl; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.lang.ASTNode; -import com.intellij.psi.PsiElement; -import com.intellij.psi.PsiElementVisitor; -import com.intellij.psi.util.PsiTreeUtil; -import static com.github.shuaiouke.redlibcommandfile.language.psi.RedLibCommandTypes.*; -import com.intellij.extapi.psi.ASTWrapperPsiElement; -import com.github.shuaiouke.redlibcommandfile.language.psi.*; - -public class RedLibCommandAssertLineImpl extends ASTWrapperPsiElement implements RedLibCommandAssertLine { - - public RedLibCommandAssertLineImpl(@NotNull ASTNode node) { - super(node); - } - - public void accept(@NotNull RedLibCommandVisitor visitor) { - visitor.visitAssertLine(this); - } - - @Override - public void accept(@NotNull PsiElementVisitor visitor) { - if (visitor instanceof RedLibCommandVisitor) accept((RedLibCommandVisitor)visitor); - else super.accept(visitor); - } - -} diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandBlankLineImpl.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandBlankLineImpl.java deleted file mode 100644 index fb5059f..0000000 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandBlankLineImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package com.github.shuaiouke.redlibcommandfile.language.psi.impl; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.lang.ASTNode; -import com.intellij.psi.PsiElement; -import com.intellij.psi.PsiElementVisitor; -import com.intellij.psi.util.PsiTreeUtil; -import static com.github.shuaiouke.redlibcommandfile.language.psi.RedLibCommandTypes.*; -import com.intellij.extapi.psi.ASTWrapperPsiElement; -import com.github.shuaiouke.redlibcommandfile.language.psi.*; - -public class RedLibCommandBlankLineImpl extends ASTWrapperPsiElement implements RedLibCommandBlankLine { - - public RedLibCommandBlankLineImpl(@NotNull ASTNode node) { - super(node); - } - - public void accept(@NotNull RedLibCommandVisitor visitor) { - visitor.visitBlankLine(this); - } - - @Override - public void accept(@NotNull PsiElementVisitor visitor) { - if (visitor instanceof RedLibCommandVisitor) accept((RedLibCommandVisitor)visitor); - else super.accept(visitor); - } - -} diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandCloseBracketImpl.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandCloseBracketImpl.java deleted file mode 100644 index aa27035..0000000 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandCloseBracketImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package com.github.shuaiouke.redlibcommandfile.language.psi.impl; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.lang.ASTNode; -import com.intellij.psi.PsiElement; -import com.intellij.psi.PsiElementVisitor; -import com.intellij.psi.util.PsiTreeUtil; -import static com.github.shuaiouke.redlibcommandfile.language.psi.RedLibCommandTypes.*; -import com.intellij.extapi.psi.ASTWrapperPsiElement; -import com.github.shuaiouke.redlibcommandfile.language.psi.*; - -public class RedLibCommandCloseBracketImpl extends ASTWrapperPsiElement implements RedLibCommandCloseBracket { - - public RedLibCommandCloseBracketImpl(@NotNull ASTNode node) { - super(node); - } - - public void accept(@NotNull RedLibCommandVisitor visitor) { - visitor.visitCloseBracket(this); - } - - @Override - public void accept(@NotNull PsiElementVisitor visitor) { - if (visitor instanceof RedLibCommandVisitor) accept((RedLibCommandVisitor)visitor); - else super.accept(visitor); - } - -} diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandCommandDefImpl.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandCommandDefImpl.java deleted file mode 100644 index f4c6e90..0000000 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandCommandDefImpl.java +++ /dev/null @@ -1,42 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package com.github.shuaiouke.redlibcommandfile.language.psi.impl; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.lang.ASTNode; -import com.intellij.psi.PsiElement; -import com.intellij.psi.PsiElementVisitor; -import com.intellij.psi.util.PsiTreeUtil; -import static com.github.shuaiouke.redlibcommandfile.language.psi.RedLibCommandTypes.*; -import com.intellij.extapi.psi.ASTWrapperPsiElement; -import com.github.shuaiouke.redlibcommandfile.language.psi.*; - -public class RedLibCommandCommandDefImpl extends ASTWrapperPsiElement implements RedLibCommandCommandDef { - - public RedLibCommandCommandDefImpl(@NotNull ASTNode node) { - super(node); - } - - public void accept(@NotNull RedLibCommandVisitor visitor) { - visitor.visitCommandDef(this); - } - - @Override - public void accept(@NotNull PsiElementVisitor visitor) { - if (visitor instanceof RedLibCommandVisitor) accept((RedLibCommandVisitor)visitor); - else super.accept(visitor); - } - - @Override - @Nullable - public RedLibCommandCommandDefinition getCommandDefinition() { - return findChildByClass(RedLibCommandCommandDefinition.class); - } - - @Override - @Nullable - public RedLibCommandCommandDefinitionConsume getCommandDefinitionConsume() { - return findChildByClass(RedLibCommandCommandDefinitionConsume.class); - } - -} diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandCommandDefinitionConsumeImpl.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandCommandDefinitionConsumeImpl.java deleted file mode 100644 index 26730ce..0000000 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandCommandDefinitionConsumeImpl.java +++ /dev/null @@ -1,60 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package com.github.shuaiouke.redlibcommandfile.language.psi.impl; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.lang.ASTNode; -import com.intellij.psi.PsiElement; -import com.intellij.psi.PsiElementVisitor; -import com.intellij.psi.util.PsiTreeUtil; -import static com.github.shuaiouke.redlibcommandfile.language.psi.RedLibCommandTypes.*; -import com.intellij.extapi.psi.ASTWrapperPsiElement; -import com.github.shuaiouke.redlibcommandfile.language.psi.*; - -public class RedLibCommandCommandDefinitionConsumeImpl extends ASTWrapperPsiElement implements RedLibCommandCommandDefinitionConsume { - - public RedLibCommandCommandDefinitionConsumeImpl(@NotNull ASTNode node) { - super(node); - } - - public void accept(@NotNull RedLibCommandVisitor visitor) { - visitor.visitCommandDefinitionConsume(this); - } - - @Override - public void accept(@NotNull PsiElementVisitor visitor) { - if (visitor instanceof RedLibCommandVisitor) accept((RedLibCommandVisitor)visitor); - else super.accept(visitor); - } - - @Override - @Nullable - public RedLibCommandArgsConsume getArgsConsume() { - return findChildByClass(RedLibCommandArgsConsume.class); - } - - @Override - @NotNull - public List getBlankLineList() { - return PsiTreeUtil.getChildrenOfTypeAsList(this, RedLibCommandBlankLine.class); - } - - @Override - @NotNull - public RedLibCommandCloseBracket getCloseBracket() { - return findNotNullChildByClass(RedLibCommandCloseBracket.class); - } - - @Override - @NotNull - public List getLineConsumeList() { - return PsiTreeUtil.getChildrenOfTypeAsList(this, RedLibCommandLineConsume.class); - } - - @Override - @NotNull - public RedLibCommandOpenBracket getOpenBracket() { - return findNotNullChildByClass(RedLibCommandOpenBracket.class); - } - -} diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandCommandDefinitionImpl.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandCommandDefinitionImpl.java deleted file mode 100644 index 97c4ca4..0000000 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandCommandDefinitionImpl.java +++ /dev/null @@ -1,60 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package com.github.shuaiouke.redlibcommandfile.language.psi.impl; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.lang.ASTNode; -import com.intellij.psi.PsiElement; -import com.intellij.psi.PsiElementVisitor; -import com.intellij.psi.util.PsiTreeUtil; -import static com.github.shuaiouke.redlibcommandfile.language.psi.RedLibCommandTypes.*; -import com.intellij.extapi.psi.ASTWrapperPsiElement; -import com.github.shuaiouke.redlibcommandfile.language.psi.*; - -public class RedLibCommandCommandDefinitionImpl extends ASTWrapperPsiElement implements RedLibCommandCommandDefinition { - - public RedLibCommandCommandDefinitionImpl(@NotNull ASTNode node) { - super(node); - } - - public void accept(@NotNull RedLibCommandVisitor visitor) { - visitor.visitCommandDefinition(this); - } - - @Override - public void accept(@NotNull PsiElementVisitor visitor) { - if (visitor instanceof RedLibCommandVisitor) accept((RedLibCommandVisitor)visitor); - else super.accept(visitor); - } - - @Override - @Nullable - public RedLibCommandArgs getArgs() { - return findChildByClass(RedLibCommandArgs.class); - } - - @Override - @NotNull - public List getBlankLineList() { - return PsiTreeUtil.getChildrenOfTypeAsList(this, RedLibCommandBlankLine.class); - } - - @Override - @NotNull - public RedLibCommandCloseBracket getCloseBracket() { - return findNotNullChildByClass(RedLibCommandCloseBracket.class); - } - - @Override - @NotNull - public List getLineList() { - return PsiTreeUtil.getChildrenOfTypeAsList(this, RedLibCommandLine.class); - } - - @Override - @NotNull - public RedLibCommandOpenBracket getOpenBracket() { - return findNotNullChildByClass(RedLibCommandOpenBracket.class); - } - -} diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandCommandPropertyConsumeImpl.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandCommandPropertyConsumeImpl.java deleted file mode 100644 index 8c0a3f2..0000000 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandCommandPropertyConsumeImpl.java +++ /dev/null @@ -1,84 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package com.github.shuaiouke.redlibcommandfile.language.psi.impl; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.lang.ASTNode; -import com.intellij.psi.PsiElement; -import com.intellij.psi.PsiElementVisitor; -import com.intellij.psi.util.PsiTreeUtil; -import static com.github.shuaiouke.redlibcommandfile.language.psi.RedLibCommandTypes.*; -import com.intellij.extapi.psi.ASTWrapperPsiElement; -import com.github.shuaiouke.redlibcommandfile.language.psi.*; - -public class RedLibCommandCommandPropertyConsumeImpl extends ASTWrapperPsiElement implements RedLibCommandCommandPropertyConsume { - - public RedLibCommandCommandPropertyConsumeImpl(@NotNull ASTNode node) { - super(node); - } - - public void accept(@NotNull RedLibCommandVisitor visitor) { - visitor.visitCommandPropertyConsume(this); - } - - @Override - public void accept(@NotNull PsiElementVisitor visitor) { - if (visitor instanceof RedLibCommandVisitor) accept((RedLibCommandVisitor)visitor); - else super.accept(visitor); - } - - @Override - @Nullable - public RedLibCommandAssertLine getAssertLine() { - return findChildByClass(RedLibCommandAssertLine.class); - } - - @Override - @Nullable - public RedLibCommandContextLine getContextLine() { - return findChildByClass(RedLibCommandContextLine.class); - } - - @Override - @Nullable - public RedLibCommandHelpLine getHelpLine() { - return findChildByClass(RedLibCommandHelpLine.class); - } - - @Override - @Nullable - public RedLibCommandHelpMsgLine getHelpMsgLine() { - return findChildByClass(RedLibCommandHelpMsgLine.class); - } - - @Override - @Nullable - public RedLibCommandHookLine getHookLine() { - return findChildByClass(RedLibCommandHookLine.class); - } - - @Override - @Nullable - public RedLibCommandNoHelpLine getNoHelpLine() { - return findChildByClass(RedLibCommandNoHelpLine.class); - } - - @Override - @Nullable - public RedLibCommandNoTabLine getNoTabLine() { - return findChildByClass(RedLibCommandNoTabLine.class); - } - - @Override - @Nullable - public RedLibCommandPermissionLine getPermissionLine() { - return findChildByClass(RedLibCommandPermissionLine.class); - } - - @Override - @Nullable - public RedLibCommandUserLine getUserLine() { - return findChildByClass(RedLibCommandUserLine.class); - } - -} diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandCommandPropertyImpl.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandCommandPropertyImpl.java deleted file mode 100644 index 747dffc..0000000 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandCommandPropertyImpl.java +++ /dev/null @@ -1,90 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package com.github.shuaiouke.redlibcommandfile.language.psi.impl; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.lang.ASTNode; -import com.intellij.psi.PsiElement; -import com.intellij.psi.PsiElementVisitor; -import com.intellij.psi.util.PsiTreeUtil; -import static com.github.shuaiouke.redlibcommandfile.language.psi.RedLibCommandTypes.*; -import com.intellij.extapi.psi.ASTWrapperPsiElement; -import com.github.shuaiouke.redlibcommandfile.language.psi.*; - -public class RedLibCommandCommandPropertyImpl extends ASTWrapperPsiElement implements RedLibCommandCommandProperty { - - public RedLibCommandCommandPropertyImpl(@NotNull ASTNode node) { - super(node); - } - - public void accept(@NotNull RedLibCommandVisitor visitor) { - visitor.visitCommandProperty(this); - } - - @Override - public void accept(@NotNull PsiElementVisitor visitor) { - if (visitor instanceof RedLibCommandVisitor) accept((RedLibCommandVisitor)visitor); - else super.accept(visitor); - } - - @Override - @Nullable - public RedLibCommandAssertLine getAssertLine() { - return findChildByClass(RedLibCommandAssertLine.class); - } - - @Override - @Nullable - public RedLibCommandContextLine getContextLine() { - return findChildByClass(RedLibCommandContextLine.class); - } - - @Override - @Nullable - public RedLibCommandHelpLine getHelpLine() { - return findChildByClass(RedLibCommandHelpLine.class); - } - - @Override - @Nullable - public RedLibCommandHelpMsgLine getHelpMsgLine() { - return findChildByClass(RedLibCommandHelpMsgLine.class); - } - - @Override - @Nullable - public RedLibCommandHookLine getHookLine() { - return findChildByClass(RedLibCommandHookLine.class); - } - - @Override - @Nullable - public RedLibCommandNoHelpLine getNoHelpLine() { - return findChildByClass(RedLibCommandNoHelpLine.class); - } - - @Override - @Nullable - public RedLibCommandNoTabLine getNoTabLine() { - return findChildByClass(RedLibCommandNoTabLine.class); - } - - @Override - @Nullable - public RedLibCommandPermissionLine getPermissionLine() { - return findChildByClass(RedLibCommandPermissionLine.class); - } - - @Override - @Nullable - public RedLibCommandPostArgLine getPostArgLine() { - return findChildByClass(RedLibCommandPostArgLine.class); - } - - @Override - @Nullable - public RedLibCommandUserLine getUserLine() { - return findChildByClass(RedLibCommandUserLine.class); - } - -} diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandConsumingArgImpl.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandConsumingArgImpl.java deleted file mode 100644 index 963db30..0000000 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandConsumingArgImpl.java +++ /dev/null @@ -1,36 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package com.github.shuaiouke.redlibcommandfile.language.psi.impl; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.lang.ASTNode; -import com.intellij.psi.PsiElement; -import com.intellij.psi.PsiElementVisitor; -import com.intellij.psi.util.PsiTreeUtil; -import static com.github.shuaiouke.redlibcommandfile.language.psi.RedLibCommandTypes.*; -import com.intellij.extapi.psi.ASTWrapperPsiElement; -import com.github.shuaiouke.redlibcommandfile.language.psi.*; - -public class RedLibCommandConsumingArgImpl extends ASTWrapperPsiElement implements RedLibCommandConsumingArg { - - public RedLibCommandConsumingArgImpl(@NotNull ASTNode node) { - super(node); - } - - public void accept(@NotNull RedLibCommandVisitor visitor) { - visitor.visitConsumingArg(this); - } - - @Override - public void accept(@NotNull PsiElementVisitor visitor) { - if (visitor instanceof RedLibCommandVisitor) accept((RedLibCommandVisitor)visitor); - else super.accept(visitor); - } - - @Override - @NotNull - public RedLibCommandArgument getArgument() { - return findNotNullChildByClass(RedLibCommandArgument.class); - } - -} diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandContextLineImpl.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandContextLineImpl.java deleted file mode 100644 index c3ea21f..0000000 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandContextLineImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package com.github.shuaiouke.redlibcommandfile.language.psi.impl; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.lang.ASTNode; -import com.intellij.psi.PsiElement; -import com.intellij.psi.PsiElementVisitor; -import com.intellij.psi.util.PsiTreeUtil; -import static com.github.shuaiouke.redlibcommandfile.language.psi.RedLibCommandTypes.*; -import com.intellij.extapi.psi.ASTWrapperPsiElement; -import com.github.shuaiouke.redlibcommandfile.language.psi.*; - -public class RedLibCommandContextLineImpl extends ASTWrapperPsiElement implements RedLibCommandContextLine { - - public RedLibCommandContextLineImpl(@NotNull ASTNode node) { - super(node); - } - - public void accept(@NotNull RedLibCommandVisitor visitor) { - visitor.visitContextLine(this); - } - - @Override - public void accept(@NotNull PsiElementVisitor visitor) { - if (visitor instanceof RedLibCommandVisitor) accept((RedLibCommandVisitor)visitor); - else super.accept(visitor); - } - -} diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandFlagImpl.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandFlagImpl.java deleted file mode 100644 index 8a74628..0000000 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandFlagImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package com.github.shuaiouke.redlibcommandfile.language.psi.impl; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.lang.ASTNode; -import com.intellij.psi.PsiElement; -import com.intellij.psi.PsiElementVisitor; -import com.intellij.psi.util.PsiTreeUtil; -import static com.github.shuaiouke.redlibcommandfile.language.psi.RedLibCommandTypes.*; -import com.intellij.extapi.psi.ASTWrapperPsiElement; -import com.github.shuaiouke.redlibcommandfile.language.psi.*; - -public class RedLibCommandFlagImpl extends ASTWrapperPsiElement implements RedLibCommandFlag { - - public RedLibCommandFlagImpl(@NotNull ASTNode node) { - super(node); - } - - public void accept(@NotNull RedLibCommandVisitor visitor) { - visitor.visitFlag(this); - } - - @Override - public void accept(@NotNull PsiElementVisitor visitor) { - if (visitor instanceof RedLibCommandVisitor) accept((RedLibCommandVisitor)visitor); - else super.accept(visitor); - } - -} diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandHelpLineImpl.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandHelpLineImpl.java deleted file mode 100644 index 98c8488..0000000 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandHelpLineImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package com.github.shuaiouke.redlibcommandfile.language.psi.impl; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.lang.ASTNode; -import com.intellij.psi.PsiElement; -import com.intellij.psi.PsiElementVisitor; -import com.intellij.psi.util.PsiTreeUtil; -import static com.github.shuaiouke.redlibcommandfile.language.psi.RedLibCommandTypes.*; -import com.intellij.extapi.psi.ASTWrapperPsiElement; -import com.github.shuaiouke.redlibcommandfile.language.psi.*; - -public class RedLibCommandHelpLineImpl extends ASTWrapperPsiElement implements RedLibCommandHelpLine { - - public RedLibCommandHelpLineImpl(@NotNull ASTNode node) { - super(node); - } - - public void accept(@NotNull RedLibCommandVisitor visitor) { - visitor.visitHelpLine(this); - } - - @Override - public void accept(@NotNull PsiElementVisitor visitor) { - if (visitor instanceof RedLibCommandVisitor) accept((RedLibCommandVisitor)visitor); - else super.accept(visitor); - } - -} diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandHelpMsgLineImpl.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandHelpMsgLineImpl.java deleted file mode 100644 index 6a3327d..0000000 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandHelpMsgLineImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package com.github.shuaiouke.redlibcommandfile.language.psi.impl; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.lang.ASTNode; -import com.intellij.psi.PsiElement; -import com.intellij.psi.PsiElementVisitor; -import com.intellij.psi.util.PsiTreeUtil; -import static com.github.shuaiouke.redlibcommandfile.language.psi.RedLibCommandTypes.*; -import com.intellij.extapi.psi.ASTWrapperPsiElement; -import com.github.shuaiouke.redlibcommandfile.language.psi.*; - -public class RedLibCommandHelpMsgLineImpl extends ASTWrapperPsiElement implements RedLibCommandHelpMsgLine { - - public RedLibCommandHelpMsgLineImpl(@NotNull ASTNode node) { - super(node); - } - - public void accept(@NotNull RedLibCommandVisitor visitor) { - visitor.visitHelpMsgLine(this); - } - - @Override - public void accept(@NotNull PsiElementVisitor visitor) { - if (visitor instanceof RedLibCommandVisitor) accept((RedLibCommandVisitor)visitor); - else super.accept(visitor); - } - -} diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandHookLineImpl.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandHookLineImpl.java deleted file mode 100644 index 26b70a7..0000000 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandHookLineImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package com.github.shuaiouke.redlibcommandfile.language.psi.impl; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.lang.ASTNode; -import com.intellij.psi.PsiElement; -import com.intellij.psi.PsiElementVisitor; -import com.intellij.psi.util.PsiTreeUtil; -import static com.github.shuaiouke.redlibcommandfile.language.psi.RedLibCommandTypes.*; -import com.intellij.extapi.psi.ASTWrapperPsiElement; -import com.github.shuaiouke.redlibcommandfile.language.psi.*; - -public class RedLibCommandHookLineImpl extends ASTWrapperPsiElement implements RedLibCommandHookLine { - - public RedLibCommandHookLineImpl(@NotNull ASTNode node) { - super(node); - } - - public void accept(@NotNull RedLibCommandVisitor visitor) { - visitor.visitHookLine(this); - } - - @Override - public void accept(@NotNull PsiElementVisitor visitor) { - if (visitor instanceof RedLibCommandVisitor) accept((RedLibCommandVisitor)visitor); - else super.accept(visitor); - } - -} diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandLineConsumeImpl.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandLineConsumeImpl.java deleted file mode 100644 index e8b8bad..0000000 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandLineConsumeImpl.java +++ /dev/null @@ -1,42 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package com.github.shuaiouke.redlibcommandfile.language.psi.impl; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.lang.ASTNode; -import com.intellij.psi.PsiElement; -import com.intellij.psi.PsiElementVisitor; -import com.intellij.psi.util.PsiTreeUtil; -import static com.github.shuaiouke.redlibcommandfile.language.psi.RedLibCommandTypes.*; -import com.intellij.extapi.psi.ASTWrapperPsiElement; -import com.github.shuaiouke.redlibcommandfile.language.psi.*; - -public class RedLibCommandLineConsumeImpl extends ASTWrapperPsiElement implements RedLibCommandLineConsume { - - public RedLibCommandLineConsumeImpl(@NotNull ASTNode node) { - super(node); - } - - public void accept(@NotNull RedLibCommandVisitor visitor) { - visitor.visitLineConsume(this); - } - - @Override - public void accept(@NotNull PsiElementVisitor visitor) { - if (visitor instanceof RedLibCommandVisitor) accept((RedLibCommandVisitor)visitor); - else super.accept(visitor); - } - - @Override - @Nullable - public RedLibCommandCommandDef getCommandDef() { - return findChildByClass(RedLibCommandCommandDef.class); - } - - @Override - @Nullable - public RedLibCommandCommandPropertyConsume getCommandPropertyConsume() { - return findChildByClass(RedLibCommandCommandPropertyConsume.class); - } - -} diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandLineImpl.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandLineImpl.java deleted file mode 100644 index f0c3583..0000000 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandLineImpl.java +++ /dev/null @@ -1,42 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package com.github.shuaiouke.redlibcommandfile.language.psi.impl; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.lang.ASTNode; -import com.intellij.psi.PsiElement; -import com.intellij.psi.PsiElementVisitor; -import com.intellij.psi.util.PsiTreeUtil; -import static com.github.shuaiouke.redlibcommandfile.language.psi.RedLibCommandTypes.*; -import com.intellij.extapi.psi.ASTWrapperPsiElement; -import com.github.shuaiouke.redlibcommandfile.language.psi.*; - -public class RedLibCommandLineImpl extends ASTWrapperPsiElement implements RedLibCommandLine { - - public RedLibCommandLineImpl(@NotNull ASTNode node) { - super(node); - } - - public void accept(@NotNull RedLibCommandVisitor visitor) { - visitor.visitLine(this); - } - - @Override - public void accept(@NotNull PsiElementVisitor visitor) { - if (visitor instanceof RedLibCommandVisitor) accept((RedLibCommandVisitor)visitor); - else super.accept(visitor); - } - - @Override - @Nullable - public RedLibCommandCommandDef getCommandDef() { - return findChildByClass(RedLibCommandCommandDef.class); - } - - @Override - @Nullable - public RedLibCommandCommandProperty getCommandProperty() { - return findChildByClass(RedLibCommandCommandProperty.class); - } - -} diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandNoHelpLineImpl.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandNoHelpLineImpl.java deleted file mode 100644 index be693c5..0000000 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandNoHelpLineImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package com.github.shuaiouke.redlibcommandfile.language.psi.impl; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.lang.ASTNode; -import com.intellij.psi.PsiElement; -import com.intellij.psi.PsiElementVisitor; -import com.intellij.psi.util.PsiTreeUtil; -import static com.github.shuaiouke.redlibcommandfile.language.psi.RedLibCommandTypes.*; -import com.intellij.extapi.psi.ASTWrapperPsiElement; -import com.github.shuaiouke.redlibcommandfile.language.psi.*; - -public class RedLibCommandNoHelpLineImpl extends ASTWrapperPsiElement implements RedLibCommandNoHelpLine { - - public RedLibCommandNoHelpLineImpl(@NotNull ASTNode node) { - super(node); - } - - public void accept(@NotNull RedLibCommandVisitor visitor) { - visitor.visitNoHelpLine(this); - } - - @Override - public void accept(@NotNull PsiElementVisitor visitor) { - if (visitor instanceof RedLibCommandVisitor) accept((RedLibCommandVisitor)visitor); - else super.accept(visitor); - } - -} diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandNoTabLineImpl.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandNoTabLineImpl.java deleted file mode 100644 index e282b00..0000000 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandNoTabLineImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package com.github.shuaiouke.redlibcommandfile.language.psi.impl; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.lang.ASTNode; -import com.intellij.psi.PsiElement; -import com.intellij.psi.PsiElementVisitor; -import com.intellij.psi.util.PsiTreeUtil; -import static com.github.shuaiouke.redlibcommandfile.language.psi.RedLibCommandTypes.*; -import com.intellij.extapi.psi.ASTWrapperPsiElement; -import com.github.shuaiouke.redlibcommandfile.language.psi.*; - -public class RedLibCommandNoTabLineImpl extends ASTWrapperPsiElement implements RedLibCommandNoTabLine { - - public RedLibCommandNoTabLineImpl(@NotNull ASTNode node) { - super(node); - } - - public void accept(@NotNull RedLibCommandVisitor visitor) { - visitor.visitNoTabLine(this); - } - - @Override - public void accept(@NotNull PsiElementVisitor visitor) { - if (visitor instanceof RedLibCommandVisitor) accept((RedLibCommandVisitor)visitor); - else super.accept(visitor); - } - -} diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandOpenBracketImpl.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandOpenBracketImpl.java deleted file mode 100644 index 43ed4ed..0000000 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandOpenBracketImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package com.github.shuaiouke.redlibcommandfile.language.psi.impl; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.lang.ASTNode; -import com.intellij.psi.PsiElement; -import com.intellij.psi.PsiElementVisitor; -import com.intellij.psi.util.PsiTreeUtil; -import static com.github.shuaiouke.redlibcommandfile.language.psi.RedLibCommandTypes.*; -import com.intellij.extapi.psi.ASTWrapperPsiElement; -import com.github.shuaiouke.redlibcommandfile.language.psi.*; - -public class RedLibCommandOpenBracketImpl extends ASTWrapperPsiElement implements RedLibCommandOpenBracket { - - public RedLibCommandOpenBracketImpl(@NotNull ASTNode node) { - super(node); - } - - public void accept(@NotNull RedLibCommandVisitor visitor) { - visitor.visitOpenBracket(this); - } - - @Override - public void accept(@NotNull PsiElementVisitor visitor) { - if (visitor instanceof RedLibCommandVisitor) accept((RedLibCommandVisitor)visitor); - else super.accept(visitor); - } - -} diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandPermissionLineImpl.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandPermissionLineImpl.java deleted file mode 100644 index 0cfaeba..0000000 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandPermissionLineImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package com.github.shuaiouke.redlibcommandfile.language.psi.impl; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.lang.ASTNode; -import com.intellij.psi.PsiElement; -import com.intellij.psi.PsiElementVisitor; -import com.intellij.psi.util.PsiTreeUtil; -import static com.github.shuaiouke.redlibcommandfile.language.psi.RedLibCommandTypes.*; -import com.intellij.extapi.psi.ASTWrapperPsiElement; -import com.github.shuaiouke.redlibcommandfile.language.psi.*; - -public class RedLibCommandPermissionLineImpl extends ASTWrapperPsiElement implements RedLibCommandPermissionLine { - - public RedLibCommandPermissionLineImpl(@NotNull ASTNode node) { - super(node); - } - - public void accept(@NotNull RedLibCommandVisitor visitor) { - visitor.visitPermissionLine(this); - } - - @Override - public void accept(@NotNull PsiElementVisitor visitor) { - if (visitor instanceof RedLibCommandVisitor) accept((RedLibCommandVisitor)visitor); - else super.accept(visitor); - } - -} diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandPostArgLineImpl.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandPostArgLineImpl.java deleted file mode 100644 index 496f3a5..0000000 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandPostArgLineImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package com.github.shuaiouke.redlibcommandfile.language.psi.impl; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.lang.ASTNode; -import com.intellij.psi.PsiElement; -import com.intellij.psi.PsiElementVisitor; -import com.intellij.psi.util.PsiTreeUtil; -import static com.github.shuaiouke.redlibcommandfile.language.psi.RedLibCommandTypes.*; -import com.intellij.extapi.psi.ASTWrapperPsiElement; -import com.github.shuaiouke.redlibcommandfile.language.psi.*; - -public class RedLibCommandPostArgLineImpl extends ASTWrapperPsiElement implements RedLibCommandPostArgLine { - - public RedLibCommandPostArgLineImpl(@NotNull ASTNode node) { - super(node); - } - - public void accept(@NotNull RedLibCommandVisitor visitor) { - visitor.visitPostArgLine(this); - } - - @Override - public void accept(@NotNull PsiElementVisitor visitor) { - if (visitor instanceof RedLibCommandVisitor) accept((RedLibCommandVisitor)visitor); - else super.accept(visitor); - } - -} diff --git a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandUserLineImpl.java b/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandUserLineImpl.java deleted file mode 100644 index 3d1f191..0000000 --- a/src/main/gen/com/github/shuaiouke/redlibcommandfile/language/psi/impl/RedLibCommandUserLineImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -// This is a generated file. Not intended for manual editing. -package com.github.shuaiouke.redlibcommandfile.language.psi.impl; - -import java.util.List; -import org.jetbrains.annotations.*; -import com.intellij.lang.ASTNode; -import com.intellij.psi.PsiElement; -import com.intellij.psi.PsiElementVisitor; -import com.intellij.psi.util.PsiTreeUtil; -import static com.github.shuaiouke.redlibcommandfile.language.psi.RedLibCommandTypes.*; -import com.intellij.extapi.psi.ASTWrapperPsiElement; -import com.github.shuaiouke.redlibcommandfile.language.psi.*; - -public class RedLibCommandUserLineImpl extends ASTWrapperPsiElement implements RedLibCommandUserLine { - - public RedLibCommandUserLineImpl(@NotNull ASTNode node) { - super(node); - } - - public void accept(@NotNull RedLibCommandVisitor visitor) { - visitor.visitUserLine(this); - } - - @Override - public void accept(@NotNull PsiElementVisitor visitor) { - if (visitor instanceof RedLibCommandVisitor) accept((RedLibCommandVisitor)visitor); - else super.accept(visitor); - } - -} diff --git a/src/main/java/com/github/shuaiouke/redlibcommandfile/language/RedLibCommand.bnf b/src/main/java/com/github/shuaiouke/redlibcommandfile/language/RedLibCommand.bnf index 5c10db4..902960b 100644 --- a/src/main/java/com/github/shuaiouke/redlibcommandfile/language/RedLibCommand.bnf +++ b/src/main/java/com/github/shuaiouke/redlibcommandfile/language/RedLibCommand.bnf @@ -16,57 +16,79 @@ root ::= root_item* -private root_item ::= (CommandDef) | COMMENT +private root_item ::= (CommandDef_Base) | COMMENT -CommandDef ::= CommandDefinition | CommandDefinition_Consume | newline +private CommandDef_Base ::= CommandDefinition_Base | CommandDefinition_Consuming_Base -CommandDefinition ::= SPACE* commandname (aliasseparator alias)* (SPACE Args)? newline? Open_Bracket (Line | Blank_Line)* Close_Bracket +private CommandDef ::= CommandDefinition | CommandDefinition_Consuming | newline -CommandDefinition_Consume ::= SPACE* commandname (aliasseparator alias)* (SPACE Args_Consume)? newline? Open_Bracket (Line_Consume | Blank_Line)* Close_Bracket +private CommandDef_Consumed ::= CommandDefinition_Consumed | newline -Line ::= CommandProperty | CommandDef +private CommandDefinition ::= SPACE* commandname (aliasseparator alias)* (SPACE Args)? newline? Open_Bracket (Line | Blank_Line)* Close_Bracket -Line_Consume ::= CommandProperty_Consume | CommandDef +private CommandDefinition_Consuming ::= SPACE* commandname (aliasseparator alias)* (SPACE Args_Can_Consume)? newline? Open_Bracket (Line_Consumed | Blank_Line)* Close_Bracket -Blank_Line ::= (SPACE* newline) | COMMENT +private CommandDefinition_Base ::= SPACE* commandname (aliasseparator alias)* (SPACE Args)? newline? Open_Bracket (Line_Base | Blank_Line)* Close_Bracket -CommandProperty ::= (SPACE)* (HelpLine|PermissionLine|UserLine|HookLine|ContextLine|AssertLine|NoHelpLine|NoTabLine|PostArgLine|HelpMsgLine) newline +private CommandDefinition_Consuming_Base ::= SPACE* commandname (aliasseparator alias)* (SPACE Args_Can_Consume)? newline? Open_Bracket (Line_Base_Consuming | Blank_Line)* Close_Bracket -CommandProperty_Consume ::= (SPACE)* (HelpLine|PermissionLine|UserLine|HookLine|ContextLine|AssertLine|NoHelpLine|NoTabLine|HelpMsgLine) newline +private CommandDefinition_Consumed ::= SPACE* commandname (aliasseparator alias)* (SPACE Args_Can_Consume)? newline? Open_Bracket (Line_Consumed_Recovering | Blank_Line)* Close_Bracket + +private Line ::= CommandProperty | CommandDef + +private Line_Consumed ::= CommandProperty | CommandDef_Consumed + +private Line_Consumed_Recovering ::= CommandProperty_Consumed | CommandDef + +private Line_Base ::= CommandProperty_Base | CommandDef + +private Line_Base_Consuming ::= CommandProperty_Base | CommandDefinition_Consumed + +private Blank_Line ::= (SPACE* newline) | COMMENT + +private CommandProperty ::= (SPACE)* (HelpLine|PermissionLine|UserLine|HookLine|ContextLine|AssertLine|NoHelpLine|NoTabLine|PostArgLine|HelpMsgLine) newline + +private CommandProperty_Consumed ::= (SPACE)* (HelpLine|PermissionLine|UserLine|HookLine|ContextLine|AssertLine|NoHelpLine|NoTabLine|HelpMsgLine) newline + +private CommandProperty_Base ::= (SPACE)* (HelpLine|PermissionLine|UserLine|HookLine|ContextLine|AssertLine|NoHelpLine|NoTabLine|HelpMsgLine) newline //Help is a line for defining a command's subcommand "help" -HelpLine ::= help separator helpmessage (SPACE helpmessage)* {pin=2} +private HelpLine ::= help separator helpmessage (SPACE helpmessage)* {pin=2} + +private HelpMsgLine ::= helpmsg separator helpmsgkey (SPACE helpmessagekey)* {pin=2} -HelpMsgLine ::= helpmsg separator helpmsgkey (SPACE helpmessagekey)* {pin=2} +private PermissionLine ::= permission separator PERMISSION_VALUE (DOT PERMISSION_VALUE)* {pin=2} -PermissionLine ::= permission separator PERMISSION_VALUE (DOT PERMISSION_VALUE)* {pin=2} +private UserLine ::= user separator (player | console | everyone) {pin=2} -UserLine ::= user separator (player | console | everyone) {pin=2} +private HookLine ::= hook separator hookname {pin=2} -HookLine ::= hook separator hookname {pin=2} +private NoHelpLine ::= nohelp -NoHelpLine ::= nohelp +private NoTabLine ::= notab -NoTabLine ::= notab +private PostArgLine ::= postarg -PostArgLine ::= postarg +private ContextLine ::= context separator contextname (SPACE contextname)* {pin=2} -ContextLine ::= context separator contextname (SPACE contextname) {pin=2} +private AssertLine ::= assert separator assertname (SPACE assertname)* {pin=2} -AssertLine ::= assert separator assertname (SPACE assertname) {pin=2} +private Open_Bracket ::= SPACE* OBRACKET newline +private Close_Bracket ::= SPACE* CBRACKET (newline|<>) -Open_Bracket ::= SPACE* OBRACKET newline -Close_Bracket ::= SPACE* CBRACKET (newline|<>) +//Args_Consume ::= Arg* +private Args_Can_Consume ::= ConsumingArg* -Args_Consume ::= Arg* ConsumingArg (ARG_TYPE? Flag (newline | SPACE))* +private Args ::= Arg* -Args ::= Arg* +private Arg ::= (((ARG_TYPE CONSTRAINT? FLAG_COLON)? Flag) | (ARG_TYPE CONSTRAINT? COLON Argument)) (newline | SPACE) -Arg ::= ((ARG_TYPE? Flag) | (ARG_TYPE Argument)) (newline | SPACE) +private ConsumingArg ::= ARG_TYPE CONSTRAINT? CONSUME_TOKEN? COLON Consuming_Argument (newline | SPACE) -ConsumingArg ::= ARG_TYPE_CONSUME Argument (newline | SPACE) +private Flag ::= FLAG_NAME (COMMA DASHES FLAG_NAME)* FLAG_MODIFIER? (BRACKET_OPEN DEFAULT_VALUE? BRACKET_CLOSE)? -Flag ::= DASHES FLAG_NAME (COMMA DASHES FLAG_NAME)* FLAG_MODIFIER? (BRACKET_OPEN DEFAULT_VALUE? BRACKET_CLOSE)? +private Argument ::= ARG_NAME (noshowtype | ((noshowtype) ( BRACKET_OPEN DEFAULT_VALUE? BRACKET_CLOSE)? ))? -Argument ::= ARG_NAME (noshowtype | ((notrequired | bothmodifiers) ( BRACKET_OPEN DEFAULT_VALUE? BRACKET_CLOSE)? ))? +private Consuming_Argument ::= ARG_NAME (noshowtype | ((notrequired | bothmodifiers) ( BRACKET_OPEN DEFAULT_VALUE? BRACKET_CLOSE)? ))? +//(CONSTRAINT_OPEN CONSTRAINT? CONSTRAINT_CLOSE)? \ No newline at end of file diff --git a/src/main/java/com/github/shuaiouke/redlibcommandfile/language/RedLibCommandBraceMatcher.java b/src/main/java/com/github/shuaiouke/redlibcommandfile/language/RedLibCommandBraceMatcher.java index caa9e0e..93a1a2f 100644 --- a/src/main/java/com/github/shuaiouke/redlibcommandfile/language/RedLibCommandBraceMatcher.java +++ b/src/main/java/com/github/shuaiouke/redlibcommandfile/language/RedLibCommandBraceMatcher.java @@ -17,7 +17,8 @@ public class RedLibCommandBraceMatcher implements PairedBraceMatcher { private static final BracePair[] PAIRS = new BracePair[]{ - new BracePair(BRACKET_OPEN, new IElementType("}", null), false), +// new BracePair(BRACKET_OPEN, new IElementType("}", null), false), +// new BracePair(OBRACKET, getElementType("}"), true), new BracePair(OBRACKET, CBRACKET, true), }; diff --git a/src/main/java/com/github/shuaiouke/redlibcommandfile/language/RedLibCommandLexer.flex b/src/main/java/com/github/shuaiouke/redlibcommandfile/language/RedLibCommandLexer.flex index 203487b..55558a4 100644 --- a/src/main/java/com/github/shuaiouke/redlibcommandfile/language/RedLibCommandLexer.flex +++ b/src/main/java/com/github/shuaiouke/redlibcommandfile/language/RedLibCommandLexer.flex @@ -27,10 +27,12 @@ NOSHOWTYPE=\* NOREQ=\? NOSHOWTYPENOREQ=\*\?|\?\* CRLF=\R -QUOTE=([^\(\)\\])* -ARG_TYPE_CONSUME=[\w\d][\w\d\-]*("..."|"[]")\: -VAR_TYPE=\w+\: -DASH=\-+ +ESCAPED_QUOTE=\\[^\n] +UNESCAPED_QUOTE=[^\n()] +QUOTE=({ESCAPED_QUOTE}|{UNESCAPED_QUOTE})* +CONSUME_TOKEN="..."|"[]" +VAR_TYPE=\w+ +DASH=-+ WORD=[\w\d][\w\d\-]* ALPHA=\w+ NEWLINE=[\r\n] @@ -38,6 +40,10 @@ WHITE_SPACE=[\ \n\t\f] SPACE=\s EOL=\$ HELPMESSAGE=([^\n])* +ESCAPED_CHAR=(\\[^\n]) +UNESCAPED_CHAR=[^\n<>] +CONSTRAINT=\<({UNESCAPED_CHAR}|{ESCAPED_CHAR})*\> +FLAG_COLON=\:-+ %state COMMAND %state NOARG @@ -84,15 +90,16 @@ HELPMESSAGE=([^\n])* { + ":" {yybegin(ARG);return COLON;} + {FLAG_COLON} {yybegin(FLAG);return FLAG_COLON;} //skip to flag section {DASH} {yybegin(FLAG);return DASHES;} {NEWLINE} {yybegin(COMMAND);return NEWLINE;} "{" {yybegin(YYINITIAL);return OBRACKET;} {SPACE} {return SPACE;} - {ARG_TYPE_CONSUME} {return ARG_TYPE_CONSUME;} {VAR_TYPE} {return ARG_TYPE;} - //Jump to arguments section - {WORD} {yybegin(ARG);return ARG_NAME;} + {CONSUME_TOKEN} {return CONSUME_TOKEN;} + {CONSTRAINT} {return CONSTRAINT;} } @@ -100,7 +107,6 @@ HELPMESSAGE=([^\n])* "(" {yybegin(DEFAULTVALUE);return BRACKET_OPEN;} //For aliases "," {return COMMA;} - {DASH} {return DASHES;} {SPACE} {yybegin(ARGS);return SPACE;} {NEWLINE} {yybegin(COMMAND);return NEWLINE;} //Report a flag name @@ -117,6 +123,7 @@ HELPMESSAGE=([^\n])* {NOSHOWTYPENOREQ} {return BOTHMODIFIERS;} {NEWLINE} {yybegin(COMMAND);return NEWLINE;} {SPACE} {yybegin(ARGS);return SPACE;} + {WORD} {return ARG_NAME;} } @@ -181,4 +188,4 @@ HELPMESSAGE=([^\n])* {SPACE} {return SPACE;} } -[^] {return COMMENT;} \ No newline at end of file +[^] {return BAD_CHARACTER;} \ No newline at end of file diff --git a/src/main/java/com/github/shuaiouke/redlibcommandfile/language/RedLibCommandParserDefinition.java b/src/main/java/com/github/shuaiouke/redlibcommandfile/language/RedLibCommandParserDefinition.java index d3033db..5117acd 100644 --- a/src/main/java/com/github/shuaiouke/redlibcommandfile/language/RedLibCommandParserDefinition.java +++ b/src/main/java/com/github/shuaiouke/redlibcommandfile/language/RedLibCommandParserDefinition.java @@ -56,7 +56,7 @@ public IFileElementType getFileNodeType() { @Override public @NotNull PsiElement createElement(ASTNode node) { - return RedLibCommandTypes.Factory.createElement(node); + return null; } @Override diff --git a/src/main/java/com/github/shuaiouke/redlibcommandfile/language/RedLibCommandSyntaxHighlighter.java b/src/main/java/com/github/shuaiouke/redlibcommandfile/language/RedLibCommandSyntaxHighlighter.java index d8b986c..885c9b7 100644 --- a/src/main/java/com/github/shuaiouke/redlibcommandfile/language/RedLibCommandSyntaxHighlighter.java +++ b/src/main/java/com/github/shuaiouke/redlibcommandfile/language/RedLibCommandSyntaxHighlighter.java @@ -25,6 +25,8 @@ public class RedLibCommandSyntaxHighlighter extends SyntaxHighlighterBase { createTextAttributesKey("REDLIB_ARG_TYPE",DefaultLanguageHighlighterColors.KEYWORD); public static final TextAttributesKey COMMENT_INVALID_LINE = createTextAttributesKey("REDLIB_INVALID",DefaultLanguageHighlighterColors.LINE_COMMENT); + public static final TextAttributesKey IDENTIFIER = + createTextAttributesKey("REDLIB_VALID",DefaultLanguageHighlighterColors.IDENTIFIER); private static final TextAttributesKey[] COMMAND_NAME_KEYS = new TextAttributesKey[]{COMMAND_NAME}; private static final TextAttributesKey[] TAG_KEYS = new TextAttributesKey[]{TAG}; @@ -32,6 +34,7 @@ public class RedLibCommandSyntaxHighlighter extends SyntaxHighlighterBase { private static final TextAttributesKey[] ARG_TYPE_KEYS = new TextAttributesKey[]{ARG_TYPE}; private static final TextAttributesKey[] INVALID_KEYS = new TextAttributesKey[]{COMMENT_INVALID_LINE}; private static final TextAttributesKey[] EMPTY_KEYS = new TextAttributesKey[0]; + private static final TextAttributesKey[] IDENTIFIER_KEYS = new TextAttributesKey[]{IDENTIFIER}; @Override public @NotNull Lexer getHighlightingLexer() { @@ -53,20 +56,22 @@ public class RedLibCommandSyntaxHighlighter extends SyntaxHighlighterBase { tokenType.equals(RedLibCommandTypes.NOTAB) | tokenType.equals(RedLibCommandTypes.POSTARG) | tokenType.equals(RedLibCommandTypes.CONTEXT) | - tokenType.equals(RedLibCommandTypes.ASSERT)| - tokenType.equals(RedLibCommandTypes.ARG_TYPE_CONSUME)) { + tokenType.equals(RedLibCommandTypes.ASSERT)) { return TAG_KEYS; } else if (tokenType.equals(RedLibCommandTypes.DASHES) | tokenType.equals(RedLibCommandTypes.ARG_NAME) | - tokenType.equals(RedLibCommandTypes.FLAG_NAME)) { + tokenType.equals(RedLibCommandTypes.FLAG_NAME)){ return ARG_NAME_KEYS; }else if(tokenType.equals(RedLibCommandTypes.ARG_TYPE)) { return ARG_TYPE_KEYS; - }else if(tokenType.equals(RedLibCommandTypes.COMMENT)) { + }else if(tokenType.equals(RedLibCommandTypes.COMMENT)) { return INVALID_KEYS; - }else - { + }else if(tokenType.equals(RedLibCommandTypes.CONSUME_TOKEN) | + tokenType.equals(RedLibCommandTypes.CONSTRAINT) + ){ + return IDENTIFIER_KEYS; + }else { return EMPTY_KEYS; } }