sdl92Parser.py 2.19 MB
Newer Older
Maxime Perrotin's avatar
Maxime Perrotin committed
1
# $ANTLR 3.5.2 sdl92.g 2021-04-07 10:19:03
Maxime Perrotin's avatar
Maxime Perrotin committed
2
3
4
5
6
7
8
9

import sys
from antlr3 import *

from antlr3.tree import *



Maxime Perrotin's avatar
Maxime Perrotin committed
10

Maxime Perrotin's avatar
Maxime Perrotin committed
11
12
13
14
# for convenience in actions
HIDDEN = BaseRecognizer.HIDDEN

# token types
15
16
EOF=-1
T__226=226
Maxime Perrotin's avatar
Maxime Perrotin committed
17
18
19
T__227=227
T__228=228
T__229=229
Maxime Perrotin's avatar
Maxime Perrotin committed
20
T__230=230
21
T__231=231
Maxime Perrotin's avatar
Maxime Perrotin committed
22
T__232=232
Maxime Perrotin's avatar
Maxime Perrotin committed
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
A=4
ACTION=5
ACTIVE=6
AGGREGATION=7
ALL=8
ALPHA=9
ALTERNATIVE=10
AND=11
ANSWER=12
ANY=13
APPEND=14
ARRAY=15
ASN1=16
ASNFILENAME=17
ASSIGN=18
ASSIG_OP=19
ASTERISK=20
B=21
BASE=22
BITSTR=23
BLOCK=24
C=25
CALL=26
CHANNEL=27
CHOICE=28
CIF=29
CLOSED_RANGE=30
COMMA=31
COMMENT=32
COMMENT2=33
COMPOSITE_STATE=34
CONDITIONAL=35
CONNECT=36
CONNECTION=37
CONSTANT=38
CONSTANTS=39
CREATE=40
D=41
DASH=42
DCL=43
DECISION=44
DEFAULT=45
DIGITS=46
DIV=47
DOT=48
E=49
ELSE=50
EMPTYSTR=51
END=52
ENDALTERNATIVE=53
ENDBLOCK=54
ENDCHANNEL=55
ENDCONNECTION=56
ENDDECISION=57
ENDFOR=58
ENDNEWTYPE=59
ENDPROCEDURE=60
ENDPROCESS=61
ENDSTATE=62
ENDSUBSTRUCTURE=63
ENDSYNTYPE=64
ENDSYSTEM=65
ENDTEXT=66
ENTRY_POINT=67
EQ=68
EXPONENT=69
EXPORT=70
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
EXPORTED=71
EXPRESSION=72
EXTERNAL=73
Exponent=74
F=75
FALSE=76
FI=77
FIELD=78
FIELDS=79
FIELD_NAME=80
FLOAT=81
FLOAT2=82
FLOATING_LABEL=83
FOR=84
FPAR=85
FROM=86
G=87
GE=88
GEODE=89
GROUND=90
GT=91
H=92
HYPERLINK=93
I=94
ID=95
IF=96
IFTHENELSE=97
IMPLIES=98
IMPORT=99
IN=100
INFORMAL_TEXT=101
INOUT=102
INPUT=103
INPUTLIST=104
INPUT_NONE=105
INT=106
J=107
JOIN=108
K=109
KEEP=110
L=111
LABEL=112
LE=113
LITERAL=114
LT=115
L_BRACKET=116
L_PAREN=117
M=118
MANTISSA=119
MINUS_INFINITY=120
MKSTRING=121
MOD=122
Maxime Perrotin's avatar
Maxime Perrotin committed
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
MONITOR=123
N=124
NEG=125
NEQ=126
NEWTYPE=127
NEXTSTATE=128
NONE=129
NOT=130
NUMBER_OF_INSTANCES=131
O=132
OCTSTR=133
OPEN_RANGE=134
OR=135
OUT=136
OUTPUT=137
OUTPUT_BODY=138
P=139
PARAM=140
PARAMNAMES=141
PARAMS=142
PAREN=143
PFPAR=144
PLUS=145
PLUS_INFINITY=146
POINT=147
PRIMARY=148
PRIORITY=149
PROCEDURE=150
PROCEDURE_CALL=151
PROCEDURE_NAME=152
PROCESS=153
PROVIDED=154
Q=155
QUESTION=156
R=157
RANGE=158
REFERENCED=159
REM=160
RESET=161
RETURN=162
RETURNS=163
ROUTE=164
R_BRACKET=165
R_PAREN=166
S=167
SAVE=168
SELECTOR=169
SEMI=170
SEQOF=171
SEQUENCE=172
SET=173
SIGNAL=174
SIGNALROUTE=175
SIGNAL_LIST=176
SORT=177
SPECIFIC=178
START=179
STATE=180
STATELIST=181
STATE_AGGREGATION=182
STATE_PARTITION_CONNECTION=183
STIMULUS=184
STOP=185
STOPIF=186
STR=187
STRING=188
STRUCT=189
SUBSTRUCTURE=190
SYNONYM=191
SYNONYM_LIST=192
SYNTYPE=193
SYSTEM=194
T=195
TASK=196
TASK_BODY=197
TERMINATOR=198
TEXT=199
TEXTAREA=200
TEXTAREA_CONTENT=201
THEN=202
THIS=203
TIMER=204
TO=205
TRANSITION=206
TRUE=207
TYPE=208
TYPE_INSTANCE=209
U=210
USE=211
V=212
VALUE=213
VARIABLE=214
VARIABLES=215
VIA=216
VIAPATH=217
VIEW=218
W=219
WITH=220
WS=221
X=222
XOR=223
Y=224
Z=225
Maxime Perrotin's avatar
Maxime Perrotin committed
245
246
247
248

