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
pyfx/__version__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.3.
|
|
1
|
+
__version__ = "0.3.2"
|
|
@@ -5,7 +5,9 @@ from antlr4.error.ErrorListener import ErrorListener
|
|
|
5
5
|
from loguru import logger
|
|
6
6
|
from overrides import overrides
|
|
7
7
|
|
|
8
|
-
from ..common.jsonpath import JSONPathLexer
|
|
8
|
+
from ..common.jsonpath.JSONPathLexer import JSONPathLexer
|
|
9
|
+
from ..common.jsonpath.JSONPathParser import JSONPathParser
|
|
10
|
+
from ..common.jsonpath.JSONPathListener import JSONPathListener
|
|
9
11
|
|
|
10
12
|
|
|
11
13
|
def autocomplete(current_input, query):
|
|
@@ -64,4 +64,4 @@ bracketWildcard
|
|
|
64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1, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 5, 19, 0, 0, 99, 11, 1, 0, 0, 0, 100, 101, 5, 14, 0, 0, 101, 102, 3, 20, 10, 0, 102, 103, 5, 8, 0, 0, 103, 104, 5, 18, 0, 0, 104, 13, 1, 0, 0, 0, 105, 106, 5, 14, 0, 0, 106, 107, 3, 20, 10, 0, 107, 15, 1, 0, 0, 0, 108, 109, 5, 1, 0, 0, 109, 112, 7, 1, 0, 0, 110, 111, 5, 9, 0, 0, 111, 113, 7, 1, 0, 0, 112, 110, 1, 0, 0, 0, 113, 114, 1, 0, 0, 0, 114, 112, 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, 0, 0, 0, 118, 120, 5, 1, 0, 0, 119, 121, 5, 19, 0, 0, 120, 119, 1, 0, 0, 0, 120, 121, 1, 0, 0, 0, 121, 122, 1, 0, 0, 0, 122, 124, 5, 10, 0, 0, 123, 125, 5, 19, 0, 0, 124, 123, 1, 0, 0, 0, 124, 125, 1, 0, 0, 0, 125, 128, 1, 0, 0, 0, 126, 127, 5, 10, 0, 0, 127, 129, 5, 19, 0, 0, 128, 126, 1, 0, 0, 0, 128, 129, 1, 0, 0, 0, 129, 130, 1, 0, 0, 0, 130, 131, 5, 5, 0, 0, 131, 19, 1, 0, 0, 0, 132, 133, 5, 15, 0, 0, 133, 143, 3, 22, 11, 0, 134, 136, 5, 15, 0, 0, 135, 134, 1, 0, 0, 0, 135, 136, 1, 0, 0, 0, 136, 137, 1, 0, 0, 0, 137, 143, 3, 24, 12, 0, 138, 140, 5, 15, 0, 0, 139, 138, 1, 0, 0, 0, 139, 140, 1, 0, 0, 0, 140, 141, 1, 0, 0, 0, 141, 143, 3, 26, 13, 0, 142, 132, 1, 0, 0, 0, 142, 135, 1, 0, 0, 0, 142, 139, 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, 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, 0, 0, 151, 152, 5, 19, 0, 0, 152, 153, 5, 5, 0, 0, 153, 27, 1, 0, 0, 0, 154, 155, 5, 11, 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, 59, 63, 67, 70, 93, 114, 120, 124, 128, 135, 139, 142]
|
|
@@ -75,4 +75,4 @@ mode names:
|
|
|
75
75
|
DEFAULT_MODE
|
|
76
76
|
|
|
77
77
|
atn:
|
|
78
|
-
[
|
|
78
|
+
[4, 0, 20, 118, 6, -1, 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, 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, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 3, 1, 4, 1, 4, 1, 5, 1, 5, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 9, 1, 9, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 13, 1, 13, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 16, 4, 16, 81, 8, 16, 11, 16, 12, 16, 82, 1, 17, 1, 17, 1, 17, 5, 17, 88, 8, 17, 10, 17, 12, 17, 91, 9, 17, 1, 17, 3, 17, 94, 8, 17, 1, 18, 1, 18, 1, 18, 1, 18, 3, 18, 100, 8, 18, 1, 19, 1, 19, 1, 19, 5, 19, 105, 8, 19, 10, 19, 12, 19, 108, 9, 19, 3, 19, 110, 8, 19, 1, 20, 4, 20, 113, 8, 20, 11, 20, 12, 20, 114, 1, 20, 1, 20, 1, 89, 0, 21, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16,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10, 1, 0, 0, 0, 53, 54, 5, 62, 0, 0, 54, 12, 1, 0, 0, 0, 55, 56, 5, 60, 0, 0, 56, 14, 1, 0, 0, 0, 57, 58, 5, 61, 0, 0, 58, 59, 5, 61, 0, 0, 59, 16, 1, 0, 0, 0, 60, 61, 5, 44, 0, 0, 61, 18, 1, 0, 0, 0, 62, 63, 5, 58, 0, 0, 63, 20, 1, 0, 0, 0, 64, 65, 5, 42, 0, 0, 65, 22, 1, 0, 0, 0, 66, 67, 5, 91, 0, 0, 67, 68, 5, 42, 0, 0, 68, 69, 5, 93, 0, 0, 69, 24, 1, 0, 0, 0, 70, 71, 5, 36, 0, 0, 71, 26, 1, 0, 0, 0, 72, 73, 5, 64, 0, 0, 73, 28, 1, 0, 0, 0, 74, 75, 5, 46, 0, 0, 75, 30, 1, 0, 0, 0, 76, 77, 5, 46, 0, 0, 77, 78, 5, 46, 0, 0, 78, 32, 1, 0, 0, 0, 79, 81, 7, 0, 0, 0, 80, 79, 1, 0, 0, 0, 81, 82, 1, 0, 0, 0, 82, 80, 1, 0, 0, 0, 82, 83, 1, 0, 0, 0, 83, 34, 1, 0, 0, 0, 84, 89, 5, 39, 0, 0, 85, 88, 3, 37, 18, 0, 86, 88, 9, 0, 0, 0, 87, 85, 1, 0, 0, 0, 87, 86, 1, 0, 0, 0, 88, 91, 1, 0, 0, 0, 89, 90, 1, 0, 0, 0, 89, 87, 1, 0, 0, 0, 90, 93, 1, 0, 0, 0, 91, 89, 1, 0, 0, 0, 92, 94, 7, 1, 0, 0, 93, 92, 1, 0, 0, 0, 94, 36, 1, 0, 0, 0, 95, 96, 5, 92, 0, 0, 96, 100, 5, 39, 0, 0, 97, 98, 5, 92, 0, 0, 98, 100, 5, 92, 0, 0, 99, 95, 1, 0, 0, 0, 99, 97, 1, 0, 0, 0, 100, 38, 1, 0, 0, 0, 101, 110, 5, 48, 0, 0, 102, 106, 7, 2, 0, 0, 103, 105, 7, 3, 0, 0, 104, 103, 1, 0, 0, 0, 105, 108, 1, 0, 0, 0, 106, 104, 1, 0, 0, 0, 106, 107, 1, 0, 0, 0, 107, 110, 1, 0, 0, 0, 108, 106, 1, 0, 0, 0, 109, 101, 1, 0, 0, 0, 109, 102, 1, 0, 0, 0, 110, 40, 1, 0, 0, 0, 111, 113, 7, 4, 0, 0, 112, 111, 1, 0, 0, 0, 113, 114, 1, 0, 0, 0, 114, 112, 1, 0, 0, 0, 114, 115, 1, 0, 0, 0, 115, 116, 1, 0, 0, 0, 116, 117, 6, 20, 0, 0, 117, 42, 1, 0, 0, 0, 9, 0, 82, 87, 89, 93, 99, 106, 109, 114, 1, 6, 0, 0]
|
|
@@ -1,56 +1,61 @@
|
|
|
1
|
-
# Generated from JSONPath.g4 by ANTLR 4.
|
|
1
|
+
# Generated from JSONPath.g4 by ANTLR 4.13.2
|
|
2
2
|
from antlr4 import *
|
|
3
3
|
from io import StringIO
|
|
4
|
-
from typing.io import TextIO
|
|
5
4
|
import sys
|
|
5
|
+
if sys.version_info[1] > 5:
|
|
6
|
+
from typing import TextIO
|
|
7
|
+
else:
|
|
8
|
+
from typing.io import TextIO
|
|
6
9
|
|
|
7
10
|
|
|
8
11
|
def serializedATN():
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
-
|
|
12
|
+
return [
|
|
13
|
+
4, 0, 20, 118, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5,
|
|
14
|
+
2, 6, 7, 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,
|
|
15
|
+
13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7,
|
|
16
|
+
19, 2, 20, 7, 20, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 3, 1, 4, 1, 4, 1, 5, 1, 5, 1, 6,
|
|
17
|
+
1, 6, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 9, 1, 9, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1,
|
|
18
|
+
12, 1, 12, 1, 13, 1, 13, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 16, 4, 16, 81, 8, 16, 11,
|
|
19
|
+
16, 12, 16, 82, 1, 17, 1, 17, 1, 17, 5, 17, 88, 8, 17, 10, 17, 12, 17, 91, 9, 17, 1, 17,
|
|
20
|
+
3, 17, 94, 8, 17, 1, 18, 1, 18, 1, 18, 1, 18, 3, 18, 100, 8, 18, 1, 19, 1, 19, 1, 19, 5,
|
|
21
|
+
19, 105, 8, 19, 10, 19, 12, 19, 108, 9, 19, 3, 19, 110, 8, 19, 1, 20, 4, 20, 113, 8, 20,
|
|
22
|
+
11, 20, 12, 20, 114, 1, 20, 1, 20, 1, 89, 0, 21, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13,
|
|
23
|
+
7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18,
|
|
24
|
+
37, 0, 39, 19, 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|
|
35
|
+
48, 6, 1, 0, 0, 0, 49, 50, 5, 41, 0, 0, 50, 8, 1, 0, 0, 0, 51, 52, 5, 93, 0, 0, 52, 10, 1,
|
|
36
|
+
0, 0, 0, 53, 54, 5, 62, 0, 0, 54, 12, 1, 0, 0, 0, 55, 56, 5, 60, 0, 0, 56, 14, 1, 0, 0, 0,
|
|
37
|
+
57, 58, 5, 61, 0, 0, 58, 59, 5, 61, 0, 0, 59, 16, 1, 0, 0, 0, 60, 61, 5, 44, 0, 0, 61, 18,
|
|
38
|
+
1, 0, 0, 0, 62, 63, 5, 58, 0, 0, 63, 20, 1, 0, 0, 0, 64, 65, 5, 42, 0, 0, 65, 22, 1, 0, 0,
|
|
39
|
+
0, 66, 67, 5, 91, 0, 0, 67, 68, 5, 42, 0, 0, 68, 69, 5, 93, 0, 0, 69, 24, 1, 0, 0, 0, 70,
|
|
40
|
+
71, 5, 36, 0, 0, 71, 26, 1, 0, 0, 0, 72, 73, 5, 64, 0, 0, 73, 28, 1, 0, 0, 0, 74, 75, 5, 46,
|
|
41
|
+
0, 0, 75, 30, 1, 0, 0, 0, 76, 77, 5, 46, 0, 0, 77, 78, 5, 46, 0, 0, 78, 32, 1, 0, 0, 0, 79,
|
|
42
|
+
81, 7, 0, 0, 0, 80, 79, 1, 0, 0, 0, 81, 82, 1, 0, 0, 0, 82, 80, 1, 0, 0, 0, 82, 83, 1, 0, 0,
|
|
43
|
+
0, 83, 34, 1, 0, 0, 0, 84, 89, 5, 39, 0, 0, 85, 88, 3, 37, 18, 0, 86, 88, 9, 0, 0, 0, 87,
|
|
44
|
+
85, 1, 0, 0, 0, 87, 86, 1, 0, 0, 0, 88, 91, 1, 0, 0, 0, 89, 90, 1, 0, 0, 0, 89, 87, 1, 0, 0,
|
|
45
|
+
0, 90, 93, 1, 0, 0, 0, 91, 89, 1, 0, 0, 0, 92, 94, 7, 1, 0, 0, 93, 92, 1, 0, 0, 0, 94, 36,
|
|
46
|
+
1, 0, 0, 0, 95, 96, 5, 92, 0, 0, 96, 100, 5, 39, 0, 0, 97, 98, 5, 92, 0, 0, 98, 100, 5, 92,
|
|
47
|
+
0, 0, 99, 95, 1, 0, 0, 0, 99, 97, 1, 0, 0, 0, 100, 38, 1, 0, 0, 0, 101, 110, 5, 48, 0, 0,
|
|
48
|
+
102, 106, 7, 2, 0, 0, 103, 105, 7, 3, 0, 0, 104, 103, 1, 0, 0, 0, 105, 108, 1, 0, 0, 0,
|
|
49
|
+
106, 104, 1, 0, 0, 0, 106, 107, 1, 0, 0, 0, 107, 110, 1, 0, 0, 0, 108, 106, 1, 0, 0, 0,
|
|
50
|
+
109, 101, 1, 0, 0, 0, 109, 102, 1, 0, 0, 0, 110, 40, 1, 0, 0, 0, 111, 113, 7, 4, 0, 0, 112,
|
|
51
|
+
111, 1, 0, 0, 0, 113, 114, 1, 0, 0, 0, 114, 112, 1, 0, 0, 0, 114, 115, 1, 0, 0, 0, 115,
|
|
52
|
+
116, 1, 0, 0, 0, 116, 117, 6, 20, 0, 0, 117, 42, 1, 0, 0, 0, 9, 0, 82, 87, 89, 93, 99, 106,
|
|
53
|
+
109, 114, 1, 6, 0, 0
|
|
54
|
+
]
|
|
51
55
|
|
|
52
56
|
|
|
53
57
|
class JSONPathLexer(Lexer):
|
|
58
|
+
|
|
54
59
|
atn = ATNDeserializer().deserialize(serializedATN())
|
|
55
60
|
|
|
56
61
|
decisionsToDFA = [DFA(ds, i) for i, ds in enumerate(atn.decisionToState)]
|
|
@@ -80,35 +85,13 @@ class JSONPathLexer(Lexer):
|
|
|
80
85
|
|
|
81
86
|
modeNames = ["DEFAULT_MODE"]
|
|
82
87
|
|
|
83
|
-
literalNames = [
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
"'?'",
|
|
87
|
-
"'('",
|
|
88
|
-
"')'",
|
|
89
|
-
"']'",
|
|
90
|
-
"'>'",
|
|
91
|
-
"'<'",
|
|
92
|
-
"'=='",
|
|
93
|
-
"','",
|
|
94
|
-
"':'",
|
|
95
|
-
"'*'",
|
|
96
|
-
"'[*]'",
|
|
97
|
-
"'$'",
|
|
98
|
-
"'@'",
|
|
99
|
-
"'.'",
|
|
100
|
-
"'..'"]
|
|
88
|
+
literalNames = ["<INVALID>",
|
|
89
|
+
"'['", "'?'", "'('", "')'", "']'", "'>'", "'<'", "'=='", "','",
|
|
90
|
+
"':'", "'*'", "'[*]'", "'$'", "'@'", "'.'", "'..'"]
|
|
101
91
|
|
|
102
|
-
symbolicNames = [
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
"CURRENT",
|
|
106
|
-
"SINGLE_DOT",
|
|
107
|
-
"DOUBLE_DOT",
|
|
108
|
-
"LETTER",
|
|
109
|
-
"STRING",
|
|
110
|
-
"INT",
|
|
111
|
-
"WS"]
|
|
92
|
+
symbolicNames = ["<INVALID>",
|
|
93
|
+
"ROOT", "CURRENT", "SINGLE_DOT", "DOUBLE_DOT", "LETTER", "STRING",
|
|
94
|
+
"INT", "WS"]
|
|
112
95
|
|
|
113
96
|
ruleNames = ["T__0", "T__1", "T__2", "T__3", "T__4", "T__5", "T__6",
|
|
114
97
|
"T__7", "T__8", "T__9", "T__10", "T__11", "ROOT", "CURRENT",
|
|
@@ -119,8 +102,7 @@ class JSONPathLexer(Lexer):
|
|
|
119
102
|
|
|
120
103
|
def __init__(self, input=None, output: TextIO = sys.stdout):
|
|
121
104
|
super().__init__(input, output)
|
|
122
|
-
self.checkVersion("4.
|
|
123
|
-
self._interp = LexerATNSimulator(
|
|
124
|
-
self, self.atn, self.decisionsToDFA, PredictionContextCache())
|
|
105
|
+
self.checkVersion("4.13.2")
|
|
106
|
+
self._interp = LexerATNSimulator(self, self.atn, self.decisionsToDFA, PredictionContextCache())
|
|
125
107
|
self._actions = None
|
|
126
108
|
self._predicates = None
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
# Generated from JSONPath.g4 by ANTLR 4.
|
|
1
|
+
# Generated from JSONPath.g4 by ANTLR 4.13.2
|
|
2
2
|
from antlr4 import *
|
|
3
|
-
|
|
4
|
-
if __name__ is not None and "." in __name__:
|
|
3
|
+
if "." in __name__:
|
|
5
4
|
from .JSONPathParser import JSONPathParser
|
|
6
5
|
else:
|
|
7
6
|
from JSONPathParser import JSONPathParser
|
|
8
7
|
|
|
8
|
+
# This class defines a complete listener for a parse tree produced by JSONPathParser.
|
|
9
|
+
|
|
9
10
|
|
|
10
|
-
# This class defines a complete listener for a parse tree produced by
|
|
11
|
-
# JSONPathParser.
|
|
12
11
|
class JSONPathListener(ParseTreeListener):
|
|
13
12
|
|
|
14
13
|
# Enter a parse tree produced by JSONPathParser#jsonpath.
|
|
@@ -28,23 +27,19 @@ class JSONPathListener(ParseTreeListener):
|
|
|
28
27
|
pass
|
|
29
28
|
|
|
30
29
|
# Enter a parse tree produced by JSONPathParser#doubleDotExpression.
|
|
31
|
-
def enterDoubleDotExpression(
|
|
32
|
-
self, ctx: JSONPathParser.DoubleDotExpressionContext):
|
|
30
|
+
def enterDoubleDotExpression(self, ctx: JSONPathParser.DoubleDotExpressionContext):
|
|
33
31
|
pass
|
|
34
32
|
|
|
35
33
|
# Exit a parse tree produced by JSONPathParser#doubleDotExpression.
|
|
36
|
-
def exitDoubleDotExpression(
|
|
37
|
-
self, ctx: JSONPathParser.DoubleDotExpressionContext):
|
|
34
|
+
def exitDoubleDotExpression(self, ctx: JSONPathParser.DoubleDotExpressionContext):
|
|
38
35
|
pass
|
|
39
36
|
|
|
40
37
|
# Enter a parse tree produced by JSONPathParser#singleDotExpression.
|
|
41
|
-
def enterSingleDotExpression(
|
|
42
|
-
self, ctx: JSONPathParser.SingleDotExpressionContext):
|
|
38
|
+
def enterSingleDotExpression(self, ctx: JSONPathParser.SingleDotExpressionContext):
|
|
43
39
|
pass
|
|
44
40
|
|
|
45
41
|
# Exit a parse tree produced by JSONPathParser#singleDotExpression.
|
|
46
|
-
def exitSingleDotExpression(
|
|
47
|
-
self, ctx: JSONPathParser.SingleDotExpressionContext):
|
|
42
|
+
def exitSingleDotExpression(self, ctx: JSONPathParser.SingleDotExpressionContext):
|
|
48
43
|
pass
|
|
49
44
|
|
|
50
45
|
# Enter a parse tree produced by JSONPathParser#filters.
|