python-fx 0.3.1__py3-none-any.whl → 0.3.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pyfx/__version__.py +1 -1
- pyfx/model/autocomplete/autocomplete_listener.py +3 -1
- pyfx/model/common/jsonpath/JSONPath.interp +1 -1
- pyfx/model/common/jsonpath/JSONPathLexer.interp +1 -1
- pyfx/model/common/jsonpath/JSONPathLexer.py +57 -75
- pyfx/model/common/jsonpath/JSONPathListener.py +8 -13
- pyfx/model/common/jsonpath/JSONPathParser.py +146 -225
- pyfx/view/common/frame.py +3 -2
- pyfx/view/common/selectable_text.py +1 -1
- {python_fx-0.3.1.dist-info → python_fx-0.3.2.dist-info}/METADATA +24 -19
- {python_fx-0.3.1.dist-info → python_fx-0.3.2.dist-info}/RECORD +15 -15
- {python_fx-0.3.1.dist-info → python_fx-0.3.2.dist-info}/WHEEL +1 -1
- {python_fx-0.3.1.dist-info → python_fx-0.3.2.dist-info}/LICENSE.txt +0 -0
- {python_fx-0.3.1.dist-info → python_fx-0.3.2.dist-info}/entry_points.txt +0 -0
- {python_fx-0.3.1.dist-info → python_fx-0.3.2.dist-info}/top_level.txt +0 -0
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
# Generated from JSONPath.g4 by ANTLR 4.
|
|
1
|
+
# Generated from JSONPath.g4 by ANTLR 4.13.2
|
|
2
2
|
# encoding: utf-8
|
|
3
3
|
from antlr4 import *
|
|
4
4
|
from io import StringIO
|
|
5
5
|
import sys
|
|
6
|
-
|
|
7
6
|
if sys.version_info[1] > 5:
|
|
8
7
|
from typing import TextIO
|
|
9
8
|
else:
|
|
@@ -11,68 +10,64 @@ else:
|
|
|
11
10
|
|
|
12
11
|
|
|
13
12
|
def serializedATN():
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
return buf.getvalue()
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
class JSONPathParser(Parser):
|
|
13
|
+
return [
|
|
14
|
+
4, 1, 20, 159, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7,
|
|
15
|
+
6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13,
|
|
16
|
+
2, 14, 7, 14, 2, 15, 7, 15, 1, 0, 1, 0, 5, 0, 35, 8, 0, 10, 0, 12, 0, 38, 9, 0, 1, 0, 1, 0,
|
|
17
|
+
1, 1, 1, 1, 3, 1, 44, 8, 1, 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 50, 8, 2, 1, 3, 1, 3, 1, 3, 1, 3, 3,
|
|
18
|
+
3, 56, 8, 3, 1, 3, 1, 3, 3, 3, 60, 8, 3, 1, 3, 1, 3, 3, 3, 64, 8, 3, 1, 3, 1, 3, 3, 3, 68, 8,
|
|
19
|
+
3, 1, 3, 3, 3, 71, 8, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4,
|
|
20
|
+
1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 3, 4, 94, 8, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1,
|
|
21
|
+
5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 4, 8, 113, 8, 8, 11,
|
|
22
|
+
8, 12, 8, 114, 1, 8, 1, 8, 1, 9, 1, 9, 3, 9, 121, 8, 9, 1, 9, 1, 9, 3, 9, 125, 8, 9, 1, 9, 1,
|
|
23
|
+
9, 3, 9, 129, 8, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 3, 10, 136, 8, 10, 1, 10, 1, 10, 3, 10,
|
|
24
|
+
140, 8, 10, 1, 10, 3, 10, 143, 8, 10, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1,
|
|
25
|
+
13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 0, 0, 16, 0, 2, 4, 6, 8, 10, 12, 14,
|
|
26
|
+
16, 18, 20, 22, 24, 26, 28, 30, 0, 2, 1, 0, 6, 8, 1, 0, 17, 18, 164, 0, 32, 1, 0, 0, 0, 2,
|
|
27
|
+
43, 1, 0, 0, 0, 4, 49, 1, 0, 0, 0, 6, 70, 1, 0, 0, 0, 8, 93, 1, 0, 0, 0, 10, 95, 1, 0, 0, 0,
|
|
28
|
+
12, 100, 1, 0, 0, 0, 14, 105, 1, 0, 0, 0, 16, 108, 1, 0, 0, 0, 18, 118, 1, 0, 0, 0, 20, 142,
|
|
29
|
+
1, 0, 0, 0, 22, 144, 1, 0, 0, 0, 24, 146, 1, 0, 0, 0, 26, 150, 1, 0, 0, 0, 28, 154, 1, 0,
|
|
30
|
+
0, 0, 30, 156, 1, 0, 0, 0, 32, 36, 5, 13, 0, 0, 33, 35, 3, 2, 1, 0, 34, 33, 1, 0, 0, 0, 35,
|
|
31
|
+
38, 1, 0, 0, 0, 36, 34, 1, 0, 0, 0, 36, 37, 1, 0, 0, 0, 37, 39, 1, 0, 0, 0, 38, 36, 1, 0, 0,
|
|
32
|
+
0, 39, 40, 5, 0, 0, 1, 40, 1, 1, 0, 0, 0, 41, 44, 3, 6, 3, 0, 42, 44, 3, 4, 2, 0, 43, 41, 1,
|
|
33
|
+
0, 0, 0, 43, 42, 1, 0, 0, 0, 44, 3, 1, 0, 0, 0, 45, 46, 5, 16, 0, 0, 46, 50, 3, 22, 11, 0,
|
|
34
|
+
47, 48, 5, 16, 0, 0, 48, 50, 3, 24, 12, 0, 49, 45, 1, 0, 0, 0, 49, 47, 1, 0, 0, 0, 50, 5,
|
|
35
|
+
1, 0, 0, 0, 51, 71, 3, 20, 10, 0, 52, 53, 5, 15, 0, 0, 53, 71, 3, 28, 14, 0, 54, 56, 5, 15,
|
|
36
|
+
0, 0, 55, 54, 1, 0, 0, 0, 55, 56, 1, 0, 0, 0, 56, 57, 1, 0, 0, 0, 57, 71, 3, 30, 15, 0, 58,
|
|
37
|
+
60, 5, 15, 0, 0, 59, 58, 1, 0, 0, 0, 59, 60, 1, 0, 0, 0, 60, 61, 1, 0, 0, 0, 61, 71, 3, 8,
|
|
38
|
+
4, 0, 62, 64, 5, 15, 0, 0, 63, 62, 1, 0, 0, 0, 63, 64, 1, 0, 0, 0, 64, 65, 1, 0, 0, 0, 65,
|
|
39
|
+
71, 3, 18, 9, 0, 66, 68, 5, 15, 0, 0, 67, 66, 1, 0, 0, 0, 67, 68, 1, 0, 0, 0, 68, 69, 1, 0,
|
|
40
|
+
0, 0, 69, 71, 3, 16, 8, 0, 70, 51, 1, 0, 0, 0, 70, 52, 1, 0, 0, 0, 70, 55, 1, 0, 0, 0, 70,
|
|
41
|
+
59, 1, 0, 0, 0, 70, 63, 1, 0, 0, 0, 70, 67, 1, 0, 0, 0, 71, 7, 1, 0, 0, 0, 72, 73, 5, 1, 0,
|
|
42
|
+
0, 73, 74, 5, 2, 0, 0, 74, 75, 5, 3, 0, 0, 75, 76, 3, 10, 5, 0, 76, 77, 5, 4, 0, 0, 77, 78,
|
|
43
|
+
5, 5, 0, 0, 78, 94, 1, 0, 0, 0, 79, 80, 5, 1, 0, 0, 80, 81, 5, 2, 0, 0, 81, 82, 5, 3, 0, 0,
|
|
44
|
+
82, 83, 3, 12, 6, 0, 83, 84, 5, 4, 0, 0, 84, 85, 5, 5, 0, 0, 85, 94, 1, 0, 0, 0, 86, 87, 5,
|
|
45
|
+
1, 0, 0, 87, 88, 5, 2, 0, 0, 88, 89, 5, 3, 0, 0, 89, 90, 3, 14, 7, 0, 90, 91, 5, 4, 0, 0, 91,
|
|
46
|
+
92, 5, 5, 0, 0, 92, 94, 1, 0, 0, 0, 93, 72, 1, 0, 0, 0, 93, 79, 1, 0, 0, 0, 93, 86, 1, 0, 0,
|
|
47
|
+
0, 94, 9, 1, 0, 0, 0, 95, 96, 5, 14, 0, 0, 96, 97, 3, 20, 10, 0, 97, 98, 7, 0, 0, 0, 98, 99,
|
|
48
|
+
5, 19, 0, 0, 99, 11, 1, 0, 0, 0, 100, 101, 5, 14, 0, 0, 101, 102, 3, 20, 10, 0, 102, 103,
|
|
49
|
+
5, 8, 0, 0, 103, 104, 5, 18, 0, 0, 104, 13, 1, 0, 0, 0, 105, 106, 5, 14, 0, 0, 106, 107,
|
|
50
|
+
3, 20, 10, 0, 107, 15, 1, 0, 0, 0, 108, 109, 5, 1, 0, 0, 109, 112, 7, 1, 0, 0, 110, 111,
|
|
51
|
+
5, 9, 0, 0, 111, 113, 7, 1, 0, 0, 112, 110, 1, 0, 0, 0, 113, 114, 1, 0, 0, 0, 114, 112,
|
|
52
|
+
1, 0, 0, 0, 114, 115, 1, 0, 0, 0, 115, 116, 1, 0, 0, 0, 116, 117, 5, 5, 0, 0, 117, 17, 1,
|
|
53
|
+
0, 0, 0, 118, 120, 5, 1, 0, 0, 119, 121, 5, 19, 0, 0, 120, 119, 1, 0, 0, 0, 120, 121, 1,
|
|
54
|
+
0, 0, 0, 121, 122, 1, 0, 0, 0, 122, 124, 5, 10, 0, 0, 123, 125, 5, 19, 0, 0, 124, 123,
|
|
55
|
+
1, 0, 0, 0, 124, 125, 1, 0, 0, 0, 125, 128, 1, 0, 0, 0, 126, 127, 5, 10, 0, 0, 127, 129,
|
|
56
|
+
5, 19, 0, 0, 128, 126, 1, 0, 0, 0, 128, 129, 1, 0, 0, 0, 129, 130, 1, 0, 0, 0, 130, 131,
|
|
57
|
+
5, 5, 0, 0, 131, 19, 1, 0, 0, 0, 132, 133, 5, 15, 0, 0, 133, 143, 3, 22, 11, 0, 134, 136,
|
|
58
|
+
5, 15, 0, 0, 135, 134, 1, 0, 0, 0, 135, 136, 1, 0, 0, 0, 136, 137, 1, 0, 0, 0, 137, 143,
|
|
59
|
+
3, 24, 12, 0, 138, 140, 5, 15, 0, 0, 139, 138, 1, 0, 0, 0, 139, 140, 1, 0, 0, 0, 140, 141,
|
|
60
|
+
1, 0, 0, 0, 141, 143, 3, 26, 13, 0, 142, 132, 1, 0, 0, 0, 142, 135, 1, 0, 0, 0, 142, 139,
|
|
61
|
+
1, 0, 0, 0, 143, 21, 1, 0, 0, 0, 144, 145, 5, 17, 0, 0, 145, 23, 1, 0, 0, 0, 146, 147, 5,
|
|
62
|
+
1, 0, 0, 147, 148, 7, 1, 0, 0, 148, 149, 5, 5, 0, 0, 149, 25, 1, 0, 0, 0, 150, 151, 5, 1,
|
|
63
|
+
0, 0, 151, 152, 5, 19, 0, 0, 152, 153, 5, 5, 0, 0, 153, 27, 1, 0, 0, 0, 154, 155, 5, 11,
|
|
64
|
+
0, 0, 155, 29, 1, 0, 0, 0, 156, 157, 5, 12, 0, 0, 157, 31, 1, 0, 0, 0, 16, 36, 43, 49, 55,
|
|
65
|
+
59, 63, 67, 70, 93, 114, 120, 124, 128, 135, 139, 142
|
|
66
|
+
]
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
class JSONPathParser (Parser):
|
|
70
|
+
|
|
76
71
|
grammarFileName = "JSONPath.g4"
|
|
77
72
|
|
|
78
73
|
atn = ATNDeserializer().deserialize(serializedATN())
|
|
@@ -85,28 +80,11 @@ class JSONPathParser(Parser):
|
|
|
85
80
|
"'<'", "'=='", "','", "':'", "'*'", "'[*]'", "'$'",
|
|
86
81
|
"'@'", "'.'", "'..'"]
|
|
87
82
|
|
|
88
|
-
symbolicNames = [
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
"<INVALID>",
|
|
94
|
-
"<INVALID>",
|
|
95
|
-
"<INVALID>",
|
|
96
|
-
"<INVALID>",
|
|
97
|
-
"<INVALID>",
|
|
98
|
-
"<INVALID>",
|
|
99
|
-
"<INVALID>",
|
|
100
|
-
"<INVALID>",
|
|
101
|
-
"<INVALID>",
|
|
102
|
-
"ROOT",
|
|
103
|
-
"CURRENT",
|
|
104
|
-
"SINGLE_DOT",
|
|
105
|
-
"DOUBLE_DOT",
|
|
106
|
-
"LETTER",
|
|
107
|
-
"STRING",
|
|
108
|
-
"INT",
|
|
109
|
-
"WS"]
|
|
83
|
+
symbolicNames = ["<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>",
|
|
84
|
+
"<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>",
|
|
85
|
+
"<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>",
|
|
86
|
+
"<INVALID>", "ROOT", "CURRENT", "SINGLE_DOT", "DOUBLE_DOT",
|
|
87
|
+
"LETTER", "STRING", "INT", "WS"]
|
|
110
88
|
|
|
111
89
|
RULE_jsonpath = 0
|
|
112
90
|
RULE_expression = 1
|
|
@@ -125,23 +103,10 @@ class JSONPathParser(Parser):
|
|
|
125
103
|
RULE_wildcard = 14
|
|
126
104
|
RULE_bracketWildcard = 15
|
|
127
105
|
|
|
128
|
-
ruleNames = [
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
"singleDotExpression",
|
|
133
|
-
"filters",
|
|
134
|
-
"numericFilter",
|
|
135
|
-
"stringFilter",
|
|
136
|
-
"booleanFilter",
|
|
137
|
-
"union",
|
|
138
|
-
"arraySlice",
|
|
139
|
-
"fieldAccessor",
|
|
140
|
-
"field",
|
|
141
|
-
"bracketField",
|
|
142
|
-
"arrayIndex",
|
|
143
|
-
"wildcard",
|
|
144
|
-
"bracketWildcard"]
|
|
106
|
+
ruleNames = ["jsonpath", "expression", "doubleDotExpression", "singleDotExpression",
|
|
107
|
+
"filters", "numericFilter", "stringFilter", "booleanFilter",
|
|
108
|
+
"union", "arraySlice", "fieldAccessor", "field", "bracketField",
|
|
109
|
+
"arrayIndex", "wildcard", "bracketWildcard"]
|
|
145
110
|
|
|
146
111
|
EOF = Token.EOF
|
|
147
112
|
T__0 = 1
|
|
@@ -167,15 +132,14 @@ class JSONPathParser(Parser):
|
|
|
167
132
|
|
|
168
133
|
def __init__(self, input: TokenStream, output: TextIO = sys.stdout):
|
|
169
134
|
super().__init__(input, output)
|
|
170
|
-
self.checkVersion("4.
|
|
171
|
-
self._interp = ParserATNSimulator(
|
|
172
|
-
self, self.atn, self.decisionsToDFA, self.sharedContextCache)
|
|
135
|
+
self.checkVersion("4.13.2")
|
|
136
|
+
self._interp = ParserATNSimulator(self, self.atn, self.decisionsToDFA, self.sharedContextCache)
|
|
173
137
|
self._predicates = None
|
|
174
138
|
|
|
175
139
|
class JsonpathContext(ParserRuleContext):
|
|
140
|
+
__slots__ = 'parser'
|
|
176
141
|
|
|
177
|
-
def __init__(self, parser, parent: ParserRuleContext = None,
|
|
178
|
-
invokingState: int = -1):
|
|
142
|
+
def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
|
|
179
143
|
super().__init__(parent, invokingState)
|
|
180
144
|
self.parser = parser
|
|
181
145
|
|
|
@@ -187,11 +151,9 @@ class JSONPathParser(Parser):
|
|
|
187
151
|
|
|
188
152
|
def expression(self, i: int = None):
|
|
189
153
|
if i is None:
|
|
190
|
-
return self.getTypedRuleContexts(
|
|
191
|
-
JSONPathParser.ExpressionContext)
|
|
154
|
+
return self.getTypedRuleContexts(JSONPathParser.ExpressionContext)
|
|
192
155
|
else:
|
|
193
|
-
return self.getTypedRuleContext(
|
|
194
|
-
JSONPathParser.ExpressionContext, i)
|
|
156
|
+
return self.getTypedRuleContext(JSONPathParser.ExpressionContext, i)
|
|
195
157
|
|
|
196
158
|
def getRuleIndex(self):
|
|
197
159
|
return JSONPathParser.RULE_jsonpath
|
|
@@ -216,14 +178,7 @@ class JSONPathParser(Parser):
|
|
|
216
178
|
self.state = 36
|
|
217
179
|
self._errHandler.sync(self)
|
|
218
180
|
_la = self._input.LA(1)
|
|
219
|
-
while (
|
|
220
|
-
(
|
|
221
|
-
(_la) & ~0x3f) == 0 and (
|
|
222
|
-
(1 << _la) & (
|
|
223
|
-
(1 << JSONPathParser.T__0) | (
|
|
224
|
-
1 << JSONPathParser.T__11) | (
|
|
225
|
-
1 << JSONPathParser.SINGLE_DOT) | (
|
|
226
|
-
1 << JSONPathParser.DOUBLE_DOT))) != 0):
|
|
181
|
+
while (((_la) & ~0x3f) == 0 and ((1 << _la) & 102402) != 0):
|
|
227
182
|
self.state = 33
|
|
228
183
|
self.expression()
|
|
229
184
|
self.state = 38
|
|
@@ -241,19 +196,17 @@ class JSONPathParser(Parser):
|
|
|
241
196
|
return localctx
|
|
242
197
|
|
|
243
198
|
class ExpressionContext(ParserRuleContext):
|
|
199
|
+
__slots__ = 'parser'
|
|
244
200
|
|
|
245
|
-
def __init__(self, parser, parent: ParserRuleContext = None,
|
|
246
|
-
invokingState: int = -1):
|
|
201
|
+
def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
|
|
247
202
|
super().__init__(parent, invokingState)
|
|
248
203
|
self.parser = parser
|
|
249
204
|
|
|
250
205
|
def singleDotExpression(self):
|
|
251
|
-
return self.getTypedRuleContext(
|
|
252
|
-
JSONPathParser.SingleDotExpressionContext, 0)
|
|
206
|
+
return self.getTypedRuleContext(JSONPathParser.SingleDotExpressionContext, 0)
|
|
253
207
|
|
|
254
208
|
def doubleDotExpression(self):
|
|
255
|
-
return self.getTypedRuleContext(
|
|
256
|
-
JSONPathParser.DoubleDotExpressionContext, 0)
|
|
209
|
+
return self.getTypedRuleContext(JSONPathParser.DoubleDotExpressionContext, 0)
|
|
257
210
|
|
|
258
211
|
def getRuleIndex(self):
|
|
259
212
|
return JSONPathParser.RULE_expression
|
|
@@ -268,20 +221,18 @@ class JSONPathParser(Parser):
|
|
|
268
221
|
|
|
269
222
|
def expression(self):
|
|
270
223
|
|
|
271
|
-
localctx = JSONPathParser.ExpressionContext(
|
|
272
|
-
self, self._ctx, self.state)
|
|
224
|
+
localctx = JSONPathParser.ExpressionContext(self, self._ctx, self.state)
|
|
273
225
|
self.enterRule(localctx, 2, self.RULE_expression)
|
|
274
226
|
try:
|
|
275
227
|
self.state = 43
|
|
276
228
|
self._errHandler.sync(self)
|
|
277
229
|
token = self._input.LA(1)
|
|
278
|
-
if token in [
|
|
279
|
-
JSONPathParser.SINGLE_DOT]:
|
|
230
|
+
if token in [1, 12, 15]:
|
|
280
231
|
self.enterOuterAlt(localctx, 1)
|
|
281
232
|
self.state = 41
|
|
282
233
|
self.singleDotExpression()
|
|
283
234
|
pass
|
|
284
|
-
elif token in [
|
|
235
|
+
elif token in [16]:
|
|
285
236
|
self.enterOuterAlt(localctx, 2)
|
|
286
237
|
self.state = 42
|
|
287
238
|
self.doubleDotExpression()
|
|
@@ -298,9 +249,9 @@ class JSONPathParser(Parser):
|
|
|
298
249
|
return localctx
|
|
299
250
|
|
|
300
251
|
class DoubleDotExpressionContext(ParserRuleContext):
|
|
252
|
+
__slots__ = 'parser'
|
|
301
253
|
|
|
302
|
-
def __init__(self, parser, parent: ParserRuleContext = None,
|
|
303
|
-
invokingState: int = -1):
|
|
254
|
+
def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
|
|
304
255
|
super().__init__(parent, invokingState)
|
|
305
256
|
self.parser = parser
|
|
306
257
|
|
|
@@ -311,8 +262,7 @@ class JSONPathParser(Parser):
|
|
|
311
262
|
return self.getTypedRuleContext(JSONPathParser.FieldContext, 0)
|
|
312
263
|
|
|
313
264
|
def bracketField(self):
|
|
314
|
-
return self.getTypedRuleContext(
|
|
315
|
-
JSONPathParser.BracketFieldContext, 0)
|
|
265
|
+
return self.getTypedRuleContext(JSONPathParser.BracketFieldContext, 0)
|
|
316
266
|
|
|
317
267
|
def getRuleIndex(self):
|
|
318
268
|
return JSONPathParser.RULE_doubleDotExpression
|
|
@@ -327,8 +277,7 @@ class JSONPathParser(Parser):
|
|
|
327
277
|
|
|
328
278
|
def doubleDotExpression(self):
|
|
329
279
|
|
|
330
|
-
localctx = JSONPathParser.DoubleDotExpressionContext(
|
|
331
|
-
self, self._ctx, self.state)
|
|
280
|
+
localctx = JSONPathParser.DoubleDotExpressionContext(self, self._ctx, self.state)
|
|
332
281
|
self.enterRule(localctx, 4, self.RULE_doubleDotExpression)
|
|
333
282
|
try:
|
|
334
283
|
self.state = 49
|
|
@@ -359,15 +308,14 @@ class JSONPathParser(Parser):
|
|
|
359
308
|
return localctx
|
|
360
309
|
|
|
361
310
|
class SingleDotExpressionContext(ParserRuleContext):
|
|
311
|
+
__slots__ = 'parser'
|
|
362
312
|
|
|
363
|
-
def __init__(self, parser, parent: ParserRuleContext = None,
|
|
364
|
-
invokingState: int = -1):
|
|
313
|
+
def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
|
|
365
314
|
super().__init__(parent, invokingState)
|
|
366
315
|
self.parser = parser
|
|
367
316
|
|
|
368
317
|
def fieldAccessor(self):
|
|
369
|
-
return self.getTypedRuleContext(
|
|
370
|
-
JSONPathParser.FieldAccessorContext, 0)
|
|
318
|
+
return self.getTypedRuleContext(JSONPathParser.FieldAccessorContext, 0)
|
|
371
319
|
|
|
372
320
|
def SINGLE_DOT(self):
|
|
373
321
|
return self.getToken(JSONPathParser.SINGLE_DOT, 0)
|
|
@@ -376,15 +324,13 @@ class JSONPathParser(Parser):
|
|
|
376
324
|
return self.getTypedRuleContext(JSONPathParser.WildcardContext, 0)
|
|
377
325
|
|
|
378
326
|
def bracketWildcard(self):
|
|
379
|
-
return self.getTypedRuleContext(
|
|
380
|
-
JSONPathParser.BracketWildcardContext, 0)
|
|
327
|
+
return self.getTypedRuleContext(JSONPathParser.BracketWildcardContext, 0)
|
|
381
328
|
|
|
382
329
|
def filters(self):
|
|
383
330
|
return self.getTypedRuleContext(JSONPathParser.FiltersContext, 0)
|
|
384
331
|
|
|
385
332
|
def arraySlice(self):
|
|
386
|
-
return self.getTypedRuleContext(
|
|
387
|
-
JSONPathParser.ArraySliceContext, 0)
|
|
333
|
+
return self.getTypedRuleContext(JSONPathParser.ArraySliceContext, 0)
|
|
388
334
|
|
|
389
335
|
def union(self):
|
|
390
336
|
return self.getTypedRuleContext(JSONPathParser.UnionContext, 0)
|
|
@@ -402,8 +348,7 @@ class JSONPathParser(Parser):
|
|
|
402
348
|
|
|
403
349
|
def singleDotExpression(self):
|
|
404
350
|
|
|
405
|
-
localctx = JSONPathParser.SingleDotExpressionContext(
|
|
406
|
-
self, self._ctx, self.state)
|
|
351
|
+
localctx = JSONPathParser.SingleDotExpressionContext(self, self._ctx, self.state)
|
|
407
352
|
self.enterRule(localctx, 6, self.RULE_singleDotExpression)
|
|
408
353
|
self._la = 0 # Token type
|
|
409
354
|
try:
|
|
@@ -429,7 +374,7 @@ class JSONPathParser(Parser):
|
|
|
429
374
|
self.state = 55
|
|
430
375
|
self._errHandler.sync(self)
|
|
431
376
|
_la = self._input.LA(1)
|
|
432
|
-
if _la ==
|
|
377
|
+
if _la == 15:
|
|
433
378
|
self.state = 54
|
|
434
379
|
self.match(JSONPathParser.SINGLE_DOT)
|
|
435
380
|
|
|
@@ -442,7 +387,7 @@ class JSONPathParser(Parser):
|
|
|
442
387
|
self.state = 59
|
|
443
388
|
self._errHandler.sync(self)
|
|
444
389
|
_la = self._input.LA(1)
|
|
445
|
-
if _la ==
|
|
390
|
+
if _la == 15:
|
|
446
391
|
self.state = 58
|
|
447
392
|
self.match(JSONPathParser.SINGLE_DOT)
|
|
448
393
|
|
|
@@ -455,7 +400,7 @@ class JSONPathParser(Parser):
|
|
|
455
400
|
self.state = 63
|
|
456
401
|
self._errHandler.sync(self)
|
|
457
402
|
_la = self._input.LA(1)
|
|
458
|
-
if _la ==
|
|
403
|
+
if _la == 15:
|
|
459
404
|
self.state = 62
|
|
460
405
|
self.match(JSONPathParser.SINGLE_DOT)
|
|
461
406
|
|
|
@@ -468,7 +413,7 @@ class JSONPathParser(Parser):
|
|
|
468
413
|
self.state = 67
|
|
469
414
|
self._errHandler.sync(self)
|
|
470
415
|
_la = self._input.LA(1)
|
|
471
|
-
if _la ==
|
|
416
|
+
if _la == 15:
|
|
472
417
|
self.state = 66
|
|
473
418
|
self.match(JSONPathParser.SINGLE_DOT)
|
|
474
419
|
|
|
@@ -485,23 +430,20 @@ class JSONPathParser(Parser):
|
|
|
485
430
|
return localctx
|
|
486
431
|
|
|
487
432
|
class FiltersContext(ParserRuleContext):
|
|
433
|
+
__slots__ = 'parser'
|
|
488
434
|
|
|
489
|
-
def __init__(self, parser, parent: ParserRuleContext = None,
|
|
490
|
-
invokingState: int = -1):
|
|
435
|
+
def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
|
|
491
436
|
super().__init__(parent, invokingState)
|
|
492
437
|
self.parser = parser
|
|
493
438
|
|
|
494
439
|
def numericFilter(self):
|
|
495
|
-
return self.getTypedRuleContext(
|
|
496
|
-
JSONPathParser.NumericFilterContext, 0)
|
|
440
|
+
return self.getTypedRuleContext(JSONPathParser.NumericFilterContext, 0)
|
|
497
441
|
|
|
498
442
|
def stringFilter(self):
|
|
499
|
-
return self.getTypedRuleContext(
|
|
500
|
-
JSONPathParser.StringFilterContext, 0)
|
|
443
|
+
return self.getTypedRuleContext(JSONPathParser.StringFilterContext, 0)
|
|
501
444
|
|
|
502
445
|
def booleanFilter(self):
|
|
503
|
-
return self.getTypedRuleContext(
|
|
504
|
-
JSONPathParser.BooleanFilterContext, 0)
|
|
446
|
+
return self.getTypedRuleContext(JSONPathParser.BooleanFilterContext, 0)
|
|
505
447
|
|
|
506
448
|
def getRuleIndex(self):
|
|
507
449
|
return JSONPathParser.RULE_filters
|
|
@@ -579,9 +521,9 @@ class JSONPathParser(Parser):
|
|
|
579
521
|
return localctx
|
|
580
522
|
|
|
581
523
|
class NumericFilterContext(ParserRuleContext):
|
|
524
|
+
__slots__ = 'parser'
|
|
582
525
|
|
|
583
|
-
def __init__(self, parser, parent: ParserRuleContext = None,
|
|
584
|
-
invokingState: int = -1):
|
|
526
|
+
def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
|
|
585
527
|
super().__init__(parent, invokingState)
|
|
586
528
|
self.parser = parser
|
|
587
529
|
|
|
@@ -589,8 +531,7 @@ class JSONPathParser(Parser):
|
|
|
589
531
|
return self.getToken(JSONPathParser.CURRENT, 0)
|
|
590
532
|
|
|
591
533
|
def fieldAccessor(self):
|
|
592
|
-
return self.getTypedRuleContext(
|
|
593
|
-
JSONPathParser.FieldAccessorContext, 0)
|
|
534
|
+
return self.getTypedRuleContext(JSONPathParser.FieldAccessorContext, 0)
|
|
594
535
|
|
|
595
536
|
def INT(self):
|
|
596
537
|
return self.getToken(JSONPathParser.INT, 0)
|
|
@@ -608,8 +549,7 @@ class JSONPathParser(Parser):
|
|
|
608
549
|
|
|
609
550
|
def numericFilter(self):
|
|
610
551
|
|
|
611
|
-
localctx = JSONPathParser.NumericFilterContext(
|
|
612
|
-
self, self._ctx, self.state)
|
|
552
|
+
localctx = JSONPathParser.NumericFilterContext(self, self._ctx, self.state)
|
|
613
553
|
self.enterRule(localctx, 10, self.RULE_numericFilter)
|
|
614
554
|
self._la = 0 # Token type
|
|
615
555
|
try:
|
|
@@ -620,12 +560,7 @@ class JSONPathParser(Parser):
|
|
|
620
560
|
self.fieldAccessor()
|
|
621
561
|
self.state = 97
|
|
622
562
|
_la = self._input.LA(1)
|
|
623
|
-
if not (
|
|
624
|
-
(((_la) & ~0x3f) == 0 and (
|
|
625
|
-
(1 << _la) & (
|
|
626
|
-
(1 << JSONPathParser.T__5) | (
|
|
627
|
-
1 << JSONPathParser.T__6) | (
|
|
628
|
-
1 << JSONPathParser.T__7))) != 0)):
|
|
563
|
+
if not ((((_la) & ~0x3f) == 0 and ((1 << _la) & 448) != 0)):
|
|
629
564
|
self._errHandler.recoverInline(self)
|
|
630
565
|
else:
|
|
631
566
|
self._errHandler.reportMatch(self)
|
|
@@ -641,9 +576,9 @@ class JSONPathParser(Parser):
|
|
|
641
576
|
return localctx
|
|
642
577
|
|
|
643
578
|
class StringFilterContext(ParserRuleContext):
|
|
579
|
+
__slots__ = 'parser'
|
|
644
580
|
|
|
645
|
-
def __init__(self, parser, parent: ParserRuleContext = None,
|
|
646
|
-
invokingState: int = -1):
|
|
581
|
+
def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
|
|
647
582
|
super().__init__(parent, invokingState)
|
|
648
583
|
self.parser = parser
|
|
649
584
|
|
|
@@ -651,8 +586,7 @@ class JSONPathParser(Parser):
|
|
|
651
586
|
return self.getToken(JSONPathParser.CURRENT, 0)
|
|
652
587
|
|
|
653
588
|
def fieldAccessor(self):
|
|
654
|
-
return self.getTypedRuleContext(
|
|
655
|
-
JSONPathParser.FieldAccessorContext, 0)
|
|
589
|
+
return self.getTypedRuleContext(JSONPathParser.FieldAccessorContext, 0)
|
|
656
590
|
|
|
657
591
|
def STRING(self):
|
|
658
592
|
return self.getToken(JSONPathParser.STRING, 0)
|
|
@@ -670,8 +604,7 @@ class JSONPathParser(Parser):
|
|
|
670
604
|
|
|
671
605
|
def stringFilter(self):
|
|
672
606
|
|
|
673
|
-
localctx = JSONPathParser.StringFilterContext(
|
|
674
|
-
self, self._ctx, self.state)
|
|
607
|
+
localctx = JSONPathParser.StringFilterContext(self, self._ctx, self.state)
|
|
675
608
|
self.enterRule(localctx, 12, self.RULE_stringFilter)
|
|
676
609
|
try:
|
|
677
610
|
self.enterOuterAlt(localctx, 1)
|
|
@@ -692,9 +625,9 @@ class JSONPathParser(Parser):
|
|
|
692
625
|
return localctx
|
|
693
626
|
|
|
694
627
|
class BooleanFilterContext(ParserRuleContext):
|
|
628
|
+
__slots__ = 'parser'
|
|
695
629
|
|
|
696
|
-
def __init__(self, parser, parent: ParserRuleContext = None,
|
|
697
|
-
invokingState: int = -1):
|
|
630
|
+
def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
|
|
698
631
|
super().__init__(parent, invokingState)
|
|
699
632
|
self.parser = parser
|
|
700
633
|
|
|
@@ -702,8 +635,7 @@ class JSONPathParser(Parser):
|
|
|
702
635
|
return self.getToken(JSONPathParser.CURRENT, 0)
|
|
703
636
|
|
|
704
637
|
def fieldAccessor(self):
|
|
705
|
-
return self.getTypedRuleContext(
|
|
706
|
-
JSONPathParser.FieldAccessorContext, 0)
|
|
638
|
+
return self.getTypedRuleContext(JSONPathParser.FieldAccessorContext, 0)
|
|
707
639
|
|
|
708
640
|
def getRuleIndex(self):
|
|
709
641
|
return JSONPathParser.RULE_booleanFilter
|
|
@@ -718,8 +650,7 @@ class JSONPathParser(Parser):
|
|
|
718
650
|
|
|
719
651
|
def booleanFilter(self):
|
|
720
652
|
|
|
721
|
-
localctx = JSONPathParser.BooleanFilterContext(
|
|
722
|
-
self, self._ctx, self.state)
|
|
653
|
+
localctx = JSONPathParser.BooleanFilterContext(self, self._ctx, self.state)
|
|
723
654
|
self.enterRule(localctx, 14, self.RULE_booleanFilter)
|
|
724
655
|
try:
|
|
725
656
|
self.enterOuterAlt(localctx, 1)
|
|
@@ -736,9 +667,9 @@ class JSONPathParser(Parser):
|
|
|
736
667
|
return localctx
|
|
737
668
|
|
|
738
669
|
class UnionContext(ParserRuleContext):
|
|
670
|
+
__slots__ = 'parser'
|
|
739
671
|
|
|
740
|
-
def __init__(self, parser, parent: ParserRuleContext = None,
|
|
741
|
-
invokingState: int = -1):
|
|
672
|
+
def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
|
|
742
673
|
super().__init__(parent, invokingState)
|
|
743
674
|
self.parser = parser
|
|
744
675
|
|
|
@@ -776,8 +707,7 @@ class JSONPathParser(Parser):
|
|
|
776
707
|
self.match(JSONPathParser.T__0)
|
|
777
708
|
self.state = 109
|
|
778
709
|
_la = self._input.LA(1)
|
|
779
|
-
if not (_la ==
|
|
780
|
-
JSONPathParser.STRING):
|
|
710
|
+
if not (_la == 17 or _la == 18):
|
|
781
711
|
self._errHandler.recoverInline(self)
|
|
782
712
|
else:
|
|
783
713
|
self._errHandler.reportMatch(self)
|
|
@@ -790,8 +720,7 @@ class JSONPathParser(Parser):
|
|
|
790
720
|
self.match(JSONPathParser.T__8)
|
|
791
721
|
self.state = 111
|
|
792
722
|
_la = self._input.LA(1)
|
|
793
|
-
if not (_la ==
|
|
794
|
-
JSONPathParser.STRING):
|
|
723
|
+
if not (_la == 17 or _la == 18):
|
|
795
724
|
self._errHandler.recoverInline(self)
|
|
796
725
|
else:
|
|
797
726
|
self._errHandler.reportMatch(self)
|
|
@@ -799,7 +728,7 @@ class JSONPathParser(Parser):
|
|
|
799
728
|
self.state = 114
|
|
800
729
|
self._errHandler.sync(self)
|
|
801
730
|
_la = self._input.LA(1)
|
|
802
|
-
if not (_la ==
|
|
731
|
+
if not (_la == 9):
|
|
803
732
|
break
|
|
804
733
|
|
|
805
734
|
self.state = 116
|
|
@@ -813,9 +742,9 @@ class JSONPathParser(Parser):
|
|
|
813
742
|
return localctx
|
|
814
743
|
|
|
815
744
|
class ArraySliceContext(ParserRuleContext):
|
|
745
|
+
__slots__ = 'parser'
|
|
816
746
|
|
|
817
|
-
def __init__(self, parser, parent: ParserRuleContext = None,
|
|
818
|
-
invokingState: int = -1):
|
|
747
|
+
def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
|
|
819
748
|
super().__init__(parent, invokingState)
|
|
820
749
|
self.parser = parser
|
|
821
750
|
|
|
@@ -838,8 +767,7 @@ class JSONPathParser(Parser):
|
|
|
838
767
|
|
|
839
768
|
def arraySlice(self):
|
|
840
769
|
|
|
841
|
-
localctx = JSONPathParser.ArraySliceContext(
|
|
842
|
-
self, self._ctx, self.state)
|
|
770
|
+
localctx = JSONPathParser.ArraySliceContext(self, self._ctx, self.state)
|
|
843
771
|
self.enterRule(localctx, 18, self.RULE_arraySlice)
|
|
844
772
|
self._la = 0 # Token type
|
|
845
773
|
try:
|
|
@@ -849,7 +777,7 @@ class JSONPathParser(Parser):
|
|
|
849
777
|
self.state = 120
|
|
850
778
|
self._errHandler.sync(self)
|
|
851
779
|
_la = self._input.LA(1)
|
|
852
|
-
if _la ==
|
|
780
|
+
if _la == 19:
|
|
853
781
|
self.state = 119
|
|
854
782
|
self.match(JSONPathParser.INT)
|
|
855
783
|
|
|
@@ -858,14 +786,14 @@ class JSONPathParser(Parser):
|
|
|
858
786
|
self.state = 124
|
|
859
787
|
self._errHandler.sync(self)
|
|
860
788
|
_la = self._input.LA(1)
|
|
861
|
-
if _la ==
|
|
789
|
+
if _la == 19:
|
|
862
790
|
self.state = 123
|
|
863
791
|
self.match(JSONPathParser.INT)
|
|
864
792
|
|
|
865
793
|
self.state = 128
|
|
866
794
|
self._errHandler.sync(self)
|
|
867
795
|
_la = self._input.LA(1)
|
|
868
|
-
if _la ==
|
|
796
|
+
if _la == 10:
|
|
869
797
|
self.state = 126
|
|
870
798
|
self.match(JSONPathParser.T__9)
|
|
871
799
|
self.state = 127
|
|
@@ -882,9 +810,9 @@ class JSONPathParser(Parser):
|
|
|
882
810
|
return localctx
|
|
883
811
|
|
|
884
812
|
class FieldAccessorContext(ParserRuleContext):
|
|
813
|
+
__slots__ = 'parser'
|
|
885
814
|
|
|
886
|
-
def __init__(self, parser, parent: ParserRuleContext = None,
|
|
887
|
-
invokingState: int = -1):
|
|
815
|
+
def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
|
|
888
816
|
super().__init__(parent, invokingState)
|
|
889
817
|
self.parser = parser
|
|
890
818
|
|
|
@@ -895,12 +823,10 @@ class JSONPathParser(Parser):
|
|
|
895
823
|
return self.getTypedRuleContext(JSONPathParser.FieldContext, 0)
|
|
896
824
|
|
|
897
825
|
def bracketField(self):
|
|
898
|
-
return self.getTypedRuleContext(
|
|
899
|
-
JSONPathParser.BracketFieldContext, 0)
|
|
826
|
+
return self.getTypedRuleContext(JSONPathParser.BracketFieldContext, 0)
|
|
900
827
|
|
|
901
828
|
def arrayIndex(self):
|
|
902
|
-
return self.getTypedRuleContext(
|
|
903
|
-
JSONPathParser.ArrayIndexContext, 0)
|
|
829
|
+
return self.getTypedRuleContext(JSONPathParser.ArrayIndexContext, 0)
|
|
904
830
|
|
|
905
831
|
def getRuleIndex(self):
|
|
906
832
|
return JSONPathParser.RULE_fieldAccessor
|
|
@@ -915,8 +841,7 @@ class JSONPathParser(Parser):
|
|
|
915
841
|
|
|
916
842
|
def fieldAccessor(self):
|
|
917
843
|
|
|
918
|
-
localctx = JSONPathParser.FieldAccessorContext(
|
|
919
|
-
self, self._ctx, self.state)
|
|
844
|
+
localctx = JSONPathParser.FieldAccessorContext(self, self._ctx, self.state)
|
|
920
845
|
self.enterRule(localctx, 20, self.RULE_fieldAccessor)
|
|
921
846
|
self._la = 0 # Token type
|
|
922
847
|
try:
|
|
@@ -936,7 +861,7 @@ class JSONPathParser(Parser):
|
|
|
936
861
|
self.state = 135
|
|
937
862
|
self._errHandler.sync(self)
|
|
938
863
|
_la = self._input.LA(1)
|
|
939
|
-
if _la ==
|
|
864
|
+
if _la == 15:
|
|
940
865
|
self.state = 134
|
|
941
866
|
self.match(JSONPathParser.SINGLE_DOT)
|
|
942
867
|
|
|
@@ -949,7 +874,7 @@ class JSONPathParser(Parser):
|
|
|
949
874
|
self.state = 139
|
|
950
875
|
self._errHandler.sync(self)
|
|
951
876
|
_la = self._input.LA(1)
|
|
952
|
-
if _la ==
|
|
877
|
+
if _la == 15:
|
|
953
878
|
self.state = 138
|
|
954
879
|
self.match(JSONPathParser.SINGLE_DOT)
|
|
955
880
|
|
|
@@ -966,9 +891,9 @@ class JSONPathParser(Parser):
|
|
|
966
891
|
return localctx
|
|
967
892
|
|
|
968
893
|
class FieldContext(ParserRuleContext):
|
|
894
|
+
__slots__ = 'parser'
|
|
969
895
|
|
|
970
|
-
def __init__(self, parser, parent: ParserRuleContext = None,
|
|
971
|
-
invokingState: int = -1):
|
|
896
|
+
def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
|
|
972
897
|
super().__init__(parent, invokingState)
|
|
973
898
|
self.parser = parser
|
|
974
899
|
|
|
@@ -1003,9 +928,9 @@ class JSONPathParser(Parser):
|
|
|
1003
928
|
return localctx
|
|
1004
929
|
|
|
1005
930
|
class BracketFieldContext(ParserRuleContext):
|
|
931
|
+
__slots__ = 'parser'
|
|
1006
932
|
|
|
1007
|
-
def __init__(self, parser, parent: ParserRuleContext = None,
|
|
1008
|
-
invokingState: int = -1):
|
|
933
|
+
def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
|
|
1009
934
|
super().__init__(parent, invokingState)
|
|
1010
935
|
self.parser = parser
|
|
1011
936
|
|
|
@@ -1028,8 +953,7 @@ class JSONPathParser(Parser):
|
|
|
1028
953
|
|
|
1029
954
|
def bracketField(self):
|
|
1030
955
|
|
|
1031
|
-
localctx = JSONPathParser.BracketFieldContext(
|
|
1032
|
-
self, self._ctx, self.state)
|
|
956
|
+
localctx = JSONPathParser.BracketFieldContext(self, self._ctx, self.state)
|
|
1033
957
|
self.enterRule(localctx, 24, self.RULE_bracketField)
|
|
1034
958
|
self._la = 0 # Token type
|
|
1035
959
|
try:
|
|
@@ -1038,8 +962,7 @@ class JSONPathParser(Parser):
|
|
|
1038
962
|
self.match(JSONPathParser.T__0)
|
|
1039
963
|
self.state = 147
|
|
1040
964
|
_la = self._input.LA(1)
|
|
1041
|
-
if not (_la ==
|
|
1042
|
-
JSONPathParser.STRING):
|
|
965
|
+
if not (_la == 17 or _la == 18):
|
|
1043
966
|
self._errHandler.recoverInline(self)
|
|
1044
967
|
else:
|
|
1045
968
|
self._errHandler.reportMatch(self)
|
|
@@ -1055,9 +978,9 @@ class JSONPathParser(Parser):
|
|
|
1055
978
|
return localctx
|
|
1056
979
|
|
|
1057
980
|
class ArrayIndexContext(ParserRuleContext):
|
|
981
|
+
__slots__ = 'parser'
|
|
1058
982
|
|
|
1059
|
-
def __init__(self, parser, parent: ParserRuleContext = None,
|
|
1060
|
-
invokingState: int = -1):
|
|
983
|
+
def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
|
|
1061
984
|
super().__init__(parent, invokingState)
|
|
1062
985
|
self.parser = parser
|
|
1063
986
|
|
|
@@ -1077,8 +1000,7 @@ class JSONPathParser(Parser):
|
|
|
1077
1000
|
|
|
1078
1001
|
def arrayIndex(self):
|
|
1079
1002
|
|
|
1080
|
-
localctx = JSONPathParser.ArrayIndexContext(
|
|
1081
|
-
self, self._ctx, self.state)
|
|
1003
|
+
localctx = JSONPathParser.ArrayIndexContext(self, self._ctx, self.state)
|
|
1082
1004
|
self.enterRule(localctx, 26, self.RULE_arrayIndex)
|
|
1083
1005
|
try:
|
|
1084
1006
|
self.enterOuterAlt(localctx, 1)
|
|
@@ -1097,9 +1019,9 @@ class JSONPathParser(Parser):
|
|
|
1097
1019
|
return localctx
|
|
1098
1020
|
|
|
1099
1021
|
class WildcardContext(ParserRuleContext):
|
|
1022
|
+
__slots__ = 'parser'
|
|
1100
1023
|
|
|
1101
|
-
def __init__(self, parser, parent: ParserRuleContext = None,
|
|
1102
|
-
invokingState: int = -1):
|
|
1024
|
+
def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
|
|
1103
1025
|
super().__init__(parent, invokingState)
|
|
1104
1026
|
self.parser = parser
|
|
1105
1027
|
|
|
@@ -1131,9 +1053,9 @@ class JSONPathParser(Parser):
|
|
|
1131
1053
|
return localctx
|
|
1132
1054
|
|
|
1133
1055
|
class BracketWildcardContext(ParserRuleContext):
|
|
1056
|
+
__slots__ = 'parser'
|
|
1134
1057
|
|
|
1135
|
-
def __init__(self, parser, parent: ParserRuleContext = None,
|
|
1136
|
-
invokingState: int = -1):
|
|
1058
|
+
def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1):
|
|
1137
1059
|
super().__init__(parent, invokingState)
|
|
1138
1060
|
self.parser = parser
|
|
1139
1061
|
|
|
@@ -1150,8 +1072,7 @@ class JSONPathParser(Parser):
|
|
|
1150
1072
|
|
|
1151
1073
|
def bracketWildcard(self):
|
|
1152
1074
|
|
|
1153
|
-
localctx = JSONPathParser.BracketWildcardContext(
|
|
1154
|
-
self, self._ctx, self.state)
|
|
1075
|
+
localctx = JSONPathParser.BracketWildcardContext(self, self._ctx, self.state)
|
|
1155
1076
|
self.enterRule(localctx, 30, self.RULE_bracketWildcard)
|
|
1156
1077
|
try:
|
|
1157
1078
|
self.enterOuterAlt(localctx, 1)
|