# token names
tokenNamesMap = {
    0: "<invalid>", 1: "<EOR>", 2: "<DOWN>", 3: "<UP>",
Maxime Perrotin's avatar
Maxime Perrotin committed
249
250
    -1: "EOF", 226: "T__226", 227: "T__227", 228: "T__228", 229: "T__229", 
    230: "T__230", 231: "T__231", 232: "T__232", 4: "A", 5: "ACTION", 6: "ACTIVE", 
Maxime Perrotin's avatar
Maxime Perrotin committed
251
252
253
254
255
256
257
258
259
260
261
262
    7: "AGGREGATION", 8: "ALL", 9: "ALPHA", 10: "ALTERNATIVE", 11: "AND", 
    12: "ANSWER", 13: "ANY", 14: "APPEND", 15: "ARRAY", 16: "ASN1", 17: "ASNFILENAME", 
    18: "ASSIGN", 19: "ASSIG_OP", 20: "ASTERISK", 21: "B", 22: "BASE", 23: "BITSTR", 
    24: "BLOCK", 25: "C", 26: "CALL", 27: "CHANNEL", 28: "CHOICE", 29: "CIF", 
    30: "CLOSED_RANGE", 31: "COMMA", 32: "COMMENT", 33: "COMMENT2", 34: "COMPOSITE_STATE", 
    35: "CONDITIONAL", 36: "CONNECT", 37: "CONNECTION", 38: "CONSTANT", 
    39: "CONSTANTS", 40: "CREATE", 41: "D", 42: "DASH", 43: "DCL", 44: "DECISION", 
    45: "DEFAULT", 46: "DIGITS", 47: "DIV", 48: "DOT", 49: "E", 50: "ELSE", 
    51: "EMPTYSTR", 52: "END", 53: "ENDALTERNATIVE", 54: "ENDBLOCK", 55: "ENDCHANNEL", 
    56: "ENDCONNECTION", 57: "ENDDECISION", 58: "ENDFOR", 59: "ENDNEWTYPE", 
    60: "ENDPROCEDURE", 61: "ENDPROCESS", 62: "ENDSTATE", 63: "ENDSUBSTRUCTURE", 
    64: "ENDSYNTYPE", 65: "ENDSYSTEM", 66: "ENDTEXT", 67: "ENTRY_POINT", 
263
264
265
266
267
268
269
270
271
272
    68: "EQ", 69: "EXPONENT", 70: "EXPORT", 71: "EXPORTED", 72: "EXPRESSION", 
    73: "EXTERNAL", 74: "Exponent", 75: "F", 76: "FALSE", 77: "FI", 78: "FIELD", 
    79: "FIELDS", 80: "FIELD_NAME", 81: "FLOAT", 82: "FLOAT2", 83: "FLOATING_LABEL", 
    84: "FOR", 85: "FPAR", 86: "FROM", 87: "G", 88: "GE", 89: "GEODE", 90: "GROUND", 
    91: "GT", 92: "H", 93: "HYPERLINK", 94: "I", 95: "ID", 96: "IF", 97: "IFTHENELSE", 
    98: "IMPLIES", 99: "IMPORT", 100: "IN", 101: "INFORMAL_TEXT", 102: "INOUT", 
    103: "INPUT", 104: "INPUTLIST", 105: "INPUT_NONE", 106: "INT", 107: "J", 
    108: "JOIN", 109: "K", 110: "KEEP", 111: "L", 112: "LABEL", 113: "LE", 
    114: "LITERAL", 115: "LT", 116: "L_BRACKET", 117: "L_PAREN", 118: "M", 
    119: "MANTISSA", 120: "MINUS_INFINITY", 121: "MKSTRING", 122: "MOD", 
Maxime Perrotin's avatar
Maxime Perrotin committed
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
    123: "MONITOR", 124: "N", 125: "NEG", 126: "NEQ", 127: "NEWTYPE", 128: "NEXTSTATE", 
    129: "NONE", 130: "NOT", 131: "NUMBER_OF_INSTANCES", 132: "O", 133: "OCTSTR", 
    134: "OPEN_RANGE", 135: "OR", 136: "OUT", 137: "OUTPUT", 138: "OUTPUT_BODY", 
    139: "P", 140: "PARAM", 141: "PARAMNAMES", 142: "PARAMS", 143: "PAREN", 
    144: "PFPAR", 145: "PLUS", 146: "PLUS_INFINITY", 147: "POINT", 148: "PRIMARY", 
    149: "PRIORITY", 150: "PROCEDURE", 151: "PROCEDURE_CALL", 152: "PROCEDURE_NAME", 
    153: "PROCESS", 154: "PROVIDED", 155: "Q", 156: "QUESTION", 157: "R", 
    158: "RANGE", 159: "REFERENCED", 160: "REM", 161: "RESET", 162: "RETURN", 
    163: "RETURNS", 164: "ROUTE", 165: "R_BRACKET", 166: "R_PAREN", 167: "S", 
    168: "SAVE", 169: "SELECTOR", 170: "SEMI", 171: "SEQOF", 172: "SEQUENCE", 
    173: "SET", 174: "SIGNAL", 175: "SIGNALROUTE", 176: "SIGNAL_LIST", 177: "SORT", 
    178: "SPECIFIC", 179: "START", 180: "STATE", 181: "STATELIST", 182: "STATE_AGGREGATION", 
    183: "STATE_PARTITION_CONNECTION", 184: "STIMULUS", 185: "STOP", 186: "STOPIF", 
    187: "STR", 188: "STRING", 189: "STRUCT", 190: "SUBSTRUCTURE", 191: "SYNONYM", 
    192: "SYNONYM_LIST", 193: "SYNTYPE", 194: "SYSTEM", 195: "T", 196: "TASK", 
    197: "TASK_BODY", 198: "TERMINATOR", 199: "TEXT", 200: "TEXTAREA", 201: "TEXTAREA_CONTENT", 
    202: "THEN", 203: "THIS", 204: "TIMER", 205: "TO", 206: "TRANSITION", 
    207: "TRUE", 208: "TYPE", 209: "TYPE_INSTANCE", 210: "U", 211: "USE", 
    212: "V", 213: "VALUE", 214: "VARIABLE", 215: "VARIABLES", 216: "VIA", 
    217: "VIAPATH", 218: "VIEW", 219: "W", 220: "WITH", 221: "WS", 222: "X", 
    223: "XOR", 224: "Y", 225: "Z"
Maxime Perrotin's avatar
Maxime Perrotin committed
294
295
}
Token.registerTokenNamesMap(tokenNamesMap)
Maxime Perrotin's avatar
Maxime Perrotin committed
296
297
298

