mal-toolbox 0.1.12__py3-none-any.whl → 0.3.0__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.
- {mal_toolbox-0.1.12.dist-info → mal_toolbox-0.3.0.dist-info}/METADATA +43 -25
- mal_toolbox-0.3.0.dist-info/RECORD +29 -0
- mal_toolbox-0.3.0.dist-info/entry_points.txt +2 -0
- maltoolbox/__init__.py +38 -57
- maltoolbox/__main__.py +43 -14
- maltoolbox/attackgraph/__init__.py +1 -1
- maltoolbox/attackgraph/analyzers/apriori.py +10 -6
- maltoolbox/attackgraph/attacker.py +26 -13
- maltoolbox/attackgraph/attackgraph.py +431 -355
- maltoolbox/attackgraph/node.py +72 -54
- maltoolbox/attackgraph/query.py +4 -2
- maltoolbox/file_utils.py +4 -8
- maltoolbox/ingestors/neo4j.py +146 -157
- maltoolbox/language/__init__.py +10 -2
- maltoolbox/language/compiler/__init__.py +485 -17
- maltoolbox/language/compiler/mal_lexer.py +172 -152
- maltoolbox/language/compiler/mal_parser.py +1370 -663
- maltoolbox/language/languagegraph.py +1096 -545
- maltoolbox/model.py +312 -485
- maltoolbox/translators/securicad.py +164 -163
- maltoolbox/translators/updater.py +231 -108
- mal_toolbox-0.1.12.dist-info/RECORD +0 -32
- maltoolbox/default.conf +0 -17
- maltoolbox/language/classes_factory.py +0 -243
- maltoolbox/language/compiler/mal_visitor.py +0 -416
- maltoolbox/wrappers.py +0 -62
- {mal_toolbox-0.1.12.dist-info → mal_toolbox-0.3.0.dist-info}/AUTHORS +0 -0
- {mal_toolbox-0.1.12.dist-info → mal_toolbox-0.3.0.dist-info}/LICENSE +0 -0
- {mal_toolbox-0.1.12.dist-info → mal_toolbox-0.3.0.dist-info}/WHEEL +0 -0
- {mal_toolbox-0.1.12.dist-info → mal_toolbox-0.3.0.dist-info}/top_level.txt +0 -0
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
# mypy: ignore-errors
|
|
2
|
-
# Generated from mal.g4 by ANTLR 4.13.
|
|
2
|
+
# Generated from mal.g4 by ANTLR 4.13.2
|
|
3
3
|
# encoding: utf-8
|
|
4
4
|
from antlr4 import *
|
|
5
|
+
from io import StringIO
|
|
5
6
|
import sys
|
|
6
7
|
if sys.version_info[1] > 5:
|
|
7
8
|
from typing import TextIO
|
|
@@ -10,124 +11,150 @@ else:
|
|
|
10
11
|
|
|
11
12
|
def serializedATN():
|
|
12
13
|
return [
|
|
13
|
-
4,1,
|
|
14
|
+
4,1,51,413,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,
|
|
14
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,
|
|
15
16
|
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,
|
|
16
17
|
7,20,2,21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,
|
|
17
18
|
2,27,7,27,2,28,7,28,2,29,7,29,2,30,7,30,2,31,7,31,2,32,7,32,2,33,
|
|
18
|
-
7,33,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
1,
|
|
22
|
-
1,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
7,
|
|
26
|
-
1,
|
|
27
|
-
|
|
28
|
-
1,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
18,
|
|
33
|
-
19,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
1,
|
|
38
|
-
8,
|
|
39
|
-
|
|
40
|
-
1,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
1,0,0,0,
|
|
53
|
-
|
|
54
|
-
0,0,0,
|
|
55
|
-
|
|
56
|
-
0,0,
|
|
57
|
-
|
|
58
|
-
0,
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
0,
|
|
73
|
-
0,
|
|
74
|
-
|
|
75
|
-
0,0,0,
|
|
76
|
-
0,
|
|
77
|
-
0,0,0,
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
0,
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
1,0,0,0,
|
|
101
|
-
4,0,0,
|
|
102
|
-
1,0,0,0,
|
|
103
|
-
|
|
104
|
-
0,0,
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
0,
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
19
|
+
7,33,2,34,7,34,2,35,7,35,2,36,7,36,2,37,7,37,2,38,7,38,2,39,7,39,
|
|
20
|
+
2,40,7,40,2,41,7,41,2,42,7,42,2,43,7,43,2,44,7,44,1,0,4,0,92,8,0,
|
|
21
|
+
11,0,12,0,93,1,0,3,0,97,8,0,1,1,1,1,1,1,1,1,3,1,103,8,1,1,2,1,2,
|
|
22
|
+
1,2,1,3,1,3,1,3,1,3,1,3,1,4,1,4,1,4,5,4,116,8,4,10,4,12,4,119,9,
|
|
23
|
+
4,1,4,1,4,5,4,123,8,4,10,4,12,4,126,9,4,1,4,1,4,1,5,1,5,1,5,1,5,
|
|
24
|
+
1,5,1,6,1,6,1,7,3,7,138,8,7,1,7,1,7,1,7,1,7,3,7,144,8,7,1,7,5,7,
|
|
25
|
+
147,8,7,10,7,12,7,150,9,7,1,7,1,7,1,7,5,7,155,8,7,10,7,12,7,158,
|
|
26
|
+
9,7,1,7,1,7,1,8,1,8,1,8,5,8,165,8,8,10,8,12,8,168,9,8,1,8,3,8,171,
|
|
27
|
+
8,8,1,8,3,8,174,8,8,1,8,5,8,177,8,8,10,8,12,8,180,9,8,1,8,5,8,183,
|
|
28
|
+
8,8,10,8,12,8,186,9,8,1,8,3,8,189,8,8,1,8,3,8,192,8,8,1,9,1,9,1,
|
|
29
|
+
10,1,10,1,10,1,11,1,11,1,11,1,11,5,11,203,8,11,10,11,12,11,206,9,
|
|
30
|
+
11,1,11,1,11,1,12,1,12,1,13,1,13,1,14,1,14,1,14,1,14,1,15,1,15,1,
|
|
31
|
+
15,5,15,221,8,15,10,15,12,15,224,9,15,1,16,1,16,1,16,5,16,229,8,
|
|
32
|
+
16,10,16,12,16,232,9,16,1,17,1,17,1,17,3,17,237,8,17,1,18,1,18,1,
|
|
33
|
+
18,1,18,1,18,1,18,3,18,245,8,18,1,19,1,19,1,19,1,19,1,19,5,19,252,
|
|
34
|
+
8,19,10,19,12,19,255,9,19,3,19,257,8,19,1,19,3,19,260,8,19,1,20,
|
|
35
|
+
1,20,3,20,264,8,20,1,20,1,20,3,20,268,8,20,1,20,3,20,271,8,20,1,
|
|
36
|
+
21,1,21,1,22,1,22,1,22,5,22,278,8,22,10,22,12,22,281,9,22,1,23,1,
|
|
37
|
+
23,1,23,1,23,5,23,287,8,23,10,23,12,23,290,9,23,1,23,1,23,1,24,1,
|
|
38
|
+
24,1,24,1,25,1,25,1,26,1,26,1,27,1,27,1,28,1,28,1,29,1,29,1,29,1,
|
|
39
|
+
29,5,29,309,8,29,10,29,12,29,312,9,29,1,30,1,30,1,30,1,30,5,30,318,
|
|
40
|
+
8,30,10,30,12,30,321,9,30,1,31,1,31,1,32,1,32,1,32,1,32,1,32,1,33,
|
|
41
|
+
1,33,1,33,1,33,5,33,334,8,33,10,33,12,33,337,9,33,1,34,1,34,1,34,
|
|
42
|
+
5,34,342,8,34,10,34,12,34,345,9,34,1,35,1,35,1,35,1,35,1,35,1,35,
|
|
43
|
+
1,35,1,35,1,35,3,35,356,8,35,1,35,3,35,359,8,35,1,35,5,35,362,8,
|
|
44
|
+
35,10,35,12,35,365,9,35,1,36,1,36,1,37,1,37,1,37,1,37,1,38,1,38,
|
|
45
|
+
1,39,1,39,1,39,5,39,378,8,39,10,39,12,39,381,9,39,1,39,1,39,1,40,
|
|
46
|
+
1,40,1,40,1,40,1,40,1,40,1,40,1,40,1,40,1,40,5,40,395,8,40,10,40,
|
|
47
|
+
12,40,398,9,40,1,41,1,41,1,41,1,41,1,42,1,42,1,42,3,42,407,8,42,
|
|
48
|
+
1,43,1,43,1,44,1,44,1,44,0,0,45,0,2,4,6,8,10,12,14,16,18,20,22,24,
|
|
49
|
+
26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,
|
|
50
|
+
70,72,74,76,78,80,82,84,86,88,0,10,1,0,9,10,4,0,13,13,22,22,36,37,
|
|
51
|
+
39,39,1,0,14,16,2,0,31,31,45,45,2,0,28,28,46,46,2,0,38,38,48,48,
|
|
52
|
+
1,0,42,43,1,0,11,12,1,0,31,33,2,0,11,11,28,28,411,0,96,1,0,0,0,2,
|
|
53
|
+
102,1,0,0,0,4,104,1,0,0,0,6,107,1,0,0,0,8,112,1,0,0,0,10,129,1,0,
|
|
54
|
+
0,0,12,134,1,0,0,0,14,137,1,0,0,0,16,161,1,0,0,0,18,193,1,0,0,0,
|
|
55
|
+
20,195,1,0,0,0,22,198,1,0,0,0,24,209,1,0,0,0,26,211,1,0,0,0,28,213,
|
|
56
|
+
1,0,0,0,30,217,1,0,0,0,32,225,1,0,0,0,34,233,1,0,0,0,36,244,1,0,
|
|
57
|
+
0,0,38,246,1,0,0,0,40,261,1,0,0,0,42,272,1,0,0,0,44,274,1,0,0,0,
|
|
58
|
+
46,282,1,0,0,0,48,293,1,0,0,0,50,296,1,0,0,0,52,298,1,0,0,0,54,300,
|
|
59
|
+
1,0,0,0,56,302,1,0,0,0,58,304,1,0,0,0,60,313,1,0,0,0,62,322,1,0,
|
|
60
|
+
0,0,64,324,1,0,0,0,66,329,1,0,0,0,68,338,1,0,0,0,70,355,1,0,0,0,
|
|
61
|
+
72,366,1,0,0,0,74,368,1,0,0,0,76,372,1,0,0,0,78,374,1,0,0,0,80,384,
|
|
62
|
+
1,0,0,0,82,399,1,0,0,0,84,403,1,0,0,0,86,408,1,0,0,0,88,410,1,0,
|
|
63
|
+
0,0,90,92,3,2,1,0,91,90,1,0,0,0,92,93,1,0,0,0,93,91,1,0,0,0,93,94,
|
|
64
|
+
1,0,0,0,94,97,1,0,0,0,95,97,5,0,0,1,96,91,1,0,0,0,96,95,1,0,0,0,
|
|
65
|
+
97,1,1,0,0,0,98,103,3,4,2,0,99,103,3,6,3,0,100,103,3,8,4,0,101,103,
|
|
66
|
+
3,78,39,0,102,98,1,0,0,0,102,99,1,0,0,0,102,100,1,0,0,0,102,101,
|
|
67
|
+
1,0,0,0,103,3,1,0,0,0,104,105,5,5,0,0,105,106,5,9,0,0,106,5,1,0,
|
|
68
|
+
0,0,107,108,5,22,0,0,108,109,5,17,0,0,109,110,5,23,0,0,110,111,5,
|
|
69
|
+
9,0,0,111,7,1,0,0,0,112,113,5,6,0,0,113,117,5,17,0,0,114,116,3,10,
|
|
70
|
+
5,0,115,114,1,0,0,0,116,119,1,0,0,0,117,115,1,0,0,0,117,118,1,0,
|
|
71
|
+
0,0,118,120,1,0,0,0,119,117,1,0,0,0,120,124,5,20,0,0,121,123,3,14,
|
|
72
|
+
7,0,122,121,1,0,0,0,123,126,1,0,0,0,124,122,1,0,0,0,124,125,1,0,
|
|
73
|
+
0,0,125,127,1,0,0,0,126,124,1,0,0,0,127,128,5,21,0,0,128,9,1,0,0,
|
|
74
|
+
0,129,130,5,17,0,0,130,131,5,7,0,0,131,132,5,23,0,0,132,133,3,12,
|
|
75
|
+
6,0,133,11,1,0,0,0,134,135,7,0,0,0,135,13,1,0,0,0,136,138,5,1,0,
|
|
76
|
+
0,137,136,1,0,0,0,137,138,1,0,0,0,138,139,1,0,0,0,139,140,5,2,0,
|
|
77
|
+
0,140,143,5,17,0,0,141,142,5,4,0,0,142,144,5,17,0,0,143,141,1,0,
|
|
78
|
+
0,0,143,144,1,0,0,0,144,148,1,0,0,0,145,147,3,10,5,0,146,145,1,0,
|
|
79
|
+
0,0,147,150,1,0,0,0,148,146,1,0,0,0,148,149,1,0,0,0,149,151,1,0,
|
|
80
|
+
0,0,150,148,1,0,0,0,151,156,5,20,0,0,152,155,3,16,8,0,153,155,3,
|
|
81
|
+
64,32,0,154,152,1,0,0,0,154,153,1,0,0,0,155,158,1,0,0,0,156,154,
|
|
82
|
+
1,0,0,0,156,157,1,0,0,0,157,159,1,0,0,0,158,156,1,0,0,0,159,160,
|
|
83
|
+
5,21,0,0,160,15,1,0,0,0,161,162,3,18,9,0,162,166,5,17,0,0,163,165,
|
|
84
|
+
3,20,10,0,164,163,1,0,0,0,165,168,1,0,0,0,166,164,1,0,0,0,166,167,
|
|
85
|
+
1,0,0,0,167,170,1,0,0,0,168,166,1,0,0,0,169,171,3,22,11,0,170,169,
|
|
86
|
+
1,0,0,0,170,171,1,0,0,0,171,173,1,0,0,0,172,174,3,28,14,0,173,172,
|
|
87
|
+
1,0,0,0,173,174,1,0,0,0,174,178,1,0,0,0,175,177,3,10,5,0,176,175,
|
|
88
|
+
1,0,0,0,177,180,1,0,0,0,178,176,1,0,0,0,178,179,1,0,0,0,179,184,
|
|
89
|
+
1,0,0,0,180,178,1,0,0,0,181,183,3,40,20,0,182,181,1,0,0,0,183,186,
|
|
90
|
+
1,0,0,0,184,182,1,0,0,0,184,185,1,0,0,0,185,188,1,0,0,0,186,184,
|
|
91
|
+
1,0,0,0,187,189,3,58,29,0,188,187,1,0,0,0,188,189,1,0,0,0,189,191,
|
|
92
|
+
1,0,0,0,190,192,3,60,30,0,191,190,1,0,0,0,191,192,1,0,0,0,192,17,
|
|
93
|
+
1,0,0,0,193,194,7,1,0,0,194,19,1,0,0,0,195,196,5,40,0,0,196,197,
|
|
94
|
+
5,17,0,0,197,21,1,0,0,0,198,199,5,20,0,0,199,204,3,24,12,0,200,201,
|
|
95
|
+
5,44,0,0,201,203,3,24,12,0,202,200,1,0,0,0,203,206,1,0,0,0,204,202,
|
|
96
|
+
1,0,0,0,204,205,1,0,0,0,205,207,1,0,0,0,206,204,1,0,0,0,207,208,
|
|
97
|
+
5,21,0,0,208,23,1,0,0,0,209,210,7,2,0,0,210,25,1,0,0,0,211,212,3,
|
|
98
|
+
28,14,0,212,27,1,0,0,0,213,214,5,26,0,0,214,215,3,30,15,0,215,216,
|
|
99
|
+
5,27,0,0,216,29,1,0,0,0,217,222,3,32,16,0,218,219,7,3,0,0,219,221,
|
|
100
|
+
3,32,16,0,220,218,1,0,0,0,221,224,1,0,0,0,222,220,1,0,0,0,222,223,
|
|
101
|
+
1,0,0,0,223,31,1,0,0,0,224,222,1,0,0,0,225,230,3,34,17,0,226,227,
|
|
102
|
+
7,4,0,0,227,229,3,34,17,0,228,226,1,0,0,0,229,232,1,0,0,0,230,228,
|
|
103
|
+
1,0,0,0,230,231,1,0,0,0,231,33,1,0,0,0,232,230,1,0,0,0,233,236,3,
|
|
104
|
+
36,18,0,234,235,5,47,0,0,235,237,3,36,18,0,236,234,1,0,0,0,236,237,
|
|
105
|
+
1,0,0,0,237,35,1,0,0,0,238,245,3,38,19,0,239,240,5,18,0,0,240,241,
|
|
106
|
+
3,30,15,0,241,242,5,19,0,0,242,245,1,0,0,0,243,245,3,62,31,0,244,
|
|
107
|
+
238,1,0,0,0,244,239,1,0,0,0,244,243,1,0,0,0,245,37,1,0,0,0,246,259,
|
|
108
|
+
5,17,0,0,247,256,5,18,0,0,248,253,3,62,31,0,249,250,5,44,0,0,250,
|
|
109
|
+
252,3,62,31,0,251,249,1,0,0,0,252,255,1,0,0,0,253,251,1,0,0,0,253,
|
|
110
|
+
254,1,0,0,0,254,257,1,0,0,0,255,253,1,0,0,0,256,248,1,0,0,0,256,
|
|
111
|
+
257,1,0,0,0,257,258,1,0,0,0,258,260,5,19,0,0,259,247,1,0,0,0,259,
|
|
112
|
+
260,1,0,0,0,260,39,1,0,0,0,261,263,3,42,21,0,262,264,3,44,22,0,263,
|
|
113
|
+
262,1,0,0,0,263,264,1,0,0,0,264,265,1,0,0,0,265,267,3,46,23,0,266,
|
|
114
|
+
268,3,54,27,0,267,266,1,0,0,0,267,268,1,0,0,0,268,270,1,0,0,0,269,
|
|
115
|
+
271,3,56,28,0,270,269,1,0,0,0,270,271,1,0,0,0,271,41,1,0,0,0,272,
|
|
116
|
+
273,7,5,0,0,273,43,1,0,0,0,274,279,5,17,0,0,275,276,5,35,0,0,276,
|
|
117
|
+
278,5,17,0,0,277,275,1,0,0,0,278,281,1,0,0,0,279,277,1,0,0,0,279,
|
|
118
|
+
280,1,0,0,0,280,45,1,0,0,0,281,279,1,0,0,0,282,283,5,18,0,0,283,
|
|
119
|
+
288,3,48,24,0,284,285,5,44,0,0,285,287,3,48,24,0,286,284,1,0,0,0,
|
|
120
|
+
287,290,1,0,0,0,288,286,1,0,0,0,288,289,1,0,0,0,289,291,1,0,0,0,
|
|
121
|
+
290,288,1,0,0,0,291,292,5,19,0,0,292,47,1,0,0,0,293,294,3,50,25,
|
|
122
|
+
0,294,295,3,52,26,0,295,49,1,0,0,0,296,297,5,17,0,0,297,51,1,0,0,
|
|
123
|
+
0,298,299,5,17,0,0,299,53,1,0,0,0,300,301,5,17,0,0,301,55,1,0,0,
|
|
124
|
+
0,302,303,3,28,14,0,303,57,1,0,0,0,304,305,5,41,0,0,305,310,3,66,
|
|
125
|
+
33,0,306,307,5,44,0,0,307,309,3,66,33,0,308,306,1,0,0,0,309,312,
|
|
126
|
+
1,0,0,0,310,308,1,0,0,0,310,311,1,0,0,0,311,59,1,0,0,0,312,310,1,
|
|
127
|
+
0,0,0,313,314,7,6,0,0,314,319,3,66,33,0,315,316,5,44,0,0,316,318,
|
|
128
|
+
3,66,33,0,317,315,1,0,0,0,318,321,1,0,0,0,319,317,1,0,0,0,319,320,
|
|
129
|
+
1,0,0,0,320,61,1,0,0,0,321,319,1,0,0,0,322,323,7,7,0,0,323,63,1,
|
|
130
|
+
0,0,0,324,325,5,8,0,0,325,326,5,17,0,0,326,327,5,30,0,0,327,328,
|
|
131
|
+
3,66,33,0,328,65,1,0,0,0,329,335,3,68,34,0,330,331,3,76,38,0,331,
|
|
132
|
+
332,3,68,34,0,332,334,1,0,0,0,333,330,1,0,0,0,334,337,1,0,0,0,335,
|
|
133
|
+
333,1,0,0,0,335,336,1,0,0,0,336,67,1,0,0,0,337,335,1,0,0,0,338,343,
|
|
134
|
+
3,70,35,0,339,340,5,35,0,0,340,342,3,70,35,0,341,339,1,0,0,0,342,
|
|
135
|
+
345,1,0,0,0,343,341,1,0,0,0,343,344,1,0,0,0,344,69,1,0,0,0,345,343,
|
|
136
|
+
1,0,0,0,346,347,5,18,0,0,347,348,3,66,33,0,348,349,5,19,0,0,349,
|
|
137
|
+
356,1,0,0,0,350,351,3,72,36,0,351,352,5,18,0,0,352,353,5,19,0,0,
|
|
138
|
+
353,356,1,0,0,0,354,356,5,17,0,0,355,346,1,0,0,0,355,350,1,0,0,0,
|
|
139
|
+
355,354,1,0,0,0,356,358,1,0,0,0,357,359,5,28,0,0,358,357,1,0,0,0,
|
|
140
|
+
358,359,1,0,0,0,359,363,1,0,0,0,360,362,3,74,37,0,361,360,1,0,0,
|
|
141
|
+
0,362,365,1,0,0,0,363,361,1,0,0,0,363,364,1,0,0,0,364,71,1,0,0,0,
|
|
142
|
+
365,363,1,0,0,0,366,367,5,17,0,0,367,73,1,0,0,0,368,369,5,26,0,0,
|
|
143
|
+
369,370,5,17,0,0,370,371,5,27,0,0,371,75,1,0,0,0,372,373,7,8,0,0,
|
|
144
|
+
373,77,1,0,0,0,374,375,5,3,0,0,375,379,5,20,0,0,376,378,3,80,40,
|
|
145
|
+
0,377,376,1,0,0,0,378,381,1,0,0,0,379,377,1,0,0,0,379,380,1,0,0,
|
|
146
|
+
0,380,382,1,0,0,0,381,379,1,0,0,0,382,383,5,21,0,0,383,79,1,0,0,
|
|
147
|
+
0,384,385,5,17,0,0,385,386,3,82,41,0,386,387,3,84,42,0,387,388,5,
|
|
148
|
+
24,0,0,388,389,3,88,44,0,389,390,5,25,0,0,390,391,3,84,42,0,391,
|
|
149
|
+
392,3,82,41,0,392,396,5,17,0,0,393,395,3,10,5,0,394,393,1,0,0,0,
|
|
150
|
+
395,398,1,0,0,0,396,394,1,0,0,0,396,397,1,0,0,0,397,81,1,0,0,0,398,
|
|
151
|
+
396,1,0,0,0,399,400,5,26,0,0,400,401,5,17,0,0,401,402,5,27,0,0,402,
|
|
152
|
+
83,1,0,0,0,403,406,3,86,43,0,404,405,5,34,0,0,405,407,3,86,43,0,
|
|
153
|
+
406,404,1,0,0,0,406,407,1,0,0,0,407,85,1,0,0,0,408,409,7,9,0,0,409,
|
|
154
|
+
87,1,0,0,0,410,411,5,17,0,0,411,89,1,0,0,0,40,93,96,102,117,124,
|
|
155
|
+
137,143,148,154,156,166,170,173,178,184,188,191,204,222,230,236,
|
|
156
|
+
244,253,256,259,263,267,270,279,288,310,319,335,343,355,358,363,
|
|
157
|
+
379,396,406
|
|
131
158
|
]
|
|
132
159
|
|
|
133
160
|
class malParser ( Parser ):
|
|
@@ -142,21 +169,23 @@ class malParser ( Parser ):
|
|
|
142
169
|
|
|
143
170
|
literalNames = [ "<INVALID>", "'abstract'", "'asset'", "'associations'",
|
|
144
171
|
"'extends'", "'include'", "'category'", "'info'", "'let'",
|
|
145
|
-
"<INVALID>", "<INVALID>", "<INVALID>", "
|
|
146
|
-
"'
|
|
147
|
-
"'
|
|
148
|
-
"'
|
|
149
|
-
"'
|
|
150
|
-
"','", "'+'", "'/'", "'^'"
|
|
172
|
+
"<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>",
|
|
173
|
+
"'E'", "'C'", "'I'", "'A'", "<INVALID>", "'('", "')'",
|
|
174
|
+
"'{'", "'}'", "'#'", "':'", "'<--'", "'-->'", "'['",
|
|
175
|
+
"']'", "'*'", "'1'", "'='", "'-'", "'/\\'", "'\\/'",
|
|
176
|
+
"'..'", "'.'", "'&'", "'|'", "'!'", "'!E'", "'@'",
|
|
177
|
+
"'<-'", "'+>'", "'->'", "','", "'+'", "'/'", "'^'",
|
|
178
|
+
"'//!'" ]
|
|
151
179
|
|
|
152
180
|
symbolicNames = [ "<INVALID>", "ABSTRACT", "ASSET", "ASSOCIATIONS",
|
|
153
181
|
"EXTENDS", "INCLUDE", "CATEGORY", "INFO", "LET", "STRING",
|
|
154
|
-
"INT", "FLOAT", "EXISTS", "C",
|
|
155
|
-
"
|
|
156
|
-
"
|
|
157
|
-
"
|
|
158
|
-
"
|
|
159
|
-
"
|
|
182
|
+
"MULTILINE_STRING", "INT", "FLOAT", "EXISTS", "C",
|
|
183
|
+
"I", "A", "ID", "LPAREN", "RPAREN", "LCURLY", "RCURLY",
|
|
184
|
+
"HASH", "COLON", "LARROW", "RARROW", "LSQUARE", "RSQUARE",
|
|
185
|
+
"STAR", "ONE", "ASSIGN", "MINUS", "INTERSECT", "UNION",
|
|
186
|
+
"RANGE", "DOT", "AND", "OR", "EXCLAMATION", "NOTEXISTS",
|
|
187
|
+
"AT", "REQUIRES", "INHERITS", "LEADSTO", "COMMA",
|
|
188
|
+
"PLUS", "DIVIDE", "POWER", "EXCLM_COMM", "INLINE_COMMENT",
|
|
160
189
|
"MULTILINE_COMMENT", "WS" ]
|
|
161
190
|
|
|
162
191
|
RULE_mal = 0
|
|
@@ -165,41 +194,55 @@ class malParser ( Parser ):
|
|
|
165
194
|
RULE_define = 3
|
|
166
195
|
RULE_category = 4
|
|
167
196
|
RULE_meta = 5
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
197
|
+
RULE_text = 6
|
|
198
|
+
RULE_asset = 7
|
|
199
|
+
RULE_step = 8
|
|
200
|
+
RULE_steptype = 9
|
|
201
|
+
RULE_tag = 10
|
|
202
|
+
RULE_cias = 11
|
|
203
|
+
RULE_cia = 12
|
|
204
|
+
RULE_ttc = 13
|
|
205
|
+
RULE_pdist = 14
|
|
206
|
+
RULE_pdistexpr = 15
|
|
207
|
+
RULE_pdistterm = 16
|
|
208
|
+
RULE_pdistfact = 17
|
|
209
|
+
RULE_pdistatom = 18
|
|
210
|
+
RULE_pdistdist = 19
|
|
211
|
+
RULE_detector = 20
|
|
212
|
+
RULE_bang = 21
|
|
213
|
+
RULE_detectorname = 22
|
|
214
|
+
RULE_context = 23
|
|
215
|
+
RULE_contextpart = 24
|
|
216
|
+
RULE_contextasset = 25
|
|
217
|
+
RULE_contextlabel = 26
|
|
218
|
+
RULE_detectortype = 27
|
|
219
|
+
RULE_tprate = 28
|
|
220
|
+
RULE_precondition = 29
|
|
221
|
+
RULE_reaches = 30
|
|
222
|
+
RULE_number = 31
|
|
223
|
+
RULE_variable = 32
|
|
224
|
+
RULE_expr = 33
|
|
225
|
+
RULE_parts = 34
|
|
226
|
+
RULE_part = 35
|
|
227
|
+
RULE_varsubst = 36
|
|
228
|
+
RULE_type = 37
|
|
229
|
+
RULE_setop = 38
|
|
230
|
+
RULE_associations = 39
|
|
231
|
+
RULE_association = 40
|
|
232
|
+
RULE_field = 41
|
|
233
|
+
RULE_mult = 42
|
|
234
|
+
RULE_multatom = 43
|
|
235
|
+
RULE_linkname = 44
|
|
196
236
|
|
|
197
237
|
ruleNames = [ "mal", "declaration", "include", "define", "category",
|
|
198
|
-
"meta", "asset", "step", "steptype", "tag", "cias",
|
|
199
|
-
"
|
|
200
|
-
"
|
|
201
|
-
"
|
|
202
|
-
"
|
|
238
|
+
"meta", "text", "asset", "step", "steptype", "tag", "cias",
|
|
239
|
+
"cia", "ttc", "pdist", "pdistexpr", "pdistterm", "pdistfact",
|
|
240
|
+
"pdistatom", "pdistdist", "detector", "bang", "detectorname",
|
|
241
|
+
"context", "contextpart", "contextasset", "contextlabel",
|
|
242
|
+
"detectortype", "tprate", "precondition", "reaches",
|
|
243
|
+
"number", "variable", "expr", "parts", "part", "varsubst",
|
|
244
|
+
"type", "setop", "associations", "association", "field",
|
|
245
|
+
"mult", "multatom", "linkname" ]
|
|
203
246
|
|
|
204
247
|
EOF = Token.EOF
|
|
205
248
|
ABSTRACT=1
|
|
@@ -211,49 +254,52 @@ class malParser ( Parser ):
|
|
|
211
254
|
INFO=7
|
|
212
255
|
LET=8
|
|
213
256
|
STRING=9
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
257
|
+
MULTILINE_STRING=10
|
|
258
|
+
INT=11
|
|
259
|
+
FLOAT=12
|
|
260
|
+
EXISTS=13
|
|
261
|
+
C=14
|
|
262
|
+
I=15
|
|
263
|
+
A=16
|
|
264
|
+
ID=17
|
|
265
|
+
LPAREN=18
|
|
266
|
+
RPAREN=19
|
|
267
|
+
LCURLY=20
|
|
268
|
+
RCURLY=21
|
|
269
|
+
HASH=22
|
|
270
|
+
COLON=23
|
|
271
|
+
LARROW=24
|
|
272
|
+
RARROW=25
|
|
273
|
+
LSQUARE=26
|
|
274
|
+
RSQUARE=27
|
|
275
|
+
STAR=28
|
|
276
|
+
ONE=29
|
|
277
|
+
ASSIGN=30
|
|
278
|
+
MINUS=31
|
|
279
|
+
INTERSECT=32
|
|
280
|
+
UNION=33
|
|
281
|
+
RANGE=34
|
|
282
|
+
DOT=35
|
|
283
|
+
AND=36
|
|
284
|
+
OR=37
|
|
285
|
+
EXCLAMATION=38
|
|
286
|
+
NOTEXISTS=39
|
|
287
|
+
AT=40
|
|
288
|
+
REQUIRES=41
|
|
289
|
+
INHERITS=42
|
|
290
|
+
LEADSTO=43
|
|
291
|
+
COMMA=44
|
|
292
|
+
PLUS=45
|
|
293
|
+
DIVIDE=46
|
|
294
|
+
POWER=47
|
|
295
|
+
EXCLM_COMM=48
|
|
296
|
+
INLINE_COMMENT=49
|
|
297
|
+
MULTILINE_COMMENT=50
|
|
298
|
+
WS=51
|
|
253
299
|
|
|
254
300
|
def __init__(self, input:TokenStream, output:TextIO = sys.stdout):
|
|
255
301
|
super().__init__(input, output)
|
|
256
|
-
self.checkVersion("4.13.
|
|
302
|
+
self.checkVersion("4.13.2")
|
|
257
303
|
self._interp = ParserATNSimulator(self, self.atn, self.decisionsToDFA, self.sharedContextCache)
|
|
258
304
|
self._predicates = None
|
|
259
305
|
|
|
@@ -303,27 +349,27 @@ class malParser ( Parser ):
|
|
|
303
349
|
self.enterRule(localctx, 0, self.RULE_mal)
|
|
304
350
|
self._la = 0 # Token type
|
|
305
351
|
try:
|
|
306
|
-
self.state =
|
|
352
|
+
self.state = 96
|
|
307
353
|
self._errHandler.sync(self)
|
|
308
354
|
token = self._input.LA(1)
|
|
309
|
-
if token in [3, 5, 6,
|
|
355
|
+
if token in [3, 5, 6, 22]:
|
|
310
356
|
self.enterOuterAlt(localctx, 1)
|
|
311
|
-
self.state =
|
|
357
|
+
self.state = 91
|
|
312
358
|
self._errHandler.sync(self)
|
|
313
359
|
_la = self._input.LA(1)
|
|
314
360
|
while True:
|
|
315
|
-
self.state =
|
|
361
|
+
self.state = 90
|
|
316
362
|
self.declaration()
|
|
317
|
-
self.state =
|
|
363
|
+
self.state = 93
|
|
318
364
|
self._errHandler.sync(self)
|
|
319
365
|
_la = self._input.LA(1)
|
|
320
|
-
if not ((((_la) & ~0x3f) == 0 and ((1 << _la) &
|
|
366
|
+
if not ((((_la) & ~0x3f) == 0 and ((1 << _la) & 4194408) != 0)):
|
|
321
367
|
break
|
|
322
368
|
|
|
323
369
|
pass
|
|
324
370
|
elif token in [-1]:
|
|
325
371
|
self.enterOuterAlt(localctx, 2)
|
|
326
|
-
self.state =
|
|
372
|
+
self.state = 95
|
|
327
373
|
self.match(malParser.EOF)
|
|
328
374
|
pass
|
|
329
375
|
else:
|
|
@@ -386,27 +432,27 @@ class malParser ( Parser ):
|
|
|
386
432
|
localctx = malParser.DeclarationContext(self, self._ctx, self.state)
|
|
387
433
|
self.enterRule(localctx, 2, self.RULE_declaration)
|
|
388
434
|
try:
|
|
389
|
-
self.state =
|
|
435
|
+
self.state = 102
|
|
390
436
|
self._errHandler.sync(self)
|
|
391
437
|
token = self._input.LA(1)
|
|
392
438
|
if token in [5]:
|
|
393
439
|
self.enterOuterAlt(localctx, 1)
|
|
394
|
-
self.state =
|
|
440
|
+
self.state = 98
|
|
395
441
|
self.include()
|
|
396
442
|
pass
|
|
397
|
-
elif token in [
|
|
443
|
+
elif token in [22]:
|
|
398
444
|
self.enterOuterAlt(localctx, 2)
|
|
399
|
-
self.state =
|
|
445
|
+
self.state = 99
|
|
400
446
|
self.define()
|
|
401
447
|
pass
|
|
402
448
|
elif token in [6]:
|
|
403
449
|
self.enterOuterAlt(localctx, 3)
|
|
404
|
-
self.state =
|
|
450
|
+
self.state = 100
|
|
405
451
|
self.category()
|
|
406
452
|
pass
|
|
407
453
|
elif token in [3]:
|
|
408
454
|
self.enterOuterAlt(localctx, 4)
|
|
409
|
-
self.state =
|
|
455
|
+
self.state = 101
|
|
410
456
|
self.associations()
|
|
411
457
|
pass
|
|
412
458
|
else:
|
|
@@ -460,9 +506,9 @@ class malParser ( Parser ):
|
|
|
460
506
|
self.enterRule(localctx, 4, self.RULE_include)
|
|
461
507
|
try:
|
|
462
508
|
self.enterOuterAlt(localctx, 1)
|
|
463
|
-
self.state =
|
|
509
|
+
self.state = 104
|
|
464
510
|
self.match(malParser.INCLUDE)
|
|
465
|
-
self.state =
|
|
511
|
+
self.state = 105
|
|
466
512
|
self.match(malParser.STRING)
|
|
467
513
|
except RecognitionException as re:
|
|
468
514
|
localctx.exception = re
|
|
@@ -518,13 +564,13 @@ class malParser ( Parser ):
|
|
|
518
564
|
self.enterRule(localctx, 6, self.RULE_define)
|
|
519
565
|
try:
|
|
520
566
|
self.enterOuterAlt(localctx, 1)
|
|
521
|
-
self.state =
|
|
567
|
+
self.state = 107
|
|
522
568
|
self.match(malParser.HASH)
|
|
523
|
-
self.state =
|
|
569
|
+
self.state = 108
|
|
524
570
|
self.match(malParser.ID)
|
|
525
|
-
self.state =
|
|
571
|
+
self.state = 109
|
|
526
572
|
self.match(malParser.COLON)
|
|
527
|
-
self.state =
|
|
573
|
+
self.state = 110
|
|
528
574
|
self.match(malParser.STRING)
|
|
529
575
|
except RecognitionException as re:
|
|
530
576
|
localctx.exception = re
|
|
@@ -595,33 +641,33 @@ class malParser ( Parser ):
|
|
|
595
641
|
self._la = 0 # Token type
|
|
596
642
|
try:
|
|
597
643
|
self.enterOuterAlt(localctx, 1)
|
|
598
|
-
self.state =
|
|
644
|
+
self.state = 112
|
|
599
645
|
self.match(malParser.CATEGORY)
|
|
600
|
-
self.state =
|
|
646
|
+
self.state = 113
|
|
601
647
|
self.match(malParser.ID)
|
|
602
|
-
self.state =
|
|
648
|
+
self.state = 117
|
|
603
649
|
self._errHandler.sync(self)
|
|
604
650
|
_la = self._input.LA(1)
|
|
605
|
-
while _la==
|
|
606
|
-
self.state =
|
|
651
|
+
while _la==17:
|
|
652
|
+
self.state = 114
|
|
607
653
|
self.meta()
|
|
608
|
-
self.state =
|
|
654
|
+
self.state = 119
|
|
609
655
|
self._errHandler.sync(self)
|
|
610
656
|
_la = self._input.LA(1)
|
|
611
657
|
|
|
612
|
-
self.state =
|
|
658
|
+
self.state = 120
|
|
613
659
|
self.match(malParser.LCURLY)
|
|
614
|
-
self.state =
|
|
660
|
+
self.state = 124
|
|
615
661
|
self._errHandler.sync(self)
|
|
616
662
|
_la = self._input.LA(1)
|
|
617
663
|
while _la==1 or _la==2:
|
|
618
|
-
self.state =
|
|
664
|
+
self.state = 121
|
|
619
665
|
self.asset()
|
|
620
|
-
self.state =
|
|
666
|
+
self.state = 126
|
|
621
667
|
self._errHandler.sync(self)
|
|
622
668
|
_la = self._input.LA(1)
|
|
623
669
|
|
|
624
|
-
self.state =
|
|
670
|
+
self.state = 127
|
|
625
671
|
self.match(malParser.RCURLY)
|
|
626
672
|
except RecognitionException as re:
|
|
627
673
|
localctx.exception = re
|
|
@@ -648,8 +694,9 @@ class malParser ( Parser ):
|
|
|
648
694
|
def COLON(self):
|
|
649
695
|
return self.getToken(malParser.COLON, 0)
|
|
650
696
|
|
|
651
|
-
def
|
|
652
|
-
return self.
|
|
697
|
+
def text(self):
|
|
698
|
+
return self.getTypedRuleContext(malParser.TextContext,0)
|
|
699
|
+
|
|
653
700
|
|
|
654
701
|
def getRuleIndex(self):
|
|
655
702
|
return malParser.RULE_meta
|
|
@@ -677,14 +724,70 @@ class malParser ( Parser ):
|
|
|
677
724
|
self.enterRule(localctx, 10, self.RULE_meta)
|
|
678
725
|
try:
|
|
679
726
|
self.enterOuterAlt(localctx, 1)
|
|
680
|
-
self.state =
|
|
727
|
+
self.state = 129
|
|
681
728
|
self.match(malParser.ID)
|
|
682
|
-
self.state =
|
|
729
|
+
self.state = 130
|
|
683
730
|
self.match(malParser.INFO)
|
|
684
|
-
self.state =
|
|
731
|
+
self.state = 131
|
|
685
732
|
self.match(malParser.COLON)
|
|
686
|
-
self.state =
|
|
687
|
-
self.
|
|
733
|
+
self.state = 132
|
|
734
|
+
self.text()
|
|
735
|
+
except RecognitionException as re:
|
|
736
|
+
localctx.exception = re
|
|
737
|
+
self._errHandler.reportError(self, re)
|
|
738
|
+
self._errHandler.recover(self, re)
|
|
739
|
+
finally:
|
|
740
|
+
self.exitRule()
|
|
741
|
+
return localctx
|
|
742
|
+
|
|
743
|
+
|
|
744
|
+
class TextContext(ParserRuleContext):
|
|
745
|
+
__slots__ = 'parser'
|
|
746
|
+
|
|
747
|
+
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
|
|
748
|
+
super().__init__(parent, invokingState)
|
|
749
|
+
self.parser = parser
|
|
750
|
+
|
|
751
|
+
def STRING(self):
|
|
752
|
+
return self.getToken(malParser.STRING, 0)
|
|
753
|
+
|
|
754
|
+
def MULTILINE_STRING(self):
|
|
755
|
+
return self.getToken(malParser.MULTILINE_STRING, 0)
|
|
756
|
+
|
|
757
|
+
def getRuleIndex(self):
|
|
758
|
+
return malParser.RULE_text
|
|
759
|
+
|
|
760
|
+
def enterRule(self, listener:ParseTreeListener):
|
|
761
|
+
if hasattr( listener, "enterText" ):
|
|
762
|
+
listener.enterText(self)
|
|
763
|
+
|
|
764
|
+
def exitRule(self, listener:ParseTreeListener):
|
|
765
|
+
if hasattr( listener, "exitText" ):
|
|
766
|
+
listener.exitText(self)
|
|
767
|
+
|
|
768
|
+
def accept(self, visitor:ParseTreeVisitor):
|
|
769
|
+
if hasattr( visitor, "visitText" ):
|
|
770
|
+
return visitor.visitText(self)
|
|
771
|
+
else:
|
|
772
|
+
return visitor.visitChildren(self)
|
|
773
|
+
|
|
774
|
+
|
|
775
|
+
|
|
776
|
+
|
|
777
|
+
def text(self):
|
|
778
|
+
|
|
779
|
+
localctx = malParser.TextContext(self, self._ctx, self.state)
|
|
780
|
+
self.enterRule(localctx, 12, self.RULE_text)
|
|
781
|
+
self._la = 0 # Token type
|
|
782
|
+
try:
|
|
783
|
+
self.enterOuterAlt(localctx, 1)
|
|
784
|
+
self.state = 134
|
|
785
|
+
_la = self._input.LA(1)
|
|
786
|
+
if not(_la==9 or _la==10):
|
|
787
|
+
self._errHandler.recoverInline(self)
|
|
788
|
+
else:
|
|
789
|
+
self._errHandler.reportMatch(self)
|
|
790
|
+
self.consume()
|
|
688
791
|
except RecognitionException as re:
|
|
689
792
|
localctx.exception = re
|
|
690
793
|
self._errHandler.reportError(self, re)
|
|
@@ -766,67 +869,67 @@ class malParser ( Parser ):
|
|
|
766
869
|
def asset(self):
|
|
767
870
|
|
|
768
871
|
localctx = malParser.AssetContext(self, self._ctx, self.state)
|
|
769
|
-
self.enterRule(localctx,
|
|
872
|
+
self.enterRule(localctx, 14, self.RULE_asset)
|
|
770
873
|
self._la = 0 # Token type
|
|
771
874
|
try:
|
|
772
875
|
self.enterOuterAlt(localctx, 1)
|
|
773
|
-
self.state =
|
|
876
|
+
self.state = 137
|
|
774
877
|
self._errHandler.sync(self)
|
|
775
878
|
_la = self._input.LA(1)
|
|
776
879
|
if _la==1:
|
|
777
|
-
self.state =
|
|
880
|
+
self.state = 136
|
|
778
881
|
self.match(malParser.ABSTRACT)
|
|
779
882
|
|
|
780
883
|
|
|
781
|
-
self.state =
|
|
884
|
+
self.state = 139
|
|
782
885
|
self.match(malParser.ASSET)
|
|
783
|
-
self.state =
|
|
886
|
+
self.state = 140
|
|
784
887
|
self.match(malParser.ID)
|
|
785
|
-
self.state =
|
|
888
|
+
self.state = 143
|
|
786
889
|
self._errHandler.sync(self)
|
|
787
890
|
_la = self._input.LA(1)
|
|
788
891
|
if _la==4:
|
|
789
|
-
self.state =
|
|
892
|
+
self.state = 141
|
|
790
893
|
self.match(malParser.EXTENDS)
|
|
791
|
-
self.state =
|
|
894
|
+
self.state = 142
|
|
792
895
|
self.match(malParser.ID)
|
|
793
896
|
|
|
794
897
|
|
|
795
|
-
self.state =
|
|
898
|
+
self.state = 148
|
|
796
899
|
self._errHandler.sync(self)
|
|
797
900
|
_la = self._input.LA(1)
|
|
798
|
-
while _la==
|
|
799
|
-
self.state =
|
|
901
|
+
while _la==17:
|
|
902
|
+
self.state = 145
|
|
800
903
|
self.meta()
|
|
801
|
-
self.state =
|
|
904
|
+
self.state = 150
|
|
802
905
|
self._errHandler.sync(self)
|
|
803
906
|
_la = self._input.LA(1)
|
|
804
907
|
|
|
805
|
-
self.state =
|
|
908
|
+
self.state = 151
|
|
806
909
|
self.match(malParser.LCURLY)
|
|
807
|
-
self.state =
|
|
910
|
+
self.state = 156
|
|
808
911
|
self._errHandler.sync(self)
|
|
809
912
|
_la = self._input.LA(1)
|
|
810
|
-
while (((_la) & ~0x3f) == 0 and ((1 << _la) &
|
|
811
|
-
self.state =
|
|
913
|
+
while (((_la) & ~0x3f) == 0 and ((1 << _la) & 755918446848) != 0):
|
|
914
|
+
self.state = 154
|
|
812
915
|
self._errHandler.sync(self)
|
|
813
916
|
token = self._input.LA(1)
|
|
814
|
-
if token in [
|
|
815
|
-
self.state =
|
|
917
|
+
if token in [13, 22, 36, 37, 39]:
|
|
918
|
+
self.state = 152
|
|
816
919
|
self.step()
|
|
817
920
|
pass
|
|
818
921
|
elif token in [8]:
|
|
819
|
-
self.state =
|
|
922
|
+
self.state = 153
|
|
820
923
|
self.variable()
|
|
821
924
|
pass
|
|
822
925
|
else:
|
|
823
926
|
raise NoViableAltException(self)
|
|
824
927
|
|
|
825
|
-
self.state =
|
|
928
|
+
self.state = 158
|
|
826
929
|
self._errHandler.sync(self)
|
|
827
930
|
_la = self._input.LA(1)
|
|
828
931
|
|
|
829
|
-
self.state =
|
|
932
|
+
self.state = 159
|
|
830
933
|
self.match(malParser.RCURLY)
|
|
831
934
|
except RecognitionException as re:
|
|
832
935
|
localctx.exception = re
|
|
@@ -862,8 +965,8 @@ class malParser ( Parser ):
|
|
|
862
965
|
return self.getTypedRuleContext(malParser.CiasContext,0)
|
|
863
966
|
|
|
864
967
|
|
|
865
|
-
def
|
|
866
|
-
return self.getTypedRuleContext(malParser.
|
|
968
|
+
def pdist(self):
|
|
969
|
+
return self.getTypedRuleContext(malParser.PdistContext,0)
|
|
867
970
|
|
|
868
971
|
|
|
869
972
|
def meta(self, i:int=None):
|
|
@@ -873,6 +976,13 @@ class malParser ( Parser ):
|
|
|
873
976
|
return self.getTypedRuleContext(malParser.MetaContext,i)
|
|
874
977
|
|
|
875
978
|
|
|
979
|
+
def detector(self, i:int=None):
|
|
980
|
+
if i is None:
|
|
981
|
+
return self.getTypedRuleContexts(malParser.DetectorContext)
|
|
982
|
+
else:
|
|
983
|
+
return self.getTypedRuleContext(malParser.DetectorContext,i)
|
|
984
|
+
|
|
985
|
+
|
|
876
986
|
def precondition(self):
|
|
877
987
|
return self.getTypedRuleContext(malParser.PreconditionContext,0)
|
|
878
988
|
|
|
@@ -904,63 +1014,73 @@ class malParser ( Parser ):
|
|
|
904
1014
|
def step(self):
|
|
905
1015
|
|
|
906
1016
|
localctx = malParser.StepContext(self, self._ctx, self.state)
|
|
907
|
-
self.enterRule(localctx,
|
|
1017
|
+
self.enterRule(localctx, 16, self.RULE_step)
|
|
908
1018
|
self._la = 0 # Token type
|
|
909
1019
|
try:
|
|
910
1020
|
self.enterOuterAlt(localctx, 1)
|
|
911
|
-
self.state =
|
|
1021
|
+
self.state = 161
|
|
912
1022
|
self.steptype()
|
|
913
|
-
self.state =
|
|
1023
|
+
self.state = 162
|
|
914
1024
|
self.match(malParser.ID)
|
|
915
|
-
self.state =
|
|
1025
|
+
self.state = 166
|
|
916
1026
|
self._errHandler.sync(self)
|
|
917
1027
|
_la = self._input.LA(1)
|
|
918
|
-
while _la==
|
|
919
|
-
self.state =
|
|
1028
|
+
while _la==40:
|
|
1029
|
+
self.state = 163
|
|
920
1030
|
self.tag()
|
|
921
|
-
self.state =
|
|
1031
|
+
self.state = 168
|
|
922
1032
|
self._errHandler.sync(self)
|
|
923
1033
|
_la = self._input.LA(1)
|
|
924
1034
|
|
|
925
|
-
self.state =
|
|
1035
|
+
self.state = 170
|
|
926
1036
|
self._errHandler.sync(self)
|
|
927
1037
|
_la = self._input.LA(1)
|
|
928
|
-
if _la==
|
|
929
|
-
self.state =
|
|
1038
|
+
if _la==20:
|
|
1039
|
+
self.state = 169
|
|
930
1040
|
self.cias()
|
|
931
1041
|
|
|
932
1042
|
|
|
933
|
-
self.state =
|
|
1043
|
+
self.state = 173
|
|
934
1044
|
self._errHandler.sync(self)
|
|
935
1045
|
_la = self._input.LA(1)
|
|
936
|
-
if _la==
|
|
937
|
-
self.state =
|
|
938
|
-
self.
|
|
1046
|
+
if _la==26:
|
|
1047
|
+
self.state = 172
|
|
1048
|
+
self.pdist()
|
|
939
1049
|
|
|
940
1050
|
|
|
941
|
-
self.state =
|
|
1051
|
+
self.state = 178
|
|
942
1052
|
self._errHandler.sync(self)
|
|
943
1053
|
_la = self._input.LA(1)
|
|
944
|
-
while _la==
|
|
945
|
-
self.state =
|
|
1054
|
+
while _la==17:
|
|
1055
|
+
self.state = 175
|
|
946
1056
|
self.meta()
|
|
947
|
-
self.state =
|
|
1057
|
+
self.state = 180
|
|
1058
|
+
self._errHandler.sync(self)
|
|
1059
|
+
_la = self._input.LA(1)
|
|
1060
|
+
|
|
1061
|
+
self.state = 184
|
|
1062
|
+
self._errHandler.sync(self)
|
|
1063
|
+
_la = self._input.LA(1)
|
|
1064
|
+
while _la==38 or _la==48:
|
|
1065
|
+
self.state = 181
|
|
1066
|
+
self.detector()
|
|
1067
|
+
self.state = 186
|
|
948
1068
|
self._errHandler.sync(self)
|
|
949
1069
|
_la = self._input.LA(1)
|
|
950
1070
|
|
|
951
|
-
self.state =
|
|
1071
|
+
self.state = 188
|
|
952
1072
|
self._errHandler.sync(self)
|
|
953
1073
|
_la = self._input.LA(1)
|
|
954
|
-
if _la==
|
|
955
|
-
self.state =
|
|
1074
|
+
if _la==41:
|
|
1075
|
+
self.state = 187
|
|
956
1076
|
self.precondition()
|
|
957
1077
|
|
|
958
1078
|
|
|
959
|
-
self.state =
|
|
1079
|
+
self.state = 191
|
|
960
1080
|
self._errHandler.sync(self)
|
|
961
1081
|
_la = self._input.LA(1)
|
|
962
|
-
if _la==
|
|
963
|
-
self.state =
|
|
1082
|
+
if _la==42 or _la==43:
|
|
1083
|
+
self.state = 190
|
|
964
1084
|
self.reaches()
|
|
965
1085
|
|
|
966
1086
|
|
|
@@ -1018,13 +1138,13 @@ class malParser ( Parser ):
|
|
|
1018
1138
|
def steptype(self):
|
|
1019
1139
|
|
|
1020
1140
|
localctx = malParser.SteptypeContext(self, self._ctx, self.state)
|
|
1021
|
-
self.enterRule(localctx,
|
|
1141
|
+
self.enterRule(localctx, 18, self.RULE_steptype)
|
|
1022
1142
|
self._la = 0 # Token type
|
|
1023
1143
|
try:
|
|
1024
1144
|
self.enterOuterAlt(localctx, 1)
|
|
1025
|
-
self.state =
|
|
1145
|
+
self.state = 193
|
|
1026
1146
|
_la = self._input.LA(1)
|
|
1027
|
-
if not((((_la) & ~0x3f) == 0 and ((1 << _la) &
|
|
1147
|
+
if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 755918446592) != 0)):
|
|
1028
1148
|
self._errHandler.recoverInline(self)
|
|
1029
1149
|
else:
|
|
1030
1150
|
self._errHandler.reportMatch(self)
|
|
@@ -1074,12 +1194,12 @@ class malParser ( Parser ):
|
|
|
1074
1194
|
def tag(self):
|
|
1075
1195
|
|
|
1076
1196
|
localctx = malParser.TagContext(self, self._ctx, self.state)
|
|
1077
|
-
self.enterRule(localctx,
|
|
1197
|
+
self.enterRule(localctx, 20, self.RULE_tag)
|
|
1078
1198
|
try:
|
|
1079
1199
|
self.enterOuterAlt(localctx, 1)
|
|
1080
|
-
self.state =
|
|
1200
|
+
self.state = 195
|
|
1081
1201
|
self.match(malParser.AT)
|
|
1082
|
-
self.state =
|
|
1202
|
+
self.state = 196
|
|
1083
1203
|
self.match(malParser.ID)
|
|
1084
1204
|
except RecognitionException as re:
|
|
1085
1205
|
localctx.exception = re
|
|
@@ -1139,27 +1259,27 @@ class malParser ( Parser ):
|
|
|
1139
1259
|
def cias(self):
|
|
1140
1260
|
|
|
1141
1261
|
localctx = malParser.CiasContext(self, self._ctx, self.state)
|
|
1142
|
-
self.enterRule(localctx,
|
|
1262
|
+
self.enterRule(localctx, 22, self.RULE_cias)
|
|
1143
1263
|
self._la = 0 # Token type
|
|
1144
1264
|
try:
|
|
1145
1265
|
self.enterOuterAlt(localctx, 1)
|
|
1146
|
-
self.state =
|
|
1266
|
+
self.state = 198
|
|
1147
1267
|
self.match(malParser.LCURLY)
|
|
1148
|
-
self.state =
|
|
1268
|
+
self.state = 199
|
|
1149
1269
|
self.cia()
|
|
1150
|
-
self.state =
|
|
1270
|
+
self.state = 204
|
|
1151
1271
|
self._errHandler.sync(self)
|
|
1152
1272
|
_la = self._input.LA(1)
|
|
1153
|
-
while _la==
|
|
1154
|
-
self.state =
|
|
1273
|
+
while _la==44:
|
|
1274
|
+
self.state = 200
|
|
1155
1275
|
self.match(malParser.COMMA)
|
|
1156
|
-
self.state =
|
|
1276
|
+
self.state = 201
|
|
1157
1277
|
self.cia()
|
|
1158
|
-
self.state =
|
|
1278
|
+
self.state = 206
|
|
1159
1279
|
self._errHandler.sync(self)
|
|
1160
1280
|
_la = self._input.LA(1)
|
|
1161
1281
|
|
|
1162
|
-
self.state =
|
|
1282
|
+
self.state = 207
|
|
1163
1283
|
self.match(malParser.RCURLY)
|
|
1164
1284
|
except RecognitionException as re:
|
|
1165
1285
|
localctx.exception = re
|
|
@@ -1190,32 +1310,693 @@ class malParser ( Parser ):
|
|
|
1190
1310
|
return malParser.RULE_cia
|
|
1191
1311
|
|
|
1192
1312
|
def enterRule(self, listener:ParseTreeListener):
|
|
1193
|
-
if hasattr( listener, "enterCia" ):
|
|
1194
|
-
listener.enterCia(self)
|
|
1313
|
+
if hasattr( listener, "enterCia" ):
|
|
1314
|
+
listener.enterCia(self)
|
|
1315
|
+
|
|
1316
|
+
def exitRule(self, listener:ParseTreeListener):
|
|
1317
|
+
if hasattr( listener, "exitCia" ):
|
|
1318
|
+
listener.exitCia(self)
|
|
1319
|
+
|
|
1320
|
+
def accept(self, visitor:ParseTreeVisitor):
|
|
1321
|
+
if hasattr( visitor, "visitCia" ):
|
|
1322
|
+
return visitor.visitCia(self)
|
|
1323
|
+
else:
|
|
1324
|
+
return visitor.visitChildren(self)
|
|
1325
|
+
|
|
1326
|
+
|
|
1327
|
+
|
|
1328
|
+
|
|
1329
|
+
def cia(self):
|
|
1330
|
+
|
|
1331
|
+
localctx = malParser.CiaContext(self, self._ctx, self.state)
|
|
1332
|
+
self.enterRule(localctx, 24, self.RULE_cia)
|
|
1333
|
+
self._la = 0 # Token type
|
|
1334
|
+
try:
|
|
1335
|
+
self.enterOuterAlt(localctx, 1)
|
|
1336
|
+
self.state = 209
|
|
1337
|
+
_la = self._input.LA(1)
|
|
1338
|
+
if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 114688) != 0)):
|
|
1339
|
+
self._errHandler.recoverInline(self)
|
|
1340
|
+
else:
|
|
1341
|
+
self._errHandler.reportMatch(self)
|
|
1342
|
+
self.consume()
|
|
1343
|
+
except RecognitionException as re:
|
|
1344
|
+
localctx.exception = re
|
|
1345
|
+
self._errHandler.reportError(self, re)
|
|
1346
|
+
self._errHandler.recover(self, re)
|
|
1347
|
+
finally:
|
|
1348
|
+
self.exitRule()
|
|
1349
|
+
return localctx
|
|
1350
|
+
|
|
1351
|
+
|
|
1352
|
+
class TtcContext(ParserRuleContext):
|
|
1353
|
+
__slots__ = 'parser'
|
|
1354
|
+
|
|
1355
|
+
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
|
|
1356
|
+
super().__init__(parent, invokingState)
|
|
1357
|
+
self.parser = parser
|
|
1358
|
+
|
|
1359
|
+
def pdist(self):
|
|
1360
|
+
return self.getTypedRuleContext(malParser.PdistContext,0)
|
|
1361
|
+
|
|
1362
|
+
|
|
1363
|
+
def getRuleIndex(self):
|
|
1364
|
+
return malParser.RULE_ttc
|
|
1365
|
+
|
|
1366
|
+
def enterRule(self, listener:ParseTreeListener):
|
|
1367
|
+
if hasattr( listener, "enterTtc" ):
|
|
1368
|
+
listener.enterTtc(self)
|
|
1369
|
+
|
|
1370
|
+
def exitRule(self, listener:ParseTreeListener):
|
|
1371
|
+
if hasattr( listener, "exitTtc" ):
|
|
1372
|
+
listener.exitTtc(self)
|
|
1373
|
+
|
|
1374
|
+
def accept(self, visitor:ParseTreeVisitor):
|
|
1375
|
+
if hasattr( visitor, "visitTtc" ):
|
|
1376
|
+
return visitor.visitTtc(self)
|
|
1377
|
+
else:
|
|
1378
|
+
return visitor.visitChildren(self)
|
|
1379
|
+
|
|
1380
|
+
|
|
1381
|
+
|
|
1382
|
+
|
|
1383
|
+
def ttc(self):
|
|
1384
|
+
|
|
1385
|
+
localctx = malParser.TtcContext(self, self._ctx, self.state)
|
|
1386
|
+
self.enterRule(localctx, 26, self.RULE_ttc)
|
|
1387
|
+
try:
|
|
1388
|
+
self.enterOuterAlt(localctx, 1)
|
|
1389
|
+
self.state = 211
|
|
1390
|
+
self.pdist()
|
|
1391
|
+
except RecognitionException as re:
|
|
1392
|
+
localctx.exception = re
|
|
1393
|
+
self._errHandler.reportError(self, re)
|
|
1394
|
+
self._errHandler.recover(self, re)
|
|
1395
|
+
finally:
|
|
1396
|
+
self.exitRule()
|
|
1397
|
+
return localctx
|
|
1398
|
+
|
|
1399
|
+
|
|
1400
|
+
class PdistContext(ParserRuleContext):
|
|
1401
|
+
__slots__ = 'parser'
|
|
1402
|
+
|
|
1403
|
+
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
|
|
1404
|
+
super().__init__(parent, invokingState)
|
|
1405
|
+
self.parser = parser
|
|
1406
|
+
|
|
1407
|
+
def LSQUARE(self):
|
|
1408
|
+
return self.getToken(malParser.LSQUARE, 0)
|
|
1409
|
+
|
|
1410
|
+
def pdistexpr(self):
|
|
1411
|
+
return self.getTypedRuleContext(malParser.PdistexprContext,0)
|
|
1412
|
+
|
|
1413
|
+
|
|
1414
|
+
def RSQUARE(self):
|
|
1415
|
+
return self.getToken(malParser.RSQUARE, 0)
|
|
1416
|
+
|
|
1417
|
+
def getRuleIndex(self):
|
|
1418
|
+
return malParser.RULE_pdist
|
|
1419
|
+
|
|
1420
|
+
def enterRule(self, listener:ParseTreeListener):
|
|
1421
|
+
if hasattr( listener, "enterPdist" ):
|
|
1422
|
+
listener.enterPdist(self)
|
|
1423
|
+
|
|
1424
|
+
def exitRule(self, listener:ParseTreeListener):
|
|
1425
|
+
if hasattr( listener, "exitPdist" ):
|
|
1426
|
+
listener.exitPdist(self)
|
|
1427
|
+
|
|
1428
|
+
def accept(self, visitor:ParseTreeVisitor):
|
|
1429
|
+
if hasattr( visitor, "visitPdist" ):
|
|
1430
|
+
return visitor.visitPdist(self)
|
|
1431
|
+
else:
|
|
1432
|
+
return visitor.visitChildren(self)
|
|
1433
|
+
|
|
1434
|
+
|
|
1435
|
+
|
|
1436
|
+
|
|
1437
|
+
def pdist(self):
|
|
1438
|
+
|
|
1439
|
+
localctx = malParser.PdistContext(self, self._ctx, self.state)
|
|
1440
|
+
self.enterRule(localctx, 28, self.RULE_pdist)
|
|
1441
|
+
try:
|
|
1442
|
+
self.enterOuterAlt(localctx, 1)
|
|
1443
|
+
self.state = 213
|
|
1444
|
+
self.match(malParser.LSQUARE)
|
|
1445
|
+
self.state = 214
|
|
1446
|
+
self.pdistexpr()
|
|
1447
|
+
self.state = 215
|
|
1448
|
+
self.match(malParser.RSQUARE)
|
|
1449
|
+
except RecognitionException as re:
|
|
1450
|
+
localctx.exception = re
|
|
1451
|
+
self._errHandler.reportError(self, re)
|
|
1452
|
+
self._errHandler.recover(self, re)
|
|
1453
|
+
finally:
|
|
1454
|
+
self.exitRule()
|
|
1455
|
+
return localctx
|
|
1456
|
+
|
|
1457
|
+
|
|
1458
|
+
class PdistexprContext(ParserRuleContext):
|
|
1459
|
+
__slots__ = 'parser'
|
|
1460
|
+
|
|
1461
|
+
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
|
|
1462
|
+
super().__init__(parent, invokingState)
|
|
1463
|
+
self.parser = parser
|
|
1464
|
+
|
|
1465
|
+
def pdistterm(self, i:int=None):
|
|
1466
|
+
if i is None:
|
|
1467
|
+
return self.getTypedRuleContexts(malParser.PdisttermContext)
|
|
1468
|
+
else:
|
|
1469
|
+
return self.getTypedRuleContext(malParser.PdisttermContext,i)
|
|
1470
|
+
|
|
1471
|
+
|
|
1472
|
+
def PLUS(self, i:int=None):
|
|
1473
|
+
if i is None:
|
|
1474
|
+
return self.getTokens(malParser.PLUS)
|
|
1475
|
+
else:
|
|
1476
|
+
return self.getToken(malParser.PLUS, i)
|
|
1477
|
+
|
|
1478
|
+
def MINUS(self, i:int=None):
|
|
1479
|
+
if i is None:
|
|
1480
|
+
return self.getTokens(malParser.MINUS)
|
|
1481
|
+
else:
|
|
1482
|
+
return self.getToken(malParser.MINUS, i)
|
|
1483
|
+
|
|
1484
|
+
def getRuleIndex(self):
|
|
1485
|
+
return malParser.RULE_pdistexpr
|
|
1486
|
+
|
|
1487
|
+
def enterRule(self, listener:ParseTreeListener):
|
|
1488
|
+
if hasattr( listener, "enterPdistexpr" ):
|
|
1489
|
+
listener.enterPdistexpr(self)
|
|
1490
|
+
|
|
1491
|
+
def exitRule(self, listener:ParseTreeListener):
|
|
1492
|
+
if hasattr( listener, "exitPdistexpr" ):
|
|
1493
|
+
listener.exitPdistexpr(self)
|
|
1494
|
+
|
|
1495
|
+
def accept(self, visitor:ParseTreeVisitor):
|
|
1496
|
+
if hasattr( visitor, "visitPdistexpr" ):
|
|
1497
|
+
return visitor.visitPdistexpr(self)
|
|
1498
|
+
else:
|
|
1499
|
+
return visitor.visitChildren(self)
|
|
1500
|
+
|
|
1501
|
+
|
|
1502
|
+
|
|
1503
|
+
|
|
1504
|
+
def pdistexpr(self):
|
|
1505
|
+
|
|
1506
|
+
localctx = malParser.PdistexprContext(self, self._ctx, self.state)
|
|
1507
|
+
self.enterRule(localctx, 30, self.RULE_pdistexpr)
|
|
1508
|
+
self._la = 0 # Token type
|
|
1509
|
+
try:
|
|
1510
|
+
self.enterOuterAlt(localctx, 1)
|
|
1511
|
+
self.state = 217
|
|
1512
|
+
self.pdistterm()
|
|
1513
|
+
self.state = 222
|
|
1514
|
+
self._errHandler.sync(self)
|
|
1515
|
+
_la = self._input.LA(1)
|
|
1516
|
+
while _la==31 or _la==45:
|
|
1517
|
+
self.state = 218
|
|
1518
|
+
_la = self._input.LA(1)
|
|
1519
|
+
if not(_la==31 or _la==45):
|
|
1520
|
+
self._errHandler.recoverInline(self)
|
|
1521
|
+
else:
|
|
1522
|
+
self._errHandler.reportMatch(self)
|
|
1523
|
+
self.consume()
|
|
1524
|
+
self.state = 219
|
|
1525
|
+
self.pdistterm()
|
|
1526
|
+
self.state = 224
|
|
1527
|
+
self._errHandler.sync(self)
|
|
1528
|
+
_la = self._input.LA(1)
|
|
1529
|
+
|
|
1530
|
+
except RecognitionException as re:
|
|
1531
|
+
localctx.exception = re
|
|
1532
|
+
self._errHandler.reportError(self, re)
|
|
1533
|
+
self._errHandler.recover(self, re)
|
|
1534
|
+
finally:
|
|
1535
|
+
self.exitRule()
|
|
1536
|
+
return localctx
|
|
1537
|
+
|
|
1538
|
+
|
|
1539
|
+
class PdisttermContext(ParserRuleContext):
|
|
1540
|
+
__slots__ = 'parser'
|
|
1541
|
+
|
|
1542
|
+
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
|
|
1543
|
+
super().__init__(parent, invokingState)
|
|
1544
|
+
self.parser = parser
|
|
1545
|
+
|
|
1546
|
+
def pdistfact(self, i:int=None):
|
|
1547
|
+
if i is None:
|
|
1548
|
+
return self.getTypedRuleContexts(malParser.PdistfactContext)
|
|
1549
|
+
else:
|
|
1550
|
+
return self.getTypedRuleContext(malParser.PdistfactContext,i)
|
|
1551
|
+
|
|
1552
|
+
|
|
1553
|
+
def STAR(self, i:int=None):
|
|
1554
|
+
if i is None:
|
|
1555
|
+
return self.getTokens(malParser.STAR)
|
|
1556
|
+
else:
|
|
1557
|
+
return self.getToken(malParser.STAR, i)
|
|
1558
|
+
|
|
1559
|
+
def DIVIDE(self, i:int=None):
|
|
1560
|
+
if i is None:
|
|
1561
|
+
return self.getTokens(malParser.DIVIDE)
|
|
1562
|
+
else:
|
|
1563
|
+
return self.getToken(malParser.DIVIDE, i)
|
|
1564
|
+
|
|
1565
|
+
def getRuleIndex(self):
|
|
1566
|
+
return malParser.RULE_pdistterm
|
|
1567
|
+
|
|
1568
|
+
def enterRule(self, listener:ParseTreeListener):
|
|
1569
|
+
if hasattr( listener, "enterPdistterm" ):
|
|
1570
|
+
listener.enterPdistterm(self)
|
|
1571
|
+
|
|
1572
|
+
def exitRule(self, listener:ParseTreeListener):
|
|
1573
|
+
if hasattr( listener, "exitPdistterm" ):
|
|
1574
|
+
listener.exitPdistterm(self)
|
|
1575
|
+
|
|
1576
|
+
def accept(self, visitor:ParseTreeVisitor):
|
|
1577
|
+
if hasattr( visitor, "visitPdistterm" ):
|
|
1578
|
+
return visitor.visitPdistterm(self)
|
|
1579
|
+
else:
|
|
1580
|
+
return visitor.visitChildren(self)
|
|
1581
|
+
|
|
1582
|
+
|
|
1583
|
+
|
|
1584
|
+
|
|
1585
|
+
def pdistterm(self):
|
|
1586
|
+
|
|
1587
|
+
localctx = malParser.PdisttermContext(self, self._ctx, self.state)
|
|
1588
|
+
self.enterRule(localctx, 32, self.RULE_pdistterm)
|
|
1589
|
+
self._la = 0 # Token type
|
|
1590
|
+
try:
|
|
1591
|
+
self.enterOuterAlt(localctx, 1)
|
|
1592
|
+
self.state = 225
|
|
1593
|
+
self.pdistfact()
|
|
1594
|
+
self.state = 230
|
|
1595
|
+
self._errHandler.sync(self)
|
|
1596
|
+
_la = self._input.LA(1)
|
|
1597
|
+
while _la==28 or _la==46:
|
|
1598
|
+
self.state = 226
|
|
1599
|
+
_la = self._input.LA(1)
|
|
1600
|
+
if not(_la==28 or _la==46):
|
|
1601
|
+
self._errHandler.recoverInline(self)
|
|
1602
|
+
else:
|
|
1603
|
+
self._errHandler.reportMatch(self)
|
|
1604
|
+
self.consume()
|
|
1605
|
+
self.state = 227
|
|
1606
|
+
self.pdistfact()
|
|
1607
|
+
self.state = 232
|
|
1608
|
+
self._errHandler.sync(self)
|
|
1609
|
+
_la = self._input.LA(1)
|
|
1610
|
+
|
|
1611
|
+
except RecognitionException as re:
|
|
1612
|
+
localctx.exception = re
|
|
1613
|
+
self._errHandler.reportError(self, re)
|
|
1614
|
+
self._errHandler.recover(self, re)
|
|
1615
|
+
finally:
|
|
1616
|
+
self.exitRule()
|
|
1617
|
+
return localctx
|
|
1618
|
+
|
|
1619
|
+
|
|
1620
|
+
class PdistfactContext(ParserRuleContext):
|
|
1621
|
+
__slots__ = 'parser'
|
|
1622
|
+
|
|
1623
|
+
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
|
|
1624
|
+
super().__init__(parent, invokingState)
|
|
1625
|
+
self.parser = parser
|
|
1626
|
+
|
|
1627
|
+
def pdistatom(self, i:int=None):
|
|
1628
|
+
if i is None:
|
|
1629
|
+
return self.getTypedRuleContexts(malParser.PdistatomContext)
|
|
1630
|
+
else:
|
|
1631
|
+
return self.getTypedRuleContext(malParser.PdistatomContext,i)
|
|
1632
|
+
|
|
1633
|
+
|
|
1634
|
+
def POWER(self):
|
|
1635
|
+
return self.getToken(malParser.POWER, 0)
|
|
1636
|
+
|
|
1637
|
+
def getRuleIndex(self):
|
|
1638
|
+
return malParser.RULE_pdistfact
|
|
1639
|
+
|
|
1640
|
+
def enterRule(self, listener:ParseTreeListener):
|
|
1641
|
+
if hasattr( listener, "enterPdistfact" ):
|
|
1642
|
+
listener.enterPdistfact(self)
|
|
1643
|
+
|
|
1644
|
+
def exitRule(self, listener:ParseTreeListener):
|
|
1645
|
+
if hasattr( listener, "exitPdistfact" ):
|
|
1646
|
+
listener.exitPdistfact(self)
|
|
1647
|
+
|
|
1648
|
+
def accept(self, visitor:ParseTreeVisitor):
|
|
1649
|
+
if hasattr( visitor, "visitPdistfact" ):
|
|
1650
|
+
return visitor.visitPdistfact(self)
|
|
1651
|
+
else:
|
|
1652
|
+
return visitor.visitChildren(self)
|
|
1653
|
+
|
|
1654
|
+
|
|
1655
|
+
|
|
1656
|
+
|
|
1657
|
+
def pdistfact(self):
|
|
1658
|
+
|
|
1659
|
+
localctx = malParser.PdistfactContext(self, self._ctx, self.state)
|
|
1660
|
+
self.enterRule(localctx, 34, self.RULE_pdistfact)
|
|
1661
|
+
self._la = 0 # Token type
|
|
1662
|
+
try:
|
|
1663
|
+
self.enterOuterAlt(localctx, 1)
|
|
1664
|
+
self.state = 233
|
|
1665
|
+
self.pdistatom()
|
|
1666
|
+
self.state = 236
|
|
1667
|
+
self._errHandler.sync(self)
|
|
1668
|
+
_la = self._input.LA(1)
|
|
1669
|
+
if _la==47:
|
|
1670
|
+
self.state = 234
|
|
1671
|
+
self.match(malParser.POWER)
|
|
1672
|
+
self.state = 235
|
|
1673
|
+
self.pdistatom()
|
|
1674
|
+
|
|
1675
|
+
|
|
1676
|
+
except RecognitionException as re:
|
|
1677
|
+
localctx.exception = re
|
|
1678
|
+
self._errHandler.reportError(self, re)
|
|
1679
|
+
self._errHandler.recover(self, re)
|
|
1680
|
+
finally:
|
|
1681
|
+
self.exitRule()
|
|
1682
|
+
return localctx
|
|
1683
|
+
|
|
1684
|
+
|
|
1685
|
+
class PdistatomContext(ParserRuleContext):
|
|
1686
|
+
__slots__ = 'parser'
|
|
1687
|
+
|
|
1688
|
+
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
|
|
1689
|
+
super().__init__(parent, invokingState)
|
|
1690
|
+
self.parser = parser
|
|
1691
|
+
|
|
1692
|
+
def pdistdist(self):
|
|
1693
|
+
return self.getTypedRuleContext(malParser.PdistdistContext,0)
|
|
1694
|
+
|
|
1695
|
+
|
|
1696
|
+
def LPAREN(self):
|
|
1697
|
+
return self.getToken(malParser.LPAREN, 0)
|
|
1698
|
+
|
|
1699
|
+
def pdistexpr(self):
|
|
1700
|
+
return self.getTypedRuleContext(malParser.PdistexprContext,0)
|
|
1701
|
+
|
|
1702
|
+
|
|
1703
|
+
def RPAREN(self):
|
|
1704
|
+
return self.getToken(malParser.RPAREN, 0)
|
|
1705
|
+
|
|
1706
|
+
def number(self):
|
|
1707
|
+
return self.getTypedRuleContext(malParser.NumberContext,0)
|
|
1708
|
+
|
|
1709
|
+
|
|
1710
|
+
def getRuleIndex(self):
|
|
1711
|
+
return malParser.RULE_pdistatom
|
|
1712
|
+
|
|
1713
|
+
def enterRule(self, listener:ParseTreeListener):
|
|
1714
|
+
if hasattr( listener, "enterPdistatom" ):
|
|
1715
|
+
listener.enterPdistatom(self)
|
|
1716
|
+
|
|
1717
|
+
def exitRule(self, listener:ParseTreeListener):
|
|
1718
|
+
if hasattr( listener, "exitPdistatom" ):
|
|
1719
|
+
listener.exitPdistatom(self)
|
|
1720
|
+
|
|
1721
|
+
def accept(self, visitor:ParseTreeVisitor):
|
|
1722
|
+
if hasattr( visitor, "visitPdistatom" ):
|
|
1723
|
+
return visitor.visitPdistatom(self)
|
|
1724
|
+
else:
|
|
1725
|
+
return visitor.visitChildren(self)
|
|
1726
|
+
|
|
1727
|
+
|
|
1728
|
+
|
|
1729
|
+
|
|
1730
|
+
def pdistatom(self):
|
|
1731
|
+
|
|
1732
|
+
localctx = malParser.PdistatomContext(self, self._ctx, self.state)
|
|
1733
|
+
self.enterRule(localctx, 36, self.RULE_pdistatom)
|
|
1734
|
+
try:
|
|
1735
|
+
self.state = 244
|
|
1736
|
+
self._errHandler.sync(self)
|
|
1737
|
+
token = self._input.LA(1)
|
|
1738
|
+
if token in [17]:
|
|
1739
|
+
self.enterOuterAlt(localctx, 1)
|
|
1740
|
+
self.state = 238
|
|
1741
|
+
self.pdistdist()
|
|
1742
|
+
pass
|
|
1743
|
+
elif token in [18]:
|
|
1744
|
+
self.enterOuterAlt(localctx, 2)
|
|
1745
|
+
self.state = 239
|
|
1746
|
+
self.match(malParser.LPAREN)
|
|
1747
|
+
self.state = 240
|
|
1748
|
+
self.pdistexpr()
|
|
1749
|
+
self.state = 241
|
|
1750
|
+
self.match(malParser.RPAREN)
|
|
1751
|
+
pass
|
|
1752
|
+
elif token in [11, 12]:
|
|
1753
|
+
self.enterOuterAlt(localctx, 3)
|
|
1754
|
+
self.state = 243
|
|
1755
|
+
self.number()
|
|
1756
|
+
pass
|
|
1757
|
+
else:
|
|
1758
|
+
raise NoViableAltException(self)
|
|
1759
|
+
|
|
1760
|
+
except RecognitionException as re:
|
|
1761
|
+
localctx.exception = re
|
|
1762
|
+
self._errHandler.reportError(self, re)
|
|
1763
|
+
self._errHandler.recover(self, re)
|
|
1764
|
+
finally:
|
|
1765
|
+
self.exitRule()
|
|
1766
|
+
return localctx
|
|
1767
|
+
|
|
1768
|
+
|
|
1769
|
+
class PdistdistContext(ParserRuleContext):
|
|
1770
|
+
__slots__ = 'parser'
|
|
1771
|
+
|
|
1772
|
+
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
|
|
1773
|
+
super().__init__(parent, invokingState)
|
|
1774
|
+
self.parser = parser
|
|
1775
|
+
|
|
1776
|
+
def ID(self):
|
|
1777
|
+
return self.getToken(malParser.ID, 0)
|
|
1778
|
+
|
|
1779
|
+
def LPAREN(self):
|
|
1780
|
+
return self.getToken(malParser.LPAREN, 0)
|
|
1781
|
+
|
|
1782
|
+
def RPAREN(self):
|
|
1783
|
+
return self.getToken(malParser.RPAREN, 0)
|
|
1784
|
+
|
|
1785
|
+
def number(self, i:int=None):
|
|
1786
|
+
if i is None:
|
|
1787
|
+
return self.getTypedRuleContexts(malParser.NumberContext)
|
|
1788
|
+
else:
|
|
1789
|
+
return self.getTypedRuleContext(malParser.NumberContext,i)
|
|
1790
|
+
|
|
1791
|
+
|
|
1792
|
+
def COMMA(self, i:int=None):
|
|
1793
|
+
if i is None:
|
|
1794
|
+
return self.getTokens(malParser.COMMA)
|
|
1795
|
+
else:
|
|
1796
|
+
return self.getToken(malParser.COMMA, i)
|
|
1797
|
+
|
|
1798
|
+
def getRuleIndex(self):
|
|
1799
|
+
return malParser.RULE_pdistdist
|
|
1800
|
+
|
|
1801
|
+
def enterRule(self, listener:ParseTreeListener):
|
|
1802
|
+
if hasattr( listener, "enterPdistdist" ):
|
|
1803
|
+
listener.enterPdistdist(self)
|
|
1804
|
+
|
|
1805
|
+
def exitRule(self, listener:ParseTreeListener):
|
|
1806
|
+
if hasattr( listener, "exitPdistdist" ):
|
|
1807
|
+
listener.exitPdistdist(self)
|
|
1808
|
+
|
|
1809
|
+
def accept(self, visitor:ParseTreeVisitor):
|
|
1810
|
+
if hasattr( visitor, "visitPdistdist" ):
|
|
1811
|
+
return visitor.visitPdistdist(self)
|
|
1812
|
+
else:
|
|
1813
|
+
return visitor.visitChildren(self)
|
|
1814
|
+
|
|
1815
|
+
|
|
1816
|
+
|
|
1817
|
+
|
|
1818
|
+
def pdistdist(self):
|
|
1819
|
+
|
|
1820
|
+
localctx = malParser.PdistdistContext(self, self._ctx, self.state)
|
|
1821
|
+
self.enterRule(localctx, 38, self.RULE_pdistdist)
|
|
1822
|
+
self._la = 0 # Token type
|
|
1823
|
+
try:
|
|
1824
|
+
self.enterOuterAlt(localctx, 1)
|
|
1825
|
+
self.state = 246
|
|
1826
|
+
self.match(malParser.ID)
|
|
1827
|
+
self.state = 259
|
|
1828
|
+
self._errHandler.sync(self)
|
|
1829
|
+
_la = self._input.LA(1)
|
|
1830
|
+
if _la==18:
|
|
1831
|
+
self.state = 247
|
|
1832
|
+
self.match(malParser.LPAREN)
|
|
1833
|
+
self.state = 256
|
|
1834
|
+
self._errHandler.sync(self)
|
|
1835
|
+
_la = self._input.LA(1)
|
|
1836
|
+
if _la==11 or _la==12:
|
|
1837
|
+
self.state = 248
|
|
1838
|
+
self.number()
|
|
1839
|
+
self.state = 253
|
|
1840
|
+
self._errHandler.sync(self)
|
|
1841
|
+
_la = self._input.LA(1)
|
|
1842
|
+
while _la==44:
|
|
1843
|
+
self.state = 249
|
|
1844
|
+
self.match(malParser.COMMA)
|
|
1845
|
+
self.state = 250
|
|
1846
|
+
self.number()
|
|
1847
|
+
self.state = 255
|
|
1848
|
+
self._errHandler.sync(self)
|
|
1849
|
+
_la = self._input.LA(1)
|
|
1850
|
+
|
|
1851
|
+
|
|
1852
|
+
|
|
1853
|
+
self.state = 258
|
|
1854
|
+
self.match(malParser.RPAREN)
|
|
1855
|
+
|
|
1856
|
+
|
|
1857
|
+
except RecognitionException as re:
|
|
1858
|
+
localctx.exception = re
|
|
1859
|
+
self._errHandler.reportError(self, re)
|
|
1860
|
+
self._errHandler.recover(self, re)
|
|
1861
|
+
finally:
|
|
1862
|
+
self.exitRule()
|
|
1863
|
+
return localctx
|
|
1864
|
+
|
|
1865
|
+
|
|
1866
|
+
class DetectorContext(ParserRuleContext):
|
|
1867
|
+
__slots__ = 'parser'
|
|
1868
|
+
|
|
1869
|
+
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
|
|
1870
|
+
super().__init__(parent, invokingState)
|
|
1871
|
+
self.parser = parser
|
|
1872
|
+
|
|
1873
|
+
def bang(self):
|
|
1874
|
+
return self.getTypedRuleContext(malParser.BangContext,0)
|
|
1875
|
+
|
|
1876
|
+
|
|
1877
|
+
def context(self):
|
|
1878
|
+
return self.getTypedRuleContext(malParser.ContextContext,0)
|
|
1879
|
+
|
|
1880
|
+
|
|
1881
|
+
def detectorname(self):
|
|
1882
|
+
return self.getTypedRuleContext(malParser.DetectornameContext,0)
|
|
1883
|
+
|
|
1884
|
+
|
|
1885
|
+
def detectortype(self):
|
|
1886
|
+
return self.getTypedRuleContext(malParser.DetectortypeContext,0)
|
|
1887
|
+
|
|
1888
|
+
|
|
1889
|
+
def tprate(self):
|
|
1890
|
+
return self.getTypedRuleContext(malParser.TprateContext,0)
|
|
1891
|
+
|
|
1892
|
+
|
|
1893
|
+
def getRuleIndex(self):
|
|
1894
|
+
return malParser.RULE_detector
|
|
1895
|
+
|
|
1896
|
+
def enterRule(self, listener:ParseTreeListener):
|
|
1897
|
+
if hasattr( listener, "enterDetector" ):
|
|
1898
|
+
listener.enterDetector(self)
|
|
1899
|
+
|
|
1900
|
+
def exitRule(self, listener:ParseTreeListener):
|
|
1901
|
+
if hasattr( listener, "exitDetector" ):
|
|
1902
|
+
listener.exitDetector(self)
|
|
1903
|
+
|
|
1904
|
+
def accept(self, visitor:ParseTreeVisitor):
|
|
1905
|
+
if hasattr( visitor, "visitDetector" ):
|
|
1906
|
+
return visitor.visitDetector(self)
|
|
1907
|
+
else:
|
|
1908
|
+
return visitor.visitChildren(self)
|
|
1909
|
+
|
|
1910
|
+
|
|
1911
|
+
|
|
1912
|
+
|
|
1913
|
+
def detector(self):
|
|
1914
|
+
|
|
1915
|
+
localctx = malParser.DetectorContext(self, self._ctx, self.state)
|
|
1916
|
+
self.enterRule(localctx, 40, self.RULE_detector)
|
|
1917
|
+
self._la = 0 # Token type
|
|
1918
|
+
try:
|
|
1919
|
+
self.enterOuterAlt(localctx, 1)
|
|
1920
|
+
self.state = 261
|
|
1921
|
+
self.bang()
|
|
1922
|
+
self.state = 263
|
|
1923
|
+
self._errHandler.sync(self)
|
|
1924
|
+
_la = self._input.LA(1)
|
|
1925
|
+
if _la==17:
|
|
1926
|
+
self.state = 262
|
|
1927
|
+
self.detectorname()
|
|
1928
|
+
|
|
1929
|
+
|
|
1930
|
+
self.state = 265
|
|
1931
|
+
self.context()
|
|
1932
|
+
self.state = 267
|
|
1933
|
+
self._errHandler.sync(self)
|
|
1934
|
+
_la = self._input.LA(1)
|
|
1935
|
+
if _la==17:
|
|
1936
|
+
self.state = 266
|
|
1937
|
+
self.detectortype()
|
|
1938
|
+
|
|
1939
|
+
|
|
1940
|
+
self.state = 270
|
|
1941
|
+
self._errHandler.sync(self)
|
|
1942
|
+
_la = self._input.LA(1)
|
|
1943
|
+
if _la==26:
|
|
1944
|
+
self.state = 269
|
|
1945
|
+
self.tprate()
|
|
1946
|
+
|
|
1947
|
+
|
|
1948
|
+
except RecognitionException as re:
|
|
1949
|
+
localctx.exception = re
|
|
1950
|
+
self._errHandler.reportError(self, re)
|
|
1951
|
+
self._errHandler.recover(self, re)
|
|
1952
|
+
finally:
|
|
1953
|
+
self.exitRule()
|
|
1954
|
+
return localctx
|
|
1955
|
+
|
|
1956
|
+
|
|
1957
|
+
class BangContext(ParserRuleContext):
|
|
1958
|
+
__slots__ = 'parser'
|
|
1959
|
+
|
|
1960
|
+
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
|
|
1961
|
+
super().__init__(parent, invokingState)
|
|
1962
|
+
self.parser = parser
|
|
1963
|
+
|
|
1964
|
+
def EXCLAMATION(self):
|
|
1965
|
+
return self.getToken(malParser.EXCLAMATION, 0)
|
|
1966
|
+
|
|
1967
|
+
def EXCLM_COMM(self):
|
|
1968
|
+
return self.getToken(malParser.EXCLM_COMM, 0)
|
|
1969
|
+
|
|
1970
|
+
def getRuleIndex(self):
|
|
1971
|
+
return malParser.RULE_bang
|
|
1972
|
+
|
|
1973
|
+
def enterRule(self, listener:ParseTreeListener):
|
|
1974
|
+
if hasattr( listener, "enterBang" ):
|
|
1975
|
+
listener.enterBang(self)
|
|
1195
1976
|
|
|
1196
1977
|
def exitRule(self, listener:ParseTreeListener):
|
|
1197
|
-
if hasattr( listener, "
|
|
1198
|
-
listener.
|
|
1978
|
+
if hasattr( listener, "exitBang" ):
|
|
1979
|
+
listener.exitBang(self)
|
|
1199
1980
|
|
|
1200
1981
|
def accept(self, visitor:ParseTreeVisitor):
|
|
1201
|
-
if hasattr( visitor, "
|
|
1202
|
-
return visitor.
|
|
1982
|
+
if hasattr( visitor, "visitBang" ):
|
|
1983
|
+
return visitor.visitBang(self)
|
|
1203
1984
|
else:
|
|
1204
1985
|
return visitor.visitChildren(self)
|
|
1205
1986
|
|
|
1206
1987
|
|
|
1207
1988
|
|
|
1208
1989
|
|
|
1209
|
-
def
|
|
1990
|
+
def bang(self):
|
|
1210
1991
|
|
|
1211
|
-
localctx = malParser.
|
|
1212
|
-
self.enterRule(localctx,
|
|
1992
|
+
localctx = malParser.BangContext(self, self._ctx, self.state)
|
|
1993
|
+
self.enterRule(localctx, 42, self.RULE_bang)
|
|
1213
1994
|
self._la = 0 # Token type
|
|
1214
1995
|
try:
|
|
1215
1996
|
self.enterOuterAlt(localctx, 1)
|
|
1216
|
-
self.state =
|
|
1997
|
+
self.state = 272
|
|
1217
1998
|
_la = self._input.LA(1)
|
|
1218
|
-
if not(
|
|
1999
|
+
if not(_la==38 or _la==48):
|
|
1219
2000
|
self._errHandler.recoverInline(self)
|
|
1220
2001
|
else:
|
|
1221
2002
|
self._errHandler.reportMatch(self)
|
|
@@ -1229,55 +2010,66 @@ class malParser ( Parser ):
|
|
|
1229
2010
|
return localctx
|
|
1230
2011
|
|
|
1231
2012
|
|
|
1232
|
-
class
|
|
2013
|
+
class DetectornameContext(ParserRuleContext):
|
|
1233
2014
|
__slots__ = 'parser'
|
|
1234
2015
|
|
|
1235
2016
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
|
|
1236
2017
|
super().__init__(parent, invokingState)
|
|
1237
2018
|
self.parser = parser
|
|
1238
2019
|
|
|
1239
|
-
def
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
2020
|
+
def ID(self, i:int=None):
|
|
2021
|
+
if i is None:
|
|
2022
|
+
return self.getTokens(malParser.ID)
|
|
2023
|
+
else:
|
|
2024
|
+
return self.getToken(malParser.ID, i)
|
|
1245
2025
|
|
|
1246
|
-
def
|
|
1247
|
-
|
|
2026
|
+
def DOT(self, i:int=None):
|
|
2027
|
+
if i is None:
|
|
2028
|
+
return self.getTokens(malParser.DOT)
|
|
2029
|
+
else:
|
|
2030
|
+
return self.getToken(malParser.DOT, i)
|
|
1248
2031
|
|
|
1249
2032
|
def getRuleIndex(self):
|
|
1250
|
-
return malParser.
|
|
2033
|
+
return malParser.RULE_detectorname
|
|
1251
2034
|
|
|
1252
2035
|
def enterRule(self, listener:ParseTreeListener):
|
|
1253
|
-
if hasattr( listener, "
|
|
1254
|
-
listener.
|
|
2036
|
+
if hasattr( listener, "enterDetectorname" ):
|
|
2037
|
+
listener.enterDetectorname(self)
|
|
1255
2038
|
|
|
1256
2039
|
def exitRule(self, listener:ParseTreeListener):
|
|
1257
|
-
if hasattr( listener, "
|
|
1258
|
-
listener.
|
|
2040
|
+
if hasattr( listener, "exitDetectorname" ):
|
|
2041
|
+
listener.exitDetectorname(self)
|
|
1259
2042
|
|
|
1260
2043
|
def accept(self, visitor:ParseTreeVisitor):
|
|
1261
|
-
if hasattr( visitor, "
|
|
1262
|
-
return visitor.
|
|
2044
|
+
if hasattr( visitor, "visitDetectorname" ):
|
|
2045
|
+
return visitor.visitDetectorname(self)
|
|
1263
2046
|
else:
|
|
1264
2047
|
return visitor.visitChildren(self)
|
|
1265
2048
|
|
|
1266
2049
|
|
|
1267
2050
|
|
|
1268
2051
|
|
|
1269
|
-
def
|
|
2052
|
+
def detectorname(self):
|
|
1270
2053
|
|
|
1271
|
-
localctx = malParser.
|
|
1272
|
-
self.enterRule(localctx,
|
|
2054
|
+
localctx = malParser.DetectornameContext(self, self._ctx, self.state)
|
|
2055
|
+
self.enterRule(localctx, 44, self.RULE_detectorname)
|
|
2056
|
+
self._la = 0 # Token type
|
|
1273
2057
|
try:
|
|
1274
2058
|
self.enterOuterAlt(localctx, 1)
|
|
1275
|
-
self.state =
|
|
1276
|
-
self.match(malParser.
|
|
1277
|
-
self.state =
|
|
1278
|
-
self.
|
|
1279
|
-
|
|
1280
|
-
|
|
2059
|
+
self.state = 274
|
|
2060
|
+
self.match(malParser.ID)
|
|
2061
|
+
self.state = 279
|
|
2062
|
+
self._errHandler.sync(self)
|
|
2063
|
+
_la = self._input.LA(1)
|
|
2064
|
+
while _la==35:
|
|
2065
|
+
self.state = 275
|
|
2066
|
+
self.match(malParser.DOT)
|
|
2067
|
+
self.state = 276
|
|
2068
|
+
self.match(malParser.ID)
|
|
2069
|
+
self.state = 281
|
|
2070
|
+
self._errHandler.sync(self)
|
|
2071
|
+
_la = self._input.LA(1)
|
|
2072
|
+
|
|
1281
2073
|
except RecognitionException as re:
|
|
1282
2074
|
localctx.exception = re
|
|
1283
2075
|
self._errHandler.reportError(self, re)
|
|
@@ -1287,78 +2079,77 @@ class malParser ( Parser ):
|
|
|
1287
2079
|
return localctx
|
|
1288
2080
|
|
|
1289
2081
|
|
|
1290
|
-
class
|
|
2082
|
+
class ContextContext(ParserRuleContext):
|
|
1291
2083
|
__slots__ = 'parser'
|
|
1292
2084
|
|
|
1293
2085
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
|
|
1294
2086
|
super().__init__(parent, invokingState)
|
|
1295
2087
|
self.parser = parser
|
|
1296
2088
|
|
|
1297
|
-
def
|
|
2089
|
+
def LPAREN(self):
|
|
2090
|
+
return self.getToken(malParser.LPAREN, 0)
|
|
2091
|
+
|
|
2092
|
+
def contextpart(self, i:int=None):
|
|
1298
2093
|
if i is None:
|
|
1299
|
-
return self.getTypedRuleContexts(malParser.
|
|
2094
|
+
return self.getTypedRuleContexts(malParser.ContextpartContext)
|
|
1300
2095
|
else:
|
|
1301
|
-
return self.getTypedRuleContext(malParser.
|
|
2096
|
+
return self.getTypedRuleContext(malParser.ContextpartContext,i)
|
|
1302
2097
|
|
|
1303
2098
|
|
|
1304
|
-
def
|
|
1305
|
-
|
|
1306
|
-
return self.getTokens(malParser.PLUS)
|
|
1307
|
-
else:
|
|
1308
|
-
return self.getToken(malParser.PLUS, i)
|
|
2099
|
+
def RPAREN(self):
|
|
2100
|
+
return self.getToken(malParser.RPAREN, 0)
|
|
1309
2101
|
|
|
1310
|
-
def
|
|
2102
|
+
def COMMA(self, i:int=None):
|
|
1311
2103
|
if i is None:
|
|
1312
|
-
return self.getTokens(malParser.
|
|
2104
|
+
return self.getTokens(malParser.COMMA)
|
|
1313
2105
|
else:
|
|
1314
|
-
return self.getToken(malParser.
|
|
2106
|
+
return self.getToken(malParser.COMMA, i)
|
|
1315
2107
|
|
|
1316
2108
|
def getRuleIndex(self):
|
|
1317
|
-
return malParser.
|
|
2109
|
+
return malParser.RULE_context
|
|
1318
2110
|
|
|
1319
2111
|
def enterRule(self, listener:ParseTreeListener):
|
|
1320
|
-
if hasattr( listener, "
|
|
1321
|
-
listener.
|
|
2112
|
+
if hasattr( listener, "enterContext" ):
|
|
2113
|
+
listener.enterContext(self)
|
|
1322
2114
|
|
|
1323
2115
|
def exitRule(self, listener:ParseTreeListener):
|
|
1324
|
-
if hasattr( listener, "
|
|
1325
|
-
listener.
|
|
2116
|
+
if hasattr( listener, "exitContext" ):
|
|
2117
|
+
listener.exitContext(self)
|
|
1326
2118
|
|
|
1327
2119
|
def accept(self, visitor:ParseTreeVisitor):
|
|
1328
|
-
if hasattr( visitor, "
|
|
1329
|
-
return visitor.
|
|
2120
|
+
if hasattr( visitor, "visitContext" ):
|
|
2121
|
+
return visitor.visitContext(self)
|
|
1330
2122
|
else:
|
|
1331
2123
|
return visitor.visitChildren(self)
|
|
1332
2124
|
|
|
1333
2125
|
|
|
1334
2126
|
|
|
1335
2127
|
|
|
1336
|
-
def
|
|
2128
|
+
def context(self):
|
|
1337
2129
|
|
|
1338
|
-
localctx = malParser.
|
|
1339
|
-
self.enterRule(localctx,
|
|
2130
|
+
localctx = malParser.ContextContext(self, self._ctx, self.state)
|
|
2131
|
+
self.enterRule(localctx, 46, self.RULE_context)
|
|
1340
2132
|
self._la = 0 # Token type
|
|
1341
2133
|
try:
|
|
1342
2134
|
self.enterOuterAlt(localctx, 1)
|
|
1343
|
-
self.state =
|
|
1344
|
-
self.
|
|
1345
|
-
self.state =
|
|
2135
|
+
self.state = 282
|
|
2136
|
+
self.match(malParser.LPAREN)
|
|
2137
|
+
self.state = 283
|
|
2138
|
+
self.contextpart()
|
|
2139
|
+
self.state = 288
|
|
1346
2140
|
self._errHandler.sync(self)
|
|
1347
2141
|
_la = self._input.LA(1)
|
|
1348
|
-
while _la==
|
|
1349
|
-
self.state =
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
self._errHandler.reportMatch(self)
|
|
1355
|
-
self.consume()
|
|
1356
|
-
self.state = 187
|
|
1357
|
-
self.ttcterm()
|
|
1358
|
-
self.state = 192
|
|
2142
|
+
while _la==44:
|
|
2143
|
+
self.state = 284
|
|
2144
|
+
self.match(malParser.COMMA)
|
|
2145
|
+
self.state = 285
|
|
2146
|
+
self.contextpart()
|
|
2147
|
+
self.state = 290
|
|
1359
2148
|
self._errHandler.sync(self)
|
|
1360
2149
|
_la = self._input.LA(1)
|
|
1361
2150
|
|
|
2151
|
+
self.state = 291
|
|
2152
|
+
self.match(malParser.RPAREN)
|
|
1362
2153
|
except RecognitionException as re:
|
|
1363
2154
|
localctx.exception = re
|
|
1364
2155
|
self._errHandler.reportError(self, re)
|
|
@@ -1368,78 +2159,51 @@ class malParser ( Parser ):
|
|
|
1368
2159
|
return localctx
|
|
1369
2160
|
|
|
1370
2161
|
|
|
1371
|
-
class
|
|
2162
|
+
class ContextpartContext(ParserRuleContext):
|
|
1372
2163
|
__slots__ = 'parser'
|
|
1373
2164
|
|
|
1374
2165
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
|
|
1375
2166
|
super().__init__(parent, invokingState)
|
|
1376
2167
|
self.parser = parser
|
|
1377
2168
|
|
|
1378
|
-
def
|
|
1379
|
-
|
|
1380
|
-
return self.getTypedRuleContexts(malParser.TtcfactContext)
|
|
1381
|
-
else:
|
|
1382
|
-
return self.getTypedRuleContext(malParser.TtcfactContext,i)
|
|
2169
|
+
def contextasset(self):
|
|
2170
|
+
return self.getTypedRuleContext(malParser.ContextassetContext,0)
|
|
1383
2171
|
|
|
1384
2172
|
|
|
1385
|
-
def
|
|
1386
|
-
|
|
1387
|
-
return self.getTokens(malParser.STAR)
|
|
1388
|
-
else:
|
|
1389
|
-
return self.getToken(malParser.STAR, i)
|
|
2173
|
+
def contextlabel(self):
|
|
2174
|
+
return self.getTypedRuleContext(malParser.ContextlabelContext,0)
|
|
1390
2175
|
|
|
1391
|
-
def DIVIDE(self, i:int=None):
|
|
1392
|
-
if i is None:
|
|
1393
|
-
return self.getTokens(malParser.DIVIDE)
|
|
1394
|
-
else:
|
|
1395
|
-
return self.getToken(malParser.DIVIDE, i)
|
|
1396
2176
|
|
|
1397
2177
|
def getRuleIndex(self):
|
|
1398
|
-
return malParser.
|
|
2178
|
+
return malParser.RULE_contextpart
|
|
1399
2179
|
|
|
1400
2180
|
def enterRule(self, listener:ParseTreeListener):
|
|
1401
|
-
if hasattr( listener, "
|
|
1402
|
-
listener.
|
|
2181
|
+
if hasattr( listener, "enterContextpart" ):
|
|
2182
|
+
listener.enterContextpart(self)
|
|
1403
2183
|
|
|
1404
2184
|
def exitRule(self, listener:ParseTreeListener):
|
|
1405
|
-
if hasattr( listener, "
|
|
1406
|
-
listener.
|
|
2185
|
+
if hasattr( listener, "exitContextpart" ):
|
|
2186
|
+
listener.exitContextpart(self)
|
|
1407
2187
|
|
|
1408
2188
|
def accept(self, visitor:ParseTreeVisitor):
|
|
1409
|
-
if hasattr( visitor, "
|
|
1410
|
-
return visitor.
|
|
2189
|
+
if hasattr( visitor, "visitContextpart" ):
|
|
2190
|
+
return visitor.visitContextpart(self)
|
|
1411
2191
|
else:
|
|
1412
2192
|
return visitor.visitChildren(self)
|
|
1413
2193
|
|
|
1414
2194
|
|
|
1415
2195
|
|
|
1416
2196
|
|
|
1417
|
-
def
|
|
2197
|
+
def contextpart(self):
|
|
1418
2198
|
|
|
1419
|
-
localctx = malParser.
|
|
1420
|
-
self.enterRule(localctx,
|
|
1421
|
-
self._la = 0 # Token type
|
|
2199
|
+
localctx = malParser.ContextpartContext(self, self._ctx, self.state)
|
|
2200
|
+
self.enterRule(localctx, 48, self.RULE_contextpart)
|
|
1422
2201
|
try:
|
|
1423
2202
|
self.enterOuterAlt(localctx, 1)
|
|
1424
|
-
self.state =
|
|
1425
|
-
self.
|
|
1426
|
-
self.state =
|
|
1427
|
-
self.
|
|
1428
|
-
_la = self._input.LA(1)
|
|
1429
|
-
while _la==27 or _la==44:
|
|
1430
|
-
self.state = 194
|
|
1431
|
-
_la = self._input.LA(1)
|
|
1432
|
-
if not(_la==27 or _la==44):
|
|
1433
|
-
self._errHandler.recoverInline(self)
|
|
1434
|
-
else:
|
|
1435
|
-
self._errHandler.reportMatch(self)
|
|
1436
|
-
self.consume()
|
|
1437
|
-
self.state = 195
|
|
1438
|
-
self.ttcfact()
|
|
1439
|
-
self.state = 200
|
|
1440
|
-
self._errHandler.sync(self)
|
|
1441
|
-
_la = self._input.LA(1)
|
|
1442
|
-
|
|
2203
|
+
self.state = 293
|
|
2204
|
+
self.contextasset()
|
|
2205
|
+
self.state = 294
|
|
2206
|
+
self.contextlabel()
|
|
1443
2207
|
except RecognitionException as re:
|
|
1444
2208
|
localctx.exception = re
|
|
1445
2209
|
self._errHandler.reportError(self, re)
|
|
@@ -1449,62 +2213,44 @@ class malParser ( Parser ):
|
|
|
1449
2213
|
return localctx
|
|
1450
2214
|
|
|
1451
2215
|
|
|
1452
|
-
class
|
|
2216
|
+
class ContextassetContext(ParserRuleContext):
|
|
1453
2217
|
__slots__ = 'parser'
|
|
1454
2218
|
|
|
1455
2219
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
|
|
1456
2220
|
super().__init__(parent, invokingState)
|
|
1457
2221
|
self.parser = parser
|
|
1458
2222
|
|
|
1459
|
-
def
|
|
1460
|
-
|
|
1461
|
-
return self.getTypedRuleContexts(malParser.TtcatomContext)
|
|
1462
|
-
else:
|
|
1463
|
-
return self.getTypedRuleContext(malParser.TtcatomContext,i)
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
def POWER(self):
|
|
1467
|
-
return self.getToken(malParser.POWER, 0)
|
|
2223
|
+
def ID(self):
|
|
2224
|
+
return self.getToken(malParser.ID, 0)
|
|
1468
2225
|
|
|
1469
2226
|
def getRuleIndex(self):
|
|
1470
|
-
return malParser.
|
|
2227
|
+
return malParser.RULE_contextasset
|
|
1471
2228
|
|
|
1472
2229
|
def enterRule(self, listener:ParseTreeListener):
|
|
1473
|
-
if hasattr( listener, "
|
|
1474
|
-
listener.
|
|
2230
|
+
if hasattr( listener, "enterContextasset" ):
|
|
2231
|
+
listener.enterContextasset(self)
|
|
1475
2232
|
|
|
1476
2233
|
def exitRule(self, listener:ParseTreeListener):
|
|
1477
|
-
if hasattr( listener, "
|
|
1478
|
-
listener.
|
|
2234
|
+
if hasattr( listener, "exitContextasset" ):
|
|
2235
|
+
listener.exitContextasset(self)
|
|
1479
2236
|
|
|
1480
2237
|
def accept(self, visitor:ParseTreeVisitor):
|
|
1481
|
-
if hasattr( visitor, "
|
|
1482
|
-
return visitor.
|
|
2238
|
+
if hasattr( visitor, "visitContextasset" ):
|
|
2239
|
+
return visitor.visitContextasset(self)
|
|
1483
2240
|
else:
|
|
1484
2241
|
return visitor.visitChildren(self)
|
|
1485
2242
|
|
|
1486
2243
|
|
|
1487
2244
|
|
|
1488
2245
|
|
|
1489
|
-
def
|
|
2246
|
+
def contextasset(self):
|
|
1490
2247
|
|
|
1491
|
-
localctx = malParser.
|
|
1492
|
-
self.enterRule(localctx,
|
|
1493
|
-
self._la = 0 # Token type
|
|
2248
|
+
localctx = malParser.ContextassetContext(self, self._ctx, self.state)
|
|
2249
|
+
self.enterRule(localctx, 50, self.RULE_contextasset)
|
|
1494
2250
|
try:
|
|
1495
2251
|
self.enterOuterAlt(localctx, 1)
|
|
1496
|
-
self.state =
|
|
1497
|
-
self.
|
|
1498
|
-
self.state = 204
|
|
1499
|
-
self._errHandler.sync(self)
|
|
1500
|
-
_la = self._input.LA(1)
|
|
1501
|
-
if _la==45:
|
|
1502
|
-
self.state = 202
|
|
1503
|
-
self.match(malParser.POWER)
|
|
1504
|
-
self.state = 203
|
|
1505
|
-
self.ttcatom()
|
|
1506
|
-
|
|
1507
|
-
|
|
2252
|
+
self.state = 296
|
|
2253
|
+
self.match(malParser.ID)
|
|
1508
2254
|
except RecognitionException as re:
|
|
1509
2255
|
localctx.exception = re
|
|
1510
2256
|
self._errHandler.reportError(self, re)
|
|
@@ -1514,81 +2260,44 @@ class malParser ( Parser ):
|
|
|
1514
2260
|
return localctx
|
|
1515
2261
|
|
|
1516
2262
|
|
|
1517
|
-
class
|
|
2263
|
+
class ContextlabelContext(ParserRuleContext):
|
|
1518
2264
|
__slots__ = 'parser'
|
|
1519
2265
|
|
|
1520
2266
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
|
|
1521
2267
|
super().__init__(parent, invokingState)
|
|
1522
2268
|
self.parser = parser
|
|
1523
2269
|
|
|
1524
|
-
def
|
|
1525
|
-
return self.
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
def LPAREN(self):
|
|
1529
|
-
return self.getToken(malParser.LPAREN, 0)
|
|
1530
|
-
|
|
1531
|
-
def ttcexpr(self):
|
|
1532
|
-
return self.getTypedRuleContext(malParser.TtcexprContext,0)
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
def RPAREN(self):
|
|
1536
|
-
return self.getToken(malParser.RPAREN, 0)
|
|
1537
|
-
|
|
1538
|
-
def number(self):
|
|
1539
|
-
return self.getTypedRuleContext(malParser.NumberContext,0)
|
|
1540
|
-
|
|
2270
|
+
def ID(self):
|
|
2271
|
+
return self.getToken(malParser.ID, 0)
|
|
1541
2272
|
|
|
1542
2273
|
def getRuleIndex(self):
|
|
1543
|
-
return malParser.
|
|
2274
|
+
return malParser.RULE_contextlabel
|
|
1544
2275
|
|
|
1545
2276
|
def enterRule(self, listener:ParseTreeListener):
|
|
1546
|
-
if hasattr( listener, "
|
|
1547
|
-
listener.
|
|
2277
|
+
if hasattr( listener, "enterContextlabel" ):
|
|
2278
|
+
listener.enterContextlabel(self)
|
|
1548
2279
|
|
|
1549
2280
|
def exitRule(self, listener:ParseTreeListener):
|
|
1550
|
-
if hasattr( listener, "
|
|
1551
|
-
listener.
|
|
2281
|
+
if hasattr( listener, "exitContextlabel" ):
|
|
2282
|
+
listener.exitContextlabel(self)
|
|
1552
2283
|
|
|
1553
2284
|
def accept(self, visitor:ParseTreeVisitor):
|
|
1554
|
-
if hasattr( visitor, "
|
|
1555
|
-
return visitor.
|
|
2285
|
+
if hasattr( visitor, "visitContextlabel" ):
|
|
2286
|
+
return visitor.visitContextlabel(self)
|
|
1556
2287
|
else:
|
|
1557
2288
|
return visitor.visitChildren(self)
|
|
1558
2289
|
|
|
1559
2290
|
|
|
1560
2291
|
|
|
1561
2292
|
|
|
1562
|
-
def
|
|
2293
|
+
def contextlabel(self):
|
|
1563
2294
|
|
|
1564
|
-
localctx = malParser.
|
|
1565
|
-
self.enterRule(localctx,
|
|
2295
|
+
localctx = malParser.ContextlabelContext(self, self._ctx, self.state)
|
|
2296
|
+
self.enterRule(localctx, 52, self.RULE_contextlabel)
|
|
1566
2297
|
try:
|
|
1567
|
-
self.
|
|
1568
|
-
self.
|
|
1569
|
-
|
|
1570
|
-
if token in [16]:
|
|
1571
|
-
self.enterOuterAlt(localctx, 1)
|
|
1572
|
-
self.state = 206
|
|
1573
|
-
self.ttcdist()
|
|
1574
|
-
pass
|
|
1575
|
-
elif token in [17]:
|
|
1576
|
-
self.enterOuterAlt(localctx, 2)
|
|
1577
|
-
self.state = 207
|
|
1578
|
-
self.match(malParser.LPAREN)
|
|
1579
|
-
self.state = 208
|
|
1580
|
-
self.ttcexpr()
|
|
1581
|
-
self.state = 209
|
|
1582
|
-
self.match(malParser.RPAREN)
|
|
1583
|
-
pass
|
|
1584
|
-
elif token in [10, 11]:
|
|
1585
|
-
self.enterOuterAlt(localctx, 3)
|
|
1586
|
-
self.state = 211
|
|
1587
|
-
self.number()
|
|
1588
|
-
pass
|
|
1589
|
-
else:
|
|
1590
|
-
raise NoViableAltException(self)
|
|
1591
|
-
|
|
2298
|
+
self.enterOuterAlt(localctx, 1)
|
|
2299
|
+
self.state = 298
|
|
2300
|
+
self.match(malParser.ID)
|
|
1592
2301
|
except RecognitionException as re:
|
|
1593
2302
|
localctx.exception = re
|
|
1594
2303
|
self._errHandler.reportError(self, re)
|
|
@@ -1598,7 +2307,7 @@ class malParser ( Parser ):
|
|
|
1598
2307
|
return localctx
|
|
1599
2308
|
|
|
1600
2309
|
|
|
1601
|
-
class
|
|
2310
|
+
class DetectortypeContext(ParserRuleContext):
|
|
1602
2311
|
__slots__ = 'parser'
|
|
1603
2312
|
|
|
1604
2313
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
|
|
@@ -1608,84 +2317,82 @@ class malParser ( Parser ):
|
|
|
1608
2317
|
def ID(self):
|
|
1609
2318
|
return self.getToken(malParser.ID, 0)
|
|
1610
2319
|
|
|
1611
|
-
def LPAREN(self):
|
|
1612
|
-
return self.getToken(malParser.LPAREN, 0)
|
|
1613
|
-
|
|
1614
|
-
def RPAREN(self):
|
|
1615
|
-
return self.getToken(malParser.RPAREN, 0)
|
|
1616
|
-
|
|
1617
|
-
def number(self, i:int=None):
|
|
1618
|
-
if i is None:
|
|
1619
|
-
return self.getTypedRuleContexts(malParser.NumberContext)
|
|
1620
|
-
else:
|
|
1621
|
-
return self.getTypedRuleContext(malParser.NumberContext,i)
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
def COMMA(self, i:int=None):
|
|
1625
|
-
if i is None:
|
|
1626
|
-
return self.getTokens(malParser.COMMA)
|
|
1627
|
-
else:
|
|
1628
|
-
return self.getToken(malParser.COMMA, i)
|
|
1629
|
-
|
|
1630
2320
|
def getRuleIndex(self):
|
|
1631
|
-
return malParser.
|
|
2321
|
+
return malParser.RULE_detectortype
|
|
1632
2322
|
|
|
1633
2323
|
def enterRule(self, listener:ParseTreeListener):
|
|
1634
|
-
if hasattr( listener, "
|
|
1635
|
-
listener.
|
|
2324
|
+
if hasattr( listener, "enterDetectortype" ):
|
|
2325
|
+
listener.enterDetectortype(self)
|
|
1636
2326
|
|
|
1637
2327
|
def exitRule(self, listener:ParseTreeListener):
|
|
1638
|
-
if hasattr( listener, "
|
|
1639
|
-
listener.
|
|
2328
|
+
if hasattr( listener, "exitDetectortype" ):
|
|
2329
|
+
listener.exitDetectortype(self)
|
|
1640
2330
|
|
|
1641
2331
|
def accept(self, visitor:ParseTreeVisitor):
|
|
1642
|
-
if hasattr( visitor, "
|
|
1643
|
-
return visitor.
|
|
2332
|
+
if hasattr( visitor, "visitDetectortype" ):
|
|
2333
|
+
return visitor.visitDetectortype(self)
|
|
1644
2334
|
else:
|
|
1645
2335
|
return visitor.visitChildren(self)
|
|
1646
2336
|
|
|
1647
2337
|
|
|
1648
2338
|
|
|
1649
2339
|
|
|
1650
|
-
def
|
|
2340
|
+
def detectortype(self):
|
|
1651
2341
|
|
|
1652
|
-
localctx = malParser.
|
|
1653
|
-
self.enterRule(localctx,
|
|
1654
|
-
self._la = 0 # Token type
|
|
2342
|
+
localctx = malParser.DetectortypeContext(self, self._ctx, self.state)
|
|
2343
|
+
self.enterRule(localctx, 54, self.RULE_detectortype)
|
|
1655
2344
|
try:
|
|
1656
2345
|
self.enterOuterAlt(localctx, 1)
|
|
1657
|
-
self.state =
|
|
2346
|
+
self.state = 300
|
|
1658
2347
|
self.match(malParser.ID)
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
2348
|
+
except RecognitionException as re:
|
|
2349
|
+
localctx.exception = re
|
|
2350
|
+
self._errHandler.reportError(self, re)
|
|
2351
|
+
self._errHandler.recover(self, re)
|
|
2352
|
+
finally:
|
|
2353
|
+
self.exitRule()
|
|
2354
|
+
return localctx
|
|
2355
|
+
|
|
2356
|
+
|
|
2357
|
+
class TprateContext(ParserRuleContext):
|
|
2358
|
+
__slots__ = 'parser'
|
|
2359
|
+
|
|
2360
|
+
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
|
|
2361
|
+
super().__init__(parent, invokingState)
|
|
2362
|
+
self.parser = parser
|
|
2363
|
+
|
|
2364
|
+
def pdist(self):
|
|
2365
|
+
return self.getTypedRuleContext(malParser.PdistContext,0)
|
|
2366
|
+
|
|
2367
|
+
|
|
2368
|
+
def getRuleIndex(self):
|
|
2369
|
+
return malParser.RULE_tprate
|
|
2370
|
+
|
|
2371
|
+
def enterRule(self, listener:ParseTreeListener):
|
|
2372
|
+
if hasattr( listener, "enterTprate" ):
|
|
2373
|
+
listener.enterTprate(self)
|
|
2374
|
+
|
|
2375
|
+
def exitRule(self, listener:ParseTreeListener):
|
|
2376
|
+
if hasattr( listener, "exitTprate" ):
|
|
2377
|
+
listener.exitTprate(self)
|
|
2378
|
+
|
|
2379
|
+
def accept(self, visitor:ParseTreeVisitor):
|
|
2380
|
+
if hasattr( visitor, "visitTprate" ):
|
|
2381
|
+
return visitor.visitTprate(self)
|
|
2382
|
+
else:
|
|
2383
|
+
return visitor.visitChildren(self)
|
|
1682
2384
|
|
|
1683
2385
|
|
|
1684
2386
|
|
|
1685
|
-
self.state = 226
|
|
1686
|
-
self.match(malParser.RPAREN)
|
|
1687
2387
|
|
|
2388
|
+
def tprate(self):
|
|
1688
2389
|
|
|
2390
|
+
localctx = malParser.TprateContext(self, self._ctx, self.state)
|
|
2391
|
+
self.enterRule(localctx, 56, self.RULE_tprate)
|
|
2392
|
+
try:
|
|
2393
|
+
self.enterOuterAlt(localctx, 1)
|
|
2394
|
+
self.state = 302
|
|
2395
|
+
self.pdist()
|
|
1689
2396
|
except RecognitionException as re:
|
|
1690
2397
|
localctx.exception = re
|
|
1691
2398
|
self._errHandler.reportError(self, re)
|
|
@@ -1741,23 +2448,23 @@ class malParser ( Parser ):
|
|
|
1741
2448
|
def precondition(self):
|
|
1742
2449
|
|
|
1743
2450
|
localctx = malParser.PreconditionContext(self, self._ctx, self.state)
|
|
1744
|
-
self.enterRule(localctx,
|
|
2451
|
+
self.enterRule(localctx, 58, self.RULE_precondition)
|
|
1745
2452
|
self._la = 0 # Token type
|
|
1746
2453
|
try:
|
|
1747
2454
|
self.enterOuterAlt(localctx, 1)
|
|
1748
|
-
self.state =
|
|
2455
|
+
self.state = 304
|
|
1749
2456
|
self.match(malParser.REQUIRES)
|
|
1750
|
-
self.state =
|
|
2457
|
+
self.state = 305
|
|
1751
2458
|
self.expr()
|
|
1752
|
-
self.state =
|
|
2459
|
+
self.state = 310
|
|
1753
2460
|
self._errHandler.sync(self)
|
|
1754
2461
|
_la = self._input.LA(1)
|
|
1755
|
-
while _la==
|
|
1756
|
-
self.state =
|
|
2462
|
+
while _la==44:
|
|
2463
|
+
self.state = 306
|
|
1757
2464
|
self.match(malParser.COMMA)
|
|
1758
|
-
self.state =
|
|
2465
|
+
self.state = 307
|
|
1759
2466
|
self.expr()
|
|
1760
|
-
self.state =
|
|
2467
|
+
self.state = 312
|
|
1761
2468
|
self._errHandler.sync(self)
|
|
1762
2469
|
_la = self._input.LA(1)
|
|
1763
2470
|
|
|
@@ -1819,28 +2526,28 @@ class malParser ( Parser ):
|
|
|
1819
2526
|
def reaches(self):
|
|
1820
2527
|
|
|
1821
2528
|
localctx = malParser.ReachesContext(self, self._ctx, self.state)
|
|
1822
|
-
self.enterRule(localctx,
|
|
2529
|
+
self.enterRule(localctx, 60, self.RULE_reaches)
|
|
1823
2530
|
self._la = 0 # Token type
|
|
1824
2531
|
try:
|
|
1825
2532
|
self.enterOuterAlt(localctx, 1)
|
|
1826
|
-
self.state =
|
|
2533
|
+
self.state = 313
|
|
1827
2534
|
_la = self._input.LA(1)
|
|
1828
|
-
if not(_la==
|
|
2535
|
+
if not(_la==42 or _la==43):
|
|
1829
2536
|
self._errHandler.recoverInline(self)
|
|
1830
2537
|
else:
|
|
1831
2538
|
self._errHandler.reportMatch(self)
|
|
1832
2539
|
self.consume()
|
|
1833
|
-
self.state =
|
|
2540
|
+
self.state = 314
|
|
1834
2541
|
self.expr()
|
|
1835
|
-
self.state =
|
|
2542
|
+
self.state = 319
|
|
1836
2543
|
self._errHandler.sync(self)
|
|
1837
2544
|
_la = self._input.LA(1)
|
|
1838
|
-
while _la==
|
|
1839
|
-
self.state =
|
|
2545
|
+
while _la==44:
|
|
2546
|
+
self.state = 315
|
|
1840
2547
|
self.match(malParser.COMMA)
|
|
1841
|
-
self.state =
|
|
2548
|
+
self.state = 316
|
|
1842
2549
|
self.expr()
|
|
1843
|
-
self.state =
|
|
2550
|
+
self.state = 321
|
|
1844
2551
|
self._errHandler.sync(self)
|
|
1845
2552
|
_la = self._input.LA(1)
|
|
1846
2553
|
|
|
@@ -1889,13 +2596,13 @@ class malParser ( Parser ):
|
|
|
1889
2596
|
def number(self):
|
|
1890
2597
|
|
|
1891
2598
|
localctx = malParser.NumberContext(self, self._ctx, self.state)
|
|
1892
|
-
self.enterRule(localctx,
|
|
2599
|
+
self.enterRule(localctx, 62, self.RULE_number)
|
|
1893
2600
|
self._la = 0 # Token type
|
|
1894
2601
|
try:
|
|
1895
2602
|
self.enterOuterAlt(localctx, 1)
|
|
1896
|
-
self.state =
|
|
2603
|
+
self.state = 322
|
|
1897
2604
|
_la = self._input.LA(1)
|
|
1898
|
-
if not(_la==
|
|
2605
|
+
if not(_la==11 or _la==12):
|
|
1899
2606
|
self._errHandler.recoverInline(self)
|
|
1900
2607
|
else:
|
|
1901
2608
|
self._errHandler.reportMatch(self)
|
|
@@ -1952,16 +2659,16 @@ class malParser ( Parser ):
|
|
|
1952
2659
|
def variable(self):
|
|
1953
2660
|
|
|
1954
2661
|
localctx = malParser.VariableContext(self, self._ctx, self.state)
|
|
1955
|
-
self.enterRule(localctx,
|
|
2662
|
+
self.enterRule(localctx, 64, self.RULE_variable)
|
|
1956
2663
|
try:
|
|
1957
2664
|
self.enterOuterAlt(localctx, 1)
|
|
1958
|
-
self.state =
|
|
2665
|
+
self.state = 324
|
|
1959
2666
|
self.match(malParser.LET)
|
|
1960
|
-
self.state =
|
|
2667
|
+
self.state = 325
|
|
1961
2668
|
self.match(malParser.ID)
|
|
1962
|
-
self.state =
|
|
2669
|
+
self.state = 326
|
|
1963
2670
|
self.match(malParser.ASSIGN)
|
|
1964
|
-
self.state =
|
|
2671
|
+
self.state = 327
|
|
1965
2672
|
self.expr()
|
|
1966
2673
|
except RecognitionException as re:
|
|
1967
2674
|
localctx.exception = re
|
|
@@ -2016,21 +2723,21 @@ class malParser ( Parser ):
|
|
|
2016
2723
|
def expr(self):
|
|
2017
2724
|
|
|
2018
2725
|
localctx = malParser.ExprContext(self, self._ctx, self.state)
|
|
2019
|
-
self.enterRule(localctx,
|
|
2726
|
+
self.enterRule(localctx, 66, self.RULE_expr)
|
|
2020
2727
|
self._la = 0 # Token type
|
|
2021
2728
|
try:
|
|
2022
2729
|
self.enterOuterAlt(localctx, 1)
|
|
2023
|
-
self.state =
|
|
2730
|
+
self.state = 329
|
|
2024
2731
|
self.parts()
|
|
2025
|
-
self.state =
|
|
2732
|
+
self.state = 335
|
|
2026
2733
|
self._errHandler.sync(self)
|
|
2027
2734
|
_la = self._input.LA(1)
|
|
2028
|
-
while (((_la) & ~0x3f) == 0 and ((1 << _la) &
|
|
2029
|
-
self.state =
|
|
2735
|
+
while (((_la) & ~0x3f) == 0 and ((1 << _la) & 15032385536) != 0):
|
|
2736
|
+
self.state = 330
|
|
2030
2737
|
self.setop()
|
|
2031
|
-
self.state =
|
|
2738
|
+
self.state = 331
|
|
2032
2739
|
self.parts()
|
|
2033
|
-
self.state =
|
|
2740
|
+
self.state = 337
|
|
2034
2741
|
self._errHandler.sync(self)
|
|
2035
2742
|
_la = self._input.LA(1)
|
|
2036
2743
|
|
|
@@ -2086,21 +2793,21 @@ class malParser ( Parser ):
|
|
|
2086
2793
|
def parts(self):
|
|
2087
2794
|
|
|
2088
2795
|
localctx = malParser.PartsContext(self, self._ctx, self.state)
|
|
2089
|
-
self.enterRule(localctx,
|
|
2796
|
+
self.enterRule(localctx, 68, self.RULE_parts)
|
|
2090
2797
|
self._la = 0 # Token type
|
|
2091
2798
|
try:
|
|
2092
2799
|
self.enterOuterAlt(localctx, 1)
|
|
2093
|
-
self.state =
|
|
2800
|
+
self.state = 338
|
|
2094
2801
|
self.part()
|
|
2095
|
-
self.state =
|
|
2802
|
+
self.state = 343
|
|
2096
2803
|
self._errHandler.sync(self)
|
|
2097
2804
|
_la = self._input.LA(1)
|
|
2098
|
-
while _la==
|
|
2099
|
-
self.state =
|
|
2805
|
+
while _la==35:
|
|
2806
|
+
self.state = 339
|
|
2100
2807
|
self.match(malParser.DOT)
|
|
2101
|
-
self.state =
|
|
2808
|
+
self.state = 340
|
|
2102
2809
|
self.part()
|
|
2103
|
-
self.state =
|
|
2810
|
+
self.state = 345
|
|
2104
2811
|
self._errHandler.sync(self)
|
|
2105
2812
|
_la = self._input.LA(1)
|
|
2106
2813
|
|
|
@@ -2170,52 +2877,52 @@ class malParser ( Parser ):
|
|
|
2170
2877
|
def part(self):
|
|
2171
2878
|
|
|
2172
2879
|
localctx = malParser.PartContext(self, self._ctx, self.state)
|
|
2173
|
-
self.enterRule(localctx,
|
|
2880
|
+
self.enterRule(localctx, 70, self.RULE_part)
|
|
2174
2881
|
self._la = 0 # Token type
|
|
2175
2882
|
try:
|
|
2176
2883
|
self.enterOuterAlt(localctx, 1)
|
|
2177
|
-
self.state =
|
|
2884
|
+
self.state = 355
|
|
2178
2885
|
self._errHandler.sync(self)
|
|
2179
|
-
la_ = self._interp.adaptivePredict(self._input,
|
|
2886
|
+
la_ = self._interp.adaptivePredict(self._input,34,self._ctx)
|
|
2180
2887
|
if la_ == 1:
|
|
2181
|
-
self.state =
|
|
2888
|
+
self.state = 346
|
|
2182
2889
|
self.match(malParser.LPAREN)
|
|
2183
|
-
self.state =
|
|
2890
|
+
self.state = 347
|
|
2184
2891
|
self.expr()
|
|
2185
|
-
self.state =
|
|
2892
|
+
self.state = 348
|
|
2186
2893
|
self.match(malParser.RPAREN)
|
|
2187
2894
|
pass
|
|
2188
2895
|
|
|
2189
2896
|
elif la_ == 2:
|
|
2190
|
-
self.state =
|
|
2897
|
+
self.state = 350
|
|
2191
2898
|
self.varsubst()
|
|
2192
|
-
self.state =
|
|
2899
|
+
self.state = 351
|
|
2193
2900
|
self.match(malParser.LPAREN)
|
|
2194
|
-
self.state =
|
|
2901
|
+
self.state = 352
|
|
2195
2902
|
self.match(malParser.RPAREN)
|
|
2196
2903
|
pass
|
|
2197
2904
|
|
|
2198
2905
|
elif la_ == 3:
|
|
2199
|
-
self.state =
|
|
2906
|
+
self.state = 354
|
|
2200
2907
|
self.match(malParser.ID)
|
|
2201
2908
|
pass
|
|
2202
2909
|
|
|
2203
2910
|
|
|
2204
|
-
self.state =
|
|
2911
|
+
self.state = 358
|
|
2205
2912
|
self._errHandler.sync(self)
|
|
2206
2913
|
_la = self._input.LA(1)
|
|
2207
|
-
if _la==
|
|
2208
|
-
self.state =
|
|
2914
|
+
if _la==28:
|
|
2915
|
+
self.state = 357
|
|
2209
2916
|
self.match(malParser.STAR)
|
|
2210
2917
|
|
|
2211
2918
|
|
|
2212
|
-
self.state =
|
|
2919
|
+
self.state = 363
|
|
2213
2920
|
self._errHandler.sync(self)
|
|
2214
2921
|
_la = self._input.LA(1)
|
|
2215
|
-
while _la==
|
|
2216
|
-
self.state =
|
|
2922
|
+
while _la==26:
|
|
2923
|
+
self.state = 360
|
|
2217
2924
|
self.type_()
|
|
2218
|
-
self.state =
|
|
2925
|
+
self.state = 365
|
|
2219
2926
|
self._errHandler.sync(self)
|
|
2220
2927
|
_la = self._input.LA(1)
|
|
2221
2928
|
|
|
@@ -2261,10 +2968,10 @@ class malParser ( Parser ):
|
|
|
2261
2968
|
def varsubst(self):
|
|
2262
2969
|
|
|
2263
2970
|
localctx = malParser.VarsubstContext(self, self._ctx, self.state)
|
|
2264
|
-
self.enterRule(localctx,
|
|
2971
|
+
self.enterRule(localctx, 72, self.RULE_varsubst)
|
|
2265
2972
|
try:
|
|
2266
2973
|
self.enterOuterAlt(localctx, 1)
|
|
2267
|
-
self.state =
|
|
2974
|
+
self.state = 366
|
|
2268
2975
|
self.match(malParser.ID)
|
|
2269
2976
|
except RecognitionException as re:
|
|
2270
2977
|
localctx.exception = re
|
|
@@ -2314,14 +3021,14 @@ class malParser ( Parser ):
|
|
|
2314
3021
|
def type_(self):
|
|
2315
3022
|
|
|
2316
3023
|
localctx = malParser.TypeContext(self, self._ctx, self.state)
|
|
2317
|
-
self.enterRule(localctx,
|
|
3024
|
+
self.enterRule(localctx, 74, self.RULE_type)
|
|
2318
3025
|
try:
|
|
2319
3026
|
self.enterOuterAlt(localctx, 1)
|
|
2320
|
-
self.state =
|
|
3027
|
+
self.state = 368
|
|
2321
3028
|
self.match(malParser.LSQUARE)
|
|
2322
|
-
self.state =
|
|
3029
|
+
self.state = 369
|
|
2323
3030
|
self.match(malParser.ID)
|
|
2324
|
-
self.state =
|
|
3031
|
+
self.state = 370
|
|
2325
3032
|
self.match(malParser.RSQUARE)
|
|
2326
3033
|
except RecognitionException as re:
|
|
2327
3034
|
localctx.exception = re
|
|
@@ -2371,13 +3078,13 @@ class malParser ( Parser ):
|
|
|
2371
3078
|
def setop(self):
|
|
2372
3079
|
|
|
2373
3080
|
localctx = malParser.SetopContext(self, self._ctx, self.state)
|
|
2374
|
-
self.enterRule(localctx,
|
|
3081
|
+
self.enterRule(localctx, 76, self.RULE_setop)
|
|
2375
3082
|
self._la = 0 # Token type
|
|
2376
3083
|
try:
|
|
2377
3084
|
self.enterOuterAlt(localctx, 1)
|
|
2378
|
-
self.state =
|
|
3085
|
+
self.state = 372
|
|
2379
3086
|
_la = self._input.LA(1)
|
|
2380
|
-
if not((((_la) & ~0x3f) == 0 and ((1 << _la) &
|
|
3087
|
+
if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 15032385536) != 0)):
|
|
2381
3088
|
self._errHandler.recoverInline(self)
|
|
2382
3089
|
else:
|
|
2383
3090
|
self._errHandler.reportMatch(self)
|
|
@@ -2437,25 +3144,25 @@ class malParser ( Parser ):
|
|
|
2437
3144
|
def associations(self):
|
|
2438
3145
|
|
|
2439
3146
|
localctx = malParser.AssociationsContext(self, self._ctx, self.state)
|
|
2440
|
-
self.enterRule(localctx,
|
|
3147
|
+
self.enterRule(localctx, 78, self.RULE_associations)
|
|
2441
3148
|
self._la = 0 # Token type
|
|
2442
3149
|
try:
|
|
2443
3150
|
self.enterOuterAlt(localctx, 1)
|
|
2444
|
-
self.state =
|
|
3151
|
+
self.state = 374
|
|
2445
3152
|
self.match(malParser.ASSOCIATIONS)
|
|
2446
|
-
self.state =
|
|
3153
|
+
self.state = 375
|
|
2447
3154
|
self.match(malParser.LCURLY)
|
|
2448
|
-
self.state =
|
|
3155
|
+
self.state = 379
|
|
2449
3156
|
self._errHandler.sync(self)
|
|
2450
3157
|
_la = self._input.LA(1)
|
|
2451
|
-
while _la==
|
|
2452
|
-
self.state =
|
|
3158
|
+
while _la==17:
|
|
3159
|
+
self.state = 376
|
|
2453
3160
|
self.association()
|
|
2454
|
-
self.state =
|
|
3161
|
+
self.state = 381
|
|
2455
3162
|
self._errHandler.sync(self)
|
|
2456
3163
|
_la = self._input.LA(1)
|
|
2457
3164
|
|
|
2458
|
-
self.state =
|
|
3165
|
+
self.state = 382
|
|
2459
3166
|
self.match(malParser.RCURLY)
|
|
2460
3167
|
except RecognitionException as re:
|
|
2461
3168
|
localctx.exception = re
|
|
@@ -2533,37 +3240,37 @@ class malParser ( Parser ):
|
|
|
2533
3240
|
def association(self):
|
|
2534
3241
|
|
|
2535
3242
|
localctx = malParser.AssociationContext(self, self._ctx, self.state)
|
|
2536
|
-
self.enterRule(localctx,
|
|
3243
|
+
self.enterRule(localctx, 80, self.RULE_association)
|
|
2537
3244
|
try:
|
|
2538
3245
|
self.enterOuterAlt(localctx, 1)
|
|
2539
|
-
self.state =
|
|
3246
|
+
self.state = 384
|
|
2540
3247
|
self.match(malParser.ID)
|
|
2541
|
-
self.state =
|
|
3248
|
+
self.state = 385
|
|
2542
3249
|
self.field()
|
|
2543
|
-
self.state =
|
|
3250
|
+
self.state = 386
|
|
2544
3251
|
self.mult()
|
|
2545
|
-
self.state =
|
|
3252
|
+
self.state = 387
|
|
2546
3253
|
self.match(malParser.LARROW)
|
|
2547
|
-
self.state =
|
|
3254
|
+
self.state = 388
|
|
2548
3255
|
self.linkname()
|
|
2549
|
-
self.state =
|
|
3256
|
+
self.state = 389
|
|
2550
3257
|
self.match(malParser.RARROW)
|
|
2551
|
-
self.state =
|
|
3258
|
+
self.state = 390
|
|
2552
3259
|
self.mult()
|
|
2553
|
-
self.state =
|
|
3260
|
+
self.state = 391
|
|
2554
3261
|
self.field()
|
|
2555
|
-
self.state =
|
|
3262
|
+
self.state = 392
|
|
2556
3263
|
self.match(malParser.ID)
|
|
2557
|
-
self.state =
|
|
3264
|
+
self.state = 396
|
|
2558
3265
|
self._errHandler.sync(self)
|
|
2559
|
-
_alt = self._interp.adaptivePredict(self._input,
|
|
3266
|
+
_alt = self._interp.adaptivePredict(self._input,38,self._ctx)
|
|
2560
3267
|
while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
|
|
2561
3268
|
if _alt==1:
|
|
2562
|
-
self.state =
|
|
3269
|
+
self.state = 393
|
|
2563
3270
|
self.meta()
|
|
2564
|
-
self.state =
|
|
3271
|
+
self.state = 398
|
|
2565
3272
|
self._errHandler.sync(self)
|
|
2566
|
-
_alt = self._interp.adaptivePredict(self._input,
|
|
3273
|
+
_alt = self._interp.adaptivePredict(self._input,38,self._ctx)
|
|
2567
3274
|
|
|
2568
3275
|
except RecognitionException as re:
|
|
2569
3276
|
localctx.exception = re
|
|
@@ -2613,14 +3320,14 @@ class malParser ( Parser ):
|
|
|
2613
3320
|
def field(self):
|
|
2614
3321
|
|
|
2615
3322
|
localctx = malParser.FieldContext(self, self._ctx, self.state)
|
|
2616
|
-
self.enterRule(localctx,
|
|
3323
|
+
self.enterRule(localctx, 82, self.RULE_field)
|
|
2617
3324
|
try:
|
|
2618
3325
|
self.enterOuterAlt(localctx, 1)
|
|
2619
|
-
self.state =
|
|
3326
|
+
self.state = 399
|
|
2620
3327
|
self.match(malParser.LSQUARE)
|
|
2621
|
-
self.state =
|
|
3328
|
+
self.state = 400
|
|
2622
3329
|
self.match(malParser.ID)
|
|
2623
|
-
self.state =
|
|
3330
|
+
self.state = 401
|
|
2624
3331
|
self.match(malParser.RSQUARE)
|
|
2625
3332
|
except RecognitionException as re:
|
|
2626
3333
|
localctx.exception = re
|
|
@@ -2671,19 +3378,19 @@ class malParser ( Parser ):
|
|
|
2671
3378
|
def mult(self):
|
|
2672
3379
|
|
|
2673
3380
|
localctx = malParser.MultContext(self, self._ctx, self.state)
|
|
2674
|
-
self.enterRule(localctx,
|
|
3381
|
+
self.enterRule(localctx, 84, self.RULE_mult)
|
|
2675
3382
|
self._la = 0 # Token type
|
|
2676
3383
|
try:
|
|
2677
3384
|
self.enterOuterAlt(localctx, 1)
|
|
2678
|
-
self.state =
|
|
3385
|
+
self.state = 403
|
|
2679
3386
|
self.multatom()
|
|
2680
|
-
self.state =
|
|
3387
|
+
self.state = 406
|
|
2681
3388
|
self._errHandler.sync(self)
|
|
2682
3389
|
_la = self._input.LA(1)
|
|
2683
|
-
if _la==
|
|
2684
|
-
self.state =
|
|
3390
|
+
if _la==34:
|
|
3391
|
+
self.state = 404
|
|
2685
3392
|
self.match(malParser.RANGE)
|
|
2686
|
-
self.state =
|
|
3393
|
+
self.state = 405
|
|
2687
3394
|
self.multatom()
|
|
2688
3395
|
|
|
2689
3396
|
|
|
@@ -2732,13 +3439,13 @@ class malParser ( Parser ):
|
|
|
2732
3439
|
def multatom(self):
|
|
2733
3440
|
|
|
2734
3441
|
localctx = malParser.MultatomContext(self, self._ctx, self.state)
|
|
2735
|
-
self.enterRule(localctx,
|
|
3442
|
+
self.enterRule(localctx, 86, self.RULE_multatom)
|
|
2736
3443
|
self._la = 0 # Token type
|
|
2737
3444
|
try:
|
|
2738
3445
|
self.enterOuterAlt(localctx, 1)
|
|
2739
|
-
self.state =
|
|
3446
|
+
self.state = 408
|
|
2740
3447
|
_la = self._input.LA(1)
|
|
2741
|
-
if not(_la==
|
|
3448
|
+
if not(_la==11 or _la==28):
|
|
2742
3449
|
self._errHandler.recoverInline(self)
|
|
2743
3450
|
else:
|
|
2744
3451
|
self._errHandler.reportMatch(self)
|
|
@@ -2785,10 +3492,10 @@ class malParser ( Parser ):
|
|
|
2785
3492
|
def linkname(self):
|
|
2786
3493
|
|
|
2787
3494
|
localctx = malParser.LinknameContext(self, self._ctx, self.state)
|
|
2788
|
-
self.enterRule(localctx,
|
|
3495
|
+
self.enterRule(localctx, 88, self.RULE_linkname)
|
|
2789
3496
|
try:
|
|
2790
3497
|
self.enterOuterAlt(localctx, 1)
|
|
2791
|
-
self.state =
|
|
3498
|
+
self.state = 410
|
|
2792
3499
|
self.match(malParser.ID)
|
|
2793
3500
|
except RecognitionException as re:
|
|
2794
3501
|
localctx.exception = re
|