diff --git a/tools/odataUri/.gitignore b/tools/odataUri/.gitignore index 53c37a16..3d02eb21 100644 --- a/tools/odataUri/.gitignore +++ b/tools/odataUri/.gitignore @@ -1 +1,2 @@ -dist \ No newline at end of file +dist +src/parsers/.antlr diff --git a/tools/odataUri/package.json b/tools/odataUri/package.json index e756bf15..e65bfd5b 100644 --- a/tools/odataUri/package.json +++ b/tools/odataUri/package.json @@ -6,6 +6,7 @@ "types": "dist/index.d.ts", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", + "antlr4ts": "antlr4ts -visitor -no-listener -o src/parsers src/parsers/ODataUriQuery.g4", "build": "webpack" }, "author": "", @@ -27,6 +28,7 @@ "@parcel/transformer-typescript-tsc": "^2.0.0-alpha.3", "@parcel/transformer-typescript-types": "^2.0.0-rc.0", "@tsconfig/recommended": "^1.0.1", + "antlr4ts-cli": "^0.5.0-alpha.4", "ts-loader": "^9.2.5", "typescript": "^4.3.4", "webpack": "^5.48.0", diff --git a/tools/odataUri/src/parsers/.antlr/ODataUriPathLexer.interp b/tools/odataUri/src/parsers/.antlr/ODataUriPathLexer.interp deleted file mode 100644 index 7b7fa6b1..00000000 --- a/tools/odataUri/src/parsers/.antlr/ODataUriPathLexer.interp +++ /dev/null @@ -1,26 +0,0 @@ -token literal names: -null -'/' -'(' -')' - -token symbolic names: -null -SLASH -LEFT_PAREN -RIGHT_PAREN - -rule names: -SLASH -LEFT_PAREN -RIGHT_PAREN - -channel names: -DEFAULT_TOKEN_CHANNEL -HIDDEN - -mode names: -DEFAULT_MODE - -atn: -[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 5, 15, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 3, 2, 3, 2, 3, 3, 3, 3, 3, 4, 3, 4, 2, 2, 5, 3, 3, 5, 4, 7, 5, 3, 2, 2, 2, 14, 2, 3, 3, 2, 2, 2, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 3, 9, 3, 2, 2, 2, 5, 11, 3, 2, 2, 2, 7, 13, 3, 2, 2, 2, 9, 10, 7, 49, 2, 2, 10, 4, 3, 2, 2, 2, 11, 12, 7, 42, 2, 2, 12, 6, 3, 2, 2, 2, 13, 14, 7, 43, 2, 2, 14, 8, 3, 2, 2, 2, 3, 2, 2] \ No newline at end of file diff --git a/tools/odataUri/src/parsers/.antlr/ODataUriPathLexer.java b/tools/odataUri/src/parsers/.antlr/ODataUriPathLexer.java deleted file mode 100644 index 8247e7c7..00000000 --- a/tools/odataUri/src/parsers/.antlr/ODataUriPathLexer.java +++ /dev/null @@ -1,118 +0,0 @@ -// Generated from c:\Users\clhabins\source\repos\rapid-rocks-editor\src\js\odata-uri\parsers\ODataUriPath.g4 by ANTLR 4.8 -import org.antlr.v4.runtime.Lexer; -import org.antlr.v4.runtime.CharStream; -import org.antlr.v4.runtime.Token; -import org.antlr.v4.runtime.TokenStream; -import org.antlr.v4.runtime.*; -import org.antlr.v4.runtime.atn.*; -import org.antlr.v4.runtime.dfa.DFA; -import org.antlr.v4.runtime.misc.*; - -@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) -public class ODataUriPathLexer extends Lexer { - static { RuntimeMetaData.checkVersion("4.8", RuntimeMetaData.VERSION); } - - protected static final DFA[] _decisionToDFA; - protected static final PredictionContextCache _sharedContextCache = - new PredictionContextCache(); - public static final int - SLASH=1, LEFT_PAREN=2, RIGHT_PAREN=3; - public static String[] channelNames = { - "DEFAULT_TOKEN_CHANNEL", "HIDDEN" - }; - - public static String[] modeNames = { - "DEFAULT_MODE" - }; - - private static String[] makeRuleNames() { - return new String[] { - "SLASH", "LEFT_PAREN", "RIGHT_PAREN" - }; - } - public static final String[] ruleNames = makeRuleNames(); - - private static String[] makeLiteralNames() { - return new String[] { - null, "'/'", "'('", "')'" - }; - } - private static final String[] _LITERAL_NAMES = makeLiteralNames(); - private static String[] makeSymbolicNames() { - return new String[] { - null, "SLASH", "LEFT_PAREN", "RIGHT_PAREN" - }; - } - private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames(); - public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES); - - /** - * @deprecated Use {@link #VOCABULARY} instead. - */ - @Deprecated - public static final String[] tokenNames; - static { - tokenNames = new String[_SYMBOLIC_NAMES.length]; - for (int i = 0; i < tokenNames.length; i++) { - tokenNames[i] = VOCABULARY.getLiteralName(i); - if (tokenNames[i] == null) { - tokenNames[i] = VOCABULARY.getSymbolicName(i); - } - - if (tokenNames[i] == null) { - tokenNames[i] = ""; - } - } - } - - @Override - @Deprecated - public String[] getTokenNames() { - return tokenNames; - } - - @Override - - public Vocabulary getVocabulary() { - return VOCABULARY; - } - - - public ODataUriPathLexer(CharStream input) { - super(input); - _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); - } - - @Override - public String getGrammarFileName() { return "ODataUriPath.g4"; } - - @Override - public String[] getRuleNames() { return ruleNames; } - - @Override - public String getSerializedATN() { return _serializedATN; } - - @Override - public String[] getChannelNames() { return channelNames; } - - @Override - public String[] getModeNames() { return modeNames; } - - @Override - public ATN getATN() { return _ATN; } - - public static final String _serializedATN = - "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2\5\17\b\1\4\2\t\2"+ - "\4\3\t\3\4\4\t\4\3\2\3\2\3\3\3\3\3\4\3\4\2\2\5\3\3\5\4\7\5\3\2\2\2\16"+ - "\2\3\3\2\2\2\2\5\3\2\2\2\2\7\3\2\2\2\3\t\3\2\2\2\5\13\3\2\2\2\7\r\3\2"+ - "\2\2\t\n\7\61\2\2\n\4\3\2\2\2\13\f\7*\2\2\f\6\3\2\2\2\r\16\7+\2\2\16\b"+ - "\3\2\2\2\3\2\2"; - public static final ATN _ATN = - new ATNDeserializer().deserialize(_serializedATN.toCharArray()); - static { - _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; - for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { - _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); - } - } -} \ No newline at end of file diff --git a/tools/odataUri/src/parsers/.antlr/ODataUriPathLexer.tokens b/tools/odataUri/src/parsers/.antlr/ODataUriPathLexer.tokens deleted file mode 100644 index f8e12a50..00000000 --- a/tools/odataUri/src/parsers/.antlr/ODataUriPathLexer.tokens +++ /dev/null @@ -1,6 +0,0 @@ -SLASH=1 -LEFT_PAREN=2 -RIGHT_PAREN=3 -'/'=1 -'('=2 -')'=3 diff --git a/tools/odataUri/src/parsers/.antlr/ODataUriQuery.interp b/tools/odataUri/src/parsers/.antlr/ODataUriQuery.interp deleted file mode 100644 index 91e50359..00000000 --- a/tools/odataUri/src/parsers/.antlr/ODataUriQuery.interp +++ /dev/null @@ -1,55 +0,0 @@ -token literal names: -null -'$filter' -'or' -'and' -'eq' -'neq' -'gt' -'gte' -'lt' -'lte' -'&' -'=' -'(' -')' -null -null -null - -token symbolic names: -null -FILTER -OR -AND -EQ -NEQ -GT -GTE -LT -LTE -AMP -ASSIGN -LPAREN -RPAREN -ID -NUMBER -WS - -rule names: -queryOptions -queryOptionsList -queryOption -filterOption -expression -orExpression -andExpression -compExpression -basicExpression -parenExpression -compOperator -identifier - - -atn: -[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 18, 90, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 3, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 5, 3, 33, 10, 3, 3, 4, 3, 4, 3, 5, 3, 5, 3, 5, 3, 5, 3, 6, 3, 6, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 7, 7, 49, 10, 7, 12, 7, 14, 7, 52, 11, 7, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 7, 8, 60, 10, 8, 12, 8, 14, 8, 63, 11, 8, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 7, 9, 72, 10, 9, 12, 9, 14, 9, 75, 11, 9, 3, 10, 3, 10, 3, 10, 5, 10, 80, 10, 10, 3, 11, 3, 11, 3, 11, 3, 11, 3, 12, 3, 12, 3, 13, 3, 13, 3, 13, 2, 5, 12, 14, 16, 14, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 2, 3, 3, 2, 6, 11, 2, 83, 2, 26, 3, 2, 2, 2, 4, 32, 3, 2, 2, 2, 6, 34, 3, 2, 2, 2, 8, 36, 3, 2, 2, 2, 10, 40, 3, 2, 2, 2, 12, 42, 3, 2, 2, 2, 14, 53, 3, 2, 2, 2, 16, 64, 3, 2, 2, 2, 18, 79, 3, 2, 2, 2, 20, 81, 3, 2, 2, 2, 22, 85, 3, 2, 2, 2, 24, 87, 3, 2, 2, 2, 26, 27, 5, 6, 4, 2, 27, 28, 5, 4, 3, 2, 28, 3, 3, 2, 2, 2, 29, 30, 7, 12, 2, 2, 30, 33, 5, 4, 3, 2, 31, 33, 3, 2, 2, 2, 32, 29, 3, 2, 2, 2, 32, 31, 3, 2, 2, 2, 33, 5, 3, 2, 2, 2, 34, 35, 5, 8, 5, 2, 35, 7, 3, 2, 2, 2, 36, 37, 7, 3, 2, 2, 37, 38, 7, 13, 2, 2, 38, 39, 5, 10, 6, 2, 39, 9, 3, 2, 2, 2, 40, 41, 5, 12, 7, 2, 41, 11, 3, 2, 2, 2, 42, 43, 8, 7, 1, 2, 43, 44, 5, 14, 8, 2, 44, 50, 3, 2, 2, 2, 45, 46, 12, 3, 2, 2, 46, 47, 7, 4, 2, 2, 47, 49, 5, 14, 8, 2, 48, 45, 3, 2, 2, 2, 49, 52, 3, 2, 2, 2, 50, 48, 3, 2, 2, 2, 50, 51, 3, 2, 2, 2, 51, 13, 3, 2, 2, 2, 52, 50, 3, 2, 2, 2, 53, 54, 8, 8, 1, 2, 54, 55, 5, 16, 9, 2, 55, 61, 3, 2, 2, 2, 56, 57, 12, 3, 2, 2, 57, 58, 7, 5, 2, 2, 58, 60, 5, 16, 9, 2, 59, 56, 3, 2, 2, 2, 60, 63, 3, 2, 2, 2, 61, 59, 3, 2, 2, 2, 61, 62, 3, 2, 2, 2, 62, 15, 3, 2, 2, 2, 63, 61, 3, 2, 2, 2, 64, 65, 8, 9, 1, 2, 65, 66, 5, 18, 10, 2, 66, 73, 3, 2, 2, 2, 67, 68, 12, 3, 2, 2, 68, 69, 5, 22, 12, 2, 69, 70, 5, 18, 10, 2, 70, 72, 3, 2, 2, 2, 71, 67, 3, 2, 2, 2, 72, 75, 3, 2, 2, 2, 73, 71, 3, 2, 2, 2, 73, 74, 3, 2, 2, 2, 74, 17, 3, 2, 2, 2, 75, 73, 3, 2, 2, 2, 76, 80, 7, 17, 2, 2, 77, 80, 5, 24, 13, 2, 78, 80, 5, 20, 11, 2, 79, 76, 3, 2, 2, 2, 79, 77, 3, 2, 2, 2, 79, 78, 3, 2, 2, 2, 80, 19, 3, 2, 2, 2, 81, 82, 7, 14, 2, 2, 82, 83, 5, 10, 6, 2, 83, 84, 7, 15, 2, 2, 84, 21, 3, 2, 2, 2, 85, 86, 9, 2, 2, 2, 86, 23, 3, 2, 2, 2, 87, 88, 7, 16, 2, 2, 88, 25, 3, 2, 2, 2, 7, 32, 50, 61, 73, 79] \ No newline at end of file diff --git a/tools/odataUri/src/parsers/.antlr/ODataUriQuery.tokens b/tools/odataUri/src/parsers/.antlr/ODataUriQuery.tokens deleted file mode 100644 index 517be900..00000000 --- a/tools/odataUri/src/parsers/.antlr/ODataUriQuery.tokens +++ /dev/null @@ -1,29 +0,0 @@ -FILTER=1 -OR=2 -AND=3 -EQ=4 -NEQ=5 -GT=6 -GTE=7 -LT=8 -LTE=9 -AMP=10 -ASSIGN=11 -LPAREN=12 -RPAREN=13 -ID=14 -NUMBER=15 -WS=16 -'$filter'=1 -'or'=2 -'and'=3 -'eq'=4 -'neq'=5 -'gt'=6 -'gte'=7 -'lt'=8 -'lte'=9 -'&'=10 -'='=11 -'('=12 -')'=13 diff --git a/tools/odataUri/src/parsers/.antlr/ODataUriQueryLexer.interp b/tools/odataUri/src/parsers/.antlr/ODataUriQueryLexer.interp deleted file mode 100644 index 3d58541f..00000000 --- a/tools/odataUri/src/parsers/.antlr/ODataUriQueryLexer.interp +++ /dev/null @@ -1,65 +0,0 @@ -token literal names: -null -'$filter' -'or' -'and' -'eq' -'neq' -'gt' -'gte' -'lt' -'lte' -'&' -'=' -'(' -')' -null -null -null - -token symbolic names: -null -FILTER -OR -AND -EQ -NEQ -GT -GTE -LT -LTE -AMP -ASSIGN -LPAREN -RPAREN -ID -NUMBER -WS - -rule names: -FILTER -OR -AND -EQ -NEQ -GT -GTE -LT -LTE -AMP -ASSIGN -LPAREN -RPAREN -ID -NUMBER -WS - -channel names: -DEFAULT_TOKEN_CHANNEL -HIDDEN - -mode names: -DEFAULT_MODE - -atn: -[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 18, 93, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 4, 3, 4, 3, 4, 3, 4, 3, 5, 3, 5, 3, 5, 3, 6, 3, 6, 3, 6, 3, 6, 3, 7, 3, 7, 3, 7, 3, 8, 3, 8, 3, 8, 3, 8, 3, 9, 3, 9, 3, 9, 3, 10, 3, 10, 3, 10, 3, 10, 3, 11, 3, 11, 3, 12, 3, 12, 3, 13, 3, 13, 3, 14, 3, 14, 3, 15, 6, 15, 81, 10, 15, 13, 15, 14, 15, 82, 3, 16, 6, 16, 86, 10, 16, 13, 16, 14, 16, 87, 3, 17, 3, 17, 3, 17, 3, 17, 2, 2, 18, 3, 3, 5, 4, 7, 5, 9, 6, 11, 7, 13, 8, 15, 9, 17, 10, 19, 11, 21, 12, 23, 13, 25, 14, 27, 15, 29, 16, 31, 17, 33, 18, 3, 2, 5, 4, 2, 67, 92, 99, 124, 3, 2, 50, 59, 3, 2, 34, 34, 2, 94, 2, 3, 3, 2, 2, 2, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 9, 3, 2, 2, 2, 2, 11, 3, 2, 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 2, 17, 3, 2, 2, 2, 2, 19, 3, 2, 2, 2, 2, 21, 3, 2, 2, 2, 2, 23, 3, 2, 2, 2, 2, 25, 3, 2, 2, 2, 2, 27, 3, 2, 2, 2, 2, 29, 3, 2, 2, 2, 2, 31, 3, 2, 2, 2, 2, 33, 3, 2, 2, 2, 3, 35, 3, 2, 2, 2, 5, 43, 3, 2, 2, 2, 7, 46, 3, 2, 2, 2, 9, 50, 3, 2, 2, 2, 11, 53, 3, 2, 2, 2, 13, 57, 3, 2, 2, 2, 15, 60, 3, 2, 2, 2, 17, 64, 3, 2, 2, 2, 19, 67, 3, 2, 2, 2, 21, 71, 3, 2, 2, 2, 23, 73, 3, 2, 2, 2, 25, 75, 3, 2, 2, 2, 27, 77, 3, 2, 2, 2, 29, 80, 3, 2, 2, 2, 31, 85, 3, 2, 2, 2, 33, 89, 3, 2, 2, 2, 35, 36, 7, 38, 2, 2, 36, 37, 7, 104, 2, 2, 37, 38, 7, 107, 2, 2, 38, 39, 7, 110, 2, 2, 39, 40, 7, 118, 2, 2, 40, 41, 7, 103, 2, 2, 41, 42, 7, 116, 2, 2, 42, 4, 3, 2, 2, 2, 43, 44, 7, 113, 2, 2, 44, 45, 7, 116, 2, 2, 45, 6, 3, 2, 2, 2, 46, 47, 7, 99, 2, 2, 47, 48, 7, 112, 2, 2, 48, 49, 7, 102, 2, 2, 49, 8, 3, 2, 2, 2, 50, 51, 7, 103, 2, 2, 51, 52, 7, 115, 2, 2, 52, 10, 3, 2, 2, 2, 53, 54, 7, 112, 2, 2, 54, 55, 7, 103, 2, 2, 55, 56, 7, 115, 2, 2, 56, 12, 3, 2, 2, 2, 57, 58, 7, 105, 2, 2, 58, 59, 7, 118, 2, 2, 59, 14, 3, 2, 2, 2, 60, 61, 7, 105, 2, 2, 61, 62, 7, 118, 2, 2, 62, 63, 7, 103, 2, 2, 63, 16, 3, 2, 2, 2, 64, 65, 7, 110, 2, 2, 65, 66, 7, 118, 2, 2, 66, 18, 3, 2, 2, 2, 67, 68, 7, 110, 2, 2, 68, 69, 7, 118, 2, 2, 69, 70, 7, 103, 2, 2, 70, 20, 3, 2, 2, 2, 71, 72, 7, 40, 2, 2, 72, 22, 3, 2, 2, 2, 73, 74, 7, 63, 2, 2, 74, 24, 3, 2, 2, 2, 75, 76, 7, 42, 2, 2, 76, 26, 3, 2, 2, 2, 77, 78, 7, 43, 2, 2, 78, 28, 3, 2, 2, 2, 79, 81, 9, 2, 2, 2, 80, 79, 3, 2, 2, 2, 81, 82, 3, 2, 2, 2, 82, 80, 3, 2, 2, 2, 82, 83, 3, 2, 2, 2, 83, 30, 3, 2, 2, 2, 84, 86, 9, 3, 2, 2, 85, 84, 3, 2, 2, 2, 86, 87, 3, 2, 2, 2, 87, 85, 3, 2, 2, 2, 87, 88, 3, 2, 2, 2, 88, 32, 3, 2, 2, 2, 89, 90, 9, 4, 2, 2, 90, 91, 3, 2, 2, 2, 91, 92, 8, 17, 2, 2, 92, 34, 3, 2, 2, 2, 5, 2, 82, 87, 3, 8, 2, 2] \ No newline at end of file diff --git a/tools/odataUri/src/parsers/.antlr/ODataUriQueryLexer.java b/tools/odataUri/src/parsers/.antlr/ODataUriQueryLexer.java deleted file mode 100644 index a1921b15..00000000 --- a/tools/odataUri/src/parsers/.antlr/ODataUriQueryLexer.java +++ /dev/null @@ -1,141 +0,0 @@ -// Generated from c:\Users\clhabins\source\repos\rapid-rocks-editor\src\js\odata-uri\parsers\ODataUriQuery.g4 by ANTLR 4.8 -import org.antlr.v4.runtime.Lexer; -import org.antlr.v4.runtime.CharStream; -import org.antlr.v4.runtime.Token; -import org.antlr.v4.runtime.TokenStream; -import org.antlr.v4.runtime.*; -import org.antlr.v4.runtime.atn.*; -import org.antlr.v4.runtime.dfa.DFA; -import org.antlr.v4.runtime.misc.*; - -@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) -public class ODataUriQueryLexer extends Lexer { - static { RuntimeMetaData.checkVersion("4.8", RuntimeMetaData.VERSION); } - - protected static final DFA[] _decisionToDFA; - protected static final PredictionContextCache _sharedContextCache = - new PredictionContextCache(); - public static final int - FILTER=1, OR=2, AND=3, EQ=4, NEQ=5, GT=6, GTE=7, LT=8, LTE=9, AMP=10, - ASSIGN=11, LPAREN=12, RPAREN=13, ID=14, NUMBER=15, WS=16; - public static String[] channelNames = { - "DEFAULT_TOKEN_CHANNEL", "HIDDEN" - }; - - public static String[] modeNames = { - "DEFAULT_MODE" - }; - - private static String[] makeRuleNames() { - return new String[] { - "FILTER", "OR", "AND", "EQ", "NEQ", "GT", "GTE", "LT", "LTE", "AMP", - "ASSIGN", "LPAREN", "RPAREN", "ID", "NUMBER", "WS" - }; - } - public static final String[] ruleNames = makeRuleNames(); - - private static String[] makeLiteralNames() { - return new String[] { - null, "'$filter'", "'or'", "'and'", "'eq'", "'neq'", "'gt'", "'gte'", - "'lt'", "'lte'", "'&'", "'='", "'('", "')'" - }; - } - private static final String[] _LITERAL_NAMES = makeLiteralNames(); - private static String[] makeSymbolicNames() { - return new String[] { - null, "FILTER", "OR", "AND", "EQ", "NEQ", "GT", "GTE", "LT", "LTE", "AMP", - "ASSIGN", "LPAREN", "RPAREN", "ID", "NUMBER", "WS" - }; - } - private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames(); - public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES); - - /** - * @deprecated Use {@link #VOCABULARY} instead. - */ - @Deprecated - public static final String[] tokenNames; - static { - tokenNames = new String[_SYMBOLIC_NAMES.length]; - for (int i = 0; i < tokenNames.length; i++) { - tokenNames[i] = VOCABULARY.getLiteralName(i); - if (tokenNames[i] == null) { - tokenNames[i] = VOCABULARY.getSymbolicName(i); - } - - if (tokenNames[i] == null) { - tokenNames[i] = ""; - } - } - } - - @Override - @Deprecated - public String[] getTokenNames() { - return tokenNames; - } - - @Override - - public Vocabulary getVocabulary() { - return VOCABULARY; - } - - - public ODataUriQueryLexer(CharStream input) { - super(input); - _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); - } - - @Override - public String getGrammarFileName() { return "ODataUriQuery.g4"; } - - @Override - public String[] getRuleNames() { return ruleNames; } - - @Override - public String getSerializedATN() { return _serializedATN; } - - @Override - public String[] getChannelNames() { return channelNames; } - - @Override - public String[] getModeNames() { return modeNames; } - - @Override - public ATN getATN() { return _ATN; } - - public static final String _serializedATN = - "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2\22]\b\1\4\2\t\2\4"+ - "\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t"+ - "\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\3\2\3\2\3"+ - "\2\3\2\3\2\3\2\3\2\3\2\3\3\3\3\3\3\3\4\3\4\3\4\3\4\3\5\3\5\3\5\3\6\3\6"+ - "\3\6\3\6\3\7\3\7\3\7\3\b\3\b\3\b\3\b\3\t\3\t\3\t\3\n\3\n\3\n\3\n\3\13"+ - "\3\13\3\f\3\f\3\r\3\r\3\16\3\16\3\17\6\17Q\n\17\r\17\16\17R\3\20\6\20"+ - "V\n\20\r\20\16\20W\3\21\3\21\3\21\3\21\2\2\22\3\3\5\4\7\5\t\6\13\7\r\b"+ - "\17\t\21\n\23\13\25\f\27\r\31\16\33\17\35\20\37\21!\22\3\2\5\4\2C\\c|"+ - "\3\2\62;\3\2\"\"\2^\2\3\3\2\2\2\2\5\3\2\2\2\2\7\3\2\2\2\2\t\3\2\2\2\2"+ - "\13\3\2\2\2\2\r\3\2\2\2\2\17\3\2\2\2\2\21\3\2\2\2\2\23\3\2\2\2\2\25\3"+ - "\2\2\2\2\27\3\2\2\2\2\31\3\2\2\2\2\33\3\2\2\2\2\35\3\2\2\2\2\37\3\2\2"+ - "\2\2!\3\2\2\2\3#\3\2\2\2\5+\3\2\2\2\7.\3\2\2\2\t\62\3\2\2\2\13\65\3\2"+ - "\2\2\r9\3\2\2\2\17<\3\2\2\2\21@\3\2\2\2\23C\3\2\2\2\25G\3\2\2\2\27I\3"+ - "\2\2\2\31K\3\2\2\2\33M\3\2\2\2\35P\3\2\2\2\37U\3\2\2\2!Y\3\2\2\2#$\7&"+ - "\2\2$%\7h\2\2%&\7k\2\2&\'\7n\2\2\'(\7v\2\2()\7g\2\2)*\7t\2\2*\4\3\2\2"+ - "\2+,\7q\2\2,-\7t\2\2-\6\3\2\2\2./\7c\2\2/\60\7p\2\2\60\61\7f\2\2\61\b"+ - "\3\2\2\2\62\63\7g\2\2\63\64\7s\2\2\64\n\3\2\2\2\65\66\7p\2\2\66\67\7g"+ - "\2\2\678\7s\2\28\f\3\2\2\29:\7i\2\2:;\7v\2\2;\16\3\2\2\2<=\7i\2\2=>\7"+ - "v\2\2>?\7g\2\2?\20\3\2\2\2@A\7n\2\2AB\7v\2\2B\22\3\2\2\2CD\7n\2\2DE\7"+ - "v\2\2EF\7g\2\2F\24\3\2\2\2GH\7(\2\2H\26\3\2\2\2IJ\7?\2\2J\30\3\2\2\2K"+ - "L\7*\2\2L\32\3\2\2\2MN\7+\2\2N\34\3\2\2\2OQ\t\2\2\2PO\3\2\2\2QR\3\2\2"+ - "\2RP\3\2\2\2RS\3\2\2\2S\36\3\2\2\2TV\t\3\2\2UT\3\2\2\2VW\3\2\2\2WU\3\2"+ - "\2\2WX\3\2\2\2X \3\2\2\2YZ\t\4\2\2Z[\3\2\2\2[\\\b\21\2\2\\\"\3\2\2\2\5"+ - "\2RW\3\b\2\2"; - public static final ATN _ATN = - new ATNDeserializer().deserialize(_serializedATN.toCharArray()); - static { - _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; - for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { - _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); - } - } -} \ No newline at end of file diff --git a/tools/odataUri/src/parsers/.antlr/ODataUriQueryLexer.tokens b/tools/odataUri/src/parsers/.antlr/ODataUriQueryLexer.tokens deleted file mode 100644 index 517be900..00000000 --- a/tools/odataUri/src/parsers/.antlr/ODataUriQueryLexer.tokens +++ /dev/null @@ -1,29 +0,0 @@ -FILTER=1 -OR=2 -AND=3 -EQ=4 -NEQ=5 -GT=6 -GTE=7 -LT=8 -LTE=9 -AMP=10 -ASSIGN=11 -LPAREN=12 -RPAREN=13 -ID=14 -NUMBER=15 -WS=16 -'$filter'=1 -'or'=2 -'and'=3 -'eq'=4 -'neq'=5 -'gt'=6 -'gte'=7 -'lt'=8 -'lte'=9 -'&'=10 -'='=11 -'('=12 -')'=13 diff --git a/tools/odataUri/src/parsers/.antlr/ODataUriQueryParser.java b/tools/odataUri/src/parsers/.antlr/ODataUriQueryParser.java deleted file mode 100644 index 2d273134..00000000 --- a/tools/odataUri/src/parsers/.antlr/ODataUriQueryParser.java +++ /dev/null @@ -1,725 +0,0 @@ -// Generated from c:\Users\clhabins\source\repos\rapid-rocks-editor\src\js\odata-uri\parsers\ODataUriQuery.g4 by ANTLR 4.8 -import org.antlr.v4.runtime.atn.*; -import org.antlr.v4.runtime.dfa.DFA; -import org.antlr.v4.runtime.*; -import org.antlr.v4.runtime.misc.*; -import org.antlr.v4.runtime.tree.*; -import java.util.List; -import java.util.Iterator; -import java.util.ArrayList; - -@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) -public class ODataUriQueryParser extends Parser { - static { RuntimeMetaData.checkVersion("4.8", RuntimeMetaData.VERSION); } - - protected static final DFA[] _decisionToDFA; - protected static final PredictionContextCache _sharedContextCache = - new PredictionContextCache(); - public static final int - FILTER=1, OR=2, AND=3, EQ=4, NEQ=5, GT=6, GTE=7, LT=8, LTE=9, AMP=10, - ASSIGN=11, LPAREN=12, RPAREN=13, ID=14, NUMBER=15, WS=16; - public static final int - RULE_queryOptions = 0, RULE_queryOptionsList = 1, RULE_queryOption = 2, - RULE_filterOption = 3, RULE_expression = 4, RULE_orExpression = 5, RULE_andExpression = 6, - RULE_compExpression = 7, RULE_basicExpression = 8, RULE_parenExpression = 9, - RULE_compOperator = 10, RULE_identifier = 11; - private static String[] makeRuleNames() { - return new String[] { - "queryOptions", "queryOptionsList", "queryOption", "filterOption", "expression", - "orExpression", "andExpression", "compExpression", "basicExpression", - "parenExpression", "compOperator", "identifier" - }; - } - public static final String[] ruleNames = makeRuleNames(); - - private static String[] makeLiteralNames() { - return new String[] { - null, "'$filter'", "'or'", "'and'", "'eq'", "'neq'", "'gt'", "'gte'", - "'lt'", "'lte'", "'&'", "'='", "'('", "')'" - }; - } - private static final String[] _LITERAL_NAMES = makeLiteralNames(); - private static String[] makeSymbolicNames() { - return new String[] { - null, "FILTER", "OR", "AND", "EQ", "NEQ", "GT", "GTE", "LT", "LTE", "AMP", - "ASSIGN", "LPAREN", "RPAREN", "ID", "NUMBER", "WS" - }; - } - private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames(); - public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES); - - /** - * @deprecated Use {@link #VOCABULARY} instead. - */ - @Deprecated - public static final String[] tokenNames; - static { - tokenNames = new String[_SYMBOLIC_NAMES.length]; - for (int i = 0; i < tokenNames.length; i++) { - tokenNames[i] = VOCABULARY.getLiteralName(i); - if (tokenNames[i] == null) { - tokenNames[i] = VOCABULARY.getSymbolicName(i); - } - - if (tokenNames[i] == null) { - tokenNames[i] = ""; - } - } - } - - @Override - @Deprecated - public String[] getTokenNames() { - return tokenNames; - } - - @Override - - public Vocabulary getVocabulary() { - return VOCABULARY; - } - - @Override - public String getGrammarFileName() { return "ODataUriQuery.g4"; } - - @Override - public String[] getRuleNames() { return ruleNames; } - - @Override - public String getSerializedATN() { return _serializedATN; } - - @Override - public ATN getATN() { return _ATN; } - - public ODataUriQueryParser(TokenStream input) { - super(input); - _interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); - } - - public static class QueryOptionsContext extends ParserRuleContext { - public QueryOptionContext queryOption() { - return getRuleContext(QueryOptionContext.class,0); - } - public QueryOptionsListContext queryOptionsList() { - return getRuleContext(QueryOptionsListContext.class,0); - } - public QueryOptionsContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_queryOptions; } - } - - public final QueryOptionsContext queryOptions() throws RecognitionException { - QueryOptionsContext _localctx = new QueryOptionsContext(_ctx, getState()); - enterRule(_localctx, 0, RULE_queryOptions); - try { - enterOuterAlt(_localctx, 1); - { - setState(24); - queryOption(); - setState(25); - queryOptionsList(); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class QueryOptionsListContext extends ParserRuleContext { - public TerminalNode AMP() { return getToken(ODataUriQueryParser.AMP, 0); } - public QueryOptionsListContext queryOptionsList() { - return getRuleContext(QueryOptionsListContext.class,0); - } - public QueryOptionsListContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_queryOptionsList; } - } - - public final QueryOptionsListContext queryOptionsList() throws RecognitionException { - QueryOptionsListContext _localctx = new QueryOptionsListContext(_ctx, getState()); - enterRule(_localctx, 2, RULE_queryOptionsList); - try { - setState(30); - _errHandler.sync(this); - switch (_input.LA(1)) { - case AMP: - enterOuterAlt(_localctx, 1); - { - setState(27); - match(AMP); - setState(28); - queryOptionsList(); - } - break; - case EOF: - enterOuterAlt(_localctx, 2); - { - } - break; - default: - throw new NoViableAltException(this); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class QueryOptionContext extends ParserRuleContext { - public FilterOptionContext filterOption() { - return getRuleContext(FilterOptionContext.class,0); - } - public QueryOptionContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_queryOption; } - } - - public final QueryOptionContext queryOption() throws RecognitionException { - QueryOptionContext _localctx = new QueryOptionContext(_ctx, getState()); - enterRule(_localctx, 4, RULE_queryOption); - try { - enterOuterAlt(_localctx, 1); - { - setState(32); - filterOption(); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class FilterOptionContext extends ParserRuleContext { - public TerminalNode FILTER() { return getToken(ODataUriQueryParser.FILTER, 0); } - public TerminalNode ASSIGN() { return getToken(ODataUriQueryParser.ASSIGN, 0); } - public ExpressionContext expression() { - return getRuleContext(ExpressionContext.class,0); - } - public FilterOptionContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_filterOption; } - } - - public final FilterOptionContext filterOption() throws RecognitionException { - FilterOptionContext _localctx = new FilterOptionContext(_ctx, getState()); - enterRule(_localctx, 6, RULE_filterOption); - try { - enterOuterAlt(_localctx, 1); - { - setState(34); - match(FILTER); - setState(35); - match(ASSIGN); - setState(36); - expression(); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class ExpressionContext extends ParserRuleContext { - public OrExpressionContext orExpression() { - return getRuleContext(OrExpressionContext.class,0); - } - public ExpressionContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_expression; } - } - - public final ExpressionContext expression() throws RecognitionException { - ExpressionContext _localctx = new ExpressionContext(_ctx, getState()); - enterRule(_localctx, 8, RULE_expression); - try { - enterOuterAlt(_localctx, 1); - { - setState(38); - orExpression(0); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class OrExpressionContext extends ParserRuleContext { - public AndExpressionContext andExpression() { - return getRuleContext(AndExpressionContext.class,0); - } - public OrExpressionContext orExpression() { - return getRuleContext(OrExpressionContext.class,0); - } - public TerminalNode OR() { return getToken(ODataUriQueryParser.OR, 0); } - public OrExpressionContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_orExpression; } - } - - public final OrExpressionContext orExpression() throws RecognitionException { - return orExpression(0); - } - - private OrExpressionContext orExpression(int _p) throws RecognitionException { - ParserRuleContext _parentctx = _ctx; - int _parentState = getState(); - OrExpressionContext _localctx = new OrExpressionContext(_ctx, _parentState); - OrExpressionContext _prevctx = _localctx; - int _startState = 10; - enterRecursionRule(_localctx, 10, RULE_orExpression, _p); - try { - int _alt; - enterOuterAlt(_localctx, 1); - { - { - setState(41); - andExpression(0); - } - _ctx.stop = _input.LT(-1); - setState(48); - _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,1,_ctx); - while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { - if ( _alt==1 ) { - if ( _parseListeners!=null ) triggerExitRuleEvent(); - _prevctx = _localctx; - { - { - _localctx = new OrExpressionContext(_parentctx, _parentState); - pushNewRecursionContext(_localctx, _startState, RULE_orExpression); - setState(43); - if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); - setState(44); - match(OR); - setState(45); - andExpression(0); - } - } - } - setState(50); - _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,1,_ctx); - } - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - unrollRecursionContexts(_parentctx); - } - return _localctx; - } - - public static class AndExpressionContext extends ParserRuleContext { - public CompExpressionContext compExpression() { - return getRuleContext(CompExpressionContext.class,0); - } - public AndExpressionContext andExpression() { - return getRuleContext(AndExpressionContext.class,0); - } - public TerminalNode AND() { return getToken(ODataUriQueryParser.AND, 0); } - public AndExpressionContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_andExpression; } - } - - public final AndExpressionContext andExpression() throws RecognitionException { - return andExpression(0); - } - - private AndExpressionContext andExpression(int _p) throws RecognitionException { - ParserRuleContext _parentctx = _ctx; - int _parentState = getState(); - AndExpressionContext _localctx = new AndExpressionContext(_ctx, _parentState); - AndExpressionContext _prevctx = _localctx; - int _startState = 12; - enterRecursionRule(_localctx, 12, RULE_andExpression, _p); - try { - int _alt; - enterOuterAlt(_localctx, 1); - { - { - setState(52); - compExpression(0); - } - _ctx.stop = _input.LT(-1); - setState(59); - _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,2,_ctx); - while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { - if ( _alt==1 ) { - if ( _parseListeners!=null ) triggerExitRuleEvent(); - _prevctx = _localctx; - { - { - _localctx = new AndExpressionContext(_parentctx, _parentState); - pushNewRecursionContext(_localctx, _startState, RULE_andExpression); - setState(54); - if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); - setState(55); - match(AND); - setState(56); - compExpression(0); - } - } - } - setState(61); - _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,2,_ctx); - } - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - unrollRecursionContexts(_parentctx); - } - return _localctx; - } - - public static class CompExpressionContext extends ParserRuleContext { - public BasicExpressionContext basicExpression() { - return getRuleContext(BasicExpressionContext.class,0); - } - public CompExpressionContext compExpression() { - return getRuleContext(CompExpressionContext.class,0); - } - public CompOperatorContext compOperator() { - return getRuleContext(CompOperatorContext.class,0); - } - public CompExpressionContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_compExpression; } - } - - public final CompExpressionContext compExpression() throws RecognitionException { - return compExpression(0); - } - - private CompExpressionContext compExpression(int _p) throws RecognitionException { - ParserRuleContext _parentctx = _ctx; - int _parentState = getState(); - CompExpressionContext _localctx = new CompExpressionContext(_ctx, _parentState); - CompExpressionContext _prevctx = _localctx; - int _startState = 14; - enterRecursionRule(_localctx, 14, RULE_compExpression, _p); - try { - int _alt; - enterOuterAlt(_localctx, 1); - { - { - setState(63); - basicExpression(); - } - _ctx.stop = _input.LT(-1); - setState(71); - _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,3,_ctx); - while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { - if ( _alt==1 ) { - if ( _parseListeners!=null ) triggerExitRuleEvent(); - _prevctx = _localctx; - { - { - _localctx = new CompExpressionContext(_parentctx, _parentState); - pushNewRecursionContext(_localctx, _startState, RULE_compExpression); - setState(65); - if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); - setState(66); - compOperator(); - setState(67); - basicExpression(); - } - } - } - setState(73); - _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,3,_ctx); - } - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - unrollRecursionContexts(_parentctx); - } - return _localctx; - } - - public static class BasicExpressionContext extends ParserRuleContext { - public TerminalNode NUMBER() { return getToken(ODataUriQueryParser.NUMBER, 0); } - public IdentifierContext identifier() { - return getRuleContext(IdentifierContext.class,0); - } - public ParenExpressionContext parenExpression() { - return getRuleContext(ParenExpressionContext.class,0); - } - public BasicExpressionContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_basicExpression; } - } - - public final BasicExpressionContext basicExpression() throws RecognitionException { - BasicExpressionContext _localctx = new BasicExpressionContext(_ctx, getState()); - enterRule(_localctx, 16, RULE_basicExpression); - try { - setState(77); - _errHandler.sync(this); - switch (_input.LA(1)) { - case NUMBER: - enterOuterAlt(_localctx, 1); - { - setState(74); - match(NUMBER); - } - break; - case ID: - enterOuterAlt(_localctx, 2); - { - setState(75); - identifier(); - } - break; - case LPAREN: - enterOuterAlt(_localctx, 3); - { - setState(76); - parenExpression(); - } - break; - default: - throw new NoViableAltException(this); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class ParenExpressionContext extends ParserRuleContext { - public TerminalNode LPAREN() { return getToken(ODataUriQueryParser.LPAREN, 0); } - public ExpressionContext expression() { - return getRuleContext(ExpressionContext.class,0); - } - public TerminalNode RPAREN() { return getToken(ODataUriQueryParser.RPAREN, 0); } - public ParenExpressionContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_parenExpression; } - } - - public final ParenExpressionContext parenExpression() throws RecognitionException { - ParenExpressionContext _localctx = new ParenExpressionContext(_ctx, getState()); - enterRule(_localctx, 18, RULE_parenExpression); - try { - enterOuterAlt(_localctx, 1); - { - setState(79); - match(LPAREN); - setState(80); - expression(); - setState(81); - match(RPAREN); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class CompOperatorContext extends ParserRuleContext { - public TerminalNode EQ() { return getToken(ODataUriQueryParser.EQ, 0); } - public TerminalNode NEQ() { return getToken(ODataUriQueryParser.NEQ, 0); } - public TerminalNode GTE() { return getToken(ODataUriQueryParser.GTE, 0); } - public TerminalNode GT() { return getToken(ODataUriQueryParser.GT, 0); } - public TerminalNode LTE() { return getToken(ODataUriQueryParser.LTE, 0); } - public TerminalNode LT() { return getToken(ODataUriQueryParser.LT, 0); } - public CompOperatorContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_compOperator; } - } - - public final CompOperatorContext compOperator() throws RecognitionException { - CompOperatorContext _localctx = new CompOperatorContext(_ctx, getState()); - enterRule(_localctx, 20, RULE_compOperator); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(83); - _la = _input.LA(1); - if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << EQ) | (1L << NEQ) | (1L << GT) | (1L << GTE) | (1L << LT) | (1L << LTE))) != 0)) ) { - _errHandler.recoverInline(this); - } - else { - if ( _input.LA(1)==Token.EOF ) matchedEOF = true; - _errHandler.reportMatch(this); - consume(); - } - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public static class IdentifierContext extends ParserRuleContext { - public TerminalNode ID() { return getToken(ODataUriQueryParser.ID, 0); } - public IdentifierContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_identifier; } - } - - public final IdentifierContext identifier() throws RecognitionException { - IdentifierContext _localctx = new IdentifierContext(_ctx, getState()); - enterRule(_localctx, 22, RULE_identifier); - try { - enterOuterAlt(_localctx, 1); - { - setState(85); - match(ID); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - - public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) { - switch (ruleIndex) { - case 5: - return orExpression_sempred((OrExpressionContext)_localctx, predIndex); - case 6: - return andExpression_sempred((AndExpressionContext)_localctx, predIndex); - case 7: - return compExpression_sempred((CompExpressionContext)_localctx, predIndex); - } - return true; - } - private boolean orExpression_sempred(OrExpressionContext _localctx, int predIndex) { - switch (predIndex) { - case 0: - return precpred(_ctx, 1); - } - return true; - } - private boolean andExpression_sempred(AndExpressionContext _localctx, int predIndex) { - switch (predIndex) { - case 1: - return precpred(_ctx, 1); - } - return true; - } - private boolean compExpression_sempred(CompExpressionContext _localctx, int predIndex) { - switch (predIndex) { - case 2: - return precpred(_ctx, 1); - } - return true; - } - - public static final String _serializedATN = - "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3\22Z\4\2\t\2\4\3\t"+ - "\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t\13\4"+ - "\f\t\f\4\r\t\r\3\2\3\2\3\2\3\3\3\3\3\3\5\3!\n\3\3\4\3\4\3\5\3\5\3\5\3"+ - "\5\3\6\3\6\3\7\3\7\3\7\3\7\3\7\3\7\7\7\61\n\7\f\7\16\7\64\13\7\3\b\3\b"+ - "\3\b\3\b\3\b\3\b\7\b<\n\b\f\b\16\b?\13\b\3\t\3\t\3\t\3\t\3\t\3\t\3\t\7"+ - "\tH\n\t\f\t\16\tK\13\t\3\n\3\n\3\n\5\nP\n\n\3\13\3\13\3\13\3\13\3\f\3"+ - "\f\3\r\3\r\3\r\2\5\f\16\20\16\2\4\6\b\n\f\16\20\22\24\26\30\2\3\3\2\6"+ - "\13\2S\2\32\3\2\2\2\4 \3\2\2\2\6\"\3\2\2\2\b$\3\2\2\2\n(\3\2\2\2\f*\3"+ - "\2\2\2\16\65\3\2\2\2\20@\3\2\2\2\22O\3\2\2\2\24Q\3\2\2\2\26U\3\2\2\2\30"+ - "W\3\2\2\2\32\33\5\6\4\2\33\34\5\4\3\2\34\3\3\2\2\2\35\36\7\f\2\2\36!\5"+ - "\4\3\2\37!\3\2\2\2 \35\3\2\2\2 \37\3\2\2\2!\5\3\2\2\2\"#\5\b\5\2#\7\3"+ - "\2\2\2$%\7\3\2\2%&\7\r\2\2&\'\5\n\6\2\'\t\3\2\2\2()\5\f\7\2)\13\3\2\2"+ - "\2*+\b\7\1\2+,\5\16\b\2,\62\3\2\2\2-.\f\3\2\2./\7\4\2\2/\61\5\16\b\2\60"+ - "-\3\2\2\2\61\64\3\2\2\2\62\60\3\2\2\2\62\63\3\2\2\2\63\r\3\2\2\2\64\62"+ - "\3\2\2\2\65\66\b\b\1\2\66\67\5\20\t\2\67=\3\2\2\289\f\3\2\29:\7\5\2\2"+ - ":<\5\20\t\2;8\3\2\2\2\3\2\2\2>\17\3\2\2\2?=\3\2"+ - "\2\2@A\b\t\1\2AB\5\22\n\2BI\3\2\2\2CD\f\3\2\2DE\5\26\f\2EF\5\22\n\2FH"+ - "\3\2\2\2GC\3\2\2\2HK\3\2\2\2IG\3\2\2\2IJ\3\2\2\2J\21\3\2\2\2KI\3\2\2\2"+ - "LP\7\21\2\2MP\5\30\r\2NP\5\24\13\2OL\3\2\2\2OM\3\2\2\2ON\3\2\2\2P\23\3"+ - "\2\2\2QR\7\16\2\2RS\5\n\6\2ST\7\17\2\2T\25\3\2\2\2UV\t\2\2\2V\27\3\2\2"+ - "\2WX\7\20\2\2X\31\3\2\2\2\7 \62=IO"; - public static final ATN _ATN = - new ATNDeserializer().deserialize(_serializedATN.toCharArray()); - static { - _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; - for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { - _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); - } - } -} \ No newline at end of file diff --git a/tools/odataUri/src/parsers/ODataUriQuery.g4 b/tools/odataUri/src/parsers/ODataUriQuery.g4 index d3bcda41..4b8f9f49 100644 --- a/tools/odataUri/src/parsers/ODataUriQuery.g4 +++ b/tools/odataUri/src/parsers/ODataUriQuery.g4 @@ -1,31 +1,49 @@ grammar ODataUriQuery; queryOptions: queryOption queryOptionsList; -queryOptionsList: AMP queryOption queryOptionsList | ; -queryOption: filterOption | selectOption | expandOption | orderByOption | topOption | skipOption; +queryOptionsList: AMP queryOption queryOptionsList |; +queryOption: + filterOption + | selectOption + | expandOption + | orderByOption + | topOption + | skipOption; filterOption: FILTER ASSIGN expression; selectOption: SELECT ASSIGN selectFieldList; expandOption: EXPAND ASSIGN expandFieldList; orderByOption: ORDERBY ASSIGN orderSpec; topOption: TOP ASSIGN NUMBER; skipOption: SKIPKW ASSIGN NUMBER; -selectFieldList: selectField | selectField COMMA selectFieldList; -expandFieldList: expandField | expandField COMMA expandFieldList; // distinguish expand and select fields to make semantic validation easier (expand only supports navprops) +selectFieldList: + selectField + | selectField COMMA selectFieldList; +expandFieldList: + expandField + | expandField COMMA expandFieldList; +// distinguish expand and select fields to make semantic validation easier (expand only supports navprops) selectField: identifier; expandField: identifier; orderSpec: orderField | orderField DESC; orderField: identifier; expression: orExpression; -orExpression: andExpression | orExpression OR andExpression; -andExpression: compExpression | andExpression AND compExpression; -compExpression: basicExpression | compExpression compOperator basicExpression; -basicExpression: NUMBER | STRING | BOOLEAN | identifier | parenExpression; +orExpression: andExpression | orExpression OR andExpression; +andExpression: + compExpression + | andExpression AND compExpression; +compExpression: + basicExpression + | compExpression compOperator basicExpression; +basicExpression: + NUMBER + | STRING + | BOOLEAN + | identifier + | parenExpression; parenExpression: LPAREN expression RPAREN; compOperator: EQ | NEQ | GTE | GT | LTE | LT; identifier: ID; - - FILTER: '$filter'; SELECT: '$select'; EXPAND: '$expand'; @@ -36,11 +54,11 @@ DESC: 'desc'; OR: 'or'; AND: 'and'; EQ: 'eq'; -NEQ: 'neq'; +NEQ: 'ne'; GT: 'gt'; -GTE: 'gte'; +GTE: 'ge'; LT: 'lt'; -LTE: 'lte'; +LTE: 'le'; AMP: '&'; ASSIGN: '='; LPAREN: '('; diff --git a/tools/odataUri/src/parsers/ODataUriQuery.interp b/tools/odataUri/src/parsers/ODataUriQuery.interp index 14a27494..0c58c0fb 100644 --- a/tools/odataUri/src/parsers/ODataUriQuery.interp +++ b/tools/odataUri/src/parsers/ODataUriQuery.interp @@ -10,11 +10,11 @@ null 'or' 'and' 'eq' -'neq' +'ne' 'gt' -'gte' +'ge' 'lt' -'lte' +'le' '&' '=' '(' diff --git a/tools/odataUri/src/parsers/ODataUriQuery.tokens b/tools/odataUri/src/parsers/ODataUriQuery.tokens index c8e09354..c987aaac 100644 --- a/tools/odataUri/src/parsers/ODataUriQuery.tokens +++ b/tools/odataUri/src/parsers/ODataUriQuery.tokens @@ -33,11 +33,11 @@ ID=25 'or'=8 'and'=9 'eq'=10 -'neq'=11 +'ne'=11 'gt'=12 -'gte'=13 +'ge'=13 'lt'=14 -'lte'=15 +'le'=15 '&'=16 '='=17 '('=18 diff --git a/tools/odataUri/src/parsers/ODataUriQueryLexer.interp b/tools/odataUri/src/parsers/ODataUriQueryLexer.interp index fe5a21fb..38db52be 100644 --- a/tools/odataUri/src/parsers/ODataUriQueryLexer.interp +++ b/tools/odataUri/src/parsers/ODataUriQueryLexer.interp @@ -10,11 +10,11 @@ null 'or' 'and' 'eq' -'neq' +'ne' 'gt' -'gte' +'ge' 'lt' -'lte' +'le' '&' '=' '(' @@ -89,4 +89,4 @@ mode names: DEFAULT_MODE atn: -[3, 51485, 51898, 1421, 44986, 20307, 1543, 60043, 49729, 2, 27, 176, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 9, 3, 9, 3, 9, 3, 10, 3, 10, 3, 10, 3, 10, 3, 11, 3, 11, 3, 11, 3, 12, 3, 12, 3, 12, 3, 12, 3, 13, 3, 13, 3, 13, 3, 14, 3, 14, 3, 14, 3, 14, 3, 15, 3, 15, 3, 15, 3, 16, 3, 16, 3, 16, 3, 16, 3, 17, 3, 17, 3, 18, 3, 18, 3, 19, 3, 19, 3, 20, 3, 20, 3, 21, 3, 21, 3, 22, 6, 22, 142, 10, 22, 13, 22, 14, 22, 143, 3, 23, 3, 23, 3, 23, 3, 23, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 5, 24, 159, 10, 24, 3, 25, 3, 25, 7, 25, 163, 10, 25, 12, 25, 14, 25, 166, 11, 25, 3, 25, 3, 25, 3, 26, 3, 26, 7, 26, 172, 10, 26, 12, 26, 14, 26, 175, 11, 26, 3, 164, 2, 2, 27, 3, 2, 3, 5, 2, 4, 7, 2, 5, 9, 2, 6, 11, 2, 7, 13, 2, 8, 15, 2, 9, 17, 2, 10, 19, 2, 11, 21, 2, 12, 23, 2, 13, 25, 2, 14, 27, 2, 15, 29, 2, 16, 31, 2, 17, 33, 2, 18, 35, 2, 19, 37, 2, 20, 39, 2, 21, 41, 2, 22, 43, 2, 23, 45, 2, 24, 47, 2, 25, 49, 2, 26, 51, 2, 27, 3, 2, 6, 3, 2, 50, 59, 3, 2, 34, 34, 4, 2, 67, 92, 99, 124, 6, 2, 50, 59, 67, 92, 97, 97, 99, 124, 2, 179, 2, 3, 3, 2, 2, 2, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 9, 3, 2, 2, 2, 2, 11, 3, 2, 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 2, 17, 3, 2, 2, 2, 2, 19, 3, 2, 2, 2, 2, 21, 3, 2, 2, 2, 2, 23, 3, 2, 2, 2, 2, 25, 3, 2, 2, 2, 2, 27, 3, 2, 2, 2, 2, 29, 3, 2, 2, 2, 2, 31, 3, 2, 2, 2, 2, 33, 3, 2, 2, 2, 2, 35, 3, 2, 2, 2, 2, 37, 3, 2, 2, 2, 2, 39, 3, 2, 2, 2, 2, 41, 3, 2, 2, 2, 2, 43, 3, 2, 2, 2, 2, 45, 3, 2, 2, 2, 2, 47, 3, 2, 2, 2, 2, 49, 3, 2, 2, 2, 2, 51, 3, 2, 2, 2, 3, 53, 3, 2, 2, 2, 5, 61, 3, 2, 2, 2, 7, 69, 3, 2, 2, 2, 9, 77, 3, 2, 2, 2, 11, 86, 3, 2, 2, 2, 13, 91, 3, 2, 2, 2, 15, 97, 3, 2, 2, 2, 17, 102, 3, 2, 2, 2, 19, 105, 3, 2, 2, 2, 21, 109, 3, 2, 2, 2, 23, 112, 3, 2, 2, 2, 25, 116, 3, 2, 2, 2, 27, 119, 3, 2, 2, 2, 29, 123, 3, 2, 2, 2, 31, 126, 3, 2, 2, 2, 33, 130, 3, 2, 2, 2, 35, 132, 3, 2, 2, 2, 37, 134, 3, 2, 2, 2, 39, 136, 3, 2, 2, 2, 41, 138, 3, 2, 2, 2, 43, 141, 3, 2, 2, 2, 45, 145, 3, 2, 2, 2, 47, 158, 3, 2, 2, 2, 49, 160, 3, 2, 2, 2, 51, 169, 3, 2, 2, 2, 53, 54, 7, 38, 2, 2, 54, 55, 7, 104, 2, 2, 55, 56, 7, 107, 2, 2, 56, 57, 7, 110, 2, 2, 57, 58, 7, 118, 2, 2, 58, 59, 7, 103, 2, 2, 59, 60, 7, 116, 2, 2, 60, 4, 3, 2, 2, 2, 61, 62, 7, 38, 2, 2, 62, 63, 7, 117, 2, 2, 63, 64, 7, 103, 2, 2, 64, 65, 7, 110, 2, 2, 65, 66, 7, 103, 2, 2, 66, 67, 7, 101, 2, 2, 67, 68, 7, 118, 2, 2, 68, 6, 3, 2, 2, 2, 69, 70, 7, 38, 2, 2, 70, 71, 7, 103, 2, 2, 71, 72, 7, 122, 2, 2, 72, 73, 7, 114, 2, 2, 73, 74, 7, 99, 2, 2, 74, 75, 7, 112, 2, 2, 75, 76, 7, 102, 2, 2, 76, 8, 3, 2, 2, 2, 77, 78, 7, 38, 2, 2, 78, 79, 7, 113, 2, 2, 79, 80, 7, 116, 2, 2, 80, 81, 7, 102, 2, 2, 81, 82, 7, 103, 2, 2, 82, 83, 7, 116, 2, 2, 83, 84, 7, 100, 2, 2, 84, 85, 7, 123, 2, 2, 85, 10, 3, 2, 2, 2, 86, 87, 7, 38, 2, 2, 87, 88, 7, 118, 2, 2, 88, 89, 7, 113, 2, 2, 89, 90, 7, 114, 2, 2, 90, 12, 3, 2, 2, 2, 91, 92, 7, 38, 2, 2, 92, 93, 7, 117, 2, 2, 93, 94, 7, 109, 2, 2, 94, 95, 7, 107, 2, 2, 95, 96, 7, 114, 2, 2, 96, 14, 3, 2, 2, 2, 97, 98, 7, 102, 2, 2, 98, 99, 7, 103, 2, 2, 99, 100, 7, 117, 2, 2, 100, 101, 7, 101, 2, 2, 101, 16, 3, 2, 2, 2, 102, 103, 7, 113, 2, 2, 103, 104, 7, 116, 2, 2, 104, 18, 3, 2, 2, 2, 105, 106, 7, 99, 2, 2, 106, 107, 7, 112, 2, 2, 107, 108, 7, 102, 2, 2, 108, 20, 3, 2, 2, 2, 109, 110, 7, 103, 2, 2, 110, 111, 7, 115, 2, 2, 111, 22, 3, 2, 2, 2, 112, 113, 7, 112, 2, 2, 113, 114, 7, 103, 2, 2, 114, 115, 7, 115, 2, 2, 115, 24, 3, 2, 2, 2, 116, 117, 7, 105, 2, 2, 117, 118, 7, 118, 2, 2, 118, 26, 3, 2, 2, 2, 119, 120, 7, 105, 2, 2, 120, 121, 7, 118, 2, 2, 121, 122, 7, 103, 2, 2, 122, 28, 3, 2, 2, 2, 123, 124, 7, 110, 2, 2, 124, 125, 7, 118, 2, 2, 125, 30, 3, 2, 2, 2, 126, 127, 7, 110, 2, 2, 127, 128, 7, 118, 2, 2, 128, 129, 7, 103, 2, 2, 129, 32, 3, 2, 2, 2, 130, 131, 7, 40, 2, 2, 131, 34, 3, 2, 2, 2, 132, 133, 7, 63, 2, 2, 133, 36, 3, 2, 2, 2, 134, 135, 7, 42, 2, 2, 135, 38, 3, 2, 2, 2, 136, 137, 7, 43, 2, 2, 137, 40, 3, 2, 2, 2, 138, 139, 7, 46, 2, 2, 139, 42, 3, 2, 2, 2, 140, 142, 9, 2, 2, 2, 141, 140, 3, 2, 2, 2, 142, 143, 3, 2, 2, 2, 143, 141, 3, 2, 2, 2, 143, 144, 3, 2, 2, 2, 144, 44, 3, 2, 2, 2, 145, 146, 9, 3, 2, 2, 146, 147, 3, 2, 2, 2, 147, 148, 8, 23, 2, 2, 148, 46, 3, 2, 2, 2, 149, 150, 7, 118, 2, 2, 150, 151, 7, 116, 2, 2, 151, 152, 7, 119, 2, 2, 152, 159, 7, 103, 2, 2, 153, 154, 7, 104, 2, 2, 154, 155, 7, 99, 2, 2, 155, 156, 7, 110, 2, 2, 156, 157, 7, 117, 2, 2, 157, 159, 7, 103, 2, 2, 158, 149, 3, 2, 2, 2, 158, 153, 3, 2, 2, 2, 159, 48, 3, 2, 2, 2, 160, 164, 7, 41, 2, 2, 161, 163, 11, 2, 2, 2, 162, 161, 3, 2, 2, 2, 163, 166, 3, 2, 2, 2, 164, 165, 3, 2, 2, 2, 164, 162, 3, 2, 2, 2, 165, 167, 3, 2, 2, 2, 166, 164, 3, 2, 2, 2, 167, 168, 7, 41, 2, 2, 168, 50, 3, 2, 2, 2, 169, 173, 9, 4, 2, 2, 170, 172, 9, 5, 2, 2, 171, 170, 3, 2, 2, 2, 172, 175, 3, 2, 2, 2, 173, 171, 3, 2, 2, 2, 173, 174, 3, 2, 2, 2, 174, 52, 3, 2, 2, 2, 175, 173, 3, 2, 2, 2, 7, 2, 143, 158, 164, 173, 3, 8, 2, 2] \ No newline at end of file +[3, 51485, 51898, 1421, 44986, 20307, 1543, 60043, 49729, 2, 27, 173, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 9, 3, 9, 3, 9, 3, 10, 3, 10, 3, 10, 3, 10, 3, 11, 3, 11, 3, 11, 3, 12, 3, 12, 3, 12, 3, 13, 3, 13, 3, 13, 3, 14, 3, 14, 3, 14, 3, 15, 3, 15, 3, 15, 3, 16, 3, 16, 3, 16, 3, 17, 3, 17, 3, 18, 3, 18, 3, 19, 3, 19, 3, 20, 3, 20, 3, 21, 3, 21, 3, 22, 6, 22, 139, 10, 22, 13, 22, 14, 22, 140, 3, 23, 3, 23, 3, 23, 3, 23, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 5, 24, 156, 10, 24, 3, 25, 3, 25, 7, 25, 160, 10, 25, 12, 25, 14, 25, 163, 11, 25, 3, 25, 3, 25, 3, 26, 3, 26, 7, 26, 169, 10, 26, 12, 26, 14, 26, 172, 11, 26, 3, 161, 2, 2, 27, 3, 2, 3, 5, 2, 4, 7, 2, 5, 9, 2, 6, 11, 2, 7, 13, 2, 8, 15, 2, 9, 17, 2, 10, 19, 2, 11, 21, 2, 12, 23, 2, 13, 25, 2, 14, 27, 2, 15, 29, 2, 16, 31, 2, 17, 33, 2, 18, 35, 2, 19, 37, 2, 20, 39, 2, 21, 41, 2, 22, 43, 2, 23, 45, 2, 24, 47, 2, 25, 49, 2, 26, 51, 2, 27, 3, 2, 6, 3, 2, 50, 59, 3, 2, 34, 34, 4, 2, 67, 92, 99, 124, 6, 2, 50, 59, 67, 92, 97, 97, 99, 124, 2, 176, 2, 3, 3, 2, 2, 2, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 9, 3, 2, 2, 2, 2, 11, 3, 2, 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 2, 17, 3, 2, 2, 2, 2, 19, 3, 2, 2, 2, 2, 21, 3, 2, 2, 2, 2, 23, 3, 2, 2, 2, 2, 25, 3, 2, 2, 2, 2, 27, 3, 2, 2, 2, 2, 29, 3, 2, 2, 2, 2, 31, 3, 2, 2, 2, 2, 33, 3, 2, 2, 2, 2, 35, 3, 2, 2, 2, 2, 37, 3, 2, 2, 2, 2, 39, 3, 2, 2, 2, 2, 41, 3, 2, 2, 2, 2, 43, 3, 2, 2, 2, 2, 45, 3, 2, 2, 2, 2, 47, 3, 2, 2, 2, 2, 49, 3, 2, 2, 2, 2, 51, 3, 2, 2, 2, 3, 53, 3, 2, 2, 2, 5, 61, 3, 2, 2, 2, 7, 69, 3, 2, 2, 2, 9, 77, 3, 2, 2, 2, 11, 86, 3, 2, 2, 2, 13, 91, 3, 2, 2, 2, 15, 97, 3, 2, 2, 2, 17, 102, 3, 2, 2, 2, 19, 105, 3, 2, 2, 2, 21, 109, 3, 2, 2, 2, 23, 112, 3, 2, 2, 2, 25, 115, 3, 2, 2, 2, 27, 118, 3, 2, 2, 2, 29, 121, 3, 2, 2, 2, 31, 124, 3, 2, 2, 2, 33, 127, 3, 2, 2, 2, 35, 129, 3, 2, 2, 2, 37, 131, 3, 2, 2, 2, 39, 133, 3, 2, 2, 2, 41, 135, 3, 2, 2, 2, 43, 138, 3, 2, 2, 2, 45, 142, 3, 2, 2, 2, 47, 155, 3, 2, 2, 2, 49, 157, 3, 2, 2, 2, 51, 166, 3, 2, 2, 2, 53, 54, 7, 38, 2, 2, 54, 55, 7, 104, 2, 2, 55, 56, 7, 107, 2, 2, 56, 57, 7, 110, 2, 2, 57, 58, 7, 118, 2, 2, 58, 59, 7, 103, 2, 2, 59, 60, 7, 116, 2, 2, 60, 4, 3, 2, 2, 2, 61, 62, 7, 38, 2, 2, 62, 63, 7, 117, 2, 2, 63, 64, 7, 103, 2, 2, 64, 65, 7, 110, 2, 2, 65, 66, 7, 103, 2, 2, 66, 67, 7, 101, 2, 2, 67, 68, 7, 118, 2, 2, 68, 6, 3, 2, 2, 2, 69, 70, 7, 38, 2, 2, 70, 71, 7, 103, 2, 2, 71, 72, 7, 122, 2, 2, 72, 73, 7, 114, 2, 2, 73, 74, 7, 99, 2, 2, 74, 75, 7, 112, 2, 2, 75, 76, 7, 102, 2, 2, 76, 8, 3, 2, 2, 2, 77, 78, 7, 38, 2, 2, 78, 79, 7, 113, 2, 2, 79, 80, 7, 116, 2, 2, 80, 81, 7, 102, 2, 2, 81, 82, 7, 103, 2, 2, 82, 83, 7, 116, 2, 2, 83, 84, 7, 100, 2, 2, 84, 85, 7, 123, 2, 2, 85, 10, 3, 2, 2, 2, 86, 87, 7, 38, 2, 2, 87, 88, 7, 118, 2, 2, 88, 89, 7, 113, 2, 2, 89, 90, 7, 114, 2, 2, 90, 12, 3, 2, 2, 2, 91, 92, 7, 38, 2, 2, 92, 93, 7, 117, 2, 2, 93, 94, 7, 109, 2, 2, 94, 95, 7, 107, 2, 2, 95, 96, 7, 114, 2, 2, 96, 14, 3, 2, 2, 2, 97, 98, 7, 102, 2, 2, 98, 99, 7, 103, 2, 2, 99, 100, 7, 117, 2, 2, 100, 101, 7, 101, 2, 2, 101, 16, 3, 2, 2, 2, 102, 103, 7, 113, 2, 2, 103, 104, 7, 116, 2, 2, 104, 18, 3, 2, 2, 2, 105, 106, 7, 99, 2, 2, 106, 107, 7, 112, 2, 2, 107, 108, 7, 102, 2, 2, 108, 20, 3, 2, 2, 2, 109, 110, 7, 103, 2, 2, 110, 111, 7, 115, 2, 2, 111, 22, 3, 2, 2, 2, 112, 113, 7, 112, 2, 2, 113, 114, 7, 103, 2, 2, 114, 24, 3, 2, 2, 2, 115, 116, 7, 105, 2, 2, 116, 117, 7, 118, 2, 2, 117, 26, 3, 2, 2, 2, 118, 119, 7, 105, 2, 2, 119, 120, 7, 103, 2, 2, 120, 28, 3, 2, 2, 2, 121, 122, 7, 110, 2, 2, 122, 123, 7, 118, 2, 2, 123, 30, 3, 2, 2, 2, 124, 125, 7, 110, 2, 2, 125, 126, 7, 103, 2, 2, 126, 32, 3, 2, 2, 2, 127, 128, 7, 40, 2, 2, 128, 34, 3, 2, 2, 2, 129, 130, 7, 63, 2, 2, 130, 36, 3, 2, 2, 2, 131, 132, 7, 42, 2, 2, 132, 38, 3, 2, 2, 2, 133, 134, 7, 43, 2, 2, 134, 40, 3, 2, 2, 2, 135, 136, 7, 46, 2, 2, 136, 42, 3, 2, 2, 2, 137, 139, 9, 2, 2, 2, 138, 137, 3, 2, 2, 2, 139, 140, 3, 2, 2, 2, 140, 138, 3, 2, 2, 2, 140, 141, 3, 2, 2, 2, 141, 44, 3, 2, 2, 2, 142, 143, 9, 3, 2, 2, 143, 144, 3, 2, 2, 2, 144, 145, 8, 23, 2, 2, 145, 46, 3, 2, 2, 2, 146, 147, 7, 118, 2, 2, 147, 148, 7, 116, 2, 2, 148, 149, 7, 119, 2, 2, 149, 156, 7, 103, 2, 2, 150, 151, 7, 104, 2, 2, 151, 152, 7, 99, 2, 2, 152, 153, 7, 110, 2, 2, 153, 154, 7, 117, 2, 2, 154, 156, 7, 103, 2, 2, 155, 146, 3, 2, 2, 2, 155, 150, 3, 2, 2, 2, 156, 48, 3, 2, 2, 2, 157, 161, 7, 41, 2, 2, 158, 160, 11, 2, 2, 2, 159, 158, 3, 2, 2, 2, 160, 163, 3, 2, 2, 2, 161, 162, 3, 2, 2, 2, 161, 159, 3, 2, 2, 2, 162, 164, 3, 2, 2, 2, 163, 161, 3, 2, 2, 2, 164, 165, 7, 41, 2, 2, 165, 50, 3, 2, 2, 2, 166, 170, 9, 4, 2, 2, 167, 169, 9, 5, 2, 2, 168, 167, 3, 2, 2, 2, 169, 172, 3, 2, 2, 2, 170, 168, 3, 2, 2, 2, 170, 171, 3, 2, 2, 2, 171, 52, 3, 2, 2, 2, 172, 170, 3, 2, 2, 2, 7, 2, 140, 155, 161, 170, 3, 8, 2, 2] \ No newline at end of file diff --git a/tools/odataUri/src/parsers/ODataUriQueryLexer.js b/tools/odataUri/src/parsers/ODataUriQueryLexer.js deleted file mode 100644 index 1b265503..00000000 --- a/tools/odataUri/src/parsers/ODataUriQueryLexer.js +++ /dev/null @@ -1,180 +0,0 @@ -"use strict"; -// Generated from src/js/odata-uri/parsers/ODataUriQuery.g4 by ANTLR 4.9.0-SNAPSHOT -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ODataUriQueryLexer = void 0; -const ATNDeserializer_1 = require("antlr4ts/atn/ATNDeserializer"); -const Lexer_1 = require("antlr4ts/Lexer"); -const LexerATNSimulator_1 = require("antlr4ts/atn/LexerATNSimulator"); -const VocabularyImpl_1 = require("antlr4ts/VocabularyImpl"); -const Utils = __importStar(require("antlr4ts/misc/Utils")); -class ODataUriQueryLexer extends Lexer_1.Lexer { - // tslint:enable:no-trailing-whitespace - constructor(input) { - super(input); - this._interp = new LexerATNSimulator_1.LexerATNSimulator(ODataUriQueryLexer._ATN, this); - } - // @Override - // @NotNull - get vocabulary() { - return ODataUriQueryLexer.VOCABULARY; - } - // @Override - get grammarFileName() { return "ODataUriQuery.g4"; } - // @Override - get ruleNames() { return ODataUriQueryLexer.ruleNames; } - // @Override - get serializedATN() { return ODataUriQueryLexer._serializedATN; } - // @Override - get channelNames() { return ODataUriQueryLexer.channelNames; } - // @Override - get modeNames() { return ODataUriQueryLexer.modeNames; } - static get _ATN() { - if (!ODataUriQueryLexer.__ATN) { - ODataUriQueryLexer.__ATN = new ATNDeserializer_1.ATNDeserializer().deserialize(Utils.toCharArray(ODataUriQueryLexer._serializedATN)); - } - return ODataUriQueryLexer.__ATN; - } -} -exports.ODataUriQueryLexer = ODataUriQueryLexer; -ODataUriQueryLexer.FILTER = 1; -ODataUriQueryLexer.SELECT = 2; -ODataUriQueryLexer.EXPAND = 3; -ODataUriQueryLexer.ORDERBY = 4; -ODataUriQueryLexer.TOP = 5; -ODataUriQueryLexer.SKIPKW = 6; -ODataUriQueryLexer.DESC = 7; -ODataUriQueryLexer.OR = 8; -ODataUriQueryLexer.AND = 9; -ODataUriQueryLexer.EQ = 10; -ODataUriQueryLexer.NEQ = 11; -ODataUriQueryLexer.GT = 12; -ODataUriQueryLexer.GTE = 13; -ODataUriQueryLexer.LT = 14; -ODataUriQueryLexer.LTE = 15; -ODataUriQueryLexer.AMP = 16; -ODataUriQueryLexer.ASSIGN = 17; -ODataUriQueryLexer.LPAREN = 18; -ODataUriQueryLexer.RPAREN = 19; -ODataUriQueryLexer.COMMA = 20; -ODataUriQueryLexer.NUMBER = 21; -ODataUriQueryLexer.WS = 22; -ODataUriQueryLexer.BOOLEAN = 23; -ODataUriQueryLexer.STRING = 24; -ODataUriQueryLexer.ID = 25; -// tslint:disable:no-trailing-whitespace -ODataUriQueryLexer.channelNames = [ - "DEFAULT_TOKEN_CHANNEL", "HIDDEN", -]; -// tslint:disable:no-trailing-whitespace -ODataUriQueryLexer.modeNames = [ - "DEFAULT_MODE", -]; -ODataUriQueryLexer.ruleNames = [ - "FILTER", "SELECT", "EXPAND", "ORDERBY", "TOP", "SKIPKW", "DESC", "OR", - "AND", "EQ", "NEQ", "GT", "GTE", "LT", "LTE", "AMP", "ASSIGN", "LPAREN", - "RPAREN", "COMMA", "NUMBER", "WS", "BOOLEAN", "STRING", "ID", -]; -ODataUriQueryLexer._LITERAL_NAMES = [ - undefined, "'$filter'", "'$select'", "'$expand'", "'$orderby'", "'$top'", - "'$skip'", "'desc'", "'or'", "'and'", "'eq'", "'neq'", "'gt'", "'gte'", - "'lt'", "'lte'", "'&'", "'='", "'('", "')'", "','", -]; -ODataUriQueryLexer._SYMBOLIC_NAMES = [ - undefined, "FILTER", "SELECT", "EXPAND", "ORDERBY", "TOP", "SKIPKW", "DESC", - "OR", "AND", "EQ", "NEQ", "GT", "GTE", "LT", "LTE", "AMP", "ASSIGN", "LPAREN", - "RPAREN", "COMMA", "NUMBER", "WS", "BOOLEAN", "STRING", "ID", -]; -ODataUriQueryLexer.VOCABULARY = new VocabularyImpl_1.VocabularyImpl(ODataUriQueryLexer._LITERAL_NAMES, ODataUriQueryLexer._SYMBOLIC_NAMES, []); -ODataUriQueryLexer._serializedATN = "\x03\uC91D\uCABA\u058D\uAFBA\u4F53\u0607\uEA8B\uC241\x02\x1B\xB0\b\x01" + - "\x04\x02\t\x02\x04\x03\t\x03\x04\x04\t\x04\x04\x05\t\x05\x04\x06\t\x06" + - "\x04\x07\t\x07\x04\b\t\b\x04\t\t\t\x04\n\t\n\x04\v\t\v\x04\f\t\f\x04\r" + - "\t\r\x04\x0E\t\x0E\x04\x0F\t\x0F\x04\x10\t\x10\x04\x11\t\x11\x04\x12\t" + - "\x12\x04\x13\t\x13\x04\x14\t\x14\x04\x15\t\x15\x04\x16\t\x16\x04\x17\t" + - "\x17\x04\x18\t\x18\x04\x19\t\x19\x04\x1A\t\x1A\x03\x02\x03\x02\x03\x02" + - "\x03\x02\x03\x02\x03\x02\x03\x02\x03\x02\x03\x03\x03\x03\x03\x03\x03\x03" + - "\x03\x03\x03\x03\x03\x03\x03\x03\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04" + - "\x03\x04\x03\x04\x03\x04\x03\x05\x03\x05\x03\x05\x03\x05\x03\x05\x03\x05" + - "\x03\x05\x03\x05\x03\x05\x03\x06\x03\x06\x03\x06\x03\x06\x03\x06\x03\x07" + - "\x03\x07\x03\x07\x03\x07\x03\x07\x03\x07\x03\b\x03\b\x03\b\x03\b\x03\b" + - "\x03\t\x03\t\x03\t\x03\n\x03\n\x03\n\x03\n\x03\v\x03\v\x03\v\x03\f\x03" + - "\f\x03\f\x03\f\x03\r\x03\r\x03\r\x03\x0E\x03\x0E\x03\x0E\x03\x0E\x03\x0F" + - "\x03\x0F\x03\x0F\x03\x10\x03\x10\x03\x10\x03\x10\x03\x11\x03\x11\x03\x12" + - "\x03\x12\x03\x13\x03\x13\x03\x14\x03\x14\x03\x15\x03\x15\x03\x16\x06\x16" + - "\x8E\n\x16\r\x16\x0E\x16\x8F\x03\x17\x03\x17\x03\x17\x03\x17\x03\x18\x03" + - "\x18\x03\x18\x03\x18\x03\x18\x03\x18\x03\x18\x03\x18\x03\x18\x05\x18\x9F" + - "\n\x18\x03\x19\x03\x19\x07\x19\xA3\n\x19\f\x19\x0E\x19\xA6\v\x19\x03\x19" + - "\x03\x19\x03\x1A\x03\x1A\x07\x1A\xAC\n\x1A\f\x1A\x0E\x1A\xAF\v\x1A\x03" + - "\xA4\x02\x02\x1B\x03\x02\x03\x05\x02\x04\x07\x02\x05\t\x02\x06\v\x02\x07" + - "\r\x02\b\x0F\x02\t\x11\x02\n\x13\x02\v\x15\x02\f\x17\x02\r\x19\x02\x0E" + - "\x1B\x02\x0F\x1D\x02\x10\x1F\x02\x11!\x02\x12#\x02\x13%\x02\x14\'\x02" + - "\x15)\x02\x16+\x02\x17-\x02\x18/\x02\x191\x02\x1A3\x02\x1B\x03\x02\x06" + - "\x03\x022;\x03\x02\"\"\x04\x02C\\c|\x06\x022;C\\aac|\x02\xB3\x02\x03\x03" + - "\x02\x02\x02\x02\x05\x03\x02\x02\x02\x02\x07\x03\x02\x02\x02\x02\t\x03" + - "\x02\x02\x02\x02\v\x03\x02\x02\x02\x02\r\x03\x02\x02\x02\x02\x0F\x03\x02" + - "\x02\x02\x02\x11\x03\x02\x02\x02\x02\x13\x03\x02\x02\x02\x02\x15\x03\x02" + - "\x02\x02\x02\x17\x03\x02\x02\x02\x02\x19\x03\x02\x02\x02\x02\x1B\x03\x02" + - "\x02\x02\x02\x1D\x03\x02\x02\x02\x02\x1F\x03\x02\x02\x02\x02!\x03\x02" + - "\x02\x02\x02#\x03\x02\x02\x02\x02%\x03\x02\x02\x02\x02\'\x03\x02\x02\x02" + - "\x02)\x03\x02\x02\x02\x02+\x03\x02\x02\x02\x02-\x03\x02\x02\x02\x02/\x03" + - "\x02\x02\x02\x021\x03\x02\x02\x02\x023\x03\x02\x02\x02\x035\x03\x02\x02" + - "\x02\x05=\x03\x02\x02\x02\x07E\x03\x02\x02\x02\tM\x03\x02\x02\x02\vV\x03" + - "\x02\x02\x02\r[\x03\x02\x02\x02\x0Fa\x03\x02\x02\x02\x11f\x03\x02\x02" + - "\x02\x13i\x03\x02\x02\x02\x15m\x03\x02\x02\x02\x17p\x03\x02\x02\x02\x19" + - "t\x03\x02\x02\x02\x1Bw\x03\x02\x02\x02\x1D{\x03\x02\x02\x02\x1F~\x03\x02" + - "\x02\x02!\x82\x03\x02\x02\x02#\x84\x03\x02\x02\x02%\x86\x03\x02\x02\x02" + - "\'\x88\x03\x02\x02\x02)\x8A\x03\x02\x02\x02+\x8D\x03\x02\x02\x02-\x91" + - "\x03\x02\x02\x02/\x9E\x03\x02\x02\x021\xA0\x03\x02\x02\x023\xA9\x03\x02" + - "\x02\x0256\x07&\x02\x0267\x07h\x02\x0278\x07k\x02\x0289\x07n\x02\x029" + - ":\x07v\x02\x02:;\x07g\x02\x02;<\x07t\x02\x02<\x04\x03\x02\x02\x02=>\x07" + - "&\x02\x02>?\x07u\x02\x02?@\x07g\x02\x02@A\x07n\x02\x02AB\x07g\x02\x02" + - "BC\x07e\x02\x02CD\x07v\x02\x02D\x06\x03\x02\x02\x02EF\x07&\x02\x02FG\x07" + - "g\x02\x02GH\x07z\x02\x02HI\x07r\x02\x02IJ\x07c\x02\x02JK\x07p\x02\x02" + - "KL\x07f\x02\x02L\b\x03\x02\x02\x02MN\x07&\x02\x02NO\x07q\x02\x02OP\x07" + - "t\x02\x02PQ\x07f\x02\x02QR\x07g\x02\x02RS\x07t\x02\x02ST\x07d\x02\x02" + - "TU\x07{\x02\x02U\n\x03\x02\x02\x02VW\x07&\x02\x02WX\x07v\x02\x02XY\x07" + - "q\x02\x02YZ\x07r\x02\x02Z\f\x03\x02\x02\x02[\\\x07&\x02\x02\\]\x07u\x02" + - "\x02]^\x07m\x02\x02^_\x07k\x02\x02_`\x07r\x02\x02`\x0E\x03\x02\x02\x02" + - "ab\x07f\x02\x02bc\x07g\x02\x02cd\x07u\x02\x02de\x07e\x02\x02e\x10\x03" + - "\x02\x02\x02fg\x07q\x02\x02gh\x07t\x02\x02h\x12\x03\x02\x02\x02ij\x07" + - "c\x02\x02jk\x07p\x02\x02kl\x07f\x02\x02l\x14\x03\x02\x02\x02mn\x07g\x02" + - "\x02no\x07s\x02\x02o\x16\x03\x02\x02\x02pq\x07p\x02\x02qr\x07g\x02\x02" + - "rs\x07s\x02\x02s\x18\x03\x02\x02\x02tu\x07i\x02\x02uv\x07v\x02\x02v\x1A" + - "\x03\x02\x02\x02wx\x07i\x02\x02xy\x07v\x02\x02yz\x07g\x02\x02z\x1C\x03" + - "\x02\x02\x02{|\x07n\x02\x02|}\x07v\x02\x02}\x1E\x03\x02\x02\x02~\x7F\x07" + - "n\x02\x02\x7F\x80\x07v\x02\x02\x80\x81\x07g\x02\x02\x81 \x03\x02\x02\x02" + - "\x82\x83\x07(\x02\x02\x83\"\x03\x02\x02\x02\x84\x85\x07?\x02\x02\x85$" + - "\x03\x02\x02\x02\x86\x87\x07*\x02\x02\x87&\x03\x02\x02\x02\x88\x89\x07" + - "+\x02\x02\x89(\x03\x02\x02\x02\x8A\x8B\x07.\x02\x02\x8B*\x03\x02\x02\x02" + - "\x8C\x8E\t\x02\x02\x02\x8D\x8C\x03\x02\x02\x02\x8E\x8F\x03\x02\x02\x02" + - "\x8F\x8D\x03\x02\x02\x02\x8F\x90\x03\x02\x02\x02\x90,\x03\x02\x02\x02" + - "\x91\x92\t\x03\x02\x02\x92\x93\x03\x02\x02\x02\x93\x94\b\x17\x02\x02\x94" + - ".\x03\x02\x02\x02\x95\x96\x07v\x02\x02\x96\x97\x07t\x02\x02\x97\x98\x07" + - "w\x02\x02\x98\x9F\x07g\x02\x02\x99\x9A\x07h\x02\x02\x9A\x9B\x07c\x02\x02" + - "\x9B\x9C\x07n\x02\x02\x9C\x9D\x07u\x02\x02\x9D\x9F\x07g\x02\x02\x9E\x95" + - "\x03\x02\x02\x02\x9E\x99\x03\x02\x02\x02\x9F0\x03\x02\x02\x02\xA0\xA4" + - "\x07)\x02\x02\xA1\xA3\v\x02\x02\x02\xA2\xA1\x03\x02\x02\x02\xA3\xA6\x03" + - "\x02\x02\x02\xA4\xA5\x03\x02\x02\x02\xA4\xA2\x03\x02\x02\x02\xA5\xA7\x03" + - "\x02\x02\x02\xA6\xA4\x03\x02\x02\x02\xA7\xA8\x07)\x02\x02\xA82\x03\x02" + - "\x02\x02\xA9\xAD\t\x04\x02\x02\xAA\xAC\t\x05\x02\x02\xAB\xAA\x03\x02\x02" + - "\x02\xAC\xAF\x03\x02\x02\x02\xAD\xAB\x03\x02\x02\x02\xAD\xAE\x03\x02\x02" + - "\x02\xAE4\x03\x02\x02\x02\xAF\xAD\x03\x02\x02\x02\x07\x02\x8F\x9E\xA4" + - "\xAD\x03\b\x02\x02"; diff --git a/tools/odataUri/src/parsers/ODataUriQueryLexer.tokens b/tools/odataUri/src/parsers/ODataUriQueryLexer.tokens index c8e09354..c987aaac 100644 --- a/tools/odataUri/src/parsers/ODataUriQueryLexer.tokens +++ b/tools/odataUri/src/parsers/ODataUriQueryLexer.tokens @@ -33,11 +33,11 @@ ID=25 'or'=8 'and'=9 'eq'=10 -'neq'=11 +'ne'=11 'gt'=12 -'gte'=13 +'ge'=13 'lt'=14 -'lte'=15 +'le'=15 '&'=16 '='=17 '('=18 diff --git a/tools/odataUri/src/parsers/ODataUriQueryLexer.ts b/tools/odataUri/src/parsers/ODataUriQueryLexer.ts index e07293c8..46456c18 100644 --- a/tools/odataUri/src/parsers/ODataUriQueryLexer.ts +++ b/tools/odataUri/src/parsers/ODataUriQueryLexer.ts @@ -1,4 +1,4 @@ -// Generated from src/js/odata-uri/parsers/ODataUriQuery.g4 by ANTLR 4.9.0-SNAPSHOT +// Generated from src/parsers/ODataUriQuery.g4 by ANTLR 4.9.0-SNAPSHOT import { ATN } from "antlr4ts/atn/ATN"; @@ -60,8 +60,8 @@ export class ODataUriQueryLexer extends Lexer { private static readonly _LITERAL_NAMES: Array = [ undefined, "'$filter'", "'$select'", "'$expand'", "'$orderby'", "'$top'", - "'$skip'", "'desc'", "'or'", "'and'", "'eq'", "'neq'", "'gt'", "'gte'", - "'lt'", "'lte'", "'&'", "'='", "'('", "')'", "','", + "'$skip'", "'desc'", "'or'", "'and'", "'eq'", "'ne'", "'gt'", "'ge'", + "'lt'", "'le'", "'&'", "'='", "'('", "')'", "','", ]; private static readonly _SYMBOLIC_NAMES: Array = [ undefined, "FILTER", "SELECT", "EXPAND", "ORDERBY", "TOP", "SKIPKW", "DESC", @@ -99,7 +99,7 @@ export class ODataUriQueryLexer extends Lexer { public get modeNames(): string[] { return ODataUriQueryLexer.modeNames; } public static readonly _serializedATN: string = - "\x03\uC91D\uCABA\u058D\uAFBA\u4F53\u0607\uEA8B\uC241\x02\x1B\xB0\b\x01" + + "\x03\uC91D\uCABA\u058D\uAFBA\u4F53\u0607\uEA8B\uC241\x02\x1B\xAD\b\x01" + "\x04\x02\t\x02\x04\x03\t\x03\x04\x04\t\x04\x04\x05\t\x05\x04\x06\t\x06" + "\x04\x07\t\x07\x04\b\t\b\x04\t\t\t\x04\n\t\n\x04\v\t\v\x04\f\t\f\x04\r" + "\t\r\x04\x0E\t\x0E\x04\x0F\t\x0F\x04\x10\t\x10\x04\x11\t\x11\x04\x12\t" + @@ -111,68 +111,66 @@ export class ODataUriQueryLexer extends Lexer { "\x03\x05\x03\x05\x03\x05\x03\x06\x03\x06\x03\x06\x03\x06\x03\x06\x03\x07" + "\x03\x07\x03\x07\x03\x07\x03\x07\x03\x07\x03\b\x03\b\x03\b\x03\b\x03\b" + "\x03\t\x03\t\x03\t\x03\n\x03\n\x03\n\x03\n\x03\v\x03\v\x03\v\x03\f\x03" + - "\f\x03\f\x03\f\x03\r\x03\r\x03\r\x03\x0E\x03\x0E\x03\x0E\x03\x0E\x03\x0F" + - "\x03\x0F\x03\x0F\x03\x10\x03\x10\x03\x10\x03\x10\x03\x11\x03\x11\x03\x12" + - "\x03\x12\x03\x13\x03\x13\x03\x14\x03\x14\x03\x15\x03\x15\x03\x16\x06\x16" + - "\x8E\n\x16\r\x16\x0E\x16\x8F\x03\x17\x03\x17\x03\x17\x03\x17\x03\x18\x03" + - "\x18\x03\x18\x03\x18\x03\x18\x03\x18\x03\x18\x03\x18\x03\x18\x05\x18\x9F" + - "\n\x18\x03\x19\x03\x19\x07\x19\xA3\n\x19\f\x19\x0E\x19\xA6\v\x19\x03\x19" + - "\x03\x19\x03\x1A\x03\x1A\x07\x1A\xAC\n\x1A\f\x1A\x0E\x1A\xAF\v\x1A\x03" + - "\xA4\x02\x02\x1B\x03\x02\x03\x05\x02\x04\x07\x02\x05\t\x02\x06\v\x02\x07" + - "\r\x02\b\x0F\x02\t\x11\x02\n\x13\x02\v\x15\x02\f\x17\x02\r\x19\x02\x0E" + - "\x1B\x02\x0F\x1D\x02\x10\x1F\x02\x11!\x02\x12#\x02\x13%\x02\x14\'\x02" + - "\x15)\x02\x16+\x02\x17-\x02\x18/\x02\x191\x02\x1A3\x02\x1B\x03\x02\x06" + - "\x03\x022;\x03\x02\"\"\x04\x02C\\c|\x06\x022;C\\aac|\x02\xB3\x02\x03\x03" + - "\x02\x02\x02\x02\x05\x03\x02\x02\x02\x02\x07\x03\x02\x02\x02\x02\t\x03" + - "\x02\x02\x02\x02\v\x03\x02\x02\x02\x02\r\x03\x02\x02\x02\x02\x0F\x03\x02" + - "\x02\x02\x02\x11\x03\x02\x02\x02\x02\x13\x03\x02\x02\x02\x02\x15\x03\x02" + - "\x02\x02\x02\x17\x03\x02\x02\x02\x02\x19\x03\x02\x02\x02\x02\x1B\x03\x02" + - "\x02\x02\x02\x1D\x03\x02\x02\x02\x02\x1F\x03\x02\x02\x02\x02!\x03\x02" + - "\x02\x02\x02#\x03\x02\x02\x02\x02%\x03\x02\x02\x02\x02\'\x03\x02\x02\x02" + - "\x02)\x03\x02\x02\x02\x02+\x03\x02\x02\x02\x02-\x03\x02\x02\x02\x02/\x03" + - "\x02\x02\x02\x021\x03\x02\x02\x02\x023\x03\x02\x02\x02\x035\x03\x02\x02" + - "\x02\x05=\x03\x02\x02\x02\x07E\x03\x02\x02\x02\tM\x03\x02\x02\x02\vV\x03" + - "\x02\x02\x02\r[\x03\x02\x02\x02\x0Fa\x03\x02\x02\x02\x11f\x03\x02\x02" + - "\x02\x13i\x03\x02\x02\x02\x15m\x03\x02\x02\x02\x17p\x03\x02\x02\x02\x19" + - "t\x03\x02\x02\x02\x1Bw\x03\x02\x02\x02\x1D{\x03\x02\x02\x02\x1F~\x03\x02" + - "\x02\x02!\x82\x03\x02\x02\x02#\x84\x03\x02\x02\x02%\x86\x03\x02\x02\x02" + - "\'\x88\x03\x02\x02\x02)\x8A\x03\x02\x02\x02+\x8D\x03\x02\x02\x02-\x91" + - "\x03\x02\x02\x02/\x9E\x03\x02\x02\x021\xA0\x03\x02\x02\x023\xA9\x03\x02" + - "\x02\x0256\x07&\x02\x0267\x07h\x02\x0278\x07k\x02\x0289\x07n\x02\x029" + - ":\x07v\x02\x02:;\x07g\x02\x02;<\x07t\x02\x02<\x04\x03\x02\x02\x02=>\x07" + - "&\x02\x02>?\x07u\x02\x02?@\x07g\x02\x02@A\x07n\x02\x02AB\x07g\x02\x02" + - "BC\x07e\x02\x02CD\x07v\x02\x02D\x06\x03\x02\x02\x02EF\x07&\x02\x02FG\x07" + - "g\x02\x02GH\x07z\x02\x02HI\x07r\x02\x02IJ\x07c\x02\x02JK\x07p\x02\x02" + - "KL\x07f\x02\x02L\b\x03\x02\x02\x02MN\x07&\x02\x02NO\x07q\x02\x02OP\x07" + - "t\x02\x02PQ\x07f\x02\x02QR\x07g\x02\x02RS\x07t\x02\x02ST\x07d\x02\x02" + - "TU\x07{\x02\x02U\n\x03\x02\x02\x02VW\x07&\x02\x02WX\x07v\x02\x02XY\x07" + - "q\x02\x02YZ\x07r\x02\x02Z\f\x03\x02\x02\x02[\\\x07&\x02\x02\\]\x07u\x02" + - "\x02]^\x07m\x02\x02^_\x07k\x02\x02_`\x07r\x02\x02`\x0E\x03\x02\x02\x02" + - "ab\x07f\x02\x02bc\x07g\x02\x02cd\x07u\x02\x02de\x07e\x02\x02e\x10\x03" + - "\x02\x02\x02fg\x07q\x02\x02gh\x07t\x02\x02h\x12\x03\x02\x02\x02ij\x07" + - "c\x02\x02jk\x07p\x02\x02kl\x07f\x02\x02l\x14\x03\x02\x02\x02mn\x07g\x02" + - "\x02no\x07s\x02\x02o\x16\x03\x02\x02\x02pq\x07p\x02\x02qr\x07g\x02\x02" + - "rs\x07s\x02\x02s\x18\x03\x02\x02\x02tu\x07i\x02\x02uv\x07v\x02\x02v\x1A" + - "\x03\x02\x02\x02wx\x07i\x02\x02xy\x07v\x02\x02yz\x07g\x02\x02z\x1C\x03" + - "\x02\x02\x02{|\x07n\x02\x02|}\x07v\x02\x02}\x1E\x03\x02\x02\x02~\x7F\x07" + - "n\x02\x02\x7F\x80\x07v\x02\x02\x80\x81\x07g\x02\x02\x81 \x03\x02\x02\x02" + - "\x82\x83\x07(\x02\x02\x83\"\x03\x02\x02\x02\x84\x85\x07?\x02\x02\x85$" + - "\x03\x02\x02\x02\x86\x87\x07*\x02\x02\x87&\x03\x02\x02\x02\x88\x89\x07" + - "+\x02\x02\x89(\x03\x02\x02\x02\x8A\x8B\x07.\x02\x02\x8B*\x03\x02\x02\x02" + - "\x8C\x8E\t\x02\x02\x02\x8D\x8C\x03\x02\x02\x02\x8E\x8F\x03\x02\x02\x02" + - "\x8F\x8D\x03\x02\x02\x02\x8F\x90\x03\x02\x02\x02\x90,\x03\x02\x02\x02" + - "\x91\x92\t\x03\x02\x02\x92\x93\x03\x02\x02\x02\x93\x94\b\x17\x02\x02\x94" + - ".\x03\x02\x02\x02\x95\x96\x07v\x02\x02\x96\x97\x07t\x02\x02\x97\x98\x07" + - "w\x02\x02\x98\x9F\x07g\x02\x02\x99\x9A\x07h\x02\x02\x9A\x9B\x07c\x02\x02" + - "\x9B\x9C\x07n\x02\x02\x9C\x9D\x07u\x02\x02\x9D\x9F\x07g\x02\x02\x9E\x95" + - "\x03\x02\x02\x02\x9E\x99\x03\x02\x02\x02\x9F0\x03\x02\x02\x02\xA0\xA4" + - "\x07)\x02\x02\xA1\xA3\v\x02\x02\x02\xA2\xA1\x03\x02\x02\x02\xA3\xA6\x03" + - "\x02\x02\x02\xA4\xA5\x03\x02\x02\x02\xA4\xA2\x03\x02\x02\x02\xA5\xA7\x03" + - "\x02\x02\x02\xA6\xA4\x03\x02\x02\x02\xA7\xA8\x07)\x02\x02\xA82\x03\x02" + - "\x02\x02\xA9\xAD\t\x04\x02\x02\xAA\xAC\t\x05\x02\x02\xAB\xAA\x03\x02\x02" + - "\x02\xAC\xAF\x03\x02\x02\x02\xAD\xAB\x03\x02\x02\x02\xAD\xAE\x03\x02\x02" + - "\x02\xAE4\x03\x02\x02\x02\xAF\xAD\x03\x02\x02\x02\x07\x02\x8F\x9E\xA4" + - "\xAD\x03\b\x02\x02"; + "\f\x03\f\x03\r\x03\r\x03\r\x03\x0E\x03\x0E\x03\x0E\x03\x0F\x03\x0F\x03" + + "\x0F\x03\x10\x03\x10\x03\x10\x03\x11\x03\x11\x03\x12\x03\x12\x03\x13\x03" + + "\x13\x03\x14\x03\x14\x03\x15\x03\x15\x03\x16\x06\x16\x8B\n\x16\r\x16\x0E" + + "\x16\x8C\x03\x17\x03\x17\x03\x17\x03\x17\x03\x18\x03\x18\x03\x18\x03\x18" + + "\x03\x18\x03\x18\x03\x18\x03\x18\x03\x18\x05\x18\x9C\n\x18\x03\x19\x03" + + "\x19\x07\x19\xA0\n\x19\f\x19\x0E\x19\xA3\v\x19\x03\x19\x03\x19\x03\x1A" + + "\x03\x1A\x07\x1A\xA9\n\x1A\f\x1A\x0E\x1A\xAC\v\x1A\x03\xA1\x02\x02\x1B" + + "\x03\x02\x03\x05\x02\x04\x07\x02\x05\t\x02\x06\v\x02\x07\r\x02\b\x0F\x02" + + "\t\x11\x02\n\x13\x02\v\x15\x02\f\x17\x02\r\x19\x02\x0E\x1B\x02\x0F\x1D" + + "\x02\x10\x1F\x02\x11!\x02\x12#\x02\x13%\x02\x14\'\x02\x15)\x02\x16+\x02" + + "\x17-\x02\x18/\x02\x191\x02\x1A3\x02\x1B\x03\x02\x06\x03\x022;\x03\x02" + + "\"\"\x04\x02C\\c|\x06\x022;C\\aac|\x02\xB0\x02\x03\x03\x02\x02\x02\x02" + + "\x05\x03\x02\x02\x02\x02\x07\x03\x02\x02\x02\x02\t\x03\x02\x02\x02\x02" + + "\v\x03\x02\x02\x02\x02\r\x03\x02\x02\x02\x02\x0F\x03\x02\x02\x02\x02\x11" + + "\x03\x02\x02\x02\x02\x13\x03\x02\x02\x02\x02\x15\x03\x02\x02\x02\x02\x17" + + "\x03\x02\x02\x02\x02\x19\x03\x02\x02\x02\x02\x1B\x03\x02\x02\x02\x02\x1D" + + "\x03\x02\x02\x02\x02\x1F\x03\x02\x02\x02\x02!\x03\x02\x02\x02\x02#\x03" + + "\x02\x02\x02\x02%\x03\x02\x02\x02\x02\'\x03\x02\x02\x02\x02)\x03\x02\x02" + + "\x02\x02+\x03\x02\x02\x02\x02-\x03\x02\x02\x02\x02/\x03\x02\x02\x02\x02" + + "1\x03\x02\x02\x02\x023\x03\x02\x02\x02\x035\x03\x02\x02\x02\x05=\x03\x02" + + "\x02\x02\x07E\x03\x02\x02\x02\tM\x03\x02\x02\x02\vV\x03\x02\x02\x02\r" + + "[\x03\x02\x02\x02\x0Fa\x03\x02\x02\x02\x11f\x03\x02\x02\x02\x13i\x03\x02" + + "\x02\x02\x15m\x03\x02\x02\x02\x17p\x03\x02\x02\x02\x19s\x03\x02\x02\x02" + + "\x1Bv\x03\x02\x02\x02\x1Dy\x03\x02\x02\x02\x1F|\x03\x02\x02\x02!\x7F\x03" + + "\x02\x02\x02#\x81\x03\x02\x02\x02%\x83\x03\x02\x02\x02\'\x85\x03\x02\x02" + + "\x02)\x87\x03\x02\x02\x02+\x8A\x03\x02\x02\x02-\x8E\x03\x02\x02\x02/\x9B" + + "\x03\x02\x02\x021\x9D\x03\x02\x02\x023\xA6\x03\x02\x02\x0256\x07&\x02" + + "\x0267\x07h\x02\x0278\x07k\x02\x0289\x07n\x02\x029:\x07v\x02\x02:;\x07" + + "g\x02\x02;<\x07t\x02\x02<\x04\x03\x02\x02\x02=>\x07&\x02\x02>?\x07u\x02" + + "\x02?@\x07g\x02\x02@A\x07n\x02\x02AB\x07g\x02\x02BC\x07e\x02\x02CD\x07" + + "v\x02\x02D\x06\x03\x02\x02\x02EF\x07&\x02\x02FG\x07g\x02\x02GH\x07z\x02" + + "\x02HI\x07r\x02\x02IJ\x07c\x02\x02JK\x07p\x02\x02KL\x07f\x02\x02L\b\x03" + + "\x02\x02\x02MN\x07&\x02\x02NO\x07q\x02\x02OP\x07t\x02\x02PQ\x07f\x02\x02" + + "QR\x07g\x02\x02RS\x07t\x02\x02ST\x07d\x02\x02TU\x07{\x02\x02U\n\x03\x02" + + "\x02\x02VW\x07&\x02\x02WX\x07v\x02\x02XY\x07q\x02\x02YZ\x07r\x02\x02Z" + + "\f\x03\x02\x02\x02[\\\x07&\x02\x02\\]\x07u\x02\x02]^\x07m\x02\x02^_\x07" + + "k\x02\x02_`\x07r\x02\x02`\x0E\x03\x02\x02\x02ab\x07f\x02\x02bc\x07g\x02" + + "\x02cd\x07u\x02\x02de\x07e\x02\x02e\x10\x03\x02\x02\x02fg\x07q\x02\x02" + + "gh\x07t\x02\x02h\x12\x03\x02\x02\x02ij\x07c\x02\x02jk\x07p\x02\x02kl\x07" + + "f\x02\x02l\x14\x03\x02\x02\x02mn\x07g\x02\x02no\x07s\x02\x02o\x16\x03" + + "\x02\x02\x02pq\x07p\x02\x02qr\x07g\x02\x02r\x18\x03\x02\x02\x02st\x07" + + "i\x02\x02tu\x07v\x02\x02u\x1A\x03\x02\x02\x02vw\x07i\x02\x02wx\x07g\x02" + + "\x02x\x1C\x03\x02\x02\x02yz\x07n\x02\x02z{\x07v\x02\x02{\x1E\x03\x02\x02" + + "\x02|}\x07n\x02\x02}~\x07g\x02\x02~ \x03\x02\x02\x02\x7F\x80\x07(\x02" + + "\x02\x80\"\x03\x02\x02\x02\x81\x82\x07?\x02\x02\x82$\x03\x02\x02\x02\x83" + + "\x84\x07*\x02\x02\x84&\x03\x02\x02\x02\x85\x86\x07+\x02\x02\x86(\x03\x02" + + "\x02\x02\x87\x88\x07.\x02\x02\x88*\x03\x02\x02\x02\x89\x8B\t\x02\x02\x02" + + "\x8A\x89\x03\x02\x02\x02\x8B\x8C\x03\x02\x02\x02\x8C\x8A\x03\x02\x02\x02" + + "\x8C\x8D\x03\x02\x02\x02\x8D,\x03\x02\x02\x02\x8E\x8F\t\x03\x02\x02\x8F" + + "\x90\x03\x02\x02\x02\x90\x91\b\x17\x02\x02\x91.\x03\x02\x02\x02\x92\x93" + + "\x07v\x02\x02\x93\x94\x07t\x02\x02\x94\x95\x07w\x02\x02\x95\x9C\x07g\x02" + + "\x02\x96\x97\x07h\x02\x02\x97\x98\x07c\x02\x02\x98\x99\x07n\x02\x02\x99" + + "\x9A\x07u\x02\x02\x9A\x9C\x07g\x02\x02\x9B\x92\x03\x02\x02\x02\x9B\x96" + + "\x03\x02\x02\x02\x9C0\x03\x02\x02\x02\x9D\xA1\x07)\x02\x02\x9E\xA0\v\x02" + + "\x02\x02\x9F\x9E\x03\x02\x02\x02\xA0\xA3\x03\x02\x02\x02\xA1\xA2\x03\x02" + + "\x02\x02\xA1\x9F\x03\x02\x02\x02\xA2\xA4\x03\x02\x02\x02\xA3\xA1\x03\x02" + + "\x02\x02\xA4\xA5\x07)\x02\x02\xA52\x03\x02\x02\x02\xA6\xAA\t\x04\x02\x02" + + "\xA7\xA9\t\x05\x02\x02\xA8\xA7\x03\x02\x02\x02\xA9\xAC\x03\x02\x02\x02" + + "\xAA\xA8\x03\x02\x02\x02\xAA\xAB\x03\x02\x02\x02\xAB4\x03\x02\x02\x02" + + "\xAC\xAA\x03\x02\x02\x02\x07\x02\x8C\x9B\xA1\xAA\x03\b\x02\x02"; public static __ATN: ATN; public static get _ATN(): ATN { if (!ODataUriQueryLexer.__ATN) { diff --git a/tools/odataUri/src/parsers/ODataUriQueryParser.js b/tools/odataUri/src/parsers/ODataUriQueryParser.js deleted file mode 100644 index 71af2231..00000000 --- a/tools/odataUri/src/parsers/ODataUriQueryParser.js +++ /dev/null @@ -1,1651 +0,0 @@ -"use strict"; -// Generated from src/js/odata-uri/parsers/ODataUriQuery.g4 by ANTLR 4.9.0-SNAPSHOT -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.IdentifierContext = exports.CompOperatorContext = exports.ParenExpressionContext = exports.BasicExpressionContext = exports.CompExpressionContext = exports.AndExpressionContext = exports.OrExpressionContext = exports.ExpressionContext = exports.OrderFieldContext = exports.OrderSpecContext = exports.ExpandFieldContext = exports.SelectFieldContext = exports.ExpandFieldListContext = exports.SelectFieldListContext = exports.SkipOptionContext = exports.TopOptionContext = exports.OrderByOptionContext = exports.ExpandOptionContext = exports.SelectOptionContext = exports.FilterOptionContext = exports.QueryOptionContext = exports.QueryOptionsListContext = exports.QueryOptionsContext = exports.ODataUriQueryParser = void 0; -const ATN_1 = require("antlr4ts/atn/ATN"); -const ATNDeserializer_1 = require("antlr4ts/atn/ATNDeserializer"); -const FailedPredicateException_1 = require("antlr4ts/FailedPredicateException"); -const NoViableAltException_1 = require("antlr4ts/NoViableAltException"); -const Parser_1 = require("antlr4ts/Parser"); -const ParserRuleContext_1 = require("antlr4ts/ParserRuleContext"); -const ParserATNSimulator_1 = require("antlr4ts/atn/ParserATNSimulator"); -const RecognitionException_1 = require("antlr4ts/RecognitionException"); -const Token_1 = require("antlr4ts/Token"); -const VocabularyImpl_1 = require("antlr4ts/VocabularyImpl"); -const Utils = __importStar(require("antlr4ts/misc/Utils")); -class ODataUriQueryParser extends Parser_1.Parser { - constructor(input) { - super(input); - this._interp = new ParserATNSimulator_1.ParserATNSimulator(ODataUriQueryParser._ATN, this); - } - // @Override - // @NotNull - get vocabulary() { - return ODataUriQueryParser.VOCABULARY; - } - // tslint:enable:no-trailing-whitespace - // @Override - get grammarFileName() { return "ODataUriQuery.g4"; } - // @Override - get ruleNames() { return ODataUriQueryParser.ruleNames; } - // @Override - get serializedATN() { return ODataUriQueryParser._serializedATN; } - createFailedPredicateException(predicate, message) { - return new FailedPredicateException_1.FailedPredicateException(this, predicate, message); - } - // @RuleVersion(0) - queryOptions() { - let _localctx = new QueryOptionsContext(this._ctx, this.state); - this.enterRule(_localctx, 0, ODataUriQueryParser.RULE_queryOptions); - try { - this.enterOuterAlt(_localctx, 1); - { - this.state = 46; - this.queryOption(); - this.state = 47; - this.queryOptionsList(); - } - } - catch (re) { - if (re instanceof RecognitionException_1.RecognitionException) { - _localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } - else { - throw re; - } - } - finally { - this.exitRule(); - } - return _localctx; - } - // @RuleVersion(0) - queryOptionsList() { - let _localctx = new QueryOptionsListContext(this._ctx, this.state); - this.enterRule(_localctx, 2, ODataUriQueryParser.RULE_queryOptionsList); - try { - this.state = 54; - this._errHandler.sync(this); - switch (this._input.LA(1)) { - case ODataUriQueryParser.AMP: - this.enterOuterAlt(_localctx, 1); - { - this.state = 49; - this.match(ODataUriQueryParser.AMP); - this.state = 50; - this.queryOption(); - this.state = 51; - this.queryOptionsList(); - } - break; - case ODataUriQueryParser.EOF: - this.enterOuterAlt(_localctx, 2); - // tslint:disable-next-line:no-empty - { - } - break; - default: - throw new NoViableAltException_1.NoViableAltException(this); - } - } - catch (re) { - if (re instanceof RecognitionException_1.RecognitionException) { - _localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } - else { - throw re; - } - } - finally { - this.exitRule(); - } - return _localctx; - } - // @RuleVersion(0) - queryOption() { - let _localctx = new QueryOptionContext(this._ctx, this.state); - this.enterRule(_localctx, 4, ODataUriQueryParser.RULE_queryOption); - try { - this.state = 62; - this._errHandler.sync(this); - switch (this._input.LA(1)) { - case ODataUriQueryParser.FILTER: - this.enterOuterAlt(_localctx, 1); - { - this.state = 56; - this.filterOption(); - } - break; - case ODataUriQueryParser.SELECT: - this.enterOuterAlt(_localctx, 2); - { - this.state = 57; - this.selectOption(); - } - break; - case ODataUriQueryParser.EXPAND: - this.enterOuterAlt(_localctx, 3); - { - this.state = 58; - this.expandOption(); - } - break; - case ODataUriQueryParser.ORDERBY: - this.enterOuterAlt(_localctx, 4); - { - this.state = 59; - this.orderByOption(); - } - break; - case ODataUriQueryParser.TOP: - this.enterOuterAlt(_localctx, 5); - { - this.state = 60; - this.topOption(); - } - break; - case ODataUriQueryParser.SKIPKW: - this.enterOuterAlt(_localctx, 6); - { - this.state = 61; - this.skipOption(); - } - break; - default: - throw new NoViableAltException_1.NoViableAltException(this); - } - } - catch (re) { - if (re instanceof RecognitionException_1.RecognitionException) { - _localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } - else { - throw re; - } - } - finally { - this.exitRule(); - } - return _localctx; - } - // @RuleVersion(0) - filterOption() { - let _localctx = new FilterOptionContext(this._ctx, this.state); - this.enterRule(_localctx, 6, ODataUriQueryParser.RULE_filterOption); - try { - this.enterOuterAlt(_localctx, 1); - { - this.state = 64; - this.match(ODataUriQueryParser.FILTER); - this.state = 65; - this.match(ODataUriQueryParser.ASSIGN); - this.state = 66; - this.expression(); - } - } - catch (re) { - if (re instanceof RecognitionException_1.RecognitionException) { - _localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } - else { - throw re; - } - } - finally { - this.exitRule(); - } - return _localctx; - } - // @RuleVersion(0) - selectOption() { - let _localctx = new SelectOptionContext(this._ctx, this.state); - this.enterRule(_localctx, 8, ODataUriQueryParser.RULE_selectOption); - try { - this.enterOuterAlt(_localctx, 1); - { - this.state = 68; - this.match(ODataUriQueryParser.SELECT); - this.state = 69; - this.match(ODataUriQueryParser.ASSIGN); - this.state = 70; - this.selectFieldList(); - } - } - catch (re) { - if (re instanceof RecognitionException_1.RecognitionException) { - _localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } - else { - throw re; - } - } - finally { - this.exitRule(); - } - return _localctx; - } - // @RuleVersion(0) - expandOption() { - let _localctx = new ExpandOptionContext(this._ctx, this.state); - this.enterRule(_localctx, 10, ODataUriQueryParser.RULE_expandOption); - try { - this.enterOuterAlt(_localctx, 1); - { - this.state = 72; - this.match(ODataUriQueryParser.EXPAND); - this.state = 73; - this.match(ODataUriQueryParser.ASSIGN); - this.state = 74; - this.expandFieldList(); - } - } - catch (re) { - if (re instanceof RecognitionException_1.RecognitionException) { - _localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } - else { - throw re; - } - } - finally { - this.exitRule(); - } - return _localctx; - } - // @RuleVersion(0) - orderByOption() { - let _localctx = new OrderByOptionContext(this._ctx, this.state); - this.enterRule(_localctx, 12, ODataUriQueryParser.RULE_orderByOption); - try { - this.enterOuterAlt(_localctx, 1); - { - this.state = 76; - this.match(ODataUriQueryParser.ORDERBY); - this.state = 77; - this.match(ODataUriQueryParser.ASSIGN); - this.state = 78; - this.orderSpec(); - } - } - catch (re) { - if (re instanceof RecognitionException_1.RecognitionException) { - _localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } - else { - throw re; - } - } - finally { - this.exitRule(); - } - return _localctx; - } - // @RuleVersion(0) - topOption() { - let _localctx = new TopOptionContext(this._ctx, this.state); - this.enterRule(_localctx, 14, ODataUriQueryParser.RULE_topOption); - try { - this.enterOuterAlt(_localctx, 1); - { - this.state = 80; - this.match(ODataUriQueryParser.TOP); - this.state = 81; - this.match(ODataUriQueryParser.ASSIGN); - this.state = 82; - this.match(ODataUriQueryParser.NUMBER); - } - } - catch (re) { - if (re instanceof RecognitionException_1.RecognitionException) { - _localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } - else { - throw re; - } - } - finally { - this.exitRule(); - } - return _localctx; - } - // @RuleVersion(0) - skipOption() { - let _localctx = new SkipOptionContext(this._ctx, this.state); - this.enterRule(_localctx, 16, ODataUriQueryParser.RULE_skipOption); - try { - this.enterOuterAlt(_localctx, 1); - { - this.state = 84; - this.match(ODataUriQueryParser.SKIPKW); - this.state = 85; - this.match(ODataUriQueryParser.ASSIGN); - this.state = 86; - this.match(ODataUriQueryParser.NUMBER); - } - } - catch (re) { - if (re instanceof RecognitionException_1.RecognitionException) { - _localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } - else { - throw re; - } - } - finally { - this.exitRule(); - } - return _localctx; - } - // @RuleVersion(0) - selectFieldList() { - let _localctx = new SelectFieldListContext(this._ctx, this.state); - this.enterRule(_localctx, 18, ODataUriQueryParser.RULE_selectFieldList); - try { - this.state = 93; - this._errHandler.sync(this); - switch (this.interpreter.adaptivePredict(this._input, 2, this._ctx)) { - case 1: - this.enterOuterAlt(_localctx, 1); - { - this.state = 88; - this.selectField(); - } - break; - case 2: - this.enterOuterAlt(_localctx, 2); - { - this.state = 89; - this.selectField(); - this.state = 90; - this.match(ODataUriQueryParser.COMMA); - this.state = 91; - this.selectFieldList(); - } - break; - } - } - catch (re) { - if (re instanceof RecognitionException_1.RecognitionException) { - _localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } - else { - throw re; - } - } - finally { - this.exitRule(); - } - return _localctx; - } - // @RuleVersion(0) - expandFieldList() { - let _localctx = new ExpandFieldListContext(this._ctx, this.state); - this.enterRule(_localctx, 20, ODataUriQueryParser.RULE_expandFieldList); - try { - this.state = 100; - this._errHandler.sync(this); - switch (this.interpreter.adaptivePredict(this._input, 3, this._ctx)) { - case 1: - this.enterOuterAlt(_localctx, 1); - { - this.state = 95; - this.expandField(); - } - break; - case 2: - this.enterOuterAlt(_localctx, 2); - { - this.state = 96; - this.expandField(); - this.state = 97; - this.match(ODataUriQueryParser.COMMA); - this.state = 98; - this.expandFieldList(); - } - break; - } - } - catch (re) { - if (re instanceof RecognitionException_1.RecognitionException) { - _localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } - else { - throw re; - } - } - finally { - this.exitRule(); - } - return _localctx; - } - // @RuleVersion(0) - selectField() { - let _localctx = new SelectFieldContext(this._ctx, this.state); - this.enterRule(_localctx, 22, ODataUriQueryParser.RULE_selectField); - try { - this.enterOuterAlt(_localctx, 1); - { - this.state = 102; - this.identifier(); - } - } - catch (re) { - if (re instanceof RecognitionException_1.RecognitionException) { - _localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } - else { - throw re; - } - } - finally { - this.exitRule(); - } - return _localctx; - } - // @RuleVersion(0) - expandField() { - let _localctx = new ExpandFieldContext(this._ctx, this.state); - this.enterRule(_localctx, 24, ODataUriQueryParser.RULE_expandField); - try { - this.enterOuterAlt(_localctx, 1); - { - this.state = 104; - this.identifier(); - } - } - catch (re) { - if (re instanceof RecognitionException_1.RecognitionException) { - _localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } - else { - throw re; - } - } - finally { - this.exitRule(); - } - return _localctx; - } - // @RuleVersion(0) - orderSpec() { - let _localctx = new OrderSpecContext(this._ctx, this.state); - this.enterRule(_localctx, 26, ODataUriQueryParser.RULE_orderSpec); - try { - this.state = 110; - this._errHandler.sync(this); - switch (this.interpreter.adaptivePredict(this._input, 4, this._ctx)) { - case 1: - this.enterOuterAlt(_localctx, 1); - { - this.state = 106; - this.orderField(); - } - break; - case 2: - this.enterOuterAlt(_localctx, 2); - { - this.state = 107; - this.orderField(); - this.state = 108; - this.match(ODataUriQueryParser.DESC); - } - break; - } - } - catch (re) { - if (re instanceof RecognitionException_1.RecognitionException) { - _localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } - else { - throw re; - } - } - finally { - this.exitRule(); - } - return _localctx; - } - // @RuleVersion(0) - orderField() { - let _localctx = new OrderFieldContext(this._ctx, this.state); - this.enterRule(_localctx, 28, ODataUriQueryParser.RULE_orderField); - try { - this.enterOuterAlt(_localctx, 1); - { - this.state = 112; - this.identifier(); - } - } - catch (re) { - if (re instanceof RecognitionException_1.RecognitionException) { - _localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } - else { - throw re; - } - } - finally { - this.exitRule(); - } - return _localctx; - } - // @RuleVersion(0) - expression() { - let _localctx = new ExpressionContext(this._ctx, this.state); - this.enterRule(_localctx, 30, ODataUriQueryParser.RULE_expression); - try { - this.enterOuterAlt(_localctx, 1); - { - this.state = 114; - this.orExpression(0); - } - } - catch (re) { - if (re instanceof RecognitionException_1.RecognitionException) { - _localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } - else { - throw re; - } - } - finally { - this.exitRule(); - } - return _localctx; - } - // @RuleVersion(0) - orExpression(_p) { - if (_p === undefined) { - _p = 0; - } - let _parentctx = this._ctx; - let _parentState = this.state; - let _localctx = new OrExpressionContext(this._ctx, _parentState); - let _prevctx = _localctx; - let _startState = 32; - this.enterRecursionRule(_localctx, 32, ODataUriQueryParser.RULE_orExpression, _p); - try { - let _alt; - this.enterOuterAlt(_localctx, 1); - { - { - this.state = 117; - this.andExpression(0); - } - this._ctx._stop = this._input.tryLT(-1); - this.state = 124; - this._errHandler.sync(this); - _alt = this.interpreter.adaptivePredict(this._input, 5, this._ctx); - while (_alt !== 2 && _alt !== ATN_1.ATN.INVALID_ALT_NUMBER) { - if (_alt === 1) { - if (this._parseListeners != null) { - this.triggerExitRuleEvent(); - } - _prevctx = _localctx; - { - { - _localctx = new OrExpressionContext(_parentctx, _parentState); - this.pushNewRecursionContext(_localctx, _startState, ODataUriQueryParser.RULE_orExpression); - this.state = 119; - if (!(this.precpred(this._ctx, 1))) { - throw this.createFailedPredicateException("this.precpred(this._ctx, 1)"); - } - this.state = 120; - this.match(ODataUriQueryParser.OR); - this.state = 121; - this.andExpression(0); - } - } - } - this.state = 126; - this._errHandler.sync(this); - _alt = this.interpreter.adaptivePredict(this._input, 5, this._ctx); - } - } - } - catch (re) { - if (re instanceof RecognitionException_1.RecognitionException) { - _localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } - else { - throw re; - } - } - finally { - this.unrollRecursionContexts(_parentctx); - } - return _localctx; - } - // @RuleVersion(0) - andExpression(_p) { - if (_p === undefined) { - _p = 0; - } - let _parentctx = this._ctx; - let _parentState = this.state; - let _localctx = new AndExpressionContext(this._ctx, _parentState); - let _prevctx = _localctx; - let _startState = 34; - this.enterRecursionRule(_localctx, 34, ODataUriQueryParser.RULE_andExpression, _p); - try { - let _alt; - this.enterOuterAlt(_localctx, 1); - { - { - this.state = 128; - this.compExpression(0); - } - this._ctx._stop = this._input.tryLT(-1); - this.state = 135; - this._errHandler.sync(this); - _alt = this.interpreter.adaptivePredict(this._input, 6, this._ctx); - while (_alt !== 2 && _alt !== ATN_1.ATN.INVALID_ALT_NUMBER) { - if (_alt === 1) { - if (this._parseListeners != null) { - this.triggerExitRuleEvent(); - } - _prevctx = _localctx; - { - { - _localctx = new AndExpressionContext(_parentctx, _parentState); - this.pushNewRecursionContext(_localctx, _startState, ODataUriQueryParser.RULE_andExpression); - this.state = 130; - if (!(this.precpred(this._ctx, 1))) { - throw this.createFailedPredicateException("this.precpred(this._ctx, 1)"); - } - this.state = 131; - this.match(ODataUriQueryParser.AND); - this.state = 132; - this.compExpression(0); - } - } - } - this.state = 137; - this._errHandler.sync(this); - _alt = this.interpreter.adaptivePredict(this._input, 6, this._ctx); - } - } - } - catch (re) { - if (re instanceof RecognitionException_1.RecognitionException) { - _localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } - else { - throw re; - } - } - finally { - this.unrollRecursionContexts(_parentctx); - } - return _localctx; - } - // @RuleVersion(0) - compExpression(_p) { - if (_p === undefined) { - _p = 0; - } - let _parentctx = this._ctx; - let _parentState = this.state; - let _localctx = new CompExpressionContext(this._ctx, _parentState); - let _prevctx = _localctx; - let _startState = 36; - this.enterRecursionRule(_localctx, 36, ODataUriQueryParser.RULE_compExpression, _p); - try { - let _alt; - this.enterOuterAlt(_localctx, 1); - { - { - this.state = 139; - this.basicExpression(); - } - this._ctx._stop = this._input.tryLT(-1); - this.state = 147; - this._errHandler.sync(this); - _alt = this.interpreter.adaptivePredict(this._input, 7, this._ctx); - while (_alt !== 2 && _alt !== ATN_1.ATN.INVALID_ALT_NUMBER) { - if (_alt === 1) { - if (this._parseListeners != null) { - this.triggerExitRuleEvent(); - } - _prevctx = _localctx; - { - { - _localctx = new CompExpressionContext(_parentctx, _parentState); - this.pushNewRecursionContext(_localctx, _startState, ODataUriQueryParser.RULE_compExpression); - this.state = 141; - if (!(this.precpred(this._ctx, 1))) { - throw this.createFailedPredicateException("this.precpred(this._ctx, 1)"); - } - this.state = 142; - this.compOperator(); - this.state = 143; - this.basicExpression(); - } - } - } - this.state = 149; - this._errHandler.sync(this); - _alt = this.interpreter.adaptivePredict(this._input, 7, this._ctx); - } - } - } - catch (re) { - if (re instanceof RecognitionException_1.RecognitionException) { - _localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } - else { - throw re; - } - } - finally { - this.unrollRecursionContexts(_parentctx); - } - return _localctx; - } - // @RuleVersion(0) - basicExpression() { - let _localctx = new BasicExpressionContext(this._ctx, this.state); - this.enterRule(_localctx, 38, ODataUriQueryParser.RULE_basicExpression); - try { - this.state = 155; - this._errHandler.sync(this); - switch (this._input.LA(1)) { - case ODataUriQueryParser.NUMBER: - this.enterOuterAlt(_localctx, 1); - { - this.state = 150; - this.match(ODataUriQueryParser.NUMBER); - } - break; - case ODataUriQueryParser.STRING: - this.enterOuterAlt(_localctx, 2); - { - this.state = 151; - this.match(ODataUriQueryParser.STRING); - } - break; - case ODataUriQueryParser.BOOLEAN: - this.enterOuterAlt(_localctx, 3); - { - this.state = 152; - this.match(ODataUriQueryParser.BOOLEAN); - } - break; - case ODataUriQueryParser.ID: - this.enterOuterAlt(_localctx, 4); - { - this.state = 153; - this.identifier(); - } - break; - case ODataUriQueryParser.LPAREN: - this.enterOuterAlt(_localctx, 5); - { - this.state = 154; - this.parenExpression(); - } - break; - default: - throw new NoViableAltException_1.NoViableAltException(this); - } - } - catch (re) { - if (re instanceof RecognitionException_1.RecognitionException) { - _localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } - else { - throw re; - } - } - finally { - this.exitRule(); - } - return _localctx; - } - // @RuleVersion(0) - parenExpression() { - let _localctx = new ParenExpressionContext(this._ctx, this.state); - this.enterRule(_localctx, 40, ODataUriQueryParser.RULE_parenExpression); - try { - this.enterOuterAlt(_localctx, 1); - { - this.state = 157; - this.match(ODataUriQueryParser.LPAREN); - this.state = 158; - this.expression(); - this.state = 159; - this.match(ODataUriQueryParser.RPAREN); - } - } - catch (re) { - if (re instanceof RecognitionException_1.RecognitionException) { - _localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } - else { - throw re; - } - } - finally { - this.exitRule(); - } - return _localctx; - } - // @RuleVersion(0) - compOperator() { - let _localctx = new CompOperatorContext(this._ctx, this.state); - this.enterRule(_localctx, 42, ODataUriQueryParser.RULE_compOperator); - let _la; - try { - this.enterOuterAlt(_localctx, 1); - { - this.state = 161; - _la = this._input.LA(1); - if (!((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << ODataUriQueryParser.EQ) | (1 << ODataUriQueryParser.NEQ) | (1 << ODataUriQueryParser.GT) | (1 << ODataUriQueryParser.GTE) | (1 << ODataUriQueryParser.LT) | (1 << ODataUriQueryParser.LTE))) !== 0))) { - this._errHandler.recoverInline(this); - } - else { - if (this._input.LA(1) === Token_1.Token.EOF) { - this.matchedEOF = true; - } - this._errHandler.reportMatch(this); - this.consume(); - } - } - } - catch (re) { - if (re instanceof RecognitionException_1.RecognitionException) { - _localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } - else { - throw re; - } - } - finally { - this.exitRule(); - } - return _localctx; - } - // @RuleVersion(0) - identifier() { - let _localctx = new IdentifierContext(this._ctx, this.state); - this.enterRule(_localctx, 44, ODataUriQueryParser.RULE_identifier); - try { - this.enterOuterAlt(_localctx, 1); - { - this.state = 163; - this.match(ODataUriQueryParser.ID); - } - } - catch (re) { - if (re instanceof RecognitionException_1.RecognitionException) { - _localctx.exception = re; - this._errHandler.reportError(this, re); - this._errHandler.recover(this, re); - } - else { - throw re; - } - } - finally { - this.exitRule(); - } - return _localctx; - } - sempred(_localctx, ruleIndex, predIndex) { - switch (ruleIndex) { - case 16: - return this.orExpression_sempred(_localctx, predIndex); - case 17: - return this.andExpression_sempred(_localctx, predIndex); - case 18: - return this.compExpression_sempred(_localctx, predIndex); - } - return true; - } - orExpression_sempred(_localctx, predIndex) { - switch (predIndex) { - case 0: - return this.precpred(this._ctx, 1); - } - return true; - } - andExpression_sempred(_localctx, predIndex) { - switch (predIndex) { - case 1: - return this.precpred(this._ctx, 1); - } - return true; - } - compExpression_sempred(_localctx, predIndex) { - switch (predIndex) { - case 2: - return this.precpred(this._ctx, 1); - } - return true; - } - static get _ATN() { - if (!ODataUriQueryParser.__ATN) { - ODataUriQueryParser.__ATN = new ATNDeserializer_1.ATNDeserializer().deserialize(Utils.toCharArray(ODataUriQueryParser._serializedATN)); - } - return ODataUriQueryParser.__ATN; - } -} -exports.ODataUriQueryParser = ODataUriQueryParser; -ODataUriQueryParser.FILTER = 1; -ODataUriQueryParser.SELECT = 2; -ODataUriQueryParser.EXPAND = 3; -ODataUriQueryParser.ORDERBY = 4; -ODataUriQueryParser.TOP = 5; -ODataUriQueryParser.SKIPKW = 6; -ODataUriQueryParser.DESC = 7; -ODataUriQueryParser.OR = 8; -ODataUriQueryParser.AND = 9; -ODataUriQueryParser.EQ = 10; -ODataUriQueryParser.NEQ = 11; -ODataUriQueryParser.GT = 12; -ODataUriQueryParser.GTE = 13; -ODataUriQueryParser.LT = 14; -ODataUriQueryParser.LTE = 15; -ODataUriQueryParser.AMP = 16; -ODataUriQueryParser.ASSIGN = 17; -ODataUriQueryParser.LPAREN = 18; -ODataUriQueryParser.RPAREN = 19; -ODataUriQueryParser.COMMA = 20; -ODataUriQueryParser.NUMBER = 21; -ODataUriQueryParser.WS = 22; -ODataUriQueryParser.BOOLEAN = 23; -ODataUriQueryParser.STRING = 24; -ODataUriQueryParser.ID = 25; -ODataUriQueryParser.RULE_queryOptions = 0; -ODataUriQueryParser.RULE_queryOptionsList = 1; -ODataUriQueryParser.RULE_queryOption = 2; -ODataUriQueryParser.RULE_filterOption = 3; -ODataUriQueryParser.RULE_selectOption = 4; -ODataUriQueryParser.RULE_expandOption = 5; -ODataUriQueryParser.RULE_orderByOption = 6; -ODataUriQueryParser.RULE_topOption = 7; -ODataUriQueryParser.RULE_skipOption = 8; -ODataUriQueryParser.RULE_selectFieldList = 9; -ODataUriQueryParser.RULE_expandFieldList = 10; -ODataUriQueryParser.RULE_selectField = 11; -ODataUriQueryParser.RULE_expandField = 12; -ODataUriQueryParser.RULE_orderSpec = 13; -ODataUriQueryParser.RULE_orderField = 14; -ODataUriQueryParser.RULE_expression = 15; -ODataUriQueryParser.RULE_orExpression = 16; -ODataUriQueryParser.RULE_andExpression = 17; -ODataUriQueryParser.RULE_compExpression = 18; -ODataUriQueryParser.RULE_basicExpression = 19; -ODataUriQueryParser.RULE_parenExpression = 20; -ODataUriQueryParser.RULE_compOperator = 21; -ODataUriQueryParser.RULE_identifier = 22; -// tslint:disable:no-trailing-whitespace -ODataUriQueryParser.ruleNames = [ - "queryOptions", "queryOptionsList", "queryOption", "filterOption", "selectOption", - "expandOption", "orderByOption", "topOption", "skipOption", "selectFieldList", - "expandFieldList", "selectField", "expandField", "orderSpec", "orderField", - "expression", "orExpression", "andExpression", "compExpression", "basicExpression", - "parenExpression", "compOperator", "identifier", -]; -ODataUriQueryParser._LITERAL_NAMES = [ - undefined, "'$filter'", "'$select'", "'$expand'", "'$orderby'", "'$top'", - "'$skip'", "'desc'", "'or'", "'and'", "'eq'", "'neq'", "'gt'", "'gte'", - "'lt'", "'lte'", "'&'", "'='", "'('", "')'", "','", -]; -ODataUriQueryParser._SYMBOLIC_NAMES = [ - undefined, "FILTER", "SELECT", "EXPAND", "ORDERBY", "TOP", "SKIPKW", "DESC", - "OR", "AND", "EQ", "NEQ", "GT", "GTE", "LT", "LTE", "AMP", "ASSIGN", "LPAREN", - "RPAREN", "COMMA", "NUMBER", "WS", "BOOLEAN", "STRING", "ID", -]; -ODataUriQueryParser.VOCABULARY = new VocabularyImpl_1.VocabularyImpl(ODataUriQueryParser._LITERAL_NAMES, ODataUriQueryParser._SYMBOLIC_NAMES, []); -ODataUriQueryParser._serializedATN = "\x03\uC91D\uCABA\u058D\uAFBA\u4F53\u0607\uEA8B\uC241\x03\x1B\xA8\x04\x02" + - "\t\x02\x04\x03\t\x03\x04\x04\t\x04\x04\x05\t\x05\x04\x06\t\x06\x04\x07" + - "\t\x07\x04\b\t\b\x04\t\t\t\x04\n\t\n\x04\v\t\v\x04\f\t\f\x04\r\t\r\x04" + - "\x0E\t\x0E\x04\x0F\t\x0F\x04\x10\t\x10\x04\x11\t\x11\x04\x12\t\x12\x04" + - "\x13\t\x13\x04\x14\t\x14\x04\x15\t\x15\x04\x16\t\x16\x04\x17\t\x17\x04" + - "\x18\t\x18\x03\x02\x03\x02\x03\x02\x03\x03\x03\x03\x03\x03\x03\x03\x03" + - "\x03\x05\x039\n\x03\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x05" + - "\x04A\n\x04\x03\x05\x03\x05\x03\x05\x03\x05\x03\x06\x03\x06\x03\x06\x03" + - "\x06\x03\x07\x03\x07\x03\x07\x03\x07\x03\b\x03\b\x03\b\x03\b\x03\t\x03" + - "\t\x03\t\x03\t\x03\n\x03\n\x03\n\x03\n\x03\v\x03\v\x03\v\x03\v\x03\v\x05" + - "\v`\n\v\x03\f\x03\f\x03\f\x03\f\x03\f\x05\fg\n\f\x03\r\x03\r\x03\x0E\x03" + - "\x0E\x03\x0F\x03\x0F\x03\x0F\x03\x0F\x05\x0Fq\n\x0F\x03\x10\x03\x10\x03" + - "\x11\x03\x11\x03\x12\x03\x12\x03\x12\x03\x12\x03\x12\x03\x12\x07\x12}" + - "\n\x12\f\x12\x0E\x12\x80\v\x12\x03\x13\x03\x13\x03\x13\x03\x13\x03\x13" + - "\x03\x13\x07\x13\x88\n\x13\f\x13\x0E\x13\x8B\v\x13\x03\x14\x03\x14\x03" + - "\x14\x03\x14\x03\x14\x03\x14\x03\x14\x07\x14\x94\n\x14\f\x14\x0E\x14\x97" + - "\v\x14\x03\x15\x03\x15\x03\x15\x03\x15\x03\x15\x05\x15\x9E\n\x15\x03\x16" + - "\x03\x16\x03\x16\x03\x16\x03\x17\x03\x17\x03\x18\x03\x18\x03\x18\x02\x02" + - "\x05\"$&\x19\x02\x02\x04\x02\x06\x02\b\x02\n\x02\f\x02\x0E\x02\x10\x02" + - "\x12\x02\x14\x02\x16\x02\x18\x02\x1A\x02\x1C\x02\x1E\x02 \x02\"\x02$\x02" + - "&\x02(\x02*\x02,\x02.\x02\x02\x03\x03\x02\f\x11\x02\xA0\x020\x03\x02\x02" + - "\x02\x048\x03\x02\x02\x02\x06@\x03\x02\x02\x02\bB\x03\x02\x02\x02\nF\x03" + - "\x02\x02\x02\fJ\x03\x02\x02\x02\x0EN\x03\x02\x02\x02\x10R\x03\x02\x02" + - "\x02\x12V\x03\x02\x02\x02\x14_\x03\x02\x02\x02\x16f\x03\x02\x02\x02\x18" + - "h\x03\x02\x02\x02\x1Aj\x03\x02\x02\x02\x1Cp\x03\x02\x02\x02\x1Er\x03\x02" + - "\x02\x02 t\x03\x02\x02\x02\"v\x03\x02\x02\x02$\x81\x03\x02\x02\x02&\x8C" + - "\x03\x02\x02\x02(\x9D\x03\x02\x02\x02*\x9F\x03\x02\x02\x02,\xA3\x03\x02" + - "\x02\x02.\xA5\x03\x02\x02\x0201\x05\x06\x04\x0212\x05\x04\x03\x022\x03" + - "\x03\x02\x02\x0234\x07\x12\x02\x0245\x05\x06\x04\x0256\x05\x04\x03\x02" + - "69\x03\x02\x02\x0279\x03\x02\x02\x0283\x03\x02\x02\x0287\x03\x02\x02\x02" + - "9\x05\x03\x02\x02\x02:A\x05\b\x05\x02;A\x05\n\x06\x02A\x05\x10\t\x02?A\x05\x12\n\x02@:\x03\x02\x02\x02@;\x03" + - "\x02\x02\x02@<\x03\x02\x02\x02@=\x03\x02\x02\x02@>\x03\x02\x02\x02@?\x03" + - "\x02\x02\x02A\x07\x03\x02\x02\x02BC\x07\x03\x02\x02CD\x07\x13\x02\x02" + - "DE\x05 \x11\x02E\t\x03\x02\x02\x02FG\x07\x04\x02\x02GH\x07\x13\x02\x02" + - "HI\x05\x14\v\x02I\v\x03\x02\x02\x02JK\x07\x05\x02\x02KL\x07\x13\x02\x02" + - "LM\x05\x16\f\x02M\r\x03\x02\x02\x02NO\x07\x06\x02\x02OP\x07\x13\x02\x02" + - "PQ\x05\x1C\x0F\x02Q\x0F\x03\x02\x02\x02RS\x07\x07\x02\x02ST\x07\x13\x02" + - "\x02TU\x07\x17\x02\x02U\x11\x03\x02\x02\x02VW\x07\b\x02\x02WX\x07\x13" + - "\x02\x02XY\x07\x17\x02\x02Y\x13\x03\x02\x02\x02Z`\x05\x18\r\x02[\\\x05" + - "\x18\r\x02\\]\x07\x16\x02\x02]^\x05\x14\v\x02^`\x03\x02\x02\x02_Z\x03" + - "\x02\x02\x02_[\x03\x02\x02\x02`\x15\x03\x02\x02\x02ag\x05\x1A\x0E\x02" + - "bc\x05\x1A\x0E\x02cd\x07\x16\x02\x02de\x05\x16\f\x02eg\x03\x02\x02\x02" + - "fa\x03\x02\x02\x02fb\x03\x02\x02\x02g\x17\x03\x02\x02\x02hi\x05.\x18\x02" + - "i\x19\x03\x02\x02\x02jk\x05.\x18\x02k\x1B\x03\x02\x02\x02lq\x05\x1E\x10" + - "\x02mn\x05\x1E\x10\x02no\x07\t\x02\x02oq\x03\x02\x02\x02pl\x03\x02\x02" + - "\x02pm\x03\x02\x02\x02q\x1D\x03\x02\x02\x02rs\x05.\x18\x02s\x1F\x03\x02" + - "\x02\x02tu\x05\"\x12\x02u!\x03\x02\x02\x02vw\b\x12\x01\x02wx\x05$\x13" + - "\x02x~\x03\x02\x02\x02yz\f\x03\x02\x02z{\x07\n\x02\x02{}\x05$\x13\x02" + - "|y\x03\x02\x02\x02}\x80\x03\x02\x02\x02~|\x03\x02\x02\x02~\x7F\x03\x02" + - "\x02\x02\x7F#\x03\x02\x02\x02\x80~\x03\x02\x02\x02\x81\x82\b\x13\x01\x02" + - "\x82\x83\x05&\x14\x02\x83\x89\x03\x02\x02\x02\x84\x85\f\x03\x02\x02\x85" + - "\x86\x07\v\x02\x02\x86\x88\x05&\x14\x02\x87\x84\x03\x02\x02\x02\x88\x8B" + - "\x03\x02\x02\x02\x89\x87\x03\x02\x02\x02\x89\x8A\x03\x02\x02\x02\x8A%" + - "\x03\x02\x02\x02\x8B\x89\x03\x02\x02\x02\x8C\x8D\b\x14\x01\x02\x8D\x8E" + - "\x05(\x15\x02\x8E\x95\x03\x02\x02\x02\x8F\x90\f\x03\x02\x02\x90\x91\x05" + - ",\x17\x02\x91\x92\x05(\x15\x02\x92\x94\x03\x02\x02\x02\x93\x8F\x03\x02" + - "\x02\x02\x94\x97\x03\x02\x02\x02\x95\x93\x03\x02\x02\x02\x95\x96\x03\x02" + - "\x02\x02\x96\'\x03\x02\x02\x02\x97\x95\x03\x02\x02\x02\x98\x9E\x07\x17" + - "\x02\x02\x99\x9E\x07\x1A\x02\x02\x9A\x9E\x07\x19\x02\x02\x9B\x9E\x05." + - "\x18\x02\x9C\x9E\x05*\x16\x02\x9D\x98\x03\x02\x02\x02\x9D\x99\x03\x02" + - "\x02\x02\x9D\x9A\x03\x02\x02\x02\x9D\x9B\x03\x02\x02\x02\x9D\x9C\x03\x02" + - "\x02\x02\x9E)\x03\x02\x02\x02\x9F\xA0\x07\x14\x02\x02\xA0\xA1\x05 \x11" + - "\x02\xA1\xA2\x07\x15\x02\x02\xA2+\x03\x02\x02\x02\xA3\xA4\t\x02\x02\x02" + - "\xA4-\x03\x02\x02\x02\xA5\xA6\x07\x1B\x02\x02\xA6/\x03\x02\x02\x02\v8" + - "@_fp~\x89\x95\x9D"; -class QueryOptionsContext extends ParserRuleContext_1.ParserRuleContext { - queryOption() { - return this.getRuleContext(0, QueryOptionContext); - } - queryOptionsList() { - return this.getRuleContext(0, QueryOptionsListContext); - } - constructor(parent, invokingState) { - super(parent, invokingState); - } - // @Override - get ruleIndex() { return ODataUriQueryParser.RULE_queryOptions; } - // @Override - accept(visitor) { - if (visitor.visitQueryOptions) { - return visitor.visitQueryOptions(this); - } - else { - return visitor.visitChildren(this); - } - } -} -exports.QueryOptionsContext = QueryOptionsContext; -class QueryOptionsListContext extends ParserRuleContext_1.ParserRuleContext { - AMP() { return this.tryGetToken(ODataUriQueryParser.AMP, 0); } - queryOption() { - return this.tryGetRuleContext(0, QueryOptionContext); - } - queryOptionsList() { - return this.tryGetRuleContext(0, QueryOptionsListContext); - } - constructor(parent, invokingState) { - super(parent, invokingState); - } - // @Override - get ruleIndex() { return ODataUriQueryParser.RULE_queryOptionsList; } - // @Override - accept(visitor) { - if (visitor.visitQueryOptionsList) { - return visitor.visitQueryOptionsList(this); - } - else { - return visitor.visitChildren(this); - } - } -} -exports.QueryOptionsListContext = QueryOptionsListContext; -class QueryOptionContext extends ParserRuleContext_1.ParserRuleContext { - filterOption() { - return this.tryGetRuleContext(0, FilterOptionContext); - } - selectOption() { - return this.tryGetRuleContext(0, SelectOptionContext); - } - expandOption() { - return this.tryGetRuleContext(0, ExpandOptionContext); - } - orderByOption() { - return this.tryGetRuleContext(0, OrderByOptionContext); - } - topOption() { - return this.tryGetRuleContext(0, TopOptionContext); - } - skipOption() { - return this.tryGetRuleContext(0, SkipOptionContext); - } - constructor(parent, invokingState) { - super(parent, invokingState); - } - // @Override - get ruleIndex() { return ODataUriQueryParser.RULE_queryOption; } - // @Override - accept(visitor) { - if (visitor.visitQueryOption) { - return visitor.visitQueryOption(this); - } - else { - return visitor.visitChildren(this); - } - } -} -exports.QueryOptionContext = QueryOptionContext; -class FilterOptionContext extends ParserRuleContext_1.ParserRuleContext { - FILTER() { return this.getToken(ODataUriQueryParser.FILTER, 0); } - ASSIGN() { return this.getToken(ODataUriQueryParser.ASSIGN, 0); } - expression() { - return this.getRuleContext(0, ExpressionContext); - } - constructor(parent, invokingState) { - super(parent, invokingState); - } - // @Override - get ruleIndex() { return ODataUriQueryParser.RULE_filterOption; } - // @Override - accept(visitor) { - if (visitor.visitFilterOption) { - return visitor.visitFilterOption(this); - } - else { - return visitor.visitChildren(this); - } - } -} -exports.FilterOptionContext = FilterOptionContext; -class SelectOptionContext extends ParserRuleContext_1.ParserRuleContext { - SELECT() { return this.getToken(ODataUriQueryParser.SELECT, 0); } - ASSIGN() { return this.getToken(ODataUriQueryParser.ASSIGN, 0); } - selectFieldList() { - return this.getRuleContext(0, SelectFieldListContext); - } - constructor(parent, invokingState) { - super(parent, invokingState); - } - // @Override - get ruleIndex() { return ODataUriQueryParser.RULE_selectOption; } - // @Override - accept(visitor) { - if (visitor.visitSelectOption) { - return visitor.visitSelectOption(this); - } - else { - return visitor.visitChildren(this); - } - } -} -exports.SelectOptionContext = SelectOptionContext; -class ExpandOptionContext extends ParserRuleContext_1.ParserRuleContext { - EXPAND() { return this.getToken(ODataUriQueryParser.EXPAND, 0); } - ASSIGN() { return this.getToken(ODataUriQueryParser.ASSIGN, 0); } - expandFieldList() { - return this.getRuleContext(0, ExpandFieldListContext); - } - constructor(parent, invokingState) { - super(parent, invokingState); - } - // @Override - get ruleIndex() { return ODataUriQueryParser.RULE_expandOption; } - // @Override - accept(visitor) { - if (visitor.visitExpandOption) { - return visitor.visitExpandOption(this); - } - else { - return visitor.visitChildren(this); - } - } -} -exports.ExpandOptionContext = ExpandOptionContext; -class OrderByOptionContext extends ParserRuleContext_1.ParserRuleContext { - ORDERBY() { return this.getToken(ODataUriQueryParser.ORDERBY, 0); } - ASSIGN() { return this.getToken(ODataUriQueryParser.ASSIGN, 0); } - orderSpec() { - return this.getRuleContext(0, OrderSpecContext); - } - constructor(parent, invokingState) { - super(parent, invokingState); - } - // @Override - get ruleIndex() { return ODataUriQueryParser.RULE_orderByOption; } - // @Override - accept(visitor) { - if (visitor.visitOrderByOption) { - return visitor.visitOrderByOption(this); - } - else { - return visitor.visitChildren(this); - } - } -} -exports.OrderByOptionContext = OrderByOptionContext; -class TopOptionContext extends ParserRuleContext_1.ParserRuleContext { - TOP() { return this.getToken(ODataUriQueryParser.TOP, 0); } - ASSIGN() { return this.getToken(ODataUriQueryParser.ASSIGN, 0); } - NUMBER() { return this.getToken(ODataUriQueryParser.NUMBER, 0); } - constructor(parent, invokingState) { - super(parent, invokingState); - } - // @Override - get ruleIndex() { return ODataUriQueryParser.RULE_topOption; } - // @Override - accept(visitor) { - if (visitor.visitTopOption) { - return visitor.visitTopOption(this); - } - else { - return visitor.visitChildren(this); - } - } -} -exports.TopOptionContext = TopOptionContext; -class SkipOptionContext extends ParserRuleContext_1.ParserRuleContext { - SKIPKW() { return this.getToken(ODataUriQueryParser.SKIPKW, 0); } - ASSIGN() { return this.getToken(ODataUriQueryParser.ASSIGN, 0); } - NUMBER() { return this.getToken(ODataUriQueryParser.NUMBER, 0); } - constructor(parent, invokingState) { - super(parent, invokingState); - } - // @Override - get ruleIndex() { return ODataUriQueryParser.RULE_skipOption; } - // @Override - accept(visitor) { - if (visitor.visitSkipOption) { - return visitor.visitSkipOption(this); - } - else { - return visitor.visitChildren(this); - } - } -} -exports.SkipOptionContext = SkipOptionContext; -class SelectFieldListContext extends ParserRuleContext_1.ParserRuleContext { - selectField() { - return this.getRuleContext(0, SelectFieldContext); - } - COMMA() { return this.tryGetToken(ODataUriQueryParser.COMMA, 0); } - selectFieldList() { - return this.tryGetRuleContext(0, SelectFieldListContext); - } - constructor(parent, invokingState) { - super(parent, invokingState); - } - // @Override - get ruleIndex() { return ODataUriQueryParser.RULE_selectFieldList; } - // @Override - accept(visitor) { - if (visitor.visitSelectFieldList) { - return visitor.visitSelectFieldList(this); - } - else { - return visitor.visitChildren(this); - } - } -} -exports.SelectFieldListContext = SelectFieldListContext; -class ExpandFieldListContext extends ParserRuleContext_1.ParserRuleContext { - expandField() { - return this.getRuleContext(0, ExpandFieldContext); - } - COMMA() { return this.tryGetToken(ODataUriQueryParser.COMMA, 0); } - expandFieldList() { - return this.tryGetRuleContext(0, ExpandFieldListContext); - } - constructor(parent, invokingState) { - super(parent, invokingState); - } - // @Override - get ruleIndex() { return ODataUriQueryParser.RULE_expandFieldList; } - // @Override - accept(visitor) { - if (visitor.visitExpandFieldList) { - return visitor.visitExpandFieldList(this); - } - else { - return visitor.visitChildren(this); - } - } -} -exports.ExpandFieldListContext = ExpandFieldListContext; -class SelectFieldContext extends ParserRuleContext_1.ParserRuleContext { - identifier() { - return this.getRuleContext(0, IdentifierContext); - } - constructor(parent, invokingState) { - super(parent, invokingState); - } - // @Override - get ruleIndex() { return ODataUriQueryParser.RULE_selectField; } - // @Override - accept(visitor) { - if (visitor.visitSelectField) { - return visitor.visitSelectField(this); - } - else { - return visitor.visitChildren(this); - } - } -} -exports.SelectFieldContext = SelectFieldContext; -class ExpandFieldContext extends ParserRuleContext_1.ParserRuleContext { - identifier() { - return this.getRuleContext(0, IdentifierContext); - } - constructor(parent, invokingState) { - super(parent, invokingState); - } - // @Override - get ruleIndex() { return ODataUriQueryParser.RULE_expandField; } - // @Override - accept(visitor) { - if (visitor.visitExpandField) { - return visitor.visitExpandField(this); - } - else { - return visitor.visitChildren(this); - } - } -} -exports.ExpandFieldContext = ExpandFieldContext; -class OrderSpecContext extends ParserRuleContext_1.ParserRuleContext { - orderField() { - return this.getRuleContext(0, OrderFieldContext); - } - DESC() { return this.tryGetToken(ODataUriQueryParser.DESC, 0); } - constructor(parent, invokingState) { - super(parent, invokingState); - } - // @Override - get ruleIndex() { return ODataUriQueryParser.RULE_orderSpec; } - // @Override - accept(visitor) { - if (visitor.visitOrderSpec) { - return visitor.visitOrderSpec(this); - } - else { - return visitor.visitChildren(this); - } - } -} -exports.OrderSpecContext = OrderSpecContext; -class OrderFieldContext extends ParserRuleContext_1.ParserRuleContext { - identifier() { - return this.getRuleContext(0, IdentifierContext); - } - constructor(parent, invokingState) { - super(parent, invokingState); - } - // @Override - get ruleIndex() { return ODataUriQueryParser.RULE_orderField; } - // @Override - accept(visitor) { - if (visitor.visitOrderField) { - return visitor.visitOrderField(this); - } - else { - return visitor.visitChildren(this); - } - } -} -exports.OrderFieldContext = OrderFieldContext; -class ExpressionContext extends ParserRuleContext_1.ParserRuleContext { - orExpression() { - return this.getRuleContext(0, OrExpressionContext); - } - constructor(parent, invokingState) { - super(parent, invokingState); - } - // @Override - get ruleIndex() { return ODataUriQueryParser.RULE_expression; } - // @Override - accept(visitor) { - if (visitor.visitExpression) { - return visitor.visitExpression(this); - } - else { - return visitor.visitChildren(this); - } - } -} -exports.ExpressionContext = ExpressionContext; -class OrExpressionContext extends ParserRuleContext_1.ParserRuleContext { - andExpression() { - return this.getRuleContext(0, AndExpressionContext); - } - orExpression() { - return this.tryGetRuleContext(0, OrExpressionContext); - } - OR() { return this.tryGetToken(ODataUriQueryParser.OR, 0); } - constructor(parent, invokingState) { - super(parent, invokingState); - } - // @Override - get ruleIndex() { return ODataUriQueryParser.RULE_orExpression; } - // @Override - accept(visitor) { - if (visitor.visitOrExpression) { - return visitor.visitOrExpression(this); - } - else { - return visitor.visitChildren(this); - } - } -} -exports.OrExpressionContext = OrExpressionContext; -class AndExpressionContext extends ParserRuleContext_1.ParserRuleContext { - compExpression() { - return this.getRuleContext(0, CompExpressionContext); - } - andExpression() { - return this.tryGetRuleContext(0, AndExpressionContext); - } - AND() { return this.tryGetToken(ODataUriQueryParser.AND, 0); } - constructor(parent, invokingState) { - super(parent, invokingState); - } - // @Override - get ruleIndex() { return ODataUriQueryParser.RULE_andExpression; } - // @Override - accept(visitor) { - if (visitor.visitAndExpression) { - return visitor.visitAndExpression(this); - } - else { - return visitor.visitChildren(this); - } - } -} -exports.AndExpressionContext = AndExpressionContext; -class CompExpressionContext extends ParserRuleContext_1.ParserRuleContext { - basicExpression() { - return this.getRuleContext(0, BasicExpressionContext); - } - compExpression() { - return this.tryGetRuleContext(0, CompExpressionContext); - } - compOperator() { - return this.tryGetRuleContext(0, CompOperatorContext); - } - constructor(parent, invokingState) { - super(parent, invokingState); - } - // @Override - get ruleIndex() { return ODataUriQueryParser.RULE_compExpression; } - // @Override - accept(visitor) { - if (visitor.visitCompExpression) { - return visitor.visitCompExpression(this); - } - else { - return visitor.visitChildren(this); - } - } -} -exports.CompExpressionContext = CompExpressionContext; -class BasicExpressionContext extends ParserRuleContext_1.ParserRuleContext { - NUMBER() { return this.tryGetToken(ODataUriQueryParser.NUMBER, 0); } - STRING() { return this.tryGetToken(ODataUriQueryParser.STRING, 0); } - BOOLEAN() { return this.tryGetToken(ODataUriQueryParser.BOOLEAN, 0); } - identifier() { - return this.tryGetRuleContext(0, IdentifierContext); - } - parenExpression() { - return this.tryGetRuleContext(0, ParenExpressionContext); - } - constructor(parent, invokingState) { - super(parent, invokingState); - } - // @Override - get ruleIndex() { return ODataUriQueryParser.RULE_basicExpression; } - // @Override - accept(visitor) { - if (visitor.visitBasicExpression) { - return visitor.visitBasicExpression(this); - } - else { - return visitor.visitChildren(this); - } - } -} -exports.BasicExpressionContext = BasicExpressionContext; -class ParenExpressionContext extends ParserRuleContext_1.ParserRuleContext { - LPAREN() { return this.getToken(ODataUriQueryParser.LPAREN, 0); } - expression() { - return this.getRuleContext(0, ExpressionContext); - } - RPAREN() { return this.getToken(ODataUriQueryParser.RPAREN, 0); } - constructor(parent, invokingState) { - super(parent, invokingState); - } - // @Override - get ruleIndex() { return ODataUriQueryParser.RULE_parenExpression; } - // @Override - accept(visitor) { - if (visitor.visitParenExpression) { - return visitor.visitParenExpression(this); - } - else { - return visitor.visitChildren(this); - } - } -} -exports.ParenExpressionContext = ParenExpressionContext; -class CompOperatorContext extends ParserRuleContext_1.ParserRuleContext { - EQ() { return this.tryGetToken(ODataUriQueryParser.EQ, 0); } - NEQ() { return this.tryGetToken(ODataUriQueryParser.NEQ, 0); } - GTE() { return this.tryGetToken(ODataUriQueryParser.GTE, 0); } - GT() { return this.tryGetToken(ODataUriQueryParser.GT, 0); } - LTE() { return this.tryGetToken(ODataUriQueryParser.LTE, 0); } - LT() { return this.tryGetToken(ODataUriQueryParser.LT, 0); } - constructor(parent, invokingState) { - super(parent, invokingState); - } - // @Override - get ruleIndex() { return ODataUriQueryParser.RULE_compOperator; } - // @Override - accept(visitor) { - if (visitor.visitCompOperator) { - return visitor.visitCompOperator(this); - } - else { - return visitor.visitChildren(this); - } - } -} -exports.CompOperatorContext = CompOperatorContext; -class IdentifierContext extends ParserRuleContext_1.ParserRuleContext { - ID() { return this.getToken(ODataUriQueryParser.ID, 0); } - constructor(parent, invokingState) { - super(parent, invokingState); - } - // @Override - get ruleIndex() { return ODataUriQueryParser.RULE_identifier; } - // @Override - accept(visitor) { - if (visitor.visitIdentifier) { - return visitor.visitIdentifier(this); - } - else { - return visitor.visitChildren(this); - } - } -} -exports.IdentifierContext = IdentifierContext; diff --git a/tools/odataUri/src/parsers/ODataUriQueryParser.ts b/tools/odataUri/src/parsers/ODataUriQueryParser.ts index 081928ec..de7977ea 100644 --- a/tools/odataUri/src/parsers/ODataUriQueryParser.ts +++ b/tools/odataUri/src/parsers/ODataUriQueryParser.ts @@ -1,4 +1,4 @@ -// Generated from src/js/odata-uri/parsers/ODataUriQuery.g4 by ANTLR 4.9.0-SNAPSHOT +// Generated from src/parsers/ODataUriQuery.g4 by ANTLR 4.9.0-SNAPSHOT import { ATN } from "antlr4ts/atn/ATN"; @@ -86,8 +86,8 @@ export class ODataUriQueryParser extends Parser { private static readonly _LITERAL_NAMES: Array = [ undefined, "'$filter'", "'$select'", "'$expand'", "'$orderby'", "'$top'", - "'$skip'", "'desc'", "'or'", "'and'", "'eq'", "'neq'", "'gt'", "'gte'", - "'lt'", "'lte'", "'&'", "'='", "'('", "')'", "','", + "'$skip'", "'desc'", "'or'", "'and'", "'eq'", "'ne'", "'gt'", "'ge'", + "'lt'", "'le'", "'&'", "'='", "'('", "')'", "','", ]; private static readonly _SYMBOLIC_NAMES: Array = [ undefined, "FILTER", "SELECT", "EXPAND", "ORDERBY", "TOP", "SKIPKW", "DESC", diff --git a/tools/odataUri/src/parsers/ODataUriQueryVisitor.js b/tools/odataUri/src/parsers/ODataUriQueryVisitor.js deleted file mode 100644 index 466cebe1..00000000 --- a/tools/odataUri/src/parsers/ODataUriQueryVisitor.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -// Generated from src/js/odata-uri/parsers/ODataUriQuery.g4 by ANTLR 4.9.0-SNAPSHOT -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/tools/odataUri/src/parsers/ODataUriQueryVisitor.ts b/tools/odataUri/src/parsers/ODataUriQueryVisitor.ts index 016d6c8d..f5b65319 100644 --- a/tools/odataUri/src/parsers/ODataUriQueryVisitor.ts +++ b/tools/odataUri/src/parsers/ODataUriQueryVisitor.ts @@ -1,4 +1,4 @@ -// Generated from src/js/odata-uri/parsers/ODataUriQuery.g4 by ANTLR 4.9.0-SNAPSHOT +// Generated from src/parsers/ODataUriQuery.g4 by ANTLR 4.9.0-SNAPSHOT import { ParseTreeVisitor } from "antlr4ts/tree/ParseTreeVisitor";