# token names
tokenNames = [
Maxime Perrotin's avatar
Maxime Perrotin committed
299
300
301
302
303
    "<invalid>", "<EOR>", "<DOWN>", "<UP>",
    "A", "ACTION", "ACTIVE", "AGGREGATION", "ALL", "ALPHA", "ALTERNATIVE", 
    "AND", "ANSWER", "ANY", "APPEND", "ARRAY", "ASN1", "ASNFILENAME", "ASSIGN", 
    "ASSIG_OP", "ASTERISK", "B", "BASE", "BITSTR", "BLOCK", "C", "CALL", 
    "CHANNEL", "CHOICE", "CIF", "CLOSED_RANGE", "COMMA", "COMMENT", "COMMENT2", 
304
    "COMPOSITE_STATE", "CONDITIONAL", "CONNECT", "CONNECTION", "CONSTANT", 
Maxime Perrotin's avatar
Maxime Perrotin committed
305
306
307
308
    "CONSTANTS", "CREATE", "D", "DASH", "DCL", "DECISION", "DEFAULT", "DIGITS", 
    "DIV", "DOT", "E", "ELSE", "EMPTYSTR", "END", "ENDALTERNATIVE", "ENDBLOCK", 
    "ENDCHANNEL", "ENDCONNECTION", "ENDDECISION", "ENDFOR", "ENDNEWTYPE", 
    "ENDPROCEDURE", "ENDPROCESS", "ENDSTATE", "ENDSUBSTRUCTURE", "ENDSYNTYPE", 
309
310
311
312
313
314
315
    "ENDSYSTEM", "ENDTEXT", "ENTRY_POINT", "EQ", "EXPONENT", "EXPORT", "EXPORTED", 
    "EXPRESSION", "EXTERNAL", "Exponent", "F", "FALSE", "FI", "FIELD", "FIELDS", 
    "FIELD_NAME", "FLOAT", "FLOAT2", "FLOATING_LABEL", "FOR", "FPAR", "FROM", 
    "G", "GE", "GEODE", "GROUND", "GT", "H", "HYPERLINK", "I", "ID", "IF", 
    "IFTHENELSE", "IMPLIES", "IMPORT", "IN", "INFORMAL_TEXT", "INOUT", "INPUT", 
    "INPUTLIST", "INPUT_NONE", "INT", "J", "JOIN", "K", "KEEP", "L", "LABEL", 
    "LE", "LITERAL", "LT", "L_BRACKET", "L_PAREN", "M", "MANTISSA", "MINUS_INFINITY", 
Maxime Perrotin's avatar
Maxime Perrotin committed
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
    "MKSTRING", "MOD", "MONITOR", "N", "NEG", "NEQ", "NEWTYPE", "NEXTSTATE", 
    "NONE", "NOT", "NUMBER_OF_INSTANCES", "O", "OCTSTR", "OPEN_RANGE", "OR", 
    "OUT", "OUTPUT", "OUTPUT_BODY", "P", "PARAM", "PARAMNAMES", "PARAMS", 
    "PAREN", "PFPAR", "PLUS", "PLUS_INFINITY", "POINT", "PRIMARY", "PRIORITY", 
    "PROCEDURE", "PROCEDURE_CALL", "PROCEDURE_NAME", "PROCESS", "PROVIDED", 
    "Q", "QUESTION", "R", "RANGE", "REFERENCED", "REM", "RESET", "RETURN", 
    "RETURNS", "ROUTE", "R_BRACKET", "R_PAREN", "S", "SAVE", "SELECTOR", 
    "SEMI", "SEQOF", "SEQUENCE", "SET", "SIGNAL", "SIGNALROUTE", "SIGNAL_LIST", 
    "SORT", "SPECIFIC", "START", "STATE", "STATELIST", "STATE_AGGREGATION", 
    "STATE_PARTITION_CONNECTION", "STIMULUS", "STOP", "STOPIF", "STR", "STRING", 
    "STRUCT", "SUBSTRUCTURE", "SYNONYM", "SYNONYM_LIST", "SYNTYPE", "SYSTEM", 
    "T", "TASK", "TASK_BODY", "TERMINATOR", "TEXT", "TEXTAREA", "TEXTAREA_CONTENT", 
    "THEN", "THIS", "TIMER", "TO", "TRANSITION", "TRUE", "TYPE", "TYPE_INSTANCE", 
    "U", "USE", "V", "VALUE", "VARIABLE", "VARIABLES", "VIA", "VIAPATH", 
    "VIEW", "W", "WITH", "WS", "X", "XOR", "Y", "Z", "'!'", "'(.'", "'*/'", 
    "'->'", "'.)'", "'/* CIF'", "':'"
Maxime Perrotin's avatar
Maxime Perrotin committed
332
333
334
335
336
337
]



class sdl92Parser(Parser):
    grammarFileName = "sdl92.g"
Maxime Perrotin's avatar
Maxime Perrotin committed
338
    api_version = 1
Maxime Perrotin's avatar
Maxime Perrotin committed
339
340
341
342
343
344
    tokenNames = tokenNames

    def __init__(self, input, state=None, *args, **kwargs):
        if state is None:
            state = RecognizerSharedState()

Maxime Perrotin's avatar
Maxime Perrotin committed
345
        super().__init__(input, state, *args, **kwargs)
Maxime Perrotin's avatar
Maxime Perrotin committed
346

347
348
349
350
351
352
353
354
355
        self.dfa54 = self.DFA54(
            self, 54,
            eot = self.DFA54_eot,
            eof = self.DFA54_eof,
            min = self.DFA54_min,
            max = self.DFA54_max,
            accept = self.DFA54_accept,
            special = self.DFA54_special,
            transition = self.DFA54_transition
Maxime Perrotin's avatar
Maxime Perrotin committed
356
357
            )

Maxime Perrotin's avatar
Maxime Perrotin committed
358
359
360
361
362
363
364
365
366
        self.dfa96 = self.DFA96(
            self, 96,
            eot = self.DFA96_eot,
            eof = self.DFA96_eof,
            min = self.DFA96_min,
            max = self.DFA96_max,
            accept = self.DFA96_accept,
            special = self.DFA96_special,
            transition = self.DFA96_transition
367
368
            )

Maxime Perrotin's avatar
Maxime Perrotin committed
369
370
371
372
373
374
375
376
377
        self.dfa138 = self.DFA138(
            self, 138,
            eot = self.DFA138_eot,
            eof = self.DFA138_eof,
            min = self.DFA138_min,
            max = self.DFA138_max,
            accept = self.DFA138_accept,
            special = self.DFA138_special,
            transition = self.DFA138_transition
378
379
            )

Maxime Perrotin's avatar
Maxime Perrotin committed
380
381
382
383
384
385
386
387
388
        self.dfa199 = self.DFA199(
            self, 199,
            eot = self.DFA199_eot,
            eof = self.DFA199_eof,
            min = self.DFA199_min,
            max = self.DFA199_max,
            accept = self.DFA199_accept,
            special = self.DFA199_special,
            transition = self.DFA199_transition
389
390
            )

Maxime Perrotin's avatar
Maxime Perrotin committed
391
392
393



Maxime Perrotin's avatar
Maxime Perrotin committed
394
        self.delegates = []
Maxime Perrotin's avatar
Maxime Perrotin committed
395
396
397
398
399

        self._adaptor = None
        self.adaptor = CommonTreeAdaptor()


Maxime Perrotin's avatar
Maxime Perrotin committed
400

Maxime Perrotin's avatar
Maxime Perrotin committed
401
402
403
404
405
406
407
408
409
410
411
    def getTreeAdaptor(self):
        return self._adaptor

    def setTreeAdaptor(self, adaptor):
        self._adaptor = adaptor

    adaptor = property(getTreeAdaptor, setTreeAdaptor)


    class pr_file_return(ParserRuleReturnScope):
        def __init__(self):
