@plurnk/plurnk-mimetypes-text-lua 0.1.0

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