@dseict/psc-interpreter 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3075 @@
1
+ // Generated from ./PSCParser.g4 by ANTLR 4.13.2
2
+ // noinspection ES6UnusedImports,JSUnusedGlobalSymbols,JSUnusedLocalSymbols
3
+ import { ATN, ATNDeserializer, DecisionState, DFA, FailedPredicateException, RecognitionException, NoViableAltException, BailErrorStrategy, Parser, ParserATNSimulator, RuleContext, ParserRuleContext, PredictionMode, PredictionContextCache, TerminalNode, RuleNode, Token, TokenStream, Interval, IntervalSet } from 'antlr4';
4
+ import PSCParserVisitor from "./PSCParserVisitor.js";
5
+ export default class PSCParser extends Parser {
6
+ static INDENT = 1;
7
+ static DEDENT = 2;
8
+ static WHITESPACE = 3;
9
+ static NEWLINE = 4;
10
+ static COMMENT = 5;
11
+ static COMMA = 6;
12
+ static LPAREN = 7;
13
+ static RPAREN = 8;
14
+ static LSQUARE = 9;
15
+ static RSQUARE = 10;
16
+ static SQUOTE = 11;
17
+ static DQUOTE = 12;
18
+ static STRING = 13;
19
+ static NULL = 14;
20
+ static INTEGER = 15;
21
+ static FLOAT = 16;
22
+ static BOOLEAN = 17;
23
+ static PLUS = 18;
24
+ static MINUS = 19;
25
+ static MULTIPLY = 20;
26
+ static DIVIDE = 21;
27
+ static MODULO = 22;
28
+ static EXPONENT = 23;
29
+ static AND = 24;
30
+ static OR = 25;
31
+ static NOT = 26;
32
+ static EQUAL = 27;
33
+ static NEQUAL = 28;
34
+ static GT = 29;
35
+ static LT = 30;
36
+ static GTEQ = 31;
37
+ static LTEQ = 32;
38
+ static IF = 33;
39
+ static ELSE = 34;
40
+ static WHILE = 35;
41
+ static DO = 36;
42
+ static REPEAT = 37;
43
+ static UNTIL = 38;
44
+ static FOR = 39;
45
+ static FROM = 40;
46
+ static DOWN = 41;
47
+ static TO = 42;
48
+ static ASSIGN = 43;
49
+ static INPUT = 44;
50
+ static OUTPUT = 45;
51
+ static SUBPROGRAM = 46;
52
+ static RETURN = 47;
53
+ static ID = 48;
54
+ static EOF = Token.EOF;
55
+ static RULE_program = 0;
56
+ static RULE_addOp = 1;
57
+ static RULE_mulOp = 2;
58
+ static RULE_expOp = 3;
59
+ static RULE_compOp = 4;
60
+ static RULE_expr = 5;
61
+ static RULE_orExpr = 6;
62
+ static RULE_andExpr = 7;
63
+ static RULE_compExpr = 8;
64
+ static RULE_addExpr = 9;
65
+ static RULE_mulExpr = 10;
66
+ static RULE_expExpr = 11;
67
+ static RULE_unaryExpr = 12;
68
+ static RULE_notExpr = 13;
69
+ static RULE_primaryExpr = 14;
70
+ static RULE_groupExpr = 15;
71
+ static RULE_atom = 16;
72
+ static RULE_lits = 17;
73
+ static RULE_intLits = 18;
74
+ static RULE_floatLits = 19;
75
+ static RULE_arrayLits = 20;
76
+ static RULE_stmts = 21;
77
+ static RULE_stmt = 22;
78
+ static RULE_block = 23;
79
+ static RULE_ifStmt = 24;
80
+ static RULE_whileStmt = 25;
81
+ static RULE_doWhileStmt = 26;
82
+ static RULE_repeatUntilStmt = 27;
83
+ static RULE_forStmt = 28;
84
+ static RULE_asmStmt = 29;
85
+ static RULE_lvalue = 30;
86
+ static RULE_inputStmt = 31;
87
+ static RULE_outputStmt = 32;
88
+ static RULE_subprogram = 33;
89
+ static RULE_returnStmt = 34;
90
+ static literalNames = [null, null,
91
+ null, null,
92
+ null, null,
93
+ "','", "'('",
94
+ "')'", "'['",
95
+ "']'", "'''",
96
+ "'\"'", null,
97
+ "'null'", null,
98
+ null, null,
99
+ "'+'", "'-'",
100
+ "'*'", "'/'",
101
+ null, null,
102
+ "'and'", "'or'",
103
+ "'not'", "'='",
104
+ "'<>'", "'>'",
105
+ "'<'", "'>='",
106
+ "'<='", "'if'",
107
+ "'else'", "'while'",
108
+ "'do'", "'repeat'",
109
+ "'until'", "'for'",
110
+ "'from'", "'down'",
111
+ "'to'", "'<-'",
112
+ "'input'", "'output'",
113
+ null, "'return'"];
114
+ static symbolicNames = [null, "INDENT",
115
+ "DEDENT", "WHITESPACE",
116
+ "NEWLINE",
117
+ "COMMENT",
118
+ "COMMA", "LPAREN",
119
+ "RPAREN", "LSQUARE",
120
+ "RSQUARE",
121
+ "SQUOTE", "DQUOTE",
122
+ "STRING", "NULL",
123
+ "INTEGER",
124
+ "FLOAT", "BOOLEAN",
125
+ "PLUS", "MINUS",
126
+ "MULTIPLY",
127
+ "DIVIDE", "MODULO",
128
+ "EXPONENT",
129
+ "AND", "OR",
130
+ "NOT", "EQUAL",
131
+ "NEQUAL", "GT",
132
+ "LT", "GTEQ",
133
+ "LTEQ", "IF",
134
+ "ELSE", "WHILE",
135
+ "DO", "REPEAT",
136
+ "UNTIL", "FOR",
137
+ "FROM", "DOWN",
138
+ "TO", "ASSIGN",
139
+ "INPUT", "OUTPUT",
140
+ "SUBPROGRAM",
141
+ "RETURN", "ID"];
142
+ // tslint:disable:no-trailing-whitespace
143
+ static ruleNames = [
144
+ "program", "addOp", "mulOp", "expOp", "compOp", "expr", "orExpr", "andExpr",
145
+ "compExpr", "addExpr", "mulExpr", "expExpr", "unaryExpr", "notExpr", "primaryExpr",
146
+ "groupExpr", "atom", "lits", "intLits", "floatLits", "arrayLits", "stmts",
147
+ "stmt", "block", "ifStmt", "whileStmt", "doWhileStmt", "repeatUntilStmt",
148
+ "forStmt", "asmStmt", "lvalue", "inputStmt", "outputStmt", "subprogram",
149
+ "returnStmt",
150
+ ];
151
+ get grammarFileName() { return "PSCParser.g4"; }
152
+ get literalNames() { return PSCParser.literalNames; }
153
+ get symbolicNames() { return PSCParser.symbolicNames; }
154
+ get ruleNames() { return PSCParser.ruleNames; }
155
+ get serializedATN() { return PSCParser._serializedATN; }
156
+ createFailedPredicateException(predicate, message) {
157
+ return new FailedPredicateException(this, predicate, message);
158
+ }
159
+ constructor(input) {
160
+ super(input);
161
+ this._interp = new ParserATNSimulator(this, PSCParser._ATN, PSCParser.DecisionsToDFA, new PredictionContextCache());
162
+ }
163
+ // @RuleVersion(0)
164
+ program() {
165
+ let localctx = new ProgramContext(this, this._ctx, this.state);
166
+ this.enterRule(localctx, 0, PSCParser.RULE_program);
167
+ let _la;
168
+ try {
169
+ this.enterOuterAlt(localctx, 1);
170
+ {
171
+ this.state = 73;
172
+ this._errHandler.sync(this);
173
+ _la = this._input.LA(1);
174
+ while (_la === 46) {
175
+ {
176
+ {
177
+ this.state = 70;
178
+ this.subprogram();
179
+ }
180
+ }
181
+ this.state = 75;
182
+ this._errHandler.sync(this);
183
+ _la = this._input.LA(1);
184
+ }
185
+ this.state = 77;
186
+ this._errHandler.sync(this);
187
+ _la = this._input.LA(1);
188
+ if ((((_la) & ~0x1F) === 0 && ((1 << _la) & 68149904) !== 0) || ((((_la - 33)) & ~0x1F) === 0 && ((1 << (_la - 33)) & 55389) !== 0)) {
189
+ {
190
+ this.state = 76;
191
+ this.stmts();
192
+ }
193
+ }
194
+ this.state = 79;
195
+ this.match(PSCParser.EOF);
196
+ }
197
+ }
198
+ catch (re) {
199
+ if (re instanceof RecognitionException) {
200
+ localctx.exception = re;
201
+ this._errHandler.reportError(this, re);
202
+ this._errHandler.recover(this, re);
203
+ }
204
+ else {
205
+ throw re;
206
+ }
207
+ }
208
+ finally {
209
+ this.exitRule();
210
+ }
211
+ return localctx;
212
+ }
213
+ // @RuleVersion(0)
214
+ addOp() {
215
+ let localctx = new AddOpContext(this, this._ctx, this.state);
216
+ this.enterRule(localctx, 2, PSCParser.RULE_addOp);
217
+ let _la;
218
+ try {
219
+ this.enterOuterAlt(localctx, 1);
220
+ {
221
+ this.state = 81;
222
+ _la = this._input.LA(1);
223
+ if (!(_la === 18 || _la === 19)) {
224
+ this._errHandler.recoverInline(this);
225
+ }
226
+ else {
227
+ this._errHandler.reportMatch(this);
228
+ this.consume();
229
+ }
230
+ }
231
+ }
232
+ catch (re) {
233
+ if (re instanceof RecognitionException) {
234
+ localctx.exception = re;
235
+ this._errHandler.reportError(this, re);
236
+ this._errHandler.recover(this, re);
237
+ }
238
+ else {
239
+ throw re;
240
+ }
241
+ }
242
+ finally {
243
+ this.exitRule();
244
+ }
245
+ return localctx;
246
+ }
247
+ // @RuleVersion(0)
248
+ mulOp() {
249
+ let localctx = new MulOpContext(this, this._ctx, this.state);
250
+ this.enterRule(localctx, 4, PSCParser.RULE_mulOp);
251
+ let _la;
252
+ try {
253
+ this.enterOuterAlt(localctx, 1);
254
+ {
255
+ this.state = 83;
256
+ _la = this._input.LA(1);
257
+ if (!((((_la) & ~0x1F) === 0 && ((1 << _la) & 7340032) !== 0))) {
258
+ this._errHandler.recoverInline(this);
259
+ }
260
+ else {
261
+ this._errHandler.reportMatch(this);
262
+ this.consume();
263
+ }
264
+ }
265
+ }
266
+ catch (re) {
267
+ if (re instanceof RecognitionException) {
268
+ localctx.exception = re;
269
+ this._errHandler.reportError(this, re);
270
+ this._errHandler.recover(this, re);
271
+ }
272
+ else {
273
+ throw re;
274
+ }
275
+ }
276
+ finally {
277
+ this.exitRule();
278
+ }
279
+ return localctx;
280
+ }
281
+ // @RuleVersion(0)
282
+ expOp() {
283
+ let localctx = new ExpOpContext(this, this._ctx, this.state);
284
+ this.enterRule(localctx, 6, PSCParser.RULE_expOp);
285
+ try {
286
+ this.enterOuterAlt(localctx, 1);
287
+ {
288
+ this.state = 85;
289
+ this.match(PSCParser.EXPONENT);
290
+ }
291
+ }
292
+ catch (re) {
293
+ if (re instanceof RecognitionException) {
294
+ localctx.exception = re;
295
+ this._errHandler.reportError(this, re);
296
+ this._errHandler.recover(this, re);
297
+ }
298
+ else {
299
+ throw re;
300
+ }
301
+ }
302
+ finally {
303
+ this.exitRule();
304
+ }
305
+ return localctx;
306
+ }
307
+ // @RuleVersion(0)
308
+ compOp() {
309
+ let localctx = new CompOpContext(this, this._ctx, this.state);
310
+ this.enterRule(localctx, 8, PSCParser.RULE_compOp);
311
+ let _la;
312
+ try {
313
+ this.enterOuterAlt(localctx, 1);
314
+ {
315
+ this.state = 87;
316
+ _la = this._input.LA(1);
317
+ if (!(((((_la - 27)) & ~0x1F) === 0 && ((1 << (_la - 27)) & 63) !== 0))) {
318
+ this._errHandler.recoverInline(this);
319
+ }
320
+ else {
321
+ this._errHandler.reportMatch(this);
322
+ this.consume();
323
+ }
324
+ }
325
+ }
326
+ catch (re) {
327
+ if (re instanceof RecognitionException) {
328
+ localctx.exception = re;
329
+ this._errHandler.reportError(this, re);
330
+ this._errHandler.recover(this, re);
331
+ }
332
+ else {
333
+ throw re;
334
+ }
335
+ }
336
+ finally {
337
+ this.exitRule();
338
+ }
339
+ return localctx;
340
+ }
341
+ // @RuleVersion(0)
342
+ expr() {
343
+ let localctx = new ExprContext(this, this._ctx, this.state);
344
+ this.enterRule(localctx, 10, PSCParser.RULE_expr);
345
+ try {
346
+ this.enterOuterAlt(localctx, 1);
347
+ {
348
+ this.state = 89;
349
+ this.orExpr();
350
+ }
351
+ }
352
+ catch (re) {
353
+ if (re instanceof RecognitionException) {
354
+ localctx.exception = re;
355
+ this._errHandler.reportError(this, re);
356
+ this._errHandler.recover(this, re);
357
+ }
358
+ else {
359
+ throw re;
360
+ }
361
+ }
362
+ finally {
363
+ this.exitRule();
364
+ }
365
+ return localctx;
366
+ }
367
+ // @RuleVersion(0)
368
+ orExpr() {
369
+ let localctx = new OrExprContext(this, this._ctx, this.state);
370
+ this.enterRule(localctx, 12, PSCParser.RULE_orExpr);
371
+ let _la;
372
+ try {
373
+ this.enterOuterAlt(localctx, 1);
374
+ {
375
+ this.state = 91;
376
+ this.andExpr();
377
+ this.state = 96;
378
+ this._errHandler.sync(this);
379
+ _la = this._input.LA(1);
380
+ while (_la === 25) {
381
+ {
382
+ {
383
+ this.state = 92;
384
+ this.match(PSCParser.OR);
385
+ this.state = 93;
386
+ this.andExpr();
387
+ }
388
+ }
389
+ this.state = 98;
390
+ this._errHandler.sync(this);
391
+ _la = this._input.LA(1);
392
+ }
393
+ }
394
+ }
395
+ catch (re) {
396
+ if (re instanceof RecognitionException) {
397
+ localctx.exception = re;
398
+ this._errHandler.reportError(this, re);
399
+ this._errHandler.recover(this, re);
400
+ }
401
+ else {
402
+ throw re;
403
+ }
404
+ }
405
+ finally {
406
+ this.exitRule();
407
+ }
408
+ return localctx;
409
+ }
410
+ // @RuleVersion(0)
411
+ andExpr() {
412
+ let localctx = new AndExprContext(this, this._ctx, this.state);
413
+ this.enterRule(localctx, 14, PSCParser.RULE_andExpr);
414
+ let _la;
415
+ try {
416
+ this.enterOuterAlt(localctx, 1);
417
+ {
418
+ this.state = 99;
419
+ this.compExpr();
420
+ this.state = 104;
421
+ this._errHandler.sync(this);
422
+ _la = this._input.LA(1);
423
+ while (_la === 24) {
424
+ {
425
+ {
426
+ this.state = 100;
427
+ this.match(PSCParser.AND);
428
+ this.state = 101;
429
+ this.compExpr();
430
+ }
431
+ }
432
+ this.state = 106;
433
+ this._errHandler.sync(this);
434
+ _la = this._input.LA(1);
435
+ }
436
+ }
437
+ }
438
+ catch (re) {
439
+ if (re instanceof RecognitionException) {
440
+ localctx.exception = re;
441
+ this._errHandler.reportError(this, re);
442
+ this._errHandler.recover(this, re);
443
+ }
444
+ else {
445
+ throw re;
446
+ }
447
+ }
448
+ finally {
449
+ this.exitRule();
450
+ }
451
+ return localctx;
452
+ }
453
+ // @RuleVersion(0)
454
+ compExpr() {
455
+ let localctx = new CompExprContext(this, this._ctx, this.state);
456
+ this.enterRule(localctx, 16, PSCParser.RULE_compExpr);
457
+ let _la;
458
+ try {
459
+ this.enterOuterAlt(localctx, 1);
460
+ {
461
+ this.state = 107;
462
+ this.addExpr();
463
+ this.state = 113;
464
+ this._errHandler.sync(this);
465
+ _la = this._input.LA(1);
466
+ while (((((_la - 27)) & ~0x1F) === 0 && ((1 << (_la - 27)) & 63) !== 0)) {
467
+ {
468
+ {
469
+ this.state = 108;
470
+ this.compOp();
471
+ this.state = 109;
472
+ this.addExpr();
473
+ }
474
+ }
475
+ this.state = 115;
476
+ this._errHandler.sync(this);
477
+ _la = this._input.LA(1);
478
+ }
479
+ }
480
+ }
481
+ catch (re) {
482
+ if (re instanceof RecognitionException) {
483
+ localctx.exception = re;
484
+ this._errHandler.reportError(this, re);
485
+ this._errHandler.recover(this, re);
486
+ }
487
+ else {
488
+ throw re;
489
+ }
490
+ }
491
+ finally {
492
+ this.exitRule();
493
+ }
494
+ return localctx;
495
+ }
496
+ // @RuleVersion(0)
497
+ addExpr() {
498
+ let localctx = new AddExprContext(this, this._ctx, this.state);
499
+ this.enterRule(localctx, 18, PSCParser.RULE_addExpr);
500
+ let _la;
501
+ try {
502
+ this.enterOuterAlt(localctx, 1);
503
+ {
504
+ this.state = 116;
505
+ this.mulExpr();
506
+ this.state = 122;
507
+ this._errHandler.sync(this);
508
+ _la = this._input.LA(1);
509
+ while (_la === 18 || _la === 19) {
510
+ {
511
+ {
512
+ this.state = 117;
513
+ this.addOp();
514
+ this.state = 118;
515
+ this.mulExpr();
516
+ }
517
+ }
518
+ this.state = 124;
519
+ this._errHandler.sync(this);
520
+ _la = this._input.LA(1);
521
+ }
522
+ }
523
+ }
524
+ catch (re) {
525
+ if (re instanceof RecognitionException) {
526
+ localctx.exception = re;
527
+ this._errHandler.reportError(this, re);
528
+ this._errHandler.recover(this, re);
529
+ }
530
+ else {
531
+ throw re;
532
+ }
533
+ }
534
+ finally {
535
+ this.exitRule();
536
+ }
537
+ return localctx;
538
+ }
539
+ // @RuleVersion(0)
540
+ mulExpr() {
541
+ let localctx = new MulExprContext(this, this._ctx, this.state);
542
+ this.enterRule(localctx, 20, PSCParser.RULE_mulExpr);
543
+ let _la;
544
+ try {
545
+ this.enterOuterAlt(localctx, 1);
546
+ {
547
+ this.state = 125;
548
+ this.expExpr();
549
+ this.state = 131;
550
+ this._errHandler.sync(this);
551
+ _la = this._input.LA(1);
552
+ while ((((_la) & ~0x1F) === 0 && ((1 << _la) & 7340032) !== 0)) {
553
+ {
554
+ {
555
+ this.state = 126;
556
+ this.mulOp();
557
+ this.state = 127;
558
+ this.expExpr();
559
+ }
560
+ }
561
+ this.state = 133;
562
+ this._errHandler.sync(this);
563
+ _la = this._input.LA(1);
564
+ }
565
+ }
566
+ }
567
+ catch (re) {
568
+ if (re instanceof RecognitionException) {
569
+ localctx.exception = re;
570
+ this._errHandler.reportError(this, re);
571
+ this._errHandler.recover(this, re);
572
+ }
573
+ else {
574
+ throw re;
575
+ }
576
+ }
577
+ finally {
578
+ this.exitRule();
579
+ }
580
+ return localctx;
581
+ }
582
+ // @RuleVersion(0)
583
+ expExpr() {
584
+ let localctx = new ExpExprContext(this, this._ctx, this.state);
585
+ this.enterRule(localctx, 22, PSCParser.RULE_expExpr);
586
+ let _la;
587
+ try {
588
+ this.enterOuterAlt(localctx, 1);
589
+ {
590
+ this.state = 134;
591
+ this.unaryExpr();
592
+ this.state = 140;
593
+ this._errHandler.sync(this);
594
+ _la = this._input.LA(1);
595
+ while (_la === 23) {
596
+ {
597
+ {
598
+ this.state = 135;
599
+ this.expOp();
600
+ this.state = 136;
601
+ this.unaryExpr();
602
+ }
603
+ }
604
+ this.state = 142;
605
+ this._errHandler.sync(this);
606
+ _la = this._input.LA(1);
607
+ }
608
+ }
609
+ }
610
+ catch (re) {
611
+ if (re instanceof RecognitionException) {
612
+ localctx.exception = re;
613
+ this._errHandler.reportError(this, re);
614
+ this._errHandler.recover(this, re);
615
+ }
616
+ else {
617
+ throw re;
618
+ }
619
+ }
620
+ finally {
621
+ this.exitRule();
622
+ }
623
+ return localctx;
624
+ }
625
+ // @RuleVersion(0)
626
+ unaryExpr() {
627
+ let localctx = new UnaryExprContext(this, this._ctx, this.state);
628
+ this.enterRule(localctx, 24, PSCParser.RULE_unaryExpr);
629
+ let _la;
630
+ try {
631
+ let _alt;
632
+ this.enterOuterAlt(localctx, 1);
633
+ {
634
+ this.state = 146;
635
+ this._errHandler.sync(this);
636
+ _alt = this._interp.adaptivePredict(this._input, 8, this._ctx);
637
+ while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) {
638
+ if (_alt === 1) {
639
+ {
640
+ {
641
+ this.state = 143;
642
+ _la = this._input.LA(1);
643
+ if (!(_la === 18 || _la === 19)) {
644
+ this._errHandler.recoverInline(this);
645
+ }
646
+ else {
647
+ this._errHandler.reportMatch(this);
648
+ this.consume();
649
+ }
650
+ }
651
+ }
652
+ }
653
+ this.state = 148;
654
+ this._errHandler.sync(this);
655
+ _alt = this._interp.adaptivePredict(this._input, 8, this._ctx);
656
+ }
657
+ this.state = 149;
658
+ this.notExpr();
659
+ }
660
+ }
661
+ catch (re) {
662
+ if (re instanceof RecognitionException) {
663
+ localctx.exception = re;
664
+ this._errHandler.reportError(this, re);
665
+ this._errHandler.recover(this, re);
666
+ }
667
+ else {
668
+ throw re;
669
+ }
670
+ }
671
+ finally {
672
+ this.exitRule();
673
+ }
674
+ return localctx;
675
+ }
676
+ // @RuleVersion(0)
677
+ notExpr() {
678
+ let localctx = new NotExprContext(this, this._ctx, this.state);
679
+ this.enterRule(localctx, 26, PSCParser.RULE_notExpr);
680
+ let _la;
681
+ try {
682
+ this.enterOuterAlt(localctx, 1);
683
+ {
684
+ this.state = 154;
685
+ this._errHandler.sync(this);
686
+ _la = this._input.LA(1);
687
+ while (_la === 26) {
688
+ {
689
+ {
690
+ this.state = 151;
691
+ this.match(PSCParser.NOT);
692
+ }
693
+ }
694
+ this.state = 156;
695
+ this._errHandler.sync(this);
696
+ _la = this._input.LA(1);
697
+ }
698
+ this.state = 157;
699
+ this.primaryExpr(0);
700
+ }
701
+ }
702
+ catch (re) {
703
+ if (re instanceof RecognitionException) {
704
+ localctx.exception = re;
705
+ this._errHandler.reportError(this, re);
706
+ this._errHandler.recover(this, re);
707
+ }
708
+ else {
709
+ throw re;
710
+ }
711
+ }
712
+ finally {
713
+ this.exitRule();
714
+ }
715
+ return localctx;
716
+ }
717
+ // @RuleVersion(0)
718
+ primaryExpr(_p) {
719
+ if (_p === undefined) {
720
+ _p = 0;
721
+ }
722
+ let _parentctx = this._ctx;
723
+ let _parentState = this.state;
724
+ let localctx = new PrimaryExprContext(this, this._ctx, _parentState);
725
+ let _prevctx = localctx;
726
+ let _startState = 28;
727
+ this.enterRecursionRule(localctx, 28, PSCParser.RULE_primaryExpr, _p);
728
+ let _la;
729
+ try {
730
+ let _alt;
731
+ this.enterOuterAlt(localctx, 1);
732
+ {
733
+ {
734
+ this.state = 160;
735
+ this.groupExpr();
736
+ }
737
+ this._ctx.stop = this._input.LT(-1);
738
+ this.state = 189;
739
+ this._errHandler.sync(this);
740
+ _alt = this._interp.adaptivePredict(this._input, 14, this._ctx);
741
+ while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) {
742
+ if (_alt === 1) {
743
+ if (this._parseListeners != null) {
744
+ this.triggerExitRuleEvent();
745
+ }
746
+ _prevctx = localctx;
747
+ {
748
+ this.state = 187;
749
+ this._errHandler.sync(this);
750
+ switch (this._interp.adaptivePredict(this._input, 13, this._ctx)) {
751
+ case 1:
752
+ {
753
+ localctx = new PrimaryExprContext(this, _parentctx, _parentState);
754
+ this.pushNewRecursionContext(localctx, _startState, PSCParser.RULE_primaryExpr);
755
+ this.state = 162;
756
+ if (!(this.precpred(this._ctx, 2))) {
757
+ throw this.createFailedPredicateException("this.precpred(this._ctx, 2)");
758
+ }
759
+ this.state = 163;
760
+ this.match(PSCParser.LSQUARE);
761
+ this.state = 164;
762
+ this.expr();
763
+ this.state = 169;
764
+ this._errHandler.sync(this);
765
+ _la = this._input.LA(1);
766
+ while (_la === 6) {
767
+ {
768
+ {
769
+ this.state = 165;
770
+ this.match(PSCParser.COMMA);
771
+ this.state = 166;
772
+ this.expr();
773
+ }
774
+ }
775
+ this.state = 171;
776
+ this._errHandler.sync(this);
777
+ _la = this._input.LA(1);
778
+ }
779
+ this.state = 172;
780
+ this.match(PSCParser.RSQUARE);
781
+ }
782
+ break;
783
+ case 2:
784
+ {
785
+ localctx = new PrimaryExprContext(this, _parentctx, _parentState);
786
+ this.pushNewRecursionContext(localctx, _startState, PSCParser.RULE_primaryExpr);
787
+ this.state = 174;
788
+ if (!(this.precpred(this._ctx, 1))) {
789
+ throw this.createFailedPredicateException("this.precpred(this._ctx, 1)");
790
+ }
791
+ this.state = 175;
792
+ this.match(PSCParser.LPAREN);
793
+ this.state = 184;
794
+ this._errHandler.sync(this);
795
+ _la = this._input.LA(1);
796
+ if ((((_la) & ~0x1F) === 0 && ((1 << _la) & 68149888) !== 0) || _la === 48) {
797
+ {
798
+ this.state = 176;
799
+ this.expr();
800
+ this.state = 181;
801
+ this._errHandler.sync(this);
802
+ _la = this._input.LA(1);
803
+ while (_la === 6) {
804
+ {
805
+ {
806
+ this.state = 177;
807
+ this.match(PSCParser.COMMA);
808
+ this.state = 178;
809
+ this.expr();
810
+ }
811
+ }
812
+ this.state = 183;
813
+ this._errHandler.sync(this);
814
+ _la = this._input.LA(1);
815
+ }
816
+ }
817
+ }
818
+ this.state = 186;
819
+ this.match(PSCParser.RPAREN);
820
+ }
821
+ break;
822
+ }
823
+ }
824
+ }
825
+ this.state = 191;
826
+ this._errHandler.sync(this);
827
+ _alt = this._interp.adaptivePredict(this._input, 14, this._ctx);
828
+ }
829
+ }
830
+ }
831
+ catch (re) {
832
+ if (re instanceof RecognitionException) {
833
+ localctx.exception = re;
834
+ this._errHandler.reportError(this, re);
835
+ this._errHandler.recover(this, re);
836
+ }
837
+ else {
838
+ throw re;
839
+ }
840
+ }
841
+ finally {
842
+ this.unrollRecursionContexts(_parentctx);
843
+ }
844
+ return localctx;
845
+ }
846
+ // @RuleVersion(0)
847
+ groupExpr() {
848
+ let localctx = new GroupExprContext(this, this._ctx, this.state);
849
+ this.enterRule(localctx, 30, PSCParser.RULE_groupExpr);
850
+ try {
851
+ this.state = 197;
852
+ this._errHandler.sync(this);
853
+ switch (this._input.LA(1)) {
854
+ case 9:
855
+ case 13:
856
+ case 14:
857
+ case 15:
858
+ case 16:
859
+ case 17:
860
+ case 19:
861
+ case 48:
862
+ this.enterOuterAlt(localctx, 1);
863
+ {
864
+ this.state = 192;
865
+ this.atom();
866
+ }
867
+ break;
868
+ case 7:
869
+ this.enterOuterAlt(localctx, 2);
870
+ {
871
+ {
872
+ this.state = 193;
873
+ this.match(PSCParser.LPAREN);
874
+ this.state = 194;
875
+ this.expr();
876
+ this.state = 195;
877
+ this.match(PSCParser.RPAREN);
878
+ }
879
+ }
880
+ break;
881
+ default:
882
+ throw new NoViableAltException(this);
883
+ }
884
+ }
885
+ catch (re) {
886
+ if (re instanceof RecognitionException) {
887
+ localctx.exception = re;
888
+ this._errHandler.reportError(this, re);
889
+ this._errHandler.recover(this, re);
890
+ }
891
+ else {
892
+ throw re;
893
+ }
894
+ }
895
+ finally {
896
+ this.exitRule();
897
+ }
898
+ return localctx;
899
+ }
900
+ // @RuleVersion(0)
901
+ atom() {
902
+ let localctx = new AtomContext(this, this._ctx, this.state);
903
+ this.enterRule(localctx, 32, PSCParser.RULE_atom);
904
+ try {
905
+ this.state = 201;
906
+ this._errHandler.sync(this);
907
+ switch (this._input.LA(1)) {
908
+ case 9:
909
+ case 13:
910
+ case 14:
911
+ case 15:
912
+ case 16:
913
+ case 17:
914
+ case 19:
915
+ this.enterOuterAlt(localctx, 1);
916
+ {
917
+ this.state = 199;
918
+ this.lits();
919
+ }
920
+ break;
921
+ case 48:
922
+ this.enterOuterAlt(localctx, 2);
923
+ {
924
+ this.state = 200;
925
+ this.match(PSCParser.ID);
926
+ }
927
+ break;
928
+ default:
929
+ throw new NoViableAltException(this);
930
+ }
931
+ }
932
+ catch (re) {
933
+ if (re instanceof RecognitionException) {
934
+ localctx.exception = re;
935
+ this._errHandler.reportError(this, re);
936
+ this._errHandler.recover(this, re);
937
+ }
938
+ else {
939
+ throw re;
940
+ }
941
+ }
942
+ finally {
943
+ this.exitRule();
944
+ }
945
+ return localctx;
946
+ }
947
+ // @RuleVersion(0)
948
+ lits() {
949
+ let localctx = new LitsContext(this, this._ctx, this.state);
950
+ this.enterRule(localctx, 34, PSCParser.RULE_lits);
951
+ try {
952
+ this.state = 209;
953
+ this._errHandler.sync(this);
954
+ switch (this._interp.adaptivePredict(this._input, 17, this._ctx)) {
955
+ case 1:
956
+ this.enterOuterAlt(localctx, 1);
957
+ {
958
+ this.state = 203;
959
+ this.intLits();
960
+ }
961
+ break;
962
+ case 2:
963
+ this.enterOuterAlt(localctx, 2);
964
+ {
965
+ this.state = 204;
966
+ this.floatLits();
967
+ }
968
+ break;
969
+ case 3:
970
+ this.enterOuterAlt(localctx, 3);
971
+ {
972
+ this.state = 205;
973
+ this.arrayLits();
974
+ }
975
+ break;
976
+ case 4:
977
+ this.enterOuterAlt(localctx, 4);
978
+ {
979
+ this.state = 206;
980
+ this.match(PSCParser.STRING);
981
+ }
982
+ break;
983
+ case 5:
984
+ this.enterOuterAlt(localctx, 5);
985
+ {
986
+ this.state = 207;
987
+ this.match(PSCParser.BOOLEAN);
988
+ }
989
+ break;
990
+ case 6:
991
+ this.enterOuterAlt(localctx, 6);
992
+ {
993
+ this.state = 208;
994
+ this.match(PSCParser.NULL);
995
+ }
996
+ break;
997
+ }
998
+ }
999
+ catch (re) {
1000
+ if (re instanceof RecognitionException) {
1001
+ localctx.exception = re;
1002
+ this._errHandler.reportError(this, re);
1003
+ this._errHandler.recover(this, re);
1004
+ }
1005
+ else {
1006
+ throw re;
1007
+ }
1008
+ }
1009
+ finally {
1010
+ this.exitRule();
1011
+ }
1012
+ return localctx;
1013
+ }
1014
+ // @RuleVersion(0)
1015
+ intLits() {
1016
+ let localctx = new IntLitsContext(this, this._ctx, this.state);
1017
+ this.enterRule(localctx, 36, PSCParser.RULE_intLits);
1018
+ let _la;
1019
+ try {
1020
+ this.enterOuterAlt(localctx, 1);
1021
+ {
1022
+ this.state = 212;
1023
+ this._errHandler.sync(this);
1024
+ _la = this._input.LA(1);
1025
+ if (_la === 19) {
1026
+ {
1027
+ this.state = 211;
1028
+ this.match(PSCParser.MINUS);
1029
+ }
1030
+ }
1031
+ this.state = 214;
1032
+ this.match(PSCParser.INTEGER);
1033
+ }
1034
+ }
1035
+ catch (re) {
1036
+ if (re instanceof RecognitionException) {
1037
+ localctx.exception = re;
1038
+ this._errHandler.reportError(this, re);
1039
+ this._errHandler.recover(this, re);
1040
+ }
1041
+ else {
1042
+ throw re;
1043
+ }
1044
+ }
1045
+ finally {
1046
+ this.exitRule();
1047
+ }
1048
+ return localctx;
1049
+ }
1050
+ // @RuleVersion(0)
1051
+ floatLits() {
1052
+ let localctx = new FloatLitsContext(this, this._ctx, this.state);
1053
+ this.enterRule(localctx, 38, PSCParser.RULE_floatLits);
1054
+ let _la;
1055
+ try {
1056
+ this.enterOuterAlt(localctx, 1);
1057
+ {
1058
+ this.state = 217;
1059
+ this._errHandler.sync(this);
1060
+ _la = this._input.LA(1);
1061
+ if (_la === 19) {
1062
+ {
1063
+ this.state = 216;
1064
+ this.match(PSCParser.MINUS);
1065
+ }
1066
+ }
1067
+ this.state = 219;
1068
+ this.match(PSCParser.FLOAT);
1069
+ }
1070
+ }
1071
+ catch (re) {
1072
+ if (re instanceof RecognitionException) {
1073
+ localctx.exception = re;
1074
+ this._errHandler.reportError(this, re);
1075
+ this._errHandler.recover(this, re);
1076
+ }
1077
+ else {
1078
+ throw re;
1079
+ }
1080
+ }
1081
+ finally {
1082
+ this.exitRule();
1083
+ }
1084
+ return localctx;
1085
+ }
1086
+ // @RuleVersion(0)
1087
+ arrayLits() {
1088
+ let localctx = new ArrayLitsContext(this, this._ctx, this.state);
1089
+ this.enterRule(localctx, 40, PSCParser.RULE_arrayLits);
1090
+ let _la;
1091
+ try {
1092
+ this.enterOuterAlt(localctx, 1);
1093
+ {
1094
+ this.state = 221;
1095
+ this.match(PSCParser.LSQUARE);
1096
+ this.state = 230;
1097
+ this._errHandler.sync(this);
1098
+ _la = this._input.LA(1);
1099
+ if ((((_la) & ~0x1F) === 0 && ((1 << _la) & 68149888) !== 0) || _la === 48) {
1100
+ {
1101
+ this.state = 222;
1102
+ this.expr();
1103
+ this.state = 227;
1104
+ this._errHandler.sync(this);
1105
+ _la = this._input.LA(1);
1106
+ while (_la === 6) {
1107
+ {
1108
+ {
1109
+ this.state = 223;
1110
+ this.match(PSCParser.COMMA);
1111
+ this.state = 224;
1112
+ this.expr();
1113
+ }
1114
+ }
1115
+ this.state = 229;
1116
+ this._errHandler.sync(this);
1117
+ _la = this._input.LA(1);
1118
+ }
1119
+ }
1120
+ }
1121
+ this.state = 232;
1122
+ this.match(PSCParser.RSQUARE);
1123
+ }
1124
+ }
1125
+ catch (re) {
1126
+ if (re instanceof RecognitionException) {
1127
+ localctx.exception = re;
1128
+ this._errHandler.reportError(this, re);
1129
+ this._errHandler.recover(this, re);
1130
+ }
1131
+ else {
1132
+ throw re;
1133
+ }
1134
+ }
1135
+ finally {
1136
+ this.exitRule();
1137
+ }
1138
+ return localctx;
1139
+ }
1140
+ // @RuleVersion(0)
1141
+ stmts() {
1142
+ let localctx = new StmtsContext(this, this._ctx, this.state);
1143
+ this.enterRule(localctx, 42, PSCParser.RULE_stmts);
1144
+ let _la;
1145
+ try {
1146
+ let _alt;
1147
+ this.enterOuterAlt(localctx, 1);
1148
+ {
1149
+ this.state = 237;
1150
+ this._errHandler.sync(this);
1151
+ _la = this._input.LA(1);
1152
+ while (_la === 4) {
1153
+ {
1154
+ {
1155
+ this.state = 234;
1156
+ this.match(PSCParser.NEWLINE);
1157
+ }
1158
+ }
1159
+ this.state = 239;
1160
+ this._errHandler.sync(this);
1161
+ _la = this._input.LA(1);
1162
+ }
1163
+ this.state = 240;
1164
+ this.stmt();
1165
+ this.state = 249;
1166
+ this._errHandler.sync(this);
1167
+ _alt = this._interp.adaptivePredict(this._input, 24, this._ctx);
1168
+ while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) {
1169
+ if (_alt === 1) {
1170
+ {
1171
+ {
1172
+ this.state = 242;
1173
+ this._errHandler.sync(this);
1174
+ _la = this._input.LA(1);
1175
+ do {
1176
+ {
1177
+ {
1178
+ this.state = 241;
1179
+ this.match(PSCParser.NEWLINE);
1180
+ }
1181
+ }
1182
+ this.state = 244;
1183
+ this._errHandler.sync(this);
1184
+ _la = this._input.LA(1);
1185
+ } while (_la === 4);
1186
+ this.state = 246;
1187
+ this.stmt();
1188
+ }
1189
+ }
1190
+ }
1191
+ this.state = 251;
1192
+ this._errHandler.sync(this);
1193
+ _alt = this._interp.adaptivePredict(this._input, 24, this._ctx);
1194
+ }
1195
+ this.state = 255;
1196
+ this._errHandler.sync(this);
1197
+ _la = this._input.LA(1);
1198
+ while (_la === 4) {
1199
+ {
1200
+ {
1201
+ this.state = 252;
1202
+ this.match(PSCParser.NEWLINE);
1203
+ }
1204
+ }
1205
+ this.state = 257;
1206
+ this._errHandler.sync(this);
1207
+ _la = this._input.LA(1);
1208
+ }
1209
+ }
1210
+ }
1211
+ catch (re) {
1212
+ if (re instanceof RecognitionException) {
1213
+ localctx.exception = re;
1214
+ this._errHandler.reportError(this, re);
1215
+ this._errHandler.recover(this, re);
1216
+ }
1217
+ else {
1218
+ throw re;
1219
+ }
1220
+ }
1221
+ finally {
1222
+ this.exitRule();
1223
+ }
1224
+ return localctx;
1225
+ }
1226
+ // @RuleVersion(0)
1227
+ stmt() {
1228
+ let localctx = new StmtContext(this, this._ctx, this.state);
1229
+ this.enterRule(localctx, 44, PSCParser.RULE_stmt);
1230
+ try {
1231
+ this.state = 268;
1232
+ this._errHandler.sync(this);
1233
+ switch (this._interp.adaptivePredict(this._input, 26, this._ctx)) {
1234
+ case 1:
1235
+ this.enterOuterAlt(localctx, 1);
1236
+ {
1237
+ this.state = 258;
1238
+ this.expr();
1239
+ }
1240
+ break;
1241
+ case 2:
1242
+ this.enterOuterAlt(localctx, 2);
1243
+ {
1244
+ this.state = 259;
1245
+ this.ifStmt();
1246
+ }
1247
+ break;
1248
+ case 3:
1249
+ this.enterOuterAlt(localctx, 3);
1250
+ {
1251
+ this.state = 260;
1252
+ this.whileStmt();
1253
+ }
1254
+ break;
1255
+ case 4:
1256
+ this.enterOuterAlt(localctx, 4);
1257
+ {
1258
+ this.state = 261;
1259
+ this.doWhileStmt();
1260
+ }
1261
+ break;
1262
+ case 5:
1263
+ this.enterOuterAlt(localctx, 5);
1264
+ {
1265
+ this.state = 262;
1266
+ this.repeatUntilStmt();
1267
+ }
1268
+ break;
1269
+ case 6:
1270
+ this.enterOuterAlt(localctx, 6);
1271
+ {
1272
+ this.state = 263;
1273
+ this.forStmt();
1274
+ }
1275
+ break;
1276
+ case 7:
1277
+ this.enterOuterAlt(localctx, 7);
1278
+ {
1279
+ this.state = 264;
1280
+ this.asmStmt();
1281
+ }
1282
+ break;
1283
+ case 8:
1284
+ this.enterOuterAlt(localctx, 8);
1285
+ {
1286
+ this.state = 265;
1287
+ this.inputStmt();
1288
+ }
1289
+ break;
1290
+ case 9:
1291
+ this.enterOuterAlt(localctx, 9);
1292
+ {
1293
+ this.state = 266;
1294
+ this.outputStmt();
1295
+ }
1296
+ break;
1297
+ case 10:
1298
+ this.enterOuterAlt(localctx, 10);
1299
+ {
1300
+ this.state = 267;
1301
+ this.returnStmt();
1302
+ }
1303
+ break;
1304
+ }
1305
+ }
1306
+ catch (re) {
1307
+ if (re instanceof RecognitionException) {
1308
+ localctx.exception = re;
1309
+ this._errHandler.reportError(this, re);
1310
+ this._errHandler.recover(this, re);
1311
+ }
1312
+ else {
1313
+ throw re;
1314
+ }
1315
+ }
1316
+ finally {
1317
+ this.exitRule();
1318
+ }
1319
+ return localctx;
1320
+ }
1321
+ // @RuleVersion(0)
1322
+ block() {
1323
+ let localctx = new BlockContext(this, this._ctx, this.state);
1324
+ this.enterRule(localctx, 46, PSCParser.RULE_block);
1325
+ try {
1326
+ this.enterOuterAlt(localctx, 1);
1327
+ {
1328
+ this.state = 270;
1329
+ this.match(PSCParser.INDENT);
1330
+ this.state = 271;
1331
+ this.stmts();
1332
+ this.state = 272;
1333
+ this.match(PSCParser.DEDENT);
1334
+ }
1335
+ }
1336
+ catch (re) {
1337
+ if (re instanceof RecognitionException) {
1338
+ localctx.exception = re;
1339
+ this._errHandler.reportError(this, re);
1340
+ this._errHandler.recover(this, re);
1341
+ }
1342
+ else {
1343
+ throw re;
1344
+ }
1345
+ }
1346
+ finally {
1347
+ this.exitRule();
1348
+ }
1349
+ return localctx;
1350
+ }
1351
+ // @RuleVersion(0)
1352
+ ifStmt() {
1353
+ let localctx = new IfStmtContext(this, this._ctx, this.state);
1354
+ this.enterRule(localctx, 48, PSCParser.RULE_ifStmt);
1355
+ try {
1356
+ this.enterOuterAlt(localctx, 1);
1357
+ {
1358
+ this.state = 274;
1359
+ this.match(PSCParser.IF);
1360
+ this.state = 275;
1361
+ this.expr();
1362
+ this.state = 276;
1363
+ this.match(PSCParser.NEWLINE);
1364
+ this.state = 277;
1365
+ this.block();
1366
+ this.state = 285;
1367
+ this._errHandler.sync(this);
1368
+ switch (this._interp.adaptivePredict(this._input, 27, this._ctx)) {
1369
+ case 1:
1370
+ {
1371
+ this.state = 278;
1372
+ this.match(PSCParser.NEWLINE);
1373
+ this.state = 279;
1374
+ this.match(PSCParser.ELSE);
1375
+ this.state = 280;
1376
+ this.ifStmt();
1377
+ }
1378
+ break;
1379
+ case 2:
1380
+ {
1381
+ this.state = 281;
1382
+ this.match(PSCParser.NEWLINE);
1383
+ this.state = 282;
1384
+ this.match(PSCParser.ELSE);
1385
+ this.state = 283;
1386
+ this.match(PSCParser.NEWLINE);
1387
+ this.state = 284;
1388
+ this.block();
1389
+ }
1390
+ break;
1391
+ }
1392
+ }
1393
+ }
1394
+ catch (re) {
1395
+ if (re instanceof RecognitionException) {
1396
+ localctx.exception = re;
1397
+ this._errHandler.reportError(this, re);
1398
+ this._errHandler.recover(this, re);
1399
+ }
1400
+ else {
1401
+ throw re;
1402
+ }
1403
+ }
1404
+ finally {
1405
+ this.exitRule();
1406
+ }
1407
+ return localctx;
1408
+ }
1409
+ // @RuleVersion(0)
1410
+ whileStmt() {
1411
+ let localctx = new WhileStmtContext(this, this._ctx, this.state);
1412
+ this.enterRule(localctx, 50, PSCParser.RULE_whileStmt);
1413
+ try {
1414
+ this.enterOuterAlt(localctx, 1);
1415
+ {
1416
+ this.state = 287;
1417
+ this.match(PSCParser.WHILE);
1418
+ this.state = 288;
1419
+ this.expr();
1420
+ this.state = 289;
1421
+ this.match(PSCParser.NEWLINE);
1422
+ this.state = 290;
1423
+ this.block();
1424
+ }
1425
+ }
1426
+ catch (re) {
1427
+ if (re instanceof RecognitionException) {
1428
+ localctx.exception = re;
1429
+ this._errHandler.reportError(this, re);
1430
+ this._errHandler.recover(this, re);
1431
+ }
1432
+ else {
1433
+ throw re;
1434
+ }
1435
+ }
1436
+ finally {
1437
+ this.exitRule();
1438
+ }
1439
+ return localctx;
1440
+ }
1441
+ // @RuleVersion(0)
1442
+ doWhileStmt() {
1443
+ let localctx = new DoWhileStmtContext(this, this._ctx, this.state);
1444
+ this.enterRule(localctx, 52, PSCParser.RULE_doWhileStmt);
1445
+ try {
1446
+ this.enterOuterAlt(localctx, 1);
1447
+ {
1448
+ this.state = 292;
1449
+ this.match(PSCParser.DO);
1450
+ this.state = 293;
1451
+ this.match(PSCParser.NEWLINE);
1452
+ this.state = 294;
1453
+ this.block();
1454
+ this.state = 295;
1455
+ this.match(PSCParser.NEWLINE);
1456
+ this.state = 296;
1457
+ this.match(PSCParser.WHILE);
1458
+ this.state = 297;
1459
+ this.expr();
1460
+ }
1461
+ }
1462
+ catch (re) {
1463
+ if (re instanceof RecognitionException) {
1464
+ localctx.exception = re;
1465
+ this._errHandler.reportError(this, re);
1466
+ this._errHandler.recover(this, re);
1467
+ }
1468
+ else {
1469
+ throw re;
1470
+ }
1471
+ }
1472
+ finally {
1473
+ this.exitRule();
1474
+ }
1475
+ return localctx;
1476
+ }
1477
+ // @RuleVersion(0)
1478
+ repeatUntilStmt() {
1479
+ let localctx = new RepeatUntilStmtContext(this, this._ctx, this.state);
1480
+ this.enterRule(localctx, 54, PSCParser.RULE_repeatUntilStmt);
1481
+ try {
1482
+ this.enterOuterAlt(localctx, 1);
1483
+ {
1484
+ this.state = 299;
1485
+ this.match(PSCParser.REPEAT);
1486
+ this.state = 300;
1487
+ this.match(PSCParser.NEWLINE);
1488
+ this.state = 301;
1489
+ this.block();
1490
+ this.state = 302;
1491
+ this.match(PSCParser.NEWLINE);
1492
+ this.state = 303;
1493
+ this.match(PSCParser.UNTIL);
1494
+ this.state = 304;
1495
+ this.expr();
1496
+ }
1497
+ }
1498
+ catch (re) {
1499
+ if (re instanceof RecognitionException) {
1500
+ localctx.exception = re;
1501
+ this._errHandler.reportError(this, re);
1502
+ this._errHandler.recover(this, re);
1503
+ }
1504
+ else {
1505
+ throw re;
1506
+ }
1507
+ }
1508
+ finally {
1509
+ this.exitRule();
1510
+ }
1511
+ return localctx;
1512
+ }
1513
+ // @RuleVersion(0)
1514
+ forStmt() {
1515
+ let localctx = new ForStmtContext(this, this._ctx, this.state);
1516
+ this.enterRule(localctx, 56, PSCParser.RULE_forStmt);
1517
+ let _la;
1518
+ try {
1519
+ this.enterOuterAlt(localctx, 1);
1520
+ {
1521
+ this.state = 306;
1522
+ this.match(PSCParser.FOR);
1523
+ this.state = 307;
1524
+ this.match(PSCParser.ID);
1525
+ this.state = 308;
1526
+ this.match(PSCParser.FROM);
1527
+ this.state = 309;
1528
+ this.expr();
1529
+ this.state = 311;
1530
+ this._errHandler.sync(this);
1531
+ _la = this._input.LA(1);
1532
+ if (_la === 41) {
1533
+ {
1534
+ this.state = 310;
1535
+ this.match(PSCParser.DOWN);
1536
+ }
1537
+ }
1538
+ this.state = 313;
1539
+ this.match(PSCParser.TO);
1540
+ this.state = 314;
1541
+ this.expr();
1542
+ this.state = 315;
1543
+ this.match(PSCParser.NEWLINE);
1544
+ this.state = 316;
1545
+ this.block();
1546
+ }
1547
+ }
1548
+ catch (re) {
1549
+ if (re instanceof RecognitionException) {
1550
+ localctx.exception = re;
1551
+ this._errHandler.reportError(this, re);
1552
+ this._errHandler.recover(this, re);
1553
+ }
1554
+ else {
1555
+ throw re;
1556
+ }
1557
+ }
1558
+ finally {
1559
+ this.exitRule();
1560
+ }
1561
+ return localctx;
1562
+ }
1563
+ // @RuleVersion(0)
1564
+ asmStmt() {
1565
+ let localctx = new AsmStmtContext(this, this._ctx, this.state);
1566
+ this.enterRule(localctx, 58, PSCParser.RULE_asmStmt);
1567
+ try {
1568
+ this.enterOuterAlt(localctx, 1);
1569
+ {
1570
+ this.state = 318;
1571
+ this.lvalue(0);
1572
+ this.state = 319;
1573
+ this.match(PSCParser.ASSIGN);
1574
+ this.state = 320;
1575
+ this.expr();
1576
+ }
1577
+ }
1578
+ catch (re) {
1579
+ if (re instanceof RecognitionException) {
1580
+ localctx.exception = re;
1581
+ this._errHandler.reportError(this, re);
1582
+ this._errHandler.recover(this, re);
1583
+ }
1584
+ else {
1585
+ throw re;
1586
+ }
1587
+ }
1588
+ finally {
1589
+ this.exitRule();
1590
+ }
1591
+ return localctx;
1592
+ }
1593
+ // @RuleVersion(0)
1594
+ lvalue(_p) {
1595
+ if (_p === undefined) {
1596
+ _p = 0;
1597
+ }
1598
+ let _parentctx = this._ctx;
1599
+ let _parentState = this.state;
1600
+ let localctx = new LvalueContext(this, this._ctx, _parentState);
1601
+ let _prevctx = localctx;
1602
+ let _startState = 60;
1603
+ this.enterRecursionRule(localctx, 60, PSCParser.RULE_lvalue, _p);
1604
+ let _la;
1605
+ try {
1606
+ let _alt;
1607
+ this.enterOuterAlt(localctx, 1);
1608
+ {
1609
+ {
1610
+ this.state = 323;
1611
+ this.match(PSCParser.ID);
1612
+ }
1613
+ this._ctx.stop = this._input.LT(-1);
1614
+ this.state = 339;
1615
+ this._errHandler.sync(this);
1616
+ _alt = this._interp.adaptivePredict(this._input, 30, this._ctx);
1617
+ while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) {
1618
+ if (_alt === 1) {
1619
+ if (this._parseListeners != null) {
1620
+ this.triggerExitRuleEvent();
1621
+ }
1622
+ _prevctx = localctx;
1623
+ {
1624
+ {
1625
+ localctx = new LvalueContext(this, _parentctx, _parentState);
1626
+ this.pushNewRecursionContext(localctx, _startState, PSCParser.RULE_lvalue);
1627
+ this.state = 325;
1628
+ if (!(this.precpred(this._ctx, 1))) {
1629
+ throw this.createFailedPredicateException("this.precpred(this._ctx, 1)");
1630
+ }
1631
+ this.state = 326;
1632
+ this.match(PSCParser.LSQUARE);
1633
+ this.state = 327;
1634
+ this.expr();
1635
+ this.state = 332;
1636
+ this._errHandler.sync(this);
1637
+ _la = this._input.LA(1);
1638
+ while (_la === 6) {
1639
+ {
1640
+ {
1641
+ this.state = 328;
1642
+ this.match(PSCParser.COMMA);
1643
+ this.state = 329;
1644
+ this.expr();
1645
+ }
1646
+ }
1647
+ this.state = 334;
1648
+ this._errHandler.sync(this);
1649
+ _la = this._input.LA(1);
1650
+ }
1651
+ this.state = 335;
1652
+ this.match(PSCParser.RSQUARE);
1653
+ }
1654
+ }
1655
+ }
1656
+ this.state = 341;
1657
+ this._errHandler.sync(this);
1658
+ _alt = this._interp.adaptivePredict(this._input, 30, this._ctx);
1659
+ }
1660
+ }
1661
+ }
1662
+ catch (re) {
1663
+ if (re instanceof RecognitionException) {
1664
+ localctx.exception = re;
1665
+ this._errHandler.reportError(this, re);
1666
+ this._errHandler.recover(this, re);
1667
+ }
1668
+ else {
1669
+ throw re;
1670
+ }
1671
+ }
1672
+ finally {
1673
+ this.unrollRecursionContexts(_parentctx);
1674
+ }
1675
+ return localctx;
1676
+ }
1677
+ // @RuleVersion(0)
1678
+ inputStmt() {
1679
+ let localctx = new InputStmtContext(this, this._ctx, this.state);
1680
+ this.enterRule(localctx, 62, PSCParser.RULE_inputStmt);
1681
+ try {
1682
+ this.enterOuterAlt(localctx, 1);
1683
+ {
1684
+ this.state = 342;
1685
+ this.match(PSCParser.INPUT);
1686
+ this.state = 343;
1687
+ this.lvalue(0);
1688
+ }
1689
+ }
1690
+ catch (re) {
1691
+ if (re instanceof RecognitionException) {
1692
+ localctx.exception = re;
1693
+ this._errHandler.reportError(this, re);
1694
+ this._errHandler.recover(this, re);
1695
+ }
1696
+ else {
1697
+ throw re;
1698
+ }
1699
+ }
1700
+ finally {
1701
+ this.exitRule();
1702
+ }
1703
+ return localctx;
1704
+ }
1705
+ // @RuleVersion(0)
1706
+ outputStmt() {
1707
+ let localctx = new OutputStmtContext(this, this._ctx, this.state);
1708
+ this.enterRule(localctx, 64, PSCParser.RULE_outputStmt);
1709
+ try {
1710
+ this.enterOuterAlt(localctx, 1);
1711
+ {
1712
+ this.state = 345;
1713
+ this.match(PSCParser.OUTPUT);
1714
+ this.state = 346;
1715
+ this.expr();
1716
+ }
1717
+ }
1718
+ catch (re) {
1719
+ if (re instanceof RecognitionException) {
1720
+ localctx.exception = re;
1721
+ this._errHandler.reportError(this, re);
1722
+ this._errHandler.recover(this, re);
1723
+ }
1724
+ else {
1725
+ throw re;
1726
+ }
1727
+ }
1728
+ finally {
1729
+ this.exitRule();
1730
+ }
1731
+ return localctx;
1732
+ }
1733
+ // @RuleVersion(0)
1734
+ subprogram() {
1735
+ let localctx = new SubprogramContext(this, this._ctx, this.state);
1736
+ this.enterRule(localctx, 66, PSCParser.RULE_subprogram);
1737
+ let _la;
1738
+ try {
1739
+ this.enterOuterAlt(localctx, 1);
1740
+ {
1741
+ this.state = 348;
1742
+ this.match(PSCParser.SUBPROGRAM);
1743
+ this.state = 349;
1744
+ this.match(PSCParser.ID);
1745
+ this.state = 350;
1746
+ this.match(PSCParser.LPAREN);
1747
+ this.state = 359;
1748
+ this._errHandler.sync(this);
1749
+ _la = this._input.LA(1);
1750
+ if (_la === 48) {
1751
+ {
1752
+ this.state = 351;
1753
+ this.match(PSCParser.ID);
1754
+ this.state = 356;
1755
+ this._errHandler.sync(this);
1756
+ _la = this._input.LA(1);
1757
+ while (_la === 6) {
1758
+ {
1759
+ {
1760
+ this.state = 352;
1761
+ this.match(PSCParser.COMMA);
1762
+ this.state = 353;
1763
+ this.match(PSCParser.ID);
1764
+ }
1765
+ }
1766
+ this.state = 358;
1767
+ this._errHandler.sync(this);
1768
+ _la = this._input.LA(1);
1769
+ }
1770
+ }
1771
+ }
1772
+ this.state = 361;
1773
+ this.match(PSCParser.RPAREN);
1774
+ this.state = 362;
1775
+ this.match(PSCParser.NEWLINE);
1776
+ this.state = 363;
1777
+ this.block();
1778
+ }
1779
+ }
1780
+ catch (re) {
1781
+ if (re instanceof RecognitionException) {
1782
+ localctx.exception = re;
1783
+ this._errHandler.reportError(this, re);
1784
+ this._errHandler.recover(this, re);
1785
+ }
1786
+ else {
1787
+ throw re;
1788
+ }
1789
+ }
1790
+ finally {
1791
+ this.exitRule();
1792
+ }
1793
+ return localctx;
1794
+ }
1795
+ // @RuleVersion(0)
1796
+ returnStmt() {
1797
+ let localctx = new ReturnStmtContext(this, this._ctx, this.state);
1798
+ this.enterRule(localctx, 68, PSCParser.RULE_returnStmt);
1799
+ try {
1800
+ this.enterOuterAlt(localctx, 1);
1801
+ {
1802
+ this.state = 365;
1803
+ this.match(PSCParser.RETURN);
1804
+ this.state = 366;
1805
+ this.expr();
1806
+ }
1807
+ }
1808
+ catch (re) {
1809
+ if (re instanceof RecognitionException) {
1810
+ localctx.exception = re;
1811
+ this._errHandler.reportError(this, re);
1812
+ this._errHandler.recover(this, re);
1813
+ }
1814
+ else {
1815
+ throw re;
1816
+ }
1817
+ }
1818
+ finally {
1819
+ this.exitRule();
1820
+ }
1821
+ return localctx;
1822
+ }
1823
+ sempred(localctx, ruleIndex, predIndex) {
1824
+ switch (ruleIndex) {
1825
+ case 14:
1826
+ return this.primaryExpr_sempred(localctx, predIndex);
1827
+ case 30:
1828
+ return this.lvalue_sempred(localctx, predIndex);
1829
+ }
1830
+ return true;
1831
+ }
1832
+ primaryExpr_sempred(localctx, predIndex) {
1833
+ switch (predIndex) {
1834
+ case 0:
1835
+ return this.precpred(this._ctx, 2);
1836
+ case 1:
1837
+ return this.precpred(this._ctx, 1);
1838
+ }
1839
+ return true;
1840
+ }
1841
+ lvalue_sempred(localctx, predIndex) {
1842
+ switch (predIndex) {
1843
+ case 2:
1844
+ return this.precpred(this._ctx, 1);
1845
+ }
1846
+ return true;
1847
+ }
1848
+ static _serializedATN = [4, 1, 48, 369, 2, 0, 7, 0, 2,
1849
+ 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2,
1850
+ 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17,
1851
+ 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7,
1852
+ 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31,
1853
+ 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 1, 0, 5, 0, 72, 8, 0, 10, 0, 12, 0, 75, 9, 0, 1, 0, 3, 0, 78,
1854
+ 8, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 3, 1, 4, 1, 4, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 5, 6, 95,
1855
+ 8, 6, 10, 6, 12, 6, 98, 9, 6, 1, 7, 1, 7, 1, 7, 5, 7, 103, 8, 7, 10, 7, 12, 7, 106, 9, 7, 1, 8, 1, 8,
1856
+ 1, 8, 1, 8, 5, 8, 112, 8, 8, 10, 8, 12, 8, 115, 9, 8, 1, 9, 1, 9, 1, 9, 1, 9, 5, 9, 121, 8, 9, 10, 9,
1857
+ 12, 9, 124, 9, 9, 1, 10, 1, 10, 1, 10, 1, 10, 5, 10, 130, 8, 10, 10, 10, 12, 10, 133, 9, 10, 1, 11,
1858
+ 1, 11, 1, 11, 1, 11, 5, 11, 139, 8, 11, 10, 11, 12, 11, 142, 9, 11, 1, 12, 5, 12, 145, 8, 12, 10,
1859
+ 12, 12, 12, 148, 9, 12, 1, 12, 1, 12, 1, 13, 5, 13, 153, 8, 13, 10, 13, 12, 13, 156, 9, 13, 1, 13,
1860
+ 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 5, 14, 168, 8, 14, 10, 14, 12, 14,
1861
+ 171, 9, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 5, 14, 180, 8, 14, 10, 14, 12, 14, 183,
1862
+ 9, 14, 3, 14, 185, 8, 14, 1, 14, 5, 14, 188, 8, 14, 10, 14, 12, 14, 191, 9, 14, 1, 15, 1, 15, 1,
1863
+ 15, 1, 15, 1, 15, 3, 15, 198, 8, 15, 1, 16, 1, 16, 3, 16, 202, 8, 16, 1, 17, 1, 17, 1, 17, 1, 17,
1864
+ 1, 17, 1, 17, 3, 17, 210, 8, 17, 1, 18, 3, 18, 213, 8, 18, 1, 18, 1, 18, 1, 19, 3, 19, 218, 8, 19,
1865
+ 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, 5, 20, 226, 8, 20, 10, 20, 12, 20, 229, 9, 20, 3, 20, 231,
1866
+ 8, 20, 1, 20, 1, 20, 1, 21, 5, 21, 236, 8, 21, 10, 21, 12, 21, 239, 9, 21, 1, 21, 1, 21, 4, 21, 243,
1867
+ 8, 21, 11, 21, 12, 21, 244, 1, 21, 5, 21, 248, 8, 21, 10, 21, 12, 21, 251, 9, 21, 1, 21, 5, 21,
1868
+ 254, 8, 21, 10, 21, 12, 21, 257, 9, 21, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1,
1869
+ 22, 1, 22, 3, 22, 269, 8, 22, 1, 23, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24,
1870
+ 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 3, 24, 286, 8, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 26, 1,
1871
+ 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28,
1872
+ 1, 28, 1, 28, 1, 28, 3, 28, 312, 8, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1,
1873
+ 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 5, 30, 331, 8, 30, 10, 30, 12, 30, 334,
1874
+ 9, 30, 1, 30, 1, 30, 5, 30, 338, 8, 30, 10, 30, 12, 30, 341, 9, 30, 1, 31, 1, 31, 1, 31, 1, 32, 1,
1875
+ 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 5, 33, 355, 8, 33, 10, 33, 12, 33, 358, 9, 33,
1876
+ 3, 33, 360, 8, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 34, 0, 2, 28, 60, 35, 0, 2,
1877
+ 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52,
1878
+ 54, 56, 58, 60, 62, 64, 66, 68, 0, 3, 1, 0, 18, 19, 1, 0, 20, 22, 1, 0, 27, 32, 379, 0, 73, 1, 0,
1879
+ 0, 0, 2, 81, 1, 0, 0, 0, 4, 83, 1, 0, 0, 0, 6, 85, 1, 0, 0, 0, 8, 87, 1, 0, 0, 0, 10, 89, 1, 0, 0, 0, 12,
1880
+ 91, 1, 0, 0, 0, 14, 99, 1, 0, 0, 0, 16, 107, 1, 0, 0, 0, 18, 116, 1, 0, 0, 0, 20, 125, 1, 0, 0, 0, 22,
1881
+ 134, 1, 0, 0, 0, 24, 146, 1, 0, 0, 0, 26, 154, 1, 0, 0, 0, 28, 159, 1, 0, 0, 0, 30, 197, 1, 0, 0, 0,
1882
+ 32, 201, 1, 0, 0, 0, 34, 209, 1, 0, 0, 0, 36, 212, 1, 0, 0, 0, 38, 217, 1, 0, 0, 0, 40, 221, 1, 0,
1883
+ 0, 0, 42, 237, 1, 0, 0, 0, 44, 268, 1, 0, 0, 0, 46, 270, 1, 0, 0, 0, 48, 274, 1, 0, 0, 0, 50, 287,
1884
+ 1, 0, 0, 0, 52, 292, 1, 0, 0, 0, 54, 299, 1, 0, 0, 0, 56, 306, 1, 0, 0, 0, 58, 318, 1, 0, 0, 0, 60,
1885
+ 322, 1, 0, 0, 0, 62, 342, 1, 0, 0, 0, 64, 345, 1, 0, 0, 0, 66, 348, 1, 0, 0, 0, 68, 365, 1, 0, 0, 0,
1886
+ 70, 72, 3, 66, 33, 0, 71, 70, 1, 0, 0, 0, 72, 75, 1, 0, 0, 0, 73, 71, 1, 0, 0, 0, 73, 74, 1, 0, 0, 0,
1887
+ 74, 77, 1, 0, 0, 0, 75, 73, 1, 0, 0, 0, 76, 78, 3, 42, 21, 0, 77, 76, 1, 0, 0, 0, 77, 78, 1, 0, 0, 0,
1888
+ 78, 79, 1, 0, 0, 0, 79, 80, 5, 0, 0, 1, 80, 1, 1, 0, 0, 0, 81, 82, 7, 0, 0, 0, 82, 3, 1, 0, 0, 0, 83,
1889
+ 84, 7, 1, 0, 0, 84, 5, 1, 0, 0, 0, 85, 86, 5, 23, 0, 0, 86, 7, 1, 0, 0, 0, 87, 88, 7, 2, 0, 0, 88, 9,
1890
+ 1, 0, 0, 0, 89, 90, 3, 12, 6, 0, 90, 11, 1, 0, 0, 0, 91, 96, 3, 14, 7, 0, 92, 93, 5, 25, 0, 0, 93, 95,
1891
+ 3, 14, 7, 0, 94, 92, 1, 0, 0, 0, 95, 98, 1, 0, 0, 0, 96, 94, 1, 0, 0, 0, 96, 97, 1, 0, 0, 0, 97, 13,
1892
+ 1, 0, 0, 0, 98, 96, 1, 0, 0, 0, 99, 104, 3, 16, 8, 0, 100, 101, 5, 24, 0, 0, 101, 103, 3, 16, 8, 0,
1893
+ 102, 100, 1, 0, 0, 0, 103, 106, 1, 0, 0, 0, 104, 102, 1, 0, 0, 0, 104, 105, 1, 0, 0, 0, 105, 15,
1894
+ 1, 0, 0, 0, 106, 104, 1, 0, 0, 0, 107, 113, 3, 18, 9, 0, 108, 109, 3, 8, 4, 0, 109, 110, 3, 18, 9,
1895
+ 0, 110, 112, 1, 0, 0, 0, 111, 108, 1, 0, 0, 0, 112, 115, 1, 0, 0, 0, 113, 111, 1, 0, 0, 0, 113, 114,
1896
+ 1, 0, 0, 0, 114, 17, 1, 0, 0, 0, 115, 113, 1, 0, 0, 0, 116, 122, 3, 20, 10, 0, 117, 118, 3, 2, 1,
1897
+ 0, 118, 119, 3, 20, 10, 0, 119, 121, 1, 0, 0, 0, 120, 117, 1, 0, 0, 0, 121, 124, 1, 0, 0, 0, 122,
1898
+ 120, 1, 0, 0, 0, 122, 123, 1, 0, 0, 0, 123, 19, 1, 0, 0, 0, 124, 122, 1, 0, 0, 0, 125, 131, 3, 22,
1899
+ 11, 0, 126, 127, 3, 4, 2, 0, 127, 128, 3, 22, 11, 0, 128, 130, 1, 0, 0, 0, 129, 126, 1, 0, 0, 0,
1900
+ 130, 133, 1, 0, 0, 0, 131, 129, 1, 0, 0, 0, 131, 132, 1, 0, 0, 0, 132, 21, 1, 0, 0, 0, 133, 131,
1901
+ 1, 0, 0, 0, 134, 140, 3, 24, 12, 0, 135, 136, 3, 6, 3, 0, 136, 137, 3, 24, 12, 0, 137, 139, 1, 0,
1902
+ 0, 0, 138, 135, 1, 0, 0, 0, 139, 142, 1, 0, 0, 0, 140, 138, 1, 0, 0, 0, 140, 141, 1, 0, 0, 0, 141,
1903
+ 23, 1, 0, 0, 0, 142, 140, 1, 0, 0, 0, 143, 145, 7, 0, 0, 0, 144, 143, 1, 0, 0, 0, 145, 148, 1, 0,
1904
+ 0, 0, 146, 144, 1, 0, 0, 0, 146, 147, 1, 0, 0, 0, 147, 149, 1, 0, 0, 0, 148, 146, 1, 0, 0, 0, 149,
1905
+ 150, 3, 26, 13, 0, 150, 25, 1, 0, 0, 0, 151, 153, 5, 26, 0, 0, 152, 151, 1, 0, 0, 0, 153, 156, 1,
1906
+ 0, 0, 0, 154, 152, 1, 0, 0, 0, 154, 155, 1, 0, 0, 0, 155, 157, 1, 0, 0, 0, 156, 154, 1, 0, 0, 0, 157,
1907
+ 158, 3, 28, 14, 0, 158, 27, 1, 0, 0, 0, 159, 160, 6, 14, -1, 0, 160, 161, 3, 30, 15, 0, 161, 189,
1908
+ 1, 0, 0, 0, 162, 163, 10, 2, 0, 0, 163, 164, 5, 9, 0, 0, 164, 169, 3, 10, 5, 0, 165, 166, 5, 6, 0,
1909
+ 0, 166, 168, 3, 10, 5, 0, 167, 165, 1, 0, 0, 0, 168, 171, 1, 0, 0, 0, 169, 167, 1, 0, 0, 0, 169,
1910
+ 170, 1, 0, 0, 0, 170, 172, 1, 0, 0, 0, 171, 169, 1, 0, 0, 0, 172, 173, 5, 10, 0, 0, 173, 188, 1,
1911
+ 0, 0, 0, 174, 175, 10, 1, 0, 0, 175, 184, 5, 7, 0, 0, 176, 181, 3, 10, 5, 0, 177, 178, 5, 6, 0, 0,
1912
+ 178, 180, 3, 10, 5, 0, 179, 177, 1, 0, 0, 0, 180, 183, 1, 0, 0, 0, 181, 179, 1, 0, 0, 0, 181, 182,
1913
+ 1, 0, 0, 0, 182, 185, 1, 0, 0, 0, 183, 181, 1, 0, 0, 0, 184, 176, 1, 0, 0, 0, 184, 185, 1, 0, 0, 0,
1914
+ 185, 186, 1, 0, 0, 0, 186, 188, 5, 8, 0, 0, 187, 162, 1, 0, 0, 0, 187, 174, 1, 0, 0, 0, 188, 191,
1915
+ 1, 0, 0, 0, 189, 187, 1, 0, 0, 0, 189, 190, 1, 0, 0, 0, 190, 29, 1, 0, 0, 0, 191, 189, 1, 0, 0, 0,
1916
+ 192, 198, 3, 32, 16, 0, 193, 194, 5, 7, 0, 0, 194, 195, 3, 10, 5, 0, 195, 196, 5, 8, 0, 0, 196,
1917
+ 198, 1, 0, 0, 0, 197, 192, 1, 0, 0, 0, 197, 193, 1, 0, 0, 0, 198, 31, 1, 0, 0, 0, 199, 202, 3, 34,
1918
+ 17, 0, 200, 202, 5, 48, 0, 0, 201, 199, 1, 0, 0, 0, 201, 200, 1, 0, 0, 0, 202, 33, 1, 0, 0, 0, 203,
1919
+ 210, 3, 36, 18, 0, 204, 210, 3, 38, 19, 0, 205, 210, 3, 40, 20, 0, 206, 210, 5, 13, 0, 0, 207,
1920
+ 210, 5, 17, 0, 0, 208, 210, 5, 14, 0, 0, 209, 203, 1, 0, 0, 0, 209, 204, 1, 0, 0, 0, 209, 205, 1,
1921
+ 0, 0, 0, 209, 206, 1, 0, 0, 0, 209, 207, 1, 0, 0, 0, 209, 208, 1, 0, 0, 0, 210, 35, 1, 0, 0, 0, 211,
1922
+ 213, 5, 19, 0, 0, 212, 211, 1, 0, 0, 0, 212, 213, 1, 0, 0, 0, 213, 214, 1, 0, 0, 0, 214, 215, 5,
1923
+ 15, 0, 0, 215, 37, 1, 0, 0, 0, 216, 218, 5, 19, 0, 0, 217, 216, 1, 0, 0, 0, 217, 218, 1, 0, 0, 0,
1924
+ 218, 219, 1, 0, 0, 0, 219, 220, 5, 16, 0, 0, 220, 39, 1, 0, 0, 0, 221, 230, 5, 9, 0, 0, 222, 227,
1925
+ 3, 10, 5, 0, 223, 224, 5, 6, 0, 0, 224, 226, 3, 10, 5, 0, 225, 223, 1, 0, 0, 0, 226, 229, 1, 0, 0,
1926
+ 0, 227, 225, 1, 0, 0, 0, 227, 228, 1, 0, 0, 0, 228, 231, 1, 0, 0, 0, 229, 227, 1, 0, 0, 0, 230, 222,
1927
+ 1, 0, 0, 0, 230, 231, 1, 0, 0, 0, 231, 232, 1, 0, 0, 0, 232, 233, 5, 10, 0, 0, 233, 41, 1, 0, 0, 0,
1928
+ 234, 236, 5, 4, 0, 0, 235, 234, 1, 0, 0, 0, 236, 239, 1, 0, 0, 0, 237, 235, 1, 0, 0, 0, 237, 238,
1929
+ 1, 0, 0, 0, 238, 240, 1, 0, 0, 0, 239, 237, 1, 0, 0, 0, 240, 249, 3, 44, 22, 0, 241, 243, 5, 4, 0,
1930
+ 0, 242, 241, 1, 0, 0, 0, 243, 244, 1, 0, 0, 0, 244, 242, 1, 0, 0, 0, 244, 245, 1, 0, 0, 0, 245, 246,
1931
+ 1, 0, 0, 0, 246, 248, 3, 44, 22, 0, 247, 242, 1, 0, 0, 0, 248, 251, 1, 0, 0, 0, 249, 247, 1, 0, 0,
1932
+ 0, 249, 250, 1, 0, 0, 0, 250, 255, 1, 0, 0, 0, 251, 249, 1, 0, 0, 0, 252, 254, 5, 4, 0, 0, 253, 252,
1933
+ 1, 0, 0, 0, 254, 257, 1, 0, 0, 0, 255, 253, 1, 0, 0, 0, 255, 256, 1, 0, 0, 0, 256, 43, 1, 0, 0, 0,
1934
+ 257, 255, 1, 0, 0, 0, 258, 269, 3, 10, 5, 0, 259, 269, 3, 48, 24, 0, 260, 269, 3, 50, 25, 0, 261,
1935
+ 269, 3, 52, 26, 0, 262, 269, 3, 54, 27, 0, 263, 269, 3, 56, 28, 0, 264, 269, 3, 58, 29, 0, 265,
1936
+ 269, 3, 62, 31, 0, 266, 269, 3, 64, 32, 0, 267, 269, 3, 68, 34, 0, 268, 258, 1, 0, 0, 0, 268, 259,
1937
+ 1, 0, 0, 0, 268, 260, 1, 0, 0, 0, 268, 261, 1, 0, 0, 0, 268, 262, 1, 0, 0, 0, 268, 263, 1, 0, 0, 0,
1938
+ 268, 264, 1, 0, 0, 0, 268, 265, 1, 0, 0, 0, 268, 266, 1, 0, 0, 0, 268, 267, 1, 0, 0, 0, 269, 45,
1939
+ 1, 0, 0, 0, 270, 271, 5, 1, 0, 0, 271, 272, 3, 42, 21, 0, 272, 273, 5, 2, 0, 0, 273, 47, 1, 0, 0,
1940
+ 0, 274, 275, 5, 33, 0, 0, 275, 276, 3, 10, 5, 0, 276, 277, 5, 4, 0, 0, 277, 285, 3, 46, 23, 0, 278,
1941
+ 279, 5, 4, 0, 0, 279, 280, 5, 34, 0, 0, 280, 286, 3, 48, 24, 0, 281, 282, 5, 4, 0, 0, 282, 283,
1942
+ 5, 34, 0, 0, 283, 284, 5, 4, 0, 0, 284, 286, 3, 46, 23, 0, 285, 278, 1, 0, 0, 0, 285, 281, 1, 0,
1943
+ 0, 0, 285, 286, 1, 0, 0, 0, 286, 49, 1, 0, 0, 0, 287, 288, 5, 35, 0, 0, 288, 289, 3, 10, 5, 0, 289,
1944
+ 290, 5, 4, 0, 0, 290, 291, 3, 46, 23, 0, 291, 51, 1, 0, 0, 0, 292, 293, 5, 36, 0, 0, 293, 294, 5,
1945
+ 4, 0, 0, 294, 295, 3, 46, 23, 0, 295, 296, 5, 4, 0, 0, 296, 297, 5, 35, 0, 0, 297, 298, 3, 10, 5,
1946
+ 0, 298, 53, 1, 0, 0, 0, 299, 300, 5, 37, 0, 0, 300, 301, 5, 4, 0, 0, 301, 302, 3, 46, 23, 0, 302,
1947
+ 303, 5, 4, 0, 0, 303, 304, 5, 38, 0, 0, 304, 305, 3, 10, 5, 0, 305, 55, 1, 0, 0, 0, 306, 307, 5,
1948
+ 39, 0, 0, 307, 308, 5, 48, 0, 0, 308, 309, 5, 40, 0, 0, 309, 311, 3, 10, 5, 0, 310, 312, 5, 41,
1949
+ 0, 0, 311, 310, 1, 0, 0, 0, 311, 312, 1, 0, 0, 0, 312, 313, 1, 0, 0, 0, 313, 314, 5, 42, 0, 0, 314,
1950
+ 315, 3, 10, 5, 0, 315, 316, 5, 4, 0, 0, 316, 317, 3, 46, 23, 0, 317, 57, 1, 0, 0, 0, 318, 319, 3,
1951
+ 60, 30, 0, 319, 320, 5, 43, 0, 0, 320, 321, 3, 10, 5, 0, 321, 59, 1, 0, 0, 0, 322, 323, 6, 30, -1,
1952
+ 0, 323, 324, 5, 48, 0, 0, 324, 339, 1, 0, 0, 0, 325, 326, 10, 1, 0, 0, 326, 327, 5, 9, 0, 0, 327,
1953
+ 332, 3, 10, 5, 0, 328, 329, 5, 6, 0, 0, 329, 331, 3, 10, 5, 0, 330, 328, 1, 0, 0, 0, 331, 334, 1,
1954
+ 0, 0, 0, 332, 330, 1, 0, 0, 0, 332, 333, 1, 0, 0, 0, 333, 335, 1, 0, 0, 0, 334, 332, 1, 0, 0, 0, 335,
1955
+ 336, 5, 10, 0, 0, 336, 338, 1, 0, 0, 0, 337, 325, 1, 0, 0, 0, 338, 341, 1, 0, 0, 0, 339, 337, 1,
1956
+ 0, 0, 0, 339, 340, 1, 0, 0, 0, 340, 61, 1, 0, 0, 0, 341, 339, 1, 0, 0, 0, 342, 343, 5, 44, 0, 0, 343,
1957
+ 344, 3, 60, 30, 0, 344, 63, 1, 0, 0, 0, 345, 346, 5, 45, 0, 0, 346, 347, 3, 10, 5, 0, 347, 65, 1,
1958
+ 0, 0, 0, 348, 349, 5, 46, 0, 0, 349, 350, 5, 48, 0, 0, 350, 359, 5, 7, 0, 0, 351, 356, 5, 48, 0,
1959
+ 0, 352, 353, 5, 6, 0, 0, 353, 355, 5, 48, 0, 0, 354, 352, 1, 0, 0, 0, 355, 358, 1, 0, 0, 0, 356,
1960
+ 354, 1, 0, 0, 0, 356, 357, 1, 0, 0, 0, 357, 360, 1, 0, 0, 0, 358, 356, 1, 0, 0, 0, 359, 351, 1, 0,
1961
+ 0, 0, 359, 360, 1, 0, 0, 0, 360, 361, 1, 0, 0, 0, 361, 362, 5, 8, 0, 0, 362, 363, 5, 4, 0, 0, 363,
1962
+ 364, 3, 46, 23, 0, 364, 67, 1, 0, 0, 0, 365, 366, 5, 47, 0, 0, 366, 367, 3, 10, 5, 0, 367, 69, 1,
1963
+ 0, 0, 0, 33, 73, 77, 96, 104, 113, 122, 131, 140, 146, 154, 169, 181, 184, 187, 189, 197, 201,
1964
+ 209, 212, 217, 227, 230, 237, 244, 249, 255, 268, 285, 311, 332, 339, 356, 359];
1965
+ static __ATN;
1966
+ static get _ATN() {
1967
+ if (!PSCParser.__ATN) {
1968
+ PSCParser.__ATN = new ATNDeserializer().deserialize(PSCParser._serializedATN);
1969
+ }
1970
+ return PSCParser.__ATN;
1971
+ }
1972
+ static DecisionsToDFA = PSCParser._ATN.decisionToState.map((ds, index) => new DFA(ds, index));
1973
+ }
1974
+ export class ProgramContext extends ParserRuleContext {
1975
+ constructor(parser, parent, invokingState) {
1976
+ super(parent, invokingState);
1977
+ this.parser = parser;
1978
+ }
1979
+ EOF() {
1980
+ return this.getToken(PSCParser.EOF, 0);
1981
+ }
1982
+ subprogram_list() {
1983
+ return this.getTypedRuleContexts(SubprogramContext);
1984
+ }
1985
+ subprogram(i) {
1986
+ return this.getTypedRuleContext(SubprogramContext, i);
1987
+ }
1988
+ stmts() {
1989
+ return this.getTypedRuleContext(StmtsContext, 0);
1990
+ }
1991
+ get ruleIndex() {
1992
+ return PSCParser.RULE_program;
1993
+ }
1994
+ // @Override
1995
+ accept(visitor) {
1996
+ if (visitor.visitProgram) {
1997
+ return visitor.visitProgram(this);
1998
+ }
1999
+ else {
2000
+ return visitor.visitChildren(this);
2001
+ }
2002
+ }
2003
+ }
2004
+ export class AddOpContext extends ParserRuleContext {
2005
+ constructor(parser, parent, invokingState) {
2006
+ super(parent, invokingState);
2007
+ this.parser = parser;
2008
+ }
2009
+ PLUS() {
2010
+ return this.getToken(PSCParser.PLUS, 0);
2011
+ }
2012
+ MINUS() {
2013
+ return this.getToken(PSCParser.MINUS, 0);
2014
+ }
2015
+ get ruleIndex() {
2016
+ return PSCParser.RULE_addOp;
2017
+ }
2018
+ // @Override
2019
+ accept(visitor) {
2020
+ if (visitor.visitAddOp) {
2021
+ return visitor.visitAddOp(this);
2022
+ }
2023
+ else {
2024
+ return visitor.visitChildren(this);
2025
+ }
2026
+ }
2027
+ }
2028
+ export class MulOpContext extends ParserRuleContext {
2029
+ constructor(parser, parent, invokingState) {
2030
+ super(parent, invokingState);
2031
+ this.parser = parser;
2032
+ }
2033
+ MULTIPLY() {
2034
+ return this.getToken(PSCParser.MULTIPLY, 0);
2035
+ }
2036
+ DIVIDE() {
2037
+ return this.getToken(PSCParser.DIVIDE, 0);
2038
+ }
2039
+ MODULO() {
2040
+ return this.getToken(PSCParser.MODULO, 0);
2041
+ }
2042
+ get ruleIndex() {
2043
+ return PSCParser.RULE_mulOp;
2044
+ }
2045
+ // @Override
2046
+ accept(visitor) {
2047
+ if (visitor.visitMulOp) {
2048
+ return visitor.visitMulOp(this);
2049
+ }
2050
+ else {
2051
+ return visitor.visitChildren(this);
2052
+ }
2053
+ }
2054
+ }
2055
+ export class ExpOpContext extends ParserRuleContext {
2056
+ constructor(parser, parent, invokingState) {
2057
+ super(parent, invokingState);
2058
+ this.parser = parser;
2059
+ }
2060
+ EXPONENT() {
2061
+ return this.getToken(PSCParser.EXPONENT, 0);
2062
+ }
2063
+ get ruleIndex() {
2064
+ return PSCParser.RULE_expOp;
2065
+ }
2066
+ // @Override
2067
+ accept(visitor) {
2068
+ if (visitor.visitExpOp) {
2069
+ return visitor.visitExpOp(this);
2070
+ }
2071
+ else {
2072
+ return visitor.visitChildren(this);
2073
+ }
2074
+ }
2075
+ }
2076
+ export class CompOpContext extends ParserRuleContext {
2077
+ constructor(parser, parent, invokingState) {
2078
+ super(parent, invokingState);
2079
+ this.parser = parser;
2080
+ }
2081
+ EQUAL() {
2082
+ return this.getToken(PSCParser.EQUAL, 0);
2083
+ }
2084
+ NEQUAL() {
2085
+ return this.getToken(PSCParser.NEQUAL, 0);
2086
+ }
2087
+ GT() {
2088
+ return this.getToken(PSCParser.GT, 0);
2089
+ }
2090
+ LT() {
2091
+ return this.getToken(PSCParser.LT, 0);
2092
+ }
2093
+ GTEQ() {
2094
+ return this.getToken(PSCParser.GTEQ, 0);
2095
+ }
2096
+ LTEQ() {
2097
+ return this.getToken(PSCParser.LTEQ, 0);
2098
+ }
2099
+ get ruleIndex() {
2100
+ return PSCParser.RULE_compOp;
2101
+ }
2102
+ // @Override
2103
+ accept(visitor) {
2104
+ if (visitor.visitCompOp) {
2105
+ return visitor.visitCompOp(this);
2106
+ }
2107
+ else {
2108
+ return visitor.visitChildren(this);
2109
+ }
2110
+ }
2111
+ }
2112
+ export class ExprContext extends ParserRuleContext {
2113
+ constructor(parser, parent, invokingState) {
2114
+ super(parent, invokingState);
2115
+ this.parser = parser;
2116
+ }
2117
+ orExpr() {
2118
+ return this.getTypedRuleContext(OrExprContext, 0);
2119
+ }
2120
+ get ruleIndex() {
2121
+ return PSCParser.RULE_expr;
2122
+ }
2123
+ // @Override
2124
+ accept(visitor) {
2125
+ if (visitor.visitExpr) {
2126
+ return visitor.visitExpr(this);
2127
+ }
2128
+ else {
2129
+ return visitor.visitChildren(this);
2130
+ }
2131
+ }
2132
+ }
2133
+ export class OrExprContext extends ParserRuleContext {
2134
+ constructor(parser, parent, invokingState) {
2135
+ super(parent, invokingState);
2136
+ this.parser = parser;
2137
+ }
2138
+ andExpr_list() {
2139
+ return this.getTypedRuleContexts(AndExprContext);
2140
+ }
2141
+ andExpr(i) {
2142
+ return this.getTypedRuleContext(AndExprContext, i);
2143
+ }
2144
+ OR_list() {
2145
+ return this.getTokens(PSCParser.OR);
2146
+ }
2147
+ OR(i) {
2148
+ return this.getToken(PSCParser.OR, i);
2149
+ }
2150
+ get ruleIndex() {
2151
+ return PSCParser.RULE_orExpr;
2152
+ }
2153
+ // @Override
2154
+ accept(visitor) {
2155
+ if (visitor.visitOrExpr) {
2156
+ return visitor.visitOrExpr(this);
2157
+ }
2158
+ else {
2159
+ return visitor.visitChildren(this);
2160
+ }
2161
+ }
2162
+ }
2163
+ export class AndExprContext extends ParserRuleContext {
2164
+ constructor(parser, parent, invokingState) {
2165
+ super(parent, invokingState);
2166
+ this.parser = parser;
2167
+ }
2168
+ compExpr_list() {
2169
+ return this.getTypedRuleContexts(CompExprContext);
2170
+ }
2171
+ compExpr(i) {
2172
+ return this.getTypedRuleContext(CompExprContext, i);
2173
+ }
2174
+ AND_list() {
2175
+ return this.getTokens(PSCParser.AND);
2176
+ }
2177
+ AND(i) {
2178
+ return this.getToken(PSCParser.AND, i);
2179
+ }
2180
+ get ruleIndex() {
2181
+ return PSCParser.RULE_andExpr;
2182
+ }
2183
+ // @Override
2184
+ accept(visitor) {
2185
+ if (visitor.visitAndExpr) {
2186
+ return visitor.visitAndExpr(this);
2187
+ }
2188
+ else {
2189
+ return visitor.visitChildren(this);
2190
+ }
2191
+ }
2192
+ }
2193
+ export class CompExprContext extends ParserRuleContext {
2194
+ constructor(parser, parent, invokingState) {
2195
+ super(parent, invokingState);
2196
+ this.parser = parser;
2197
+ }
2198
+ addExpr_list() {
2199
+ return this.getTypedRuleContexts(AddExprContext);
2200
+ }
2201
+ addExpr(i) {
2202
+ return this.getTypedRuleContext(AddExprContext, i);
2203
+ }
2204
+ compOp_list() {
2205
+ return this.getTypedRuleContexts(CompOpContext);
2206
+ }
2207
+ compOp(i) {
2208
+ return this.getTypedRuleContext(CompOpContext, i);
2209
+ }
2210
+ get ruleIndex() {
2211
+ return PSCParser.RULE_compExpr;
2212
+ }
2213
+ // @Override
2214
+ accept(visitor) {
2215
+ if (visitor.visitCompExpr) {
2216
+ return visitor.visitCompExpr(this);
2217
+ }
2218
+ else {
2219
+ return visitor.visitChildren(this);
2220
+ }
2221
+ }
2222
+ }
2223
+ export class AddExprContext extends ParserRuleContext {
2224
+ constructor(parser, parent, invokingState) {
2225
+ super(parent, invokingState);
2226
+ this.parser = parser;
2227
+ }
2228
+ mulExpr_list() {
2229
+ return this.getTypedRuleContexts(MulExprContext);
2230
+ }
2231
+ mulExpr(i) {
2232
+ return this.getTypedRuleContext(MulExprContext, i);
2233
+ }
2234
+ addOp_list() {
2235
+ return this.getTypedRuleContexts(AddOpContext);
2236
+ }
2237
+ addOp(i) {
2238
+ return this.getTypedRuleContext(AddOpContext, i);
2239
+ }
2240
+ get ruleIndex() {
2241
+ return PSCParser.RULE_addExpr;
2242
+ }
2243
+ // @Override
2244
+ accept(visitor) {
2245
+ if (visitor.visitAddExpr) {
2246
+ return visitor.visitAddExpr(this);
2247
+ }
2248
+ else {
2249
+ return visitor.visitChildren(this);
2250
+ }
2251
+ }
2252
+ }
2253
+ export class MulExprContext extends ParserRuleContext {
2254
+ constructor(parser, parent, invokingState) {
2255
+ super(parent, invokingState);
2256
+ this.parser = parser;
2257
+ }
2258
+ expExpr_list() {
2259
+ return this.getTypedRuleContexts(ExpExprContext);
2260
+ }
2261
+ expExpr(i) {
2262
+ return this.getTypedRuleContext(ExpExprContext, i);
2263
+ }
2264
+ mulOp_list() {
2265
+ return this.getTypedRuleContexts(MulOpContext);
2266
+ }
2267
+ mulOp(i) {
2268
+ return this.getTypedRuleContext(MulOpContext, i);
2269
+ }
2270
+ get ruleIndex() {
2271
+ return PSCParser.RULE_mulExpr;
2272
+ }
2273
+ // @Override
2274
+ accept(visitor) {
2275
+ if (visitor.visitMulExpr) {
2276
+ return visitor.visitMulExpr(this);
2277
+ }
2278
+ else {
2279
+ return visitor.visitChildren(this);
2280
+ }
2281
+ }
2282
+ }
2283
+ export class ExpExprContext extends ParserRuleContext {
2284
+ constructor(parser, parent, invokingState) {
2285
+ super(parent, invokingState);
2286
+ this.parser = parser;
2287
+ }
2288
+ unaryExpr_list() {
2289
+ return this.getTypedRuleContexts(UnaryExprContext);
2290
+ }
2291
+ unaryExpr(i) {
2292
+ return this.getTypedRuleContext(UnaryExprContext, i);
2293
+ }
2294
+ expOp_list() {
2295
+ return this.getTypedRuleContexts(ExpOpContext);
2296
+ }
2297
+ expOp(i) {
2298
+ return this.getTypedRuleContext(ExpOpContext, i);
2299
+ }
2300
+ get ruleIndex() {
2301
+ return PSCParser.RULE_expExpr;
2302
+ }
2303
+ // @Override
2304
+ accept(visitor) {
2305
+ if (visitor.visitExpExpr) {
2306
+ return visitor.visitExpExpr(this);
2307
+ }
2308
+ else {
2309
+ return visitor.visitChildren(this);
2310
+ }
2311
+ }
2312
+ }
2313
+ export class UnaryExprContext extends ParserRuleContext {
2314
+ constructor(parser, parent, invokingState) {
2315
+ super(parent, invokingState);
2316
+ this.parser = parser;
2317
+ }
2318
+ notExpr() {
2319
+ return this.getTypedRuleContext(NotExprContext, 0);
2320
+ }
2321
+ PLUS_list() {
2322
+ return this.getTokens(PSCParser.PLUS);
2323
+ }
2324
+ PLUS(i) {
2325
+ return this.getToken(PSCParser.PLUS, i);
2326
+ }
2327
+ MINUS_list() {
2328
+ return this.getTokens(PSCParser.MINUS);
2329
+ }
2330
+ MINUS(i) {
2331
+ return this.getToken(PSCParser.MINUS, i);
2332
+ }
2333
+ get ruleIndex() {
2334
+ return PSCParser.RULE_unaryExpr;
2335
+ }
2336
+ // @Override
2337
+ accept(visitor) {
2338
+ if (visitor.visitUnaryExpr) {
2339
+ return visitor.visitUnaryExpr(this);
2340
+ }
2341
+ else {
2342
+ return visitor.visitChildren(this);
2343
+ }
2344
+ }
2345
+ }
2346
+ export class NotExprContext extends ParserRuleContext {
2347
+ constructor(parser, parent, invokingState) {
2348
+ super(parent, invokingState);
2349
+ this.parser = parser;
2350
+ }
2351
+ primaryExpr() {
2352
+ return this.getTypedRuleContext(PrimaryExprContext, 0);
2353
+ }
2354
+ NOT_list() {
2355
+ return this.getTokens(PSCParser.NOT);
2356
+ }
2357
+ NOT(i) {
2358
+ return this.getToken(PSCParser.NOT, i);
2359
+ }
2360
+ get ruleIndex() {
2361
+ return PSCParser.RULE_notExpr;
2362
+ }
2363
+ // @Override
2364
+ accept(visitor) {
2365
+ if (visitor.visitNotExpr) {
2366
+ return visitor.visitNotExpr(this);
2367
+ }
2368
+ else {
2369
+ return visitor.visitChildren(this);
2370
+ }
2371
+ }
2372
+ }
2373
+ export class PrimaryExprContext extends ParserRuleContext {
2374
+ constructor(parser, parent, invokingState) {
2375
+ super(parent, invokingState);
2376
+ this.parser = parser;
2377
+ }
2378
+ groupExpr() {
2379
+ return this.getTypedRuleContext(GroupExprContext, 0);
2380
+ }
2381
+ primaryExpr() {
2382
+ return this.getTypedRuleContext(PrimaryExprContext, 0);
2383
+ }
2384
+ LSQUARE() {
2385
+ return this.getToken(PSCParser.LSQUARE, 0);
2386
+ }
2387
+ expr_list() {
2388
+ return this.getTypedRuleContexts(ExprContext);
2389
+ }
2390
+ expr(i) {
2391
+ return this.getTypedRuleContext(ExprContext, i);
2392
+ }
2393
+ RSQUARE() {
2394
+ return this.getToken(PSCParser.RSQUARE, 0);
2395
+ }
2396
+ COMMA_list() {
2397
+ return this.getTokens(PSCParser.COMMA);
2398
+ }
2399
+ COMMA(i) {
2400
+ return this.getToken(PSCParser.COMMA, i);
2401
+ }
2402
+ LPAREN() {
2403
+ return this.getToken(PSCParser.LPAREN, 0);
2404
+ }
2405
+ RPAREN() {
2406
+ return this.getToken(PSCParser.RPAREN, 0);
2407
+ }
2408
+ get ruleIndex() {
2409
+ return PSCParser.RULE_primaryExpr;
2410
+ }
2411
+ // @Override
2412
+ accept(visitor) {
2413
+ if (visitor.visitPrimaryExpr) {
2414
+ return visitor.visitPrimaryExpr(this);
2415
+ }
2416
+ else {
2417
+ return visitor.visitChildren(this);
2418
+ }
2419
+ }
2420
+ }
2421
+ export class GroupExprContext extends ParserRuleContext {
2422
+ constructor(parser, parent, invokingState) {
2423
+ super(parent, invokingState);
2424
+ this.parser = parser;
2425
+ }
2426
+ atom() {
2427
+ return this.getTypedRuleContext(AtomContext, 0);
2428
+ }
2429
+ LPAREN() {
2430
+ return this.getToken(PSCParser.LPAREN, 0);
2431
+ }
2432
+ expr() {
2433
+ return this.getTypedRuleContext(ExprContext, 0);
2434
+ }
2435
+ RPAREN() {
2436
+ return this.getToken(PSCParser.RPAREN, 0);
2437
+ }
2438
+ get ruleIndex() {
2439
+ return PSCParser.RULE_groupExpr;
2440
+ }
2441
+ // @Override
2442
+ accept(visitor) {
2443
+ if (visitor.visitGroupExpr) {
2444
+ return visitor.visitGroupExpr(this);
2445
+ }
2446
+ else {
2447
+ return visitor.visitChildren(this);
2448
+ }
2449
+ }
2450
+ }
2451
+ export class AtomContext extends ParserRuleContext {
2452
+ constructor(parser, parent, invokingState) {
2453
+ super(parent, invokingState);
2454
+ this.parser = parser;
2455
+ }
2456
+ lits() {
2457
+ return this.getTypedRuleContext(LitsContext, 0);
2458
+ }
2459
+ ID() {
2460
+ return this.getToken(PSCParser.ID, 0);
2461
+ }
2462
+ get ruleIndex() {
2463
+ return PSCParser.RULE_atom;
2464
+ }
2465
+ // @Override
2466
+ accept(visitor) {
2467
+ if (visitor.visitAtom) {
2468
+ return visitor.visitAtom(this);
2469
+ }
2470
+ else {
2471
+ return visitor.visitChildren(this);
2472
+ }
2473
+ }
2474
+ }
2475
+ export class LitsContext extends ParserRuleContext {
2476
+ constructor(parser, parent, invokingState) {
2477
+ super(parent, invokingState);
2478
+ this.parser = parser;
2479
+ }
2480
+ intLits() {
2481
+ return this.getTypedRuleContext(IntLitsContext, 0);
2482
+ }
2483
+ floatLits() {
2484
+ return this.getTypedRuleContext(FloatLitsContext, 0);
2485
+ }
2486
+ arrayLits() {
2487
+ return this.getTypedRuleContext(ArrayLitsContext, 0);
2488
+ }
2489
+ STRING() {
2490
+ return this.getToken(PSCParser.STRING, 0);
2491
+ }
2492
+ BOOLEAN() {
2493
+ return this.getToken(PSCParser.BOOLEAN, 0);
2494
+ }
2495
+ NULL() {
2496
+ return this.getToken(PSCParser.NULL, 0);
2497
+ }
2498
+ get ruleIndex() {
2499
+ return PSCParser.RULE_lits;
2500
+ }
2501
+ // @Override
2502
+ accept(visitor) {
2503
+ if (visitor.visitLits) {
2504
+ return visitor.visitLits(this);
2505
+ }
2506
+ else {
2507
+ return visitor.visitChildren(this);
2508
+ }
2509
+ }
2510
+ }
2511
+ export class IntLitsContext extends ParserRuleContext {
2512
+ constructor(parser, parent, invokingState) {
2513
+ super(parent, invokingState);
2514
+ this.parser = parser;
2515
+ }
2516
+ INTEGER() {
2517
+ return this.getToken(PSCParser.INTEGER, 0);
2518
+ }
2519
+ MINUS() {
2520
+ return this.getToken(PSCParser.MINUS, 0);
2521
+ }
2522
+ get ruleIndex() {
2523
+ return PSCParser.RULE_intLits;
2524
+ }
2525
+ // @Override
2526
+ accept(visitor) {
2527
+ if (visitor.visitIntLits) {
2528
+ return visitor.visitIntLits(this);
2529
+ }
2530
+ else {
2531
+ return visitor.visitChildren(this);
2532
+ }
2533
+ }
2534
+ }
2535
+ export class FloatLitsContext extends ParserRuleContext {
2536
+ constructor(parser, parent, invokingState) {
2537
+ super(parent, invokingState);
2538
+ this.parser = parser;
2539
+ }
2540
+ FLOAT() {
2541
+ return this.getToken(PSCParser.FLOAT, 0);
2542
+ }
2543
+ MINUS() {
2544
+ return this.getToken(PSCParser.MINUS, 0);
2545
+ }
2546
+ get ruleIndex() {
2547
+ return PSCParser.RULE_floatLits;
2548
+ }
2549
+ // @Override
2550
+ accept(visitor) {
2551
+ if (visitor.visitFloatLits) {
2552
+ return visitor.visitFloatLits(this);
2553
+ }
2554
+ else {
2555
+ return visitor.visitChildren(this);
2556
+ }
2557
+ }
2558
+ }
2559
+ export class ArrayLitsContext extends ParserRuleContext {
2560
+ constructor(parser, parent, invokingState) {
2561
+ super(parent, invokingState);
2562
+ this.parser = parser;
2563
+ }
2564
+ LSQUARE() {
2565
+ return this.getToken(PSCParser.LSQUARE, 0);
2566
+ }
2567
+ RSQUARE() {
2568
+ return this.getToken(PSCParser.RSQUARE, 0);
2569
+ }
2570
+ expr_list() {
2571
+ return this.getTypedRuleContexts(ExprContext);
2572
+ }
2573
+ expr(i) {
2574
+ return this.getTypedRuleContext(ExprContext, i);
2575
+ }
2576
+ COMMA_list() {
2577
+ return this.getTokens(PSCParser.COMMA);
2578
+ }
2579
+ COMMA(i) {
2580
+ return this.getToken(PSCParser.COMMA, i);
2581
+ }
2582
+ get ruleIndex() {
2583
+ return PSCParser.RULE_arrayLits;
2584
+ }
2585
+ // @Override
2586
+ accept(visitor) {
2587
+ if (visitor.visitArrayLits) {
2588
+ return visitor.visitArrayLits(this);
2589
+ }
2590
+ else {
2591
+ return visitor.visitChildren(this);
2592
+ }
2593
+ }
2594
+ }
2595
+ export class StmtsContext extends ParserRuleContext {
2596
+ constructor(parser, parent, invokingState) {
2597
+ super(parent, invokingState);
2598
+ this.parser = parser;
2599
+ }
2600
+ stmt_list() {
2601
+ return this.getTypedRuleContexts(StmtContext);
2602
+ }
2603
+ stmt(i) {
2604
+ return this.getTypedRuleContext(StmtContext, i);
2605
+ }
2606
+ NEWLINE_list() {
2607
+ return this.getTokens(PSCParser.NEWLINE);
2608
+ }
2609
+ NEWLINE(i) {
2610
+ return this.getToken(PSCParser.NEWLINE, i);
2611
+ }
2612
+ get ruleIndex() {
2613
+ return PSCParser.RULE_stmts;
2614
+ }
2615
+ // @Override
2616
+ accept(visitor) {
2617
+ if (visitor.visitStmts) {
2618
+ return visitor.visitStmts(this);
2619
+ }
2620
+ else {
2621
+ return visitor.visitChildren(this);
2622
+ }
2623
+ }
2624
+ }
2625
+ export class StmtContext extends ParserRuleContext {
2626
+ constructor(parser, parent, invokingState) {
2627
+ super(parent, invokingState);
2628
+ this.parser = parser;
2629
+ }
2630
+ expr() {
2631
+ return this.getTypedRuleContext(ExprContext, 0);
2632
+ }
2633
+ ifStmt() {
2634
+ return this.getTypedRuleContext(IfStmtContext, 0);
2635
+ }
2636
+ whileStmt() {
2637
+ return this.getTypedRuleContext(WhileStmtContext, 0);
2638
+ }
2639
+ doWhileStmt() {
2640
+ return this.getTypedRuleContext(DoWhileStmtContext, 0);
2641
+ }
2642
+ repeatUntilStmt() {
2643
+ return this.getTypedRuleContext(RepeatUntilStmtContext, 0);
2644
+ }
2645
+ forStmt() {
2646
+ return this.getTypedRuleContext(ForStmtContext, 0);
2647
+ }
2648
+ asmStmt() {
2649
+ return this.getTypedRuleContext(AsmStmtContext, 0);
2650
+ }
2651
+ inputStmt() {
2652
+ return this.getTypedRuleContext(InputStmtContext, 0);
2653
+ }
2654
+ outputStmt() {
2655
+ return this.getTypedRuleContext(OutputStmtContext, 0);
2656
+ }
2657
+ returnStmt() {
2658
+ return this.getTypedRuleContext(ReturnStmtContext, 0);
2659
+ }
2660
+ get ruleIndex() {
2661
+ return PSCParser.RULE_stmt;
2662
+ }
2663
+ // @Override
2664
+ accept(visitor) {
2665
+ if (visitor.visitStmt) {
2666
+ return visitor.visitStmt(this);
2667
+ }
2668
+ else {
2669
+ return visitor.visitChildren(this);
2670
+ }
2671
+ }
2672
+ }
2673
+ export class BlockContext extends ParserRuleContext {
2674
+ constructor(parser, parent, invokingState) {
2675
+ super(parent, invokingState);
2676
+ this.parser = parser;
2677
+ }
2678
+ INDENT() {
2679
+ return this.getToken(PSCParser.INDENT, 0);
2680
+ }
2681
+ stmts() {
2682
+ return this.getTypedRuleContext(StmtsContext, 0);
2683
+ }
2684
+ DEDENT() {
2685
+ return this.getToken(PSCParser.DEDENT, 0);
2686
+ }
2687
+ get ruleIndex() {
2688
+ return PSCParser.RULE_block;
2689
+ }
2690
+ // @Override
2691
+ accept(visitor) {
2692
+ if (visitor.visitBlock) {
2693
+ return visitor.visitBlock(this);
2694
+ }
2695
+ else {
2696
+ return visitor.visitChildren(this);
2697
+ }
2698
+ }
2699
+ }
2700
+ export class IfStmtContext extends ParserRuleContext {
2701
+ constructor(parser, parent, invokingState) {
2702
+ super(parent, invokingState);
2703
+ this.parser = parser;
2704
+ }
2705
+ IF() {
2706
+ return this.getToken(PSCParser.IF, 0);
2707
+ }
2708
+ expr() {
2709
+ return this.getTypedRuleContext(ExprContext, 0);
2710
+ }
2711
+ NEWLINE_list() {
2712
+ return this.getTokens(PSCParser.NEWLINE);
2713
+ }
2714
+ NEWLINE(i) {
2715
+ return this.getToken(PSCParser.NEWLINE, i);
2716
+ }
2717
+ block_list() {
2718
+ return this.getTypedRuleContexts(BlockContext);
2719
+ }
2720
+ block(i) {
2721
+ return this.getTypedRuleContext(BlockContext, i);
2722
+ }
2723
+ ELSE() {
2724
+ return this.getToken(PSCParser.ELSE, 0);
2725
+ }
2726
+ ifStmt() {
2727
+ return this.getTypedRuleContext(IfStmtContext, 0);
2728
+ }
2729
+ get ruleIndex() {
2730
+ return PSCParser.RULE_ifStmt;
2731
+ }
2732
+ // @Override
2733
+ accept(visitor) {
2734
+ if (visitor.visitIfStmt) {
2735
+ return visitor.visitIfStmt(this);
2736
+ }
2737
+ else {
2738
+ return visitor.visitChildren(this);
2739
+ }
2740
+ }
2741
+ }
2742
+ export class WhileStmtContext extends ParserRuleContext {
2743
+ constructor(parser, parent, invokingState) {
2744
+ super(parent, invokingState);
2745
+ this.parser = parser;
2746
+ }
2747
+ WHILE() {
2748
+ return this.getToken(PSCParser.WHILE, 0);
2749
+ }
2750
+ expr() {
2751
+ return this.getTypedRuleContext(ExprContext, 0);
2752
+ }
2753
+ NEWLINE() {
2754
+ return this.getToken(PSCParser.NEWLINE, 0);
2755
+ }
2756
+ block() {
2757
+ return this.getTypedRuleContext(BlockContext, 0);
2758
+ }
2759
+ get ruleIndex() {
2760
+ return PSCParser.RULE_whileStmt;
2761
+ }
2762
+ // @Override
2763
+ accept(visitor) {
2764
+ if (visitor.visitWhileStmt) {
2765
+ return visitor.visitWhileStmt(this);
2766
+ }
2767
+ else {
2768
+ return visitor.visitChildren(this);
2769
+ }
2770
+ }
2771
+ }
2772
+ export class DoWhileStmtContext extends ParserRuleContext {
2773
+ constructor(parser, parent, invokingState) {
2774
+ super(parent, invokingState);
2775
+ this.parser = parser;
2776
+ }
2777
+ DO() {
2778
+ return this.getToken(PSCParser.DO, 0);
2779
+ }
2780
+ NEWLINE_list() {
2781
+ return this.getTokens(PSCParser.NEWLINE);
2782
+ }
2783
+ NEWLINE(i) {
2784
+ return this.getToken(PSCParser.NEWLINE, i);
2785
+ }
2786
+ block() {
2787
+ return this.getTypedRuleContext(BlockContext, 0);
2788
+ }
2789
+ WHILE() {
2790
+ return this.getToken(PSCParser.WHILE, 0);
2791
+ }
2792
+ expr() {
2793
+ return this.getTypedRuleContext(ExprContext, 0);
2794
+ }
2795
+ get ruleIndex() {
2796
+ return PSCParser.RULE_doWhileStmt;
2797
+ }
2798
+ // @Override
2799
+ accept(visitor) {
2800
+ if (visitor.visitDoWhileStmt) {
2801
+ return visitor.visitDoWhileStmt(this);
2802
+ }
2803
+ else {
2804
+ return visitor.visitChildren(this);
2805
+ }
2806
+ }
2807
+ }
2808
+ export class RepeatUntilStmtContext extends ParserRuleContext {
2809
+ constructor(parser, parent, invokingState) {
2810
+ super(parent, invokingState);
2811
+ this.parser = parser;
2812
+ }
2813
+ REPEAT() {
2814
+ return this.getToken(PSCParser.REPEAT, 0);
2815
+ }
2816
+ NEWLINE_list() {
2817
+ return this.getTokens(PSCParser.NEWLINE);
2818
+ }
2819
+ NEWLINE(i) {
2820
+ return this.getToken(PSCParser.NEWLINE, i);
2821
+ }
2822
+ block() {
2823
+ return this.getTypedRuleContext(BlockContext, 0);
2824
+ }
2825
+ UNTIL() {
2826
+ return this.getToken(PSCParser.UNTIL, 0);
2827
+ }
2828
+ expr() {
2829
+ return this.getTypedRuleContext(ExprContext, 0);
2830
+ }
2831
+ get ruleIndex() {
2832
+ return PSCParser.RULE_repeatUntilStmt;
2833
+ }
2834
+ // @Override
2835
+ accept(visitor) {
2836
+ if (visitor.visitRepeatUntilStmt) {
2837
+ return visitor.visitRepeatUntilStmt(this);
2838
+ }
2839
+ else {
2840
+ return visitor.visitChildren(this);
2841
+ }
2842
+ }
2843
+ }
2844
+ export class ForStmtContext extends ParserRuleContext {
2845
+ constructor(parser, parent, invokingState) {
2846
+ super(parent, invokingState);
2847
+ this.parser = parser;
2848
+ }
2849
+ FOR() {
2850
+ return this.getToken(PSCParser.FOR, 0);
2851
+ }
2852
+ ID() {
2853
+ return this.getToken(PSCParser.ID, 0);
2854
+ }
2855
+ FROM() {
2856
+ return this.getToken(PSCParser.FROM, 0);
2857
+ }
2858
+ expr_list() {
2859
+ return this.getTypedRuleContexts(ExprContext);
2860
+ }
2861
+ expr(i) {
2862
+ return this.getTypedRuleContext(ExprContext, i);
2863
+ }
2864
+ TO() {
2865
+ return this.getToken(PSCParser.TO, 0);
2866
+ }
2867
+ NEWLINE() {
2868
+ return this.getToken(PSCParser.NEWLINE, 0);
2869
+ }
2870
+ block() {
2871
+ return this.getTypedRuleContext(BlockContext, 0);
2872
+ }
2873
+ DOWN() {
2874
+ return this.getToken(PSCParser.DOWN, 0);
2875
+ }
2876
+ get ruleIndex() {
2877
+ return PSCParser.RULE_forStmt;
2878
+ }
2879
+ // @Override
2880
+ accept(visitor) {
2881
+ if (visitor.visitForStmt) {
2882
+ return visitor.visitForStmt(this);
2883
+ }
2884
+ else {
2885
+ return visitor.visitChildren(this);
2886
+ }
2887
+ }
2888
+ }
2889
+ export class AsmStmtContext extends ParserRuleContext {
2890
+ constructor(parser, parent, invokingState) {
2891
+ super(parent, invokingState);
2892
+ this.parser = parser;
2893
+ }
2894
+ lvalue() {
2895
+ return this.getTypedRuleContext(LvalueContext, 0);
2896
+ }
2897
+ ASSIGN() {
2898
+ return this.getToken(PSCParser.ASSIGN, 0);
2899
+ }
2900
+ expr() {
2901
+ return this.getTypedRuleContext(ExprContext, 0);
2902
+ }
2903
+ get ruleIndex() {
2904
+ return PSCParser.RULE_asmStmt;
2905
+ }
2906
+ // @Override
2907
+ accept(visitor) {
2908
+ if (visitor.visitAsmStmt) {
2909
+ return visitor.visitAsmStmt(this);
2910
+ }
2911
+ else {
2912
+ return visitor.visitChildren(this);
2913
+ }
2914
+ }
2915
+ }
2916
+ export class LvalueContext extends ParserRuleContext {
2917
+ constructor(parser, parent, invokingState) {
2918
+ super(parent, invokingState);
2919
+ this.parser = parser;
2920
+ }
2921
+ ID() {
2922
+ return this.getToken(PSCParser.ID, 0);
2923
+ }
2924
+ lvalue() {
2925
+ return this.getTypedRuleContext(LvalueContext, 0);
2926
+ }
2927
+ LSQUARE() {
2928
+ return this.getToken(PSCParser.LSQUARE, 0);
2929
+ }
2930
+ expr_list() {
2931
+ return this.getTypedRuleContexts(ExprContext);
2932
+ }
2933
+ expr(i) {
2934
+ return this.getTypedRuleContext(ExprContext, i);
2935
+ }
2936
+ RSQUARE() {
2937
+ return this.getToken(PSCParser.RSQUARE, 0);
2938
+ }
2939
+ COMMA_list() {
2940
+ return this.getTokens(PSCParser.COMMA);
2941
+ }
2942
+ COMMA(i) {
2943
+ return this.getToken(PSCParser.COMMA, i);
2944
+ }
2945
+ get ruleIndex() {
2946
+ return PSCParser.RULE_lvalue;
2947
+ }
2948
+ // @Override
2949
+ accept(visitor) {
2950
+ if (visitor.visitLvalue) {
2951
+ return visitor.visitLvalue(this);
2952
+ }
2953
+ else {
2954
+ return visitor.visitChildren(this);
2955
+ }
2956
+ }
2957
+ }
2958
+ export class InputStmtContext extends ParserRuleContext {
2959
+ constructor(parser, parent, invokingState) {
2960
+ super(parent, invokingState);
2961
+ this.parser = parser;
2962
+ }
2963
+ INPUT() {
2964
+ return this.getToken(PSCParser.INPUT, 0);
2965
+ }
2966
+ lvalue() {
2967
+ return this.getTypedRuleContext(LvalueContext, 0);
2968
+ }
2969
+ get ruleIndex() {
2970
+ return PSCParser.RULE_inputStmt;
2971
+ }
2972
+ // @Override
2973
+ accept(visitor) {
2974
+ if (visitor.visitInputStmt) {
2975
+ return visitor.visitInputStmt(this);
2976
+ }
2977
+ else {
2978
+ return visitor.visitChildren(this);
2979
+ }
2980
+ }
2981
+ }
2982
+ export class OutputStmtContext extends ParserRuleContext {
2983
+ constructor(parser, parent, invokingState) {
2984
+ super(parent, invokingState);
2985
+ this.parser = parser;
2986
+ }
2987
+ OUTPUT() {
2988
+ return this.getToken(PSCParser.OUTPUT, 0);
2989
+ }
2990
+ expr() {
2991
+ return this.getTypedRuleContext(ExprContext, 0);
2992
+ }
2993
+ get ruleIndex() {
2994
+ return PSCParser.RULE_outputStmt;
2995
+ }
2996
+ // @Override
2997
+ accept(visitor) {
2998
+ if (visitor.visitOutputStmt) {
2999
+ return visitor.visitOutputStmt(this);
3000
+ }
3001
+ else {
3002
+ return visitor.visitChildren(this);
3003
+ }
3004
+ }
3005
+ }
3006
+ export class SubprogramContext extends ParserRuleContext {
3007
+ constructor(parser, parent, invokingState) {
3008
+ super(parent, invokingState);
3009
+ this.parser = parser;
3010
+ }
3011
+ SUBPROGRAM() {
3012
+ return this.getToken(PSCParser.SUBPROGRAM, 0);
3013
+ }
3014
+ ID_list() {
3015
+ return this.getTokens(PSCParser.ID);
3016
+ }
3017
+ ID(i) {
3018
+ return this.getToken(PSCParser.ID, i);
3019
+ }
3020
+ LPAREN() {
3021
+ return this.getToken(PSCParser.LPAREN, 0);
3022
+ }
3023
+ RPAREN() {
3024
+ return this.getToken(PSCParser.RPAREN, 0);
3025
+ }
3026
+ NEWLINE() {
3027
+ return this.getToken(PSCParser.NEWLINE, 0);
3028
+ }
3029
+ block() {
3030
+ return this.getTypedRuleContext(BlockContext, 0);
3031
+ }
3032
+ COMMA_list() {
3033
+ return this.getTokens(PSCParser.COMMA);
3034
+ }
3035
+ COMMA(i) {
3036
+ return this.getToken(PSCParser.COMMA, i);
3037
+ }
3038
+ get ruleIndex() {
3039
+ return PSCParser.RULE_subprogram;
3040
+ }
3041
+ // @Override
3042
+ accept(visitor) {
3043
+ if (visitor.visitSubprogram) {
3044
+ return visitor.visitSubprogram(this);
3045
+ }
3046
+ else {
3047
+ return visitor.visitChildren(this);
3048
+ }
3049
+ }
3050
+ }
3051
+ export class ReturnStmtContext extends ParserRuleContext {
3052
+ constructor(parser, parent, invokingState) {
3053
+ super(parent, invokingState);
3054
+ this.parser = parser;
3055
+ }
3056
+ RETURN() {
3057
+ return this.getToken(PSCParser.RETURN, 0);
3058
+ }
3059
+ expr() {
3060
+ return this.getTypedRuleContext(ExprContext, 0);
3061
+ }
3062
+ get ruleIndex() {
3063
+ return PSCParser.RULE_returnStmt;
3064
+ }
3065
+ // @Override
3066
+ accept(visitor) {
3067
+ if (visitor.visitReturnStmt) {
3068
+ return visitor.visitReturnStmt(this);
3069
+ }
3070
+ else {
3071
+ return visitor.visitChildren(this);
3072
+ }
3073
+ }
3074
+ }
3075
+ //# sourceMappingURL=PSCParser.js.map