Maxime Perrotin's avatar
Maxime Perrotin committed
412
            super().__init__()
Maxime Perrotin's avatar
Maxime Perrotin committed
413
414
415
416
417
418

            self.tree = None




Maxime Perrotin's avatar
Maxime Perrotin committed
419

Maxime Perrotin's avatar
Maxime Perrotin committed
420
    # $ANTLR start "pr_file"
Maxime Perrotin's avatar
Maxime Perrotin committed
421
    # sdl92.g:147:1: pr_file : ( use_clause | system_definition | process_definition )+ ;
Maxime Perrotin's avatar
Maxime Perrotin committed
422
423
424
425
    def pr_file(self, ):
        retval = self.pr_file_return()
        retval.start = self.input.LT(1)

Maxime Perrotin's avatar
Maxime Perrotin committed
426

Maxime Perrotin's avatar
Maxime Perrotin committed
427
428
429
430
431
432
433
434
435
        root_0 = None

        use_clause1 = None
        system_definition2 = None
        process_definition3 = None


        try:
            try:
Maxime Perrotin's avatar
Maxime Perrotin committed
436
437
                # sdl92.g:148:9: ( ( use_clause | system_definition | process_definition )+ )
                # sdl92.g:148:17: ( use_clause | system_definition | process_definition )+
Maxime Perrotin's avatar
Maxime Perrotin committed
438
439
440
                pass 
                root_0 = self._adaptor.nil()

Maxime Perrotin's avatar
Maxime Perrotin committed
441

Maxime Perrotin's avatar
Maxime Perrotin committed
442
                # sdl92.g:148:17: ( use_clause | system_definition | process_definition )+
Maxime Perrotin's avatar
Maxime Perrotin committed
443
444
445
446
                cnt1 = 0
                while True: #loop1
                    alt1 = 4
                    LA1 = self.input.LA(1)
Maxime Perrotin's avatar
Maxime Perrotin committed
447
                    if LA1 in {231}:
448
449
                        LA1_2 = self.input.LA(2)

Maxime Perrotin's avatar
Maxime Perrotin committed
450
                        if (LA1_2 == KEEP) :
451
                            alt1 = 1
Maxime Perrotin's avatar
Maxime Perrotin committed
452
453
                        elif (LA1_2 in {ANSWER, COMMENT, CONNECT, DECISION, INPUT, JOIN, LABEL, NEXTSTATE, OUTPUT, PROCEDURE, PROCEDURE_CALL, PROCESS, PROVIDED, RETURN, START, STATE, STOP, TASK, TEXT}) :
                            alt1 = 3
454
455


Maxime Perrotin's avatar
Maxime Perrotin committed
456
                    elif LA1 in {USE}:
Maxime Perrotin's avatar
Maxime Perrotin committed
457
                        alt1 = 1
Maxime Perrotin's avatar
Maxime Perrotin committed
458
                    elif LA1 in {SYSTEM}:
Maxime Perrotin's avatar
Maxime Perrotin committed
459
                        alt1 = 2
Maxime Perrotin's avatar
Maxime Perrotin committed
460
                    elif LA1 in {PROCESS}:
Maxime Perrotin's avatar
Maxime Perrotin committed
461
462
463
                        alt1 = 3

                    if alt1 == 1:
Maxime Perrotin's avatar
Maxime Perrotin committed
464
                        # sdl92.g:148:18: use_clause
Maxime Perrotin's avatar
Maxime Perrotin committed
465
                        pass 
Maxime Perrotin's avatar
Maxime Perrotin committed
466
                        self._state.following.append(self.FOLLOW_use_clause_in_pr_file1386)
Maxime Perrotin's avatar
Maxime Perrotin committed
467
468
469
470
471
472
473
                        use_clause1 = self.use_clause()

                        self._state.following.pop()
                        if self._state.backtracking == 0:
                            self._adaptor.addChild(root_0, use_clause1.tree)


Maxime Perrotin's avatar
Maxime Perrotin committed
474

Maxime Perrotin's avatar
Maxime Perrotin committed
475
                    elif alt1 == 2:
Maxime Perrotin's avatar
Maxime Perrotin committed
476
                        # sdl92.g:149:19: system_definition
Maxime Perrotin's avatar
Maxime Perrotin committed
477
                        pass 
Maxime Perrotin's avatar
Maxime Perrotin committed
478
                        self._state.following.append(self.FOLLOW_system_definition_in_pr_file1406)
Maxime Perrotin's avatar
Maxime Perrotin committed
479
480
481
482
483
484
485
                        system_definition2 = self.system_definition()

                        self._state.following.pop()
                        if self._state.backtracking == 0:
                            self._adaptor.addChild(root_0, system_definition2.tree)


Maxime Perrotin's avatar
Maxime Perrotin committed
486

Maxime Perrotin's avatar
Maxime Perrotin committed
487
                    elif alt1 == 3:
Maxime Perrotin's avatar
Maxime Perrotin committed
488
                        # sdl92.g:150:19: process_definition
Maxime Perrotin's avatar
Maxime Perrotin committed
489
                        pass 
Maxime Perrotin's avatar
Maxime Perrotin committed
490
                        self._state.following.append(self.FOLLOW_process_definition_in_pr_file1426)
Maxime Perrotin's avatar
Maxime Perrotin committed
491
492
493
494
495
496
497
                        process_definition3 = self.process_definition()

                        self._state.following.pop()
                        if self._state.backtracking == 0:
                            self._adaptor.addChild(root_0, process_definition3.tree)


Maxime Perrotin's avatar
Maxime Perrotin committed
498

Maxime Perrotin's avatar
Maxime Perrotin committed
499
500
501
502
503
504
505
                    else:
                        if cnt1 >= 1:
                            break #loop1

                        if self._state.backtracking > 0:
                            raise BacktrackingFailed

Maxime Perrotin's avatar
Maxime Perrotin committed
506

Maxime Perrotin's avatar
Maxime Perrotin committed
507
508
509
510
511
512
513
                        eee = EarlyExitException(1, self.input)
                        raise eee

                    cnt1 += 1



Maxime Perrotin's avatar
Maxime Perrotin committed
514

Maxime Perrotin's avatar
Maxime Perrotin committed
515
516
517
                retval.stop = self.input.LT(-1)


Maxime Perrotin's avatar
Maxime Perrotin committed
518
                if self._state.backtracking == 0:
Maxime Perrotin's avatar
Maxime Perrotin committed
519
520
521
522
                    retval.tree = self._adaptor.rulePostProcessing(root_0)
                    self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)


