|
1
|
|
|
# Generated from PythonParser.g4 by ANTLR 4.13.0 |
|
2
|
|
|
# encoding: utf-8 |
|
3
|
|
|
import sys |
|
4
|
|
|
from io import StringIO |
|
5
|
|
|
|
|
6
|
|
|
from antlr4 import * |
|
7
|
|
|
|
|
8
|
|
|
if sys.version_info[1] > 5: |
|
9
|
|
|
from typing import TextIO |
|
10
|
|
|
else: |
|
11
|
|
|
from typing.io import TextIO |
|
12
|
|
|
|
|
13
|
|
|
if "." in __name__: |
|
14
|
|
|
from .PythonParserBase import PythonParserBase |
|
15
|
|
|
else: |
|
16
|
|
|
from PythonParserBase import PythonParserBase |
|
17
|
|
|
|
|
18
|
|
|
def serializedATN(): |
|
19
|
|
|
return [ |
|
20
|
|
|
4,1,100,970,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, |
|
21
|
|
|
7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7, |
|
22
|
|
|
13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2, |
|
23
|
|
|
20,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, |
|
24
|
|
|
26,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, |
|
25
|
|
|
33,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, |
|
26
|
|
|
39,2,40,7,40,2,41,7,41,2,42,7,42,2,43,7,43,2,44,7,44,2,45,7,45,2, |
|
27
|
|
|
46,7,46,2,47,7,47,2,48,7,48,2,49,7,49,2,50,7,50,2,51,7,51,2,52,7, |
|
28
|
|
|
52,2,53,7,53,2,54,7,54,2,55,7,55,2,56,7,56,2,57,7,57,2,58,7,58,1, |
|
29
|
|
|
0,1,0,1,0,3,0,122,8,0,1,0,1,0,1,1,1,1,1,1,1,1,1,1,3,1,131,8,1,1, |
|
30
|
|
|
2,1,2,4,2,135,8,2,11,2,12,2,136,1,3,1,3,5,3,141,8,3,10,3,12,3,144, |
|
31
|
|
|
9,3,1,4,1,4,3,4,148,8,4,1,5,1,5,1,5,1,5,1,5,5,5,155,8,5,10,5,12, |
|
32
|
|
|
5,158,9,5,1,5,3,5,161,8,5,1,5,1,5,1,5,1,5,1,5,3,5,168,8,5,1,5,3, |
|
33
|
|
|
5,171,8,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,3,5,180,8,5,1,5,1,5,1,5,1, |
|
34
|
|
|
5,4,5,186,8,5,11,5,12,5,187,1,5,3,5,191,8,5,1,5,3,5,194,8,5,1,5, |
|
35
|
|
|
3,5,197,8,5,1,5,3,5,200,8,5,1,5,1,5,1,5,1,5,5,5,206,8,5,10,5,12, |
|
36
|
|
|
5,209,9,5,1,5,1,5,1,5,1,5,5,5,215,8,5,10,5,12,5,218,9,5,1,5,1,5, |
|
37
|
|
|
3,5,222,8,5,3,5,224,8,5,1,6,1,6,1,6,1,6,4,6,230,8,6,11,6,12,6,231, |
|
38
|
|
|
1,6,1,6,3,6,236,8,6,1,7,1,7,1,7,1,7,3,7,242,8,7,1,7,3,7,245,8,7, |
|
39
|
|
|
1,7,1,7,1,8,1,8,1,8,1,8,1,8,1,9,1,9,1,9,1,9,1,10,1,10,1,10,1,10, |
|
40
|
|
|
1,11,1,11,1,11,3,11,265,8,11,1,12,1,12,1,12,1,12,1,12,1,12,1,12, |
|
41
|
|
|
1,12,1,12,1,12,1,12,1,12,3,12,279,8,12,3,12,281,8,12,1,12,1,12,1, |
|
42
|
|
|
12,1,13,1,13,1,13,1,13,3,13,290,8,13,1,13,3,13,293,8,13,1,13,1,13, |
|
43
|
|
|
1,13,1,14,3,14,299,8,14,1,14,1,14,1,14,1,14,3,14,305,8,14,1,14,1, |
|
44
|
|
|
14,1,14,3,14,310,8,14,1,14,1,14,1,14,1,15,1,15,1,15,3,15,318,8,15, |
|
45
|
|
|
1,15,1,15,1,15,3,15,323,8,15,1,15,1,15,3,15,327,8,15,1,15,3,15,330, |
|
46
|
|
|
8,15,1,15,3,15,333,8,15,1,15,1,15,3,15,337,8,15,3,15,339,8,15,1, |
|
47
|
|
|
16,1,16,1,16,1,17,1,17,1,17,1,18,1,18,1,18,5,18,350,8,18,10,18,12, |
|
48
|
|
|
18,353,9,18,1,19,1,19,1,19,3,19,358,8,19,1,19,3,19,361,8,19,1,20, |
|
49
|
|
|
1,20,1,20,3,20,366,8,20,1,21,1,21,1,21,5,21,371,8,21,10,21,12,21, |
|
50
|
|
|
374,9,21,1,21,3,21,377,8,21,1,21,1,21,1,22,1,22,3,22,383,8,22,1, |
|
51
|
|
|
22,1,22,1,22,1,22,1,22,5,22,390,8,22,10,22,12,22,393,9,22,1,22,3, |
|
52
|
|
|
22,396,8,22,1,22,1,22,1,22,1,22,4,22,402,8,22,11,22,12,22,403,1, |
|
53
|
|
|
22,3,22,407,8,22,3,22,409,8,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22, |
|
54
|
|
|
1,22,1,22,3,22,420,8,22,1,22,1,22,1,22,1,22,1,22,1,22,3,22,428,8, |
|
55
|
|
|
22,3,22,430,8,22,3,22,432,8,22,1,22,1,22,3,22,436,8,22,1,22,1,22, |
|
56
|
|
|
1,22,1,22,1,22,5,22,443,8,22,10,22,12,22,446,9,22,1,22,1,22,4,22, |
|
57
|
|
|
450,8,22,11,22,12,22,451,3,22,454,8,22,1,22,1,22,1,22,1,22,1,22, |
|
58
|
|
|
1,22,1,22,3,22,463,8,22,1,22,1,22,1,22,1,22,5,22,469,8,22,10,22, |
|
59
|
|
|
12,22,472,9,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,3,22,481,8,22, |
|
60
|
|
|
3,22,483,8,22,1,22,1,22,1,22,1,22,1,22,1,22,3,22,491,8,22,1,22,1, |
|
61
|
|
|
22,1,22,1,22,1,22,5,22,498,8,22,10,22,12,22,501,9,22,1,22,1,22,3, |
|
62
|
|
|
22,505,8,22,1,23,1,23,3,23,509,8,23,1,23,1,23,4,23,513,8,23,11,23, |
|
63
|
|
|
12,23,514,1,23,1,23,3,23,519,8,23,1,23,3,23,522,8,23,1,24,1,24,1, |
|
64
|
|
|
24,1,25,1,25,1,25,1,25,5,25,531,8,25,10,25,12,25,534,9,25,1,25,1, |
|
65
|
|
|
25,3,25,538,8,25,1,25,3,25,541,8,25,1,25,1,25,1,25,1,25,1,25,3,25, |
|
66
|
|
|
548,8,25,1,25,1,25,1,25,1,25,1,25,3,25,555,8,25,3,25,557,8,25,1, |
|
67
|
|
|
26,1,26,1,26,5,26,562,8,26,10,26,12,26,565,9,26,1,26,3,26,568,8, |
|
68
|
|
|
26,1,27,1,27,1,27,5,27,573,8,27,10,27,12,27,576,9,27,1,27,3,27,579, |
|
69
|
|
|
8,27,1,28,1,28,1,28,3,28,584,8,28,1,29,1,29,1,29,5,29,589,8,29,10, |
|
70
|
|
|
29,12,29,592,9,29,1,30,1,30,1,30,3,30,597,8,30,1,31,1,31,1,31,1, |
|
71
|
|
|
31,1,31,1,31,3,31,605,8,31,1,31,1,31,3,31,609,8,31,1,31,1,31,3,31, |
|
72
|
|
|
613,8,31,1,32,1,32,1,32,3,32,618,8,32,1,32,1,32,1,32,3,32,623,8, |
|
73
|
|
|
32,1,32,1,32,3,32,627,8,32,1,32,3,32,630,8,32,1,32,3,32,633,8,32, |
|
74
|
|
|
1,32,1,32,3,32,637,8,32,3,32,639,8,32,1,33,1,33,1,33,5,33,644,8, |
|
75
|
|
|
33,10,33,12,33,647,9,33,1,34,1,34,1,34,3,34,652,8,34,1,34,3,34,655, |
|
76
|
|
|
8,34,1,35,1,35,1,35,1,36,1,36,1,36,1,37,1,37,1,37,1,37,3,37,667, |
|
77
|
|
|
8,37,1,37,1,37,1,37,1,37,1,37,1,37,5,37,675,8,37,10,37,12,37,678, |
|
78
|
|
|
9,37,1,38,1,38,1,38,1,38,1,38,1,38,1,38,1,38,1,38,1,38,1,38,1,38, |
|
79
|
|
|
3,38,692,8,38,1,38,1,38,1,38,3,38,697,8,38,3,38,699,8,38,1,38,5, |
|
80
|
|
|
38,702,8,38,10,38,12,38,705,9,38,1,39,1,39,3,39,709,8,39,1,39,1, |
|
81
|
|
|
39,5,39,713,8,39,10,39,12,39,716,9,39,1,39,1,39,3,39,720,8,39,1, |
|
82
|
|
|
39,1,39,1,39,1,39,1,39,1,39,1,39,1,39,1,39,1,39,1,39,1,39,1,39,1, |
|
83
|
|
|
39,1,39,1,39,1,39,1,39,1,39,1,39,1,39,5,39,743,8,39,10,39,12,39, |
|
84
|
|
|
746,9,39,1,40,1,40,1,40,3,40,751,8,40,1,40,1,40,1,40,3,40,756,8, |
|
85
|
|
|
40,1,40,1,40,1,40,3,40,761,8,40,1,40,1,40,1,40,1,40,3,40,767,8,40, |
|
86
|
|
|
1,40,1,40,1,40,1,40,1,40,1,40,1,40,3,40,776,8,40,1,40,1,40,1,40, |
|
87
|
|
|
4,40,781,8,40,11,40,12,40,782,3,40,785,8,40,1,41,1,41,1,41,1,41, |
|
88
|
|
|
1,41,1,41,3,41,793,8,41,1,41,1,41,1,41,1,41,1,41,1,41,1,41,3,41, |
|
89
|
|
|
802,8,41,5,41,804,8,41,10,41,12,41,807,9,41,1,41,3,41,810,8,41,1, |
|
90
|
|
|
41,1,41,1,41,1,41,1,41,1,41,3,41,818,8,41,1,42,1,42,3,42,822,8,42, |
|
91
|
|
|
1,42,1,42,1,42,1,42,3,42,828,8,42,5,42,830,8,42,10,42,12,42,833, |
|
92
|
|
|
9,42,1,42,3,42,836,8,42,3,42,838,8,42,1,43,1,43,1,43,5,43,843,8, |
|
93
|
|
|
43,10,43,12,43,846,9,43,1,43,3,43,849,8,43,1,44,1,44,1,44,1,44,1, |
|
94
|
|
|
44,1,44,5,44,857,8,44,10,44,12,44,860,9,44,1,45,1,45,1,46,1,46,1, |
|
95
|
|
|
46,3,46,867,8,46,1,47,1,47,1,48,1,48,3,48,873,8,48,1,49,1,49,1,49, |
|
96
|
|
|
3,49,878,8,49,1,50,1,50,1,50,3,50,883,8,50,1,50,3,50,886,8,50,1, |
|
97
|
|
|
51,1,51,3,51,890,8,51,1,51,1,51,1,51,1,51,1,51,3,51,897,8,51,1,52, |
|
98
|
|
|
1,52,1,52,5,52,902,8,52,10,52,12,52,905,9,52,1,52,3,52,908,8,52, |
|
99
|
|
|
1,53,1,53,1,53,1,53,3,53,914,8,53,1,53,1,53,3,53,918,8,53,1,54,1, |
|
100
|
|
|
54,1,54,5,54,923,8,54,10,54,12,54,926,9,54,1,54,3,54,929,8,54,1, |
|
101
|
|
|
55,1,55,1,55,1,55,3,55,935,8,55,1,55,3,55,938,8,55,3,55,940,8,55, |
|
102
|
|
|
1,55,1,55,3,55,944,8,55,1,55,3,55,947,8,55,3,55,949,8,55,1,56,1, |
|
103
|
|
|
56,3,56,953,8,56,1,57,1,57,1,57,1,57,1,57,3,57,960,8,57,1,58,1,58, |
|
104
|
|
|
1,58,1,58,3,58,966,8,58,3,58,968,8,58,1,58,0,4,74,76,78,88,59,0, |
|
105
|
|
|
2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46, |
|
106
|
|
|
48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90, |
|
107
|
|
|
92,94,96,98,100,102,104,106,108,110,112,114,116,0,10,1,1,3,3,1,0, |
|
108
|
|
|
41,42,1,0,70,82,2,0,55,56,60,60,3,0,44,44,57,59,68,68,1,0,55,56, |
|
109
|
|
|
1,0,53,54,2,0,39,40,96,96,1,0,84,87,2,0,44,44,48,48,1111,0,121,1, |
|
110
|
|
|
0,0,0,2,130,1,0,0,0,4,134,1,0,0,0,6,138,1,0,0,0,8,147,1,0,0,0,10, |
|
111
|
|
|
223,1,0,0,0,12,235,1,0,0,0,14,237,1,0,0,0,16,248,1,0,0,0,18,253, |
|
112
|
|
|
1,0,0,0,20,257,1,0,0,0,22,261,1,0,0,0,24,266,1,0,0,0,26,285,1,0, |
|
113
|
|
|
0,0,28,298,1,0,0,0,30,338,1,0,0,0,32,340,1,0,0,0,34,343,1,0,0,0, |
|
114
|
|
|
36,346,1,0,0,0,38,360,1,0,0,0,40,362,1,0,0,0,42,367,1,0,0,0,44,504, |
|
115
|
|
|
1,0,0,0,46,521,1,0,0,0,48,523,1,0,0,0,50,556,1,0,0,0,52,558,1,0, |
|
116
|
|
|
0,0,54,569,1,0,0,0,56,580,1,0,0,0,58,585,1,0,0,0,60,593,1,0,0,0, |
|
117
|
|
|
62,612,1,0,0,0,64,638,1,0,0,0,66,640,1,0,0,0,68,654,1,0,0,0,70,656, |
|
118
|
|
|
1,0,0,0,72,659,1,0,0,0,74,666,1,0,0,0,76,679,1,0,0,0,78,719,1,0, |
|
119
|
|
|
0,0,80,784,1,0,0,0,82,817,1,0,0,0,84,821,1,0,0,0,86,839,1,0,0,0, |
|
120
|
|
|
88,850,1,0,0,0,90,861,1,0,0,0,92,866,1,0,0,0,94,868,1,0,0,0,96,870, |
|
121
|
|
|
1,0,0,0,98,877,1,0,0,0,100,885,1,0,0,0,102,896,1,0,0,0,104,898,1, |
|
122
|
|
|
0,0,0,106,917,1,0,0,0,108,919,1,0,0,0,110,948,1,0,0,0,112,950,1, |
|
123
|
|
|
0,0,0,114,954,1,0,0,0,116,967,1,0,0,0,118,122,3,2,1,0,119,122,3, |
|
124
|
|
|
4,2,0,120,122,3,6,3,0,121,118,1,0,0,0,121,119,1,0,0,0,121,120,1, |
|
125
|
|
|
0,0,0,121,122,1,0,0,0,122,123,1,0,0,0,123,124,5,0,0,1,124,1,1,0, |
|
126
|
|
|
0,0,125,131,5,3,0,0,126,131,3,42,21,0,127,128,3,10,5,0,128,129,5, |
|
127
|
|
|
3,0,0,129,131,1,0,0,0,130,125,1,0,0,0,130,126,1,0,0,0,130,127,1, |
|
128
|
|
|
0,0,0,131,3,1,0,0,0,132,135,5,3,0,0,133,135,3,8,4,0,134,132,1,0, |
|
129
|
|
|
0,0,134,133,1,0,0,0,135,136,1,0,0,0,136,134,1,0,0,0,136,137,1,0, |
|
130
|
|
|
0,0,137,5,1,0,0,0,138,142,3,86,43,0,139,141,5,3,0,0,140,139,1,0, |
|
131
|
|
|
0,0,141,144,1,0,0,0,142,140,1,0,0,0,142,143,1,0,0,0,143,7,1,0,0, |
|
132
|
|
|
0,144,142,1,0,0,0,145,148,3,42,21,0,146,148,3,10,5,0,147,145,1,0, |
|
133
|
|
|
0,0,147,146,1,0,0,0,148,9,1,0,0,0,149,150,5,13,0,0,150,151,3,62, |
|
134
|
|
|
31,0,151,152,5,46,0,0,152,156,3,12,6,0,153,155,3,16,8,0,154,153, |
|
135
|
|
|
1,0,0,0,155,158,1,0,0,0,156,154,1,0,0,0,156,157,1,0,0,0,157,160, |
|
136
|
|
|
1,0,0,0,158,156,1,0,0,0,159,161,3,18,9,0,160,159,1,0,0,0,160,161, |
|
137
|
|
|
1,0,0,0,161,224,1,0,0,0,162,163,5,16,0,0,163,164,3,62,31,0,164,165, |
|
138
|
|
|
5,46,0,0,165,167,3,12,6,0,166,168,3,18,9,0,167,166,1,0,0,0,167,168, |
|
139
|
|
|
1,0,0,0,168,224,1,0,0,0,169,171,5,35,0,0,170,169,1,0,0,0,170,171, |
|
140
|
|
|
1,0,0,0,171,172,1,0,0,0,172,173,5,17,0,0,173,174,3,52,26,0,174,175, |
|
141
|
|
|
5,18,0,0,175,176,3,86,43,0,176,177,5,46,0,0,177,179,3,12,6,0,178, |
|
142
|
|
|
180,3,18,9,0,179,178,1,0,0,0,179,180,1,0,0,0,180,224,1,0,0,0,181, |
|
143
|
|
|
182,5,19,0,0,182,183,5,46,0,0,183,196,3,12,6,0,184,186,3,24,12,0, |
|
144
|
|
|
185,184,1,0,0,0,186,187,1,0,0,0,187,185,1,0,0,0,187,188,1,0,0,0, |
|
145
|
|
|
188,190,1,0,0,0,189,191,3,18,9,0,190,189,1,0,0,0,190,191,1,0,0,0, |
|
146
|
|
|
191,193,1,0,0,0,192,194,3,20,10,0,193,192,1,0,0,0,193,194,1,0,0, |
|
147
|
|
|
0,194,197,1,0,0,0,195,197,3,20,10,0,196,185,1,0,0,0,196,195,1,0, |
|
148
|
|
|
0,0,197,224,1,0,0,0,198,200,5,35,0,0,199,198,1,0,0,0,199,200,1,0, |
|
149
|
|
|
0,0,200,201,1,0,0,0,201,202,5,22,0,0,202,207,3,22,11,0,203,204,5, |
|
150
|
|
|
45,0,0,204,206,3,22,11,0,205,203,1,0,0,0,206,209,1,0,0,0,207,205, |
|
151
|
|
|
1,0,0,0,207,208,1,0,0,0,208,210,1,0,0,0,209,207,1,0,0,0,210,211, |
|
152
|
|
|
5,46,0,0,211,212,3,12,6,0,212,224,1,0,0,0,213,215,3,14,7,0,214,213, |
|
153
|
|
|
1,0,0,0,215,218,1,0,0,0,216,214,1,0,0,0,216,217,1,0,0,0,217,221, |
|
154
|
|
|
1,0,0,0,218,216,1,0,0,0,219,222,3,26,13,0,220,222,3,28,14,0,221, |
|
155
|
|
|
219,1,0,0,0,221,220,1,0,0,0,222,224,1,0,0,0,223,149,1,0,0,0,223, |
|
156
|
|
|
162,1,0,0,0,223,170,1,0,0,0,223,181,1,0,0,0,223,199,1,0,0,0,223, |
|
157
|
|
|
216,1,0,0,0,224,11,1,0,0,0,225,236,3,42,21,0,226,227,5,3,0,0,227, |
|
158
|
|
|
229,5,1,0,0,228,230,3,8,4,0,229,228,1,0,0,0,230,231,1,0,0,0,231, |
|
159
|
|
|
229,1,0,0,0,231,232,1,0,0,0,232,233,1,0,0,0,233,234,5,2,0,0,234, |
|
160
|
|
|
236,1,0,0,0,235,225,1,0,0,0,235,226,1,0,0,0,236,13,1,0,0,0,237,238, |
|
161
|
|
|
5,68,0,0,238,244,3,88,44,0,239,241,5,90,0,0,240,242,3,104,52,0,241, |
|
162
|
|
|
240,1,0,0,0,241,242,1,0,0,0,242,243,1,0,0,0,243,245,5,91,0,0,244, |
|
163
|
|
|
239,1,0,0,0,244,245,1,0,0,0,245,246,1,0,0,0,246,247,5,3,0,0,247, |
|
164
|
|
|
15,1,0,0,0,248,249,5,14,0,0,249,250,3,62,31,0,250,251,5,46,0,0,251, |
|
165
|
|
|
252,3,12,6,0,252,17,1,0,0,0,253,254,5,15,0,0,254,255,5,46,0,0,255, |
|
166
|
|
|
256,3,12,6,0,256,19,1,0,0,0,257,258,5,21,0,0,258,259,5,46,0,0,259, |
|
167
|
|
|
260,3,12,6,0,260,21,1,0,0,0,261,264,3,62,31,0,262,263,5,10,0,0,263, |
|
168
|
|
|
265,3,78,39,0,264,262,1,0,0,0,264,265,1,0,0,0,265,23,1,0,0,0,266, |
|
169
|
|
|
280,5,23,0,0,267,278,3,62,31,0,268,269,4,12,0,0,269,270,5,45,0,0, |
|
170
|
|
|
270,271,3,90,45,0,271,272,6,12,-1,0,272,279,1,0,0,0,273,274,4,12, |
|
171
|
|
|
1,0,274,275,5,10,0,0,275,276,3,90,45,0,276,277,6,12,-1,0,277,279, |
|
172
|
|
|
1,0,0,0,278,268,1,0,0,0,278,273,1,0,0,0,278,279,1,0,0,0,279,281, |
|
173
|
|
|
1,0,0,0,280,267,1,0,0,0,280,281,1,0,0,0,281,282,1,0,0,0,282,283, |
|
174
|
|
|
5,46,0,0,283,284,3,12,6,0,284,25,1,0,0,0,285,286,5,29,0,0,286,292, |
|
175
|
|
|
3,90,45,0,287,289,5,90,0,0,288,290,3,104,52,0,289,288,1,0,0,0,289, |
|
176
|
|
|
290,1,0,0,0,290,291,1,0,0,0,291,293,5,91,0,0,292,287,1,0,0,0,292, |
|
177
|
|
|
293,1,0,0,0,293,294,1,0,0,0,294,295,5,46,0,0,295,296,3,12,6,0,296, |
|
178
|
|
|
27,1,0,0,0,297,299,5,35,0,0,298,297,1,0,0,0,298,299,1,0,0,0,299, |
|
179
|
|
|
300,1,0,0,0,300,301,5,4,0,0,301,302,3,90,45,0,302,304,5,90,0,0,303, |
|
180
|
|
|
305,3,30,15,0,304,303,1,0,0,0,304,305,1,0,0,0,305,306,1,0,0,0,306, |
|
181
|
|
|
309,5,91,0,0,307,308,5,69,0,0,308,310,3,62,31,0,309,307,1,0,0,0, |
|
182
|
|
|
309,310,1,0,0,0,310,311,1,0,0,0,311,312,5,46,0,0,312,313,3,12,6, |
|
183
|
|
|
0,313,29,1,0,0,0,314,315,3,36,18,0,315,316,5,45,0,0,316,318,1,0, |
|
184
|
|
|
0,0,317,314,1,0,0,0,317,318,1,0,0,0,318,329,1,0,0,0,319,322,3,32, |
|
185
|
|
|
16,0,320,321,5,45,0,0,321,323,3,36,18,0,322,320,1,0,0,0,322,323, |
|
186
|
|
|
1,0,0,0,323,326,1,0,0,0,324,325,5,45,0,0,325,327,3,34,17,0,326,324, |
|
187
|
|
|
1,0,0,0,326,327,1,0,0,0,327,330,1,0,0,0,328,330,3,34,17,0,329,319, |
|
188
|
|
|
1,0,0,0,329,328,1,0,0,0,330,332,1,0,0,0,331,333,5,45,0,0,332,331, |
|
189
|
|
|
1,0,0,0,332,333,1,0,0,0,333,339,1,0,0,0,334,336,3,36,18,0,335,337, |
|
190
|
|
|
5,45,0,0,336,335,1,0,0,0,336,337,1,0,0,0,337,339,1,0,0,0,338,317, |
|
191
|
|
|
1,0,0,0,338,334,1,0,0,0,339,31,1,0,0,0,340,341,5,44,0,0,341,342, |
|
192
|
|
|
3,40,20,0,342,33,1,0,0,0,343,344,5,48,0,0,344,345,3,40,20,0,345, |
|
193
|
|
|
35,1,0,0,0,346,351,3,38,19,0,347,348,5,45,0,0,348,350,3,38,19,0, |
|
194
|
|
|
349,347,1,0,0,0,350,353,1,0,0,0,351,349,1,0,0,0,351,352,1,0,0,0, |
|
195
|
|
|
352,37,1,0,0,0,353,351,1,0,0,0,354,357,3,40,20,0,355,356,5,49,0, |
|
196
|
|
|
0,356,358,3,62,31,0,357,355,1,0,0,0,357,358,1,0,0,0,358,361,1,0, |
|
197
|
|
|
0,0,359,361,5,44,0,0,360,354,1,0,0,0,360,359,1,0,0,0,361,39,1,0, |
|
198
|
|
|
0,0,362,365,3,90,45,0,363,364,5,46,0,0,364,366,3,62,31,0,365,363, |
|
199
|
|
|
1,0,0,0,365,366,1,0,0,0,366,41,1,0,0,0,367,372,3,44,22,0,368,369, |
|
200
|
|
|
5,47,0,0,369,371,3,44,22,0,370,368,1,0,0,0,371,374,1,0,0,0,372,370, |
|
201
|
|
|
1,0,0,0,372,373,1,0,0,0,373,376,1,0,0,0,374,372,1,0,0,0,375,377, |
|
202
|
|
|
5,47,0,0,376,375,1,0,0,0,376,377,1,0,0,0,377,378,1,0,0,0,378,379, |
|
203
|
|
|
7,0,0,0,379,43,1,0,0,0,380,382,3,46,23,0,381,383,3,50,25,0,382,381, |
|
204
|
|
|
1,0,0,0,382,383,1,0,0,0,383,505,1,0,0,0,384,385,4,22,2,0,385,408, |
|
205
|
|
|
5,37,0,0,386,391,3,62,31,0,387,388,5,45,0,0,388,390,3,62,31,0,389, |
|
206
|
|
|
387,1,0,0,0,390,393,1,0,0,0,391,389,1,0,0,0,391,392,1,0,0,0,392, |
|
207
|
|
|
395,1,0,0,0,393,391,1,0,0,0,394,396,5,45,0,0,395,394,1,0,0,0,395, |
|
208
|
|
|
396,1,0,0,0,396,409,1,0,0,0,397,398,5,54,0,0,398,401,3,62,31,0,399, |
|
209
|
|
|
400,5,45,0,0,400,402,3,62,31,0,401,399,1,0,0,0,402,403,1,0,0,0,403, |
|
210
|
|
|
401,1,0,0,0,403,404,1,0,0,0,404,406,1,0,0,0,405,407,5,45,0,0,406, |
|
211
|
|
|
405,1,0,0,0,406,407,1,0,0,0,407,409,1,0,0,0,408,386,1,0,0,0,408, |
|
212
|
|
|
397,1,0,0,0,409,410,1,0,0,0,410,411,6,22,-1,0,411,505,1,0,0,0,412, |
|
213
|
|
|
413,5,31,0,0,413,505,3,52,26,0,414,505,5,32,0,0,415,505,5,34,0,0, |
|
214
|
|
|
416,505,5,33,0,0,417,419,5,5,0,0,418,420,3,86,43,0,419,418,1,0,0, |
|
215
|
|
|
0,419,420,1,0,0,0,420,505,1,0,0,0,421,431,5,6,0,0,422,429,3,62,31, |
|
216
|
|
|
0,423,424,5,45,0,0,424,427,3,62,31,0,425,426,5,45,0,0,426,428,3, |
|
217
|
|
|
62,31,0,427,425,1,0,0,0,427,428,1,0,0,0,428,430,1,0,0,0,429,423, |
|
218
|
|
|
1,0,0,0,429,430,1,0,0,0,430,432,1,0,0,0,431,422,1,0,0,0,431,432, |
|
219
|
|
|
1,0,0,0,432,435,1,0,0,0,433,434,5,7,0,0,434,436,3,62,31,0,435,433, |
|
220
|
|
|
1,0,0,0,435,436,1,0,0,0,436,505,1,0,0,0,437,505,3,96,48,0,438,439, |
|
221
|
|
|
5,8,0,0,439,505,3,58,29,0,440,453,5,7,0,0,441,443,7,1,0,0,442,441, |
|
222
|
|
|
1,0,0,0,443,446,1,0,0,0,444,442,1,0,0,0,444,445,1,0,0,0,445,447, |
|
223
|
|
|
1,0,0,0,446,444,1,0,0,0,447,454,3,88,44,0,448,450,7,1,0,0,449,448, |
|
224
|
|
|
1,0,0,0,450,451,1,0,0,0,451,449,1,0,0,0,451,452,1,0,0,0,452,454, |
|
225
|
|
|
1,0,0,0,453,444,1,0,0,0,453,449,1,0,0,0,454,455,1,0,0,0,455,462, |
|
226
|
|
|
5,8,0,0,456,463,5,44,0,0,457,458,5,90,0,0,458,459,3,54,27,0,459, |
|
227
|
|
|
460,5,91,0,0,460,463,1,0,0,0,461,463,3,54,27,0,462,456,1,0,0,0,462, |
|
228
|
|
|
457,1,0,0,0,462,461,1,0,0,0,463,505,1,0,0,0,464,465,5,11,0,0,465, |
|
229
|
|
|
470,3,90,45,0,466,467,5,45,0,0,467,469,3,90,45,0,468,466,1,0,0,0, |
|
230
|
|
|
469,472,1,0,0,0,470,468,1,0,0,0,470,471,1,0,0,0,471,505,1,0,0,0, |
|
231
|
|
|
472,470,1,0,0,0,473,474,4,22,3,0,474,475,5,38,0,0,475,482,3,78,39, |
|
232
|
|
|
0,476,477,5,18,0,0,477,480,3,62,31,0,478,479,5,45,0,0,479,481,3, |
|
233
|
|
|
62,31,0,480,478,1,0,0,0,480,481,1,0,0,0,481,483,1,0,0,0,482,476, |
|
234
|
|
|
1,0,0,0,482,483,1,0,0,0,483,484,1,0,0,0,484,485,6,22,-1,0,485,505, |
|
235
|
|
|
1,0,0,0,486,487,5,12,0,0,487,490,3,62,31,0,488,489,5,45,0,0,489, |
|
236
|
|
|
491,3,62,31,0,490,488,1,0,0,0,490,491,1,0,0,0,491,505,1,0,0,0,492, |
|
237
|
|
|
493,4,22,4,0,493,494,5,9,0,0,494,499,3,90,45,0,495,496,5,45,0,0, |
|
238
|
|
|
496,498,3,90,45,0,497,495,1,0,0,0,498,501,1,0,0,0,499,497,1,0,0, |
|
239
|
|
|
0,499,500,1,0,0,0,500,502,1,0,0,0,501,499,1,0,0,0,502,503,6,22,-1, |
|
240
|
|
|
0,503,505,1,0,0,0,504,380,1,0,0,0,504,384,1,0,0,0,504,412,1,0,0, |
|
241
|
|
|
0,504,414,1,0,0,0,504,415,1,0,0,0,504,416,1,0,0,0,504,417,1,0,0, |
|
242
|
|
|
0,504,421,1,0,0,0,504,437,1,0,0,0,504,438,1,0,0,0,504,440,1,0,0, |
|
243
|
|
|
0,504,464,1,0,0,0,504,473,1,0,0,0,504,486,1,0,0,0,504,492,1,0,0, |
|
244
|
|
|
0,505,45,1,0,0,0,506,509,3,62,31,0,507,509,3,48,24,0,508,506,1,0, |
|
245
|
|
|
0,0,508,507,1,0,0,0,509,510,1,0,0,0,510,511,5,45,0,0,511,513,1,0, |
|
246
|
|
|
0,0,512,508,1,0,0,0,513,514,1,0,0,0,514,512,1,0,0,0,514,515,1,0, |
|
247
|
|
|
0,0,515,518,1,0,0,0,516,519,3,62,31,0,517,519,3,48,24,0,518,516, |
|
248
|
|
|
1,0,0,0,518,517,1,0,0,0,518,519,1,0,0,0,519,522,1,0,0,0,520,522, |
|
249
|
|
|
3,86,43,0,521,512,1,0,0,0,521,520,1,0,0,0,522,47,1,0,0,0,523,524, |
|
250
|
|
|
5,44,0,0,524,525,3,78,39,0,525,49,1,0,0,0,526,540,5,49,0,0,527,532, |
|
251
|
|
|
3,46,23,0,528,529,5,49,0,0,529,531,3,46,23,0,530,528,1,0,0,0,531, |
|
252
|
|
|
534,1,0,0,0,532,530,1,0,0,0,532,533,1,0,0,0,533,537,1,0,0,0,534, |
|
253
|
|
|
532,1,0,0,0,535,536,5,49,0,0,536,538,3,96,48,0,537,535,1,0,0,0,537, |
|
254
|
|
|
538,1,0,0,0,538,541,1,0,0,0,539,541,3,96,48,0,540,527,1,0,0,0,540, |
|
255
|
|
|
539,1,0,0,0,541,557,1,0,0,0,542,543,4,25,5,0,543,544,5,46,0,0,544, |
|
256
|
|
|
547,3,62,31,0,545,546,5,49,0,0,546,548,3,86,43,0,547,545,1,0,0,0, |
|
257
|
|
|
547,548,1,0,0,0,548,549,1,0,0,0,549,550,6,25,-1,0,550,557,1,0,0, |
|
258
|
|
|
0,551,554,7,2,0,0,552,555,3,96,48,0,553,555,3,86,43,0,554,552,1, |
|
259
|
|
|
0,0,0,554,553,1,0,0,0,555,557,1,0,0,0,556,526,1,0,0,0,556,542,1, |
|
260
|
|
|
0,0,0,556,551,1,0,0,0,557,51,1,0,0,0,558,563,3,78,39,0,559,560,5, |
|
261
|
|
|
45,0,0,560,562,3,78,39,0,561,559,1,0,0,0,562,565,1,0,0,0,563,561, |
|
262
|
|
|
1,0,0,0,563,564,1,0,0,0,564,567,1,0,0,0,565,563,1,0,0,0,566,568, |
|
263
|
|
|
5,45,0,0,567,566,1,0,0,0,567,568,1,0,0,0,568,53,1,0,0,0,569,574, |
|
264
|
|
|
3,56,28,0,570,571,5,45,0,0,571,573,3,56,28,0,572,570,1,0,0,0,573, |
|
265
|
|
|
576,1,0,0,0,574,572,1,0,0,0,574,575,1,0,0,0,575,578,1,0,0,0,576, |
|
266
|
|
|
574,1,0,0,0,577,579,5,45,0,0,578,577,1,0,0,0,578,579,1,0,0,0,579, |
|
267
|
|
|
55,1,0,0,0,580,583,3,90,45,0,581,582,5,10,0,0,582,584,3,90,45,0, |
|
268
|
|
|
583,581,1,0,0,0,583,584,1,0,0,0,584,57,1,0,0,0,585,590,3,60,30,0, |
|
269
|
|
|
586,587,5,45,0,0,587,589,3,60,30,0,588,586,1,0,0,0,589,592,1,0,0, |
|
270
|
|
|
0,590,588,1,0,0,0,590,591,1,0,0,0,591,59,1,0,0,0,592,590,1,0,0,0, |
|
271
|
|
|
593,596,3,88,44,0,594,595,5,10,0,0,595,597,3,90,45,0,596,594,1,0, |
|
272
|
|
|
0,0,596,597,1,0,0,0,597,61,1,0,0,0,598,604,3,74,37,0,599,600,5,13, |
|
273
|
|
|
0,0,600,601,3,74,37,0,601,602,5,15,0,0,602,603,3,62,31,0,603,605, |
|
274
|
|
|
1,0,0,0,604,599,1,0,0,0,604,605,1,0,0,0,605,613,1,0,0,0,606,608, |
|
275
|
|
|
5,24,0,0,607,609,3,64,32,0,608,607,1,0,0,0,608,609,1,0,0,0,609,610, |
|
276
|
|
|
1,0,0,0,610,611,5,46,0,0,611,613,3,62,31,0,612,598,1,0,0,0,612,606, |
|
277
|
|
|
1,0,0,0,613,63,1,0,0,0,614,615,3,66,33,0,615,616,5,45,0,0,616,618, |
|
278
|
|
|
1,0,0,0,617,614,1,0,0,0,617,618,1,0,0,0,618,629,1,0,0,0,619,622, |
|
279
|
|
|
3,70,35,0,620,621,5,45,0,0,621,623,3,66,33,0,622,620,1,0,0,0,622, |
|
280
|
|
|
623,1,0,0,0,623,626,1,0,0,0,624,625,5,45,0,0,625,627,3,72,36,0,626, |
|
281
|
|
|
624,1,0,0,0,626,627,1,0,0,0,627,630,1,0,0,0,628,630,3,72,36,0,629, |
|
282
|
|
|
619,1,0,0,0,629,628,1,0,0,0,630,632,1,0,0,0,631,633,5,45,0,0,632, |
|
283
|
|
|
631,1,0,0,0,632,633,1,0,0,0,633,639,1,0,0,0,634,636,3,66,33,0,635, |
|
284
|
|
|
637,5,45,0,0,636,635,1,0,0,0,636,637,1,0,0,0,637,639,1,0,0,0,638, |
|
285
|
|
|
617,1,0,0,0,638,634,1,0,0,0,639,65,1,0,0,0,640,645,3,68,34,0,641, |
|
286
|
|
|
642,5,45,0,0,642,644,3,68,34,0,643,641,1,0,0,0,644,647,1,0,0,0,645, |
|
287
|
|
|
643,1,0,0,0,645,646,1,0,0,0,646,67,1,0,0,0,647,645,1,0,0,0,648,651, |
|
288
|
|
|
3,90,45,0,649,650,5,49,0,0,650,652,3,62,31,0,651,649,1,0,0,0,651, |
|
289
|
|
|
652,1,0,0,0,652,655,1,0,0,0,653,655,5,44,0,0,654,648,1,0,0,0,654, |
|
290
|
|
|
653,1,0,0,0,655,69,1,0,0,0,656,657,5,44,0,0,657,658,3,90,45,0,658, |
|
291
|
|
|
71,1,0,0,0,659,660,5,48,0,0,660,661,3,90,45,0,661,73,1,0,0,0,662, |
|
292
|
|
|
663,6,37,-1,0,663,667,3,76,38,0,664,665,5,27,0,0,665,667,3,74,37, |
|
293
|
|
|
3,666,662,1,0,0,0,666,664,1,0,0,0,667,676,1,0,0,0,668,669,10,2,0, |
|
294
|
|
|
0,669,670,5,26,0,0,670,675,3,74,37,3,671,672,10,1,0,0,672,673,5, |
|
295
|
|
|
25,0,0,673,675,3,74,37,2,674,668,1,0,0,0,674,671,1,0,0,0,675,678, |
|
296
|
|
|
1,0,0,0,676,674,1,0,0,0,676,677,1,0,0,0,677,75,1,0,0,0,678,676,1, |
|
297
|
|
|
0,0,0,679,680,6,38,-1,0,680,681,3,78,39,0,681,703,1,0,0,0,682,698, |
|
298
|
|
|
10,2,0,0,683,699,5,61,0,0,684,699,5,62,0,0,685,699,5,63,0,0,686, |
|
299
|
|
|
699,5,64,0,0,687,699,5,65,0,0,688,699,5,66,0,0,689,699,5,67,0,0, |
|
300
|
|
|
690,692,5,27,0,0,691,690,1,0,0,0,691,692,1,0,0,0,692,693,1,0,0,0, |
|
301
|
|
|
693,699,5,18,0,0,694,696,5,28,0,0,695,697,5,27,0,0,696,695,1,0,0, |
|
302
|
|
|
0,696,697,1,0,0,0,697,699,1,0,0,0,698,683,1,0,0,0,698,684,1,0,0, |
|
303
|
|
|
0,698,685,1,0,0,0,698,686,1,0,0,0,698,687,1,0,0,0,698,688,1,0,0, |
|
304
|
|
|
0,698,689,1,0,0,0,698,691,1,0,0,0,698,694,1,0,0,0,699,700,1,0,0, |
|
305
|
|
|
0,700,702,3,76,38,3,701,682,1,0,0,0,702,705,1,0,0,0,703,701,1,0, |
|
306
|
|
|
0,0,703,704,1,0,0,0,704,77,1,0,0,0,705,703,1,0,0,0,706,708,6,39, |
|
307
|
|
|
-1,0,707,709,5,36,0,0,708,707,1,0,0,0,708,709,1,0,0,0,709,710,1, |
|
308
|
|
|
0,0,0,710,714,3,80,40,0,711,713,3,100,50,0,712,711,1,0,0,0,713,716, |
|
309
|
|
|
1,0,0,0,714,712,1,0,0,0,714,715,1,0,0,0,715,720,1,0,0,0,716,714, |
|
310
|
|
|
1,0,0,0,717,718,7,3,0,0,718,720,3,78,39,7,719,706,1,0,0,0,719,717, |
|
311
|
|
|
1,0,0,0,720,744,1,0,0,0,721,722,10,8,0,0,722,723,5,48,0,0,723,743, |
|
312
|
|
|
3,78,39,8,724,725,10,6,0,0,725,726,7,4,0,0,726,743,3,78,39,7,727, |
|
313
|
|
|
728,10,5,0,0,728,729,7,5,0,0,729,743,3,78,39,6,730,731,10,4,0,0, |
|
314
|
|
|
731,732,7,6,0,0,732,743,3,78,39,5,733,734,10,3,0,0,734,735,5,52, |
|
315
|
|
|
0,0,735,743,3,78,39,4,736,737,10,2,0,0,737,738,5,51,0,0,738,743, |
|
316
|
|
|
3,78,39,3,739,740,10,1,0,0,740,741,5,50,0,0,741,743,3,78,39,2,742, |
|
317
|
|
|
721,1,0,0,0,742,724,1,0,0,0,742,727,1,0,0,0,742,730,1,0,0,0,742, |
|
318
|
|
|
733,1,0,0,0,742,736,1,0,0,0,742,739,1,0,0,0,743,746,1,0,0,0,744, |
|
319
|
|
|
742,1,0,0,0,744,745,1,0,0,0,745,79,1,0,0,0,746,744,1,0,0,0,747,750, |
|
320
|
|
|
5,90,0,0,748,751,3,96,48,0,749,751,3,84,42,0,750,748,1,0,0,0,750, |
|
321
|
|
|
749,1,0,0,0,750,751,1,0,0,0,751,752,1,0,0,0,752,785,5,91,0,0,753, |
|
322
|
|
|
755,5,94,0,0,754,756,3,84,42,0,755,754,1,0,0,0,755,756,1,0,0,0,756, |
|
323
|
|
|
757,1,0,0,0,757,785,5,95,0,0,758,760,5,92,0,0,759,761,3,82,41,0, |
|
324
|
|
|
760,759,1,0,0,0,760,761,1,0,0,0,761,762,1,0,0,0,762,785,5,93,0,0, |
|
325
|
|
|
763,764,5,43,0,0,764,766,3,86,43,0,765,767,5,45,0,0,766,765,1,0, |
|
326
|
|
|
0,0,766,767,1,0,0,0,767,768,1,0,0,0,768,769,5,43,0,0,769,785,1,0, |
|
327
|
|
|
0,0,770,785,5,42,0,0,771,785,3,90,45,0,772,785,5,37,0,0,773,785, |
|
328
|
|
|
5,38,0,0,774,776,5,56,0,0,775,774,1,0,0,0,775,776,1,0,0,0,776,777, |
|
329
|
|
|
1,0,0,0,777,785,3,92,46,0,778,785,5,20,0,0,779,781,5,83,0,0,780, |
|
330
|
|
|
779,1,0,0,0,781,782,1,0,0,0,782,780,1,0,0,0,782,783,1,0,0,0,783, |
|
331
|
|
|
785,1,0,0,0,784,747,1,0,0,0,784,753,1,0,0,0,784,758,1,0,0,0,784, |
|
332
|
|
|
763,1,0,0,0,784,770,1,0,0,0,784,771,1,0,0,0,784,772,1,0,0,0,784, |
|
333
|
|
|
773,1,0,0,0,784,775,1,0,0,0,784,778,1,0,0,0,784,780,1,0,0,0,785, |
|
334
|
|
|
81,1,0,0,0,786,787,3,62,31,0,787,788,5,46,0,0,788,789,3,62,31,0, |
|
335
|
|
|
789,793,1,0,0,0,790,791,5,48,0,0,791,793,3,78,39,0,792,786,1,0,0, |
|
336
|
|
|
0,792,790,1,0,0,0,793,805,1,0,0,0,794,801,5,45,0,0,795,796,3,62, |
|
337
|
|
|
31,0,796,797,5,46,0,0,797,798,3,62,31,0,798,802,1,0,0,0,799,800, |
|
338
|
|
|
5,48,0,0,800,802,3,78,39,0,801,795,1,0,0,0,801,799,1,0,0,0,802,804, |
|
339
|
|
|
1,0,0,0,803,794,1,0,0,0,804,807,1,0,0,0,805,803,1,0,0,0,805,806, |
|
340
|
|
|
1,0,0,0,806,809,1,0,0,0,807,805,1,0,0,0,808,810,5,45,0,0,809,808, |
|
341
|
|
|
1,0,0,0,809,810,1,0,0,0,810,818,1,0,0,0,811,812,3,62,31,0,812,813, |
|
342
|
|
|
5,46,0,0,813,814,3,62,31,0,814,815,3,114,57,0,815,818,1,0,0,0,816, |
|
343
|
|
|
818,3,84,42,0,817,792,1,0,0,0,817,811,1,0,0,0,817,816,1,0,0,0,818, |
|
344
|
|
|
83,1,0,0,0,819,822,3,62,31,0,820,822,3,48,24,0,821,819,1,0,0,0,821, |
|
345
|
|
|
820,1,0,0,0,822,837,1,0,0,0,823,838,3,114,57,0,824,827,5,45,0,0, |
|
346
|
|
|
825,828,3,62,31,0,826,828,3,48,24,0,827,825,1,0,0,0,827,826,1,0, |
|
347
|
|
|
0,0,828,830,1,0,0,0,829,824,1,0,0,0,830,833,1,0,0,0,831,829,1,0, |
|
348
|
|
|
0,0,831,832,1,0,0,0,832,835,1,0,0,0,833,831,1,0,0,0,834,836,5,45, |
|
349
|
|
|
0,0,835,834,1,0,0,0,835,836,1,0,0,0,836,838,1,0,0,0,837,823,1,0, |
|
350
|
|
|
0,0,837,831,1,0,0,0,838,85,1,0,0,0,839,844,3,62,31,0,840,841,5,45, |
|
351
|
|
|
0,0,841,843,3,62,31,0,842,840,1,0,0,0,843,846,1,0,0,0,844,842,1, |
|
352
|
|
|
0,0,0,844,845,1,0,0,0,845,848,1,0,0,0,846,844,1,0,0,0,847,849,5, |
|
353
|
|
|
45,0,0,848,847,1,0,0,0,848,849,1,0,0,0,849,87,1,0,0,0,850,851,6, |
|
354
|
|
|
44,-1,0,851,852,3,90,45,0,852,858,1,0,0,0,853,854,10,2,0,0,854,855, |
|
355
|
|
|
5,41,0,0,855,857,3,90,45,0,856,853,1,0,0,0,857,860,1,0,0,0,858,856, |
|
356
|
|
|
1,0,0,0,858,859,1,0,0,0,859,89,1,0,0,0,860,858,1,0,0,0,861,862,7, |
|
357
|
|
|
7,0,0,862,91,1,0,0,0,863,867,3,94,47,0,864,867,5,88,0,0,865,867, |
|
358
|
|
|
5,89,0,0,866,863,1,0,0,0,866,864,1,0,0,0,866,865,1,0,0,0,867,93, |
|
359
|
|
|
1,0,0,0,868,869,7,8,0,0,869,95,1,0,0,0,870,872,5,30,0,0,871,873, |
|
360
|
|
|
3,98,49,0,872,871,1,0,0,0,872,873,1,0,0,0,873,97,1,0,0,0,874,875, |
|
361
|
|
|
5,7,0,0,875,878,3,62,31,0,876,878,3,86,43,0,877,874,1,0,0,0,877, |
|
362
|
|
|
876,1,0,0,0,878,99,1,0,0,0,879,880,5,41,0,0,880,882,3,90,45,0,881, |
|
363
|
|
|
883,3,102,51,0,882,881,1,0,0,0,882,883,1,0,0,0,883,886,1,0,0,0,884, |
|
364
|
|
|
886,3,102,51,0,885,879,1,0,0,0,885,884,1,0,0,0,886,101,1,0,0,0,887, |
|
365
|
|
|
889,5,90,0,0,888,890,3,104,52,0,889,888,1,0,0,0,889,890,1,0,0,0, |
|
366
|
|
|
890,891,1,0,0,0,891,897,5,91,0,0,892,893,5,94,0,0,893,894,3,108, |
|
367
|
|
|
54,0,894,895,5,95,0,0,895,897,1,0,0,0,896,887,1,0,0,0,896,892,1, |
|
368
|
|
|
0,0,0,897,103,1,0,0,0,898,903,3,106,53,0,899,900,5,45,0,0,900,902, |
|
369
|
|
|
3,106,53,0,901,899,1,0,0,0,902,905,1,0,0,0,903,901,1,0,0,0,903,904, |
|
370
|
|
|
1,0,0,0,904,907,1,0,0,0,905,903,1,0,0,0,906,908,5,45,0,0,907,906, |
|
371
|
|
|
1,0,0,0,907,908,1,0,0,0,908,105,1,0,0,0,909,913,3,62,31,0,910,914, |
|
372
|
|
|
3,114,57,0,911,912,5,49,0,0,912,914,3,62,31,0,913,910,1,0,0,0,913, |
|
373
|
|
|
911,1,0,0,0,913,914,1,0,0,0,914,918,1,0,0,0,915,916,7,9,0,0,916, |
|
374
|
|
|
918,3,62,31,0,917,909,1,0,0,0,917,915,1,0,0,0,918,107,1,0,0,0,919, |
|
375
|
|
|
924,3,110,55,0,920,921,5,45,0,0,921,923,3,110,55,0,922,920,1,0,0, |
|
376
|
|
|
0,923,926,1,0,0,0,924,922,1,0,0,0,924,925,1,0,0,0,925,928,1,0,0, |
|
377
|
|
|
0,926,924,1,0,0,0,927,929,5,45,0,0,928,927,1,0,0,0,928,929,1,0,0, |
|
378
|
|
|
0,929,109,1,0,0,0,930,949,5,42,0,0,931,939,3,62,31,0,932,934,5,46, |
|
379
|
|
|
0,0,933,935,3,62,31,0,934,933,1,0,0,0,934,935,1,0,0,0,935,937,1, |
|
380
|
|
|
0,0,0,936,938,3,112,56,0,937,936,1,0,0,0,937,938,1,0,0,0,938,940, |
|
381
|
|
|
1,0,0,0,939,932,1,0,0,0,939,940,1,0,0,0,940,949,1,0,0,0,941,943, |
|
382
|
|
|
5,46,0,0,942,944,3,62,31,0,943,942,1,0,0,0,943,944,1,0,0,0,944,946, |
|
383
|
|
|
1,0,0,0,945,947,3,112,56,0,946,945,1,0,0,0,946,947,1,0,0,0,947,949, |
|
384
|
|
|
1,0,0,0,948,930,1,0,0,0,948,931,1,0,0,0,948,941,1,0,0,0,949,111, |
|
385
|
|
|
1,0,0,0,950,952,5,46,0,0,951,953,3,62,31,0,952,951,1,0,0,0,952,953, |
|
386
|
|
|
1,0,0,0,953,113,1,0,0,0,954,955,5,17,0,0,955,956,3,52,26,0,956,957, |
|
387
|
|
|
5,18,0,0,957,959,3,74,37,0,958,960,3,116,58,0,959,958,1,0,0,0,959, |
|
388
|
|
|
960,1,0,0,0,960,115,1,0,0,0,961,968,3,114,57,0,962,963,5,13,0,0, |
|
389
|
|
|
963,965,3,62,31,0,964,966,3,116,58,0,965,964,1,0,0,0,965,966,1,0, |
|
390
|
|
|
0,0,966,968,1,0,0,0,967,961,1,0,0,0,967,962,1,0,0,0,968,117,1,0, |
|
391
|
|
|
0,0,151,121,130,134,136,142,147,156,160,167,170,179,187,190,193, |
|
392
|
|
|
196,199,207,216,221,223,231,235,241,244,264,278,280,289,292,298, |
|
393
|
|
|
304,309,317,322,326,329,332,336,338,351,357,360,365,372,376,382, |
|
394
|
|
|
391,395,403,406,408,419,427,429,431,435,444,451,453,462,470,480, |
|
395
|
|
|
482,490,499,504,508,514,518,521,532,537,540,547,554,556,563,567, |
|
396
|
|
|
574,578,583,590,596,604,608,612,617,622,626,629,632,636,638,645, |
|
397
|
|
|
651,654,666,674,676,691,696,698,703,708,714,719,742,744,750,755, |
|
398
|
|
|
760,766,775,782,784,792,801,805,809,817,821,827,831,835,837,844, |
|
399
|
|
|
848,858,866,872,877,882,885,889,896,903,907,913,917,924,928,934, |
|
400
|
|
|
937,939,943,946,948,952,959,965,967 |
|
401
|
|
|
] |
|
402
|
|
|
|
|
403
|
|
|
class PythonParser ( PythonParserBase ): |
|
404
|
|
|
|
|
405
|
|
|
grammarFileName = "PythonParser.g4" |
|
406
|
|
|
|
|
407
|
|
|
atn = ATNDeserializer().deserialize(serializedATN()) |
|
408
|
|
|
|
|
409
|
|
|
decisionsToDFA = [ DFA(ds, i) for i, ds in enumerate(atn.decisionToState) ] |
|
410
|
|
|
|
|
411
|
|
|
sharedContextCache = PredictionContextCache() |
|
412
|
|
|
|
|
413
|
|
|
literalNames = [ "<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", |
|
414
|
|
|
"'def'", "'return'", "'raise'", "'from'", "'import'", |
|
415
|
|
|
"'nonlocal'", "'as'", "'global'", "'assert'", "'if'", |
|
416
|
|
|
"'elif'", "'else'", "'while'", "'for'", "'in'", "'try'", |
|
417
|
|
|
"'None'", "'finally'", "'with'", "'except'", "'lambda'", |
|
418
|
|
|
"'or'", "'and'", "'not'", "'is'", "'class'", "'yield'", |
|
419
|
|
|
"'del'", "'pass'", "'continue'", "'break'", "'async'", |
|
420
|
|
|
"'await'", "'print'", "'exec'", "'True'", "'False'", |
|
421
|
|
|
"'.'", "'...'", "'`'", "'*'", "','", "':'", "';'", |
|
422
|
|
|
"'**'", "'='", "'|'", "'^'", "'&'", "'<<'", "'>>'", |
|
423
|
|
|
"'+'", "'-'", "'/'", "'%'", "'//'", "'~'", "'<'", "'>'", |
|
424
|
|
|
"'=='", "'>='", "'<='", "'<>'", "'!='", "'@'", "'->'", |
|
425
|
|
|
"'+='", "'-='", "'*='", "'@='", "'/='", "'%='", "'&='", |
|
426
|
|
|
"'|='", "'^='", "'<<='", "'>>='", "'**='", "'//='", |
|
427
|
|
|
"<INVALID>", "<INVALID>", "<INVALID>", "<INVALID>", |
|
428
|
|
|
"<INVALID>", "<INVALID>", "<INVALID>", "'('", "')'", |
|
429
|
|
|
"'{'", "'}'", "'['", "']'" ] |
|
430
|
|
|
|
|
431
|
|
|
symbolicNames = [ "<INVALID>", "INDENT", "DEDENT", "LINE_BREAK", "DEF", |
|
432
|
|
|
"RETURN", "RAISE", "FROM", "IMPORT", "NONLOCAL", "AS", |
|
433
|
|
|
"GLOBAL", "ASSERT", "IF", "ELIF", "ELSE", "WHILE", |
|
434
|
|
|
"FOR", "IN", "TRY", "NONE", "FINALLY", "WITH", "EXCEPT", |
|
435
|
|
|
"LAMBDA", "OR", "AND", "NOT", "IS", "CLASS", "YIELD", |
|
436
|
|
|
"DEL", "PASS", "CONTINUE", "BREAK", "ASYNC", "AWAIT", |
|
437
|
|
|
"PRINT", "EXEC", "TRUE", "FALSE", "DOT", "ELLIPSIS", |
|
438
|
|
|
"REVERSE_QUOTE", "STAR", "COMMA", "COLON", "SEMI_COLON", |
|
439
|
|
|
"POWER", "ASSIGN", "OR_OP", "XOR", "AND_OP", "LEFT_SHIFT", |
|
440
|
|
|
"RIGHT_SHIFT", "ADD", "MINUS", "DIV", "MOD", "IDIV", |
|
441
|
|
|
"NOT_OP", "LESS_THAN", "GREATER_THAN", "EQUALS", "GT_EQ", |
|
442
|
|
|
"LT_EQ", "NOT_EQ_1", "NOT_EQ_2", "AT", "ARROW", "ADD_ASSIGN", |
|
443
|
|
|
"SUB_ASSIGN", "MULT_ASSIGN", "AT_ASSIGN", "DIV_ASSIGN", |
|
444
|
|
|
"MOD_ASSIGN", "AND_ASSIGN", "OR_ASSIGN", "XOR_ASSIGN", |
|
445
|
|
|
"LEFT_SHIFT_ASSIGN", "RIGHT_SHIFT_ASSIGN", "POWER_ASSIGN", |
|
446
|
|
|
"IDIV_ASSIGN", "STRING", "DECIMAL_INTEGER", "OCT_INTEGER", |
|
447
|
|
|
"HEX_INTEGER", "BIN_INTEGER", "IMAG_NUMBER", "FLOAT_NUMBER", |
|
448
|
|
|
"OPEN_PAREN", "CLOSE_PAREN", "OPEN_BRACE", "CLOSE_BRACE", |
|
449
|
|
|
"OPEN_BRACKET", "CLOSE_BRACKET", "NAME", "LINE_JOIN", |
|
450
|
|
|
"NEWLINE", "WS", "COMMENT" ] |
|
451
|
|
|
|
|
452
|
|
|
RULE_root = 0 |
|
453
|
|
|
RULE_single_input = 1 |
|
454
|
|
|
RULE_file_input = 2 |
|
455
|
|
|
RULE_eval_input = 3 |
|
456
|
|
|
RULE_stmt = 4 |
|
457
|
|
|
RULE_compound_stmt = 5 |
|
458
|
|
|
RULE_suite = 6 |
|
459
|
|
|
RULE_decorator = 7 |
|
460
|
|
|
RULE_elif_clause = 8 |
|
461
|
|
|
RULE_else_clause = 9 |
|
462
|
|
|
RULE_finally_clause = 10 |
|
463
|
|
|
RULE_with_item = 11 |
|
464
|
|
|
RULE_except_clause = 12 |
|
465
|
|
|
RULE_classdef = 13 |
|
466
|
|
|
RULE_funcdef = 14 |
|
467
|
|
|
RULE_typedargslist = 15 |
|
468
|
|
|
RULE_args = 16 |
|
469
|
|
|
RULE_kwargs = 17 |
|
470
|
|
|
RULE_def_parameters = 18 |
|
471
|
|
|
RULE_def_parameter = 19 |
|
472
|
|
|
RULE_named_parameter = 20 |
|
473
|
|
|
RULE_simple_stmt = 21 |
|
474
|
|
|
RULE_small_stmt = 22 |
|
475
|
|
|
RULE_testlist_star_expr = 23 |
|
476
|
|
|
RULE_star_expr = 24 |
|
477
|
|
|
RULE_assign_part = 25 |
|
478
|
|
|
RULE_exprlist = 26 |
|
479
|
|
|
RULE_import_as_names = 27 |
|
480
|
|
|
RULE_import_as_name = 28 |
|
481
|
|
|
RULE_dotted_as_names = 29 |
|
482
|
|
|
RULE_dotted_as_name = 30 |
|
483
|
|
|
RULE_test = 31 |
|
484
|
|
|
RULE_varargslist = 32 |
|
485
|
|
|
RULE_vardef_parameters = 33 |
|
486
|
|
|
RULE_vardef_parameter = 34 |
|
487
|
|
|
RULE_varargs = 35 |
|
488
|
|
|
RULE_varkwargs = 36 |
|
489
|
|
|
RULE_logical_test = 37 |
|
490
|
|
|
RULE_comparison = 38 |
|
491
|
|
|
RULE_expr = 39 |
|
492
|
|
|
RULE_atom = 40 |
|
493
|
|
|
RULE_dictorsetmaker = 41 |
|
494
|
|
|
RULE_testlist_comp = 42 |
|
495
|
|
|
RULE_testlist = 43 |
|
496
|
|
|
RULE_dotted_name = 44 |
|
497
|
|
|
RULE_name = 45 |
|
498
|
|
|
RULE_number = 46 |
|
499
|
|
|
RULE_integer = 47 |
|
500
|
|
|
RULE_yield_expr = 48 |
|
501
|
|
|
RULE_yield_arg = 49 |
|
502
|
|
|
RULE_trailer = 50 |
|
503
|
|
|
RULE_arguments = 51 |
|
504
|
|
|
RULE_arglist = 52 |
|
505
|
|
|
RULE_argument = 53 |
|
506
|
|
|
RULE_subscriptlist = 54 |
|
507
|
|
|
RULE_subscript = 55 |
|
508
|
|
|
RULE_sliceop = 56 |
|
509
|
|
|
RULE_comp_for = 57 |
|
510
|
|
|
RULE_comp_iter = 58 |
|
511
|
|
|
|
|
512
|
|
|
ruleNames = [ "root", "single_input", "file_input", "eval_input", "stmt", |
|
513
|
|
|
"compound_stmt", "suite", "decorator", "elif_clause", |
|
514
|
|
|
"else_clause", "finally_clause", "with_item", "except_clause", |
|
515
|
|
|
"classdef", "funcdef", "typedargslist", "args", "kwargs", |
|
516
|
|
|
"def_parameters", "def_parameter", "named_parameter", |
|
517
|
|
|
"simple_stmt", "small_stmt", "testlist_star_expr", "star_expr", |
|
518
|
|
|
"assign_part", "exprlist", "import_as_names", "import_as_name", |
|
519
|
|
|
"dotted_as_names", "dotted_as_name", "test", "varargslist", |
|
520
|
|
|
"vardef_parameters", "vardef_parameter", "varargs", "varkwargs", |
|
521
|
|
|
"logical_test", "comparison", "expr", "atom", "dictorsetmaker", |
|
522
|
|
|
"testlist_comp", "testlist", "dotted_name", "name", "number", |
|
523
|
|
|
"integer", "yield_expr", "yield_arg", "trailer", "arguments", |
|
524
|
|
|
"arglist", "argument", "subscriptlist", "subscript", |
|
525
|
|
|
"sliceop", "comp_for", "comp_iter" ] |
|
526
|
|
|
|
|
527
|
|
|
EOF = Token.EOF |
|
528
|
|
|
INDENT=1 |
|
529
|
|
|
DEDENT=2 |
|
530
|
|
|
LINE_BREAK=3 |
|
531
|
|
|
DEF=4 |
|
532
|
|
|
RETURN=5 |
|
533
|
|
|
RAISE=6 |
|
534
|
|
|
FROM=7 |
|
535
|
|
|
IMPORT=8 |
|
536
|
|
|
NONLOCAL=9 |
|
537
|
|
|
AS=10 |
|
538
|
|
|
GLOBAL=11 |
|
539
|
|
|
ASSERT=12 |
|
540
|
|
|
IF=13 |
|
541
|
|
|
ELIF=14 |
|
542
|
|
|
ELSE=15 |
|
543
|
|
|
WHILE=16 |
|
544
|
|
|
FOR=17 |
|
545
|
|
|
IN=18 |
|
546
|
|
|
TRY=19 |
|
547
|
|
|
NONE=20 |
|
548
|
|
|
FINALLY=21 |
|
549
|
|
|
WITH=22 |
|
550
|
|
|
EXCEPT=23 |
|
551
|
|
|
LAMBDA=24 |
|
552
|
|
|
OR=25 |
|
553
|
|
|
AND=26 |
|
554
|
|
|
NOT=27 |
|
555
|
|
|
IS=28 |
|
556
|
|
|
CLASS=29 |
|
557
|
|
|
YIELD=30 |
|
558
|
|
|
DEL=31 |
|
559
|
|
|
PASS=32 |
|
560
|
|
|
CONTINUE=33 |
|
561
|
|
|
BREAK=34 |
|
562
|
|
|
ASYNC=35 |
|
563
|
|
|
AWAIT=36 |
|
564
|
|
|
PRINT=37 |
|
565
|
|
|
EXEC=38 |
|
566
|
|
|
TRUE=39 |
|
567
|
|
|
FALSE=40 |
|
568
|
|
|
DOT=41 |
|
569
|
|
|
ELLIPSIS=42 |
|
570
|
|
|
REVERSE_QUOTE=43 |
|
571
|
|
|
STAR=44 |
|
572
|
|
|
COMMA=45 |
|
573
|
|
|
COLON=46 |
|
574
|
|
|
SEMI_COLON=47 |
|
575
|
|
|
POWER=48 |
|
576
|
|
|
ASSIGN=49 |
|
577
|
|
|
OR_OP=50 |
|
578
|
|
|
XOR=51 |
|
579
|
|
|
AND_OP=52 |
|
580
|
|
|
LEFT_SHIFT=53 |
|
581
|
|
|
RIGHT_SHIFT=54 |
|
582
|
|
|
ADD=55 |
|
583
|
|
|
MINUS=56 |
|
584
|
|
|
DIV=57 |
|
585
|
|
|
MOD=58 |
|
586
|
|
|
IDIV=59 |
|
587
|
|
|
NOT_OP=60 |
|
588
|
|
|
LESS_THAN=61 |
|
589
|
|
|
GREATER_THAN=62 |
|
590
|
|
|
EQUALS=63 |
|
591
|
|
|
GT_EQ=64 |
|
592
|
|
|
LT_EQ=65 |
|
593
|
|
|
NOT_EQ_1=66 |
|
594
|
|
|
NOT_EQ_2=67 |
|
595
|
|
|
AT=68 |
|
596
|
|
|
ARROW=69 |
|
597
|
|
|
ADD_ASSIGN=70 |
|
598
|
|
|
SUB_ASSIGN=71 |
|
599
|
|
|
MULT_ASSIGN=72 |
|
600
|
|
|
AT_ASSIGN=73 |
|
601
|
|
|
DIV_ASSIGN=74 |
|
602
|
|
|
MOD_ASSIGN=75 |
|
603
|
|
|
AND_ASSIGN=76 |
|
604
|
|
|
OR_ASSIGN=77 |
|
605
|
|
|
XOR_ASSIGN=78 |
|
606
|
|
|
LEFT_SHIFT_ASSIGN=79 |
|
607
|
|
|
RIGHT_SHIFT_ASSIGN=80 |
|
608
|
|
|
POWER_ASSIGN=81 |
|
609
|
|
|
IDIV_ASSIGN=82 |
|
610
|
|
|
STRING=83 |
|
611
|
|
|
DECIMAL_INTEGER=84 |
|
612
|
|
|
OCT_INTEGER=85 |
|
613
|
|
|
HEX_INTEGER=86 |
|
614
|
|
|
BIN_INTEGER=87 |
|
615
|
|
|
IMAG_NUMBER=88 |
|
616
|
|
|
FLOAT_NUMBER=89 |
|
617
|
|
|
OPEN_PAREN=90 |
|
618
|
|
|
CLOSE_PAREN=91 |
|
619
|
|
|
OPEN_BRACE=92 |
|
620
|
|
|
CLOSE_BRACE=93 |
|
621
|
|
|
OPEN_BRACKET=94 |
|
622
|
|
|
CLOSE_BRACKET=95 |
|
623
|
|
|
NAME=96 |
|
624
|
|
|
LINE_JOIN=97 |
|
625
|
|
|
NEWLINE=98 |
|
626
|
|
|
WS=99 |
|
627
|
|
|
COMMENT=100 |
|
628
|
|
|
|
|
629
|
|
|
def __init__(self, input:TokenStream, output:TextIO = sys.stdout): |
|
630
|
|
|
super().__init__(input, output) |
|
631
|
|
|
self.checkVersion("4.13.0") |
|
632
|
|
|
self._interp = ParserATNSimulator(self, self.atn, self.decisionsToDFA, self.sharedContextCache) |
|
633
|
|
|
self._predicates = None |
|
634
|
|
|
|
|
635
|
|
|
|
|
636
|
|
|
|
|
637
|
|
|
|
|
638
|
|
|
class RootContext(ParserRuleContext): |
|
639
|
|
|
__slots__ = 'parser' |
|
640
|
|
|
|
|
641
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
642
|
|
|
super().__init__(parent, invokingState) |
|
643
|
|
|
self.parser = parser |
|
644
|
|
|
|
|
645
|
|
|
def EOF(self): |
|
646
|
|
|
return self.getToken(PythonParser.EOF, 0) |
|
647
|
|
|
|
|
648
|
|
|
def single_input(self): |
|
649
|
|
|
return self.getTypedRuleContext(PythonParser.Single_inputContext,0) |
|
650
|
|
|
|
|
651
|
|
|
|
|
652
|
|
|
def file_input(self): |
|
653
|
|
|
return self.getTypedRuleContext(PythonParser.File_inputContext,0) |
|
654
|
|
|
|
|
655
|
|
|
|
|
656
|
|
|
def eval_input(self): |
|
657
|
|
|
return self.getTypedRuleContext(PythonParser.Eval_inputContext,0) |
|
658
|
|
|
|
|
659
|
|
|
|
|
660
|
|
|
def getRuleIndex(self): |
|
661
|
|
|
return PythonParser.RULE_root |
|
662
|
|
|
|
|
663
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
664
|
|
|
if hasattr( listener, "enterRoot" ): |
|
665
|
|
|
listener.enterRoot(self) |
|
666
|
|
|
|
|
667
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
668
|
|
|
if hasattr( listener, "exitRoot" ): |
|
669
|
|
|
listener.exitRoot(self) |
|
670
|
|
|
|
|
671
|
|
|
|
|
672
|
|
|
|
|
673
|
|
|
|
|
674
|
|
|
def root(self): |
|
675
|
|
|
|
|
676
|
|
|
localctx = PythonParser.RootContext(self, self._ctx, self.state) |
|
677
|
|
|
self.enterRule(localctx, 0, self.RULE_root) |
|
678
|
|
|
try: |
|
679
|
|
|
self.enterOuterAlt(localctx, 1) |
|
680
|
|
|
self.state = 121 |
|
681
|
|
|
self._errHandler.sync(self) |
|
682
|
|
|
la_ = self._interp.adaptivePredict(self._input,0,self._ctx) |
|
683
|
|
|
if la_ == 1: |
|
684
|
|
|
self.state = 118 |
|
685
|
|
|
self.single_input() |
|
686
|
|
|
|
|
687
|
|
|
elif la_ == 2: |
|
688
|
|
|
self.state = 119 |
|
689
|
|
|
self.file_input() |
|
690
|
|
|
|
|
691
|
|
|
elif la_ == 3: |
|
692
|
|
|
self.state = 120 |
|
693
|
|
|
self.eval_input() |
|
694
|
|
|
|
|
695
|
|
|
|
|
696
|
|
|
self.state = 123 |
|
697
|
|
|
self.match(PythonParser.EOF) |
|
698
|
|
|
except RecognitionException as re: |
|
699
|
|
|
localctx.exception = re |
|
700
|
|
|
self._errHandler.reportError(self, re) |
|
701
|
|
|
self._errHandler.recover(self, re) |
|
702
|
|
|
finally: |
|
703
|
|
|
self.exitRule() |
|
704
|
|
|
return localctx |
|
705
|
|
|
|
|
706
|
|
|
|
|
707
|
|
|
class Single_inputContext(ParserRuleContext): |
|
708
|
|
|
__slots__ = 'parser' |
|
709
|
|
|
|
|
710
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
711
|
|
|
super().__init__(parent, invokingState) |
|
712
|
|
|
self.parser = parser |
|
713
|
|
|
|
|
714
|
|
|
def LINE_BREAK(self): |
|
715
|
|
|
return self.getToken(PythonParser.LINE_BREAK, 0) |
|
716
|
|
|
|
|
717
|
|
|
def simple_stmt(self): |
|
718
|
|
|
return self.getTypedRuleContext(PythonParser.Simple_stmtContext,0) |
|
719
|
|
|
|
|
720
|
|
|
|
|
721
|
|
|
def compound_stmt(self): |
|
722
|
|
|
return self.getTypedRuleContext(PythonParser.Compound_stmtContext,0) |
|
723
|
|
|
|
|
724
|
|
|
|
|
725
|
|
|
def getRuleIndex(self): |
|
726
|
|
|
return PythonParser.RULE_single_input |
|
727
|
|
|
|
|
728
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
729
|
|
|
if hasattr( listener, "enterSingle_input" ): |
|
730
|
|
|
listener.enterSingle_input(self) |
|
731
|
|
|
|
|
732
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
733
|
|
|
if hasattr( listener, "exitSingle_input" ): |
|
734
|
|
|
listener.exitSingle_input(self) |
|
735
|
|
|
|
|
736
|
|
|
|
|
737
|
|
|
|
|
738
|
|
|
|
|
739
|
|
|
def single_input(self): |
|
740
|
|
|
|
|
741
|
|
|
localctx = PythonParser.Single_inputContext(self, self._ctx, self.state) |
|
742
|
|
|
self.enterRule(localctx, 2, self.RULE_single_input) |
|
743
|
|
|
try: |
|
744
|
|
|
self.state = 130 |
|
745
|
|
|
self._errHandler.sync(self) |
|
746
|
|
|
la_ = self._interp.adaptivePredict(self._input,1,self._ctx) |
|
747
|
|
|
if la_ == 1: |
|
748
|
|
|
self.enterOuterAlt(localctx, 1) |
|
749
|
|
|
self.state = 125 |
|
750
|
|
|
self.match(PythonParser.LINE_BREAK) |
|
751
|
|
|
pass |
|
752
|
|
|
|
|
753
|
|
|
elif la_ == 2: |
|
754
|
|
|
self.enterOuterAlt(localctx, 2) |
|
755
|
|
|
self.state = 126 |
|
756
|
|
|
self.simple_stmt() |
|
757
|
|
|
pass |
|
758
|
|
|
|
|
759
|
|
|
elif la_ == 3: |
|
760
|
|
|
self.enterOuterAlt(localctx, 3) |
|
761
|
|
|
self.state = 127 |
|
762
|
|
|
self.compound_stmt() |
|
763
|
|
|
self.state = 128 |
|
764
|
|
|
self.match(PythonParser.LINE_BREAK) |
|
765
|
|
|
pass |
|
766
|
|
|
|
|
767
|
|
|
|
|
768
|
|
|
except RecognitionException as re: |
|
769
|
|
|
localctx.exception = re |
|
770
|
|
|
self._errHandler.reportError(self, re) |
|
771
|
|
|
self._errHandler.recover(self, re) |
|
772
|
|
|
finally: |
|
773
|
|
|
self.exitRule() |
|
774
|
|
|
return localctx |
|
775
|
|
|
|
|
776
|
|
|
|
|
777
|
|
|
class File_inputContext(ParserRuleContext): |
|
778
|
|
|
__slots__ = 'parser' |
|
779
|
|
|
|
|
780
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
781
|
|
|
super().__init__(parent, invokingState) |
|
782
|
|
|
self.parser = parser |
|
783
|
|
|
|
|
784
|
|
|
def LINE_BREAK(self, i:int=None): |
|
785
|
|
|
if i is None: |
|
786
|
|
|
return self.getTokens(PythonParser.LINE_BREAK) |
|
787
|
|
|
else: |
|
788
|
|
|
return self.getToken(PythonParser.LINE_BREAK, i) |
|
789
|
|
|
|
|
790
|
|
|
def stmt(self, i:int=None): |
|
791
|
|
|
if i is None: |
|
792
|
|
|
return self.getTypedRuleContexts(PythonParser.StmtContext) |
|
793
|
|
|
else: |
|
794
|
|
|
return self.getTypedRuleContext(PythonParser.StmtContext,i) |
|
795
|
|
|
|
|
796
|
|
|
|
|
797
|
|
|
def getRuleIndex(self): |
|
798
|
|
|
return PythonParser.RULE_file_input |
|
799
|
|
|
|
|
800
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
801
|
|
|
if hasattr( listener, "enterFile_input" ): |
|
802
|
|
|
listener.enterFile_input(self) |
|
803
|
|
|
|
|
804
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
805
|
|
|
if hasattr( listener, "exitFile_input" ): |
|
806
|
|
|
listener.exitFile_input(self) |
|
807
|
|
|
|
|
808
|
|
|
|
|
809
|
|
|
|
|
810
|
|
|
|
|
811
|
|
|
def file_input(self): |
|
812
|
|
|
|
|
813
|
|
|
localctx = PythonParser.File_inputContext(self, self._ctx, self.state) |
|
814
|
|
|
self.enterRule(localctx, 4, self.RULE_file_input) |
|
815
|
|
|
try: |
|
816
|
|
|
self.enterOuterAlt(localctx, 1) |
|
817
|
|
|
self.state = 134 |
|
818
|
|
|
self._errHandler.sync(self) |
|
819
|
|
|
_alt = 1 |
|
820
|
|
|
while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: |
|
821
|
|
|
if _alt == 1: |
|
822
|
|
|
self.state = 134 |
|
823
|
|
|
self._errHandler.sync(self) |
|
824
|
|
|
la_ = self._interp.adaptivePredict(self._input,2,self._ctx) |
|
825
|
|
|
if la_ == 1: |
|
826
|
|
|
self.state = 132 |
|
827
|
|
|
self.match(PythonParser.LINE_BREAK) |
|
828
|
|
|
pass |
|
829
|
|
|
|
|
830
|
|
|
elif la_ == 2: |
|
831
|
|
|
self.state = 133 |
|
832
|
|
|
self.stmt() |
|
833
|
|
|
pass |
|
834
|
|
|
|
|
835
|
|
|
|
|
836
|
|
|
|
|
837
|
|
|
else: |
|
838
|
|
|
raise NoViableAltException(self) |
|
839
|
|
|
self.state = 136 |
|
840
|
|
|
self._errHandler.sync(self) |
|
841
|
|
|
_alt = self._interp.adaptivePredict(self._input,3,self._ctx) |
|
842
|
|
|
|
|
843
|
|
|
except RecognitionException as re: |
|
844
|
|
|
localctx.exception = re |
|
845
|
|
|
self._errHandler.reportError(self, re) |
|
846
|
|
|
self._errHandler.recover(self, re) |
|
847
|
|
|
finally: |
|
848
|
|
|
self.exitRule() |
|
849
|
|
|
return localctx |
|
850
|
|
|
|
|
851
|
|
|
|
|
852
|
|
|
class Eval_inputContext(ParserRuleContext): |
|
853
|
|
|
__slots__ = 'parser' |
|
854
|
|
|
|
|
855
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
856
|
|
|
super().__init__(parent, invokingState) |
|
857
|
|
|
self.parser = parser |
|
858
|
|
|
|
|
859
|
|
|
def testlist(self): |
|
860
|
|
|
return self.getTypedRuleContext(PythonParser.TestlistContext,0) |
|
861
|
|
|
|
|
862
|
|
|
|
|
863
|
|
|
def LINE_BREAK(self, i:int=None): |
|
864
|
|
|
if i is None: |
|
865
|
|
|
return self.getTokens(PythonParser.LINE_BREAK) |
|
866
|
|
|
else: |
|
867
|
|
|
return self.getToken(PythonParser.LINE_BREAK, i) |
|
868
|
|
|
|
|
869
|
|
|
def getRuleIndex(self): |
|
870
|
|
|
return PythonParser.RULE_eval_input |
|
871
|
|
|
|
|
872
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
873
|
|
|
if hasattr( listener, "enterEval_input" ): |
|
874
|
|
|
listener.enterEval_input(self) |
|
875
|
|
|
|
|
876
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
877
|
|
|
if hasattr( listener, "exitEval_input" ): |
|
878
|
|
|
listener.exitEval_input(self) |
|
879
|
|
|
|
|
880
|
|
|
|
|
881
|
|
|
|
|
882
|
|
|
|
|
883
|
|
|
def eval_input(self): |
|
884
|
|
|
|
|
885
|
|
|
localctx = PythonParser.Eval_inputContext(self, self._ctx, self.state) |
|
886
|
|
|
self.enterRule(localctx, 6, self.RULE_eval_input) |
|
887
|
|
|
self._la = 0 # Token type |
|
888
|
|
|
try: |
|
889
|
|
|
self.enterOuterAlt(localctx, 1) |
|
890
|
|
|
self.state = 138 |
|
891
|
|
|
self.testlist() |
|
892
|
|
|
self.state = 142 |
|
893
|
|
|
self._errHandler.sync(self) |
|
894
|
|
|
_la = self._input.LA(1) |
|
895
|
|
|
while _la==3: |
|
896
|
|
|
self.state = 139 |
|
897
|
|
|
self.match(PythonParser.LINE_BREAK) |
|
898
|
|
|
self.state = 144 |
|
899
|
|
|
self._errHandler.sync(self) |
|
900
|
|
|
_la = self._input.LA(1) |
|
901
|
|
|
|
|
902
|
|
|
except RecognitionException as re: |
|
903
|
|
|
localctx.exception = re |
|
904
|
|
|
self._errHandler.reportError(self, re) |
|
905
|
|
|
self._errHandler.recover(self, re) |
|
906
|
|
|
finally: |
|
907
|
|
|
self.exitRule() |
|
908
|
|
|
return localctx |
|
909
|
|
|
|
|
910
|
|
|
|
|
911
|
|
|
class StmtContext(ParserRuleContext): |
|
912
|
|
|
__slots__ = 'parser' |
|
913
|
|
|
|
|
914
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
915
|
|
|
super().__init__(parent, invokingState) |
|
916
|
|
|
self.parser = parser |
|
917
|
|
|
|
|
918
|
|
|
def simple_stmt(self): |
|
919
|
|
|
return self.getTypedRuleContext(PythonParser.Simple_stmtContext,0) |
|
920
|
|
|
|
|
921
|
|
|
|
|
922
|
|
|
def compound_stmt(self): |
|
923
|
|
|
return self.getTypedRuleContext(PythonParser.Compound_stmtContext,0) |
|
924
|
|
|
|
|
925
|
|
|
|
|
926
|
|
|
def getRuleIndex(self): |
|
927
|
|
|
return PythonParser.RULE_stmt |
|
928
|
|
|
|
|
929
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
930
|
|
|
if hasattr( listener, "enterStmt" ): |
|
931
|
|
|
listener.enterStmt(self) |
|
932
|
|
|
|
|
933
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
934
|
|
|
if hasattr( listener, "exitStmt" ): |
|
935
|
|
|
listener.exitStmt(self) |
|
936
|
|
|
|
|
937
|
|
|
|
|
938
|
|
|
|
|
939
|
|
|
|
|
940
|
|
|
def stmt(self): |
|
941
|
|
|
|
|
942
|
|
|
localctx = PythonParser.StmtContext(self, self._ctx, self.state) |
|
943
|
|
|
self.enterRule(localctx, 8, self.RULE_stmt) |
|
944
|
|
|
try: |
|
945
|
|
|
self.state = 147 |
|
946
|
|
|
self._errHandler.sync(self) |
|
947
|
|
|
la_ = self._interp.adaptivePredict(self._input,5,self._ctx) |
|
948
|
|
|
if la_ == 1: |
|
949
|
|
|
self.enterOuterAlt(localctx, 1) |
|
950
|
|
|
self.state = 145 |
|
951
|
|
|
self.simple_stmt() |
|
952
|
|
|
pass |
|
953
|
|
|
|
|
954
|
|
|
elif la_ == 2: |
|
955
|
|
|
self.enterOuterAlt(localctx, 2) |
|
956
|
|
|
self.state = 146 |
|
957
|
|
|
self.compound_stmt() |
|
958
|
|
|
pass |
|
959
|
|
|
|
|
960
|
|
|
|
|
961
|
|
|
except RecognitionException as re: |
|
962
|
|
|
localctx.exception = re |
|
963
|
|
|
self._errHandler.reportError(self, re) |
|
964
|
|
|
self._errHandler.recover(self, re) |
|
965
|
|
|
finally: |
|
966
|
|
|
self.exitRule() |
|
967
|
|
|
return localctx |
|
968
|
|
|
|
|
969
|
|
|
|
|
970
|
|
|
class Compound_stmtContext(ParserRuleContext): |
|
971
|
|
|
__slots__ = 'parser' |
|
972
|
|
|
|
|
973
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
974
|
|
|
super().__init__(parent, invokingState) |
|
975
|
|
|
self.parser = parser |
|
976
|
|
|
|
|
977
|
|
|
|
|
978
|
|
|
def getRuleIndex(self): |
|
979
|
|
|
return PythonParser.RULE_compound_stmt |
|
980
|
|
|
|
|
981
|
|
|
|
|
982
|
|
|
def copyFrom(self, ctx:ParserRuleContext): |
|
983
|
|
|
super().copyFrom(ctx) |
|
984
|
|
|
|
|
985
|
|
|
|
|
986
|
|
|
|
|
987
|
|
|
class While_stmtContext(Compound_stmtContext): |
|
988
|
|
|
|
|
989
|
|
|
def __init__(self, parser, ctx:ParserRuleContext): # actually a PythonParser.Compound_stmtContext |
|
990
|
|
|
super().__init__(parser) |
|
991
|
|
|
self.copyFrom(ctx) |
|
992
|
|
|
|
|
993
|
|
|
def WHILE(self): |
|
994
|
|
|
return self.getToken(PythonParser.WHILE, 0) |
|
995
|
|
|
def test(self): |
|
996
|
|
|
return self.getTypedRuleContext(PythonParser.TestContext,0) |
|
997
|
|
|
|
|
998
|
|
|
def COLON(self): |
|
999
|
|
|
return self.getToken(PythonParser.COLON, 0) |
|
1000
|
|
|
def suite(self): |
|
1001
|
|
|
return self.getTypedRuleContext(PythonParser.SuiteContext,0) |
|
1002
|
|
|
|
|
1003
|
|
|
def else_clause(self): |
|
1004
|
|
|
return self.getTypedRuleContext(PythonParser.Else_clauseContext,0) |
|
1005
|
|
|
|
|
1006
|
|
|
|
|
1007
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
1008
|
|
|
if hasattr( listener, "enterWhile_stmt" ): |
|
1009
|
|
|
listener.enterWhile_stmt(self) |
|
1010
|
|
|
|
|
1011
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
1012
|
|
|
if hasattr( listener, "exitWhile_stmt" ): |
|
1013
|
|
|
listener.exitWhile_stmt(self) |
|
1014
|
|
|
|
|
1015
|
|
|
|
|
1016
|
|
|
class Try_stmtContext(Compound_stmtContext): |
|
1017
|
|
|
|
|
1018
|
|
|
def __init__(self, parser, ctx:ParserRuleContext): # actually a PythonParser.Compound_stmtContext |
|
1019
|
|
|
super().__init__(parser) |
|
1020
|
|
|
self.copyFrom(ctx) |
|
1021
|
|
|
|
|
1022
|
|
|
def TRY(self): |
|
1023
|
|
|
return self.getToken(PythonParser.TRY, 0) |
|
1024
|
|
|
def COLON(self): |
|
1025
|
|
|
return self.getToken(PythonParser.COLON, 0) |
|
1026
|
|
|
def suite(self): |
|
1027
|
|
|
return self.getTypedRuleContext(PythonParser.SuiteContext,0) |
|
1028
|
|
|
|
|
1029
|
|
|
def finally_clause(self): |
|
1030
|
|
|
return self.getTypedRuleContext(PythonParser.Finally_clauseContext,0) |
|
1031
|
|
|
|
|
1032
|
|
|
def except_clause(self, i:int=None): |
|
1033
|
|
|
if i is None: |
|
1034
|
|
|
return self.getTypedRuleContexts(PythonParser.Except_clauseContext) |
|
1035
|
|
|
else: |
|
1036
|
|
|
return self.getTypedRuleContext(PythonParser.Except_clauseContext,i) |
|
1037
|
|
|
|
|
1038
|
|
|
def else_clause(self): |
|
1039
|
|
|
return self.getTypedRuleContext(PythonParser.Else_clauseContext,0) |
|
1040
|
|
|
|
|
1041
|
|
|
|
|
1042
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
1043
|
|
|
if hasattr( listener, "enterTry_stmt" ): |
|
1044
|
|
|
listener.enterTry_stmt(self) |
|
1045
|
|
|
|
|
1046
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
1047
|
|
|
if hasattr( listener, "exitTry_stmt" ): |
|
1048
|
|
|
listener.exitTry_stmt(self) |
|
1049
|
|
|
|
|
1050
|
|
|
|
|
1051
|
|
|
class If_stmtContext(Compound_stmtContext): |
|
1052
|
|
|
|
|
1053
|
|
|
def __init__(self, parser, ctx:ParserRuleContext): # actually a PythonParser.Compound_stmtContext |
|
1054
|
|
|
super().__init__(parser) |
|
1055
|
|
|
self.cond = None # TestContext |
|
1056
|
|
|
self.copyFrom(ctx) |
|
1057
|
|
|
|
|
1058
|
|
|
def IF(self): |
|
1059
|
|
|
return self.getToken(PythonParser.IF, 0) |
|
1060
|
|
|
def COLON(self): |
|
1061
|
|
|
return self.getToken(PythonParser.COLON, 0) |
|
1062
|
|
|
def suite(self): |
|
1063
|
|
|
return self.getTypedRuleContext(PythonParser.SuiteContext,0) |
|
1064
|
|
|
|
|
1065
|
|
|
def test(self): |
|
1066
|
|
|
return self.getTypedRuleContext(PythonParser.TestContext,0) |
|
1067
|
|
|
|
|
1068
|
|
|
def elif_clause(self, i:int=None): |
|
1069
|
|
|
if i is None: |
|
1070
|
|
|
return self.getTypedRuleContexts(PythonParser.Elif_clauseContext) |
|
1071
|
|
|
else: |
|
1072
|
|
|
return self.getTypedRuleContext(PythonParser.Elif_clauseContext,i) |
|
1073
|
|
|
|
|
1074
|
|
|
def else_clause(self): |
|
1075
|
|
|
return self.getTypedRuleContext(PythonParser.Else_clauseContext,0) |
|
1076
|
|
|
|
|
1077
|
|
|
|
|
1078
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
1079
|
|
|
if hasattr( listener, "enterIf_stmt" ): |
|
1080
|
|
|
listener.enterIf_stmt(self) |
|
1081
|
|
|
|
|
1082
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
1083
|
|
|
if hasattr( listener, "exitIf_stmt" ): |
|
1084
|
|
|
listener.exitIf_stmt(self) |
|
1085
|
|
|
|
|
1086
|
|
|
|
|
1087
|
|
|
class With_stmtContext(Compound_stmtContext): |
|
1088
|
|
|
|
|
1089
|
|
|
def __init__(self, parser, ctx:ParserRuleContext): # actually a PythonParser.Compound_stmtContext |
|
1090
|
|
|
super().__init__(parser) |
|
1091
|
|
|
self.copyFrom(ctx) |
|
1092
|
|
|
|
|
1093
|
|
|
def WITH(self): |
|
1094
|
|
|
return self.getToken(PythonParser.WITH, 0) |
|
1095
|
|
|
def with_item(self, i:int=None): |
|
1096
|
|
|
if i is None: |
|
1097
|
|
|
return self.getTypedRuleContexts(PythonParser.With_itemContext) |
|
1098
|
|
|
else: |
|
1099
|
|
|
return self.getTypedRuleContext(PythonParser.With_itemContext,i) |
|
1100
|
|
|
|
|
1101
|
|
|
def COLON(self): |
|
1102
|
|
|
return self.getToken(PythonParser.COLON, 0) |
|
1103
|
|
|
def suite(self): |
|
1104
|
|
|
return self.getTypedRuleContext(PythonParser.SuiteContext,0) |
|
1105
|
|
|
|
|
1106
|
|
|
def ASYNC(self): |
|
1107
|
|
|
return self.getToken(PythonParser.ASYNC, 0) |
|
1108
|
|
|
def COMMA(self, i:int=None): |
|
1109
|
|
|
if i is None: |
|
1110
|
|
|
return self.getTokens(PythonParser.COMMA) |
|
1111
|
|
|
else: |
|
1112
|
|
|
return self.getToken(PythonParser.COMMA, i) |
|
1113
|
|
|
|
|
1114
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
1115
|
|
|
if hasattr( listener, "enterWith_stmt" ): |
|
1116
|
|
|
listener.enterWith_stmt(self) |
|
1117
|
|
|
|
|
1118
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
1119
|
|
|
if hasattr( listener, "exitWith_stmt" ): |
|
1120
|
|
|
listener.exitWith_stmt(self) |
|
1121
|
|
|
|
|
1122
|
|
|
|
|
1123
|
|
|
class Class_or_func_def_stmtContext(Compound_stmtContext): |
|
1124
|
|
|
|
|
1125
|
|
|
def __init__(self, parser, ctx:ParserRuleContext): # actually a PythonParser.Compound_stmtContext |
|
1126
|
|
|
super().__init__(parser) |
|
1127
|
|
|
self.copyFrom(ctx) |
|
1128
|
|
|
|
|
1129
|
|
|
def classdef(self): |
|
1130
|
|
|
return self.getTypedRuleContext(PythonParser.ClassdefContext,0) |
|
1131
|
|
|
|
|
1132
|
|
|
def funcdef(self): |
|
1133
|
|
|
return self.getTypedRuleContext(PythonParser.FuncdefContext,0) |
|
1134
|
|
|
|
|
1135
|
|
|
def decorator(self, i:int=None): |
|
1136
|
|
|
if i is None: |
|
1137
|
|
|
return self.getTypedRuleContexts(PythonParser.DecoratorContext) |
|
1138
|
|
|
else: |
|
1139
|
|
|
return self.getTypedRuleContext(PythonParser.DecoratorContext,i) |
|
1140
|
|
|
|
|
1141
|
|
|
|
|
1142
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
1143
|
|
|
if hasattr( listener, "enterClass_or_func_def_stmt" ): |
|
1144
|
|
|
listener.enterClass_or_func_def_stmt(self) |
|
1145
|
|
|
|
|
1146
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
1147
|
|
|
if hasattr( listener, "exitClass_or_func_def_stmt" ): |
|
1148
|
|
|
listener.exitClass_or_func_def_stmt(self) |
|
1149
|
|
|
|
|
1150
|
|
|
|
|
1151
|
|
|
class For_stmtContext(Compound_stmtContext): |
|
1152
|
|
|
|
|
1153
|
|
|
def __init__(self, parser, ctx:ParserRuleContext): # actually a PythonParser.Compound_stmtContext |
|
1154
|
|
|
super().__init__(parser) |
|
1155
|
|
|
self.copyFrom(ctx) |
|
1156
|
|
|
|
|
1157
|
|
|
def FOR(self): |
|
1158
|
|
|
return self.getToken(PythonParser.FOR, 0) |
|
1159
|
|
|
def exprlist(self): |
|
1160
|
|
|
return self.getTypedRuleContext(PythonParser.ExprlistContext,0) |
|
1161
|
|
|
|
|
1162
|
|
|
def IN(self): |
|
1163
|
|
|
return self.getToken(PythonParser.IN, 0) |
|
1164
|
|
|
def testlist(self): |
|
1165
|
|
|
return self.getTypedRuleContext(PythonParser.TestlistContext,0) |
|
1166
|
|
|
|
|
1167
|
|
|
def COLON(self): |
|
1168
|
|
|
return self.getToken(PythonParser.COLON, 0) |
|
1169
|
|
|
def suite(self): |
|
1170
|
|
|
return self.getTypedRuleContext(PythonParser.SuiteContext,0) |
|
1171
|
|
|
|
|
1172
|
|
|
def ASYNC(self): |
|
1173
|
|
|
return self.getToken(PythonParser.ASYNC, 0) |
|
1174
|
|
|
def else_clause(self): |
|
1175
|
|
|
return self.getTypedRuleContext(PythonParser.Else_clauseContext,0) |
|
1176
|
|
|
|
|
1177
|
|
|
|
|
1178
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
1179
|
|
|
if hasattr( listener, "enterFor_stmt" ): |
|
1180
|
|
|
listener.enterFor_stmt(self) |
|
1181
|
|
|
|
|
1182
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
1183
|
|
|
if hasattr( listener, "exitFor_stmt" ): |
|
1184
|
|
|
listener.exitFor_stmt(self) |
|
1185
|
|
|
|
|
1186
|
|
|
|
|
1187
|
|
|
|
|
1188
|
|
|
def compound_stmt(self): |
|
1189
|
|
|
|
|
1190
|
|
|
localctx = PythonParser.Compound_stmtContext(self, self._ctx, self.state) |
|
1191
|
|
|
self.enterRule(localctx, 10, self.RULE_compound_stmt) |
|
1192
|
|
|
self._la = 0 # Token type |
|
1193
|
|
|
try: |
|
1194
|
|
|
self.state = 223 |
|
1195
|
|
|
self._errHandler.sync(self) |
|
1196
|
|
|
la_ = self._interp.adaptivePredict(self._input,19,self._ctx) |
|
1197
|
|
|
if la_ == 1: |
|
1198
|
|
|
localctx = PythonParser.If_stmtContext(self, localctx) |
|
1199
|
|
|
self.enterOuterAlt(localctx, 1) |
|
1200
|
|
|
self.state = 149 |
|
1201
|
|
|
self.match(PythonParser.IF) |
|
1202
|
|
|
self.state = 150 |
|
1203
|
|
|
localctx.cond = self.test() |
|
1204
|
|
|
self.state = 151 |
|
1205
|
|
|
self.match(PythonParser.COLON) |
|
1206
|
|
|
self.state = 152 |
|
1207
|
|
|
self.suite() |
|
1208
|
|
|
self.state = 156 |
|
1209
|
|
|
self._errHandler.sync(self) |
|
1210
|
|
|
_alt = self._interp.adaptivePredict(self._input,6,self._ctx) |
|
1211
|
|
|
while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: |
|
1212
|
|
|
if _alt==1: |
|
1213
|
|
|
self.state = 153 |
|
1214
|
|
|
self.elif_clause() |
|
1215
|
|
|
self.state = 158 |
|
1216
|
|
|
self._errHandler.sync(self) |
|
1217
|
|
|
_alt = self._interp.adaptivePredict(self._input,6,self._ctx) |
|
1218
|
|
|
|
|
1219
|
|
|
self.state = 160 |
|
1220
|
|
|
self._errHandler.sync(self) |
|
1221
|
|
|
la_ = self._interp.adaptivePredict(self._input,7,self._ctx) |
|
1222
|
|
|
if la_ == 1: |
|
1223
|
|
|
self.state = 159 |
|
1224
|
|
|
self.else_clause() |
|
1225
|
|
|
|
|
1226
|
|
|
|
|
1227
|
|
|
pass |
|
1228
|
|
|
|
|
1229
|
|
|
elif la_ == 2: |
|
1230
|
|
|
localctx = PythonParser.While_stmtContext(self, localctx) |
|
1231
|
|
|
self.enterOuterAlt(localctx, 2) |
|
1232
|
|
|
self.state = 162 |
|
1233
|
|
|
self.match(PythonParser.WHILE) |
|
1234
|
|
|
self.state = 163 |
|
1235
|
|
|
self.test() |
|
1236
|
|
|
self.state = 164 |
|
1237
|
|
|
self.match(PythonParser.COLON) |
|
1238
|
|
|
self.state = 165 |
|
1239
|
|
|
self.suite() |
|
1240
|
|
|
self.state = 167 |
|
1241
|
|
|
self._errHandler.sync(self) |
|
1242
|
|
|
la_ = self._interp.adaptivePredict(self._input,8,self._ctx) |
|
1243
|
|
|
if la_ == 1: |
|
1244
|
|
|
self.state = 166 |
|
1245
|
|
|
self.else_clause() |
|
1246
|
|
|
|
|
1247
|
|
|
|
|
1248
|
|
|
pass |
|
1249
|
|
|
|
|
1250
|
|
|
elif la_ == 3: |
|
1251
|
|
|
localctx = PythonParser.For_stmtContext(self, localctx) |
|
1252
|
|
|
self.enterOuterAlt(localctx, 3) |
|
1253
|
|
|
self.state = 170 |
|
1254
|
|
|
self._errHandler.sync(self) |
|
1255
|
|
|
_la = self._input.LA(1) |
|
1256
|
|
|
if _la==35: |
|
1257
|
|
|
self.state = 169 |
|
1258
|
|
|
self.match(PythonParser.ASYNC) |
|
1259
|
|
|
|
|
1260
|
|
|
|
|
1261
|
|
|
self.state = 172 |
|
1262
|
|
|
self.match(PythonParser.FOR) |
|
1263
|
|
|
self.state = 173 |
|
1264
|
|
|
self.exprlist() |
|
1265
|
|
|
self.state = 174 |
|
1266
|
|
|
self.match(PythonParser.IN) |
|
1267
|
|
|
self.state = 175 |
|
1268
|
|
|
self.testlist() |
|
1269
|
|
|
self.state = 176 |
|
1270
|
|
|
self.match(PythonParser.COLON) |
|
1271
|
|
|
self.state = 177 |
|
1272
|
|
|
self.suite() |
|
1273
|
|
|
self.state = 179 |
|
1274
|
|
|
self._errHandler.sync(self) |
|
1275
|
|
|
la_ = self._interp.adaptivePredict(self._input,10,self._ctx) |
|
1276
|
|
|
if la_ == 1: |
|
1277
|
|
|
self.state = 178 |
|
1278
|
|
|
self.else_clause() |
|
1279
|
|
|
|
|
1280
|
|
|
|
|
1281
|
|
|
pass |
|
1282
|
|
|
|
|
1283
|
|
|
elif la_ == 4: |
|
1284
|
|
|
localctx = PythonParser.Try_stmtContext(self, localctx) |
|
1285
|
|
|
self.enterOuterAlt(localctx, 4) |
|
1286
|
|
|
self.state = 181 |
|
1287
|
|
|
self.match(PythonParser.TRY) |
|
1288
|
|
|
self.state = 182 |
|
1289
|
|
|
self.match(PythonParser.COLON) |
|
1290
|
|
|
self.state = 183 |
|
1291
|
|
|
self.suite() |
|
1292
|
|
|
self.state = 196 |
|
1293
|
|
|
self._errHandler.sync(self) |
|
1294
|
|
|
token = self._input.LA(1) |
|
1295
|
|
|
if token in [23]: |
|
1296
|
|
|
self.state = 185 |
|
1297
|
|
|
self._errHandler.sync(self) |
|
1298
|
|
|
_alt = 1 |
|
1299
|
|
|
while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: |
|
1300
|
|
|
if _alt == 1: |
|
1301
|
|
|
self.state = 184 |
|
1302
|
|
|
self.except_clause() |
|
1303
|
|
|
|
|
1304
|
|
|
else: |
|
1305
|
|
|
raise NoViableAltException(self) |
|
1306
|
|
|
self.state = 187 |
|
1307
|
|
|
self._errHandler.sync(self) |
|
1308
|
|
|
_alt = self._interp.adaptivePredict(self._input,11,self._ctx) |
|
1309
|
|
|
|
|
1310
|
|
|
self.state = 190 |
|
1311
|
|
|
self._errHandler.sync(self) |
|
1312
|
|
|
la_ = self._interp.adaptivePredict(self._input,12,self._ctx) |
|
1313
|
|
|
if la_ == 1: |
|
1314
|
|
|
self.state = 189 |
|
1315
|
|
|
self.else_clause() |
|
1316
|
|
|
|
|
1317
|
|
|
|
|
1318
|
|
|
self.state = 193 |
|
1319
|
|
|
self._errHandler.sync(self) |
|
1320
|
|
|
la_ = self._interp.adaptivePredict(self._input,13,self._ctx) |
|
1321
|
|
|
if la_ == 1: |
|
1322
|
|
|
self.state = 192 |
|
1323
|
|
|
self.finally_clause() |
|
1324
|
|
|
|
|
1325
|
|
|
|
|
1326
|
|
|
pass |
|
1327
|
|
|
elif token in [21]: |
|
1328
|
|
|
self.state = 195 |
|
1329
|
|
|
self.finally_clause() |
|
1330
|
|
|
pass |
|
1331
|
|
|
else: |
|
1332
|
|
|
raise NoViableAltException(self) |
|
1333
|
|
|
|
|
1334
|
|
|
pass |
|
1335
|
|
|
|
|
1336
|
|
|
elif la_ == 5: |
|
1337
|
|
|
localctx = PythonParser.With_stmtContext(self, localctx) |
|
1338
|
|
|
self.enterOuterAlt(localctx, 5) |
|
1339
|
|
|
self.state = 199 |
|
1340
|
|
|
self._errHandler.sync(self) |
|
1341
|
|
|
_la = self._input.LA(1) |
|
1342
|
|
|
if _la==35: |
|
1343
|
|
|
self.state = 198 |
|
1344
|
|
|
self.match(PythonParser.ASYNC) |
|
1345
|
|
|
|
|
1346
|
|
|
|
|
1347
|
|
|
self.state = 201 |
|
1348
|
|
|
self.match(PythonParser.WITH) |
|
1349
|
|
|
self.state = 202 |
|
1350
|
|
|
self.with_item() |
|
1351
|
|
|
self.state = 207 |
|
1352
|
|
|
self._errHandler.sync(self) |
|
1353
|
|
|
_la = self._input.LA(1) |
|
1354
|
|
|
while _la==45: |
|
1355
|
|
|
self.state = 203 |
|
1356
|
|
|
self.match(PythonParser.COMMA) |
|
1357
|
|
|
self.state = 204 |
|
1358
|
|
|
self.with_item() |
|
1359
|
|
|
self.state = 209 |
|
1360
|
|
|
self._errHandler.sync(self) |
|
1361
|
|
|
_la = self._input.LA(1) |
|
1362
|
|
|
|
|
1363
|
|
|
self.state = 210 |
|
1364
|
|
|
self.match(PythonParser.COLON) |
|
1365
|
|
|
self.state = 211 |
|
1366
|
|
|
self.suite() |
|
1367
|
|
|
pass |
|
1368
|
|
|
|
|
1369
|
|
|
elif la_ == 6: |
|
1370
|
|
|
localctx = PythonParser.Class_or_func_def_stmtContext(self, localctx) |
|
1371
|
|
|
self.enterOuterAlt(localctx, 6) |
|
1372
|
|
|
self.state = 216 |
|
1373
|
|
|
self._errHandler.sync(self) |
|
1374
|
|
|
_la = self._input.LA(1) |
|
1375
|
|
|
while _la==68: |
|
1376
|
|
|
self.state = 213 |
|
1377
|
|
|
self.decorator() |
|
1378
|
|
|
self.state = 218 |
|
1379
|
|
|
self._errHandler.sync(self) |
|
1380
|
|
|
_la = self._input.LA(1) |
|
1381
|
|
|
|
|
1382
|
|
|
self.state = 221 |
|
1383
|
|
|
self._errHandler.sync(self) |
|
1384
|
|
|
token = self._input.LA(1) |
|
1385
|
|
|
if token in [29]: |
|
1386
|
|
|
self.state = 219 |
|
1387
|
|
|
self.classdef() |
|
1388
|
|
|
pass |
|
1389
|
|
|
elif token in [4, 35]: |
|
1390
|
|
|
self.state = 220 |
|
1391
|
|
|
self.funcdef() |
|
1392
|
|
|
pass |
|
1393
|
|
|
else: |
|
1394
|
|
|
raise NoViableAltException(self) |
|
1395
|
|
|
|
|
1396
|
|
|
pass |
|
1397
|
|
|
|
|
1398
|
|
|
|
|
1399
|
|
|
except RecognitionException as re: |
|
1400
|
|
|
localctx.exception = re |
|
1401
|
|
|
self._errHandler.reportError(self, re) |
|
1402
|
|
|
self._errHandler.recover(self, re) |
|
1403
|
|
|
finally: |
|
1404
|
|
|
self.exitRule() |
|
1405
|
|
|
return localctx |
|
1406
|
|
|
|
|
1407
|
|
|
|
|
1408
|
|
|
class SuiteContext(ParserRuleContext): |
|
1409
|
|
|
__slots__ = 'parser' |
|
1410
|
|
|
|
|
1411
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
1412
|
|
|
super().__init__(parent, invokingState) |
|
1413
|
|
|
self.parser = parser |
|
1414
|
|
|
|
|
1415
|
|
|
def simple_stmt(self): |
|
1416
|
|
|
return self.getTypedRuleContext(PythonParser.Simple_stmtContext,0) |
|
1417
|
|
|
|
|
1418
|
|
|
|
|
1419
|
|
|
def LINE_BREAK(self): |
|
1420
|
|
|
return self.getToken(PythonParser.LINE_BREAK, 0) |
|
1421
|
|
|
|
|
1422
|
|
|
def INDENT(self): |
|
1423
|
|
|
return self.getToken(PythonParser.INDENT, 0) |
|
1424
|
|
|
|
|
1425
|
|
|
def DEDENT(self): |
|
1426
|
|
|
return self.getToken(PythonParser.DEDENT, 0) |
|
1427
|
|
|
|
|
1428
|
|
|
def stmt(self, i:int=None): |
|
1429
|
|
|
if i is None: |
|
1430
|
|
|
return self.getTypedRuleContexts(PythonParser.StmtContext) |
|
1431
|
|
|
else: |
|
1432
|
|
|
return self.getTypedRuleContext(PythonParser.StmtContext,i) |
|
1433
|
|
|
|
|
1434
|
|
|
|
|
1435
|
|
|
def getRuleIndex(self): |
|
1436
|
|
|
return PythonParser.RULE_suite |
|
1437
|
|
|
|
|
1438
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
1439
|
|
|
if hasattr( listener, "enterSuite" ): |
|
1440
|
|
|
listener.enterSuite(self) |
|
1441
|
|
|
|
|
1442
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
1443
|
|
|
if hasattr( listener, "exitSuite" ): |
|
1444
|
|
|
listener.exitSuite(self) |
|
1445
|
|
|
|
|
1446
|
|
|
|
|
1447
|
|
|
|
|
1448
|
|
|
|
|
1449
|
|
|
def suite(self): |
|
1450
|
|
|
|
|
1451
|
|
|
localctx = PythonParser.SuiteContext(self, self._ctx, self.state) |
|
1452
|
|
|
self.enterRule(localctx, 12, self.RULE_suite) |
|
1453
|
|
|
try: |
|
1454
|
|
|
self.state = 235 |
|
1455
|
|
|
self._errHandler.sync(self) |
|
1456
|
|
|
la_ = self._interp.adaptivePredict(self._input,21,self._ctx) |
|
1457
|
|
|
if la_ == 1: |
|
1458
|
|
|
self.enterOuterAlt(localctx, 1) |
|
1459
|
|
|
self.state = 225 |
|
1460
|
|
|
self.simple_stmt() |
|
1461
|
|
|
pass |
|
1462
|
|
|
|
|
1463
|
|
|
elif la_ == 2: |
|
1464
|
|
|
self.enterOuterAlt(localctx, 2) |
|
1465
|
|
|
self.state = 226 |
|
1466
|
|
|
self.match(PythonParser.LINE_BREAK) |
|
1467
|
|
|
self.state = 227 |
|
1468
|
|
|
self.match(PythonParser.INDENT) |
|
1469
|
|
|
self.state = 229 |
|
1470
|
|
|
self._errHandler.sync(self) |
|
1471
|
|
|
_alt = 1 |
|
1472
|
|
|
while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: |
|
1473
|
|
|
if _alt == 1: |
|
1474
|
|
|
self.state = 228 |
|
1475
|
|
|
self.stmt() |
|
1476
|
|
|
|
|
1477
|
|
|
else: |
|
1478
|
|
|
raise NoViableAltException(self) |
|
1479
|
|
|
self.state = 231 |
|
1480
|
|
|
self._errHandler.sync(self) |
|
1481
|
|
|
_alt = self._interp.adaptivePredict(self._input,20,self._ctx) |
|
1482
|
|
|
|
|
1483
|
|
|
self.state = 233 |
|
1484
|
|
|
self.match(PythonParser.DEDENT) |
|
1485
|
|
|
pass |
|
1486
|
|
|
|
|
1487
|
|
|
|
|
1488
|
|
|
except RecognitionException as re: |
|
1489
|
|
|
localctx.exception = re |
|
1490
|
|
|
self._errHandler.reportError(self, re) |
|
1491
|
|
|
self._errHandler.recover(self, re) |
|
1492
|
|
|
finally: |
|
1493
|
|
|
self.exitRule() |
|
1494
|
|
|
return localctx |
|
1495
|
|
|
|
|
1496
|
|
|
|
|
1497
|
|
|
class DecoratorContext(ParserRuleContext): |
|
1498
|
|
|
__slots__ = 'parser' |
|
1499
|
|
|
|
|
1500
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
1501
|
|
|
super().__init__(parent, invokingState) |
|
1502
|
|
|
self.parser = parser |
|
1503
|
|
|
|
|
1504
|
|
|
def AT(self): |
|
1505
|
|
|
return self.getToken(PythonParser.AT, 0) |
|
1506
|
|
|
|
|
1507
|
|
|
def dotted_name(self): |
|
1508
|
|
|
return self.getTypedRuleContext(PythonParser.Dotted_nameContext,0) |
|
1509
|
|
|
|
|
1510
|
|
|
|
|
1511
|
|
|
def LINE_BREAK(self): |
|
1512
|
|
|
return self.getToken(PythonParser.LINE_BREAK, 0) |
|
1513
|
|
|
|
|
1514
|
|
|
def OPEN_PAREN(self): |
|
1515
|
|
|
return self.getToken(PythonParser.OPEN_PAREN, 0) |
|
1516
|
|
|
|
|
1517
|
|
|
def CLOSE_PAREN(self): |
|
1518
|
|
|
return self.getToken(PythonParser.CLOSE_PAREN, 0) |
|
1519
|
|
|
|
|
1520
|
|
|
def arglist(self): |
|
1521
|
|
|
return self.getTypedRuleContext(PythonParser.ArglistContext,0) |
|
1522
|
|
|
|
|
1523
|
|
|
|
|
1524
|
|
|
def getRuleIndex(self): |
|
1525
|
|
|
return PythonParser.RULE_decorator |
|
1526
|
|
|
|
|
1527
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
1528
|
|
|
if hasattr( listener, "enterDecorator" ): |
|
1529
|
|
|
listener.enterDecorator(self) |
|
1530
|
|
|
|
|
1531
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
1532
|
|
|
if hasattr( listener, "exitDecorator" ): |
|
1533
|
|
|
listener.exitDecorator(self) |
|
1534
|
|
|
|
|
1535
|
|
|
|
|
1536
|
|
|
|
|
1537
|
|
|
|
|
1538
|
|
|
def decorator(self): |
|
1539
|
|
|
|
|
1540
|
|
|
localctx = PythonParser.DecoratorContext(self, self._ctx, self.state) |
|
1541
|
|
|
self.enterRule(localctx, 14, self.RULE_decorator) |
|
1542
|
|
|
self._la = 0 # Token type |
|
1543
|
|
|
try: |
|
1544
|
|
|
self.enterOuterAlt(localctx, 1) |
|
1545
|
|
|
self.state = 237 |
|
1546
|
|
|
self.match(PythonParser.AT) |
|
1547
|
|
|
self.state = 238 |
|
1548
|
|
|
self.dotted_name(0) |
|
1549
|
|
|
self.state = 244 |
|
1550
|
|
|
self._errHandler.sync(self) |
|
1551
|
|
|
_la = self._input.LA(1) |
|
1552
|
|
|
if _la==90: |
|
1553
|
|
|
self.state = 239 |
|
1554
|
|
|
self.match(PythonParser.OPEN_PAREN) |
|
1555
|
|
|
self.state = 241 |
|
1556
|
|
|
self._errHandler.sync(self) |
|
1557
|
|
|
_la = self._input.LA(1) |
|
1558
|
|
|
if (((_la) & ~0x3f) == 0 and ((1 << _la) & 1261322287421849600) != 0) or ((((_la - 83)) & ~0x3f) == 0 and ((1 << (_la - 83)) & 11007) != 0): |
|
1559
|
|
|
self.state = 240 |
|
1560
|
|
|
self.arglist() |
|
1561
|
|
|
|
|
1562
|
|
|
|
|
1563
|
|
|
self.state = 243 |
|
1564
|
|
|
self.match(PythonParser.CLOSE_PAREN) |
|
1565
|
|
|
|
|
1566
|
|
|
|
|
1567
|
|
|
self.state = 246 |
|
1568
|
|
|
self.match(PythonParser.LINE_BREAK) |
|
1569
|
|
|
except RecognitionException as re: |
|
1570
|
|
|
localctx.exception = re |
|
1571
|
|
|
self._errHandler.reportError(self, re) |
|
1572
|
|
|
self._errHandler.recover(self, re) |
|
1573
|
|
|
finally: |
|
1574
|
|
|
self.exitRule() |
|
1575
|
|
|
return localctx |
|
1576
|
|
|
|
|
1577
|
|
|
|
|
1578
|
|
|
class Elif_clauseContext(ParserRuleContext): |
|
1579
|
|
|
__slots__ = 'parser' |
|
1580
|
|
|
|
|
1581
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
1582
|
|
|
super().__init__(parent, invokingState) |
|
1583
|
|
|
self.parser = parser |
|
1584
|
|
|
|
|
1585
|
|
|
def ELIF(self): |
|
1586
|
|
|
return self.getToken(PythonParser.ELIF, 0) |
|
1587
|
|
|
|
|
1588
|
|
|
def test(self): |
|
1589
|
|
|
return self.getTypedRuleContext(PythonParser.TestContext,0) |
|
1590
|
|
|
|
|
1591
|
|
|
|
|
1592
|
|
|
def COLON(self): |
|
1593
|
|
|
return self.getToken(PythonParser.COLON, 0) |
|
1594
|
|
|
|
|
1595
|
|
|
def suite(self): |
|
1596
|
|
|
return self.getTypedRuleContext(PythonParser.SuiteContext,0) |
|
1597
|
|
|
|
|
1598
|
|
|
|
|
1599
|
|
|
def getRuleIndex(self): |
|
1600
|
|
|
return PythonParser.RULE_elif_clause |
|
1601
|
|
|
|
|
1602
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
1603
|
|
|
if hasattr( listener, "enterElif_clause" ): |
|
1604
|
|
|
listener.enterElif_clause(self) |
|
1605
|
|
|
|
|
1606
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
1607
|
|
|
if hasattr( listener, "exitElif_clause" ): |
|
1608
|
|
|
listener.exitElif_clause(self) |
|
1609
|
|
|
|
|
1610
|
|
|
|
|
1611
|
|
|
|
|
1612
|
|
|
|
|
1613
|
|
|
def elif_clause(self): |
|
1614
|
|
|
|
|
1615
|
|
|
localctx = PythonParser.Elif_clauseContext(self, self._ctx, self.state) |
|
1616
|
|
|
self.enterRule(localctx, 16, self.RULE_elif_clause) |
|
1617
|
|
|
try: |
|
1618
|
|
|
self.enterOuterAlt(localctx, 1) |
|
1619
|
|
|
self.state = 248 |
|
1620
|
|
|
self.match(PythonParser.ELIF) |
|
1621
|
|
|
self.state = 249 |
|
1622
|
|
|
self.test() |
|
1623
|
|
|
self.state = 250 |
|
1624
|
|
|
self.match(PythonParser.COLON) |
|
1625
|
|
|
self.state = 251 |
|
1626
|
|
|
self.suite() |
|
1627
|
|
|
except RecognitionException as re: |
|
1628
|
|
|
localctx.exception = re |
|
1629
|
|
|
self._errHandler.reportError(self, re) |
|
1630
|
|
|
self._errHandler.recover(self, re) |
|
1631
|
|
|
finally: |
|
1632
|
|
|
self.exitRule() |
|
1633
|
|
|
return localctx |
|
1634
|
|
|
|
|
1635
|
|
|
|
|
1636
|
|
|
class Else_clauseContext(ParserRuleContext): |
|
1637
|
|
|
__slots__ = 'parser' |
|
1638
|
|
|
|
|
1639
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
1640
|
|
|
super().__init__(parent, invokingState) |
|
1641
|
|
|
self.parser = parser |
|
1642
|
|
|
|
|
1643
|
|
|
def ELSE(self): |
|
1644
|
|
|
return self.getToken(PythonParser.ELSE, 0) |
|
1645
|
|
|
|
|
1646
|
|
|
def COLON(self): |
|
1647
|
|
|
return self.getToken(PythonParser.COLON, 0) |
|
1648
|
|
|
|
|
1649
|
|
|
def suite(self): |
|
1650
|
|
|
return self.getTypedRuleContext(PythonParser.SuiteContext,0) |
|
1651
|
|
|
|
|
1652
|
|
|
|
|
1653
|
|
|
def getRuleIndex(self): |
|
1654
|
|
|
return PythonParser.RULE_else_clause |
|
1655
|
|
|
|
|
1656
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
1657
|
|
|
if hasattr( listener, "enterElse_clause" ): |
|
1658
|
|
|
listener.enterElse_clause(self) |
|
1659
|
|
|
|
|
1660
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
1661
|
|
|
if hasattr( listener, "exitElse_clause" ): |
|
1662
|
|
|
listener.exitElse_clause(self) |
|
1663
|
|
|
|
|
1664
|
|
|
|
|
1665
|
|
|
|
|
1666
|
|
|
|
|
1667
|
|
|
def else_clause(self): |
|
1668
|
|
|
|
|
1669
|
|
|
localctx = PythonParser.Else_clauseContext(self, self._ctx, self.state) |
|
1670
|
|
|
self.enterRule(localctx, 18, self.RULE_else_clause) |
|
1671
|
|
|
try: |
|
1672
|
|
|
self.enterOuterAlt(localctx, 1) |
|
1673
|
|
|
self.state = 253 |
|
1674
|
|
|
self.match(PythonParser.ELSE) |
|
1675
|
|
|
self.state = 254 |
|
1676
|
|
|
self.match(PythonParser.COLON) |
|
1677
|
|
|
self.state = 255 |
|
1678
|
|
|
self.suite() |
|
1679
|
|
|
except RecognitionException as re: |
|
1680
|
|
|
localctx.exception = re |
|
1681
|
|
|
self._errHandler.reportError(self, re) |
|
1682
|
|
|
self._errHandler.recover(self, re) |
|
1683
|
|
|
finally: |
|
1684
|
|
|
self.exitRule() |
|
1685
|
|
|
return localctx |
|
1686
|
|
|
|
|
1687
|
|
|
|
|
1688
|
|
|
class Finally_clauseContext(ParserRuleContext): |
|
1689
|
|
|
__slots__ = 'parser' |
|
1690
|
|
|
|
|
1691
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
1692
|
|
|
super().__init__(parent, invokingState) |
|
1693
|
|
|
self.parser = parser |
|
1694
|
|
|
|
|
1695
|
|
|
def FINALLY(self): |
|
1696
|
|
|
return self.getToken(PythonParser.FINALLY, 0) |
|
1697
|
|
|
|
|
1698
|
|
|
def COLON(self): |
|
1699
|
|
|
return self.getToken(PythonParser.COLON, 0) |
|
1700
|
|
|
|
|
1701
|
|
|
def suite(self): |
|
1702
|
|
|
return self.getTypedRuleContext(PythonParser.SuiteContext,0) |
|
1703
|
|
|
|
|
1704
|
|
|
|
|
1705
|
|
|
def getRuleIndex(self): |
|
1706
|
|
|
return PythonParser.RULE_finally_clause |
|
1707
|
|
|
|
|
1708
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
1709
|
|
|
if hasattr( listener, "enterFinally_clause" ): |
|
1710
|
|
|
listener.enterFinally_clause(self) |
|
1711
|
|
|
|
|
1712
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
1713
|
|
|
if hasattr( listener, "exitFinally_clause" ): |
|
1714
|
|
|
listener.exitFinally_clause(self) |
|
1715
|
|
|
|
|
1716
|
|
|
|
|
1717
|
|
|
|
|
1718
|
|
|
|
|
1719
|
|
|
def finally_clause(self): |
|
1720
|
|
|
|
|
1721
|
|
|
localctx = PythonParser.Finally_clauseContext(self, self._ctx, self.state) |
|
1722
|
|
|
self.enterRule(localctx, 20, self.RULE_finally_clause) |
|
1723
|
|
|
try: |
|
1724
|
|
|
self.enterOuterAlt(localctx, 1) |
|
1725
|
|
|
self.state = 257 |
|
1726
|
|
|
self.match(PythonParser.FINALLY) |
|
1727
|
|
|
self.state = 258 |
|
1728
|
|
|
self.match(PythonParser.COLON) |
|
1729
|
|
|
self.state = 259 |
|
1730
|
|
|
self.suite() |
|
1731
|
|
|
except RecognitionException as re: |
|
1732
|
|
|
localctx.exception = re |
|
1733
|
|
|
self._errHandler.reportError(self, re) |
|
1734
|
|
|
self._errHandler.recover(self, re) |
|
1735
|
|
|
finally: |
|
1736
|
|
|
self.exitRule() |
|
1737
|
|
|
return localctx |
|
1738
|
|
|
|
|
1739
|
|
|
|
|
1740
|
|
|
class With_itemContext(ParserRuleContext): |
|
1741
|
|
|
__slots__ = 'parser' |
|
1742
|
|
|
|
|
1743
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
1744
|
|
|
super().__init__(parent, invokingState) |
|
1745
|
|
|
self.parser = parser |
|
1746
|
|
|
|
|
1747
|
|
|
def test(self): |
|
1748
|
|
|
return self.getTypedRuleContext(PythonParser.TestContext,0) |
|
1749
|
|
|
|
|
1750
|
|
|
|
|
1751
|
|
|
def AS(self): |
|
1752
|
|
|
return self.getToken(PythonParser.AS, 0) |
|
1753
|
|
|
|
|
1754
|
|
|
def expr(self): |
|
1755
|
|
|
return self.getTypedRuleContext(PythonParser.ExprContext,0) |
|
1756
|
|
|
|
|
1757
|
|
|
|
|
1758
|
|
|
def getRuleIndex(self): |
|
1759
|
|
|
return PythonParser.RULE_with_item |
|
1760
|
|
|
|
|
1761
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
1762
|
|
|
if hasattr( listener, "enterWith_item" ): |
|
1763
|
|
|
listener.enterWith_item(self) |
|
1764
|
|
|
|
|
1765
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
1766
|
|
|
if hasattr( listener, "exitWith_item" ): |
|
1767
|
|
|
listener.exitWith_item(self) |
|
1768
|
|
|
|
|
1769
|
|
|
|
|
1770
|
|
|
|
|
1771
|
|
|
|
|
1772
|
|
|
def with_item(self): |
|
1773
|
|
|
|
|
1774
|
|
|
localctx = PythonParser.With_itemContext(self, self._ctx, self.state) |
|
1775
|
|
|
self.enterRule(localctx, 22, self.RULE_with_item) |
|
1776
|
|
|
self._la = 0 # Token type |
|
1777
|
|
|
try: |
|
1778
|
|
|
self.enterOuterAlt(localctx, 1) |
|
1779
|
|
|
self.state = 261 |
|
1780
|
|
|
self.test() |
|
1781
|
|
|
self.state = 264 |
|
1782
|
|
|
self._errHandler.sync(self) |
|
1783
|
|
|
_la = self._input.LA(1) |
|
1784
|
|
|
if _la==10: |
|
1785
|
|
|
self.state = 262 |
|
1786
|
|
|
self.match(PythonParser.AS) |
|
1787
|
|
|
self.state = 263 |
|
1788
|
|
|
self.expr(0) |
|
1789
|
|
|
|
|
1790
|
|
|
|
|
1791
|
|
|
except RecognitionException as re: |
|
1792
|
|
|
localctx.exception = re |
|
1793
|
|
|
self._errHandler.reportError(self, re) |
|
1794
|
|
|
self._errHandler.recover(self, re) |
|
1795
|
|
|
finally: |
|
1796
|
|
|
self.exitRule() |
|
1797
|
|
|
return localctx |
|
1798
|
|
|
|
|
1799
|
|
|
|
|
1800
|
|
|
class Except_clauseContext(ParserRuleContext): |
|
1801
|
|
|
__slots__ = 'parser' |
|
1802
|
|
|
|
|
1803
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
1804
|
|
|
super().__init__(parent, invokingState) |
|
1805
|
|
|
self.parser = parser |
|
1806
|
|
|
|
|
1807
|
|
|
def EXCEPT(self): |
|
1808
|
|
|
return self.getToken(PythonParser.EXCEPT, 0) |
|
1809
|
|
|
|
|
1810
|
|
|
def COLON(self): |
|
1811
|
|
|
return self.getToken(PythonParser.COLON, 0) |
|
1812
|
|
|
|
|
1813
|
|
|
def suite(self): |
|
1814
|
|
|
return self.getTypedRuleContext(PythonParser.SuiteContext,0) |
|
1815
|
|
|
|
|
1816
|
|
|
|
|
1817
|
|
|
def test(self): |
|
1818
|
|
|
return self.getTypedRuleContext(PythonParser.TestContext,0) |
|
1819
|
|
|
|
|
1820
|
|
|
|
|
1821
|
|
|
def COMMA(self): |
|
1822
|
|
|
return self.getToken(PythonParser.COMMA, 0) |
|
1823
|
|
|
|
|
1824
|
|
|
def name(self): |
|
1825
|
|
|
return self.getTypedRuleContext(PythonParser.NameContext,0) |
|
1826
|
|
|
|
|
1827
|
|
|
|
|
1828
|
|
|
def AS(self): |
|
1829
|
|
|
return self.getToken(PythonParser.AS, 0) |
|
1830
|
|
|
|
|
1831
|
|
|
def getRuleIndex(self): |
|
1832
|
|
|
return PythonParser.RULE_except_clause |
|
1833
|
|
|
|
|
1834
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
1835
|
|
|
if hasattr( listener, "enterExcept_clause" ): |
|
1836
|
|
|
listener.enterExcept_clause(self) |
|
1837
|
|
|
|
|
1838
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
1839
|
|
|
if hasattr( listener, "exitExcept_clause" ): |
|
1840
|
|
|
listener.exitExcept_clause(self) |
|
1841
|
|
|
|
|
1842
|
|
|
|
|
1843
|
|
|
|
|
1844
|
|
|
|
|
1845
|
|
|
def except_clause(self): |
|
1846
|
|
|
|
|
1847
|
|
|
localctx = PythonParser.Except_clauseContext(self, self._ctx, self.state) |
|
1848
|
|
|
self.enterRule(localctx, 24, self.RULE_except_clause) |
|
1849
|
|
|
self._la = 0 # Token type |
|
1850
|
|
|
try: |
|
1851
|
|
|
self.enterOuterAlt(localctx, 1) |
|
1852
|
|
|
self.state = 266 |
|
1853
|
|
|
self.match(PythonParser.EXCEPT) |
|
1854
|
|
|
self.state = 280 |
|
1855
|
|
|
self._errHandler.sync(self) |
|
1856
|
|
|
_la = self._input.LA(1) |
|
1857
|
|
|
if (((_la) & ~0x3f) == 0 and ((1 << _la) & 1261023220259094528) != 0) or ((((_la - 83)) & ~0x3f) == 0 and ((1 << (_la - 83)) & 11007) != 0): |
|
1858
|
|
|
self.state = 267 |
|
1859
|
|
|
self.test() |
|
1860
|
|
|
self.state = 278 |
|
1861
|
|
|
self._errHandler.sync(self) |
|
1862
|
|
|
la_ = self._interp.adaptivePredict(self._input,25,self._ctx) |
|
1863
|
|
|
if la_ == 1: |
|
1864
|
|
|
self.state = 268 |
|
1865
|
|
|
if not self.CheckVersion(2): |
|
1866
|
|
|
from antlr4.error.Errors import FailedPredicateException |
|
1867
|
|
|
raise FailedPredicateException(self, "self.CheckVersion(2)") |
|
1868
|
|
|
self.state = 269 |
|
1869
|
|
|
self.match(PythonParser.COMMA) |
|
1870
|
|
|
self.state = 270 |
|
1871
|
|
|
self.name() |
|
1872
|
|
|
self.SetVersion(2); |
|
1873
|
|
|
|
|
1874
|
|
|
elif la_ == 2: |
|
1875
|
|
|
self.state = 273 |
|
1876
|
|
|
if not self.CheckVersion(3): |
|
1877
|
|
|
from antlr4.error.Errors import FailedPredicateException |
|
1878
|
|
|
raise FailedPredicateException(self, "self.CheckVersion(3)") |
|
1879
|
|
|
self.state = 274 |
|
1880
|
|
|
self.match(PythonParser.AS) |
|
1881
|
|
|
self.state = 275 |
|
1882
|
|
|
self.name() |
|
1883
|
|
|
self.SetVersion(3); |
|
1884
|
|
|
|
|
1885
|
|
|
|
|
1886
|
|
|
|
|
1887
|
|
|
|
|
1888
|
|
|
self.state = 282 |
|
1889
|
|
|
self.match(PythonParser.COLON) |
|
1890
|
|
|
self.state = 283 |
|
1891
|
|
|
self.suite() |
|
1892
|
|
|
except RecognitionException as re: |
|
1893
|
|
|
localctx.exception = re |
|
1894
|
|
|
self._errHandler.reportError(self, re) |
|
1895
|
|
|
self._errHandler.recover(self, re) |
|
1896
|
|
|
finally: |
|
1897
|
|
|
self.exitRule() |
|
1898
|
|
|
return localctx |
|
1899
|
|
|
|
|
1900
|
|
|
|
|
1901
|
|
|
class ClassdefContext(ParserRuleContext): |
|
1902
|
|
|
__slots__ = 'parser' |
|
1903
|
|
|
|
|
1904
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
1905
|
|
|
super().__init__(parent, invokingState) |
|
1906
|
|
|
self.parser = parser |
|
1907
|
|
|
|
|
1908
|
|
|
def CLASS(self): |
|
1909
|
|
|
return self.getToken(PythonParser.CLASS, 0) |
|
1910
|
|
|
|
|
1911
|
|
|
def name(self): |
|
1912
|
|
|
return self.getTypedRuleContext(PythonParser.NameContext,0) |
|
1913
|
|
|
|
|
1914
|
|
|
|
|
1915
|
|
|
def COLON(self): |
|
1916
|
|
|
return self.getToken(PythonParser.COLON, 0) |
|
1917
|
|
|
|
|
1918
|
|
|
def suite(self): |
|
1919
|
|
|
return self.getTypedRuleContext(PythonParser.SuiteContext,0) |
|
1920
|
|
|
|
|
1921
|
|
|
|
|
1922
|
|
|
def OPEN_PAREN(self): |
|
1923
|
|
|
return self.getToken(PythonParser.OPEN_PAREN, 0) |
|
1924
|
|
|
|
|
1925
|
|
|
def CLOSE_PAREN(self): |
|
1926
|
|
|
return self.getToken(PythonParser.CLOSE_PAREN, 0) |
|
1927
|
|
|
|
|
1928
|
|
|
def arglist(self): |
|
1929
|
|
|
return self.getTypedRuleContext(PythonParser.ArglistContext,0) |
|
1930
|
|
|
|
|
1931
|
|
|
|
|
1932
|
|
|
def getRuleIndex(self): |
|
1933
|
|
|
return PythonParser.RULE_classdef |
|
1934
|
|
|
|
|
1935
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
1936
|
|
|
if hasattr( listener, "enterClassdef" ): |
|
1937
|
|
|
listener.enterClassdef(self) |
|
1938
|
|
|
|
|
1939
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
1940
|
|
|
if hasattr( listener, "exitClassdef" ): |
|
1941
|
|
|
listener.exitClassdef(self) |
|
1942
|
|
|
|
|
1943
|
|
|
|
|
1944
|
|
|
|
|
1945
|
|
|
|
|
1946
|
|
|
def classdef(self): |
|
1947
|
|
|
|
|
1948
|
|
|
localctx = PythonParser.ClassdefContext(self, self._ctx, self.state) |
|
1949
|
|
|
self.enterRule(localctx, 26, self.RULE_classdef) |
|
1950
|
|
|
self._la = 0 # Token type |
|
1951
|
|
|
try: |
|
1952
|
|
|
self.enterOuterAlt(localctx, 1) |
|
1953
|
|
|
self.state = 285 |
|
1954
|
|
|
self.match(PythonParser.CLASS) |
|
1955
|
|
|
self.state = 286 |
|
1956
|
|
|
self.name() |
|
1957
|
|
|
self.state = 292 |
|
1958
|
|
|
self._errHandler.sync(self) |
|
1959
|
|
|
_la = self._input.LA(1) |
|
1960
|
|
|
if _la==90: |
|
1961
|
|
|
self.state = 287 |
|
1962
|
|
|
self.match(PythonParser.OPEN_PAREN) |
|
1963
|
|
|
self.state = 289 |
|
1964
|
|
|
self._errHandler.sync(self) |
|
1965
|
|
|
_la = self._input.LA(1) |
|
1966
|
|
|
if (((_la) & ~0x3f) == 0 and ((1 << _la) & 1261322287421849600) != 0) or ((((_la - 83)) & ~0x3f) == 0 and ((1 << (_la - 83)) & 11007) != 0): |
|
1967
|
|
|
self.state = 288 |
|
1968
|
|
|
self.arglist() |
|
1969
|
|
|
|
|
1970
|
|
|
|
|
1971
|
|
|
self.state = 291 |
|
1972
|
|
|
self.match(PythonParser.CLOSE_PAREN) |
|
1973
|
|
|
|
|
1974
|
|
|
|
|
1975
|
|
|
self.state = 294 |
|
1976
|
|
|
self.match(PythonParser.COLON) |
|
1977
|
|
|
self.state = 295 |
|
1978
|
|
|
self.suite() |
|
1979
|
|
|
except RecognitionException as re: |
|
1980
|
|
|
localctx.exception = re |
|
1981
|
|
|
self._errHandler.reportError(self, re) |
|
1982
|
|
|
self._errHandler.recover(self, re) |
|
1983
|
|
|
finally: |
|
1984
|
|
|
self.exitRule() |
|
1985
|
|
|
return localctx |
|
1986
|
|
|
|
|
1987
|
|
|
|
|
1988
|
|
|
class FuncdefContext(ParserRuleContext): |
|
1989
|
|
|
__slots__ = 'parser' |
|
1990
|
|
|
|
|
1991
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
1992
|
|
|
super().__init__(parent, invokingState) |
|
1993
|
|
|
self.parser = parser |
|
1994
|
|
|
|
|
1995
|
|
|
def DEF(self): |
|
1996
|
|
|
return self.getToken(PythonParser.DEF, 0) |
|
1997
|
|
|
|
|
1998
|
|
|
def name(self): |
|
1999
|
|
|
return self.getTypedRuleContext(PythonParser.NameContext,0) |
|
2000
|
|
|
|
|
2001
|
|
|
|
|
2002
|
|
|
def OPEN_PAREN(self): |
|
2003
|
|
|
return self.getToken(PythonParser.OPEN_PAREN, 0) |
|
2004
|
|
|
|
|
2005
|
|
|
def CLOSE_PAREN(self): |
|
2006
|
|
|
return self.getToken(PythonParser.CLOSE_PAREN, 0) |
|
2007
|
|
|
|
|
2008
|
|
|
def COLON(self): |
|
2009
|
|
|
return self.getToken(PythonParser.COLON, 0) |
|
2010
|
|
|
|
|
2011
|
|
|
def suite(self): |
|
2012
|
|
|
return self.getTypedRuleContext(PythonParser.SuiteContext,0) |
|
2013
|
|
|
|
|
2014
|
|
|
|
|
2015
|
|
|
def ASYNC(self): |
|
2016
|
|
|
return self.getToken(PythonParser.ASYNC, 0) |
|
2017
|
|
|
|
|
2018
|
|
|
def typedargslist(self): |
|
2019
|
|
|
return self.getTypedRuleContext(PythonParser.TypedargslistContext,0) |
|
2020
|
|
|
|
|
2021
|
|
|
|
|
2022
|
|
|
def ARROW(self): |
|
2023
|
|
|
return self.getToken(PythonParser.ARROW, 0) |
|
2024
|
|
|
|
|
2025
|
|
|
def test(self): |
|
2026
|
|
|
return self.getTypedRuleContext(PythonParser.TestContext,0) |
|
2027
|
|
|
|
|
2028
|
|
|
|
|
2029
|
|
|
def getRuleIndex(self): |
|
2030
|
|
|
return PythonParser.RULE_funcdef |
|
2031
|
|
|
|
|
2032
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
2033
|
|
|
if hasattr( listener, "enterFuncdef" ): |
|
2034
|
|
|
listener.enterFuncdef(self) |
|
2035
|
|
|
|
|
2036
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
2037
|
|
|
if hasattr( listener, "exitFuncdef" ): |
|
2038
|
|
|
listener.exitFuncdef(self) |
|
2039
|
|
|
|
|
2040
|
|
|
|
|
2041
|
|
|
|
|
2042
|
|
|
|
|
2043
|
|
|
def funcdef(self): |
|
2044
|
|
|
|
|
2045
|
|
|
localctx = PythonParser.FuncdefContext(self, self._ctx, self.state) |
|
2046
|
|
|
self.enterRule(localctx, 28, self.RULE_funcdef) |
|
2047
|
|
|
self._la = 0 # Token type |
|
2048
|
|
|
try: |
|
2049
|
|
|
self.enterOuterAlt(localctx, 1) |
|
2050
|
|
|
self.state = 298 |
|
2051
|
|
|
self._errHandler.sync(self) |
|
2052
|
|
|
_la = self._input.LA(1) |
|
2053
|
|
|
if _la==35: |
|
2054
|
|
|
self.state = 297 |
|
2055
|
|
|
self.match(PythonParser.ASYNC) |
|
2056
|
|
|
|
|
2057
|
|
|
|
|
2058
|
|
|
self.state = 300 |
|
2059
|
|
|
self.match(PythonParser.DEF) |
|
2060
|
|
|
self.state = 301 |
|
2061
|
|
|
self.name() |
|
2062
|
|
|
self.state = 302 |
|
2063
|
|
|
self.match(PythonParser.OPEN_PAREN) |
|
2064
|
|
|
self.state = 304 |
|
2065
|
|
|
self._errHandler.sync(self) |
|
2066
|
|
|
_la = self._input.LA(1) |
|
2067
|
|
|
if ((((_la - 39)) & ~0x3f) == 0 and ((1 << (_la - 39)) & 144115188075856419) != 0): |
|
2068
|
|
|
self.state = 303 |
|
2069
|
|
|
self.typedargslist() |
|
2070
|
|
|
|
|
2071
|
|
|
|
|
2072
|
|
|
self.state = 306 |
|
2073
|
|
|
self.match(PythonParser.CLOSE_PAREN) |
|
2074
|
|
|
self.state = 309 |
|
2075
|
|
|
self._errHandler.sync(self) |
|
2076
|
|
|
_la = self._input.LA(1) |
|
2077
|
|
|
if _la==69: |
|
2078
|
|
|
self.state = 307 |
|
2079
|
|
|
self.match(PythonParser.ARROW) |
|
2080
|
|
|
self.state = 308 |
|
2081
|
|
|
self.test() |
|
2082
|
|
|
|
|
2083
|
|
|
|
|
2084
|
|
|
self.state = 311 |
|
2085
|
|
|
self.match(PythonParser.COLON) |
|
2086
|
|
|
self.state = 312 |
|
2087
|
|
|
self.suite() |
|
2088
|
|
|
except RecognitionException as re: |
|
2089
|
|
|
localctx.exception = re |
|
2090
|
|
|
self._errHandler.reportError(self, re) |
|
2091
|
|
|
self._errHandler.recover(self, re) |
|
2092
|
|
|
finally: |
|
2093
|
|
|
self.exitRule() |
|
2094
|
|
|
return localctx |
|
2095
|
|
|
|
|
2096
|
|
|
|
|
2097
|
|
|
class TypedargslistContext(ParserRuleContext): |
|
2098
|
|
|
__slots__ = 'parser' |
|
2099
|
|
|
|
|
2100
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
2101
|
|
|
super().__init__(parent, invokingState) |
|
2102
|
|
|
self.parser = parser |
|
2103
|
|
|
|
|
2104
|
|
|
def args(self): |
|
2105
|
|
|
return self.getTypedRuleContext(PythonParser.ArgsContext,0) |
|
2106
|
|
|
|
|
2107
|
|
|
|
|
2108
|
|
|
def kwargs(self): |
|
2109
|
|
|
return self.getTypedRuleContext(PythonParser.KwargsContext,0) |
|
2110
|
|
|
|
|
2111
|
|
|
|
|
2112
|
|
|
def def_parameters(self, i:int=None): |
|
2113
|
|
|
if i is None: |
|
2114
|
|
|
return self.getTypedRuleContexts(PythonParser.Def_parametersContext) |
|
2115
|
|
|
else: |
|
2116
|
|
|
return self.getTypedRuleContext(PythonParser.Def_parametersContext,i) |
|
2117
|
|
|
|
|
2118
|
|
|
|
|
2119
|
|
|
def COMMA(self, i:int=None): |
|
2120
|
|
|
if i is None: |
|
2121
|
|
|
return self.getTokens(PythonParser.COMMA) |
|
2122
|
|
|
else: |
|
2123
|
|
|
return self.getToken(PythonParser.COMMA, i) |
|
2124
|
|
|
|
|
2125
|
|
|
def getRuleIndex(self): |
|
2126
|
|
|
return PythonParser.RULE_typedargslist |
|
2127
|
|
|
|
|
2128
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
2129
|
|
|
if hasattr( listener, "enterTypedargslist" ): |
|
2130
|
|
|
listener.enterTypedargslist(self) |
|
2131
|
|
|
|
|
2132
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
2133
|
|
|
if hasattr( listener, "exitTypedargslist" ): |
|
2134
|
|
|
listener.exitTypedargslist(self) |
|
2135
|
|
|
|
|
2136
|
|
|
|
|
2137
|
|
|
|
|
2138
|
|
|
|
|
2139
|
|
|
def typedargslist(self): |
|
2140
|
|
|
|
|
2141
|
|
|
localctx = PythonParser.TypedargslistContext(self, self._ctx, self.state) |
|
2142
|
|
|
self.enterRule(localctx, 30, self.RULE_typedargslist) |
|
2143
|
|
|
self._la = 0 # Token type |
|
2144
|
|
|
try: |
|
2145
|
|
|
self.state = 338 |
|
2146
|
|
|
self._errHandler.sync(self) |
|
2147
|
|
|
la_ = self._interp.adaptivePredict(self._input,38,self._ctx) |
|
2148
|
|
|
if la_ == 1: |
|
2149
|
|
|
self.enterOuterAlt(localctx, 1) |
|
2150
|
|
|
self.state = 317 |
|
2151
|
|
|
self._errHandler.sync(self) |
|
2152
|
|
|
la_ = self._interp.adaptivePredict(self._input,32,self._ctx) |
|
2153
|
|
|
if la_ == 1: |
|
2154
|
|
|
self.state = 314 |
|
2155
|
|
|
self.def_parameters() |
|
2156
|
|
|
self.state = 315 |
|
2157
|
|
|
self.match(PythonParser.COMMA) |
|
2158
|
|
|
|
|
2159
|
|
|
|
|
2160
|
|
|
self.state = 329 |
|
2161
|
|
|
self._errHandler.sync(self) |
|
2162
|
|
|
token = self._input.LA(1) |
|
2163
|
|
|
if token in [44]: |
|
2164
|
|
|
self.state = 319 |
|
2165
|
|
|
self.args() |
|
2166
|
|
|
self.state = 322 |
|
2167
|
|
|
self._errHandler.sync(self) |
|
2168
|
|
|
la_ = self._interp.adaptivePredict(self._input,33,self._ctx) |
|
2169
|
|
|
if la_ == 1: |
|
2170
|
|
|
self.state = 320 |
|
2171
|
|
|
self.match(PythonParser.COMMA) |
|
2172
|
|
|
self.state = 321 |
|
2173
|
|
|
self.def_parameters() |
|
2174
|
|
|
|
|
2175
|
|
|
|
|
2176
|
|
|
self.state = 326 |
|
2177
|
|
|
self._errHandler.sync(self) |
|
2178
|
|
|
la_ = self._interp.adaptivePredict(self._input,34,self._ctx) |
|
2179
|
|
|
if la_ == 1: |
|
2180
|
|
|
self.state = 324 |
|
2181
|
|
|
self.match(PythonParser.COMMA) |
|
2182
|
|
|
self.state = 325 |
|
2183
|
|
|
self.kwargs() |
|
2184
|
|
|
|
|
2185
|
|
|
|
|
2186
|
|
|
pass |
|
2187
|
|
|
elif token in [48]: |
|
2188
|
|
|
self.state = 328 |
|
2189
|
|
|
self.kwargs() |
|
2190
|
|
|
pass |
|
2191
|
|
|
else: |
|
2192
|
|
|
raise NoViableAltException(self) |
|
2193
|
|
|
|
|
2194
|
|
|
self.state = 332 |
|
2195
|
|
|
self._errHandler.sync(self) |
|
2196
|
|
|
_la = self._input.LA(1) |
|
2197
|
|
|
if _la==45: |
|
2198
|
|
|
self.state = 331 |
|
2199
|
|
|
self.match(PythonParser.COMMA) |
|
2200
|
|
|
|
|
2201
|
|
|
|
|
2202
|
|
|
pass |
|
2203
|
|
|
|
|
2204
|
|
|
elif la_ == 2: |
|
2205
|
|
|
self.enterOuterAlt(localctx, 2) |
|
2206
|
|
|
self.state = 334 |
|
2207
|
|
|
self.def_parameters() |
|
2208
|
|
|
self.state = 336 |
|
2209
|
|
|
self._errHandler.sync(self) |
|
2210
|
|
|
_la = self._input.LA(1) |
|
2211
|
|
|
if _la==45: |
|
2212
|
|
|
self.state = 335 |
|
2213
|
|
|
self.match(PythonParser.COMMA) |
|
2214
|
|
|
|
|
2215
|
|
|
|
|
2216
|
|
|
pass |
|
2217
|
|
|
|
|
2218
|
|
|
|
|
2219
|
|
|
except RecognitionException as re: |
|
2220
|
|
|
localctx.exception = re |
|
2221
|
|
|
self._errHandler.reportError(self, re) |
|
2222
|
|
|
self._errHandler.recover(self, re) |
|
2223
|
|
|
finally: |
|
2224
|
|
|
self.exitRule() |
|
2225
|
|
|
return localctx |
|
2226
|
|
|
|
|
2227
|
|
|
|
|
2228
|
|
|
class ArgsContext(ParserRuleContext): |
|
2229
|
|
|
__slots__ = 'parser' |
|
2230
|
|
|
|
|
2231
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
2232
|
|
|
super().__init__(parent, invokingState) |
|
2233
|
|
|
self.parser = parser |
|
2234
|
|
|
|
|
2235
|
|
|
def STAR(self): |
|
2236
|
|
|
return self.getToken(PythonParser.STAR, 0) |
|
2237
|
|
|
|
|
2238
|
|
|
def named_parameter(self): |
|
2239
|
|
|
return self.getTypedRuleContext(PythonParser.Named_parameterContext,0) |
|
2240
|
|
|
|
|
2241
|
|
|
|
|
2242
|
|
|
def getRuleIndex(self): |
|
2243
|
|
|
return PythonParser.RULE_args |
|
2244
|
|
|
|
|
2245
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
2246
|
|
|
if hasattr( listener, "enterArgs" ): |
|
2247
|
|
|
listener.enterArgs(self) |
|
2248
|
|
|
|
|
2249
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
2250
|
|
|
if hasattr( listener, "exitArgs" ): |
|
2251
|
|
|
listener.exitArgs(self) |
|
2252
|
|
|
|
|
2253
|
|
|
|
|
2254
|
|
|
|
|
2255
|
|
|
|
|
2256
|
|
|
def args(self): |
|
2257
|
|
|
|
|
2258
|
|
|
localctx = PythonParser.ArgsContext(self, self._ctx, self.state) |
|
2259
|
|
|
self.enterRule(localctx, 32, self.RULE_args) |
|
2260
|
|
|
try: |
|
2261
|
|
|
self.enterOuterAlt(localctx, 1) |
|
2262
|
|
|
self.state = 340 |
|
2263
|
|
|
self.match(PythonParser.STAR) |
|
2264
|
|
|
self.state = 341 |
|
2265
|
|
|
self.named_parameter() |
|
2266
|
|
|
except RecognitionException as re: |
|
2267
|
|
|
localctx.exception = re |
|
2268
|
|
|
self._errHandler.reportError(self, re) |
|
2269
|
|
|
self._errHandler.recover(self, re) |
|
2270
|
|
|
finally: |
|
2271
|
|
|
self.exitRule() |
|
2272
|
|
|
return localctx |
|
2273
|
|
|
|
|
2274
|
|
|
|
|
2275
|
|
|
class KwargsContext(ParserRuleContext): |
|
2276
|
|
|
__slots__ = 'parser' |
|
2277
|
|
|
|
|
2278
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
2279
|
|
|
super().__init__(parent, invokingState) |
|
2280
|
|
|
self.parser = parser |
|
2281
|
|
|
|
|
2282
|
|
|
def POWER(self): |
|
2283
|
|
|
return self.getToken(PythonParser.POWER, 0) |
|
2284
|
|
|
|
|
2285
|
|
|
def named_parameter(self): |
|
2286
|
|
|
return self.getTypedRuleContext(PythonParser.Named_parameterContext,0) |
|
2287
|
|
|
|
|
2288
|
|
|
|
|
2289
|
|
|
def getRuleIndex(self): |
|
2290
|
|
|
return PythonParser.RULE_kwargs |
|
2291
|
|
|
|
|
2292
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
2293
|
|
|
if hasattr( listener, "enterKwargs" ): |
|
2294
|
|
|
listener.enterKwargs(self) |
|
2295
|
|
|
|
|
2296
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
2297
|
|
|
if hasattr( listener, "exitKwargs" ): |
|
2298
|
|
|
listener.exitKwargs(self) |
|
2299
|
|
|
|
|
2300
|
|
|
|
|
2301
|
|
|
|
|
2302
|
|
|
|
|
2303
|
|
|
def kwargs(self): |
|
2304
|
|
|
|
|
2305
|
|
|
localctx = PythonParser.KwargsContext(self, self._ctx, self.state) |
|
2306
|
|
|
self.enterRule(localctx, 34, self.RULE_kwargs) |
|
2307
|
|
|
try: |
|
2308
|
|
|
self.enterOuterAlt(localctx, 1) |
|
2309
|
|
|
self.state = 343 |
|
2310
|
|
|
self.match(PythonParser.POWER) |
|
2311
|
|
|
self.state = 344 |
|
2312
|
|
|
self.named_parameter() |
|
2313
|
|
|
except RecognitionException as re: |
|
2314
|
|
|
localctx.exception = re |
|
2315
|
|
|
self._errHandler.reportError(self, re) |
|
2316
|
|
|
self._errHandler.recover(self, re) |
|
2317
|
|
|
finally: |
|
2318
|
|
|
self.exitRule() |
|
2319
|
|
|
return localctx |
|
2320
|
|
|
|
|
2321
|
|
|
|
|
2322
|
|
|
class Def_parametersContext(ParserRuleContext): |
|
2323
|
|
|
__slots__ = 'parser' |
|
2324
|
|
|
|
|
2325
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
2326
|
|
|
super().__init__(parent, invokingState) |
|
2327
|
|
|
self.parser = parser |
|
2328
|
|
|
|
|
2329
|
|
|
def def_parameter(self, i:int=None): |
|
2330
|
|
|
if i is None: |
|
2331
|
|
|
return self.getTypedRuleContexts(PythonParser.Def_parameterContext) |
|
2332
|
|
|
else: |
|
2333
|
|
|
return self.getTypedRuleContext(PythonParser.Def_parameterContext,i) |
|
2334
|
|
|
|
|
2335
|
|
|
|
|
2336
|
|
|
def COMMA(self, i:int=None): |
|
2337
|
|
|
if i is None: |
|
2338
|
|
|
return self.getTokens(PythonParser.COMMA) |
|
2339
|
|
|
else: |
|
2340
|
|
|
return self.getToken(PythonParser.COMMA, i) |
|
2341
|
|
|
|
|
2342
|
|
|
def getRuleIndex(self): |
|
2343
|
|
|
return PythonParser.RULE_def_parameters |
|
2344
|
|
|
|
|
2345
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
2346
|
|
|
if hasattr( listener, "enterDef_parameters" ): |
|
2347
|
|
|
listener.enterDef_parameters(self) |
|
2348
|
|
|
|
|
2349
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
2350
|
|
|
if hasattr( listener, "exitDef_parameters" ): |
|
2351
|
|
|
listener.exitDef_parameters(self) |
|
2352
|
|
|
|
|
2353
|
|
|
|
|
2354
|
|
|
|
|
2355
|
|
|
|
|
2356
|
|
|
def def_parameters(self): |
|
2357
|
|
|
|
|
2358
|
|
|
localctx = PythonParser.Def_parametersContext(self, self._ctx, self.state) |
|
2359
|
|
|
self.enterRule(localctx, 36, self.RULE_def_parameters) |
|
2360
|
|
|
try: |
|
2361
|
|
|
self.enterOuterAlt(localctx, 1) |
|
2362
|
|
|
self.state = 346 |
|
2363
|
|
|
self.def_parameter() |
|
2364
|
|
|
self.state = 351 |
|
2365
|
|
|
self._errHandler.sync(self) |
|
2366
|
|
|
_alt = self._interp.adaptivePredict(self._input,39,self._ctx) |
|
2367
|
|
|
while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: |
|
2368
|
|
|
if _alt==1: |
|
2369
|
|
|
self.state = 347 |
|
2370
|
|
|
self.match(PythonParser.COMMA) |
|
2371
|
|
|
self.state = 348 |
|
2372
|
|
|
self.def_parameter() |
|
2373
|
|
|
self.state = 353 |
|
2374
|
|
|
self._errHandler.sync(self) |
|
2375
|
|
|
_alt = self._interp.adaptivePredict(self._input,39,self._ctx) |
|
2376
|
|
|
|
|
2377
|
|
|
except RecognitionException as re: |
|
2378
|
|
|
localctx.exception = re |
|
2379
|
|
|
self._errHandler.reportError(self, re) |
|
2380
|
|
|
self._errHandler.recover(self, re) |
|
2381
|
|
|
finally: |
|
2382
|
|
|
self.exitRule() |
|
2383
|
|
|
return localctx |
|
2384
|
|
|
|
|
2385
|
|
|
|
|
2386
|
|
|
class Def_parameterContext(ParserRuleContext): |
|
2387
|
|
|
__slots__ = 'parser' |
|
2388
|
|
|
|
|
2389
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
2390
|
|
|
super().__init__(parent, invokingState) |
|
2391
|
|
|
self.parser = parser |
|
2392
|
|
|
|
|
2393
|
|
|
def named_parameter(self): |
|
2394
|
|
|
return self.getTypedRuleContext(PythonParser.Named_parameterContext,0) |
|
2395
|
|
|
|
|
2396
|
|
|
|
|
2397
|
|
|
def ASSIGN(self): |
|
2398
|
|
|
return self.getToken(PythonParser.ASSIGN, 0) |
|
2399
|
|
|
|
|
2400
|
|
|
def test(self): |
|
2401
|
|
|
return self.getTypedRuleContext(PythonParser.TestContext,0) |
|
2402
|
|
|
|
|
2403
|
|
|
|
|
2404
|
|
|
def STAR(self): |
|
2405
|
|
|
return self.getToken(PythonParser.STAR, 0) |
|
2406
|
|
|
|
|
2407
|
|
|
def getRuleIndex(self): |
|
2408
|
|
|
return PythonParser.RULE_def_parameter |
|
2409
|
|
|
|
|
2410
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
2411
|
|
|
if hasattr( listener, "enterDef_parameter" ): |
|
2412
|
|
|
listener.enterDef_parameter(self) |
|
2413
|
|
|
|
|
2414
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
2415
|
|
|
if hasattr( listener, "exitDef_parameter" ): |
|
2416
|
|
|
listener.exitDef_parameter(self) |
|
2417
|
|
|
|
|
2418
|
|
|
|
|
2419
|
|
|
|
|
2420
|
|
|
|
|
2421
|
|
|
def def_parameter(self): |
|
2422
|
|
|
|
|
2423
|
|
|
localctx = PythonParser.Def_parameterContext(self, self._ctx, self.state) |
|
2424
|
|
|
self.enterRule(localctx, 38, self.RULE_def_parameter) |
|
2425
|
|
|
self._la = 0 # Token type |
|
2426
|
|
|
try: |
|
2427
|
|
|
self.state = 360 |
|
2428
|
|
|
self._errHandler.sync(self) |
|
2429
|
|
|
token = self._input.LA(1) |
|
2430
|
|
|
if token in [39, 40, 96]: |
|
2431
|
|
|
self.enterOuterAlt(localctx, 1) |
|
2432
|
|
|
self.state = 354 |
|
2433
|
|
|
self.named_parameter() |
|
2434
|
|
|
self.state = 357 |
|
2435
|
|
|
self._errHandler.sync(self) |
|
2436
|
|
|
_la = self._input.LA(1) |
|
2437
|
|
|
if _la==49: |
|
2438
|
|
|
self.state = 355 |
|
2439
|
|
|
self.match(PythonParser.ASSIGN) |
|
2440
|
|
|
self.state = 356 |
|
2441
|
|
|
self.test() |
|
2442
|
|
|
|
|
2443
|
|
|
|
|
2444
|
|
|
pass |
|
2445
|
|
|
elif token in [44]: |
|
2446
|
|
|
self.enterOuterAlt(localctx, 2) |
|
2447
|
|
|
self.state = 359 |
|
2448
|
|
|
self.match(PythonParser.STAR) |
|
2449
|
|
|
pass |
|
2450
|
|
|
else: |
|
2451
|
|
|
raise NoViableAltException(self) |
|
2452
|
|
|
|
|
2453
|
|
|
except RecognitionException as re: |
|
2454
|
|
|
localctx.exception = re |
|
2455
|
|
|
self._errHandler.reportError(self, re) |
|
2456
|
|
|
self._errHandler.recover(self, re) |
|
2457
|
|
|
finally: |
|
2458
|
|
|
self.exitRule() |
|
2459
|
|
|
return localctx |
|
2460
|
|
|
|
|
2461
|
|
|
|
|
2462
|
|
|
class Named_parameterContext(ParserRuleContext): |
|
2463
|
|
|
__slots__ = 'parser' |
|
2464
|
|
|
|
|
2465
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
2466
|
|
|
super().__init__(parent, invokingState) |
|
2467
|
|
|
self.parser = parser |
|
2468
|
|
|
|
|
2469
|
|
|
def name(self): |
|
2470
|
|
|
return self.getTypedRuleContext(PythonParser.NameContext,0) |
|
2471
|
|
|
|
|
2472
|
|
|
|
|
2473
|
|
|
def COLON(self): |
|
2474
|
|
|
return self.getToken(PythonParser.COLON, 0) |
|
2475
|
|
|
|
|
2476
|
|
|
def test(self): |
|
2477
|
|
|
return self.getTypedRuleContext(PythonParser.TestContext,0) |
|
2478
|
|
|
|
|
2479
|
|
|
|
|
2480
|
|
|
def getRuleIndex(self): |
|
2481
|
|
|
return PythonParser.RULE_named_parameter |
|
2482
|
|
|
|
|
2483
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
2484
|
|
|
if hasattr( listener, "enterNamed_parameter" ): |
|
2485
|
|
|
listener.enterNamed_parameter(self) |
|
2486
|
|
|
|
|
2487
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
2488
|
|
|
if hasattr( listener, "exitNamed_parameter" ): |
|
2489
|
|
|
listener.exitNamed_parameter(self) |
|
2490
|
|
|
|
|
2491
|
|
|
|
|
2492
|
|
|
|
|
2493
|
|
|
|
|
2494
|
|
|
def named_parameter(self): |
|
2495
|
|
|
|
|
2496
|
|
|
localctx = PythonParser.Named_parameterContext(self, self._ctx, self.state) |
|
2497
|
|
|
self.enterRule(localctx, 40, self.RULE_named_parameter) |
|
2498
|
|
|
self._la = 0 # Token type |
|
2499
|
|
|
try: |
|
2500
|
|
|
self.enterOuterAlt(localctx, 1) |
|
2501
|
|
|
self.state = 362 |
|
2502
|
|
|
self.name() |
|
2503
|
|
|
self.state = 365 |
|
2504
|
|
|
self._errHandler.sync(self) |
|
2505
|
|
|
_la = self._input.LA(1) |
|
2506
|
|
|
if _la==46: |
|
2507
|
|
|
self.state = 363 |
|
2508
|
|
|
self.match(PythonParser.COLON) |
|
2509
|
|
|
self.state = 364 |
|
2510
|
|
|
self.test() |
|
2511
|
|
|
|
|
2512
|
|
|
|
|
2513
|
|
|
except RecognitionException as re: |
|
2514
|
|
|
localctx.exception = re |
|
2515
|
|
|
self._errHandler.reportError(self, re) |
|
2516
|
|
|
self._errHandler.recover(self, re) |
|
2517
|
|
|
finally: |
|
2518
|
|
|
self.exitRule() |
|
2519
|
|
|
return localctx |
|
2520
|
|
|
|
|
2521
|
|
|
|
|
2522
|
|
|
class Simple_stmtContext(ParserRuleContext): |
|
2523
|
|
|
__slots__ = 'parser' |
|
2524
|
|
|
|
|
2525
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
2526
|
|
|
super().__init__(parent, invokingState) |
|
2527
|
|
|
self.parser = parser |
|
2528
|
|
|
|
|
2529
|
|
|
def small_stmt(self, i:int=None): |
|
2530
|
|
|
if i is None: |
|
2531
|
|
|
return self.getTypedRuleContexts(PythonParser.Small_stmtContext) |
|
2532
|
|
|
else: |
|
2533
|
|
|
return self.getTypedRuleContext(PythonParser.Small_stmtContext,i) |
|
2534
|
|
|
|
|
2535
|
|
|
|
|
2536
|
|
|
def LINE_BREAK(self): |
|
2537
|
|
|
return self.getToken(PythonParser.LINE_BREAK, 0) |
|
2538
|
|
|
|
|
2539
|
|
|
def EOF(self): |
|
2540
|
|
|
return self.getToken(PythonParser.EOF, 0) |
|
2541
|
|
|
|
|
2542
|
|
|
def SEMI_COLON(self, i:int=None): |
|
2543
|
|
|
if i is None: |
|
2544
|
|
|
return self.getTokens(PythonParser.SEMI_COLON) |
|
2545
|
|
|
else: |
|
2546
|
|
|
return self.getToken(PythonParser.SEMI_COLON, i) |
|
2547
|
|
|
|
|
2548
|
|
|
def getRuleIndex(self): |
|
2549
|
|
|
return PythonParser.RULE_simple_stmt |
|
2550
|
|
|
|
|
2551
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
2552
|
|
|
if hasattr( listener, "enterSimple_stmt" ): |
|
2553
|
|
|
listener.enterSimple_stmt(self) |
|
2554
|
|
|
|
|
2555
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
2556
|
|
|
if hasattr( listener, "exitSimple_stmt" ): |
|
2557
|
|
|
listener.exitSimple_stmt(self) |
|
2558
|
|
|
|
|
2559
|
|
|
|
|
2560
|
|
|
|
|
2561
|
|
|
|
|
2562
|
|
|
def simple_stmt(self): |
|
2563
|
|
|
|
|
2564
|
|
|
localctx = PythonParser.Simple_stmtContext(self, self._ctx, self.state) |
|
2565
|
|
|
self.enterRule(localctx, 42, self.RULE_simple_stmt) |
|
2566
|
|
|
self._la = 0 # Token type |
|
2567
|
|
|
try: |
|
2568
|
|
|
self.enterOuterAlt(localctx, 1) |
|
2569
|
|
|
self.state = 367 |
|
2570
|
|
|
self.small_stmt() |
|
2571
|
|
|
self.state = 372 |
|
2572
|
|
|
self._errHandler.sync(self) |
|
2573
|
|
|
_alt = self._interp.adaptivePredict(self._input,43,self._ctx) |
|
2574
|
|
|
while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: |
|
2575
|
|
|
if _alt==1: |
|
2576
|
|
|
self.state = 368 |
|
2577
|
|
|
self.match(PythonParser.SEMI_COLON) |
|
2578
|
|
|
self.state = 369 |
|
2579
|
|
|
self.small_stmt() |
|
2580
|
|
|
self.state = 374 |
|
2581
|
|
|
self._errHandler.sync(self) |
|
2582
|
|
|
_alt = self._interp.adaptivePredict(self._input,43,self._ctx) |
|
2583
|
|
|
|
|
2584
|
|
|
self.state = 376 |
|
2585
|
|
|
self._errHandler.sync(self) |
|
2586
|
|
|
_la = self._input.LA(1) |
|
2587
|
|
|
if _la==47: |
|
2588
|
|
|
self.state = 375 |
|
2589
|
|
|
self.match(PythonParser.SEMI_COLON) |
|
2590
|
|
|
|
|
2591
|
|
|
|
|
2592
|
|
|
self.state = 378 |
|
2593
|
|
|
_la = self._input.LA(1) |
|
2594
|
|
|
if not(_la==-1 or _la==3): |
|
2595
|
|
|
self._errHandler.recoverInline(self) |
|
2596
|
|
|
else: |
|
2597
|
|
|
self._errHandler.reportMatch(self) |
|
2598
|
|
|
self.consume() |
|
2599
|
|
|
except RecognitionException as re: |
|
2600
|
|
|
localctx.exception = re |
|
2601
|
|
|
self._errHandler.reportError(self, re) |
|
2602
|
|
|
self._errHandler.recover(self, re) |
|
2603
|
|
|
finally: |
|
2604
|
|
|
self.exitRule() |
|
2605
|
|
|
return localctx |
|
2606
|
|
|
|
|
2607
|
|
|
|
|
2608
|
|
|
class Small_stmtContext(ParserRuleContext): |
|
2609
|
|
|
__slots__ = 'parser' |
|
2610
|
|
|
|
|
2611
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
2612
|
|
|
super().__init__(parent, invokingState) |
|
2613
|
|
|
self.parser = parser |
|
2614
|
|
|
|
|
2615
|
|
|
|
|
2616
|
|
|
def getRuleIndex(self): |
|
2617
|
|
|
return PythonParser.RULE_small_stmt |
|
2618
|
|
|
|
|
2619
|
|
|
|
|
2620
|
|
|
def copyFrom(self, ctx:ParserRuleContext): |
|
2621
|
|
|
super().copyFrom(ctx) |
|
2622
|
|
|
|
|
2623
|
|
|
|
|
2624
|
|
|
|
|
2625
|
|
|
class Assert_stmtContext(Small_stmtContext): |
|
2626
|
|
|
|
|
2627
|
|
|
def __init__(self, parser, ctx:ParserRuleContext): # actually a PythonParser.Small_stmtContext |
|
2628
|
|
|
super().__init__(parser) |
|
2629
|
|
|
self.copyFrom(ctx) |
|
2630
|
|
|
|
|
2631
|
|
|
def ASSERT(self): |
|
2632
|
|
|
return self.getToken(PythonParser.ASSERT, 0) |
|
2633
|
|
|
def test(self, i:int=None): |
|
2634
|
|
|
if i is None: |
|
2635
|
|
|
return self.getTypedRuleContexts(PythonParser.TestContext) |
|
2636
|
|
|
else: |
|
2637
|
|
|
return self.getTypedRuleContext(PythonParser.TestContext,i) |
|
2638
|
|
|
|
|
2639
|
|
|
def COMMA(self): |
|
2640
|
|
|
return self.getToken(PythonParser.COMMA, 0) |
|
2641
|
|
|
|
|
2642
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
2643
|
|
|
if hasattr( listener, "enterAssert_stmt" ): |
|
2644
|
|
|
listener.enterAssert_stmt(self) |
|
2645
|
|
|
|
|
2646
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
2647
|
|
|
if hasattr( listener, "exitAssert_stmt" ): |
|
2648
|
|
|
listener.exitAssert_stmt(self) |
|
2649
|
|
|
|
|
2650
|
|
|
|
|
2651
|
|
|
class Nonlocal_stmtContext(Small_stmtContext): |
|
2652
|
|
|
|
|
2653
|
|
|
def __init__(self, parser, ctx:ParserRuleContext): # actually a PythonParser.Small_stmtContext |
|
2654
|
|
|
super().__init__(parser) |
|
2655
|
|
|
self.copyFrom(ctx) |
|
2656
|
|
|
|
|
2657
|
|
|
def NONLOCAL(self): |
|
2658
|
|
|
return self.getToken(PythonParser.NONLOCAL, 0) |
|
2659
|
|
|
def name(self, i:int=None): |
|
2660
|
|
|
if i is None: |
|
2661
|
|
|
return self.getTypedRuleContexts(PythonParser.NameContext) |
|
2662
|
|
|
else: |
|
2663
|
|
|
return self.getTypedRuleContext(PythonParser.NameContext,i) |
|
2664
|
|
|
|
|
2665
|
|
|
def COMMA(self, i:int=None): |
|
2666
|
|
|
if i is None: |
|
2667
|
|
|
return self.getTokens(PythonParser.COMMA) |
|
2668
|
|
|
else: |
|
2669
|
|
|
return self.getToken(PythonParser.COMMA, i) |
|
2670
|
|
|
|
|
2671
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
2672
|
|
|
if hasattr( listener, "enterNonlocal_stmt" ): |
|
2673
|
|
|
listener.enterNonlocal_stmt(self) |
|
2674
|
|
|
|
|
2675
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
2676
|
|
|
if hasattr( listener, "exitNonlocal_stmt" ): |
|
2677
|
|
|
listener.exitNonlocal_stmt(self) |
|
2678
|
|
|
|
|
2679
|
|
|
|
|
2680
|
|
|
class Pass_stmtContext(Small_stmtContext): |
|
2681
|
|
|
|
|
2682
|
|
|
def __init__(self, parser, ctx:ParserRuleContext): # actually a PythonParser.Small_stmtContext |
|
2683
|
|
|
super().__init__(parser) |
|
2684
|
|
|
self.copyFrom(ctx) |
|
2685
|
|
|
|
|
2686
|
|
|
def PASS(self): |
|
2687
|
|
|
return self.getToken(PythonParser.PASS, 0) |
|
2688
|
|
|
|
|
2689
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
2690
|
|
|
if hasattr( listener, "enterPass_stmt" ): |
|
2691
|
|
|
listener.enterPass_stmt(self) |
|
2692
|
|
|
|
|
2693
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
2694
|
|
|
if hasattr( listener, "exitPass_stmt" ): |
|
2695
|
|
|
listener.exitPass_stmt(self) |
|
2696
|
|
|
|
|
2697
|
|
|
|
|
2698
|
|
|
class Import_stmtContext(Small_stmtContext): |
|
2699
|
|
|
|
|
2700
|
|
|
def __init__(self, parser, ctx:ParserRuleContext): # actually a PythonParser.Small_stmtContext |
|
2701
|
|
|
super().__init__(parser) |
|
2702
|
|
|
self.copyFrom(ctx) |
|
2703
|
|
|
|
|
2704
|
|
|
def IMPORT(self): |
|
2705
|
|
|
return self.getToken(PythonParser.IMPORT, 0) |
|
2706
|
|
|
def dotted_as_names(self): |
|
2707
|
|
|
return self.getTypedRuleContext(PythonParser.Dotted_as_namesContext,0) |
|
2708
|
|
|
|
|
2709
|
|
|
|
|
2710
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
2711
|
|
|
if hasattr( listener, "enterImport_stmt" ): |
|
2712
|
|
|
listener.enterImport_stmt(self) |
|
2713
|
|
|
|
|
2714
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
2715
|
|
|
if hasattr( listener, "exitImport_stmt" ): |
|
2716
|
|
|
listener.exitImport_stmt(self) |
|
2717
|
|
|
|
|
2718
|
|
|
|
|
2719
|
|
|
class Expr_stmtContext(Small_stmtContext): |
|
2720
|
|
|
|
|
2721
|
|
|
def __init__(self, parser, ctx:ParserRuleContext): # actually a PythonParser.Small_stmtContext |
|
2722
|
|
|
super().__init__(parser) |
|
2723
|
|
|
self.copyFrom(ctx) |
|
2724
|
|
|
|
|
2725
|
|
|
def testlist_star_expr(self): |
|
2726
|
|
|
return self.getTypedRuleContext(PythonParser.Testlist_star_exprContext,0) |
|
2727
|
|
|
|
|
2728
|
|
|
def assign_part(self): |
|
2729
|
|
|
return self.getTypedRuleContext(PythonParser.Assign_partContext,0) |
|
2730
|
|
|
|
|
2731
|
|
|
|
|
2732
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
2733
|
|
|
if hasattr( listener, "enterExpr_stmt" ): |
|
2734
|
|
|
listener.enterExpr_stmt(self) |
|
2735
|
|
|
|
|
2736
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
2737
|
|
|
if hasattr( listener, "exitExpr_stmt" ): |
|
2738
|
|
|
listener.exitExpr_stmt(self) |
|
2739
|
|
|
|
|
2740
|
|
|
|
|
2741
|
|
|
class Raise_stmtContext(Small_stmtContext): |
|
2742
|
|
|
|
|
2743
|
|
|
def __init__(self, parser, ctx:ParserRuleContext): # actually a PythonParser.Small_stmtContext |
|
2744
|
|
|
super().__init__(parser) |
|
2745
|
|
|
self.copyFrom(ctx) |
|
2746
|
|
|
|
|
2747
|
|
|
def RAISE(self): |
|
2748
|
|
|
return self.getToken(PythonParser.RAISE, 0) |
|
2749
|
|
|
def test(self, i:int=None): |
|
2750
|
|
|
if i is None: |
|
2751
|
|
|
return self.getTypedRuleContexts(PythonParser.TestContext) |
|
2752
|
|
|
else: |
|
2753
|
|
|
return self.getTypedRuleContext(PythonParser.TestContext,i) |
|
2754
|
|
|
|
|
2755
|
|
|
def FROM(self): |
|
2756
|
|
|
return self.getToken(PythonParser.FROM, 0) |
|
2757
|
|
|
def COMMA(self, i:int=None): |
|
2758
|
|
|
if i is None: |
|
2759
|
|
|
return self.getTokens(PythonParser.COMMA) |
|
2760
|
|
|
else: |
|
2761
|
|
|
return self.getToken(PythonParser.COMMA, i) |
|
2762
|
|
|
|
|
2763
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
2764
|
|
|
if hasattr( listener, "enterRaise_stmt" ): |
|
2765
|
|
|
listener.enterRaise_stmt(self) |
|
2766
|
|
|
|
|
2767
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
2768
|
|
|
if hasattr( listener, "exitRaise_stmt" ): |
|
2769
|
|
|
listener.exitRaise_stmt(self) |
|
2770
|
|
|
|
|
2771
|
|
|
|
|
2772
|
|
|
class Yield_stmtContext(Small_stmtContext): |
|
2773
|
|
|
|
|
2774
|
|
|
def __init__(self, parser, ctx:ParserRuleContext): # actually a PythonParser.Small_stmtContext |
|
2775
|
|
|
super().__init__(parser) |
|
2776
|
|
|
self.copyFrom(ctx) |
|
2777
|
|
|
|
|
2778
|
|
|
def yield_expr(self): |
|
2779
|
|
|
return self.getTypedRuleContext(PythonParser.Yield_exprContext,0) |
|
2780
|
|
|
|
|
2781
|
|
|
|
|
2782
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
2783
|
|
|
if hasattr( listener, "enterYield_stmt" ): |
|
2784
|
|
|
listener.enterYield_stmt(self) |
|
2785
|
|
|
|
|
2786
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
2787
|
|
|
if hasattr( listener, "exitYield_stmt" ): |
|
2788
|
|
|
listener.exitYield_stmt(self) |
|
2789
|
|
|
|
|
2790
|
|
|
|
|
2791
|
|
|
class From_stmtContext(Small_stmtContext): |
|
2792
|
|
|
|
|
2793
|
|
|
def __init__(self, parser, ctx:ParserRuleContext): # actually a PythonParser.Small_stmtContext |
|
2794
|
|
|
super().__init__(parser) |
|
2795
|
|
|
self.copyFrom(ctx) |
|
2796
|
|
|
|
|
2797
|
|
|
def FROM(self): |
|
2798
|
|
|
return self.getToken(PythonParser.FROM, 0) |
|
2799
|
|
|
def IMPORT(self): |
|
2800
|
|
|
return self.getToken(PythonParser.IMPORT, 0) |
|
2801
|
|
|
def dotted_name(self): |
|
2802
|
|
|
return self.getTypedRuleContext(PythonParser.Dotted_nameContext,0) |
|
2803
|
|
|
|
|
2804
|
|
|
def STAR(self): |
|
2805
|
|
|
return self.getToken(PythonParser.STAR, 0) |
|
2806
|
|
|
def OPEN_PAREN(self): |
|
2807
|
|
|
return self.getToken(PythonParser.OPEN_PAREN, 0) |
|
2808
|
|
|
def import_as_names(self): |
|
2809
|
|
|
return self.getTypedRuleContext(PythonParser.Import_as_namesContext,0) |
|
2810
|
|
|
|
|
2811
|
|
|
def CLOSE_PAREN(self): |
|
2812
|
|
|
return self.getToken(PythonParser.CLOSE_PAREN, 0) |
|
2813
|
|
|
def DOT(self, i:int=None): |
|
2814
|
|
|
if i is None: |
|
2815
|
|
|
return self.getTokens(PythonParser.DOT) |
|
2816
|
|
|
else: |
|
2817
|
|
|
return self.getToken(PythonParser.DOT, i) |
|
2818
|
|
|
def ELLIPSIS(self, i:int=None): |
|
2819
|
|
|
if i is None: |
|
2820
|
|
|
return self.getTokens(PythonParser.ELLIPSIS) |
|
2821
|
|
|
else: |
|
2822
|
|
|
return self.getToken(PythonParser.ELLIPSIS, i) |
|
2823
|
|
|
|
|
2824
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
2825
|
|
|
if hasattr( listener, "enterFrom_stmt" ): |
|
2826
|
|
|
listener.enterFrom_stmt(self) |
|
2827
|
|
|
|
|
2828
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
2829
|
|
|
if hasattr( listener, "exitFrom_stmt" ): |
|
2830
|
|
|
listener.exitFrom_stmt(self) |
|
2831
|
|
|
|
|
2832
|
|
|
|
|
2833
|
|
|
class Global_stmtContext(Small_stmtContext): |
|
2834
|
|
|
|
|
2835
|
|
|
def __init__(self, parser, ctx:ParserRuleContext): # actually a PythonParser.Small_stmtContext |
|
2836
|
|
|
super().__init__(parser) |
|
2837
|
|
|
self.copyFrom(ctx) |
|
2838
|
|
|
|
|
2839
|
|
|
def GLOBAL(self): |
|
2840
|
|
|
return self.getToken(PythonParser.GLOBAL, 0) |
|
2841
|
|
|
def name(self, i:int=None): |
|
2842
|
|
|
if i is None: |
|
2843
|
|
|
return self.getTypedRuleContexts(PythonParser.NameContext) |
|
2844
|
|
|
else: |
|
2845
|
|
|
return self.getTypedRuleContext(PythonParser.NameContext,i) |
|
2846
|
|
|
|
|
2847
|
|
|
def COMMA(self, i:int=None): |
|
2848
|
|
|
if i is None: |
|
2849
|
|
|
return self.getTokens(PythonParser.COMMA) |
|
2850
|
|
|
else: |
|
2851
|
|
|
return self.getToken(PythonParser.COMMA, i) |
|
2852
|
|
|
|
|
2853
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
2854
|
|
|
if hasattr( listener, "enterGlobal_stmt" ): |
|
2855
|
|
|
listener.enterGlobal_stmt(self) |
|
2856
|
|
|
|
|
2857
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
2858
|
|
|
if hasattr( listener, "exitGlobal_stmt" ): |
|
2859
|
|
|
listener.exitGlobal_stmt(self) |
|
2860
|
|
|
|
|
2861
|
|
|
|
|
2862
|
|
|
class Continue_stmtContext(Small_stmtContext): |
|
2863
|
|
|
|
|
2864
|
|
|
def __init__(self, parser, ctx:ParserRuleContext): # actually a PythonParser.Small_stmtContext |
|
2865
|
|
|
super().__init__(parser) |
|
2866
|
|
|
self.copyFrom(ctx) |
|
2867
|
|
|
|
|
2868
|
|
|
def CONTINUE(self): |
|
2869
|
|
|
return self.getToken(PythonParser.CONTINUE, 0) |
|
2870
|
|
|
|
|
2871
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
2872
|
|
|
if hasattr( listener, "enterContinue_stmt" ): |
|
2873
|
|
|
listener.enterContinue_stmt(self) |
|
2874
|
|
|
|
|
2875
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
2876
|
|
|
if hasattr( listener, "exitContinue_stmt" ): |
|
2877
|
|
|
listener.exitContinue_stmt(self) |
|
2878
|
|
|
|
|
2879
|
|
|
|
|
2880
|
|
|
class Exec_stmtContext(Small_stmtContext): |
|
2881
|
|
|
|
|
2882
|
|
|
def __init__(self, parser, ctx:ParserRuleContext): # actually a PythonParser.Small_stmtContext |
|
2883
|
|
|
super().__init__(parser) |
|
2884
|
|
|
self.copyFrom(ctx) |
|
2885
|
|
|
|
|
2886
|
|
|
def EXEC(self): |
|
2887
|
|
|
return self.getToken(PythonParser.EXEC, 0) |
|
2888
|
|
|
def expr(self): |
|
2889
|
|
|
return self.getTypedRuleContext(PythonParser.ExprContext,0) |
|
2890
|
|
|
|
|
2891
|
|
|
def IN(self): |
|
2892
|
|
|
return self.getToken(PythonParser.IN, 0) |
|
2893
|
|
|
def test(self, i:int=None): |
|
2894
|
|
|
if i is None: |
|
2895
|
|
|
return self.getTypedRuleContexts(PythonParser.TestContext) |
|
2896
|
|
|
else: |
|
2897
|
|
|
return self.getTypedRuleContext(PythonParser.TestContext,i) |
|
2898
|
|
|
|
|
2899
|
|
|
def COMMA(self): |
|
2900
|
|
|
return self.getToken(PythonParser.COMMA, 0) |
|
2901
|
|
|
|
|
2902
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
2903
|
|
|
if hasattr( listener, "enterExec_stmt" ): |
|
2904
|
|
|
listener.enterExec_stmt(self) |
|
2905
|
|
|
|
|
2906
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
2907
|
|
|
if hasattr( listener, "exitExec_stmt" ): |
|
2908
|
|
|
listener.exitExec_stmt(self) |
|
2909
|
|
|
|
|
2910
|
|
|
|
|
2911
|
|
|
class Break_stmtContext(Small_stmtContext): |
|
2912
|
|
|
|
|
2913
|
|
|
def __init__(self, parser, ctx:ParserRuleContext): # actually a PythonParser.Small_stmtContext |
|
2914
|
|
|
super().__init__(parser) |
|
2915
|
|
|
self.copyFrom(ctx) |
|
2916
|
|
|
|
|
2917
|
|
|
def BREAK(self): |
|
2918
|
|
|
return self.getToken(PythonParser.BREAK, 0) |
|
2919
|
|
|
|
|
2920
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
2921
|
|
|
if hasattr( listener, "enterBreak_stmt" ): |
|
2922
|
|
|
listener.enterBreak_stmt(self) |
|
2923
|
|
|
|
|
2924
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
2925
|
|
|
if hasattr( listener, "exitBreak_stmt" ): |
|
2926
|
|
|
listener.exitBreak_stmt(self) |
|
2927
|
|
|
|
|
2928
|
|
|
|
|
2929
|
|
|
class Del_stmtContext(Small_stmtContext): |
|
2930
|
|
|
|
|
2931
|
|
|
def __init__(self, parser, ctx:ParserRuleContext): # actually a PythonParser.Small_stmtContext |
|
2932
|
|
|
super().__init__(parser) |
|
2933
|
|
|
self.copyFrom(ctx) |
|
2934
|
|
|
|
|
2935
|
|
|
def DEL(self): |
|
2936
|
|
|
return self.getToken(PythonParser.DEL, 0) |
|
2937
|
|
|
def exprlist(self): |
|
2938
|
|
|
return self.getTypedRuleContext(PythonParser.ExprlistContext,0) |
|
2939
|
|
|
|
|
2940
|
|
|
|
|
2941
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
2942
|
|
|
if hasattr( listener, "enterDel_stmt" ): |
|
2943
|
|
|
listener.enterDel_stmt(self) |
|
2944
|
|
|
|
|
2945
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
2946
|
|
|
if hasattr( listener, "exitDel_stmt" ): |
|
2947
|
|
|
listener.exitDel_stmt(self) |
|
2948
|
|
|
|
|
2949
|
|
|
|
|
2950
|
|
|
class Print_stmtContext(Small_stmtContext): |
|
2951
|
|
|
|
|
2952
|
|
|
def __init__(self, parser, ctx:ParserRuleContext): # actually a PythonParser.Small_stmtContext |
|
2953
|
|
|
super().__init__(parser) |
|
2954
|
|
|
self.copyFrom(ctx) |
|
2955
|
|
|
|
|
2956
|
|
|
def PRINT(self): |
|
2957
|
|
|
return self.getToken(PythonParser.PRINT, 0) |
|
2958
|
|
|
def RIGHT_SHIFT(self): |
|
2959
|
|
|
return self.getToken(PythonParser.RIGHT_SHIFT, 0) |
|
2960
|
|
|
def test(self, i:int=None): |
|
2961
|
|
|
if i is None: |
|
2962
|
|
|
return self.getTypedRuleContexts(PythonParser.TestContext) |
|
2963
|
|
|
else: |
|
2964
|
|
|
return self.getTypedRuleContext(PythonParser.TestContext,i) |
|
2965
|
|
|
|
|
2966
|
|
|
def COMMA(self, i:int=None): |
|
2967
|
|
|
if i is None: |
|
2968
|
|
|
return self.getTokens(PythonParser.COMMA) |
|
2969
|
|
|
else: |
|
2970
|
|
|
return self.getToken(PythonParser.COMMA, i) |
|
2971
|
|
|
|
|
2972
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
2973
|
|
|
if hasattr( listener, "enterPrint_stmt" ): |
|
2974
|
|
|
listener.enterPrint_stmt(self) |
|
2975
|
|
|
|
|
2976
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
2977
|
|
|
if hasattr( listener, "exitPrint_stmt" ): |
|
2978
|
|
|
listener.exitPrint_stmt(self) |
|
2979
|
|
|
|
|
2980
|
|
|
|
|
2981
|
|
|
class Return_stmtContext(Small_stmtContext): |
|
2982
|
|
|
|
|
2983
|
|
|
def __init__(self, parser, ctx:ParserRuleContext): # actually a PythonParser.Small_stmtContext |
|
2984
|
|
|
super().__init__(parser) |
|
2985
|
|
|
self.copyFrom(ctx) |
|
2986
|
|
|
|
|
2987
|
|
|
def RETURN(self): |
|
2988
|
|
|
return self.getToken(PythonParser.RETURN, 0) |
|
2989
|
|
|
def testlist(self): |
|
2990
|
|
|
return self.getTypedRuleContext(PythonParser.TestlistContext,0) |
|
2991
|
|
|
|
|
2992
|
|
|
|
|
2993
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
2994
|
|
|
if hasattr( listener, "enterReturn_stmt" ): |
|
2995
|
|
|
listener.enterReturn_stmt(self) |
|
2996
|
|
|
|
|
2997
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
2998
|
|
|
if hasattr( listener, "exitReturn_stmt" ): |
|
2999
|
|
|
listener.exitReturn_stmt(self) |
|
3000
|
|
|
|
|
3001
|
|
|
|
|
3002
|
|
|
|
|
3003
|
|
|
def small_stmt(self): |
|
3004
|
|
|
|
|
3005
|
|
|
localctx = PythonParser.Small_stmtContext(self, self._ctx, self.state) |
|
3006
|
|
|
self.enterRule(localctx, 44, self.RULE_small_stmt) |
|
3007
|
|
|
self._la = 0 # Token type |
|
3008
|
|
|
try: |
|
3009
|
|
|
self.state = 504 |
|
3010
|
|
|
self._errHandler.sync(self) |
|
3011
|
|
|
la_ = self._interp.adaptivePredict(self._input,65,self._ctx) |
|
3012
|
|
|
if la_ == 1: |
|
3013
|
|
|
localctx = PythonParser.Expr_stmtContext(self, localctx) |
|
3014
|
|
|
self.enterOuterAlt(localctx, 1) |
|
3015
|
|
|
self.state = 380 |
|
3016
|
|
|
self.testlist_star_expr() |
|
3017
|
|
|
self.state = 382 |
|
3018
|
|
|
self._errHandler.sync(self) |
|
3019
|
|
|
la_ = self._interp.adaptivePredict(self._input,45,self._ctx) |
|
3020
|
|
|
if la_ == 1: |
|
3021
|
|
|
self.state = 381 |
|
3022
|
|
|
self.assign_part() |
|
3023
|
|
|
|
|
3024
|
|
|
|
|
3025
|
|
|
pass |
|
3026
|
|
|
|
|
3027
|
|
|
elif la_ == 2: |
|
3028
|
|
|
localctx = PythonParser.Print_stmtContext(self, localctx) |
|
3029
|
|
|
self.enterOuterAlt(localctx, 2) |
|
3030
|
|
|
self.state = 384 |
|
3031
|
|
|
if not self.CheckVersion(2): |
|
3032
|
|
|
from antlr4.error.Errors import FailedPredicateException |
|
3033
|
|
|
raise FailedPredicateException(self, "self.CheckVersion(2)") |
|
3034
|
|
|
self.state = 385 |
|
3035
|
|
|
self.match(PythonParser.PRINT) |
|
3036
|
|
|
self.state = 408 |
|
3037
|
|
|
self._errHandler.sync(self) |
|
3038
|
|
|
token = self._input.LA(1) |
|
3039
|
|
|
if token in [20, 24, 27, 36, 37, 38, 39, 40, 42, 43, 55, 56, 60, 83, 84, 85, 86, 87, 88, 89, 90, 92, 94, 96]: |
|
3040
|
|
|
self.state = 386 |
|
3041
|
|
|
self.test() |
|
3042
|
|
|
self.state = 391 |
|
3043
|
|
|
self._errHandler.sync(self) |
|
3044
|
|
|
_alt = self._interp.adaptivePredict(self._input,46,self._ctx) |
|
3045
|
|
|
while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: |
|
3046
|
|
|
if _alt==1: |
|
3047
|
|
|
self.state = 387 |
|
3048
|
|
|
self.match(PythonParser.COMMA) |
|
3049
|
|
|
self.state = 388 |
|
3050
|
|
|
self.test() |
|
3051
|
|
|
self.state = 393 |
|
3052
|
|
|
self._errHandler.sync(self) |
|
3053
|
|
|
_alt = self._interp.adaptivePredict(self._input,46,self._ctx) |
|
3054
|
|
|
|
|
3055
|
|
|
self.state = 395 |
|
3056
|
|
|
self._errHandler.sync(self) |
|
3057
|
|
|
_la = self._input.LA(1) |
|
3058
|
|
|
if _la==45: |
|
3059
|
|
|
self.state = 394 |
|
3060
|
|
|
self.match(PythonParser.COMMA) |
|
3061
|
|
|
|
|
3062
|
|
|
|
|
3063
|
|
|
pass |
|
3064
|
|
|
elif token in [54]: |
|
3065
|
|
|
self.state = 397 |
|
3066
|
|
|
self.match(PythonParser.RIGHT_SHIFT) |
|
3067
|
|
|
self.state = 398 |
|
3068
|
|
|
self.test() |
|
3069
|
|
|
|
|
3070
|
|
|
self.state = 401 |
|
3071
|
|
|
self._errHandler.sync(self) |
|
3072
|
|
|
_alt = 1 |
|
3073
|
|
|
while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: |
|
3074
|
|
|
if _alt == 1: |
|
3075
|
|
|
self.state = 399 |
|
3076
|
|
|
self.match(PythonParser.COMMA) |
|
3077
|
|
|
self.state = 400 |
|
3078
|
|
|
self.test() |
|
3079
|
|
|
|
|
3080
|
|
|
else: |
|
3081
|
|
|
raise NoViableAltException(self) |
|
3082
|
|
|
self.state = 403 |
|
3083
|
|
|
self._errHandler.sync(self) |
|
3084
|
|
|
_alt = self._interp.adaptivePredict(self._input,48,self._ctx) |
|
3085
|
|
|
|
|
3086
|
|
|
self.state = 406 |
|
3087
|
|
|
self._errHandler.sync(self) |
|
3088
|
|
|
_la = self._input.LA(1) |
|
3089
|
|
|
if _la==45: |
|
3090
|
|
|
self.state = 405 |
|
3091
|
|
|
self.match(PythonParser.COMMA) |
|
3092
|
|
|
|
|
3093
|
|
|
|
|
3094
|
|
|
pass |
|
3095
|
|
|
else: |
|
3096
|
|
|
raise NoViableAltException(self) |
|
3097
|
|
|
|
|
3098
|
|
|
self.SetVersion(2); |
|
3099
|
|
|
pass |
|
3100
|
|
|
|
|
3101
|
|
|
elif la_ == 3: |
|
3102
|
|
|
localctx = PythonParser.Del_stmtContext(self, localctx) |
|
3103
|
|
|
self.enterOuterAlt(localctx, 3) |
|
3104
|
|
|
self.state = 412 |
|
3105
|
|
|
self.match(PythonParser.DEL) |
|
3106
|
|
|
self.state = 413 |
|
3107
|
|
|
self.exprlist() |
|
3108
|
|
|
pass |
|
3109
|
|
|
|
|
3110
|
|
|
elif la_ == 4: |
|
3111
|
|
|
localctx = PythonParser.Pass_stmtContext(self, localctx) |
|
3112
|
|
|
self.enterOuterAlt(localctx, 4) |
|
3113
|
|
|
self.state = 414 |
|
3114
|
|
|
self.match(PythonParser.PASS) |
|
3115
|
|
|
pass |
|
3116
|
|
|
|
|
3117
|
|
|
elif la_ == 5: |
|
3118
|
|
|
localctx = PythonParser.Break_stmtContext(self, localctx) |
|
3119
|
|
|
self.enterOuterAlt(localctx, 5) |
|
3120
|
|
|
self.state = 415 |
|
3121
|
|
|
self.match(PythonParser.BREAK) |
|
3122
|
|
|
pass |
|
3123
|
|
|
|
|
3124
|
|
|
elif la_ == 6: |
|
3125
|
|
|
localctx = PythonParser.Continue_stmtContext(self, localctx) |
|
3126
|
|
|
self.enterOuterAlt(localctx, 6) |
|
3127
|
|
|
self.state = 416 |
|
3128
|
|
|
self.match(PythonParser.CONTINUE) |
|
3129
|
|
|
pass |
|
3130
|
|
|
|
|
3131
|
|
|
elif la_ == 7: |
|
3132
|
|
|
localctx = PythonParser.Return_stmtContext(self, localctx) |
|
3133
|
|
|
self.enterOuterAlt(localctx, 7) |
|
3134
|
|
|
self.state = 417 |
|
3135
|
|
|
self.match(PythonParser.RETURN) |
|
3136
|
|
|
self.state = 419 |
|
3137
|
|
|
self._errHandler.sync(self) |
|
3138
|
|
|
_la = self._input.LA(1) |
|
3139
|
|
|
if (((_la) & ~0x3f) == 0 and ((1 << _la) & 1261023220259094528) != 0) or ((((_la - 83)) & ~0x3f) == 0 and ((1 << (_la - 83)) & 11007) != 0): |
|
3140
|
|
|
self.state = 418 |
|
3141
|
|
|
self.testlist() |
|
3142
|
|
|
|
|
3143
|
|
|
|
|
3144
|
|
|
pass |
|
3145
|
|
|
|
|
3146
|
|
|
elif la_ == 8: |
|
3147
|
|
|
localctx = PythonParser.Raise_stmtContext(self, localctx) |
|
3148
|
|
|
self.enterOuterAlt(localctx, 8) |
|
3149
|
|
|
self.state = 421 |
|
3150
|
|
|
self.match(PythonParser.RAISE) |
|
3151
|
|
|
self.state = 431 |
|
3152
|
|
|
self._errHandler.sync(self) |
|
3153
|
|
|
_la = self._input.LA(1) |
|
3154
|
|
|
if (((_la) & ~0x3f) == 0 and ((1 << _la) & 1261023220259094528) != 0) or ((((_la - 83)) & ~0x3f) == 0 and ((1 << (_la - 83)) & 11007) != 0): |
|
3155
|
|
|
self.state = 422 |
|
3156
|
|
|
self.test() |
|
3157
|
|
|
self.state = 429 |
|
3158
|
|
|
self._errHandler.sync(self) |
|
3159
|
|
|
_la = self._input.LA(1) |
|
3160
|
|
|
if _la==45: |
|
3161
|
|
|
self.state = 423 |
|
3162
|
|
|
self.match(PythonParser.COMMA) |
|
3163
|
|
|
self.state = 424 |
|
3164
|
|
|
self.test() |
|
3165
|
|
|
self.state = 427 |
|
3166
|
|
|
self._errHandler.sync(self) |
|
3167
|
|
|
_la = self._input.LA(1) |
|
3168
|
|
|
if _la==45: |
|
3169
|
|
|
self.state = 425 |
|
3170
|
|
|
self.match(PythonParser.COMMA) |
|
3171
|
|
|
self.state = 426 |
|
3172
|
|
|
self.test() |
|
3173
|
|
|
|
|
3174
|
|
|
|
|
3175
|
|
|
|
|
3176
|
|
|
|
|
3177
|
|
|
|
|
3178
|
|
|
|
|
3179
|
|
|
self.state = 435 |
|
3180
|
|
|
self._errHandler.sync(self) |
|
3181
|
|
|
_la = self._input.LA(1) |
|
3182
|
|
|
if _la==7: |
|
3183
|
|
|
self.state = 433 |
|
3184
|
|
|
self.match(PythonParser.FROM) |
|
3185
|
|
|
self.state = 434 |
|
3186
|
|
|
self.test() |
|
3187
|
|
|
|
|
3188
|
|
|
|
|
3189
|
|
|
pass |
|
3190
|
|
|
|
|
3191
|
|
|
elif la_ == 9: |
|
3192
|
|
|
localctx = PythonParser.Yield_stmtContext(self, localctx) |
|
3193
|
|
|
self.enterOuterAlt(localctx, 9) |
|
3194
|
|
|
self.state = 437 |
|
3195
|
|
|
self.yield_expr() |
|
3196
|
|
|
pass |
|
3197
|
|
|
|
|
3198
|
|
|
elif la_ == 10: |
|
3199
|
|
|
localctx = PythonParser.Import_stmtContext(self, localctx) |
|
3200
|
|
|
self.enterOuterAlt(localctx, 10) |
|
3201
|
|
|
self.state = 438 |
|
3202
|
|
|
self.match(PythonParser.IMPORT) |
|
3203
|
|
|
self.state = 439 |
|
3204
|
|
|
self.dotted_as_names() |
|
3205
|
|
|
pass |
|
3206
|
|
|
|
|
3207
|
|
|
elif la_ == 11: |
|
3208
|
|
|
localctx = PythonParser.From_stmtContext(self, localctx) |
|
3209
|
|
|
self.enterOuterAlt(localctx, 11) |
|
3210
|
|
|
self.state = 440 |
|
3211
|
|
|
self.match(PythonParser.FROM) |
|
3212
|
|
|
self.state = 453 |
|
3213
|
|
|
self._errHandler.sync(self) |
|
3214
|
|
|
la_ = self._interp.adaptivePredict(self._input,58,self._ctx) |
|
3215
|
|
|
if la_ == 1: |
|
3216
|
|
|
self.state = 444 |
|
3217
|
|
|
self._errHandler.sync(self) |
|
3218
|
|
|
_la = self._input.LA(1) |
|
3219
|
|
|
while _la==41 or _la==42: |
|
3220
|
|
|
self.state = 441 |
|
3221
|
|
|
_la = self._input.LA(1) |
|
3222
|
|
|
if not(_la==41 or _la==42): |
|
3223
|
|
|
self._errHandler.recoverInline(self) |
|
3224
|
|
|
else: |
|
3225
|
|
|
self._errHandler.reportMatch(self) |
|
3226
|
|
|
self.consume() |
|
3227
|
|
|
self.state = 446 |
|
3228
|
|
|
self._errHandler.sync(self) |
|
3229
|
|
|
_la = self._input.LA(1) |
|
3230
|
|
|
|
|
3231
|
|
|
self.state = 447 |
|
3232
|
|
|
self.dotted_name(0) |
|
3233
|
|
|
pass |
|
3234
|
|
|
|
|
3235
|
|
|
elif la_ == 2: |
|
3236
|
|
|
self.state = 449 |
|
3237
|
|
|
self._errHandler.sync(self) |
|
3238
|
|
|
_la = self._input.LA(1) |
|
3239
|
|
|
while True: |
|
3240
|
|
|
self.state = 448 |
|
3241
|
|
|
_la = self._input.LA(1) |
|
3242
|
|
|
if not(_la==41 or _la==42): |
|
3243
|
|
|
self._errHandler.recoverInline(self) |
|
3244
|
|
|
else: |
|
3245
|
|
|
self._errHandler.reportMatch(self) |
|
3246
|
|
|
self.consume() |
|
3247
|
|
|
self.state = 451 |
|
3248
|
|
|
self._errHandler.sync(self) |
|
3249
|
|
|
_la = self._input.LA(1) |
|
3250
|
|
|
if not (_la==41 or _la==42): |
|
3251
|
|
|
break |
|
3252
|
|
|
|
|
3253
|
|
|
pass |
|
3254
|
|
|
|
|
3255
|
|
|
|
|
3256
|
|
|
self.state = 455 |
|
3257
|
|
|
self.match(PythonParser.IMPORT) |
|
3258
|
|
|
self.state = 462 |
|
3259
|
|
|
self._errHandler.sync(self) |
|
3260
|
|
|
token = self._input.LA(1) |
|
3261
|
|
|
if token in [44]: |
|
3262
|
|
|
self.state = 456 |
|
3263
|
|
|
self.match(PythonParser.STAR) |
|
3264
|
|
|
pass |
|
3265
|
|
|
elif token in [90]: |
|
3266
|
|
|
self.state = 457 |
|
3267
|
|
|
self.match(PythonParser.OPEN_PAREN) |
|
3268
|
|
|
self.state = 458 |
|
3269
|
|
|
self.import_as_names() |
|
3270
|
|
|
self.state = 459 |
|
3271
|
|
|
self.match(PythonParser.CLOSE_PAREN) |
|
3272
|
|
|
pass |
|
3273
|
|
|
elif token in [39, 40, 96]: |
|
3274
|
|
|
self.state = 461 |
|
3275
|
|
|
self.import_as_names() |
|
3276
|
|
|
pass |
|
3277
|
|
|
else: |
|
3278
|
|
|
raise NoViableAltException(self) |
|
3279
|
|
|
|
|
3280
|
|
|
pass |
|
3281
|
|
|
|
|
3282
|
|
|
elif la_ == 12: |
|
3283
|
|
|
localctx = PythonParser.Global_stmtContext(self, localctx) |
|
3284
|
|
|
self.enterOuterAlt(localctx, 12) |
|
3285
|
|
|
self.state = 464 |
|
3286
|
|
|
self.match(PythonParser.GLOBAL) |
|
3287
|
|
|
self.state = 465 |
|
3288
|
|
|
self.name() |
|
3289
|
|
|
self.state = 470 |
|
3290
|
|
|
self._errHandler.sync(self) |
|
3291
|
|
|
_la = self._input.LA(1) |
|
3292
|
|
|
while _la==45: |
|
3293
|
|
|
self.state = 466 |
|
3294
|
|
|
self.match(PythonParser.COMMA) |
|
3295
|
|
|
self.state = 467 |
|
3296
|
|
|
self.name() |
|
3297
|
|
|
self.state = 472 |
|
3298
|
|
|
self._errHandler.sync(self) |
|
3299
|
|
|
_la = self._input.LA(1) |
|
3300
|
|
|
|
|
3301
|
|
|
pass |
|
3302
|
|
|
|
|
3303
|
|
|
elif la_ == 13: |
|
3304
|
|
|
localctx = PythonParser.Exec_stmtContext(self, localctx) |
|
3305
|
|
|
self.enterOuterAlt(localctx, 13) |
|
3306
|
|
|
self.state = 473 |
|
3307
|
|
|
if not self.CheckVersion(2): |
|
3308
|
|
|
from antlr4.error.Errors import FailedPredicateException |
|
3309
|
|
|
raise FailedPredicateException(self, "self.CheckVersion(2)") |
|
3310
|
|
|
self.state = 474 |
|
3311
|
|
|
self.match(PythonParser.EXEC) |
|
3312
|
|
|
self.state = 475 |
|
3313
|
|
|
self.expr(0) |
|
3314
|
|
|
self.state = 482 |
|
3315
|
|
|
self._errHandler.sync(self) |
|
3316
|
|
|
_la = self._input.LA(1) |
|
3317
|
|
|
if _la==18: |
|
3318
|
|
|
self.state = 476 |
|
3319
|
|
|
self.match(PythonParser.IN) |
|
3320
|
|
|
self.state = 477 |
|
3321
|
|
|
self.test() |
|
3322
|
|
|
self.state = 480 |
|
3323
|
|
|
self._errHandler.sync(self) |
|
3324
|
|
|
_la = self._input.LA(1) |
|
3325
|
|
|
if _la==45: |
|
3326
|
|
|
self.state = 478 |
|
3327
|
|
|
self.match(PythonParser.COMMA) |
|
3328
|
|
|
self.state = 479 |
|
3329
|
|
|
self.test() |
|
3330
|
|
|
|
|
3331
|
|
|
|
|
3332
|
|
|
|
|
3333
|
|
|
|
|
3334
|
|
|
self.SetVersion(2); |
|
3335
|
|
|
pass |
|
3336
|
|
|
|
|
3337
|
|
|
elif la_ == 14: |
|
3338
|
|
|
localctx = PythonParser.Assert_stmtContext(self, localctx) |
|
3339
|
|
|
self.enterOuterAlt(localctx, 14) |
|
3340
|
|
|
self.state = 486 |
|
3341
|
|
|
self.match(PythonParser.ASSERT) |
|
3342
|
|
|
self.state = 487 |
|
3343
|
|
|
self.test() |
|
3344
|
|
|
self.state = 490 |
|
3345
|
|
|
self._errHandler.sync(self) |
|
3346
|
|
|
_la = self._input.LA(1) |
|
3347
|
|
|
if _la==45: |
|
3348
|
|
|
self.state = 488 |
|
3349
|
|
|
self.match(PythonParser.COMMA) |
|
3350
|
|
|
self.state = 489 |
|
3351
|
|
|
self.test() |
|
3352
|
|
|
|
|
3353
|
|
|
|
|
3354
|
|
|
pass |
|
3355
|
|
|
|
|
3356
|
|
|
elif la_ == 15: |
|
3357
|
|
|
localctx = PythonParser.Nonlocal_stmtContext(self, localctx) |
|
3358
|
|
|
self.enterOuterAlt(localctx, 15) |
|
3359
|
|
|
self.state = 492 |
|
3360
|
|
|
if not self.CheckVersion(3): |
|
3361
|
|
|
from antlr4.error.Errors import FailedPredicateException |
|
3362
|
|
|
raise FailedPredicateException(self, "self.CheckVersion(3)") |
|
3363
|
|
|
self.state = 493 |
|
3364
|
|
|
self.match(PythonParser.NONLOCAL) |
|
3365
|
|
|
self.state = 494 |
|
3366
|
|
|
self.name() |
|
3367
|
|
|
self.state = 499 |
|
3368
|
|
|
self._errHandler.sync(self) |
|
3369
|
|
|
_la = self._input.LA(1) |
|
3370
|
|
|
while _la==45: |
|
3371
|
|
|
self.state = 495 |
|
3372
|
|
|
self.match(PythonParser.COMMA) |
|
3373
|
|
|
self.state = 496 |
|
3374
|
|
|
self.name() |
|
3375
|
|
|
self.state = 501 |
|
3376
|
|
|
self._errHandler.sync(self) |
|
3377
|
|
|
_la = self._input.LA(1) |
|
3378
|
|
|
|
|
3379
|
|
|
self.SetVersion(3); |
|
3380
|
|
|
pass |
|
3381
|
|
|
|
|
3382
|
|
|
|
|
3383
|
|
|
except RecognitionException as re: |
|
3384
|
|
|
localctx.exception = re |
|
3385
|
|
|
self._errHandler.reportError(self, re) |
|
3386
|
|
|
self._errHandler.recover(self, re) |
|
3387
|
|
|
finally: |
|
3388
|
|
|
self.exitRule() |
|
3389
|
|
|
return localctx |
|
3390
|
|
|
|
|
3391
|
|
|
|
|
3392
|
|
|
class Testlist_star_exprContext(ParserRuleContext): |
|
3393
|
|
|
__slots__ = 'parser' |
|
3394
|
|
|
|
|
3395
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
3396
|
|
|
super().__init__(parent, invokingState) |
|
3397
|
|
|
self.parser = parser |
|
3398
|
|
|
|
|
3399
|
|
|
def COMMA(self, i:int=None): |
|
3400
|
|
|
if i is None: |
|
3401
|
|
|
return self.getTokens(PythonParser.COMMA) |
|
3402
|
|
|
else: |
|
3403
|
|
|
return self.getToken(PythonParser.COMMA, i) |
|
3404
|
|
|
|
|
3405
|
|
|
def test(self, i:int=None): |
|
3406
|
|
|
if i is None: |
|
3407
|
|
|
return self.getTypedRuleContexts(PythonParser.TestContext) |
|
3408
|
|
|
else: |
|
3409
|
|
|
return self.getTypedRuleContext(PythonParser.TestContext,i) |
|
3410
|
|
|
|
|
3411
|
|
|
|
|
3412
|
|
|
def star_expr(self, i:int=None): |
|
3413
|
|
|
if i is None: |
|
3414
|
|
|
return self.getTypedRuleContexts(PythonParser.Star_exprContext) |
|
3415
|
|
|
else: |
|
3416
|
|
|
return self.getTypedRuleContext(PythonParser.Star_exprContext,i) |
|
3417
|
|
|
|
|
3418
|
|
|
|
|
3419
|
|
|
def testlist(self): |
|
3420
|
|
|
return self.getTypedRuleContext(PythonParser.TestlistContext,0) |
|
3421
|
|
|
|
|
3422
|
|
|
|
|
3423
|
|
|
def getRuleIndex(self): |
|
3424
|
|
|
return PythonParser.RULE_testlist_star_expr |
|
3425
|
|
|
|
|
3426
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
3427
|
|
|
if hasattr( listener, "enterTestlist_star_expr" ): |
|
3428
|
|
|
listener.enterTestlist_star_expr(self) |
|
3429
|
|
|
|
|
3430
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
3431
|
|
|
if hasattr( listener, "exitTestlist_star_expr" ): |
|
3432
|
|
|
listener.exitTestlist_star_expr(self) |
|
3433
|
|
|
|
|
3434
|
|
|
|
|
3435
|
|
|
|
|
3436
|
|
|
|
|
3437
|
|
|
def testlist_star_expr(self): |
|
3438
|
|
|
|
|
3439
|
|
|
localctx = PythonParser.Testlist_star_exprContext(self, self._ctx, self.state) |
|
3440
|
|
|
self.enterRule(localctx, 46, self.RULE_testlist_star_expr) |
|
3441
|
|
|
try: |
|
3442
|
|
|
self.state = 521 |
|
3443
|
|
|
self._errHandler.sync(self) |
|
3444
|
|
|
la_ = self._interp.adaptivePredict(self._input,69,self._ctx) |
|
3445
|
|
|
if la_ == 1: |
|
3446
|
|
|
self.enterOuterAlt(localctx, 1) |
|
3447
|
|
|
self.state = 512 |
|
3448
|
|
|
self._errHandler.sync(self) |
|
3449
|
|
|
_alt = 1 |
|
3450
|
|
|
while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: |
|
3451
|
|
|
if _alt == 1: |
|
3452
|
|
|
self.state = 508 |
|
3453
|
|
|
self._errHandler.sync(self) |
|
3454
|
|
|
token = self._input.LA(1) |
|
3455
|
|
|
if token in [20, 24, 27, 36, 37, 38, 39, 40, 42, 43, 55, 56, 60, 83, 84, 85, 86, 87, 88, 89, 90, 92, 94, 96]: |
|
3456
|
|
|
self.state = 506 |
|
3457
|
|
|
self.test() |
|
3458
|
|
|
pass |
|
3459
|
|
|
elif token in [44]: |
|
3460
|
|
|
self.state = 507 |
|
3461
|
|
|
self.star_expr() |
|
3462
|
|
|
pass |
|
3463
|
|
|
else: |
|
3464
|
|
|
raise NoViableAltException(self) |
|
3465
|
|
|
|
|
3466
|
|
|
self.state = 510 |
|
3467
|
|
|
self.match(PythonParser.COMMA) |
|
3468
|
|
|
|
|
3469
|
|
|
else: |
|
3470
|
|
|
raise NoViableAltException(self) |
|
3471
|
|
|
self.state = 514 |
|
3472
|
|
|
self._errHandler.sync(self) |
|
3473
|
|
|
_alt = self._interp.adaptivePredict(self._input,67,self._ctx) |
|
3474
|
|
|
|
|
3475
|
|
|
self.state = 518 |
|
3476
|
|
|
self._errHandler.sync(self) |
|
3477
|
|
|
la_ = self._interp.adaptivePredict(self._input,68,self._ctx) |
|
3478
|
|
|
if la_ == 1: |
|
3479
|
|
|
self.state = 516 |
|
3480
|
|
|
self.test() |
|
3481
|
|
|
|
|
3482
|
|
|
elif la_ == 2: |
|
3483
|
|
|
self.state = 517 |
|
3484
|
|
|
self.star_expr() |
|
3485
|
|
|
|
|
3486
|
|
|
|
|
3487
|
|
|
pass |
|
3488
|
|
|
|
|
3489
|
|
|
elif la_ == 2: |
|
3490
|
|
|
self.enterOuterAlt(localctx, 2) |
|
3491
|
|
|
self.state = 520 |
|
3492
|
|
|
self.testlist() |
|
3493
|
|
|
pass |
|
3494
|
|
|
|
|
3495
|
|
|
|
|
3496
|
|
|
except RecognitionException as re: |
|
3497
|
|
|
localctx.exception = re |
|
3498
|
|
|
self._errHandler.reportError(self, re) |
|
3499
|
|
|
self._errHandler.recover(self, re) |
|
3500
|
|
|
finally: |
|
3501
|
|
|
self.exitRule() |
|
3502
|
|
|
return localctx |
|
3503
|
|
|
|
|
3504
|
|
|
|
|
3505
|
|
|
class Star_exprContext(ParserRuleContext): |
|
3506
|
|
|
__slots__ = 'parser' |
|
3507
|
|
|
|
|
3508
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
3509
|
|
|
super().__init__(parent, invokingState) |
|
3510
|
|
|
self.parser = parser |
|
3511
|
|
|
|
|
3512
|
|
|
def STAR(self): |
|
3513
|
|
|
return self.getToken(PythonParser.STAR, 0) |
|
3514
|
|
|
|
|
3515
|
|
|
def expr(self): |
|
3516
|
|
|
return self.getTypedRuleContext(PythonParser.ExprContext,0) |
|
3517
|
|
|
|
|
3518
|
|
|
|
|
3519
|
|
|
def getRuleIndex(self): |
|
3520
|
|
|
return PythonParser.RULE_star_expr |
|
3521
|
|
|
|
|
3522
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
3523
|
|
|
if hasattr( listener, "enterStar_expr" ): |
|
3524
|
|
|
listener.enterStar_expr(self) |
|
3525
|
|
|
|
|
3526
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
3527
|
|
|
if hasattr( listener, "exitStar_expr" ): |
|
3528
|
|
|
listener.exitStar_expr(self) |
|
3529
|
|
|
|
|
3530
|
|
|
|
|
3531
|
|
|
|
|
3532
|
|
|
|
|
3533
|
|
|
def star_expr(self): |
|
3534
|
|
|
|
|
3535
|
|
|
localctx = PythonParser.Star_exprContext(self, self._ctx, self.state) |
|
3536
|
|
|
self.enterRule(localctx, 48, self.RULE_star_expr) |
|
3537
|
|
|
try: |
|
3538
|
|
|
self.enterOuterAlt(localctx, 1) |
|
3539
|
|
|
self.state = 523 |
|
3540
|
|
|
self.match(PythonParser.STAR) |
|
3541
|
|
|
self.state = 524 |
|
3542
|
|
|
self.expr(0) |
|
3543
|
|
|
except RecognitionException as re: |
|
3544
|
|
|
localctx.exception = re |
|
3545
|
|
|
self._errHandler.reportError(self, re) |
|
3546
|
|
|
self._errHandler.recover(self, re) |
|
3547
|
|
|
finally: |
|
3548
|
|
|
self.exitRule() |
|
3549
|
|
|
return localctx |
|
3550
|
|
|
|
|
3551
|
|
|
|
|
3552
|
|
|
class Assign_partContext(ParserRuleContext): |
|
3553
|
|
|
__slots__ = 'parser' |
|
3554
|
|
|
|
|
3555
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
3556
|
|
|
super().__init__(parent, invokingState) |
|
3557
|
|
|
self.parser = parser |
|
3558
|
|
|
self.op = None # Token |
|
3559
|
|
|
|
|
3560
|
|
|
def ASSIGN(self, i:int=None): |
|
3561
|
|
|
if i is None: |
|
3562
|
|
|
return self.getTokens(PythonParser.ASSIGN) |
|
3563
|
|
|
else: |
|
3564
|
|
|
return self.getToken(PythonParser.ASSIGN, i) |
|
3565
|
|
|
|
|
3566
|
|
|
def testlist_star_expr(self, i:int=None): |
|
3567
|
|
|
if i is None: |
|
3568
|
|
|
return self.getTypedRuleContexts(PythonParser.Testlist_star_exprContext) |
|
3569
|
|
|
else: |
|
3570
|
|
|
return self.getTypedRuleContext(PythonParser.Testlist_star_exprContext,i) |
|
3571
|
|
|
|
|
3572
|
|
|
|
|
3573
|
|
|
def yield_expr(self): |
|
3574
|
|
|
return self.getTypedRuleContext(PythonParser.Yield_exprContext,0) |
|
3575
|
|
|
|
|
3576
|
|
|
|
|
3577
|
|
|
def COLON(self): |
|
3578
|
|
|
return self.getToken(PythonParser.COLON, 0) |
|
3579
|
|
|
|
|
3580
|
|
|
def test(self): |
|
3581
|
|
|
return self.getTypedRuleContext(PythonParser.TestContext,0) |
|
3582
|
|
|
|
|
3583
|
|
|
|
|
3584
|
|
|
def testlist(self): |
|
3585
|
|
|
return self.getTypedRuleContext(PythonParser.TestlistContext,0) |
|
3586
|
|
|
|
|
3587
|
|
|
|
|
3588
|
|
|
def ADD_ASSIGN(self): |
|
3589
|
|
|
return self.getToken(PythonParser.ADD_ASSIGN, 0) |
|
3590
|
|
|
|
|
3591
|
|
|
def SUB_ASSIGN(self): |
|
3592
|
|
|
return self.getToken(PythonParser.SUB_ASSIGN, 0) |
|
3593
|
|
|
|
|
3594
|
|
|
def MULT_ASSIGN(self): |
|
3595
|
|
|
return self.getToken(PythonParser.MULT_ASSIGN, 0) |
|
3596
|
|
|
|
|
3597
|
|
|
def AT_ASSIGN(self): |
|
3598
|
|
|
return self.getToken(PythonParser.AT_ASSIGN, 0) |
|
3599
|
|
|
|
|
3600
|
|
|
def DIV_ASSIGN(self): |
|
3601
|
|
|
return self.getToken(PythonParser.DIV_ASSIGN, 0) |
|
3602
|
|
|
|
|
3603
|
|
|
def MOD_ASSIGN(self): |
|
3604
|
|
|
return self.getToken(PythonParser.MOD_ASSIGN, 0) |
|
3605
|
|
|
|
|
3606
|
|
|
def AND_ASSIGN(self): |
|
3607
|
|
|
return self.getToken(PythonParser.AND_ASSIGN, 0) |
|
3608
|
|
|
|
|
3609
|
|
|
def OR_ASSIGN(self): |
|
3610
|
|
|
return self.getToken(PythonParser.OR_ASSIGN, 0) |
|
3611
|
|
|
|
|
3612
|
|
|
def XOR_ASSIGN(self): |
|
3613
|
|
|
return self.getToken(PythonParser.XOR_ASSIGN, 0) |
|
3614
|
|
|
|
|
3615
|
|
|
def LEFT_SHIFT_ASSIGN(self): |
|
3616
|
|
|
return self.getToken(PythonParser.LEFT_SHIFT_ASSIGN, 0) |
|
3617
|
|
|
|
|
3618
|
|
|
def RIGHT_SHIFT_ASSIGN(self): |
|
3619
|
|
|
return self.getToken(PythonParser.RIGHT_SHIFT_ASSIGN, 0) |
|
3620
|
|
|
|
|
3621
|
|
|
def POWER_ASSIGN(self): |
|
3622
|
|
|
return self.getToken(PythonParser.POWER_ASSIGN, 0) |
|
3623
|
|
|
|
|
3624
|
|
|
def IDIV_ASSIGN(self): |
|
3625
|
|
|
return self.getToken(PythonParser.IDIV_ASSIGN, 0) |
|
3626
|
|
|
|
|
3627
|
|
|
def getRuleIndex(self): |
|
3628
|
|
|
return PythonParser.RULE_assign_part |
|
3629
|
|
|
|
|
3630
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
3631
|
|
|
if hasattr( listener, "enterAssign_part" ): |
|
3632
|
|
|
listener.enterAssign_part(self) |
|
3633
|
|
|
|
|
3634
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
3635
|
|
|
if hasattr( listener, "exitAssign_part" ): |
|
3636
|
|
|
listener.exitAssign_part(self) |
|
3637
|
|
|
|
|
3638
|
|
|
|
|
3639
|
|
|
|
|
3640
|
|
|
|
|
3641
|
|
|
def assign_part(self): |
|
3642
|
|
|
|
|
3643
|
|
|
localctx = PythonParser.Assign_partContext(self, self._ctx, self.state) |
|
3644
|
|
|
self.enterRule(localctx, 50, self.RULE_assign_part) |
|
3645
|
|
|
self._la = 0 # Token type |
|
3646
|
|
|
try: |
|
3647
|
|
|
self.state = 556 |
|
3648
|
|
|
self._errHandler.sync(self) |
|
3649
|
|
|
la_ = self._interp.adaptivePredict(self._input,75,self._ctx) |
|
3650
|
|
|
if la_ == 1: |
|
3651
|
|
|
self.enterOuterAlt(localctx, 1) |
|
3652
|
|
|
self.state = 526 |
|
3653
|
|
|
self.match(PythonParser.ASSIGN) |
|
3654
|
|
|
self.state = 540 |
|
3655
|
|
|
self._errHandler.sync(self) |
|
3656
|
|
|
token = self._input.LA(1) |
|
3657
|
|
|
if token in [20, 24, 27, 36, 37, 38, 39, 40, 42, 43, 44, 55, 56, 60, 83, 84, 85, 86, 87, 88, 89, 90, 92, 94, 96]: |
|
3658
|
|
|
self.state = 527 |
|
3659
|
|
|
self.testlist_star_expr() |
|
3660
|
|
|
self.state = 532 |
|
3661
|
|
|
self._errHandler.sync(self) |
|
3662
|
|
|
_alt = self._interp.adaptivePredict(self._input,70,self._ctx) |
|
3663
|
|
|
while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: |
|
3664
|
|
|
if _alt==1: |
|
3665
|
|
|
self.state = 528 |
|
3666
|
|
|
self.match(PythonParser.ASSIGN) |
|
3667
|
|
|
self.state = 529 |
|
3668
|
|
|
self.testlist_star_expr() |
|
3669
|
|
|
self.state = 534 |
|
3670
|
|
|
self._errHandler.sync(self) |
|
3671
|
|
|
_alt = self._interp.adaptivePredict(self._input,70,self._ctx) |
|
3672
|
|
|
|
|
3673
|
|
|
self.state = 537 |
|
3674
|
|
|
self._errHandler.sync(self) |
|
3675
|
|
|
_la = self._input.LA(1) |
|
3676
|
|
|
if _la==49: |
|
3677
|
|
|
self.state = 535 |
|
3678
|
|
|
self.match(PythonParser.ASSIGN) |
|
3679
|
|
|
self.state = 536 |
|
3680
|
|
|
self.yield_expr() |
|
3681
|
|
|
|
|
3682
|
|
|
|
|
3683
|
|
|
pass |
|
3684
|
|
|
elif token in [30]: |
|
3685
|
|
|
self.state = 539 |
|
3686
|
|
|
self.yield_expr() |
|
3687
|
|
|
pass |
|
3688
|
|
|
else: |
|
3689
|
|
|
raise NoViableAltException(self) |
|
3690
|
|
|
|
|
3691
|
|
|
pass |
|
3692
|
|
|
|
|
3693
|
|
|
elif la_ == 2: |
|
3694
|
|
|
self.enterOuterAlt(localctx, 2) |
|
3695
|
|
|
self.state = 542 |
|
3696
|
|
|
if not self.CheckVersion(3): |
|
3697
|
|
|
from antlr4.error.Errors import FailedPredicateException |
|
3698
|
|
|
raise FailedPredicateException(self, "self.CheckVersion(3)") |
|
3699
|
|
|
self.state = 543 |
|
3700
|
|
|
self.match(PythonParser.COLON) |
|
3701
|
|
|
self.state = 544 |
|
3702
|
|
|
self.test() |
|
3703
|
|
|
self.state = 547 |
|
3704
|
|
|
self._errHandler.sync(self) |
|
3705
|
|
|
_la = self._input.LA(1) |
|
3706
|
|
|
if _la==49: |
|
3707
|
|
|
self.state = 545 |
|
3708
|
|
|
self.match(PythonParser.ASSIGN) |
|
3709
|
|
|
self.state = 546 |
|
3710
|
|
|
self.testlist() |
|
3711
|
|
|
|
|
3712
|
|
|
|
|
3713
|
|
|
self.SetVersion(3); |
|
3714
|
|
|
pass |
|
3715
|
|
|
|
|
3716
|
|
|
elif la_ == 3: |
|
3717
|
|
|
self.enterOuterAlt(localctx, 3) |
|
3718
|
|
|
self.state = 551 |
|
3719
|
|
|
localctx.op = self._input.LT(1) |
|
3720
|
|
|
_la = self._input.LA(1) |
|
3721
|
|
|
if not(((((_la - 70)) & ~0x3f) == 0 and ((1 << (_la - 70)) & 8191) != 0)): |
|
3722
|
|
|
localctx.op = self._errHandler.recoverInline(self) |
|
3723
|
|
|
else: |
|
3724
|
|
|
self._errHandler.reportMatch(self) |
|
3725
|
|
|
self.consume() |
|
3726
|
|
|
self.state = 554 |
|
3727
|
|
|
self._errHandler.sync(self) |
|
3728
|
|
|
token = self._input.LA(1) |
|
3729
|
|
|
if token in [30]: |
|
3730
|
|
|
self.state = 552 |
|
3731
|
|
|
self.yield_expr() |
|
3732
|
|
|
pass |
|
3733
|
|
|
elif token in [20, 24, 27, 36, 37, 38, 39, 40, 42, 43, 55, 56, 60, 83, 84, 85, 86, 87, 88, 89, 90, 92, 94, 96]: |
|
3734
|
|
|
self.state = 553 |
|
3735
|
|
|
self.testlist() |
|
3736
|
|
|
pass |
|
3737
|
|
|
else: |
|
3738
|
|
|
raise NoViableAltException(self) |
|
3739
|
|
|
|
|
3740
|
|
|
pass |
|
3741
|
|
|
|
|
3742
|
|
|
|
|
3743
|
|
|
except RecognitionException as re: |
|
3744
|
|
|
localctx.exception = re |
|
3745
|
|
|
self._errHandler.reportError(self, re) |
|
3746
|
|
|
self._errHandler.recover(self, re) |
|
3747
|
|
|
finally: |
|
3748
|
|
|
self.exitRule() |
|
3749
|
|
|
return localctx |
|
3750
|
|
|
|
|
3751
|
|
|
|
|
3752
|
|
|
class ExprlistContext(ParserRuleContext): |
|
3753
|
|
|
__slots__ = 'parser' |
|
3754
|
|
|
|
|
3755
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
3756
|
|
|
super().__init__(parent, invokingState) |
|
3757
|
|
|
self.parser = parser |
|
3758
|
|
|
|
|
3759
|
|
|
def expr(self, i:int=None): |
|
3760
|
|
|
if i is None: |
|
3761
|
|
|
return self.getTypedRuleContexts(PythonParser.ExprContext) |
|
3762
|
|
|
else: |
|
3763
|
|
|
return self.getTypedRuleContext(PythonParser.ExprContext,i) |
|
3764
|
|
|
|
|
3765
|
|
|
|
|
3766
|
|
|
def COMMA(self, i:int=None): |
|
3767
|
|
|
if i is None: |
|
3768
|
|
|
return self.getTokens(PythonParser.COMMA) |
|
3769
|
|
|
else: |
|
3770
|
|
|
return self.getToken(PythonParser.COMMA, i) |
|
3771
|
|
|
|
|
3772
|
|
|
def getRuleIndex(self): |
|
3773
|
|
|
return PythonParser.RULE_exprlist |
|
3774
|
|
|
|
|
3775
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
3776
|
|
|
if hasattr( listener, "enterExprlist" ): |
|
3777
|
|
|
listener.enterExprlist(self) |
|
3778
|
|
|
|
|
3779
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
3780
|
|
|
if hasattr( listener, "exitExprlist" ): |
|
3781
|
|
|
listener.exitExprlist(self) |
|
3782
|
|
|
|
|
3783
|
|
|
|
|
3784
|
|
|
|
|
3785
|
|
|
|
|
3786
|
|
|
def exprlist(self): |
|
3787
|
|
|
|
|
3788
|
|
|
localctx = PythonParser.ExprlistContext(self, self._ctx, self.state) |
|
3789
|
|
|
self.enterRule(localctx, 52, self.RULE_exprlist) |
|
3790
|
|
|
self._la = 0 # Token type |
|
3791
|
|
|
try: |
|
3792
|
|
|
self.enterOuterAlt(localctx, 1) |
|
3793
|
|
|
self.state = 558 |
|
3794
|
|
|
self.expr(0) |
|
3795
|
|
|
self.state = 563 |
|
3796
|
|
|
self._errHandler.sync(self) |
|
3797
|
|
|
_alt = self._interp.adaptivePredict(self._input,76,self._ctx) |
|
3798
|
|
|
while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: |
|
3799
|
|
|
if _alt==1: |
|
3800
|
|
|
self.state = 559 |
|
3801
|
|
|
self.match(PythonParser.COMMA) |
|
3802
|
|
|
self.state = 560 |
|
3803
|
|
|
self.expr(0) |
|
3804
|
|
|
self.state = 565 |
|
3805
|
|
|
self._errHandler.sync(self) |
|
3806
|
|
|
_alt = self._interp.adaptivePredict(self._input,76,self._ctx) |
|
3807
|
|
|
|
|
3808
|
|
|
self.state = 567 |
|
3809
|
|
|
self._errHandler.sync(self) |
|
3810
|
|
|
_la = self._input.LA(1) |
|
3811
|
|
|
if _la==45: |
|
3812
|
|
|
self.state = 566 |
|
3813
|
|
|
self.match(PythonParser.COMMA) |
|
3814
|
|
|
|
|
3815
|
|
|
|
|
3816
|
|
|
except RecognitionException as re: |
|
3817
|
|
|
localctx.exception = re |
|
3818
|
|
|
self._errHandler.reportError(self, re) |
|
3819
|
|
|
self._errHandler.recover(self, re) |
|
3820
|
|
|
finally: |
|
3821
|
|
|
self.exitRule() |
|
3822
|
|
|
return localctx |
|
3823
|
|
|
|
|
3824
|
|
|
|
|
3825
|
|
|
class Import_as_namesContext(ParserRuleContext): |
|
3826
|
|
|
__slots__ = 'parser' |
|
3827
|
|
|
|
|
3828
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
3829
|
|
|
super().__init__(parent, invokingState) |
|
3830
|
|
|
self.parser = parser |
|
3831
|
|
|
|
|
3832
|
|
|
def import_as_name(self, i:int=None): |
|
3833
|
|
|
if i is None: |
|
3834
|
|
|
return self.getTypedRuleContexts(PythonParser.Import_as_nameContext) |
|
3835
|
|
|
else: |
|
3836
|
|
|
return self.getTypedRuleContext(PythonParser.Import_as_nameContext,i) |
|
3837
|
|
|
|
|
3838
|
|
|
|
|
3839
|
|
|
def COMMA(self, i:int=None): |
|
3840
|
|
|
if i is None: |
|
3841
|
|
|
return self.getTokens(PythonParser.COMMA) |
|
3842
|
|
|
else: |
|
3843
|
|
|
return self.getToken(PythonParser.COMMA, i) |
|
3844
|
|
|
|
|
3845
|
|
|
def getRuleIndex(self): |
|
3846
|
|
|
return PythonParser.RULE_import_as_names |
|
3847
|
|
|
|
|
3848
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
3849
|
|
|
if hasattr( listener, "enterImport_as_names" ): |
|
3850
|
|
|
listener.enterImport_as_names(self) |
|
3851
|
|
|
|
|
3852
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
3853
|
|
|
if hasattr( listener, "exitImport_as_names" ): |
|
3854
|
|
|
listener.exitImport_as_names(self) |
|
3855
|
|
|
|
|
3856
|
|
|
|
|
3857
|
|
|
|
|
3858
|
|
|
|
|
3859
|
|
|
def import_as_names(self): |
|
3860
|
|
|
|
|
3861
|
|
|
localctx = PythonParser.Import_as_namesContext(self, self._ctx, self.state) |
|
3862
|
|
|
self.enterRule(localctx, 54, self.RULE_import_as_names) |
|
3863
|
|
|
self._la = 0 # Token type |
|
3864
|
|
|
try: |
|
3865
|
|
|
self.enterOuterAlt(localctx, 1) |
|
3866
|
|
|
self.state = 569 |
|
3867
|
|
|
self.import_as_name() |
|
3868
|
|
|
self.state = 574 |
|
3869
|
|
|
self._errHandler.sync(self) |
|
3870
|
|
|
_alt = self._interp.adaptivePredict(self._input,78,self._ctx) |
|
3871
|
|
|
while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: |
|
3872
|
|
|
if _alt==1: |
|
3873
|
|
|
self.state = 570 |
|
3874
|
|
|
self.match(PythonParser.COMMA) |
|
3875
|
|
|
self.state = 571 |
|
3876
|
|
|
self.import_as_name() |
|
3877
|
|
|
self.state = 576 |
|
3878
|
|
|
self._errHandler.sync(self) |
|
3879
|
|
|
_alt = self._interp.adaptivePredict(self._input,78,self._ctx) |
|
3880
|
|
|
|
|
3881
|
|
|
self.state = 578 |
|
3882
|
|
|
self._errHandler.sync(self) |
|
3883
|
|
|
_la = self._input.LA(1) |
|
3884
|
|
|
if _la==45: |
|
3885
|
|
|
self.state = 577 |
|
3886
|
|
|
self.match(PythonParser.COMMA) |
|
3887
|
|
|
|
|
3888
|
|
|
|
|
3889
|
|
|
except RecognitionException as re: |
|
3890
|
|
|
localctx.exception = re |
|
3891
|
|
|
self._errHandler.reportError(self, re) |
|
3892
|
|
|
self._errHandler.recover(self, re) |
|
3893
|
|
|
finally: |
|
3894
|
|
|
self.exitRule() |
|
3895
|
|
|
return localctx |
|
3896
|
|
|
|
|
3897
|
|
|
|
|
3898
|
|
|
class Import_as_nameContext(ParserRuleContext): |
|
3899
|
|
|
__slots__ = 'parser' |
|
3900
|
|
|
|
|
3901
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
3902
|
|
|
super().__init__(parent, invokingState) |
|
3903
|
|
|
self.parser = parser |
|
3904
|
|
|
|
|
3905
|
|
|
def name(self, i:int=None): |
|
3906
|
|
|
if i is None: |
|
3907
|
|
|
return self.getTypedRuleContexts(PythonParser.NameContext) |
|
3908
|
|
|
else: |
|
3909
|
|
|
return self.getTypedRuleContext(PythonParser.NameContext,i) |
|
3910
|
|
|
|
|
3911
|
|
|
|
|
3912
|
|
|
def AS(self): |
|
3913
|
|
|
return self.getToken(PythonParser.AS, 0) |
|
3914
|
|
|
|
|
3915
|
|
|
def getRuleIndex(self): |
|
3916
|
|
|
return PythonParser.RULE_import_as_name |
|
3917
|
|
|
|
|
3918
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
3919
|
|
|
if hasattr( listener, "enterImport_as_name" ): |
|
3920
|
|
|
listener.enterImport_as_name(self) |
|
3921
|
|
|
|
|
3922
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
3923
|
|
|
if hasattr( listener, "exitImport_as_name" ): |
|
3924
|
|
|
listener.exitImport_as_name(self) |
|
3925
|
|
|
|
|
3926
|
|
|
|
|
3927
|
|
|
|
|
3928
|
|
|
|
|
3929
|
|
|
def import_as_name(self): |
|
3930
|
|
|
|
|
3931
|
|
|
localctx = PythonParser.Import_as_nameContext(self, self._ctx, self.state) |
|
3932
|
|
|
self.enterRule(localctx, 56, self.RULE_import_as_name) |
|
3933
|
|
|
self._la = 0 # Token type |
|
3934
|
|
|
try: |
|
3935
|
|
|
self.enterOuterAlt(localctx, 1) |
|
3936
|
|
|
self.state = 580 |
|
3937
|
|
|
self.name() |
|
3938
|
|
|
self.state = 583 |
|
3939
|
|
|
self._errHandler.sync(self) |
|
3940
|
|
|
_la = self._input.LA(1) |
|
3941
|
|
|
if _la==10: |
|
3942
|
|
|
self.state = 581 |
|
3943
|
|
|
self.match(PythonParser.AS) |
|
3944
|
|
|
self.state = 582 |
|
3945
|
|
|
self.name() |
|
3946
|
|
|
|
|
3947
|
|
|
|
|
3948
|
|
|
except RecognitionException as re: |
|
3949
|
|
|
localctx.exception = re |
|
3950
|
|
|
self._errHandler.reportError(self, re) |
|
3951
|
|
|
self._errHandler.recover(self, re) |
|
3952
|
|
|
finally: |
|
3953
|
|
|
self.exitRule() |
|
3954
|
|
|
return localctx |
|
3955
|
|
|
|
|
3956
|
|
|
|
|
3957
|
|
|
class Dotted_as_namesContext(ParserRuleContext): |
|
3958
|
|
|
__slots__ = 'parser' |
|
3959
|
|
|
|
|
3960
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
3961
|
|
|
super().__init__(parent, invokingState) |
|
3962
|
|
|
self.parser = parser |
|
3963
|
|
|
|
|
3964
|
|
|
def dotted_as_name(self, i:int=None): |
|
3965
|
|
|
if i is None: |
|
3966
|
|
|
return self.getTypedRuleContexts(PythonParser.Dotted_as_nameContext) |
|
3967
|
|
|
else: |
|
3968
|
|
|
return self.getTypedRuleContext(PythonParser.Dotted_as_nameContext,i) |
|
3969
|
|
|
|
|
3970
|
|
|
|
|
3971
|
|
|
def COMMA(self, i:int=None): |
|
3972
|
|
|
if i is None: |
|
3973
|
|
|
return self.getTokens(PythonParser.COMMA) |
|
3974
|
|
|
else: |
|
3975
|
|
|
return self.getToken(PythonParser.COMMA, i) |
|
3976
|
|
|
|
|
3977
|
|
|
def getRuleIndex(self): |
|
3978
|
|
|
return PythonParser.RULE_dotted_as_names |
|
3979
|
|
|
|
|
3980
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
3981
|
|
|
if hasattr( listener, "enterDotted_as_names" ): |
|
3982
|
|
|
listener.enterDotted_as_names(self) |
|
3983
|
|
|
|
|
3984
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
3985
|
|
|
if hasattr( listener, "exitDotted_as_names" ): |
|
3986
|
|
|
listener.exitDotted_as_names(self) |
|
3987
|
|
|
|
|
3988
|
|
|
|
|
3989
|
|
|
|
|
3990
|
|
|
|
|
3991
|
|
|
def dotted_as_names(self): |
|
3992
|
|
|
|
|
3993
|
|
|
localctx = PythonParser.Dotted_as_namesContext(self, self._ctx, self.state) |
|
3994
|
|
|
self.enterRule(localctx, 58, self.RULE_dotted_as_names) |
|
3995
|
|
|
self._la = 0 # Token type |
|
3996
|
|
|
try: |
|
3997
|
|
|
self.enterOuterAlt(localctx, 1) |
|
3998
|
|
|
self.state = 585 |
|
3999
|
|
|
self.dotted_as_name() |
|
4000
|
|
|
self.state = 590 |
|
4001
|
|
|
self._errHandler.sync(self) |
|
4002
|
|
|
_la = self._input.LA(1) |
|
4003
|
|
|
while _la==45: |
|
4004
|
|
|
self.state = 586 |
|
4005
|
|
|
self.match(PythonParser.COMMA) |
|
4006
|
|
|
self.state = 587 |
|
4007
|
|
|
self.dotted_as_name() |
|
4008
|
|
|
self.state = 592 |
|
4009
|
|
|
self._errHandler.sync(self) |
|
4010
|
|
|
_la = self._input.LA(1) |
|
4011
|
|
|
|
|
4012
|
|
|
except RecognitionException as re: |
|
4013
|
|
|
localctx.exception = re |
|
4014
|
|
|
self._errHandler.reportError(self, re) |
|
4015
|
|
|
self._errHandler.recover(self, re) |
|
4016
|
|
|
finally: |
|
4017
|
|
|
self.exitRule() |
|
4018
|
|
|
return localctx |
|
4019
|
|
|
|
|
4020
|
|
|
|
|
4021
|
|
|
class Dotted_as_nameContext(ParserRuleContext): |
|
4022
|
|
|
__slots__ = 'parser' |
|
4023
|
|
|
|
|
4024
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
4025
|
|
|
super().__init__(parent, invokingState) |
|
4026
|
|
|
self.parser = parser |
|
4027
|
|
|
|
|
4028
|
|
|
def dotted_name(self): |
|
4029
|
|
|
return self.getTypedRuleContext(PythonParser.Dotted_nameContext,0) |
|
4030
|
|
|
|
|
4031
|
|
|
|
|
4032
|
|
|
def AS(self): |
|
4033
|
|
|
return self.getToken(PythonParser.AS, 0) |
|
4034
|
|
|
|
|
4035
|
|
|
def name(self): |
|
4036
|
|
|
return self.getTypedRuleContext(PythonParser.NameContext,0) |
|
4037
|
|
|
|
|
4038
|
|
|
|
|
4039
|
|
|
def getRuleIndex(self): |
|
4040
|
|
|
return PythonParser.RULE_dotted_as_name |
|
4041
|
|
|
|
|
4042
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
4043
|
|
|
if hasattr( listener, "enterDotted_as_name" ): |
|
4044
|
|
|
listener.enterDotted_as_name(self) |
|
4045
|
|
|
|
|
4046
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
4047
|
|
|
if hasattr( listener, "exitDotted_as_name" ): |
|
4048
|
|
|
listener.exitDotted_as_name(self) |
|
4049
|
|
|
|
|
4050
|
|
|
|
|
4051
|
|
|
|
|
4052
|
|
|
|
|
4053
|
|
|
def dotted_as_name(self): |
|
4054
|
|
|
|
|
4055
|
|
|
localctx = PythonParser.Dotted_as_nameContext(self, self._ctx, self.state) |
|
4056
|
|
|
self.enterRule(localctx, 60, self.RULE_dotted_as_name) |
|
4057
|
|
|
self._la = 0 # Token type |
|
4058
|
|
|
try: |
|
4059
|
|
|
self.enterOuterAlt(localctx, 1) |
|
4060
|
|
|
self.state = 593 |
|
4061
|
|
|
self.dotted_name(0) |
|
4062
|
|
|
self.state = 596 |
|
4063
|
|
|
self._errHandler.sync(self) |
|
4064
|
|
|
_la = self._input.LA(1) |
|
4065
|
|
|
if _la==10: |
|
4066
|
|
|
self.state = 594 |
|
4067
|
|
|
self.match(PythonParser.AS) |
|
4068
|
|
|
self.state = 595 |
|
4069
|
|
|
self.name() |
|
4070
|
|
|
|
|
4071
|
|
|
|
|
4072
|
|
|
except RecognitionException as re: |
|
4073
|
|
|
localctx.exception = re |
|
4074
|
|
|
self._errHandler.reportError(self, re) |
|
4075
|
|
|
self._errHandler.recover(self, re) |
|
4076
|
|
|
finally: |
|
4077
|
|
|
self.exitRule() |
|
4078
|
|
|
return localctx |
|
4079
|
|
|
|
|
4080
|
|
|
|
|
4081
|
|
|
class TestContext(ParserRuleContext): |
|
4082
|
|
|
__slots__ = 'parser' |
|
4083
|
|
|
|
|
4084
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
4085
|
|
|
super().__init__(parent, invokingState) |
|
4086
|
|
|
self.parser = parser |
|
4087
|
|
|
|
|
4088
|
|
|
def logical_test(self, i:int=None): |
|
4089
|
|
|
if i is None: |
|
4090
|
|
|
return self.getTypedRuleContexts(PythonParser.Logical_testContext) |
|
4091
|
|
|
else: |
|
4092
|
|
|
return self.getTypedRuleContext(PythonParser.Logical_testContext,i) |
|
4093
|
|
|
|
|
4094
|
|
|
|
|
4095
|
|
|
def IF(self): |
|
4096
|
|
|
return self.getToken(PythonParser.IF, 0) |
|
4097
|
|
|
|
|
4098
|
|
|
def ELSE(self): |
|
4099
|
|
|
return self.getToken(PythonParser.ELSE, 0) |
|
4100
|
|
|
|
|
4101
|
|
|
def test(self): |
|
4102
|
|
|
return self.getTypedRuleContext(PythonParser.TestContext,0) |
|
4103
|
|
|
|
|
4104
|
|
|
|
|
4105
|
|
|
def LAMBDA(self): |
|
4106
|
|
|
return self.getToken(PythonParser.LAMBDA, 0) |
|
4107
|
|
|
|
|
4108
|
|
|
def COLON(self): |
|
4109
|
|
|
return self.getToken(PythonParser.COLON, 0) |
|
4110
|
|
|
|
|
4111
|
|
|
def varargslist(self): |
|
4112
|
|
|
return self.getTypedRuleContext(PythonParser.VarargslistContext,0) |
|
4113
|
|
|
|
|
4114
|
|
|
|
|
4115
|
|
|
def getRuleIndex(self): |
|
4116
|
|
|
return PythonParser.RULE_test |
|
4117
|
|
|
|
|
4118
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
4119
|
|
|
if hasattr( listener, "enterTest" ): |
|
4120
|
|
|
listener.enterTest(self) |
|
4121
|
|
|
|
|
4122
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
4123
|
|
|
if hasattr( listener, "exitTest" ): |
|
4124
|
|
|
listener.exitTest(self) |
|
4125
|
|
|
|
|
4126
|
|
|
|
|
4127
|
|
|
|
|
4128
|
|
|
|
|
4129
|
|
|
def test(self): |
|
4130
|
|
|
|
|
4131
|
|
|
localctx = PythonParser.TestContext(self, self._ctx, self.state) |
|
4132
|
|
|
self.enterRule(localctx, 62, self.RULE_test) |
|
4133
|
|
|
self._la = 0 # Token type |
|
4134
|
|
|
try: |
|
4135
|
|
|
self.state = 612 |
|
4136
|
|
|
self._errHandler.sync(self) |
|
4137
|
|
|
token = self._input.LA(1) |
|
4138
|
|
|
if token in [20, 27, 36, 37, 38, 39, 40, 42, 43, 55, 56, 60, 83, 84, 85, 86, 87, 88, 89, 90, 92, 94, 96]: |
|
4139
|
|
|
self.enterOuterAlt(localctx, 1) |
|
4140
|
|
|
self.state = 598 |
|
4141
|
|
|
self.logical_test(0) |
|
4142
|
|
|
self.state = 604 |
|
4143
|
|
|
self._errHandler.sync(self) |
|
4144
|
|
|
la_ = self._interp.adaptivePredict(self._input,83,self._ctx) |
|
4145
|
|
|
if la_ == 1: |
|
4146
|
|
|
self.state = 599 |
|
4147
|
|
|
self.match(PythonParser.IF) |
|
4148
|
|
|
self.state = 600 |
|
4149
|
|
|
self.logical_test(0) |
|
4150
|
|
|
self.state = 601 |
|
4151
|
|
|
self.match(PythonParser.ELSE) |
|
4152
|
|
|
self.state = 602 |
|
4153
|
|
|
self.test() |
|
4154
|
|
|
|
|
4155
|
|
|
|
|
4156
|
|
|
pass |
|
4157
|
|
|
elif token in [24]: |
|
4158
|
|
|
self.enterOuterAlt(localctx, 2) |
|
4159
|
|
|
self.state = 606 |
|
4160
|
|
|
self.match(PythonParser.LAMBDA) |
|
4161
|
|
|
self.state = 608 |
|
4162
|
|
|
self._errHandler.sync(self) |
|
4163
|
|
|
_la = self._input.LA(1) |
|
4164
|
|
|
if ((((_la - 39)) & ~0x3f) == 0 and ((1 << (_la - 39)) & 144115188075856419) != 0): |
|
4165
|
|
|
self.state = 607 |
|
4166
|
|
|
self.varargslist() |
|
4167
|
|
|
|
|
4168
|
|
|
|
|
4169
|
|
|
self.state = 610 |
|
4170
|
|
|
self.match(PythonParser.COLON) |
|
4171
|
|
|
self.state = 611 |
|
4172
|
|
|
self.test() |
|
4173
|
|
|
pass |
|
4174
|
|
|
else: |
|
4175
|
|
|
raise NoViableAltException(self) |
|
4176
|
|
|
|
|
4177
|
|
|
except RecognitionException as re: |
|
4178
|
|
|
localctx.exception = re |
|
4179
|
|
|
self._errHandler.reportError(self, re) |
|
4180
|
|
|
self._errHandler.recover(self, re) |
|
4181
|
|
|
finally: |
|
4182
|
|
|
self.exitRule() |
|
4183
|
|
|
return localctx |
|
4184
|
|
|
|
|
4185
|
|
|
|
|
4186
|
|
|
class VarargslistContext(ParserRuleContext): |
|
4187
|
|
|
__slots__ = 'parser' |
|
4188
|
|
|
|
|
4189
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
4190
|
|
|
super().__init__(parent, invokingState) |
|
4191
|
|
|
self.parser = parser |
|
4192
|
|
|
|
|
4193
|
|
|
def varargs(self): |
|
4194
|
|
|
return self.getTypedRuleContext(PythonParser.VarargsContext,0) |
|
4195
|
|
|
|
|
4196
|
|
|
|
|
4197
|
|
|
def varkwargs(self): |
|
4198
|
|
|
return self.getTypedRuleContext(PythonParser.VarkwargsContext,0) |
|
4199
|
|
|
|
|
4200
|
|
|
|
|
4201
|
|
|
def vardef_parameters(self, i:int=None): |
|
4202
|
|
|
if i is None: |
|
4203
|
|
|
return self.getTypedRuleContexts(PythonParser.Vardef_parametersContext) |
|
4204
|
|
|
else: |
|
4205
|
|
|
return self.getTypedRuleContext(PythonParser.Vardef_parametersContext,i) |
|
4206
|
|
|
|
|
4207
|
|
|
|
|
4208
|
|
|
def COMMA(self, i:int=None): |
|
4209
|
|
|
if i is None: |
|
4210
|
|
|
return self.getTokens(PythonParser.COMMA) |
|
4211
|
|
|
else: |
|
4212
|
|
|
return self.getToken(PythonParser.COMMA, i) |
|
4213
|
|
|
|
|
4214
|
|
|
def getRuleIndex(self): |
|
4215
|
|
|
return PythonParser.RULE_varargslist |
|
4216
|
|
|
|
|
4217
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
4218
|
|
|
if hasattr( listener, "enterVarargslist" ): |
|
4219
|
|
|
listener.enterVarargslist(self) |
|
4220
|
|
|
|
|
4221
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
4222
|
|
|
if hasattr( listener, "exitVarargslist" ): |
|
4223
|
|
|
listener.exitVarargslist(self) |
|
4224
|
|
|
|
|
4225
|
|
|
|
|
4226
|
|
|
|
|
4227
|
|
|
|
|
4228
|
|
|
def varargslist(self): |
|
4229
|
|
|
|
|
4230
|
|
|
localctx = PythonParser.VarargslistContext(self, self._ctx, self.state) |
|
4231
|
|
|
self.enterRule(localctx, 64, self.RULE_varargslist) |
|
4232
|
|
|
self._la = 0 # Token type |
|
4233
|
|
|
try: |
|
4234
|
|
|
self.state = 638 |
|
4235
|
|
|
self._errHandler.sync(self) |
|
4236
|
|
|
la_ = self._interp.adaptivePredict(self._input,92,self._ctx) |
|
4237
|
|
|
if la_ == 1: |
|
4238
|
|
|
self.enterOuterAlt(localctx, 1) |
|
4239
|
|
|
self.state = 617 |
|
4240
|
|
|
self._errHandler.sync(self) |
|
4241
|
|
|
la_ = self._interp.adaptivePredict(self._input,86,self._ctx) |
|
4242
|
|
|
if la_ == 1: |
|
4243
|
|
|
self.state = 614 |
|
4244
|
|
|
self.vardef_parameters() |
|
4245
|
|
|
self.state = 615 |
|
4246
|
|
|
self.match(PythonParser.COMMA) |
|
4247
|
|
|
|
|
4248
|
|
|
|
|
4249
|
|
|
self.state = 629 |
|
4250
|
|
|
self._errHandler.sync(self) |
|
4251
|
|
|
token = self._input.LA(1) |
|
4252
|
|
|
if token in [44]: |
|
4253
|
|
|
self.state = 619 |
|
4254
|
|
|
self.varargs() |
|
4255
|
|
|
self.state = 622 |
|
4256
|
|
|
self._errHandler.sync(self) |
|
4257
|
|
|
la_ = self._interp.adaptivePredict(self._input,87,self._ctx) |
|
4258
|
|
|
if la_ == 1: |
|
4259
|
|
|
self.state = 620 |
|
4260
|
|
|
self.match(PythonParser.COMMA) |
|
4261
|
|
|
self.state = 621 |
|
4262
|
|
|
self.vardef_parameters() |
|
4263
|
|
|
|
|
4264
|
|
|
|
|
4265
|
|
|
self.state = 626 |
|
4266
|
|
|
self._errHandler.sync(self) |
|
4267
|
|
|
la_ = self._interp.adaptivePredict(self._input,88,self._ctx) |
|
4268
|
|
|
if la_ == 1: |
|
4269
|
|
|
self.state = 624 |
|
4270
|
|
|
self.match(PythonParser.COMMA) |
|
4271
|
|
|
self.state = 625 |
|
4272
|
|
|
self.varkwargs() |
|
4273
|
|
|
|
|
4274
|
|
|
|
|
4275
|
|
|
pass |
|
4276
|
|
|
elif token in [48]: |
|
4277
|
|
|
self.state = 628 |
|
4278
|
|
|
self.varkwargs() |
|
4279
|
|
|
pass |
|
4280
|
|
|
else: |
|
4281
|
|
|
raise NoViableAltException(self) |
|
4282
|
|
|
|
|
4283
|
|
|
self.state = 632 |
|
4284
|
|
|
self._errHandler.sync(self) |
|
4285
|
|
|
_la = self._input.LA(1) |
|
4286
|
|
|
if _la==45: |
|
4287
|
|
|
self.state = 631 |
|
4288
|
|
|
self.match(PythonParser.COMMA) |
|
4289
|
|
|
|
|
4290
|
|
|
|
|
4291
|
|
|
pass |
|
4292
|
|
|
|
|
4293
|
|
|
elif la_ == 2: |
|
4294
|
|
|
self.enterOuterAlt(localctx, 2) |
|
4295
|
|
|
self.state = 634 |
|
4296
|
|
|
self.vardef_parameters() |
|
4297
|
|
|
self.state = 636 |
|
4298
|
|
|
self._errHandler.sync(self) |
|
4299
|
|
|
_la = self._input.LA(1) |
|
4300
|
|
|
if _la==45: |
|
4301
|
|
|
self.state = 635 |
|
4302
|
|
|
self.match(PythonParser.COMMA) |
|
4303
|
|
|
|
|
4304
|
|
|
|
|
4305
|
|
|
pass |
|
4306
|
|
|
|
|
4307
|
|
|
|
|
4308
|
|
|
except RecognitionException as re: |
|
4309
|
|
|
localctx.exception = re |
|
4310
|
|
|
self._errHandler.reportError(self, re) |
|
4311
|
|
|
self._errHandler.recover(self, re) |
|
4312
|
|
|
finally: |
|
4313
|
|
|
self.exitRule() |
|
4314
|
|
|
return localctx |
|
4315
|
|
|
|
|
4316
|
|
|
|
|
4317
|
|
|
class Vardef_parametersContext(ParserRuleContext): |
|
4318
|
|
|
__slots__ = 'parser' |
|
4319
|
|
|
|
|
4320
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
4321
|
|
|
super().__init__(parent, invokingState) |
|
4322
|
|
|
self.parser = parser |
|
4323
|
|
|
|
|
4324
|
|
|
def vardef_parameter(self, i:int=None): |
|
4325
|
|
|
if i is None: |
|
4326
|
|
|
return self.getTypedRuleContexts(PythonParser.Vardef_parameterContext) |
|
4327
|
|
|
else: |
|
4328
|
|
|
return self.getTypedRuleContext(PythonParser.Vardef_parameterContext,i) |
|
4329
|
|
|
|
|
4330
|
|
|
|
|
4331
|
|
|
def COMMA(self, i:int=None): |
|
4332
|
|
|
if i is None: |
|
4333
|
|
|
return self.getTokens(PythonParser.COMMA) |
|
4334
|
|
|
else: |
|
4335
|
|
|
return self.getToken(PythonParser.COMMA, i) |
|
4336
|
|
|
|
|
4337
|
|
|
def getRuleIndex(self): |
|
4338
|
|
|
return PythonParser.RULE_vardef_parameters |
|
4339
|
|
|
|
|
4340
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
4341
|
|
|
if hasattr( listener, "enterVardef_parameters" ): |
|
4342
|
|
|
listener.enterVardef_parameters(self) |
|
4343
|
|
|
|
|
4344
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
4345
|
|
|
if hasattr( listener, "exitVardef_parameters" ): |
|
4346
|
|
|
listener.exitVardef_parameters(self) |
|
4347
|
|
|
|
|
4348
|
|
|
|
|
4349
|
|
|
|
|
4350
|
|
|
|
|
4351
|
|
|
def vardef_parameters(self): |
|
4352
|
|
|
|
|
4353
|
|
|
localctx = PythonParser.Vardef_parametersContext(self, self._ctx, self.state) |
|
4354
|
|
|
self.enterRule(localctx, 66, self.RULE_vardef_parameters) |
|
4355
|
|
|
try: |
|
4356
|
|
|
self.enterOuterAlt(localctx, 1) |
|
4357
|
|
|
self.state = 640 |
|
4358
|
|
|
self.vardef_parameter() |
|
4359
|
|
|
self.state = 645 |
|
4360
|
|
|
self._errHandler.sync(self) |
|
4361
|
|
|
_alt = self._interp.adaptivePredict(self._input,93,self._ctx) |
|
4362
|
|
|
while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: |
|
4363
|
|
|
if _alt==1: |
|
4364
|
|
|
self.state = 641 |
|
4365
|
|
|
self.match(PythonParser.COMMA) |
|
4366
|
|
|
self.state = 642 |
|
4367
|
|
|
self.vardef_parameter() |
|
4368
|
|
|
self.state = 647 |
|
4369
|
|
|
self._errHandler.sync(self) |
|
4370
|
|
|
_alt = self._interp.adaptivePredict(self._input,93,self._ctx) |
|
4371
|
|
|
|
|
4372
|
|
|
except RecognitionException as re: |
|
4373
|
|
|
localctx.exception = re |
|
4374
|
|
|
self._errHandler.reportError(self, re) |
|
4375
|
|
|
self._errHandler.recover(self, re) |
|
4376
|
|
|
finally: |
|
4377
|
|
|
self.exitRule() |
|
4378
|
|
|
return localctx |
|
4379
|
|
|
|
|
4380
|
|
|
|
|
4381
|
|
|
class Vardef_parameterContext(ParserRuleContext): |
|
4382
|
|
|
__slots__ = 'parser' |
|
4383
|
|
|
|
|
4384
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
4385
|
|
|
super().__init__(parent, invokingState) |
|
4386
|
|
|
self.parser = parser |
|
4387
|
|
|
|
|
4388
|
|
|
def name(self): |
|
4389
|
|
|
return self.getTypedRuleContext(PythonParser.NameContext,0) |
|
4390
|
|
|
|
|
4391
|
|
|
|
|
4392
|
|
|
def ASSIGN(self): |
|
4393
|
|
|
return self.getToken(PythonParser.ASSIGN, 0) |
|
4394
|
|
|
|
|
4395
|
|
|
def test(self): |
|
4396
|
|
|
return self.getTypedRuleContext(PythonParser.TestContext,0) |
|
4397
|
|
|
|
|
4398
|
|
|
|
|
4399
|
|
|
def STAR(self): |
|
4400
|
|
|
return self.getToken(PythonParser.STAR, 0) |
|
4401
|
|
|
|
|
4402
|
|
|
def getRuleIndex(self): |
|
4403
|
|
|
return PythonParser.RULE_vardef_parameter |
|
4404
|
|
|
|
|
4405
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
4406
|
|
|
if hasattr( listener, "enterVardef_parameter" ): |
|
4407
|
|
|
listener.enterVardef_parameter(self) |
|
4408
|
|
|
|
|
4409
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
4410
|
|
|
if hasattr( listener, "exitVardef_parameter" ): |
|
4411
|
|
|
listener.exitVardef_parameter(self) |
|
4412
|
|
|
|
|
4413
|
|
|
|
|
4414
|
|
|
|
|
4415
|
|
|
|
|
4416
|
|
|
def vardef_parameter(self): |
|
4417
|
|
|
|
|
4418
|
|
|
localctx = PythonParser.Vardef_parameterContext(self, self._ctx, self.state) |
|
4419
|
|
|
self.enterRule(localctx, 68, self.RULE_vardef_parameter) |
|
4420
|
|
|
self._la = 0 # Token type |
|
4421
|
|
|
try: |
|
4422
|
|
|
self.state = 654 |
|
4423
|
|
|
self._errHandler.sync(self) |
|
4424
|
|
|
token = self._input.LA(1) |
|
4425
|
|
|
if token in [39, 40, 96]: |
|
4426
|
|
|
self.enterOuterAlt(localctx, 1) |
|
4427
|
|
|
self.state = 648 |
|
4428
|
|
|
self.name() |
|
4429
|
|
|
self.state = 651 |
|
4430
|
|
|
self._errHandler.sync(self) |
|
4431
|
|
|
_la = self._input.LA(1) |
|
4432
|
|
|
if _la==49: |
|
4433
|
|
|
self.state = 649 |
|
4434
|
|
|
self.match(PythonParser.ASSIGN) |
|
4435
|
|
|
self.state = 650 |
|
4436
|
|
|
self.test() |
|
4437
|
|
|
|
|
4438
|
|
|
|
|
4439
|
|
|
pass |
|
4440
|
|
|
elif token in [44]: |
|
4441
|
|
|
self.enterOuterAlt(localctx, 2) |
|
4442
|
|
|
self.state = 653 |
|
4443
|
|
|
self.match(PythonParser.STAR) |
|
4444
|
|
|
pass |
|
4445
|
|
|
else: |
|
4446
|
|
|
raise NoViableAltException(self) |
|
4447
|
|
|
|
|
4448
|
|
|
except RecognitionException as re: |
|
4449
|
|
|
localctx.exception = re |
|
4450
|
|
|
self._errHandler.reportError(self, re) |
|
4451
|
|
|
self._errHandler.recover(self, re) |
|
4452
|
|
|
finally: |
|
4453
|
|
|
self.exitRule() |
|
4454
|
|
|
return localctx |
|
4455
|
|
|
|
|
4456
|
|
|
|
|
4457
|
|
|
class VarargsContext(ParserRuleContext): |
|
4458
|
|
|
__slots__ = 'parser' |
|
4459
|
|
|
|
|
4460
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
4461
|
|
|
super().__init__(parent, invokingState) |
|
4462
|
|
|
self.parser = parser |
|
4463
|
|
|
|
|
4464
|
|
|
def STAR(self): |
|
4465
|
|
|
return self.getToken(PythonParser.STAR, 0) |
|
4466
|
|
|
|
|
4467
|
|
|
def name(self): |
|
4468
|
|
|
return self.getTypedRuleContext(PythonParser.NameContext,0) |
|
4469
|
|
|
|
|
4470
|
|
|
|
|
4471
|
|
|
def getRuleIndex(self): |
|
4472
|
|
|
return PythonParser.RULE_varargs |
|
4473
|
|
|
|
|
4474
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
4475
|
|
|
if hasattr( listener, "enterVarargs" ): |
|
4476
|
|
|
listener.enterVarargs(self) |
|
4477
|
|
|
|
|
4478
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
4479
|
|
|
if hasattr( listener, "exitVarargs" ): |
|
4480
|
|
|
listener.exitVarargs(self) |
|
4481
|
|
|
|
|
4482
|
|
|
|
|
4483
|
|
|
|
|
4484
|
|
|
|
|
4485
|
|
|
def varargs(self): |
|
4486
|
|
|
|
|
4487
|
|
|
localctx = PythonParser.VarargsContext(self, self._ctx, self.state) |
|
4488
|
|
|
self.enterRule(localctx, 70, self.RULE_varargs) |
|
4489
|
|
|
try: |
|
4490
|
|
|
self.enterOuterAlt(localctx, 1) |
|
4491
|
|
|
self.state = 656 |
|
4492
|
|
|
self.match(PythonParser.STAR) |
|
4493
|
|
|
self.state = 657 |
|
4494
|
|
|
self.name() |
|
4495
|
|
|
except RecognitionException as re: |
|
4496
|
|
|
localctx.exception = re |
|
4497
|
|
|
self._errHandler.reportError(self, re) |
|
4498
|
|
|
self._errHandler.recover(self, re) |
|
4499
|
|
|
finally: |
|
4500
|
|
|
self.exitRule() |
|
4501
|
|
|
return localctx |
|
4502
|
|
|
|
|
4503
|
|
|
|
|
4504
|
|
|
class VarkwargsContext(ParserRuleContext): |
|
4505
|
|
|
__slots__ = 'parser' |
|
4506
|
|
|
|
|
4507
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
4508
|
|
|
super().__init__(parent, invokingState) |
|
4509
|
|
|
self.parser = parser |
|
4510
|
|
|
|
|
4511
|
|
|
def POWER(self): |
|
4512
|
|
|
return self.getToken(PythonParser.POWER, 0) |
|
4513
|
|
|
|
|
4514
|
|
|
def name(self): |
|
4515
|
|
|
return self.getTypedRuleContext(PythonParser.NameContext,0) |
|
4516
|
|
|
|
|
4517
|
|
|
|
|
4518
|
|
|
def getRuleIndex(self): |
|
4519
|
|
|
return PythonParser.RULE_varkwargs |
|
4520
|
|
|
|
|
4521
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
4522
|
|
|
if hasattr( listener, "enterVarkwargs" ): |
|
4523
|
|
|
listener.enterVarkwargs(self) |
|
4524
|
|
|
|
|
4525
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
4526
|
|
|
if hasattr( listener, "exitVarkwargs" ): |
|
4527
|
|
|
listener.exitVarkwargs(self) |
|
4528
|
|
|
|
|
4529
|
|
|
|
|
4530
|
|
|
|
|
4531
|
|
|
|
|
4532
|
|
|
def varkwargs(self): |
|
4533
|
|
|
|
|
4534
|
|
|
localctx = PythonParser.VarkwargsContext(self, self._ctx, self.state) |
|
4535
|
|
|
self.enterRule(localctx, 72, self.RULE_varkwargs) |
|
4536
|
|
|
try: |
|
4537
|
|
|
self.enterOuterAlt(localctx, 1) |
|
4538
|
|
|
self.state = 659 |
|
4539
|
|
|
self.match(PythonParser.POWER) |
|
4540
|
|
|
self.state = 660 |
|
4541
|
|
|
self.name() |
|
4542
|
|
|
except RecognitionException as re: |
|
4543
|
|
|
localctx.exception = re |
|
4544
|
|
|
self._errHandler.reportError(self, re) |
|
4545
|
|
|
self._errHandler.recover(self, re) |
|
4546
|
|
|
finally: |
|
4547
|
|
|
self.exitRule() |
|
4548
|
|
|
return localctx |
|
4549
|
|
|
|
|
4550
|
|
|
|
|
4551
|
|
|
class Logical_testContext(ParserRuleContext): |
|
4552
|
|
|
__slots__ = 'parser' |
|
4553
|
|
|
|
|
4554
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
4555
|
|
|
super().__init__(parent, invokingState) |
|
4556
|
|
|
self.parser = parser |
|
4557
|
|
|
self.op = None # Token |
|
4558
|
|
|
|
|
4559
|
|
|
def comparison(self): |
|
4560
|
|
|
return self.getTypedRuleContext(PythonParser.ComparisonContext,0) |
|
4561
|
|
|
|
|
4562
|
|
|
|
|
4563
|
|
|
def NOT(self): |
|
4564
|
|
|
return self.getToken(PythonParser.NOT, 0) |
|
4565
|
|
|
|
|
4566
|
|
|
def logical_test(self, i:int=None): |
|
4567
|
|
|
if i is None: |
|
4568
|
|
|
return self.getTypedRuleContexts(PythonParser.Logical_testContext) |
|
4569
|
|
|
else: |
|
4570
|
|
|
return self.getTypedRuleContext(PythonParser.Logical_testContext,i) |
|
4571
|
|
|
|
|
4572
|
|
|
|
|
4573
|
|
|
def AND(self): |
|
4574
|
|
|
return self.getToken(PythonParser.AND, 0) |
|
4575
|
|
|
|
|
4576
|
|
|
def OR(self): |
|
4577
|
|
|
return self.getToken(PythonParser.OR, 0) |
|
4578
|
|
|
|
|
4579
|
|
|
def getRuleIndex(self): |
|
4580
|
|
|
return PythonParser.RULE_logical_test |
|
4581
|
|
|
|
|
4582
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
4583
|
|
|
if hasattr( listener, "enterLogical_test" ): |
|
4584
|
|
|
listener.enterLogical_test(self) |
|
4585
|
|
|
|
|
4586
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
4587
|
|
|
if hasattr( listener, "exitLogical_test" ): |
|
4588
|
|
|
listener.exitLogical_test(self) |
|
4589
|
|
|
|
|
4590
|
|
|
|
|
4591
|
|
|
|
|
4592
|
|
|
def logical_test(self, _p:int=0): |
|
4593
|
|
|
_parentctx = self._ctx |
|
4594
|
|
|
_parentState = self.state |
|
4595
|
|
|
localctx = PythonParser.Logical_testContext(self, self._ctx, _parentState) |
|
4596
|
|
|
_prevctx = localctx |
|
4597
|
|
|
_startState = 74 |
|
4598
|
|
|
self.enterRecursionRule(localctx, 74, self.RULE_logical_test, _p) |
|
4599
|
|
|
try: |
|
4600
|
|
|
self.enterOuterAlt(localctx, 1) |
|
4601
|
|
|
self.state = 666 |
|
4602
|
|
|
self._errHandler.sync(self) |
|
4603
|
|
|
token = self._input.LA(1) |
|
4604
|
|
|
if token in [20, 36, 37, 38, 39, 40, 42, 43, 55, 56, 60, 83, 84, 85, 86, 87, 88, 89, 90, 92, 94, 96]: |
|
4605
|
|
|
self.state = 663 |
|
4606
|
|
|
self.comparison(0) |
|
4607
|
|
|
pass |
|
4608
|
|
|
elif token in [27]: |
|
4609
|
|
|
self.state = 664 |
|
4610
|
|
|
self.match(PythonParser.NOT) |
|
4611
|
|
|
self.state = 665 |
|
4612
|
|
|
self.logical_test(3) |
|
4613
|
|
|
pass |
|
4614
|
|
|
else: |
|
4615
|
|
|
raise NoViableAltException(self) |
|
4616
|
|
|
|
|
4617
|
|
|
self._ctx.stop = self._input.LT(-1) |
|
4618
|
|
|
self.state = 676 |
|
4619
|
|
|
self._errHandler.sync(self) |
|
4620
|
|
|
_alt = self._interp.adaptivePredict(self._input,98,self._ctx) |
|
4621
|
|
|
while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: |
|
4622
|
|
|
if _alt==1: |
|
4623
|
|
|
if self._parseListeners is not None: |
|
4624
|
|
|
self.triggerExitRuleEvent() |
|
4625
|
|
|
_prevctx = localctx |
|
4626
|
|
|
self.state = 674 |
|
4627
|
|
|
self._errHandler.sync(self) |
|
4628
|
|
|
la_ = self._interp.adaptivePredict(self._input,97,self._ctx) |
|
4629
|
|
|
if la_ == 1: |
|
4630
|
|
|
localctx = PythonParser.Logical_testContext(self, _parentctx, _parentState) |
|
4631
|
|
|
self.pushNewRecursionContext(localctx, _startState, self.RULE_logical_test) |
|
4632
|
|
|
self.state = 668 |
|
4633
|
|
|
if not self.precpred(self._ctx, 2): |
|
4634
|
|
|
from antlr4.error.Errors import FailedPredicateException |
|
4635
|
|
|
raise FailedPredicateException(self, "self.precpred(self._ctx, 2)") |
|
4636
|
|
|
self.state = 669 |
|
4637
|
|
|
localctx.op = self.match(PythonParser.AND) |
|
4638
|
|
|
self.state = 670 |
|
4639
|
|
|
self.logical_test(3) |
|
4640
|
|
|
pass |
|
4641
|
|
|
|
|
4642
|
|
|
elif la_ == 2: |
|
4643
|
|
|
localctx = PythonParser.Logical_testContext(self, _parentctx, _parentState) |
|
4644
|
|
|
self.pushNewRecursionContext(localctx, _startState, self.RULE_logical_test) |
|
4645
|
|
|
self.state = 671 |
|
4646
|
|
|
if not self.precpred(self._ctx, 1): |
|
4647
|
|
|
from antlr4.error.Errors import FailedPredicateException |
|
4648
|
|
|
raise FailedPredicateException(self, "self.precpred(self._ctx, 1)") |
|
4649
|
|
|
self.state = 672 |
|
4650
|
|
|
localctx.op = self.match(PythonParser.OR) |
|
4651
|
|
|
self.state = 673 |
|
4652
|
|
|
self.logical_test(2) |
|
4653
|
|
|
pass |
|
4654
|
|
|
|
|
4655
|
|
|
|
|
4656
|
|
|
self.state = 678 |
|
4657
|
|
|
self._errHandler.sync(self) |
|
4658
|
|
|
_alt = self._interp.adaptivePredict(self._input,98,self._ctx) |
|
4659
|
|
|
|
|
4660
|
|
|
except RecognitionException as re: |
|
4661
|
|
|
localctx.exception = re |
|
4662
|
|
|
self._errHandler.reportError(self, re) |
|
4663
|
|
|
self._errHandler.recover(self, re) |
|
4664
|
|
|
finally: |
|
4665
|
|
|
self.unrollRecursionContexts(_parentctx) |
|
4666
|
|
|
return localctx |
|
4667
|
|
|
|
|
4668
|
|
|
|
|
4669
|
|
|
class ComparisonContext(ParserRuleContext): |
|
4670
|
|
|
__slots__ = 'parser' |
|
4671
|
|
|
|
|
4672
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
4673
|
|
|
super().__init__(parent, invokingState) |
|
4674
|
|
|
self.parser = parser |
|
4675
|
|
|
self.optional = None # Token |
|
4676
|
|
|
|
|
4677
|
|
|
def expr(self): |
|
4678
|
|
|
return self.getTypedRuleContext(PythonParser.ExprContext,0) |
|
4679
|
|
|
|
|
4680
|
|
|
|
|
4681
|
|
|
def comparison(self, i:int=None): |
|
4682
|
|
|
if i is None: |
|
4683
|
|
|
return self.getTypedRuleContexts(PythonParser.ComparisonContext) |
|
4684
|
|
|
else: |
|
4685
|
|
|
return self.getTypedRuleContext(PythonParser.ComparisonContext,i) |
|
4686
|
|
|
|
|
4687
|
|
|
|
|
4688
|
|
|
def LESS_THAN(self): |
|
4689
|
|
|
return self.getToken(PythonParser.LESS_THAN, 0) |
|
4690
|
|
|
|
|
4691
|
|
|
def GREATER_THAN(self): |
|
4692
|
|
|
return self.getToken(PythonParser.GREATER_THAN, 0) |
|
4693
|
|
|
|
|
4694
|
|
|
def EQUALS(self): |
|
4695
|
|
|
return self.getToken(PythonParser.EQUALS, 0) |
|
4696
|
|
|
|
|
4697
|
|
|
def GT_EQ(self): |
|
4698
|
|
|
return self.getToken(PythonParser.GT_EQ, 0) |
|
4699
|
|
|
|
|
4700
|
|
|
def LT_EQ(self): |
|
4701
|
|
|
return self.getToken(PythonParser.LT_EQ, 0) |
|
4702
|
|
|
|
|
4703
|
|
|
def NOT_EQ_1(self): |
|
4704
|
|
|
return self.getToken(PythonParser.NOT_EQ_1, 0) |
|
4705
|
|
|
|
|
4706
|
|
|
def NOT_EQ_2(self): |
|
4707
|
|
|
return self.getToken(PythonParser.NOT_EQ_2, 0) |
|
4708
|
|
|
|
|
4709
|
|
|
def IN(self): |
|
4710
|
|
|
return self.getToken(PythonParser.IN, 0) |
|
4711
|
|
|
|
|
4712
|
|
|
def IS(self): |
|
4713
|
|
|
return self.getToken(PythonParser.IS, 0) |
|
4714
|
|
|
|
|
4715
|
|
|
def NOT(self): |
|
4716
|
|
|
return self.getToken(PythonParser.NOT, 0) |
|
4717
|
|
|
|
|
4718
|
|
|
def getRuleIndex(self): |
|
4719
|
|
|
return PythonParser.RULE_comparison |
|
4720
|
|
|
|
|
4721
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
4722
|
|
|
if hasattr( listener, "enterComparison" ): |
|
4723
|
|
|
listener.enterComparison(self) |
|
4724
|
|
|
|
|
4725
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
4726
|
|
|
if hasattr( listener, "exitComparison" ): |
|
4727
|
|
|
listener.exitComparison(self) |
|
4728
|
|
|
|
|
4729
|
|
|
|
|
4730
|
|
|
|
|
4731
|
|
|
def comparison(self, _p:int=0): |
|
4732
|
|
|
_parentctx = self._ctx |
|
4733
|
|
|
_parentState = self.state |
|
4734
|
|
|
localctx = PythonParser.ComparisonContext(self, self._ctx, _parentState) |
|
4735
|
|
|
_prevctx = localctx |
|
4736
|
|
|
_startState = 76 |
|
4737
|
|
|
self.enterRecursionRule(localctx, 76, self.RULE_comparison, _p) |
|
4738
|
|
|
self._la = 0 # Token type |
|
4739
|
|
|
try: |
|
4740
|
|
|
self.enterOuterAlt(localctx, 1) |
|
4741
|
|
|
self.state = 680 |
|
4742
|
|
|
self.expr(0) |
|
4743
|
|
|
self._ctx.stop = self._input.LT(-1) |
|
4744
|
|
|
self.state = 703 |
|
4745
|
|
|
self._errHandler.sync(self) |
|
4746
|
|
|
_alt = self._interp.adaptivePredict(self._input,102,self._ctx) |
|
4747
|
|
|
while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: |
|
4748
|
|
|
if _alt==1: |
|
4749
|
|
|
if self._parseListeners is not None: |
|
4750
|
|
|
self.triggerExitRuleEvent() |
|
4751
|
|
|
_prevctx = localctx |
|
4752
|
|
|
localctx = PythonParser.ComparisonContext(self, _parentctx, _parentState) |
|
4753
|
|
|
self.pushNewRecursionContext(localctx, _startState, self.RULE_comparison) |
|
4754
|
|
|
self.state = 682 |
|
4755
|
|
|
if not self.precpred(self._ctx, 2): |
|
4756
|
|
|
from antlr4.error.Errors import FailedPredicateException |
|
4757
|
|
|
raise FailedPredicateException(self, "self.precpred(self._ctx, 2)") |
|
4758
|
|
|
self.state = 698 |
|
4759
|
|
|
self._errHandler.sync(self) |
|
4760
|
|
|
token = self._input.LA(1) |
|
4761
|
|
|
if token in [61]: |
|
4762
|
|
|
self.state = 683 |
|
4763
|
|
|
self.match(PythonParser.LESS_THAN) |
|
4764
|
|
|
pass |
|
4765
|
|
|
elif token in [62]: |
|
4766
|
|
|
self.state = 684 |
|
4767
|
|
|
self.match(PythonParser.GREATER_THAN) |
|
4768
|
|
|
pass |
|
4769
|
|
|
elif token in [63]: |
|
4770
|
|
|
self.state = 685 |
|
4771
|
|
|
self.match(PythonParser.EQUALS) |
|
4772
|
|
|
pass |
|
4773
|
|
|
elif token in [64]: |
|
4774
|
|
|
self.state = 686 |
|
4775
|
|
|
self.match(PythonParser.GT_EQ) |
|
4776
|
|
|
pass |
|
4777
|
|
|
elif token in [65]: |
|
4778
|
|
|
self.state = 687 |
|
4779
|
|
|
self.match(PythonParser.LT_EQ) |
|
4780
|
|
|
pass |
|
4781
|
|
|
elif token in [66]: |
|
4782
|
|
|
self.state = 688 |
|
4783
|
|
|
self.match(PythonParser.NOT_EQ_1) |
|
4784
|
|
|
pass |
|
4785
|
|
|
elif token in [67]: |
|
4786
|
|
|
self.state = 689 |
|
4787
|
|
|
self.match(PythonParser.NOT_EQ_2) |
|
4788
|
|
|
pass |
|
4789
|
|
|
elif token in [18, 27]: |
|
4790
|
|
|
self.state = 691 |
|
4791
|
|
|
self._errHandler.sync(self) |
|
4792
|
|
|
_la = self._input.LA(1) |
|
4793
|
|
|
if _la==27: |
|
4794
|
|
|
self.state = 690 |
|
4795
|
|
|
localctx.optional = self.match(PythonParser.NOT) |
|
4796
|
|
|
|
|
4797
|
|
|
|
|
4798
|
|
|
self.state = 693 |
|
4799
|
|
|
self.match(PythonParser.IN) |
|
4800
|
|
|
pass |
|
4801
|
|
|
elif token in [28]: |
|
4802
|
|
|
self.state = 694 |
|
4803
|
|
|
self.match(PythonParser.IS) |
|
4804
|
|
|
self.state = 696 |
|
4805
|
|
|
self._errHandler.sync(self) |
|
4806
|
|
|
_la = self._input.LA(1) |
|
4807
|
|
|
if _la==27: |
|
4808
|
|
|
self.state = 695 |
|
4809
|
|
|
localctx.optional = self.match(PythonParser.NOT) |
|
4810
|
|
|
|
|
4811
|
|
|
|
|
4812
|
|
|
pass |
|
4813
|
|
|
else: |
|
4814
|
|
|
raise NoViableAltException(self) |
|
4815
|
|
|
|
|
4816
|
|
|
self.state = 700 |
|
4817
|
|
|
self.comparison(3) |
|
4818
|
|
|
self.state = 705 |
|
4819
|
|
|
self._errHandler.sync(self) |
|
4820
|
|
|
_alt = self._interp.adaptivePredict(self._input,102,self._ctx) |
|
4821
|
|
|
|
|
4822
|
|
|
except RecognitionException as re: |
|
4823
|
|
|
localctx.exception = re |
|
4824
|
|
|
self._errHandler.reportError(self, re) |
|
4825
|
|
|
self._errHandler.recover(self, re) |
|
4826
|
|
|
finally: |
|
4827
|
|
|
self.unrollRecursionContexts(_parentctx) |
|
4828
|
|
|
return localctx |
|
4829
|
|
|
|
|
4830
|
|
|
|
|
4831
|
|
|
class ExprContext(ParserRuleContext): |
|
4832
|
|
|
__slots__ = 'parser' |
|
4833
|
|
|
|
|
4834
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
4835
|
|
|
super().__init__(parent, invokingState) |
|
4836
|
|
|
self.parser = parser |
|
4837
|
|
|
self.op = None # Token |
|
4838
|
|
|
|
|
4839
|
|
|
def atom(self): |
|
4840
|
|
|
return self.getTypedRuleContext(PythonParser.AtomContext,0) |
|
4841
|
|
|
|
|
4842
|
|
|
|
|
4843
|
|
|
def AWAIT(self): |
|
4844
|
|
|
return self.getToken(PythonParser.AWAIT, 0) |
|
4845
|
|
|
|
|
4846
|
|
|
def trailer(self, i:int=None): |
|
4847
|
|
|
if i is None: |
|
4848
|
|
|
return self.getTypedRuleContexts(PythonParser.TrailerContext) |
|
4849
|
|
|
else: |
|
4850
|
|
|
return self.getTypedRuleContext(PythonParser.TrailerContext,i) |
|
4851
|
|
|
|
|
4852
|
|
|
|
|
4853
|
|
|
def expr(self, i:int=None): |
|
4854
|
|
|
if i is None: |
|
4855
|
|
|
return self.getTypedRuleContexts(PythonParser.ExprContext) |
|
4856
|
|
|
else: |
|
4857
|
|
|
return self.getTypedRuleContext(PythonParser.ExprContext,i) |
|
4858
|
|
|
|
|
4859
|
|
|
|
|
4860
|
|
|
def ADD(self): |
|
4861
|
|
|
return self.getToken(PythonParser.ADD, 0) |
|
4862
|
|
|
|
|
4863
|
|
|
def MINUS(self): |
|
4864
|
|
|
return self.getToken(PythonParser.MINUS, 0) |
|
4865
|
|
|
|
|
4866
|
|
|
def NOT_OP(self): |
|
4867
|
|
|
return self.getToken(PythonParser.NOT_OP, 0) |
|
4868
|
|
|
|
|
4869
|
|
|
def POWER(self): |
|
4870
|
|
|
return self.getToken(PythonParser.POWER, 0) |
|
4871
|
|
|
|
|
4872
|
|
|
def STAR(self): |
|
4873
|
|
|
return self.getToken(PythonParser.STAR, 0) |
|
4874
|
|
|
|
|
4875
|
|
|
def DIV(self): |
|
4876
|
|
|
return self.getToken(PythonParser.DIV, 0) |
|
4877
|
|
|
|
|
4878
|
|
|
def MOD(self): |
|
4879
|
|
|
return self.getToken(PythonParser.MOD, 0) |
|
4880
|
|
|
|
|
4881
|
|
|
def IDIV(self): |
|
4882
|
|
|
return self.getToken(PythonParser.IDIV, 0) |
|
4883
|
|
|
|
|
4884
|
|
|
def AT(self): |
|
4885
|
|
|
return self.getToken(PythonParser.AT, 0) |
|
4886
|
|
|
|
|
4887
|
|
|
def LEFT_SHIFT(self): |
|
4888
|
|
|
return self.getToken(PythonParser.LEFT_SHIFT, 0) |
|
4889
|
|
|
|
|
4890
|
|
|
def RIGHT_SHIFT(self): |
|
4891
|
|
|
return self.getToken(PythonParser.RIGHT_SHIFT, 0) |
|
4892
|
|
|
|
|
4893
|
|
|
def AND_OP(self): |
|
4894
|
|
|
return self.getToken(PythonParser.AND_OP, 0) |
|
4895
|
|
|
|
|
4896
|
|
|
def XOR(self): |
|
4897
|
|
|
return self.getToken(PythonParser.XOR, 0) |
|
4898
|
|
|
|
|
4899
|
|
|
def OR_OP(self): |
|
4900
|
|
|
return self.getToken(PythonParser.OR_OP, 0) |
|
4901
|
|
|
|
|
4902
|
|
|
def getRuleIndex(self): |
|
4903
|
|
|
return PythonParser.RULE_expr |
|
4904
|
|
|
|
|
4905
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
4906
|
|
|
if hasattr( listener, "enterExpr" ): |
|
4907
|
|
|
listener.enterExpr(self) |
|
4908
|
|
|
|
|
4909
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
4910
|
|
|
if hasattr( listener, "exitExpr" ): |
|
4911
|
|
|
listener.exitExpr(self) |
|
4912
|
|
|
|
|
4913
|
|
|
|
|
4914
|
|
|
|
|
4915
|
|
|
def expr(self, _p:int=0): |
|
4916
|
|
|
_parentctx = self._ctx |
|
4917
|
|
|
_parentState = self.state |
|
4918
|
|
|
localctx = PythonParser.ExprContext(self, self._ctx, _parentState) |
|
4919
|
|
|
_prevctx = localctx |
|
4920
|
|
|
_startState = 78 |
|
4921
|
|
|
self.enterRecursionRule(localctx, 78, self.RULE_expr, _p) |
|
4922
|
|
|
self._la = 0 # Token type |
|
4923
|
|
|
try: |
|
4924
|
|
|
self.enterOuterAlt(localctx, 1) |
|
4925
|
|
|
self.state = 719 |
|
4926
|
|
|
self._errHandler.sync(self) |
|
4927
|
|
|
la_ = self._interp.adaptivePredict(self._input,105,self._ctx) |
|
4928
|
|
|
if la_ == 1: |
|
4929
|
|
|
self.state = 708 |
|
4930
|
|
|
self._errHandler.sync(self) |
|
4931
|
|
|
_la = self._input.LA(1) |
|
4932
|
|
|
if _la==36: |
|
4933
|
|
|
self.state = 707 |
|
4934
|
|
|
self.match(PythonParser.AWAIT) |
|
4935
|
|
|
|
|
4936
|
|
|
|
|
4937
|
|
|
self.state = 710 |
|
4938
|
|
|
self.atom() |
|
4939
|
|
|
self.state = 714 |
|
4940
|
|
|
self._errHandler.sync(self) |
|
4941
|
|
|
_alt = self._interp.adaptivePredict(self._input,104,self._ctx) |
|
4942
|
|
|
while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: |
|
4943
|
|
|
if _alt==1: |
|
4944
|
|
|
self.state = 711 |
|
4945
|
|
|
self.trailer() |
|
4946
|
|
|
self.state = 716 |
|
4947
|
|
|
self._errHandler.sync(self) |
|
4948
|
|
|
_alt = self._interp.adaptivePredict(self._input,104,self._ctx) |
|
4949
|
|
|
|
|
4950
|
|
|
pass |
|
4951
|
|
|
|
|
4952
|
|
|
elif la_ == 2: |
|
4953
|
|
|
self.state = 717 |
|
4954
|
|
|
localctx.op = self._input.LT(1) |
|
4955
|
|
|
_la = self._input.LA(1) |
|
4956
|
|
|
if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 1261007895663738880) != 0)): |
|
4957
|
|
|
localctx.op = self._errHandler.recoverInline(self) |
|
4958
|
|
|
else: |
|
4959
|
|
|
self._errHandler.reportMatch(self) |
|
4960
|
|
|
self.consume() |
|
4961
|
|
|
self.state = 718 |
|
4962
|
|
|
self.expr(7) |
|
4963
|
|
|
pass |
|
4964
|
|
|
|
|
4965
|
|
|
|
|
4966
|
|
|
self._ctx.stop = self._input.LT(-1) |
|
4967
|
|
|
self.state = 744 |
|
4968
|
|
|
self._errHandler.sync(self) |
|
4969
|
|
|
_alt = self._interp.adaptivePredict(self._input,107,self._ctx) |
|
4970
|
|
|
while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: |
|
4971
|
|
|
if _alt==1: |
|
4972
|
|
|
if self._parseListeners is not None: |
|
4973
|
|
|
self.triggerExitRuleEvent() |
|
4974
|
|
|
_prevctx = localctx |
|
4975
|
|
|
self.state = 742 |
|
4976
|
|
|
self._errHandler.sync(self) |
|
4977
|
|
|
la_ = self._interp.adaptivePredict(self._input,106,self._ctx) |
|
4978
|
|
|
if la_ == 1: |
|
4979
|
|
|
localctx = PythonParser.ExprContext(self, _parentctx, _parentState) |
|
4980
|
|
|
self.pushNewRecursionContext(localctx, _startState, self.RULE_expr) |
|
4981
|
|
|
self.state = 721 |
|
4982
|
|
|
if not self.precpred(self._ctx, 8): |
|
4983
|
|
|
from antlr4.error.Errors import FailedPredicateException |
|
4984
|
|
|
raise FailedPredicateException(self, "self.precpred(self._ctx, 8)") |
|
4985
|
|
|
self.state = 722 |
|
4986
|
|
|
localctx.op = self.match(PythonParser.POWER) |
|
4987
|
|
|
self.state = 723 |
|
4988
|
|
|
self.expr(8) |
|
4989
|
|
|
pass |
|
4990
|
|
|
|
|
4991
|
|
|
elif la_ == 2: |
|
4992
|
|
|
localctx = PythonParser.ExprContext(self, _parentctx, _parentState) |
|
4993
|
|
|
self.pushNewRecursionContext(localctx, _startState, self.RULE_expr) |
|
4994
|
|
|
self.state = 724 |
|
4995
|
|
|
if not self.precpred(self._ctx, 6): |
|
4996
|
|
|
from antlr4.error.Errors import FailedPredicateException |
|
4997
|
|
|
raise FailedPredicateException(self, "self.precpred(self._ctx, 6)") |
|
4998
|
|
|
self.state = 725 |
|
4999
|
|
|
localctx.op = self._input.LT(1) |
|
5000
|
|
|
_la = self._input.LA(1) |
|
5001
|
|
|
if not(((((_la - 44)) & ~0x3f) == 0 and ((1 << (_la - 44)) & 16834561) != 0)): |
|
5002
|
|
|
localctx.op = self._errHandler.recoverInline(self) |
|
5003
|
|
|
else: |
|
5004
|
|
|
self._errHandler.reportMatch(self) |
|
5005
|
|
|
self.consume() |
|
5006
|
|
|
self.state = 726 |
|
5007
|
|
|
self.expr(7) |
|
5008
|
|
|
pass |
|
5009
|
|
|
|
|
5010
|
|
|
elif la_ == 3: |
|
5011
|
|
|
localctx = PythonParser.ExprContext(self, _parentctx, _parentState) |
|
5012
|
|
|
self.pushNewRecursionContext(localctx, _startState, self.RULE_expr) |
|
5013
|
|
|
self.state = 727 |
|
5014
|
|
|
if not self.precpred(self._ctx, 5): |
|
5015
|
|
|
from antlr4.error.Errors import FailedPredicateException |
|
5016
|
|
|
raise FailedPredicateException(self, "self.precpred(self._ctx, 5)") |
|
5017
|
|
|
self.state = 728 |
|
5018
|
|
|
localctx.op = self._input.LT(1) |
|
5019
|
|
|
_la = self._input.LA(1) |
|
5020
|
|
|
if not(_la==55 or _la==56): |
|
5021
|
|
|
localctx.op = self._errHandler.recoverInline(self) |
|
5022
|
|
|
else: |
|
5023
|
|
|
self._errHandler.reportMatch(self) |
|
5024
|
|
|
self.consume() |
|
5025
|
|
|
self.state = 729 |
|
5026
|
|
|
self.expr(6) |
|
5027
|
|
|
pass |
|
5028
|
|
|
|
|
5029
|
|
|
elif la_ == 4: |
|
5030
|
|
|
localctx = PythonParser.ExprContext(self, _parentctx, _parentState) |
|
5031
|
|
|
self.pushNewRecursionContext(localctx, _startState, self.RULE_expr) |
|
5032
|
|
|
self.state = 730 |
|
5033
|
|
|
if not self.precpred(self._ctx, 4): |
|
5034
|
|
|
from antlr4.error.Errors import FailedPredicateException |
|
5035
|
|
|
raise FailedPredicateException(self, "self.precpred(self._ctx, 4)") |
|
5036
|
|
|
self.state = 731 |
|
5037
|
|
|
localctx.op = self._input.LT(1) |
|
5038
|
|
|
_la = self._input.LA(1) |
|
5039
|
|
|
if not(_la==53 or _la==54): |
|
5040
|
|
|
localctx.op = self._errHandler.recoverInline(self) |
|
5041
|
|
|
else: |
|
5042
|
|
|
self._errHandler.reportMatch(self) |
|
5043
|
|
|
self.consume() |
|
5044
|
|
|
self.state = 732 |
|
5045
|
|
|
self.expr(5) |
|
5046
|
|
|
pass |
|
5047
|
|
|
|
|
5048
|
|
|
elif la_ == 5: |
|
5049
|
|
|
localctx = PythonParser.ExprContext(self, _parentctx, _parentState) |
|
5050
|
|
|
self.pushNewRecursionContext(localctx, _startState, self.RULE_expr) |
|
5051
|
|
|
self.state = 733 |
|
5052
|
|
|
if not self.precpred(self._ctx, 3): |
|
5053
|
|
|
from antlr4.error.Errors import FailedPredicateException |
|
5054
|
|
|
raise FailedPredicateException(self, "self.precpred(self._ctx, 3)") |
|
5055
|
|
|
self.state = 734 |
|
5056
|
|
|
localctx.op = self.match(PythonParser.AND_OP) |
|
5057
|
|
|
self.state = 735 |
|
5058
|
|
|
self.expr(4) |
|
5059
|
|
|
pass |
|
5060
|
|
|
|
|
5061
|
|
|
elif la_ == 6: |
|
5062
|
|
|
localctx = PythonParser.ExprContext(self, _parentctx, _parentState) |
|
5063
|
|
|
self.pushNewRecursionContext(localctx, _startState, self.RULE_expr) |
|
5064
|
|
|
self.state = 736 |
|
5065
|
|
|
if not self.precpred(self._ctx, 2): |
|
5066
|
|
|
from antlr4.error.Errors import FailedPredicateException |
|
5067
|
|
|
raise FailedPredicateException(self, "self.precpred(self._ctx, 2)") |
|
5068
|
|
|
self.state = 737 |
|
5069
|
|
|
localctx.op = self.match(PythonParser.XOR) |
|
5070
|
|
|
self.state = 738 |
|
5071
|
|
|
self.expr(3) |
|
5072
|
|
|
pass |
|
5073
|
|
|
|
|
5074
|
|
|
elif la_ == 7: |
|
5075
|
|
|
localctx = PythonParser.ExprContext(self, _parentctx, _parentState) |
|
5076
|
|
|
self.pushNewRecursionContext(localctx, _startState, self.RULE_expr) |
|
5077
|
|
|
self.state = 739 |
|
5078
|
|
|
if not self.precpred(self._ctx, 1): |
|
5079
|
|
|
from antlr4.error.Errors import FailedPredicateException |
|
5080
|
|
|
raise FailedPredicateException(self, "self.precpred(self._ctx, 1)") |
|
5081
|
|
|
self.state = 740 |
|
5082
|
|
|
localctx.op = self.match(PythonParser.OR_OP) |
|
5083
|
|
|
self.state = 741 |
|
5084
|
|
|
self.expr(2) |
|
5085
|
|
|
pass |
|
5086
|
|
|
|
|
5087
|
|
|
|
|
5088
|
|
|
self.state = 746 |
|
5089
|
|
|
self._errHandler.sync(self) |
|
5090
|
|
|
_alt = self._interp.adaptivePredict(self._input,107,self._ctx) |
|
5091
|
|
|
|
|
5092
|
|
|
except RecognitionException as re: |
|
5093
|
|
|
localctx.exception = re |
|
5094
|
|
|
self._errHandler.reportError(self, re) |
|
5095
|
|
|
self._errHandler.recover(self, re) |
|
5096
|
|
|
finally: |
|
5097
|
|
|
self.unrollRecursionContexts(_parentctx) |
|
5098
|
|
|
return localctx |
|
5099
|
|
|
|
|
5100
|
|
|
|
|
5101
|
|
|
class AtomContext(ParserRuleContext): |
|
5102
|
|
|
__slots__ = 'parser' |
|
5103
|
|
|
|
|
5104
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
5105
|
|
|
super().__init__(parent, invokingState) |
|
5106
|
|
|
self.parser = parser |
|
5107
|
|
|
|
|
5108
|
|
|
def OPEN_PAREN(self): |
|
5109
|
|
|
return self.getToken(PythonParser.OPEN_PAREN, 0) |
|
5110
|
|
|
|
|
5111
|
|
|
def CLOSE_PAREN(self): |
|
5112
|
|
|
return self.getToken(PythonParser.CLOSE_PAREN, 0) |
|
5113
|
|
|
|
|
5114
|
|
|
def yield_expr(self): |
|
5115
|
|
|
return self.getTypedRuleContext(PythonParser.Yield_exprContext,0) |
|
5116
|
|
|
|
|
5117
|
|
|
|
|
5118
|
|
|
def testlist_comp(self): |
|
5119
|
|
|
return self.getTypedRuleContext(PythonParser.Testlist_compContext,0) |
|
5120
|
|
|
|
|
5121
|
|
|
|
|
5122
|
|
|
def OPEN_BRACKET(self): |
|
5123
|
|
|
return self.getToken(PythonParser.OPEN_BRACKET, 0) |
|
5124
|
|
|
|
|
5125
|
|
|
def CLOSE_BRACKET(self): |
|
5126
|
|
|
return self.getToken(PythonParser.CLOSE_BRACKET, 0) |
|
5127
|
|
|
|
|
5128
|
|
|
def OPEN_BRACE(self): |
|
5129
|
|
|
return self.getToken(PythonParser.OPEN_BRACE, 0) |
|
5130
|
|
|
|
|
5131
|
|
|
def CLOSE_BRACE(self): |
|
5132
|
|
|
return self.getToken(PythonParser.CLOSE_BRACE, 0) |
|
5133
|
|
|
|
|
5134
|
|
|
def dictorsetmaker(self): |
|
5135
|
|
|
return self.getTypedRuleContext(PythonParser.DictorsetmakerContext,0) |
|
5136
|
|
|
|
|
5137
|
|
|
|
|
5138
|
|
|
def REVERSE_QUOTE(self, i:int=None): |
|
5139
|
|
|
if i is None: |
|
5140
|
|
|
return self.getTokens(PythonParser.REVERSE_QUOTE) |
|
5141
|
|
|
else: |
|
5142
|
|
|
return self.getToken(PythonParser.REVERSE_QUOTE, i) |
|
5143
|
|
|
|
|
5144
|
|
|
def testlist(self): |
|
5145
|
|
|
return self.getTypedRuleContext(PythonParser.TestlistContext,0) |
|
5146
|
|
|
|
|
5147
|
|
|
|
|
5148
|
|
|
def COMMA(self): |
|
5149
|
|
|
return self.getToken(PythonParser.COMMA, 0) |
|
5150
|
|
|
|
|
5151
|
|
|
def ELLIPSIS(self): |
|
5152
|
|
|
return self.getToken(PythonParser.ELLIPSIS, 0) |
|
5153
|
|
|
|
|
5154
|
|
|
def name(self): |
|
5155
|
|
|
return self.getTypedRuleContext(PythonParser.NameContext,0) |
|
5156
|
|
|
|
|
5157
|
|
|
|
|
5158
|
|
|
def PRINT(self): |
|
5159
|
|
|
return self.getToken(PythonParser.PRINT, 0) |
|
5160
|
|
|
|
|
5161
|
|
|
def EXEC(self): |
|
5162
|
|
|
return self.getToken(PythonParser.EXEC, 0) |
|
5163
|
|
|
|
|
5164
|
|
|
def number(self): |
|
5165
|
|
|
return self.getTypedRuleContext(PythonParser.NumberContext,0) |
|
5166
|
|
|
|
|
5167
|
|
|
|
|
5168
|
|
|
def MINUS(self): |
|
5169
|
|
|
return self.getToken(PythonParser.MINUS, 0) |
|
5170
|
|
|
|
|
5171
|
|
|
def NONE(self): |
|
5172
|
|
|
return self.getToken(PythonParser.NONE, 0) |
|
5173
|
|
|
|
|
5174
|
|
|
def STRING(self, i:int=None): |
|
5175
|
|
|
if i is None: |
|
5176
|
|
|
return self.getTokens(PythonParser.STRING) |
|
5177
|
|
|
else: |
|
5178
|
|
|
return self.getToken(PythonParser.STRING, i) |
|
5179
|
|
|
|
|
5180
|
|
|
def getRuleIndex(self): |
|
5181
|
|
|
return PythonParser.RULE_atom |
|
5182
|
|
|
|
|
5183
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
5184
|
|
|
if hasattr( listener, "enterAtom" ): |
|
5185
|
|
|
listener.enterAtom(self) |
|
5186
|
|
|
|
|
5187
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
5188
|
|
|
if hasattr( listener, "exitAtom" ): |
|
5189
|
|
|
listener.exitAtom(self) |
|
5190
|
|
|
|
|
5191
|
|
|
|
|
5192
|
|
|
|
|
5193
|
|
|
|
|
5194
|
|
|
def atom(self): |
|
5195
|
|
|
|
|
5196
|
|
|
localctx = PythonParser.AtomContext(self, self._ctx, self.state) |
|
5197
|
|
|
self.enterRule(localctx, 80, self.RULE_atom) |
|
5198
|
|
|
self._la = 0 # Token type |
|
5199
|
|
|
try: |
|
5200
|
|
|
self.state = 784 |
|
5201
|
|
|
self._errHandler.sync(self) |
|
5202
|
|
|
token = self._input.LA(1) |
|
5203
|
|
|
if token in [90]: |
|
5204
|
|
|
self.enterOuterAlt(localctx, 1) |
|
5205
|
|
|
self.state = 747 |
|
5206
|
|
|
self.match(PythonParser.OPEN_PAREN) |
|
5207
|
|
|
self.state = 750 |
|
5208
|
|
|
self._errHandler.sync(self) |
|
5209
|
|
|
token = self._input.LA(1) |
|
5210
|
|
|
if token in [30]: |
|
5211
|
|
|
self.state = 748 |
|
5212
|
|
|
self.yield_expr() |
|
5213
|
|
|
pass |
|
5214
|
|
|
elif token in [20, 24, 27, 36, 37, 38, 39, 40, 42, 43, 44, 55, 56, 60, 83, 84, 85, 86, 87, 88, 89, 90, 92, 94, 96]: |
|
5215
|
|
|
self.state = 749 |
|
5216
|
|
|
self.testlist_comp() |
|
5217
|
|
|
pass |
|
5218
|
|
|
elif token in [91]: |
|
5219
|
|
|
pass |
|
5220
|
|
|
else: |
|
5221
|
|
|
pass |
|
5222
|
|
|
self.state = 752 |
|
5223
|
|
|
self.match(PythonParser.CLOSE_PAREN) |
|
5224
|
|
|
pass |
|
5225
|
|
|
elif token in [94]: |
|
5226
|
|
|
self.enterOuterAlt(localctx, 2) |
|
5227
|
|
|
self.state = 753 |
|
5228
|
|
|
self.match(PythonParser.OPEN_BRACKET) |
|
5229
|
|
|
self.state = 755 |
|
5230
|
|
|
self._errHandler.sync(self) |
|
5231
|
|
|
_la = self._input.LA(1) |
|
5232
|
|
|
if (((_la) & ~0x3f) == 0 and ((1 << _la) & 1261040812445138944) != 0) or ((((_la - 83)) & ~0x3f) == 0 and ((1 << (_la - 83)) & 11007) != 0): |
|
5233
|
|
|
self.state = 754 |
|
5234
|
|
|
self.testlist_comp() |
|
5235
|
|
|
|
|
5236
|
|
|
|
|
5237
|
|
|
self.state = 757 |
|
5238
|
|
|
self.match(PythonParser.CLOSE_BRACKET) |
|
5239
|
|
|
pass |
|
5240
|
|
|
elif token in [92]: |
|
5241
|
|
|
self.enterOuterAlt(localctx, 3) |
|
5242
|
|
|
self.state = 758 |
|
5243
|
|
|
self.match(PythonParser.OPEN_BRACE) |
|
5244
|
|
|
self.state = 760 |
|
5245
|
|
|
self._errHandler.sync(self) |
|
5246
|
|
|
_la = self._input.LA(1) |
|
5247
|
|
|
if (((_la) & ~0x3f) == 0 and ((1 << _la) & 1261322287421849600) != 0) or ((((_la - 83)) & ~0x3f) == 0 and ((1 << (_la - 83)) & 11007) != 0): |
|
5248
|
|
|
self.state = 759 |
|
5249
|
|
|
self.dictorsetmaker() |
|
5250
|
|
|
|
|
5251
|
|
|
|
|
5252
|
|
|
self.state = 762 |
|
5253
|
|
|
self.match(PythonParser.CLOSE_BRACE) |
|
5254
|
|
|
pass |
|
5255
|
|
|
elif token in [43]: |
|
5256
|
|
|
self.enterOuterAlt(localctx, 4) |
|
5257
|
|
|
self.state = 763 |
|
5258
|
|
|
self.match(PythonParser.REVERSE_QUOTE) |
|
5259
|
|
|
self.state = 764 |
|
5260
|
|
|
self.testlist() |
|
5261
|
|
|
self.state = 766 |
|
5262
|
|
|
self._errHandler.sync(self) |
|
5263
|
|
|
_la = self._input.LA(1) |
|
5264
|
|
|
if _la==45: |
|
5265
|
|
|
self.state = 765 |
|
5266
|
|
|
self.match(PythonParser.COMMA) |
|
5267
|
|
|
|
|
5268
|
|
|
|
|
5269
|
|
|
self.state = 768 |
|
5270
|
|
|
self.match(PythonParser.REVERSE_QUOTE) |
|
5271
|
|
|
pass |
|
5272
|
|
|
elif token in [42]: |
|
5273
|
|
|
self.enterOuterAlt(localctx, 5) |
|
5274
|
|
|
self.state = 770 |
|
5275
|
|
|
self.match(PythonParser.ELLIPSIS) |
|
5276
|
|
|
pass |
|
5277
|
|
|
elif token in [39, 40, 96]: |
|
5278
|
|
|
self.enterOuterAlt(localctx, 6) |
|
5279
|
|
|
self.state = 771 |
|
5280
|
|
|
self.name() |
|
5281
|
|
|
pass |
|
5282
|
|
|
elif token in [37]: |
|
5283
|
|
|
self.enterOuterAlt(localctx, 7) |
|
5284
|
|
|
self.state = 772 |
|
5285
|
|
|
self.match(PythonParser.PRINT) |
|
5286
|
|
|
pass |
|
5287
|
|
|
elif token in [38]: |
|
5288
|
|
|
self.enterOuterAlt(localctx, 8) |
|
5289
|
|
|
self.state = 773 |
|
5290
|
|
|
self.match(PythonParser.EXEC) |
|
5291
|
|
|
pass |
|
5292
|
|
|
elif token in [56, 84, 85, 86, 87, 88, 89]: |
|
5293
|
|
|
self.enterOuterAlt(localctx, 9) |
|
5294
|
|
|
self.state = 775 |
|
5295
|
|
|
self._errHandler.sync(self) |
|
5296
|
|
|
_la = self._input.LA(1) |
|
5297
|
|
|
if _la==56: |
|
5298
|
|
|
self.state = 774 |
|
5299
|
|
|
self.match(PythonParser.MINUS) |
|
5300
|
|
|
|
|
5301
|
|
|
|
|
5302
|
|
|
self.state = 777 |
|
5303
|
|
|
self.number() |
|
5304
|
|
|
pass |
|
5305
|
|
|
elif token in [20]: |
|
5306
|
|
|
self.enterOuterAlt(localctx, 10) |
|
5307
|
|
|
self.state = 778 |
|
5308
|
|
|
self.match(PythonParser.NONE) |
|
5309
|
|
|
pass |
|
5310
|
|
|
elif token in [83]: |
|
5311
|
|
|
self.enterOuterAlt(localctx, 11) |
|
5312
|
|
|
self.state = 780 |
|
5313
|
|
|
self._errHandler.sync(self) |
|
5314
|
|
|
_alt = 1 |
|
5315
|
|
|
while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: |
|
5316
|
|
|
if _alt == 1: |
|
5317
|
|
|
self.state = 779 |
|
5318
|
|
|
self.match(PythonParser.STRING) |
|
5319
|
|
|
|
|
5320
|
|
|
else: |
|
5321
|
|
|
raise NoViableAltException(self) |
|
5322
|
|
|
self.state = 782 |
|
5323
|
|
|
self._errHandler.sync(self) |
|
5324
|
|
|
_alt = self._interp.adaptivePredict(self._input,113,self._ctx) |
|
5325
|
|
|
|
|
5326
|
|
|
pass |
|
5327
|
|
|
else: |
|
5328
|
|
|
raise NoViableAltException(self) |
|
5329
|
|
|
|
|
5330
|
|
|
except RecognitionException as re: |
|
5331
|
|
|
localctx.exception = re |
|
5332
|
|
|
self._errHandler.reportError(self, re) |
|
5333
|
|
|
self._errHandler.recover(self, re) |
|
5334
|
|
|
finally: |
|
5335
|
|
|
self.exitRule() |
|
5336
|
|
|
return localctx |
|
5337
|
|
|
|
|
5338
|
|
|
|
|
5339
|
|
|
class DictorsetmakerContext(ParserRuleContext): |
|
5340
|
|
|
__slots__ = 'parser' |
|
5341
|
|
|
|
|
5342
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
5343
|
|
|
super().__init__(parent, invokingState) |
|
5344
|
|
|
self.parser = parser |
|
5345
|
|
|
|
|
5346
|
|
|
def test(self, i:int=None): |
|
5347
|
|
|
if i is None: |
|
5348
|
|
|
return self.getTypedRuleContexts(PythonParser.TestContext) |
|
5349
|
|
|
else: |
|
5350
|
|
|
return self.getTypedRuleContext(PythonParser.TestContext,i) |
|
5351
|
|
|
|
|
5352
|
|
|
|
|
5353
|
|
|
def COLON(self, i:int=None): |
|
5354
|
|
|
if i is None: |
|
5355
|
|
|
return self.getTokens(PythonParser.COLON) |
|
5356
|
|
|
else: |
|
5357
|
|
|
return self.getToken(PythonParser.COLON, i) |
|
5358
|
|
|
|
|
5359
|
|
|
def POWER(self, i:int=None): |
|
5360
|
|
|
if i is None: |
|
5361
|
|
|
return self.getTokens(PythonParser.POWER) |
|
5362
|
|
|
else: |
|
5363
|
|
|
return self.getToken(PythonParser.POWER, i) |
|
5364
|
|
|
|
|
5365
|
|
|
def expr(self, i:int=None): |
|
5366
|
|
|
if i is None: |
|
5367
|
|
|
return self.getTypedRuleContexts(PythonParser.ExprContext) |
|
5368
|
|
|
else: |
|
5369
|
|
|
return self.getTypedRuleContext(PythonParser.ExprContext,i) |
|
5370
|
|
|
|
|
5371
|
|
|
|
|
5372
|
|
|
def COMMA(self, i:int=None): |
|
5373
|
|
|
if i is None: |
|
5374
|
|
|
return self.getTokens(PythonParser.COMMA) |
|
5375
|
|
|
else: |
|
5376
|
|
|
return self.getToken(PythonParser.COMMA, i) |
|
5377
|
|
|
|
|
5378
|
|
|
def comp_for(self): |
|
5379
|
|
|
return self.getTypedRuleContext(PythonParser.Comp_forContext,0) |
|
5380
|
|
|
|
|
5381
|
|
|
|
|
5382
|
|
|
def testlist_comp(self): |
|
5383
|
|
|
return self.getTypedRuleContext(PythonParser.Testlist_compContext,0) |
|
5384
|
|
|
|
|
5385
|
|
|
|
|
5386
|
|
|
def getRuleIndex(self): |
|
5387
|
|
|
return PythonParser.RULE_dictorsetmaker |
|
5388
|
|
|
|
|
5389
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
5390
|
|
|
if hasattr( listener, "enterDictorsetmaker" ): |
|
5391
|
|
|
listener.enterDictorsetmaker(self) |
|
5392
|
|
|
|
|
5393
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
5394
|
|
|
if hasattr( listener, "exitDictorsetmaker" ): |
|
5395
|
|
|
listener.exitDictorsetmaker(self) |
|
5396
|
|
|
|
|
5397
|
|
|
|
|
5398
|
|
|
|
|
5399
|
|
|
|
|
5400
|
|
|
def dictorsetmaker(self): |
|
5401
|
|
|
|
|
5402
|
|
|
localctx = PythonParser.DictorsetmakerContext(self, self._ctx, self.state) |
|
5403
|
|
|
self.enterRule(localctx, 82, self.RULE_dictorsetmaker) |
|
5404
|
|
|
self._la = 0 # Token type |
|
5405
|
|
|
try: |
|
5406
|
|
|
self.state = 817 |
|
5407
|
|
|
self._errHandler.sync(self) |
|
5408
|
|
|
la_ = self._interp.adaptivePredict(self._input,119,self._ctx) |
|
5409
|
|
|
if la_ == 1: |
|
5410
|
|
|
self.enterOuterAlt(localctx, 1) |
|
5411
|
|
|
self.state = 792 |
|
5412
|
|
|
self._errHandler.sync(self) |
|
5413
|
|
|
token = self._input.LA(1) |
|
5414
|
|
|
if token in [20, 24, 27, 36, 37, 38, 39, 40, 42, 43, 55, 56, 60, 83, 84, 85, 86, 87, 88, 89, 90, 92, 94, 96]: |
|
5415
|
|
|
self.state = 786 |
|
5416
|
|
|
self.test() |
|
5417
|
|
|
self.state = 787 |
|
5418
|
|
|
self.match(PythonParser.COLON) |
|
5419
|
|
|
self.state = 788 |
|
5420
|
|
|
self.test() |
|
5421
|
|
|
pass |
|
5422
|
|
|
elif token in [48]: |
|
5423
|
|
|
self.state = 790 |
|
5424
|
|
|
self.match(PythonParser.POWER) |
|
5425
|
|
|
self.state = 791 |
|
5426
|
|
|
self.expr(0) |
|
5427
|
|
|
pass |
|
5428
|
|
|
else: |
|
5429
|
|
|
raise NoViableAltException(self) |
|
5430
|
|
|
|
|
5431
|
|
|
self.state = 805 |
|
5432
|
|
|
self._errHandler.sync(self) |
|
5433
|
|
|
_alt = self._interp.adaptivePredict(self._input,117,self._ctx) |
|
5434
|
|
|
while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: |
|
5435
|
|
|
if _alt==1: |
|
5436
|
|
|
self.state = 794 |
|
5437
|
|
|
self.match(PythonParser.COMMA) |
|
5438
|
|
|
self.state = 801 |
|
5439
|
|
|
self._errHandler.sync(self) |
|
5440
|
|
|
token = self._input.LA(1) |
|
5441
|
|
|
if token in [20, 24, 27, 36, 37, 38, 39, 40, 42, 43, 55, 56, 60, 83, 84, 85, 86, 87, 88, 89, 90, 92, 94, 96]: |
|
5442
|
|
|
self.state = 795 |
|
5443
|
|
|
self.test() |
|
5444
|
|
|
self.state = 796 |
|
5445
|
|
|
self.match(PythonParser.COLON) |
|
5446
|
|
|
self.state = 797 |
|
5447
|
|
|
self.test() |
|
5448
|
|
|
pass |
|
5449
|
|
|
elif token in [48]: |
|
5450
|
|
|
self.state = 799 |
|
5451
|
|
|
self.match(PythonParser.POWER) |
|
5452
|
|
|
self.state = 800 |
|
5453
|
|
|
self.expr(0) |
|
5454
|
|
|
pass |
|
5455
|
|
|
else: |
|
5456
|
|
|
raise NoViableAltException(self) |
|
5457
|
|
|
|
|
5458
|
|
|
self.state = 807 |
|
5459
|
|
|
self._errHandler.sync(self) |
|
5460
|
|
|
_alt = self._interp.adaptivePredict(self._input,117,self._ctx) |
|
5461
|
|
|
|
|
5462
|
|
|
self.state = 809 |
|
5463
|
|
|
self._errHandler.sync(self) |
|
5464
|
|
|
_la = self._input.LA(1) |
|
5465
|
|
|
if _la==45: |
|
5466
|
|
|
self.state = 808 |
|
5467
|
|
|
self.match(PythonParser.COMMA) |
|
5468
|
|
|
|
|
5469
|
|
|
|
|
5470
|
|
|
pass |
|
5471
|
|
|
|
|
5472
|
|
|
elif la_ == 2: |
|
5473
|
|
|
self.enterOuterAlt(localctx, 2) |
|
5474
|
|
|
self.state = 811 |
|
5475
|
|
|
self.test() |
|
5476
|
|
|
self.state = 812 |
|
5477
|
|
|
self.match(PythonParser.COLON) |
|
5478
|
|
|
self.state = 813 |
|
5479
|
|
|
self.test() |
|
5480
|
|
|
self.state = 814 |
|
5481
|
|
|
self.comp_for() |
|
5482
|
|
|
pass |
|
5483
|
|
|
|
|
5484
|
|
|
elif la_ == 3: |
|
5485
|
|
|
self.enterOuterAlt(localctx, 3) |
|
5486
|
|
|
self.state = 816 |
|
5487
|
|
|
self.testlist_comp() |
|
5488
|
|
|
pass |
|
5489
|
|
|
|
|
5490
|
|
|
|
|
5491
|
|
|
except RecognitionException as re: |
|
5492
|
|
|
localctx.exception = re |
|
5493
|
|
|
self._errHandler.reportError(self, re) |
|
5494
|
|
|
self._errHandler.recover(self, re) |
|
5495
|
|
|
finally: |
|
5496
|
|
|
self.exitRule() |
|
5497
|
|
|
return localctx |
|
5498
|
|
|
|
|
5499
|
|
|
|
|
5500
|
|
|
class Testlist_compContext(ParserRuleContext): |
|
5501
|
|
|
__slots__ = 'parser' |
|
5502
|
|
|
|
|
5503
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
5504
|
|
|
super().__init__(parent, invokingState) |
|
5505
|
|
|
self.parser = parser |
|
5506
|
|
|
|
|
5507
|
|
|
def test(self, i:int=None): |
|
5508
|
|
|
if i is None: |
|
5509
|
|
|
return self.getTypedRuleContexts(PythonParser.TestContext) |
|
5510
|
|
|
else: |
|
5511
|
|
|
return self.getTypedRuleContext(PythonParser.TestContext,i) |
|
5512
|
|
|
|
|
5513
|
|
|
|
|
5514
|
|
|
def star_expr(self, i:int=None): |
|
5515
|
|
|
if i is None: |
|
5516
|
|
|
return self.getTypedRuleContexts(PythonParser.Star_exprContext) |
|
5517
|
|
|
else: |
|
5518
|
|
|
return self.getTypedRuleContext(PythonParser.Star_exprContext,i) |
|
5519
|
|
|
|
|
5520
|
|
|
|
|
5521
|
|
|
def comp_for(self): |
|
5522
|
|
|
return self.getTypedRuleContext(PythonParser.Comp_forContext,0) |
|
5523
|
|
|
|
|
5524
|
|
|
|
|
5525
|
|
|
def COMMA(self, i:int=None): |
|
5526
|
|
|
if i is None: |
|
5527
|
|
|
return self.getTokens(PythonParser.COMMA) |
|
5528
|
|
|
else: |
|
5529
|
|
|
return self.getToken(PythonParser.COMMA, i) |
|
5530
|
|
|
|
|
5531
|
|
|
def getRuleIndex(self): |
|
5532
|
|
|
return PythonParser.RULE_testlist_comp |
|
5533
|
|
|
|
|
5534
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
5535
|
|
|
if hasattr( listener, "enterTestlist_comp" ): |
|
5536
|
|
|
listener.enterTestlist_comp(self) |
|
5537
|
|
|
|
|
5538
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
5539
|
|
|
if hasattr( listener, "exitTestlist_comp" ): |
|
5540
|
|
|
listener.exitTestlist_comp(self) |
|
5541
|
|
|
|
|
5542
|
|
|
|
|
5543
|
|
|
|
|
5544
|
|
|
|
|
5545
|
|
|
def testlist_comp(self): |
|
5546
|
|
|
|
|
5547
|
|
|
localctx = PythonParser.Testlist_compContext(self, self._ctx, self.state) |
|
5548
|
|
|
self.enterRule(localctx, 84, self.RULE_testlist_comp) |
|
5549
|
|
|
self._la = 0 # Token type |
|
5550
|
|
|
try: |
|
5551
|
|
|
self.enterOuterAlt(localctx, 1) |
|
5552
|
|
|
self.state = 821 |
|
5553
|
|
|
self._errHandler.sync(self) |
|
5554
|
|
|
token = self._input.LA(1) |
|
5555
|
|
|
if token in [20, 24, 27, 36, 37, 38, 39, 40, 42, 43, 55, 56, 60, 83, 84, 85, 86, 87, 88, 89, 90, 92, 94, 96]: |
|
5556
|
|
|
self.state = 819 |
|
5557
|
|
|
self.test() |
|
5558
|
|
|
pass |
|
5559
|
|
|
elif token in [44]: |
|
5560
|
|
|
self.state = 820 |
|
5561
|
|
|
self.star_expr() |
|
5562
|
|
|
pass |
|
5563
|
|
|
else: |
|
5564
|
|
|
raise NoViableAltException(self) |
|
5565
|
|
|
|
|
5566
|
|
|
self.state = 837 |
|
5567
|
|
|
self._errHandler.sync(self) |
|
5568
|
|
|
token = self._input.LA(1) |
|
5569
|
|
|
if token in [17]: |
|
5570
|
|
|
self.state = 823 |
|
5571
|
|
|
self.comp_for() |
|
5572
|
|
|
pass |
|
5573
|
|
|
elif token in [45, 91, 93, 95]: |
|
5574
|
|
|
self.state = 831 |
|
5575
|
|
|
self._errHandler.sync(self) |
|
5576
|
|
|
_alt = self._interp.adaptivePredict(self._input,122,self._ctx) |
|
5577
|
|
|
while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: |
|
5578
|
|
|
if _alt==1: |
|
5579
|
|
|
self.state = 824 |
|
5580
|
|
|
self.match(PythonParser.COMMA) |
|
5581
|
|
|
self.state = 827 |
|
5582
|
|
|
self._errHandler.sync(self) |
|
5583
|
|
|
token = self._input.LA(1) |
|
5584
|
|
|
if token in [20, 24, 27, 36, 37, 38, 39, 40, 42, 43, 55, 56, 60, 83, 84, 85, 86, 87, 88, 89, 90, 92, 94, 96]: |
|
5585
|
|
|
self.state = 825 |
|
5586
|
|
|
self.test() |
|
5587
|
|
|
pass |
|
5588
|
|
|
elif token in [44]: |
|
5589
|
|
|
self.state = 826 |
|
5590
|
|
|
self.star_expr() |
|
5591
|
|
|
pass |
|
5592
|
|
|
else: |
|
5593
|
|
|
raise NoViableAltException(self) |
|
5594
|
|
|
|
|
5595
|
|
|
self.state = 833 |
|
5596
|
|
|
self._errHandler.sync(self) |
|
5597
|
|
|
_alt = self._interp.adaptivePredict(self._input,122,self._ctx) |
|
5598
|
|
|
|
|
5599
|
|
|
self.state = 835 |
|
5600
|
|
|
self._errHandler.sync(self) |
|
5601
|
|
|
_la = self._input.LA(1) |
|
5602
|
|
|
if _la==45: |
|
5603
|
|
|
self.state = 834 |
|
5604
|
|
|
self.match(PythonParser.COMMA) |
|
5605
|
|
|
|
|
5606
|
|
|
|
|
5607
|
|
|
pass |
|
5608
|
|
|
else: |
|
5609
|
|
|
raise NoViableAltException(self) |
|
5610
|
|
|
|
|
5611
|
|
|
except RecognitionException as re: |
|
5612
|
|
|
localctx.exception = re |
|
5613
|
|
|
self._errHandler.reportError(self, re) |
|
5614
|
|
|
self._errHandler.recover(self, re) |
|
5615
|
|
|
finally: |
|
5616
|
|
|
self.exitRule() |
|
5617
|
|
|
return localctx |
|
5618
|
|
|
|
|
5619
|
|
|
|
|
5620
|
|
|
class TestlistContext(ParserRuleContext): |
|
5621
|
|
|
__slots__ = 'parser' |
|
5622
|
|
|
|
|
5623
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
5624
|
|
|
super().__init__(parent, invokingState) |
|
5625
|
|
|
self.parser = parser |
|
5626
|
|
|
|
|
5627
|
|
|
def test(self, i:int=None): |
|
5628
|
|
|
if i is None: |
|
5629
|
|
|
return self.getTypedRuleContexts(PythonParser.TestContext) |
|
5630
|
|
|
else: |
|
5631
|
|
|
return self.getTypedRuleContext(PythonParser.TestContext,i) |
|
5632
|
|
|
|
|
5633
|
|
|
|
|
5634
|
|
|
def COMMA(self, i:int=None): |
|
5635
|
|
|
if i is None: |
|
5636
|
|
|
return self.getTokens(PythonParser.COMMA) |
|
5637
|
|
|
else: |
|
5638
|
|
|
return self.getToken(PythonParser.COMMA, i) |
|
5639
|
|
|
|
|
5640
|
|
|
def getRuleIndex(self): |
|
5641
|
|
|
return PythonParser.RULE_testlist |
|
5642
|
|
|
|
|
5643
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
5644
|
|
|
if hasattr( listener, "enterTestlist" ): |
|
5645
|
|
|
listener.enterTestlist(self) |
|
5646
|
|
|
|
|
5647
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
5648
|
|
|
if hasattr( listener, "exitTestlist" ): |
|
5649
|
|
|
listener.exitTestlist(self) |
|
5650
|
|
|
|
|
5651
|
|
|
|
|
5652
|
|
|
|
|
5653
|
|
|
|
|
5654
|
|
|
def testlist(self): |
|
5655
|
|
|
|
|
5656
|
|
|
localctx = PythonParser.TestlistContext(self, self._ctx, self.state) |
|
5657
|
|
|
self.enterRule(localctx, 86, self.RULE_testlist) |
|
5658
|
|
|
try: |
|
5659
|
|
|
self.enterOuterAlt(localctx, 1) |
|
5660
|
|
|
self.state = 839 |
|
5661
|
|
|
self.test() |
|
5662
|
|
|
self.state = 844 |
|
5663
|
|
|
self._errHandler.sync(self) |
|
5664
|
|
|
_alt = self._interp.adaptivePredict(self._input,125,self._ctx) |
|
5665
|
|
|
while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: |
|
5666
|
|
|
if _alt==1: |
|
5667
|
|
|
self.state = 840 |
|
5668
|
|
|
self.match(PythonParser.COMMA) |
|
5669
|
|
|
self.state = 841 |
|
5670
|
|
|
self.test() |
|
5671
|
|
|
self.state = 846 |
|
5672
|
|
|
self._errHandler.sync(self) |
|
5673
|
|
|
_alt = self._interp.adaptivePredict(self._input,125,self._ctx) |
|
5674
|
|
|
|
|
5675
|
|
|
self.state = 848 |
|
5676
|
|
|
self._errHandler.sync(self) |
|
5677
|
|
|
la_ = self._interp.adaptivePredict(self._input,126,self._ctx) |
|
5678
|
|
|
if la_ == 1: |
|
5679
|
|
|
self.state = 847 |
|
5680
|
|
|
self.match(PythonParser.COMMA) |
|
5681
|
|
|
|
|
5682
|
|
|
|
|
5683
|
|
|
except RecognitionException as re: |
|
5684
|
|
|
localctx.exception = re |
|
5685
|
|
|
self._errHandler.reportError(self, re) |
|
5686
|
|
|
self._errHandler.recover(self, re) |
|
5687
|
|
|
finally: |
|
5688
|
|
|
self.exitRule() |
|
5689
|
|
|
return localctx |
|
5690
|
|
|
|
|
5691
|
|
|
|
|
5692
|
|
|
class Dotted_nameContext(ParserRuleContext): |
|
5693
|
|
|
__slots__ = 'parser' |
|
5694
|
|
|
|
|
5695
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
5696
|
|
|
super().__init__(parent, invokingState) |
|
5697
|
|
|
self.parser = parser |
|
5698
|
|
|
|
|
5699
|
|
|
def name(self): |
|
5700
|
|
|
return self.getTypedRuleContext(PythonParser.NameContext,0) |
|
5701
|
|
|
|
|
5702
|
|
|
|
|
5703
|
|
|
def dotted_name(self): |
|
5704
|
|
|
return self.getTypedRuleContext(PythonParser.Dotted_nameContext,0) |
|
5705
|
|
|
|
|
5706
|
|
|
|
|
5707
|
|
|
def DOT(self): |
|
5708
|
|
|
return self.getToken(PythonParser.DOT, 0) |
|
5709
|
|
|
|
|
5710
|
|
|
def getRuleIndex(self): |
|
5711
|
|
|
return PythonParser.RULE_dotted_name |
|
5712
|
|
|
|
|
5713
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
5714
|
|
|
if hasattr( listener, "enterDotted_name" ): |
|
5715
|
|
|
listener.enterDotted_name(self) |
|
5716
|
|
|
|
|
5717
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
5718
|
|
|
if hasattr( listener, "exitDotted_name" ): |
|
5719
|
|
|
listener.exitDotted_name(self) |
|
5720
|
|
|
|
|
5721
|
|
|
|
|
5722
|
|
|
|
|
5723
|
|
|
def dotted_name(self, _p:int=0): |
|
5724
|
|
|
_parentctx = self._ctx |
|
5725
|
|
|
_parentState = self.state |
|
5726
|
|
|
localctx = PythonParser.Dotted_nameContext(self, self._ctx, _parentState) |
|
5727
|
|
|
_prevctx = localctx |
|
5728
|
|
|
_startState = 88 |
|
5729
|
|
|
self.enterRecursionRule(localctx, 88, self.RULE_dotted_name, _p) |
|
5730
|
|
|
try: |
|
5731
|
|
|
self.enterOuterAlt(localctx, 1) |
|
5732
|
|
|
self.state = 851 |
|
5733
|
|
|
self.name() |
|
5734
|
|
|
self._ctx.stop = self._input.LT(-1) |
|
5735
|
|
|
self.state = 858 |
|
5736
|
|
|
self._errHandler.sync(self) |
|
5737
|
|
|
_alt = self._interp.adaptivePredict(self._input,127,self._ctx) |
|
5738
|
|
|
while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: |
|
5739
|
|
|
if _alt==1: |
|
5740
|
|
|
if self._parseListeners is not None: |
|
5741
|
|
|
self.triggerExitRuleEvent() |
|
5742
|
|
|
_prevctx = localctx |
|
5743
|
|
|
localctx = PythonParser.Dotted_nameContext(self, _parentctx, _parentState) |
|
5744
|
|
|
self.pushNewRecursionContext(localctx, _startState, self.RULE_dotted_name) |
|
5745
|
|
|
self.state = 853 |
|
5746
|
|
|
if not self.precpred(self._ctx, 2): |
|
5747
|
|
|
from antlr4.error.Errors import FailedPredicateException |
|
5748
|
|
|
raise FailedPredicateException(self, "self.precpred(self._ctx, 2)") |
|
5749
|
|
|
self.state = 854 |
|
5750
|
|
|
self.match(PythonParser.DOT) |
|
5751
|
|
|
self.state = 855 |
|
5752
|
|
|
self.name() |
|
5753
|
|
|
self.state = 860 |
|
5754
|
|
|
self._errHandler.sync(self) |
|
5755
|
|
|
_alt = self._interp.adaptivePredict(self._input,127,self._ctx) |
|
5756
|
|
|
|
|
5757
|
|
|
except RecognitionException as re: |
|
5758
|
|
|
localctx.exception = re |
|
5759
|
|
|
self._errHandler.reportError(self, re) |
|
5760
|
|
|
self._errHandler.recover(self, re) |
|
5761
|
|
|
finally: |
|
5762
|
|
|
self.unrollRecursionContexts(_parentctx) |
|
5763
|
|
|
return localctx |
|
5764
|
|
|
|
|
5765
|
|
|
|
|
5766
|
|
|
class NameContext(ParserRuleContext): |
|
5767
|
|
|
__slots__ = 'parser' |
|
5768
|
|
|
|
|
5769
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
5770
|
|
|
super().__init__(parent, invokingState) |
|
5771
|
|
|
self.parser = parser |
|
5772
|
|
|
|
|
5773
|
|
|
def NAME(self): |
|
5774
|
|
|
return self.getToken(PythonParser.NAME, 0) |
|
5775
|
|
|
|
|
5776
|
|
|
def TRUE(self): |
|
5777
|
|
|
return self.getToken(PythonParser.TRUE, 0) |
|
5778
|
|
|
|
|
5779
|
|
|
def FALSE(self): |
|
5780
|
|
|
return self.getToken(PythonParser.FALSE, 0) |
|
5781
|
|
|
|
|
5782
|
|
|
def getRuleIndex(self): |
|
5783
|
|
|
return PythonParser.RULE_name |
|
5784
|
|
|
|
|
5785
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
5786
|
|
|
if hasattr( listener, "enterName" ): |
|
5787
|
|
|
listener.enterName(self) |
|
5788
|
|
|
|
|
5789
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
5790
|
|
|
if hasattr( listener, "exitName" ): |
|
5791
|
|
|
listener.exitName(self) |
|
5792
|
|
|
|
|
5793
|
|
|
|
|
5794
|
|
|
|
|
5795
|
|
|
|
|
5796
|
|
|
def name(self): |
|
5797
|
|
|
|
|
5798
|
|
|
localctx = PythonParser.NameContext(self, self._ctx, self.state) |
|
5799
|
|
|
self.enterRule(localctx, 90, self.RULE_name) |
|
5800
|
|
|
self._la = 0 # Token type |
|
5801
|
|
|
try: |
|
5802
|
|
|
self.enterOuterAlt(localctx, 1) |
|
5803
|
|
|
self.state = 861 |
|
5804
|
|
|
_la = self._input.LA(1) |
|
5805
|
|
|
if not(((((_la - 39)) & ~0x3f) == 0 and ((1 << (_la - 39)) & 144115188075855875) != 0)): |
|
5806
|
|
|
self._errHandler.recoverInline(self) |
|
5807
|
|
|
else: |
|
5808
|
|
|
self._errHandler.reportMatch(self) |
|
5809
|
|
|
self.consume() |
|
5810
|
|
|
except RecognitionException as re: |
|
5811
|
|
|
localctx.exception = re |
|
5812
|
|
|
self._errHandler.reportError(self, re) |
|
5813
|
|
|
self._errHandler.recover(self, re) |
|
5814
|
|
|
finally: |
|
5815
|
|
|
self.exitRule() |
|
5816
|
|
|
return localctx |
|
5817
|
|
|
|
|
5818
|
|
|
|
|
5819
|
|
|
class NumberContext(ParserRuleContext): |
|
5820
|
|
|
__slots__ = 'parser' |
|
5821
|
|
|
|
|
5822
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
5823
|
|
|
super().__init__(parent, invokingState) |
|
5824
|
|
|
self.parser = parser |
|
5825
|
|
|
|
|
5826
|
|
|
def integer(self): |
|
5827
|
|
|
return self.getTypedRuleContext(PythonParser.IntegerContext,0) |
|
5828
|
|
|
|
|
5829
|
|
|
|
|
5830
|
|
|
def IMAG_NUMBER(self): |
|
5831
|
|
|
return self.getToken(PythonParser.IMAG_NUMBER, 0) |
|
5832
|
|
|
|
|
5833
|
|
|
def FLOAT_NUMBER(self): |
|
5834
|
|
|
return self.getToken(PythonParser.FLOAT_NUMBER, 0) |
|
5835
|
|
|
|
|
5836
|
|
|
def getRuleIndex(self): |
|
5837
|
|
|
return PythonParser.RULE_number |
|
5838
|
|
|
|
|
5839
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
5840
|
|
|
if hasattr( listener, "enterNumber" ): |
|
5841
|
|
|
listener.enterNumber(self) |
|
5842
|
|
|
|
|
5843
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
5844
|
|
|
if hasattr( listener, "exitNumber" ): |
|
5845
|
|
|
listener.exitNumber(self) |
|
5846
|
|
|
|
|
5847
|
|
|
|
|
5848
|
|
|
|
|
5849
|
|
|
|
|
5850
|
|
|
def number(self): |
|
5851
|
|
|
|
|
5852
|
|
|
localctx = PythonParser.NumberContext(self, self._ctx, self.state) |
|
5853
|
|
|
self.enterRule(localctx, 92, self.RULE_number) |
|
5854
|
|
|
try: |
|
5855
|
|
|
self.state = 866 |
|
5856
|
|
|
self._errHandler.sync(self) |
|
5857
|
|
|
token = self._input.LA(1) |
|
5858
|
|
|
if token in [84, 85, 86, 87]: |
|
5859
|
|
|
self.enterOuterAlt(localctx, 1) |
|
5860
|
|
|
self.state = 863 |
|
5861
|
|
|
self.integer() |
|
5862
|
|
|
pass |
|
5863
|
|
|
elif token in [88]: |
|
5864
|
|
|
self.enterOuterAlt(localctx, 2) |
|
5865
|
|
|
self.state = 864 |
|
5866
|
|
|
self.match(PythonParser.IMAG_NUMBER) |
|
5867
|
|
|
pass |
|
5868
|
|
|
elif token in [89]: |
|
5869
|
|
|
self.enterOuterAlt(localctx, 3) |
|
5870
|
|
|
self.state = 865 |
|
5871
|
|
|
self.match(PythonParser.FLOAT_NUMBER) |
|
5872
|
|
|
pass |
|
5873
|
|
|
else: |
|
5874
|
|
|
raise NoViableAltException(self) |
|
5875
|
|
|
|
|
5876
|
|
|
except RecognitionException as re: |
|
5877
|
|
|
localctx.exception = re |
|
5878
|
|
|
self._errHandler.reportError(self, re) |
|
5879
|
|
|
self._errHandler.recover(self, re) |
|
5880
|
|
|
finally: |
|
5881
|
|
|
self.exitRule() |
|
5882
|
|
|
return localctx |
|
5883
|
|
|
|
|
5884
|
|
|
|
|
5885
|
|
|
class IntegerContext(ParserRuleContext): |
|
5886
|
|
|
__slots__ = 'parser' |
|
5887
|
|
|
|
|
5888
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
5889
|
|
|
super().__init__(parent, invokingState) |
|
5890
|
|
|
self.parser = parser |
|
5891
|
|
|
|
|
5892
|
|
|
def DECIMAL_INTEGER(self): |
|
5893
|
|
|
return self.getToken(PythonParser.DECIMAL_INTEGER, 0) |
|
5894
|
|
|
|
|
5895
|
|
|
def OCT_INTEGER(self): |
|
5896
|
|
|
return self.getToken(PythonParser.OCT_INTEGER, 0) |
|
5897
|
|
|
|
|
5898
|
|
|
def HEX_INTEGER(self): |
|
5899
|
|
|
return self.getToken(PythonParser.HEX_INTEGER, 0) |
|
5900
|
|
|
|
|
5901
|
|
|
def BIN_INTEGER(self): |
|
5902
|
|
|
return self.getToken(PythonParser.BIN_INTEGER, 0) |
|
5903
|
|
|
|
|
5904
|
|
|
def getRuleIndex(self): |
|
5905
|
|
|
return PythonParser.RULE_integer |
|
5906
|
|
|
|
|
5907
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
5908
|
|
|
if hasattr( listener, "enterInteger" ): |
|
5909
|
|
|
listener.enterInteger(self) |
|
5910
|
|
|
|
|
5911
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
5912
|
|
|
if hasattr( listener, "exitInteger" ): |
|
5913
|
|
|
listener.exitInteger(self) |
|
5914
|
|
|
|
|
5915
|
|
|
|
|
5916
|
|
|
|
|
5917
|
|
|
|
|
5918
|
|
|
def integer(self): |
|
5919
|
|
|
|
|
5920
|
|
|
localctx = PythonParser.IntegerContext(self, self._ctx, self.state) |
|
5921
|
|
|
self.enterRule(localctx, 94, self.RULE_integer) |
|
5922
|
|
|
self._la = 0 # Token type |
|
5923
|
|
|
try: |
|
5924
|
|
|
self.enterOuterAlt(localctx, 1) |
|
5925
|
|
|
self.state = 868 |
|
5926
|
|
|
_la = self._input.LA(1) |
|
5927
|
|
|
if not(((((_la - 84)) & ~0x3f) == 0 and ((1 << (_la - 84)) & 15) != 0)): |
|
5928
|
|
|
self._errHandler.recoverInline(self) |
|
5929
|
|
|
else: |
|
5930
|
|
|
self._errHandler.reportMatch(self) |
|
5931
|
|
|
self.consume() |
|
5932
|
|
|
except RecognitionException as re: |
|
5933
|
|
|
localctx.exception = re |
|
5934
|
|
|
self._errHandler.reportError(self, re) |
|
5935
|
|
|
self._errHandler.recover(self, re) |
|
5936
|
|
|
finally: |
|
5937
|
|
|
self.exitRule() |
|
5938
|
|
|
return localctx |
|
5939
|
|
|
|
|
5940
|
|
|
|
|
5941
|
|
|
class Yield_exprContext(ParserRuleContext): |
|
5942
|
|
|
__slots__ = 'parser' |
|
5943
|
|
|
|
|
5944
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
5945
|
|
|
super().__init__(parent, invokingState) |
|
5946
|
|
|
self.parser = parser |
|
5947
|
|
|
|
|
5948
|
|
|
def YIELD(self): |
|
5949
|
|
|
return self.getToken(PythonParser.YIELD, 0) |
|
5950
|
|
|
|
|
5951
|
|
|
def yield_arg(self): |
|
5952
|
|
|
return self.getTypedRuleContext(PythonParser.Yield_argContext,0) |
|
5953
|
|
|
|
|
5954
|
|
|
|
|
5955
|
|
|
def getRuleIndex(self): |
|
5956
|
|
|
return PythonParser.RULE_yield_expr |
|
5957
|
|
|
|
|
5958
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
5959
|
|
|
if hasattr( listener, "enterYield_expr" ): |
|
5960
|
|
|
listener.enterYield_expr(self) |
|
5961
|
|
|
|
|
5962
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
5963
|
|
|
if hasattr( listener, "exitYield_expr" ): |
|
5964
|
|
|
listener.exitYield_expr(self) |
|
5965
|
|
|
|
|
5966
|
|
|
|
|
5967
|
|
|
|
|
5968
|
|
|
|
|
5969
|
|
|
def yield_expr(self): |
|
5970
|
|
|
|
|
5971
|
|
|
localctx = PythonParser.Yield_exprContext(self, self._ctx, self.state) |
|
5972
|
|
|
self.enterRule(localctx, 96, self.RULE_yield_expr) |
|
5973
|
|
|
self._la = 0 # Token type |
|
5974
|
|
|
try: |
|
5975
|
|
|
self.enterOuterAlt(localctx, 1) |
|
5976
|
|
|
self.state = 870 |
|
5977
|
|
|
self.match(PythonParser.YIELD) |
|
5978
|
|
|
self.state = 872 |
|
5979
|
|
|
self._errHandler.sync(self) |
|
5980
|
|
|
_la = self._input.LA(1) |
|
5981
|
|
|
if (((_la) & ~0x3f) == 0 and ((1 << _la) & 1261023220259094656) != 0) or ((((_la - 83)) & ~0x3f) == 0 and ((1 << (_la - 83)) & 11007) != 0): |
|
5982
|
|
|
self.state = 871 |
|
5983
|
|
|
self.yield_arg() |
|
5984
|
|
|
|
|
5985
|
|
|
|
|
5986
|
|
|
except RecognitionException as re: |
|
5987
|
|
|
localctx.exception = re |
|
5988
|
|
|
self._errHandler.reportError(self, re) |
|
5989
|
|
|
self._errHandler.recover(self, re) |
|
5990
|
|
|
finally: |
|
5991
|
|
|
self.exitRule() |
|
5992
|
|
|
return localctx |
|
5993
|
|
|
|
|
5994
|
|
|
|
|
5995
|
|
|
class Yield_argContext(ParserRuleContext): |
|
5996
|
|
|
__slots__ = 'parser' |
|
5997
|
|
|
|
|
5998
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
5999
|
|
|
super().__init__(parent, invokingState) |
|
6000
|
|
|
self.parser = parser |
|
6001
|
|
|
|
|
6002
|
|
|
def FROM(self): |
|
6003
|
|
|
return self.getToken(PythonParser.FROM, 0) |
|
6004
|
|
|
|
|
6005
|
|
|
def test(self): |
|
6006
|
|
|
return self.getTypedRuleContext(PythonParser.TestContext,0) |
|
6007
|
|
|
|
|
6008
|
|
|
|
|
6009
|
|
|
def testlist(self): |
|
6010
|
|
|
return self.getTypedRuleContext(PythonParser.TestlistContext,0) |
|
6011
|
|
|
|
|
6012
|
|
|
|
|
6013
|
|
|
def getRuleIndex(self): |
|
6014
|
|
|
return PythonParser.RULE_yield_arg |
|
6015
|
|
|
|
|
6016
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
6017
|
|
|
if hasattr( listener, "enterYield_arg" ): |
|
6018
|
|
|
listener.enterYield_arg(self) |
|
6019
|
|
|
|
|
6020
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
6021
|
|
|
if hasattr( listener, "exitYield_arg" ): |
|
6022
|
|
|
listener.exitYield_arg(self) |
|
6023
|
|
|
|
|
6024
|
|
|
|
|
6025
|
|
|
|
|
6026
|
|
|
|
|
6027
|
|
|
def yield_arg(self): |
|
6028
|
|
|
|
|
6029
|
|
|
localctx = PythonParser.Yield_argContext(self, self._ctx, self.state) |
|
6030
|
|
|
self.enterRule(localctx, 98, self.RULE_yield_arg) |
|
6031
|
|
|
try: |
|
6032
|
|
|
self.state = 877 |
|
6033
|
|
|
self._errHandler.sync(self) |
|
6034
|
|
|
token = self._input.LA(1) |
|
6035
|
|
|
if token in [7]: |
|
6036
|
|
|
self.enterOuterAlt(localctx, 1) |
|
6037
|
|
|
self.state = 874 |
|
6038
|
|
|
self.match(PythonParser.FROM) |
|
6039
|
|
|
self.state = 875 |
|
6040
|
|
|
self.test() |
|
6041
|
|
|
pass |
|
6042
|
|
|
elif token in [20, 24, 27, 36, 37, 38, 39, 40, 42, 43, 55, 56, 60, 83, 84, 85, 86, 87, 88, 89, 90, 92, 94, 96]: |
|
6043
|
|
|
self.enterOuterAlt(localctx, 2) |
|
6044
|
|
|
self.state = 876 |
|
6045
|
|
|
self.testlist() |
|
6046
|
|
|
pass |
|
6047
|
|
|
else: |
|
6048
|
|
|
raise NoViableAltException(self) |
|
6049
|
|
|
|
|
6050
|
|
|
except RecognitionException as re: |
|
6051
|
|
|
localctx.exception = re |
|
6052
|
|
|
self._errHandler.reportError(self, re) |
|
6053
|
|
|
self._errHandler.recover(self, re) |
|
6054
|
|
|
finally: |
|
6055
|
|
|
self.exitRule() |
|
6056
|
|
|
return localctx |
|
6057
|
|
|
|
|
6058
|
|
|
|
|
6059
|
|
|
class TrailerContext(ParserRuleContext): |
|
6060
|
|
|
__slots__ = 'parser' |
|
6061
|
|
|
|
|
6062
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
6063
|
|
|
super().__init__(parent, invokingState) |
|
6064
|
|
|
self.parser = parser |
|
6065
|
|
|
|
|
6066
|
|
|
def DOT(self): |
|
6067
|
|
|
return self.getToken(PythonParser.DOT, 0) |
|
6068
|
|
|
|
|
6069
|
|
|
def name(self): |
|
6070
|
|
|
return self.getTypedRuleContext(PythonParser.NameContext,0) |
|
6071
|
|
|
|
|
6072
|
|
|
|
|
6073
|
|
|
def arguments(self): |
|
6074
|
|
|
return self.getTypedRuleContext(PythonParser.ArgumentsContext,0) |
|
6075
|
|
|
|
|
6076
|
|
|
|
|
6077
|
|
|
def getRuleIndex(self): |
|
6078
|
|
|
return PythonParser.RULE_trailer |
|
6079
|
|
|
|
|
6080
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
6081
|
|
|
if hasattr( listener, "enterTrailer" ): |
|
6082
|
|
|
listener.enterTrailer(self) |
|
6083
|
|
|
|
|
6084
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
6085
|
|
|
if hasattr( listener, "exitTrailer" ): |
|
6086
|
|
|
listener.exitTrailer(self) |
|
6087
|
|
|
|
|
6088
|
|
|
|
|
6089
|
|
|
|
|
6090
|
|
|
|
|
6091
|
|
|
def trailer(self): |
|
6092
|
|
|
|
|
6093
|
|
|
localctx = PythonParser.TrailerContext(self, self._ctx, self.state) |
|
6094
|
|
|
self.enterRule(localctx, 100, self.RULE_trailer) |
|
6095
|
|
|
try: |
|
6096
|
|
|
self.state = 885 |
|
6097
|
|
|
self._errHandler.sync(self) |
|
6098
|
|
|
token = self._input.LA(1) |
|
6099
|
|
|
if token in [41]: |
|
6100
|
|
|
self.enterOuterAlt(localctx, 1) |
|
6101
|
|
|
self.state = 879 |
|
6102
|
|
|
self.match(PythonParser.DOT) |
|
6103
|
|
|
self.state = 880 |
|
6104
|
|
|
self.name() |
|
6105
|
|
|
self.state = 882 |
|
6106
|
|
|
self._errHandler.sync(self) |
|
6107
|
|
|
la_ = self._interp.adaptivePredict(self._input,131,self._ctx) |
|
6108
|
|
|
if la_ == 1: |
|
6109
|
|
|
self.state = 881 |
|
6110
|
|
|
self.arguments() |
|
6111
|
|
|
|
|
6112
|
|
|
|
|
6113
|
|
|
pass |
|
6114
|
|
|
elif token in [90, 94]: |
|
6115
|
|
|
self.enterOuterAlt(localctx, 2) |
|
6116
|
|
|
self.state = 884 |
|
6117
|
|
|
self.arguments() |
|
6118
|
|
|
pass |
|
6119
|
|
|
else: |
|
6120
|
|
|
raise NoViableAltException(self) |
|
6121
|
|
|
|
|
6122
|
|
|
except RecognitionException as re: |
|
6123
|
|
|
localctx.exception = re |
|
6124
|
|
|
self._errHandler.reportError(self, re) |
|
6125
|
|
|
self._errHandler.recover(self, re) |
|
6126
|
|
|
finally: |
|
6127
|
|
|
self.exitRule() |
|
6128
|
|
|
return localctx |
|
6129
|
|
|
|
|
6130
|
|
|
|
|
6131
|
|
|
class ArgumentsContext(ParserRuleContext): |
|
6132
|
|
|
__slots__ = 'parser' |
|
6133
|
|
|
|
|
6134
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
6135
|
|
|
super().__init__(parent, invokingState) |
|
6136
|
|
|
self.parser = parser |
|
6137
|
|
|
|
|
6138
|
|
|
def OPEN_PAREN(self): |
|
6139
|
|
|
return self.getToken(PythonParser.OPEN_PAREN, 0) |
|
6140
|
|
|
|
|
6141
|
|
|
def CLOSE_PAREN(self): |
|
6142
|
|
|
return self.getToken(PythonParser.CLOSE_PAREN, 0) |
|
6143
|
|
|
|
|
6144
|
|
|
def arglist(self): |
|
6145
|
|
|
return self.getTypedRuleContext(PythonParser.ArglistContext,0) |
|
6146
|
|
|
|
|
6147
|
|
|
|
|
6148
|
|
|
def OPEN_BRACKET(self): |
|
6149
|
|
|
return self.getToken(PythonParser.OPEN_BRACKET, 0) |
|
6150
|
|
|
|
|
6151
|
|
|
def subscriptlist(self): |
|
6152
|
|
|
return self.getTypedRuleContext(PythonParser.SubscriptlistContext,0) |
|
6153
|
|
|
|
|
6154
|
|
|
|
|
6155
|
|
|
def CLOSE_BRACKET(self): |
|
6156
|
|
|
return self.getToken(PythonParser.CLOSE_BRACKET, 0) |
|
6157
|
|
|
|
|
6158
|
|
|
def getRuleIndex(self): |
|
6159
|
|
|
return PythonParser.RULE_arguments |
|
6160
|
|
|
|
|
6161
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
6162
|
|
|
if hasattr( listener, "enterArguments" ): |
|
6163
|
|
|
listener.enterArguments(self) |
|
6164
|
|
|
|
|
6165
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
6166
|
|
|
if hasattr( listener, "exitArguments" ): |
|
6167
|
|
|
listener.exitArguments(self) |
|
6168
|
|
|
|
|
6169
|
|
|
|
|
6170
|
|
|
|
|
6171
|
|
|
|
|
6172
|
|
|
def arguments(self): |
|
6173
|
|
|
|
|
6174
|
|
|
localctx = PythonParser.ArgumentsContext(self, self._ctx, self.state) |
|
6175
|
|
|
self.enterRule(localctx, 102, self.RULE_arguments) |
|
6176
|
|
|
self._la = 0 # Token type |
|
6177
|
|
|
try: |
|
6178
|
|
|
self.state = 896 |
|
6179
|
|
|
self._errHandler.sync(self) |
|
6180
|
|
|
token = self._input.LA(1) |
|
6181
|
|
|
if token in [90]: |
|
6182
|
|
|
self.enterOuterAlt(localctx, 1) |
|
6183
|
|
|
self.state = 887 |
|
6184
|
|
|
self.match(PythonParser.OPEN_PAREN) |
|
6185
|
|
|
self.state = 889 |
|
6186
|
|
|
self._errHandler.sync(self) |
|
6187
|
|
|
_la = self._input.LA(1) |
|
6188
|
|
|
if (((_la) & ~0x3f) == 0 and ((1 << _la) & 1261322287421849600) != 0) or ((((_la - 83)) & ~0x3f) == 0 and ((1 << (_la - 83)) & 11007) != 0): |
|
6189
|
|
|
self.state = 888 |
|
6190
|
|
|
self.arglist() |
|
6191
|
|
|
|
|
6192
|
|
|
|
|
6193
|
|
|
self.state = 891 |
|
6194
|
|
|
self.match(PythonParser.CLOSE_PAREN) |
|
6195
|
|
|
pass |
|
6196
|
|
|
elif token in [94]: |
|
6197
|
|
|
self.enterOuterAlt(localctx, 2) |
|
6198
|
|
|
self.state = 892 |
|
6199
|
|
|
self.match(PythonParser.OPEN_BRACKET) |
|
6200
|
|
|
self.state = 893 |
|
6201
|
|
|
self.subscriptlist() |
|
6202
|
|
|
self.state = 894 |
|
6203
|
|
|
self.match(PythonParser.CLOSE_BRACKET) |
|
6204
|
|
|
pass |
|
6205
|
|
|
else: |
|
6206
|
|
|
raise NoViableAltException(self) |
|
6207
|
|
|
|
|
6208
|
|
|
except RecognitionException as re: |
|
6209
|
|
|
localctx.exception = re |
|
6210
|
|
|
self._errHandler.reportError(self, re) |
|
6211
|
|
|
self._errHandler.recover(self, re) |
|
6212
|
|
|
finally: |
|
6213
|
|
|
self.exitRule() |
|
6214
|
|
|
return localctx |
|
6215
|
|
|
|
|
6216
|
|
|
|
|
6217
|
|
|
class ArglistContext(ParserRuleContext): |
|
6218
|
|
|
__slots__ = 'parser' |
|
6219
|
|
|
|
|
6220
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
6221
|
|
|
super().__init__(parent, invokingState) |
|
6222
|
|
|
self.parser = parser |
|
6223
|
|
|
|
|
6224
|
|
|
def argument(self, i:int=None): |
|
6225
|
|
|
if i is None: |
|
6226
|
|
|
return self.getTypedRuleContexts(PythonParser.ArgumentContext) |
|
6227
|
|
|
else: |
|
6228
|
|
|
return self.getTypedRuleContext(PythonParser.ArgumentContext,i) |
|
6229
|
|
|
|
|
6230
|
|
|
|
|
6231
|
|
|
def COMMA(self, i:int=None): |
|
6232
|
|
|
if i is None: |
|
6233
|
|
|
return self.getTokens(PythonParser.COMMA) |
|
6234
|
|
|
else: |
|
6235
|
|
|
return self.getToken(PythonParser.COMMA, i) |
|
6236
|
|
|
|
|
6237
|
|
|
def getRuleIndex(self): |
|
6238
|
|
|
return PythonParser.RULE_arglist |
|
6239
|
|
|
|
|
6240
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
6241
|
|
|
if hasattr( listener, "enterArglist" ): |
|
6242
|
|
|
listener.enterArglist(self) |
|
6243
|
|
|
|
|
6244
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
6245
|
|
|
if hasattr( listener, "exitArglist" ): |
|
6246
|
|
|
listener.exitArglist(self) |
|
6247
|
|
|
|
|
6248
|
|
|
|
|
6249
|
|
|
|
|
6250
|
|
|
|
|
6251
|
|
|
def arglist(self): |
|
6252
|
|
|
|
|
6253
|
|
|
localctx = PythonParser.ArglistContext(self, self._ctx, self.state) |
|
6254
|
|
|
self.enterRule(localctx, 104, self.RULE_arglist) |
|
6255
|
|
|
self._la = 0 # Token type |
|
6256
|
|
|
try: |
|
6257
|
|
|
self.enterOuterAlt(localctx, 1) |
|
6258
|
|
|
self.state = 898 |
|
6259
|
|
|
self.argument() |
|
6260
|
|
|
self.state = 903 |
|
6261
|
|
|
self._errHandler.sync(self) |
|
6262
|
|
|
_alt = self._interp.adaptivePredict(self._input,135,self._ctx) |
|
6263
|
|
|
while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: |
|
6264
|
|
|
if _alt==1: |
|
6265
|
|
|
self.state = 899 |
|
6266
|
|
|
self.match(PythonParser.COMMA) |
|
6267
|
|
|
self.state = 900 |
|
6268
|
|
|
self.argument() |
|
6269
|
|
|
self.state = 905 |
|
6270
|
|
|
self._errHandler.sync(self) |
|
6271
|
|
|
_alt = self._interp.adaptivePredict(self._input,135,self._ctx) |
|
6272
|
|
|
|
|
6273
|
|
|
self.state = 907 |
|
6274
|
|
|
self._errHandler.sync(self) |
|
6275
|
|
|
_la = self._input.LA(1) |
|
6276
|
|
|
if _la==45: |
|
6277
|
|
|
self.state = 906 |
|
6278
|
|
|
self.match(PythonParser.COMMA) |
|
6279
|
|
|
|
|
6280
|
|
|
|
|
6281
|
|
|
except RecognitionException as re: |
|
6282
|
|
|
localctx.exception = re |
|
6283
|
|
|
self._errHandler.reportError(self, re) |
|
6284
|
|
|
self._errHandler.recover(self, re) |
|
6285
|
|
|
finally: |
|
6286
|
|
|
self.exitRule() |
|
6287
|
|
|
return localctx |
|
6288
|
|
|
|
|
6289
|
|
|
|
|
6290
|
|
|
class ArgumentContext(ParserRuleContext): |
|
6291
|
|
|
__slots__ = 'parser' |
|
6292
|
|
|
|
|
6293
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
6294
|
|
|
super().__init__(parent, invokingState) |
|
6295
|
|
|
self.parser = parser |
|
6296
|
|
|
|
|
6297
|
|
|
def test(self, i:int=None): |
|
6298
|
|
|
if i is None: |
|
6299
|
|
|
return self.getTypedRuleContexts(PythonParser.TestContext) |
|
6300
|
|
|
else: |
|
6301
|
|
|
return self.getTypedRuleContext(PythonParser.TestContext,i) |
|
6302
|
|
|
|
|
6303
|
|
|
|
|
6304
|
|
|
def comp_for(self): |
|
6305
|
|
|
return self.getTypedRuleContext(PythonParser.Comp_forContext,0) |
|
6306
|
|
|
|
|
6307
|
|
|
|
|
6308
|
|
|
def ASSIGN(self): |
|
6309
|
|
|
return self.getToken(PythonParser.ASSIGN, 0) |
|
6310
|
|
|
|
|
6311
|
|
|
def POWER(self): |
|
6312
|
|
|
return self.getToken(PythonParser.POWER, 0) |
|
6313
|
|
|
|
|
6314
|
|
|
def STAR(self): |
|
6315
|
|
|
return self.getToken(PythonParser.STAR, 0) |
|
6316
|
|
|
|
|
6317
|
|
|
def getRuleIndex(self): |
|
6318
|
|
|
return PythonParser.RULE_argument |
|
6319
|
|
|
|
|
6320
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
6321
|
|
|
if hasattr( listener, "enterArgument" ): |
|
6322
|
|
|
listener.enterArgument(self) |
|
6323
|
|
|
|
|
6324
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
6325
|
|
|
if hasattr( listener, "exitArgument" ): |
|
6326
|
|
|
listener.exitArgument(self) |
|
6327
|
|
|
|
|
6328
|
|
|
|
|
6329
|
|
|
|
|
6330
|
|
|
|
|
6331
|
|
|
def argument(self): |
|
6332
|
|
|
|
|
6333
|
|
|
localctx = PythonParser.ArgumentContext(self, self._ctx, self.state) |
|
6334
|
|
|
self.enterRule(localctx, 106, self.RULE_argument) |
|
6335
|
|
|
self._la = 0 # Token type |
|
6336
|
|
|
try: |
|
6337
|
|
|
self.state = 917 |
|
6338
|
|
|
self._errHandler.sync(self) |
|
6339
|
|
|
token = self._input.LA(1) |
|
6340
|
|
|
if token in [20, 24, 27, 36, 37, 38, 39, 40, 42, 43, 55, 56, 60, 83, 84, 85, 86, 87, 88, 89, 90, 92, 94, 96]: |
|
6341
|
|
|
self.enterOuterAlt(localctx, 1) |
|
6342
|
|
|
self.state = 909 |
|
6343
|
|
|
self.test() |
|
6344
|
|
|
self.state = 913 |
|
6345
|
|
|
self._errHandler.sync(self) |
|
6346
|
|
|
token = self._input.LA(1) |
|
6347
|
|
|
if token in [17]: |
|
6348
|
|
|
self.state = 910 |
|
6349
|
|
|
self.comp_for() |
|
6350
|
|
|
pass |
|
6351
|
|
|
elif token in [49]: |
|
6352
|
|
|
self.state = 911 |
|
6353
|
|
|
self.match(PythonParser.ASSIGN) |
|
6354
|
|
|
self.state = 912 |
|
6355
|
|
|
self.test() |
|
6356
|
|
|
pass |
|
6357
|
|
|
elif token in [45, 91]: |
|
6358
|
|
|
pass |
|
6359
|
|
|
else: |
|
6360
|
|
|
pass |
|
6361
|
|
|
pass |
|
6362
|
|
|
elif token in [44, 48]: |
|
6363
|
|
|
self.enterOuterAlt(localctx, 2) |
|
6364
|
|
|
self.state = 915 |
|
6365
|
|
|
_la = self._input.LA(1) |
|
6366
|
|
|
if not(_la==44 or _la==48): |
|
6367
|
|
|
self._errHandler.recoverInline(self) |
|
6368
|
|
|
else: |
|
6369
|
|
|
self._errHandler.reportMatch(self) |
|
6370
|
|
|
self.consume() |
|
6371
|
|
|
self.state = 916 |
|
6372
|
|
|
self.test() |
|
6373
|
|
|
pass |
|
6374
|
|
|
else: |
|
6375
|
|
|
raise NoViableAltException(self) |
|
6376
|
|
|
|
|
6377
|
|
|
except RecognitionException as re: |
|
6378
|
|
|
localctx.exception = re |
|
6379
|
|
|
self._errHandler.reportError(self, re) |
|
6380
|
|
|
self._errHandler.recover(self, re) |
|
6381
|
|
|
finally: |
|
6382
|
|
|
self.exitRule() |
|
6383
|
|
|
return localctx |
|
6384
|
|
|
|
|
6385
|
|
|
|
|
6386
|
|
|
class SubscriptlistContext(ParserRuleContext): |
|
6387
|
|
|
__slots__ = 'parser' |
|
6388
|
|
|
|
|
6389
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
6390
|
|
|
super().__init__(parent, invokingState) |
|
6391
|
|
|
self.parser = parser |
|
6392
|
|
|
|
|
6393
|
|
|
def subscript(self, i:int=None): |
|
6394
|
|
|
if i is None: |
|
6395
|
|
|
return self.getTypedRuleContexts(PythonParser.SubscriptContext) |
|
6396
|
|
|
else: |
|
6397
|
|
|
return self.getTypedRuleContext(PythonParser.SubscriptContext,i) |
|
6398
|
|
|
|
|
6399
|
|
|
|
|
6400
|
|
|
def COMMA(self, i:int=None): |
|
6401
|
|
|
if i is None: |
|
6402
|
|
|
return self.getTokens(PythonParser.COMMA) |
|
6403
|
|
|
else: |
|
6404
|
|
|
return self.getToken(PythonParser.COMMA, i) |
|
6405
|
|
|
|
|
6406
|
|
|
def getRuleIndex(self): |
|
6407
|
|
|
return PythonParser.RULE_subscriptlist |
|
6408
|
|
|
|
|
6409
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
6410
|
|
|
if hasattr( listener, "enterSubscriptlist" ): |
|
6411
|
|
|
listener.enterSubscriptlist(self) |
|
6412
|
|
|
|
|
6413
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
6414
|
|
|
if hasattr( listener, "exitSubscriptlist" ): |
|
6415
|
|
|
listener.exitSubscriptlist(self) |
|
6416
|
|
|
|
|
6417
|
|
|
|
|
6418
|
|
|
|
|
6419
|
|
|
|
|
6420
|
|
|
def subscriptlist(self): |
|
6421
|
|
|
|
|
6422
|
|
|
localctx = PythonParser.SubscriptlistContext(self, self._ctx, self.state) |
|
6423
|
|
|
self.enterRule(localctx, 108, self.RULE_subscriptlist) |
|
6424
|
|
|
self._la = 0 # Token type |
|
6425
|
|
|
try: |
|
6426
|
|
|
self.enterOuterAlt(localctx, 1) |
|
6427
|
|
|
self.state = 919 |
|
6428
|
|
|
self.subscript() |
|
6429
|
|
|
self.state = 924 |
|
6430
|
|
|
self._errHandler.sync(self) |
|
6431
|
|
|
_alt = self._interp.adaptivePredict(self._input,139,self._ctx) |
|
6432
|
|
|
while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: |
|
6433
|
|
|
if _alt==1: |
|
6434
|
|
|
self.state = 920 |
|
6435
|
|
|
self.match(PythonParser.COMMA) |
|
6436
|
|
|
self.state = 921 |
|
6437
|
|
|
self.subscript() |
|
6438
|
|
|
self.state = 926 |
|
6439
|
|
|
self._errHandler.sync(self) |
|
6440
|
|
|
_alt = self._interp.adaptivePredict(self._input,139,self._ctx) |
|
6441
|
|
|
|
|
6442
|
|
|
self.state = 928 |
|
6443
|
|
|
self._errHandler.sync(self) |
|
6444
|
|
|
_la = self._input.LA(1) |
|
6445
|
|
|
if _la==45: |
|
6446
|
|
|
self.state = 927 |
|
6447
|
|
|
self.match(PythonParser.COMMA) |
|
6448
|
|
|
|
|
6449
|
|
|
|
|
6450
|
|
|
except RecognitionException as re: |
|
6451
|
|
|
localctx.exception = re |
|
6452
|
|
|
self._errHandler.reportError(self, re) |
|
6453
|
|
|
self._errHandler.recover(self, re) |
|
6454
|
|
|
finally: |
|
6455
|
|
|
self.exitRule() |
|
6456
|
|
|
return localctx |
|
6457
|
|
|
|
|
6458
|
|
|
|
|
6459
|
|
|
class SubscriptContext(ParserRuleContext): |
|
6460
|
|
|
__slots__ = 'parser' |
|
6461
|
|
|
|
|
6462
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
6463
|
|
|
super().__init__(parent, invokingState) |
|
6464
|
|
|
self.parser = parser |
|
6465
|
|
|
|
|
6466
|
|
|
def ELLIPSIS(self): |
|
6467
|
|
|
return self.getToken(PythonParser.ELLIPSIS, 0) |
|
6468
|
|
|
|
|
6469
|
|
|
def test(self, i:int=None): |
|
6470
|
|
|
if i is None: |
|
6471
|
|
|
return self.getTypedRuleContexts(PythonParser.TestContext) |
|
6472
|
|
|
else: |
|
6473
|
|
|
return self.getTypedRuleContext(PythonParser.TestContext,i) |
|
6474
|
|
|
|
|
6475
|
|
|
|
|
6476
|
|
|
def COLON(self): |
|
6477
|
|
|
return self.getToken(PythonParser.COLON, 0) |
|
6478
|
|
|
|
|
6479
|
|
|
def sliceop(self): |
|
6480
|
|
|
return self.getTypedRuleContext(PythonParser.SliceopContext,0) |
|
6481
|
|
|
|
|
6482
|
|
|
|
|
6483
|
|
|
def getRuleIndex(self): |
|
6484
|
|
|
return PythonParser.RULE_subscript |
|
6485
|
|
|
|
|
6486
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
6487
|
|
|
if hasattr( listener, "enterSubscript" ): |
|
6488
|
|
|
listener.enterSubscript(self) |
|
6489
|
|
|
|
|
6490
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
6491
|
|
|
if hasattr( listener, "exitSubscript" ): |
|
6492
|
|
|
listener.exitSubscript(self) |
|
6493
|
|
|
|
|
6494
|
|
|
|
|
6495
|
|
|
|
|
6496
|
|
|
|
|
6497
|
|
|
def subscript(self): |
|
6498
|
|
|
|
|
6499
|
|
|
localctx = PythonParser.SubscriptContext(self, self._ctx, self.state) |
|
6500
|
|
|
self.enterRule(localctx, 110, self.RULE_subscript) |
|
6501
|
|
|
self._la = 0 # Token type |
|
6502
|
|
|
try: |
|
6503
|
|
|
self.state = 948 |
|
6504
|
|
|
self._errHandler.sync(self) |
|
6505
|
|
|
la_ = self._interp.adaptivePredict(self._input,146,self._ctx) |
|
6506
|
|
|
if la_ == 1: |
|
6507
|
|
|
self.enterOuterAlt(localctx, 1) |
|
6508
|
|
|
self.state = 930 |
|
6509
|
|
|
self.match(PythonParser.ELLIPSIS) |
|
6510
|
|
|
pass |
|
6511
|
|
|
|
|
6512
|
|
|
elif la_ == 2: |
|
6513
|
|
|
self.enterOuterAlt(localctx, 2) |
|
6514
|
|
|
self.state = 931 |
|
6515
|
|
|
self.test() |
|
6516
|
|
|
self.state = 939 |
|
6517
|
|
|
self._errHandler.sync(self) |
|
6518
|
|
|
_la = self._input.LA(1) |
|
6519
|
|
|
if _la==46: |
|
6520
|
|
|
self.state = 932 |
|
6521
|
|
|
self.match(PythonParser.COLON) |
|
6522
|
|
|
self.state = 934 |
|
6523
|
|
|
self._errHandler.sync(self) |
|
6524
|
|
|
_la = self._input.LA(1) |
|
6525
|
|
|
if (((_la) & ~0x3f) == 0 and ((1 << _la) & 1261023220259094528) != 0) or ((((_la - 83)) & ~0x3f) == 0 and ((1 << (_la - 83)) & 11007) != 0): |
|
6526
|
|
|
self.state = 933 |
|
6527
|
|
|
self.test() |
|
6528
|
|
|
|
|
6529
|
|
|
|
|
6530
|
|
|
self.state = 937 |
|
6531
|
|
|
self._errHandler.sync(self) |
|
6532
|
|
|
_la = self._input.LA(1) |
|
6533
|
|
|
if _la==46: |
|
6534
|
|
|
self.state = 936 |
|
6535
|
|
|
self.sliceop() |
|
6536
|
|
|
|
|
6537
|
|
|
|
|
6538
|
|
|
|
|
6539
|
|
|
|
|
6540
|
|
|
pass |
|
6541
|
|
|
|
|
6542
|
|
|
elif la_ == 3: |
|
6543
|
|
|
self.enterOuterAlt(localctx, 3) |
|
6544
|
|
|
self.state = 941 |
|
6545
|
|
|
self.match(PythonParser.COLON) |
|
6546
|
|
|
self.state = 943 |
|
6547
|
|
|
self._errHandler.sync(self) |
|
6548
|
|
|
_la = self._input.LA(1) |
|
6549
|
|
|
if (((_la) & ~0x3f) == 0 and ((1 << _la) & 1261023220259094528) != 0) or ((((_la - 83)) & ~0x3f) == 0 and ((1 << (_la - 83)) & 11007) != 0): |
|
6550
|
|
|
self.state = 942 |
|
6551
|
|
|
self.test() |
|
6552
|
|
|
|
|
6553
|
|
|
|
|
6554
|
|
|
self.state = 946 |
|
6555
|
|
|
self._errHandler.sync(self) |
|
6556
|
|
|
_la = self._input.LA(1) |
|
6557
|
|
|
if _la==46: |
|
6558
|
|
|
self.state = 945 |
|
6559
|
|
|
self.sliceop() |
|
6560
|
|
|
|
|
6561
|
|
|
|
|
6562
|
|
|
pass |
|
6563
|
|
|
|
|
6564
|
|
|
|
|
6565
|
|
|
except RecognitionException as re: |
|
6566
|
|
|
localctx.exception = re |
|
6567
|
|
|
self._errHandler.reportError(self, re) |
|
6568
|
|
|
self._errHandler.recover(self, re) |
|
6569
|
|
|
finally: |
|
6570
|
|
|
self.exitRule() |
|
6571
|
|
|
return localctx |
|
6572
|
|
|
|
|
6573
|
|
|
|
|
6574
|
|
|
class SliceopContext(ParserRuleContext): |
|
6575
|
|
|
__slots__ = 'parser' |
|
6576
|
|
|
|
|
6577
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
6578
|
|
|
super().__init__(parent, invokingState) |
|
6579
|
|
|
self.parser = parser |
|
6580
|
|
|
|
|
6581
|
|
|
def COLON(self): |
|
6582
|
|
|
return self.getToken(PythonParser.COLON, 0) |
|
6583
|
|
|
|
|
6584
|
|
|
def test(self): |
|
6585
|
|
|
return self.getTypedRuleContext(PythonParser.TestContext,0) |
|
6586
|
|
|
|
|
6587
|
|
|
|
|
6588
|
|
|
def getRuleIndex(self): |
|
6589
|
|
|
return PythonParser.RULE_sliceop |
|
6590
|
|
|
|
|
6591
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
6592
|
|
|
if hasattr( listener, "enterSliceop" ): |
|
6593
|
|
|
listener.enterSliceop(self) |
|
6594
|
|
|
|
|
6595
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
6596
|
|
|
if hasattr( listener, "exitSliceop" ): |
|
6597
|
|
|
listener.exitSliceop(self) |
|
6598
|
|
|
|
|
6599
|
|
|
|
|
6600
|
|
|
|
|
6601
|
|
|
|
|
6602
|
|
|
def sliceop(self): |
|
6603
|
|
|
|
|
6604
|
|
|
localctx = PythonParser.SliceopContext(self, self._ctx, self.state) |
|
6605
|
|
|
self.enterRule(localctx, 112, self.RULE_sliceop) |
|
6606
|
|
|
self._la = 0 # Token type |
|
6607
|
|
|
try: |
|
6608
|
|
|
self.enterOuterAlt(localctx, 1) |
|
6609
|
|
|
self.state = 950 |
|
6610
|
|
|
self.match(PythonParser.COLON) |
|
6611
|
|
|
self.state = 952 |
|
6612
|
|
|
self._errHandler.sync(self) |
|
6613
|
|
|
_la = self._input.LA(1) |
|
6614
|
|
|
if (((_la) & ~0x3f) == 0 and ((1 << _la) & 1261023220259094528) != 0) or ((((_la - 83)) & ~0x3f) == 0 and ((1 << (_la - 83)) & 11007) != 0): |
|
6615
|
|
|
self.state = 951 |
|
6616
|
|
|
self.test() |
|
6617
|
|
|
|
|
6618
|
|
|
|
|
6619
|
|
|
except RecognitionException as re: |
|
6620
|
|
|
localctx.exception = re |
|
6621
|
|
|
self._errHandler.reportError(self, re) |
|
6622
|
|
|
self._errHandler.recover(self, re) |
|
6623
|
|
|
finally: |
|
6624
|
|
|
self.exitRule() |
|
6625
|
|
|
return localctx |
|
6626
|
|
|
|
|
6627
|
|
|
|
|
6628
|
|
|
class Comp_forContext(ParserRuleContext): |
|
6629
|
|
|
__slots__ = 'parser' |
|
6630
|
|
|
|
|
6631
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
6632
|
|
|
super().__init__(parent, invokingState) |
|
6633
|
|
|
self.parser = parser |
|
6634
|
|
|
|
|
6635
|
|
|
def FOR(self): |
|
6636
|
|
|
return self.getToken(PythonParser.FOR, 0) |
|
6637
|
|
|
|
|
6638
|
|
|
def exprlist(self): |
|
6639
|
|
|
return self.getTypedRuleContext(PythonParser.ExprlistContext,0) |
|
6640
|
|
|
|
|
6641
|
|
|
|
|
6642
|
|
|
def IN(self): |
|
6643
|
|
|
return self.getToken(PythonParser.IN, 0) |
|
6644
|
|
|
|
|
6645
|
|
|
def logical_test(self): |
|
6646
|
|
|
return self.getTypedRuleContext(PythonParser.Logical_testContext,0) |
|
6647
|
|
|
|
|
6648
|
|
|
|
|
6649
|
|
|
def comp_iter(self): |
|
6650
|
|
|
return self.getTypedRuleContext(PythonParser.Comp_iterContext,0) |
|
6651
|
|
|
|
|
6652
|
|
|
|
|
6653
|
|
|
def getRuleIndex(self): |
|
6654
|
|
|
return PythonParser.RULE_comp_for |
|
6655
|
|
|
|
|
6656
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
6657
|
|
|
if hasattr( listener, "enterComp_for" ): |
|
6658
|
|
|
listener.enterComp_for(self) |
|
6659
|
|
|
|
|
6660
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
6661
|
|
|
if hasattr( listener, "exitComp_for" ): |
|
6662
|
|
|
listener.exitComp_for(self) |
|
6663
|
|
|
|
|
6664
|
|
|
|
|
6665
|
|
|
|
|
6666
|
|
|
|
|
6667
|
|
|
def comp_for(self): |
|
6668
|
|
|
|
|
6669
|
|
|
localctx = PythonParser.Comp_forContext(self, self._ctx, self.state) |
|
6670
|
|
|
self.enterRule(localctx, 114, self.RULE_comp_for) |
|
6671
|
|
|
self._la = 0 # Token type |
|
6672
|
|
|
try: |
|
6673
|
|
|
self.enterOuterAlt(localctx, 1) |
|
6674
|
|
|
self.state = 954 |
|
6675
|
|
|
self.match(PythonParser.FOR) |
|
6676
|
|
|
self.state = 955 |
|
6677
|
|
|
self.exprlist() |
|
6678
|
|
|
self.state = 956 |
|
6679
|
|
|
self.match(PythonParser.IN) |
|
6680
|
|
|
self.state = 957 |
|
6681
|
|
|
self.logical_test(0) |
|
6682
|
|
|
self.state = 959 |
|
6683
|
|
|
self._errHandler.sync(self) |
|
6684
|
|
|
_la = self._input.LA(1) |
|
6685
|
|
|
if _la==13 or _la==17: |
|
6686
|
|
|
self.state = 958 |
|
6687
|
|
|
self.comp_iter() |
|
6688
|
|
|
|
|
6689
|
|
|
|
|
6690
|
|
|
except RecognitionException as re: |
|
6691
|
|
|
localctx.exception = re |
|
6692
|
|
|
self._errHandler.reportError(self, re) |
|
6693
|
|
|
self._errHandler.recover(self, re) |
|
6694
|
|
|
finally: |
|
6695
|
|
|
self.exitRule() |
|
6696
|
|
|
return localctx |
|
6697
|
|
|
|
|
6698
|
|
|
|
|
6699
|
|
|
class Comp_iterContext(ParserRuleContext): |
|
6700
|
|
|
__slots__ = 'parser' |
|
6701
|
|
|
|
|
6702
|
|
|
def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): |
|
6703
|
|
|
super().__init__(parent, invokingState) |
|
6704
|
|
|
self.parser = parser |
|
6705
|
|
|
|
|
6706
|
|
|
def comp_for(self): |
|
6707
|
|
|
return self.getTypedRuleContext(PythonParser.Comp_forContext,0) |
|
6708
|
|
|
|
|
6709
|
|
|
|
|
6710
|
|
|
def IF(self): |
|
6711
|
|
|
return self.getToken(PythonParser.IF, 0) |
|
6712
|
|
|
|
|
6713
|
|
|
def test(self): |
|
6714
|
|
|
return self.getTypedRuleContext(PythonParser.TestContext,0) |
|
6715
|
|
|
|
|
6716
|
|
|
|
|
6717
|
|
|
def comp_iter(self): |
|
6718
|
|
|
return self.getTypedRuleContext(PythonParser.Comp_iterContext,0) |
|
6719
|
|
|
|
|
6720
|
|
|
|
|
6721
|
|
|
def getRuleIndex(self): |
|
6722
|
|
|
return PythonParser.RULE_comp_iter |
|
6723
|
|
|
|
|
6724
|
|
|
def enterRule(self, listener:ParseTreeListener): |
|
6725
|
|
|
if hasattr( listener, "enterComp_iter" ): |
|
6726
|
|
|
listener.enterComp_iter(self) |
|
6727
|
|
|
|
|
6728
|
|
|
def exitRule(self, listener:ParseTreeListener): |
|
6729
|
|
|
if hasattr( listener, "exitComp_iter" ): |
|
6730
|
|
|
listener.exitComp_iter(self) |
|
6731
|
|
|
|
|
6732
|
|
|
|
|
6733
|
|
|
|
|
6734
|
|
|
|
|
6735
|
|
|
def comp_iter(self): |
|
6736
|
|
|
|
|
6737
|
|
|
localctx = PythonParser.Comp_iterContext(self, self._ctx, self.state) |
|
6738
|
|
|
self.enterRule(localctx, 116, self.RULE_comp_iter) |
|
6739
|
|
|
self._la = 0 # Token type |
|
6740
|
|
|
try: |
|
6741
|
|
|
self.state = 967 |
|
6742
|
|
|
self._errHandler.sync(self) |
|
6743
|
|
|
token = self._input.LA(1) |
|
6744
|
|
|
if token in [17]: |
|
6745
|
|
|
self.enterOuterAlt(localctx, 1) |
|
6746
|
|
|
self.state = 961 |
|
6747
|
|
|
self.comp_for() |
|
6748
|
|
|
pass |
|
6749
|
|
|
elif token in [13]: |
|
6750
|
|
|
self.enterOuterAlt(localctx, 2) |
|
6751
|
|
|
self.state = 962 |
|
6752
|
|
|
self.match(PythonParser.IF) |
|
6753
|
|
|
self.state = 963 |
|
6754
|
|
|
self.test() |
|
6755
|
|
|
self.state = 965 |
|
6756
|
|
|
self._errHandler.sync(self) |
|
6757
|
|
|
_la = self._input.LA(1) |
|
6758
|
|
|
if _la==13 or _la==17: |
|
6759
|
|
|
self.state = 964 |
|
6760
|
|
|
self.comp_iter() |
|
6761
|
|
|
|
|
6762
|
|
|
|
|
6763
|
|
|
pass |
|
6764
|
|
|
else: |
|
6765
|
|
|
raise NoViableAltException(self) |
|
6766
|
|
|
|
|
6767
|
|
|
except RecognitionException as re: |
|
6768
|
|
|
localctx.exception = re |
|
6769
|
|
|
self._errHandler.reportError(self, re) |
|
6770
|
|
|
self._errHandler.recover(self, re) |
|
6771
|
|
|
finally: |
|
6772
|
|
|
self.exitRule() |
|
6773
|
|
|
return localctx |
|
6774
|
|
|
|
|
6775
|
|
|
|
|
6776
|
|
|
|
|
6777
|
|
|
def sempred(self, localctx:RuleContext, ruleIndex:int, predIndex:int): |
|
6778
|
|
|
if self._predicates == None: |
|
6779
|
|
|
self._predicates = dict() |
|
6780
|
|
|
self._predicates[12] = self.except_clause_sempred |
|
6781
|
|
|
self._predicates[22] = self.small_stmt_sempred |
|
6782
|
|
|
self._predicates[25] = self.assign_part_sempred |
|
6783
|
|
|
self._predicates[37] = self.logical_test_sempred |
|
6784
|
|
|
self._predicates[38] = self.comparison_sempred |
|
6785
|
|
|
self._predicates[39] = self.expr_sempred |
|
6786
|
|
|
self._predicates[44] = self.dotted_name_sempred |
|
6787
|
|
|
pred = self._predicates.get(ruleIndex, None) |
|
6788
|
|
|
if pred is None: |
|
6789
|
|
|
raise Exception("No predicate with index:" + str(ruleIndex)) |
|
6790
|
|
|
else: |
|
6791
|
|
|
return pred(localctx, predIndex) |
|
6792
|
|
|
|
|
6793
|
|
|
def except_clause_sempred(self, localctx:Except_clauseContext, predIndex:int): |
|
6794
|
|
|
if predIndex == 0: |
|
6795
|
|
|
return self.CheckVersion(2) |
|
6796
|
|
|
|
|
6797
|
|
|
|
|
6798
|
|
|
if predIndex == 1: |
|
6799
|
|
|
return self.CheckVersion(3) |
|
6800
|
|
|
|
|
6801
|
|
|
|
|
6802
|
|
|
def small_stmt_sempred(self, localctx:Small_stmtContext, predIndex:int): |
|
6803
|
|
|
if predIndex == 2: |
|
6804
|
|
|
return self.CheckVersion(2) |
|
6805
|
|
|
|
|
6806
|
|
|
|
|
6807
|
|
|
if predIndex == 3: |
|
6808
|
|
|
return self.CheckVersion(2) |
|
6809
|
|
|
|
|
6810
|
|
|
|
|
6811
|
|
|
if predIndex == 4: |
|
6812
|
|
|
return self.CheckVersion(3) |
|
6813
|
|
|
|
|
6814
|
|
|
|
|
6815
|
|
|
def assign_part_sempred(self, localctx:Assign_partContext, predIndex:int): |
|
6816
|
|
|
if predIndex == 5: |
|
6817
|
|
|
return self.CheckVersion(3) |
|
6818
|
|
|
|
|
6819
|
|
|
|
|
6820
|
|
|
def logical_test_sempred(self, localctx:Logical_testContext, predIndex:int): |
|
6821
|
|
|
if predIndex == 6: |
|
6822
|
|
|
return self.precpred(self._ctx, 2) |
|
6823
|
|
|
|
|
6824
|
|
|
|
|
6825
|
|
|
if predIndex == 7: |
|
6826
|
|
|
return self.precpred(self._ctx, 1) |
|
6827
|
|
|
|
|
6828
|
|
|
|
|
6829
|
|
|
def comparison_sempred(self, localctx:ComparisonContext, predIndex:int): |
|
6830
|
|
|
if predIndex == 8: |
|
6831
|
|
|
return self.precpred(self._ctx, 2) |
|
6832
|
|
|
|
|
6833
|
|
|
|
|
6834
|
|
|
def expr_sempred(self, localctx:ExprContext, predIndex:int): |
|
6835
|
|
|
if predIndex == 9: |
|
6836
|
|
|
return self.precpred(self._ctx, 8) |
|
6837
|
|
|
|
|
6838
|
|
|
|
|
6839
|
|
|
if predIndex == 10: |
|
6840
|
|
|
return self.precpred(self._ctx, 6) |
|
6841
|
|
|
|
|
6842
|
|
|
|
|
6843
|
|
|
if predIndex == 11: |
|
6844
|
|
|
return self.precpred(self._ctx, 5) |
|
6845
|
|
|
|
|
6846
|
|
|
|
|
6847
|
|
|
if predIndex == 12: |
|
6848
|
|
|
return self.precpred(self._ctx, 4) |
|
6849
|
|
|
|
|
6850
|
|
|
|
|
6851
|
|
|
if predIndex == 13: |
|
6852
|
|
|
return self.precpred(self._ctx, 3) |
|
6853
|
|
|
|
|
6854
|
|
|
|
|
6855
|
|
|
if predIndex == 14: |
|
6856
|
|
|
return self.precpred(self._ctx, 2) |
|
6857
|
|
|
|
|
6858
|
|
|
|
|
6859
|
|
|
if predIndex == 15: |
|
6860
|
|
|
return self.precpred(self._ctx, 1) |
|
6861
|
|
|
|
|
6862
|
|
|
|
|
6863
|
|
|
def dotted_name_sempred(self, localctx:Dotted_nameContext, predIndex:int): |
|
6864
|
|
|
if predIndex == 16: |
|
6865
|
|
|
return self.precpred(self._ctx, 2) |
|
6866
|
|
|
|
|
6867
|
|
|
|
|
6868
|
|
|
|
|
6869
|
|
|
|
|
6870
|
|
|
|
|
6871
|
|
|
|