Maxime Perrotin's avatar
Maxime Perrotin committed
523
524

            except RecognitionException as re:
Maxime Perrotin's avatar
Maxime Perrotin committed
525
526
527
528
                self.reportError(re)
                self.recover(self.input, re)
                retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)

Maxime Perrotin's avatar
Maxime Perrotin committed
529
        finally:
Maxime Perrotin's avatar
Maxime Perrotin committed
530
531
532
533
534
            pass
        return retval

    # $ANTLR end "pr_file"

Maxime Perrotin's avatar
Maxime Perrotin committed
535

Maxime Perrotin's avatar
Maxime Perrotin committed
536
537
    class system_definition_return(ParserRuleReturnScope):
        def __init__(self):
Maxime Perrotin's avatar
Maxime Perrotin committed
538
            super().__init__()
Maxime Perrotin's avatar
Maxime Perrotin committed
539
540
541
542
543
544

            self.tree = None




Maxime Perrotin's avatar
Maxime Perrotin committed
545

Maxime Perrotin's avatar
Maxime Perrotin committed
546
    # $ANTLR start "system_definition"
Maxime Perrotin's avatar
Maxime Perrotin committed
547
    # sdl92.g:154:1: system_definition : SYSTEM system_name end ( entity_in_system )* ENDSYSTEM ( system_name )? end -> ^( SYSTEM system_name ( entity_in_system )* ) ;
Maxime Perrotin's avatar
Maxime Perrotin committed
548
549
550
551
    def system_definition(self, ):
        retval = self.system_definition_return()
        retval.start = self.input.LT(1)

Maxime Perrotin's avatar
Maxime Perrotin committed
552

Maxime Perrotin's avatar
Maxime Perrotin committed
553
554
555
556
557
558
559
560
561
562
563
564
        root_0 = None

        SYSTEM4 = None
        ENDSYSTEM8 = None
        system_name5 = None
        end6 = None
        entity_in_system7 = None
        system_name9 = None
        end10 = None

        SYSTEM4_tree = None
        ENDSYSTEM8_tree = None
Maxime Perrotin's avatar
Maxime Perrotin committed
565
        stream_SYSTEM = RewriteRuleTokenStream(self._adaptor, "token SYSTEM")
566
        stream_ENDSYSTEM = RewriteRuleTokenStream(self._adaptor, "token ENDSYSTEM")
Maxime Perrotin's avatar
Maxime Perrotin committed
567
568
569
570
571
        stream_entity_in_system = RewriteRuleSubtreeStream(self._adaptor, "rule entity_in_system")
        stream_system_name = RewriteRuleSubtreeStream(self._adaptor, "rule system_name")
        stream_end = RewriteRuleSubtreeStream(self._adaptor, "rule end")
        try:
            try:
Maxime Perrotin's avatar
Maxime Perrotin committed
572
573
                # sdl92.g:155:9: ( SYSTEM system_name end ( entity_in_system )* ENDSYSTEM ( system_name )? end -> ^( SYSTEM system_name ( entity_in_system )* ) )
                # sdl92.g:155:17: SYSTEM system_name end ( entity_in_system )* ENDSYSTEM ( system_name )? end
Maxime Perrotin's avatar
Maxime Perrotin committed
574
                pass 
Maxime Perrotin's avatar
Maxime Perrotin committed
575
                SYSTEM4 = self.match(self.input, SYSTEM, self.FOLLOW_SYSTEM_in_system_definition1460) 
Maxime Perrotin's avatar
Maxime Perrotin committed
576
577
                if self._state.backtracking == 0:
                    stream_SYSTEM.add(SYSTEM4)
Maxime Perrotin's avatar
Maxime Perrotin committed
578
579


Maxime Perrotin's avatar
Maxime Perrotin committed
580
                self._state.following.append(self.FOLLOW_system_name_in_system_definition1462)
Maxime Perrotin's avatar
Maxime Perrotin committed
581
582
583
584
585
                system_name5 = self.system_name()

                self._state.following.pop()
                if self._state.backtracking == 0:
                    stream_system_name.add(system_name5.tree)
Maxime Perrotin's avatar
Maxime Perrotin committed
586
587


Maxime Perrotin's avatar
Maxime Perrotin committed
588
                self._state.following.append(self.FOLLOW_end_in_system_definition1464)
Maxime Perrotin's avatar
Maxime Perrotin committed
589
590
591
592
593
                end6 = self.end()

                self._state.following.pop()
                if self._state.backtracking == 0:
                    stream_end.add(end6.tree)
Maxime Perrotin's avatar
Maxime Perrotin committed
594
595


Maxime Perrotin's avatar
Maxime Perrotin committed
596
                # sdl92.g:156:17: ( entity_in_system )*
Maxime Perrotin's avatar
Maxime Perrotin committed
597
598
599
600
                while True: #loop2
                    alt2 = 2
                    LA2_0 = self.input.LA(1)

Maxime Perrotin's avatar
Maxime Perrotin committed
601
                    if (LA2_0 in {BLOCK, CHANNEL, EXPORTED, PROCEDURE, SIGNAL, 231}) :
Maxime Perrotin's avatar
Maxime Perrotin committed
602
603
604
605
                        alt2 = 1


                    if alt2 == 1:
Maxime Perrotin's avatar
Maxime Perrotin committed
606
                        # sdl92.g:156:17: entity_in_system
Maxime Perrotin's avatar
Maxime Perrotin committed
607
                        pass 
Maxime Perrotin's avatar
Maxime Perrotin committed
608
                        self._state.following.append(self.FOLLOW_entity_in_system_in_system_definition1482)
Maxime Perrotin's avatar
Maxime Perrotin committed
609
610
611
612
613
614
615
                        entity_in_system7 = self.entity_in_system()

                        self._state.following.pop()
                        if self._state.backtracking == 0:
                            stream_entity_in_system.add(entity_in_system7.tree)


Maxime Perrotin's avatar
Maxime Perrotin committed
616

Maxime Perrotin's avatar
Maxime Perrotin committed
617
618
                    else:
                        break #loop2
Maxime Perrotin's avatar
Maxime Perrotin committed
619
620


Maxime Perrotin's avatar
Maxime Perrotin committed
621
                ENDSYSTEM8 = self.match(self.input, ENDSYSTEM, self.FOLLOW_ENDSYSTEM_in_system_definition1501) 
Maxime Perrotin's avatar
Maxime Perrotin committed
622
623
                if self._state.backtracking == 0:
                    stream_ENDSYSTEM.add(ENDSYSTEM8)
Maxime Perrotin's avatar
Maxime Perrotin committed
624
625


Maxime Perrotin's avatar
Maxime Perrotin committed
626
                # sdl92.g:157:27: ( system_name )?
Maxime Perrotin's avatar
Maxime Perrotin committed
627
628
629
630
631
632
                alt3 = 2
                LA3_0 = self.input.LA(1)

                if (LA3_0 == ID) :
                    alt3 = 1
                if alt3 == 1:
Maxime Perrotin's avatar
Maxime Perrotin committed
633
                    # sdl92.g:157:27: system_name
Maxime Perrotin's avatar
Maxime Perrotin committed
634
                    pass 
Maxime Perrotin's avatar
Maxime Perrotin committed
635
                    self._state.following.append(self.FOLLOW_system_name_in_system_definition1503)
Maxime Perrotin's avatar
Maxime Perrotin committed
636
637
638
639
640
641
642
643
                    system_name9 = self.system_name()

                    self._state.following.pop()
                    if self._state.backtracking == 0:
                        stream_system_name.add(system_name9.tree)



Maxime Perrotin's avatar
Maxime Perrotin committed
644
645


Maxime Perrotin's avatar
Maxime Perrotin committed
646
                self._state.following.append(self.FOLLOW_end_in_system_definition1506)
Maxime Perrotin's avatar
Maxime Perrotin committed
647
648
649
650
651
652
                end10 = self.end()

                self._state.following.pop()
                if self._state.backtracking == 0:
                    stream_end.add(end10.tree)

Maxime Perrotin's avatar
Maxime Perrotin committed
653

Maxime Perrotin's avatar
Maxime Perrotin committed
654
                # AST Rewrite
Maxime Perrotin's avatar
Maxime Perrotin committed
655
                # elements: SYSTEM, system_name, entity_in_system
Maxime Perrotin's avatar
Maxime Perrotin committed
656
657
658
659
660
661
662
663
664
665
666
667
668
669
                # token labels: 
                # rule labels: retval
                # token list labels: 
                # rule list labels: 
                # wildcard labels: 
                if self._state.backtracking == 0:
                    retval.tree = root_0
                    if retval is not None:
                        stream_retval = RewriteRuleSubtreeStream(self._adaptor, "rule retval", retval.tree)
                    else:
                        stream_retval = RewriteRuleSubtreeStream(self._adaptor, "token retval", None)


                    root_0 = self._adaptor.nil()
Maxime Perrotin's avatar
Maxime Perrotin committed
670
671
                    # 158:9: -> ^( SYSTEM system_name ( entity_in_system )* )
                    # sdl92.g:158:17: ^( SYSTEM system_name ( entity_in_system )* )
Maxime Perrotin's avatar
Maxime Perrotin committed
672
                    root_1 = self._adaptor.nil()
Maxime Perrotin's avatar
Maxime Perrotin committed
673
674
675
                    root_1 = self._adaptor.becomeRoot(
                    stream_SYSTEM.nextNode()
                    , root_1)
Maxime Perrotin's avatar
Maxime Perrotin committed
676
677

                    self._adaptor.addChild(root_1, stream_system_name.nextTree())
Maxime Perrotin's avatar
Maxime Perrotin committed
678

Maxime Perrotin's avatar
Maxime Perrotin committed
679
                    # sdl92.g:158:38: ( entity_in_system )*
Maxime Perrotin's avatar
Maxime Perrotin committed
680
681
682
683
684
685
686
687
688
689
                    while stream_entity_in_system.hasNext():
                        self._adaptor.addChild(root_1, stream_entity_in_system.nextTree())


                    stream_entity_in_system.reset();

                    self._adaptor.addChild(root_0, root_1)



Maxime Perrotin's avatar
Maxime Perrotin committed
690

Maxime Perrotin's avatar
Maxime Perrotin committed
691
692
693
694
                    retval.tree = root_0



Maxime Perrotin's avatar
Maxime Perrotin committed
695
696


Maxime Perrotin's avatar
Maxime Perrotin committed
697
698
699
                retval.stop = self.input.LT(-1)


Maxime Perrotin's avatar
Maxime Perrotin committed
700
                if self._state.backtracking == 0:
Maxime Perrotin's avatar
Maxime Perrotin committed
701
702
703
704
                    retval.tree = self._adaptor.rulePostProcessing(root_0)
                    self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)


Maxime Perrotin's avatar
Maxime Perrotin committed
705
706

            except RecognitionException as re:
Maxime Perrotin's avatar
Maxime Perrotin committed
707
708
709
710
                self.reportError(re)
                self.recover(self.input, re)
                retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)

Maxime Perrotin's avatar
Maxime Perrotin committed
711
        finally:
Maxime Perrotin's avatar
Maxime Perrotin committed
712
713
714
715
716
            pass
        return retval

    # $ANTLR end "system_definition"

Maxime Perrotin's avatar
Maxime Perrotin committed
717

Maxime Perrotin's avatar
Maxime Perrotin committed
718
719
    class use_clause_return(ParserRuleReturnScope):
        def __init__(self):
Maxime Perrotin's avatar
Maxime Perrotin committed
720
            super().__init__()
Maxime Perrotin's avatar
Maxime Perrotin committed
721
722
723
724
725
726

            self.tree = None




Maxime Perrotin's avatar
Maxime Perrotin committed
727

Maxime Perrotin's avatar
Maxime Perrotin committed
728
    # $ANTLR start "use_clause"
Maxime Perrotin's avatar
Maxime Perrotin committed
729
    # sdl92.g:162:1: use_clause : ( use_asn1 )? USE package_name ( '/' def_selection_list )? end -> ^( USE ( use_asn1 )? ( end )? package_name ( def_selection_list )? ) ;
Maxime Perrotin's avatar
Maxime Perrotin committed
730
731
732
733
    def use_clause(self, ):
        retval = self.use_clause_return()
        retval.start = self.input.LT(1)

Maxime Perrotin's avatar
Maxime Perrotin committed
734

Maxime Perrotin's avatar
Maxime Perrotin committed
735
736
737
        root_0 = None

        USE12 = None
738
        char_literal14 = None
Maxime Perrotin's avatar
Maxime Perrotin committed
739
740
        use_asn111 = None
        package_name13 = None
741
742
        def_selection_list15 = None
        end16 = None
Maxime Perrotin's avatar
Maxime Perrotin committed
743
744

        USE12_tree = None
745
        char_literal14_tree = None
Maxime Perrotin's avatar
Maxime Perrotin committed
746
        stream_DIV = RewriteRuleTokenStream(self._adaptor, "token DIV")
747
        stream_USE = RewriteRuleTokenStream(self._adaptor, "token USE")
Maxime Perrotin's avatar
Maxime Perrotin committed
748
749
        stream_use_asn1 = RewriteRuleSubtreeStream(self._adaptor, "rule use_asn1")
        stream_package_name = RewriteRuleSubtreeStream(self._adaptor, "rule package_name")
Maxime Perrotin's avatar
Maxime Perrotin committed
750
        stream_end = RewriteRuleSubtreeStream(self._adaptor, "rule end")
751
        stream_def_selection_list = RewriteRuleSubtreeStream(self._adaptor, "rule def_selection_list")
Maxime Perrotin's avatar
Maxime Perrotin committed
752
753
        try:
            try:
Maxime Perrotin's avatar
Maxime Perrotin committed
754
755
                # sdl92.g:163:9: ( ( use_asn1 )? USE package_name ( '/' def_selection_list )? end -> ^( USE ( use_asn1 )? ( end )? package_name ( def_selection_list )? ) )
                # sdl92.g:163:17: ( use_asn1 )? USE package_name ( '/' def_selection_list )? end
Maxime Perrotin's avatar
Maxime Perrotin committed
756
                pass 
Maxime Perrotin's avatar
Maxime Perrotin committed
757
                # sdl92.g:163:17: ( use_asn1 )?
Maxime Perrotin's avatar
Maxime Perrotin committed
758
759
760
                alt4 = 2
                LA4_0 = self.input.LA(1)

Maxime Perrotin's avatar
Maxime Perrotin committed
761
                if (LA4_0 == 231) :
Maxime Perrotin's avatar
Maxime Perrotin committed
762
763
                    alt4 = 1
                if alt4 == 1:
Maxime Perrotin's avatar
Maxime Perrotin committed
764
                    # sdl92.g:163:17: use_asn1
Maxime Perrotin's avatar
Maxime Perrotin committed
765
                    pass 
Maxime Perrotin's avatar
Maxime Perrotin committed
766
                    self._state.following.append(self.FOLLOW_use_asn1_in_use_clause1562)
Maxime Perrotin's avatar
Maxime Perrotin committed
767
768
769
770
771
772
773
774
                    use_asn111 = self.use_asn1()

                    self._state.following.pop()
                    if self._state.backtracking == 0:
                        stream_use_asn1.add(use_asn111.tree)



Maxime Perrotin's avatar
Maxime Perrotin committed
775
776


Maxime Perrotin's avatar
Maxime Perrotin committed
777
                USE12 = self.match(self.input, USE, self.FOLLOW_USE_in_use_clause1581) 
Maxime Perrotin's avatar
Maxime Perrotin committed
778
779
                if self._state.backtracking == 0:
                    stream_USE.add(USE12)
Maxime Perrotin's avatar
Maxime Perrotin committed
780
781


Maxime Perrotin's avatar
Maxime Perrotin committed
782
                self._state.following.append(self.FOLLOW_package_name_in_use_clause1583)
Maxime Perrotin's avatar
Maxime Perrotin committed
783
784
785
786
787
                package_name13 = self.package_name()

                self._state.following.pop()
                if self._state.backtracking == 0:
                    stream_package_name.add(package_name13.tree)
Maxime Perrotin's avatar
Maxime Perrotin committed
788
789


Maxime Perrotin's avatar
Maxime Perrotin committed
790
                # sdl92.g:165:17: ( '/' def_selection_list )?
791
792
793
794
795
796
                alt5 = 2
                LA5_0 = self.input.LA(1)

                if (LA5_0 == DIV) :
                    alt5 = 1
                if alt5 == 1:
Maxime Perrotin's avatar
Maxime Perrotin committed
797
                    # sdl92.g:165:18: '/' def_selection_list
798
                    pass 
Maxime Perrotin's avatar
Maxime Perrotin committed
799
                    char_literal14 = self.match(self.input, DIV, self.FOLLOW_DIV_in_use_clause1602) 
800
801
                    if self._state.backtracking == 0:
                        stream_DIV.add(char_literal14)
Maxime Perrotin's avatar
Maxime Perrotin committed
802
803


Maxime Perrotin's avatar
Maxime Perrotin committed
804
                    self._state.following.append(self.FOLLOW_def_selection_list_in_use_clause1604)
805
806
807
808
809
810
811
812
                    def_selection_list15 = self.def_selection_list()

                    self._state.following.pop()
                    if self._state.backtracking == 0:
                        stream_def_selection_list.add(def_selection_list15.tree)



Maxime Perrotin's avatar
Maxime Perrotin committed
813
814


Maxime Perrotin's avatar
Maxime Perrotin committed
815
                self._state.following.append(self.FOLLOW_end_in_use_clause1625)
816
                end16 = self.end()
Maxime Perrotin's avatar
Maxime Perrotin committed
817
818
819

                self._state.following.pop()
                if self._state.backtracking == 0:
820
                    stream_end.add(end16.tree)
Maxime Perrotin's avatar
Maxime Perrotin committed
821

Maxime Perrotin's avatar
Maxime Perrotin committed
822

Maxime Perrotin's avatar
Maxime Perrotin committed
823
                # AST Rewrite
Maxime Perrotin's avatar
Maxime Perrotin committed
824
                # elements: USE, use_asn1, end, package_name, def_selection_list
Maxime Perrotin's avatar
Maxime Perrotin committed
825
826
827
828
829
830
831
832
833
834
835
836
837
838
                # token labels: 
                # rule labels: retval
                # token list labels: 
                # rule list labels: 
                # wildcard labels: 
                if self._state.backtracking == 0:
                    retval.tree = root_0
                    if retval is not None:
                        stream_retval = RewriteRuleSubtreeStream(self._adaptor, "rule retval", retval.tree)
                    else:
                        stream_retval = RewriteRuleSubtreeStream(self._adaptor, "token retval", None)


                    root_0 = self._adaptor.nil()
Maxime Perrotin's avatar
Maxime Perrotin committed
839
840
                    # 167:9: -> ^( USE ( use_asn1 )? ( end )? package_name ( def_selection_list )? )
                    # sdl92.g:167:17: ^( USE ( use_asn1 )? ( end )? package_name ( def_selection_list )? )
Maxime Perrotin's avatar
Maxime Perrotin committed
841
                    root_1 = self._adaptor.nil()
Maxime Perrotin's avatar
Maxime Perrotin committed
842
843
844
                    root_1 = self._adaptor.becomeRoot(
                    stream_USE.nextNode()
                    , root_1)
Maxime Perrotin's avatar
Maxime Perrotin committed
845

Maxime Perrotin's avatar
Maxime Perrotin committed
846
                    # sdl92.g:167:23: ( use_asn1 )?
Maxime Perrotin's avatar
Maxime Perrotin committed
847
848
849
850
851
                    if stream_use_asn1.hasNext():
                        self._adaptor.addChild(root_1, stream_use_asn1.nextTree())


                    stream_use_asn1.reset();
Maxime Perrotin's avatar
Maxime Perrotin committed
852

Maxime Perrotin's avatar
Maxime Perrotin committed
853
                    # sdl92.g:167:33: ( end )?
854
855
856
857
858
                    if stream_end.hasNext():
                        self._adaptor.addChild(root_1, stream_end.nextTree())


                    stream_end.reset();
Maxime Perrotin's avatar
Maxime Perrotin committed
859

Maxime Perrotin's avatar
Maxime Perrotin committed
860
                    self._adaptor.addChild(root_1, stream_package_name.nextTree())
Maxime Perrotin's avatar
Maxime Perrotin committed
861

Maxime Perrotin's avatar
Maxime Perrotin committed
862
                    # sdl92.g:167:51: ( def_selection_list )?
863
864
865
866
867
                    if stream_def_selection_list.hasNext():
                        self._adaptor.addChild(root_1, stream_def_selection_list.nextTree())


                    stream_def_selection_list.reset();
Maxime Perrotin's avatar
Maxime Perrotin committed
868
869
870
871
872

                    self._adaptor.addChild(root_0, root_1)



Maxime Perrotin's avatar
Maxime Perrotin committed
873

Maxime Perrotin's avatar
Maxime Perrotin committed
874
875
876
877
                    retval.tree = root_0



Maxime Perrotin's avatar
Maxime Perrotin committed
878
879


Maxime Perrotin's avatar
Maxime Perrotin committed
880
881
882
                retval.stop = self.input.LT(-1)


Maxime Perrotin's avatar
Maxime Perrotin committed
883
                if self._state.backtracking == 0:
Maxime Perrotin's avatar
Maxime Perrotin committed
884
885
886
887
                    retval.tree = self._adaptor.rulePostProcessing(root_0)
                    self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)


Maxime Perrotin's avatar
Maxime Perrotin committed
888
889

            except RecognitionException as re:
Maxime Perrotin's avatar
Maxime Perrotin committed
890
891
892
893
                self.reportError(re)
                self.recover(self.input, re)
                retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)

Maxime Perrotin's avatar
Maxime Perrotin committed
894
        finally:
Maxime Perrotin's avatar
Maxime Perrotin committed
895
896
897
898
899
            pass
        return retval

    # $ANTLR end "use_clause"

Maxime Perrotin's avatar
Maxime Perrotin committed
900

901
902
    class def_selection_list_return(ParserRuleReturnScope):
        def __init__(self):
Maxime Perrotin's avatar
Maxime Perrotin committed
903
            super().__init__()
904
905
906
907
908
909

            self.tree = None




Maxime Perrotin's avatar
Maxime Perrotin committed
910

911
    # $ANTLR start "def_selection_list"
Maxime Perrotin's avatar
Maxime Perrotin committed
912
    # sdl92.g:174:1: def_selection_list : ID ( ',' ! ID )* ;
913
914
915
916
    def def_selection_list(self, ):
        retval = self.def_selection_list_return()
        retval.start = self.input.LT(1)

Maxime Perrotin's avatar
Maxime Perrotin committed
917

918
919
920
921
922
923
924
925
926
927
928
929
        root_0 = None

        ID17 = None
        char_literal18 = None
        ID19 = None

        ID17_tree = None
        char_literal18_tree = None
        ID19_tree = None

        try:
            try:
Maxime Perrotin's avatar
Maxime Perrotin committed
930
931
                # sdl92.g:175:9: ( ID ( ',' ! ID )* )
                # sdl92.g:175:17: ID ( ',' ! ID )*
932
933
934
935
                pass 
                root_0 = self._adaptor.nil()


Maxime Perrotin's avatar
Maxime Perrotin committed
936
                ID17 = self.match(self.input, ID, self.FOLLOW_ID_in_def_selection_list1689)
Maxime Perrotin's avatar
Maxime Perrotin committed
937
                if self._state.backtracking == 0:
938
939
940
                    ID17_tree = self._adaptor.createWithPayload(ID17)
                    self._adaptor.addChild(root_0, ID17_tree)

Maxime Perrotin's avatar
Maxime Perrotin committed
941
942


Maxime Perrotin's avatar
Maxime Perrotin committed
943
                # sdl92.g:175:20: ( ',' ! ID )*
944
945
946
947
948
949
950
951
952
                while True: #loop6
                    alt6 = 2
                    LA6_0 = self.input.LA(1)

                    if (LA6_0 == COMMA) :
                        alt6 = 1


                    if alt6 == 1:
Maxime Perrotin's avatar
Maxime Perrotin committed
953
                        # sdl92.g:175:21: ',' ! ID
954
                        pass 
Maxime Perrotin's avatar
Maxime Perrotin committed
955
                        char_literal18 = self.match(self.input, COMMA, self.FOLLOW_COMMA_in_def_selection_list1692)
956

Maxime Perrotin's avatar
Maxime Perrotin committed
957
                        ID19 = self.match(self.input, ID, self.FOLLOW_ID_in_def_selection_list1695)
Maxime Perrotin's avatar
Maxime Perrotin committed
958
                        if self._state.backtracking == 0:
959
960
961
962
963
                            ID19_tree = self._adaptor.createWithPayload(ID19)
                            self._adaptor.addChild(root_0, ID19_tree)



Maxime Perrotin's avatar
Maxime Perrotin committed
964

965
966
967
968
969
                    else:
                        break #loop6



Maxime Perrotin's avatar
Maxime Perrotin committed
970

971
972
973
                retval.stop = self.input.LT(-1)


Maxime Perrotin's avatar
Maxime Perrotin committed
974
                if self._state.backtracking == 0:
975
976
977
978
                    retval.tree = self._adaptor.rulePostProcessing(root_0)
                    self._adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop)


Maxime Perrotin's avatar
Maxime Perrotin committed
979
980

            except RecognitionException as re:
981
982
983
984
                self.reportError(re)
                self.recover(self.input, re)
                retval.tree = self._adaptor.errorNode(self.input, retval.start, self.input.LT(-1), re)

Maxime Perrotin's avatar
Maxime Perrotin committed
985
        finally:
986
987
988
989
990
            pass
        return retval

    # $ANTLR end "def_selection_list"

Maxime Perrotin's avatar
Maxime Perrotin committed
991

Maxime Perrotin's avatar
Maxime Perrotin committed
992
993
    class entity_in_system_return(ParserRuleReturnScope):
        def __init__(self):
Maxime Perrotin's avatar
Maxime Perrotin committed
994
            super().__init__()
Maxime Perrotin's avatar
Maxime Perrotin committed
995
996
997
998
999
1000

            self.tree = None