blend-r 1.1.6 → 1.1.7

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,1149 @@
1
+ "use strict";
2
+ // Generated from src/grammar/BlendApi.g4 by ANTLR 4.9.0-SNAPSHOT
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.PrimitiveTypeContext = exports.TypeContext = exports.FieldContext = exports.DirectOutputDefenitionContext = exports.OutputDefinitionContext = exports.InputDefinitionContext = exports.StoreContext = exports.AuthenticatedContext = exports.ApiDefinitionContext = exports.ModuleDefinitionContext = exports.SectionDefinitionContext = exports.ProgramContext = exports.BlendApiParser = void 0;
38
+ const ATNDeserializer_1 = require("antlr4ts/atn/ATNDeserializer");
39
+ const FailedPredicateException_1 = require("antlr4ts/FailedPredicateException");
40
+ const Parser_1 = require("antlr4ts/Parser");
41
+ const ParserRuleContext_1 = require("antlr4ts/ParserRuleContext");
42
+ const ParserATNSimulator_1 = require("antlr4ts/atn/ParserATNSimulator");
43
+ const RecognitionException_1 = require("antlr4ts/RecognitionException");
44
+ const Token_1 = require("antlr4ts/Token");
45
+ const VocabularyImpl_1 = require("antlr4ts/VocabularyImpl");
46
+ const Utils = __importStar(require("antlr4ts/misc/Utils"));
47
+ class BlendApiParser extends Parser_1.Parser {
48
+ // @Override
49
+ // @NotNull
50
+ get vocabulary() {
51
+ return BlendApiParser.VOCABULARY;
52
+ }
53
+ // tslint:enable:no-trailing-whitespace
54
+ // @Override
55
+ get grammarFileName() { return "BlendApi.g4"; }
56
+ // @Override
57
+ get ruleNames() { return BlendApiParser.ruleNames; }
58
+ // @Override
59
+ get serializedATN() { return BlendApiParser._serializedATN; }
60
+ createFailedPredicateException(predicate, message) {
61
+ return new FailedPredicateException_1.FailedPredicateException(this, predicate, message);
62
+ }
63
+ constructor(input) {
64
+ super(input);
65
+ this._interp = new ParserATNSimulator_1.ParserATNSimulator(BlendApiParser._ATN, this);
66
+ }
67
+ // @RuleVersion(0)
68
+ program() {
69
+ let _localctx = new ProgramContext(this._ctx, this.state);
70
+ this.enterRule(_localctx, 0, BlendApiParser.RULE_program);
71
+ let _la;
72
+ try {
73
+ this.enterOuterAlt(_localctx, 1);
74
+ {
75
+ this.state = 24;
76
+ this.moduleDefinition();
77
+ this.state = 28;
78
+ this._errHandler.sync(this);
79
+ _la = this._input.LA(1);
80
+ while (_la === BlendApiParser.T__0) {
81
+ {
82
+ {
83
+ this.state = 25;
84
+ this.sectionDefinition();
85
+ }
86
+ }
87
+ this.state = 30;
88
+ this._errHandler.sync(this);
89
+ _la = this._input.LA(1);
90
+ }
91
+ }
92
+ }
93
+ catch (re) {
94
+ if (re instanceof RecognitionException_1.RecognitionException) {
95
+ _localctx.exception = re;
96
+ this._errHandler.reportError(this, re);
97
+ this._errHandler.recover(this, re);
98
+ }
99
+ else {
100
+ throw re;
101
+ }
102
+ }
103
+ finally {
104
+ this.exitRule();
105
+ }
106
+ return _localctx;
107
+ }
108
+ // @RuleVersion(0)
109
+ sectionDefinition() {
110
+ let _localctx = new SectionDefinitionContext(this._ctx, this.state);
111
+ this.enterRule(_localctx, 2, BlendApiParser.RULE_sectionDefinition);
112
+ let _la;
113
+ try {
114
+ this.enterOuterAlt(_localctx, 1);
115
+ {
116
+ this.state = 31;
117
+ this.match(BlendApiParser.T__0);
118
+ this.state = 32;
119
+ this.match(BlendApiParser.CAPITAL_IDENTIFIER);
120
+ this.state = 33;
121
+ this.match(BlendApiParser.T__1);
122
+ this.state = 37;
123
+ this._errHandler.sync(this);
124
+ _la = this._input.LA(1);
125
+ while (_la === BlendApiParser.T__4) {
126
+ {
127
+ {
128
+ this.state = 34;
129
+ this.apiDefinition();
130
+ }
131
+ }
132
+ this.state = 39;
133
+ this._errHandler.sync(this);
134
+ _la = this._input.LA(1);
135
+ }
136
+ this.state = 40;
137
+ this.match(BlendApiParser.T__2);
138
+ }
139
+ }
140
+ catch (re) {
141
+ if (re instanceof RecognitionException_1.RecognitionException) {
142
+ _localctx.exception = re;
143
+ this._errHandler.reportError(this, re);
144
+ this._errHandler.recover(this, re);
145
+ }
146
+ else {
147
+ throw re;
148
+ }
149
+ }
150
+ finally {
151
+ this.exitRule();
152
+ }
153
+ return _localctx;
154
+ }
155
+ // @RuleVersion(0)
156
+ moduleDefinition() {
157
+ let _localctx = new ModuleDefinitionContext(this._ctx, this.state);
158
+ this.enterRule(_localctx, 4, BlendApiParser.RULE_moduleDefinition);
159
+ try {
160
+ this.enterOuterAlt(_localctx, 1);
161
+ {
162
+ this.state = 42;
163
+ this.match(BlendApiParser.T__3);
164
+ this.state = 43;
165
+ this.match(BlendApiParser.CAPITAL_IDENTIFIER);
166
+ }
167
+ }
168
+ catch (re) {
169
+ if (re instanceof RecognitionException_1.RecognitionException) {
170
+ _localctx.exception = re;
171
+ this._errHandler.reportError(this, re);
172
+ this._errHandler.recover(this, re);
173
+ }
174
+ else {
175
+ throw re;
176
+ }
177
+ }
178
+ finally {
179
+ this.exitRule();
180
+ }
181
+ return _localctx;
182
+ }
183
+ // @RuleVersion(0)
184
+ apiDefinition() {
185
+ let _localctx = new ApiDefinitionContext(this._ctx, this.state);
186
+ this.enterRule(_localctx, 6, BlendApiParser.RULE_apiDefinition);
187
+ let _la;
188
+ try {
189
+ this.enterOuterAlt(_localctx, 1);
190
+ {
191
+ this.state = 45;
192
+ this.match(BlendApiParser.T__4);
193
+ this.state = 46;
194
+ this.match(BlendApiParser.IDENTIFIER);
195
+ this.state = 47;
196
+ this.match(BlendApiParser.T__5);
197
+ this.state = 48;
198
+ this.match(BlendApiParser.HTTP_METHOD);
199
+ this.state = 49;
200
+ this.match(BlendApiParser.T__6);
201
+ this.state = 50;
202
+ this.match(BlendApiParser.URL_IDENTIFIER);
203
+ this.state = 51;
204
+ this.match(BlendApiParser.T__1);
205
+ this.state = 53;
206
+ this._errHandler.sync(this);
207
+ _la = this._input.LA(1);
208
+ if (_la === BlendApiParser.T__7) {
209
+ {
210
+ this.state = 52;
211
+ this.authenticated();
212
+ }
213
+ }
214
+ this.state = 56;
215
+ this._errHandler.sync(this);
216
+ _la = this._input.LA(1);
217
+ if (_la === BlendApiParser.T__9) {
218
+ {
219
+ this.state = 55;
220
+ this.inputDefinition();
221
+ }
222
+ }
223
+ this.state = 59;
224
+ this._errHandler.sync(this);
225
+ _la = this._input.LA(1);
226
+ if (_la === BlendApiParser.T__11) {
227
+ {
228
+ this.state = 58;
229
+ this.outputDefinition();
230
+ }
231
+ }
232
+ this.state = 61;
233
+ this.match(BlendApiParser.T__2);
234
+ }
235
+ }
236
+ catch (re) {
237
+ if (re instanceof RecognitionException_1.RecognitionException) {
238
+ _localctx.exception = re;
239
+ this._errHandler.reportError(this, re);
240
+ this._errHandler.recover(this, re);
241
+ }
242
+ else {
243
+ throw re;
244
+ }
245
+ }
246
+ finally {
247
+ this.exitRule();
248
+ }
249
+ return _localctx;
250
+ }
251
+ // @RuleVersion(0)
252
+ authenticated() {
253
+ let _localctx = new AuthenticatedContext(this._ctx, this.state);
254
+ this.enterRule(_localctx, 8, BlendApiParser.RULE_authenticated);
255
+ try {
256
+ this.enterOuterAlt(_localctx, 1);
257
+ {
258
+ this.state = 63;
259
+ this.match(BlendApiParser.T__7);
260
+ }
261
+ }
262
+ catch (re) {
263
+ if (re instanceof RecognitionException_1.RecognitionException) {
264
+ _localctx.exception = re;
265
+ this._errHandler.reportError(this, re);
266
+ this._errHandler.recover(this, re);
267
+ }
268
+ else {
269
+ throw re;
270
+ }
271
+ }
272
+ finally {
273
+ this.exitRule();
274
+ }
275
+ return _localctx;
276
+ }
277
+ // @RuleVersion(0)
278
+ store() {
279
+ let _localctx = new StoreContext(this._ctx, this.state);
280
+ this.enterRule(_localctx, 10, BlendApiParser.RULE_store);
281
+ try {
282
+ this.enterOuterAlt(_localctx, 1);
283
+ {
284
+ this.state = 65;
285
+ this.match(BlendApiParser.T__8);
286
+ }
287
+ }
288
+ catch (re) {
289
+ if (re instanceof RecognitionException_1.RecognitionException) {
290
+ _localctx.exception = re;
291
+ this._errHandler.reportError(this, re);
292
+ this._errHandler.recover(this, re);
293
+ }
294
+ else {
295
+ throw re;
296
+ }
297
+ }
298
+ finally {
299
+ this.exitRule();
300
+ }
301
+ return _localctx;
302
+ }
303
+ // @RuleVersion(0)
304
+ inputDefinition() {
305
+ let _localctx = new InputDefinitionContext(this._ctx, this.state);
306
+ this.enterRule(_localctx, 12, BlendApiParser.RULE_inputDefinition);
307
+ let _la;
308
+ try {
309
+ this.enterOuterAlt(_localctx, 1);
310
+ {
311
+ this.state = 67;
312
+ this.match(BlendApiParser.T__9);
313
+ this.state = 68;
314
+ this.field();
315
+ this.state = 73;
316
+ this._errHandler.sync(this);
317
+ _la = this._input.LA(1);
318
+ while (_la === BlendApiParser.T__10) {
319
+ {
320
+ {
321
+ this.state = 69;
322
+ this.match(BlendApiParser.T__10);
323
+ this.state = 70;
324
+ this.field();
325
+ }
326
+ }
327
+ this.state = 75;
328
+ this._errHandler.sync(this);
329
+ _la = this._input.LA(1);
330
+ }
331
+ this.state = 76;
332
+ this.match(BlendApiParser.T__6);
333
+ this.state = 78;
334
+ this._errHandler.sync(this);
335
+ _la = this._input.LA(1);
336
+ if (_la === BlendApiParser.T__8) {
337
+ {
338
+ this.state = 77;
339
+ this.store();
340
+ }
341
+ }
342
+ }
343
+ }
344
+ catch (re) {
345
+ if (re instanceof RecognitionException_1.RecognitionException) {
346
+ _localctx.exception = re;
347
+ this._errHandler.reportError(this, re);
348
+ this._errHandler.recover(this, re);
349
+ }
350
+ else {
351
+ throw re;
352
+ }
353
+ }
354
+ finally {
355
+ this.exitRule();
356
+ }
357
+ return _localctx;
358
+ }
359
+ // @RuleVersion(0)
360
+ outputDefinition() {
361
+ let _localctx = new OutputDefinitionContext(this._ctx, this.state);
362
+ this.enterRule(_localctx, 14, BlendApiParser.RULE_outputDefinition);
363
+ let _la;
364
+ try {
365
+ this.state = 95;
366
+ this._errHandler.sync(this);
367
+ switch (this.interpreter.adaptivePredict(this._input, 8, this._ctx)) {
368
+ case 1:
369
+ this.enterOuterAlt(_localctx, 1);
370
+ {
371
+ this.state = 80;
372
+ this.match(BlendApiParser.T__11);
373
+ this.state = 81;
374
+ this.field();
375
+ this.state = 86;
376
+ this._errHandler.sync(this);
377
+ _la = this._input.LA(1);
378
+ while (_la === BlendApiParser.T__10) {
379
+ {
380
+ {
381
+ this.state = 82;
382
+ this.match(BlendApiParser.T__10);
383
+ this.state = 83;
384
+ this.field();
385
+ }
386
+ }
387
+ this.state = 88;
388
+ this._errHandler.sync(this);
389
+ _la = this._input.LA(1);
390
+ }
391
+ this.state = 89;
392
+ this.match(BlendApiParser.T__6);
393
+ }
394
+ break;
395
+ case 2:
396
+ this.enterOuterAlt(_localctx, 2);
397
+ {
398
+ this.state = 91;
399
+ this.match(BlendApiParser.T__11);
400
+ this.state = 92;
401
+ this.directOutputDefenition();
402
+ this.state = 93;
403
+ this.match(BlendApiParser.T__6);
404
+ }
405
+ break;
406
+ }
407
+ }
408
+ catch (re) {
409
+ if (re instanceof RecognitionException_1.RecognitionException) {
410
+ _localctx.exception = re;
411
+ this._errHandler.reportError(this, re);
412
+ this._errHandler.recover(this, re);
413
+ }
414
+ else {
415
+ throw re;
416
+ }
417
+ }
418
+ finally {
419
+ this.exitRule();
420
+ }
421
+ return _localctx;
422
+ }
423
+ // @RuleVersion(0)
424
+ directOutputDefenition() {
425
+ let _localctx = new DirectOutputDefenitionContext(this._ctx, this.state);
426
+ this.enterRule(_localctx, 16, BlendApiParser.RULE_directOutputDefenition);
427
+ try {
428
+ this.enterOuterAlt(_localctx, 1);
429
+ {
430
+ this.state = 97;
431
+ this.type();
432
+ }
433
+ }
434
+ catch (re) {
435
+ if (re instanceof RecognitionException_1.RecognitionException) {
436
+ _localctx.exception = re;
437
+ this._errHandler.reportError(this, re);
438
+ this._errHandler.recover(this, re);
439
+ }
440
+ else {
441
+ throw re;
442
+ }
443
+ }
444
+ finally {
445
+ this.exitRule();
446
+ }
447
+ return _localctx;
448
+ }
449
+ // @RuleVersion(0)
450
+ field() {
451
+ let _localctx = new FieldContext(this._ctx, this.state);
452
+ this.enterRule(_localctx, 18, BlendApiParser.RULE_field);
453
+ let _la;
454
+ try {
455
+ this.enterOuterAlt(_localctx, 1);
456
+ {
457
+ this.state = 99;
458
+ _la = this._input.LA(1);
459
+ if (!(_la === BlendApiParser.IDENTIFIER || _la === BlendApiParser.CAPITAL_IDENTIFIER)) {
460
+ this._errHandler.recoverInline(this);
461
+ }
462
+ else {
463
+ if (this._input.LA(1) === Token_1.Token.EOF) {
464
+ this.matchedEOF = true;
465
+ }
466
+ this._errHandler.reportMatch(this);
467
+ this.consume();
468
+ }
469
+ this.state = 100;
470
+ this.match(BlendApiParser.T__12);
471
+ this.state = 101;
472
+ this.type();
473
+ }
474
+ }
475
+ catch (re) {
476
+ if (re instanceof RecognitionException_1.RecognitionException) {
477
+ _localctx.exception = re;
478
+ this._errHandler.reportError(this, re);
479
+ this._errHandler.recover(this, re);
480
+ }
481
+ else {
482
+ throw re;
483
+ }
484
+ }
485
+ finally {
486
+ this.exitRule();
487
+ }
488
+ return _localctx;
489
+ }
490
+ // @RuleVersion(0)
491
+ type() {
492
+ let _localctx = new TypeContext(this._ctx, this.state);
493
+ this.enterRule(_localctx, 20, BlendApiParser.RULE_type);
494
+ try {
495
+ this.state = 121;
496
+ this._errHandler.sync(this);
497
+ switch (this.interpreter.adaptivePredict(this._input, 9, this._ctx)) {
498
+ case 1:
499
+ this.enterOuterAlt(_localctx, 1);
500
+ {
501
+ this.state = 103;
502
+ this.primitiveType();
503
+ }
504
+ break;
505
+ case 2:
506
+ this.enterOuterAlt(_localctx, 2);
507
+ {
508
+ this.state = 104;
509
+ this.primitiveType();
510
+ this.state = 105;
511
+ this.match(BlendApiParser.T__13);
512
+ }
513
+ break;
514
+ case 3:
515
+ this.enterOuterAlt(_localctx, 3);
516
+ {
517
+ this.state = 107;
518
+ this.primitiveType();
519
+ this.state = 108;
520
+ this.match(BlendApiParser.T__14);
521
+ }
522
+ break;
523
+ case 4:
524
+ this.enterOuterAlt(_localctx, 4);
525
+ {
526
+ this.state = 110;
527
+ this.match(BlendApiParser.CAPITAL_IDENTIFIER);
528
+ this.state = 111;
529
+ this.match(BlendApiParser.T__15);
530
+ this.state = 112;
531
+ this.match(BlendApiParser.CAPITAL_IDENTIFIER);
532
+ }
533
+ break;
534
+ case 5:
535
+ this.enterOuterAlt(_localctx, 5);
536
+ {
537
+ this.state = 113;
538
+ this.match(BlendApiParser.CAPITAL_IDENTIFIER);
539
+ this.state = 114;
540
+ this.match(BlendApiParser.T__15);
541
+ this.state = 115;
542
+ this.match(BlendApiParser.CAPITAL_IDENTIFIER);
543
+ this.state = 116;
544
+ this.match(BlendApiParser.T__14);
545
+ }
546
+ break;
547
+ case 6:
548
+ this.enterOuterAlt(_localctx, 6);
549
+ {
550
+ this.state = 117;
551
+ this.match(BlendApiParser.CAPITAL_IDENTIFIER);
552
+ this.state = 118;
553
+ this.match(BlendApiParser.T__15);
554
+ this.state = 119;
555
+ this.match(BlendApiParser.CAPITAL_IDENTIFIER);
556
+ this.state = 120;
557
+ this.match(BlendApiParser.T__13);
558
+ }
559
+ break;
560
+ }
561
+ }
562
+ catch (re) {
563
+ if (re instanceof RecognitionException_1.RecognitionException) {
564
+ _localctx.exception = re;
565
+ this._errHandler.reportError(this, re);
566
+ this._errHandler.recover(this, re);
567
+ }
568
+ else {
569
+ throw re;
570
+ }
571
+ }
572
+ finally {
573
+ this.exitRule();
574
+ }
575
+ return _localctx;
576
+ }
577
+ // @RuleVersion(0)
578
+ primitiveType() {
579
+ let _localctx = new PrimitiveTypeContext(this._ctx, this.state);
580
+ this.enterRule(_localctx, 22, BlendApiParser.RULE_primitiveType);
581
+ let _la;
582
+ try {
583
+ this.enterOuterAlt(_localctx, 1);
584
+ {
585
+ this.state = 123;
586
+ _la = this._input.LA(1);
587
+ if (!((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << BlendApiParser.T__16) | (1 << BlendApiParser.T__17) | (1 << BlendApiParser.T__18) | (1 << BlendApiParser.T__19) | (1 << BlendApiParser.T__20))) !== 0))) {
588
+ this._errHandler.recoverInline(this);
589
+ }
590
+ else {
591
+ if (this._input.LA(1) === Token_1.Token.EOF) {
592
+ this.matchedEOF = true;
593
+ }
594
+ this._errHandler.reportMatch(this);
595
+ this.consume();
596
+ }
597
+ }
598
+ }
599
+ catch (re) {
600
+ if (re instanceof RecognitionException_1.RecognitionException) {
601
+ _localctx.exception = re;
602
+ this._errHandler.reportError(this, re);
603
+ this._errHandler.recover(this, re);
604
+ }
605
+ else {
606
+ throw re;
607
+ }
608
+ }
609
+ finally {
610
+ this.exitRule();
611
+ }
612
+ return _localctx;
613
+ }
614
+ static get _ATN() {
615
+ if (!BlendApiParser.__ATN) {
616
+ BlendApiParser.__ATN = new ATNDeserializer_1.ATNDeserializer().deserialize(Utils.toCharArray(BlendApiParser._serializedATN));
617
+ }
618
+ return BlendApiParser.__ATN;
619
+ }
620
+ }
621
+ exports.BlendApiParser = BlendApiParser;
622
+ BlendApiParser.T__0 = 1;
623
+ BlendApiParser.T__1 = 2;
624
+ BlendApiParser.T__2 = 3;
625
+ BlendApiParser.T__3 = 4;
626
+ BlendApiParser.T__4 = 5;
627
+ BlendApiParser.T__5 = 6;
628
+ BlendApiParser.T__6 = 7;
629
+ BlendApiParser.T__7 = 8;
630
+ BlendApiParser.T__8 = 9;
631
+ BlendApiParser.T__9 = 10;
632
+ BlendApiParser.T__10 = 11;
633
+ BlendApiParser.T__11 = 12;
634
+ BlendApiParser.T__12 = 13;
635
+ BlendApiParser.T__13 = 14;
636
+ BlendApiParser.T__14 = 15;
637
+ BlendApiParser.T__15 = 16;
638
+ BlendApiParser.T__16 = 17;
639
+ BlendApiParser.T__17 = 18;
640
+ BlendApiParser.T__18 = 19;
641
+ BlendApiParser.T__19 = 20;
642
+ BlendApiParser.T__20 = 21;
643
+ BlendApiParser.HTTP_METHOD = 22;
644
+ BlendApiParser.IDENTIFIER = 23;
645
+ BlendApiParser.CAPITAL_IDENTIFIER = 24;
646
+ BlendApiParser.URL_IDENTIFIER = 25;
647
+ BlendApiParser.WS = 26;
648
+ BlendApiParser.RULE_program = 0;
649
+ BlendApiParser.RULE_sectionDefinition = 1;
650
+ BlendApiParser.RULE_moduleDefinition = 2;
651
+ BlendApiParser.RULE_apiDefinition = 3;
652
+ BlendApiParser.RULE_authenticated = 4;
653
+ BlendApiParser.RULE_store = 5;
654
+ BlendApiParser.RULE_inputDefinition = 6;
655
+ BlendApiParser.RULE_outputDefinition = 7;
656
+ BlendApiParser.RULE_directOutputDefenition = 8;
657
+ BlendApiParser.RULE_field = 9;
658
+ BlendApiParser.RULE_type = 10;
659
+ BlendApiParser.RULE_primitiveType = 11;
660
+ // tslint:disable:no-trailing-whitespace
661
+ BlendApiParser.ruleNames = [
662
+ "program", "sectionDefinition", "moduleDefinition", "apiDefinition", "authenticated",
663
+ "store", "inputDefinition", "outputDefinition", "directOutputDefenition",
664
+ "field", "type", "primitiveType",
665
+ ];
666
+ BlendApiParser._LITERAL_NAMES = [
667
+ undefined, "'section'", "'{'", "'}'", "'module'", "'api'", "'('", "')'",
668
+ "'authenticated'", "'store'", "'input('", "','", "'output('", "':'", "'[]'",
669
+ "'?'", "'->'", "'string'", "'number'", "'boolean'", "'any'", "'object'",
670
+ ];
671
+ BlendApiParser._SYMBOLIC_NAMES = [
672
+ undefined, undefined, undefined, undefined, undefined, undefined, undefined,
673
+ undefined, undefined, undefined, undefined, undefined, undefined, undefined,
674
+ undefined, undefined, undefined, undefined, undefined, undefined, undefined,
675
+ undefined, "HTTP_METHOD", "IDENTIFIER", "CAPITAL_IDENTIFIER", "URL_IDENTIFIER",
676
+ "WS",
677
+ ];
678
+ BlendApiParser.VOCABULARY = new VocabularyImpl_1.VocabularyImpl(BlendApiParser._LITERAL_NAMES, BlendApiParser._SYMBOLIC_NAMES, []);
679
+ BlendApiParser._serializedATN = "\x03\uC91D\uCABA\u058D\uAFBA\u4F53\u0607\uEA8B\uC241\x03\x1C\x80\x04\x02" +
680
+ "\t\x02\x04\x03\t\x03\x04\x04\t\x04\x04\x05\t\x05\x04\x06\t\x06\x04\x07" +
681
+ "\t\x07\x04\b\t\b\x04\t\t\t\x04\n\t\n\x04\v\t\v\x04\f\t\f\x04\r\t\r\x03" +
682
+ "\x02\x03\x02\x07\x02\x1D\n\x02\f\x02\x0E\x02 \v\x02\x03\x03\x03\x03\x03" +
683
+ "\x03\x03\x03\x07\x03&\n\x03\f\x03\x0E\x03)\v\x03\x03\x03\x03\x03\x03\x04" +
684
+ "\x03\x04\x03\x04\x03\x05\x03\x05\x03\x05\x03\x05\x03\x05\x03\x05\x03\x05" +
685
+ "\x03\x05\x05\x058\n\x05\x03\x05\x05\x05;\n\x05\x03\x05\x05\x05>\n\x05" +
686
+ "\x03\x05\x03\x05\x03\x06\x03\x06\x03\x07\x03\x07\x03\b\x03\b\x03\b\x03" +
687
+ "\b\x07\bJ\n\b\f\b\x0E\bM\v\b\x03\b\x03\b\x05\bQ\n\b\x03\t\x03\t\x03\t" +
688
+ "\x03\t\x07\tW\n\t\f\t\x0E\tZ\v\t\x03\t\x03\t\x03\t\x03\t\x03\t\x03\t\x05" +
689
+ "\tb\n\t\x03\n\x03\n\x03\v\x03\v\x03\v\x03\v\x03\f\x03\f\x03\f\x03\f\x03" +
690
+ "\f\x03\f\x03\f\x03\f\x03\f\x03\f\x03\f\x03\f\x03\f\x03\f\x03\f\x03\f\x03" +
691
+ "\f\x03\f\x05\f|\n\f\x03\r\x03\r\x03\r\x02\x02\x02\x0E\x02\x02\x04\x02" +
692
+ "\x06\x02\b\x02\n\x02\f\x02\x0E\x02\x10\x02\x12\x02\x14\x02\x16\x02\x18" +
693
+ "\x02\x02\x04\x03\x02\x19\x1A\x03\x02\x13\x17\x02\x81\x02\x1A\x03\x02\x02" +
694
+ "\x02\x04!\x03\x02\x02\x02\x06,\x03\x02\x02\x02\b/\x03\x02\x02\x02\nA\x03" +
695
+ "\x02\x02\x02\fC\x03\x02\x02\x02\x0EE\x03\x02\x02\x02\x10a\x03\x02\x02" +
696
+ "\x02\x12c\x03\x02\x02\x02\x14e\x03\x02\x02\x02\x16{\x03\x02\x02\x02\x18" +
697
+ "}\x03\x02\x02\x02\x1A\x1E\x05\x06\x04\x02\x1B\x1D\x05\x04\x03\x02\x1C" +
698
+ "\x1B\x03\x02\x02\x02\x1D \x03\x02\x02\x02\x1E\x1C\x03\x02\x02\x02\x1E" +
699
+ "\x1F\x03\x02\x02\x02\x1F\x03\x03\x02\x02\x02 \x1E\x03\x02\x02\x02!\"\x07" +
700
+ "\x03\x02\x02\"#\x07\x1A\x02\x02#\'\x07\x04\x02\x02$&\x05\b\x05\x02%$\x03" +
701
+ "\x02\x02\x02&)\x03\x02\x02\x02\'%\x03\x02\x02\x02\'(\x03\x02\x02\x02(" +
702
+ "*\x03\x02\x02\x02)\'\x03\x02\x02\x02*+\x07\x05\x02\x02+\x05\x03\x02\x02" +
703
+ "\x02,-\x07\x06\x02\x02-.\x07\x1A\x02\x02.\x07\x03\x02\x02\x02/0\x07\x07" +
704
+ "\x02\x0201\x07\x19\x02\x0212\x07\b\x02\x0223\x07\x18\x02\x0234\x07\t\x02" +
705
+ "\x0245\x07\x1B\x02\x0257\x07\x04\x02\x0268\x05\n\x06\x0276\x03\x02\x02" +
706
+ "\x0278\x03\x02\x02\x028:\x03\x02\x02\x029;\x05\x0E\b\x02:9\x03\x02\x02" +
707
+ "\x02:;\x03\x02\x02\x02;=\x03\x02\x02\x02<>\x05\x10\t\x02=<\x03\x02\x02" +
708
+ "\x02=>\x03\x02\x02\x02>?\x03\x02\x02\x02?@\x07\x05\x02\x02@\t\x03\x02" +
709
+ "\x02\x02AB\x07\n\x02\x02B\v\x03\x02\x02\x02CD\x07\v\x02\x02D\r\x03\x02" +
710
+ "\x02\x02EF\x07\f\x02\x02FK\x05\x14\v\x02GH\x07\r\x02\x02HJ\x05\x14\v\x02" +
711
+ "IG\x03\x02\x02\x02JM\x03\x02\x02\x02KI\x03\x02\x02\x02KL\x03\x02\x02\x02" +
712
+ "LN\x03\x02\x02\x02MK\x03\x02\x02\x02NP\x07\t\x02\x02OQ\x05\f\x07\x02P" +
713
+ "O\x03\x02\x02\x02PQ\x03\x02\x02\x02Q\x0F\x03\x02\x02\x02RS\x07\x0E\x02" +
714
+ "\x02SX\x05\x14\v\x02TU\x07\r\x02\x02UW\x05\x14\v\x02VT\x03\x02\x02\x02" +
715
+ "WZ\x03\x02\x02\x02XV\x03\x02\x02\x02XY\x03\x02\x02\x02Y[\x03\x02\x02\x02" +
716
+ "ZX\x03\x02\x02\x02[\\\x07\t\x02\x02\\b\x03\x02\x02\x02]^\x07\x0E\x02\x02" +
717
+ "^_\x05\x12\n\x02_`\x07\t\x02\x02`b\x03\x02\x02\x02aR\x03\x02\x02\x02a" +
718
+ "]\x03\x02\x02\x02b\x11\x03\x02\x02\x02cd\x05\x16\f\x02d\x13\x03\x02\x02" +
719
+ "\x02ef\t\x02\x02\x02fg\x07\x0F\x02\x02gh\x05\x16\f\x02h\x15\x03\x02\x02" +
720
+ "\x02i|\x05\x18\r\x02jk\x05\x18\r\x02kl\x07\x10\x02\x02l|\x03\x02\x02\x02" +
721
+ "mn\x05\x18\r\x02no\x07\x11\x02\x02o|\x03\x02\x02\x02pq\x07\x1A\x02\x02" +
722
+ "qr\x07\x12\x02\x02r|\x07\x1A\x02\x02st\x07\x1A\x02\x02tu\x07\x12\x02\x02" +
723
+ "uv\x07\x1A\x02\x02v|\x07\x11\x02\x02wx\x07\x1A\x02\x02xy\x07\x12\x02\x02" +
724
+ "yz\x07\x1A\x02\x02z|\x07\x10\x02\x02{i\x03\x02\x02\x02{j\x03\x02\x02\x02" +
725
+ "{m\x03\x02\x02\x02{p\x03\x02\x02\x02{s\x03\x02\x02\x02{w\x03\x02\x02\x02" +
726
+ "|\x17\x03\x02\x02\x02}~\t\x03\x02\x02~\x19\x03\x02\x02\x02\f\x1E\'7:=" +
727
+ "KPXa{";
728
+ class ProgramContext extends ParserRuleContext_1.ParserRuleContext {
729
+ moduleDefinition() {
730
+ return this.getRuleContext(0, ModuleDefinitionContext);
731
+ }
732
+ sectionDefinition(i) {
733
+ if (i === undefined) {
734
+ return this.getRuleContexts(SectionDefinitionContext);
735
+ }
736
+ else {
737
+ return this.getRuleContext(i, SectionDefinitionContext);
738
+ }
739
+ }
740
+ constructor(parent, invokingState) {
741
+ super(parent, invokingState);
742
+ }
743
+ // @Override
744
+ get ruleIndex() { return BlendApiParser.RULE_program; }
745
+ // @Override
746
+ enterRule(listener) {
747
+ if (listener.enterProgram) {
748
+ listener.enterProgram(this);
749
+ }
750
+ }
751
+ // @Override
752
+ exitRule(listener) {
753
+ if (listener.exitProgram) {
754
+ listener.exitProgram(this);
755
+ }
756
+ }
757
+ // @Override
758
+ accept(visitor) {
759
+ if (visitor.visitProgram) {
760
+ return visitor.visitProgram(this);
761
+ }
762
+ else {
763
+ return visitor.visitChildren(this);
764
+ }
765
+ }
766
+ }
767
+ exports.ProgramContext = ProgramContext;
768
+ class SectionDefinitionContext extends ParserRuleContext_1.ParserRuleContext {
769
+ CAPITAL_IDENTIFIER() { return this.getToken(BlendApiParser.CAPITAL_IDENTIFIER, 0); }
770
+ apiDefinition(i) {
771
+ if (i === undefined) {
772
+ return this.getRuleContexts(ApiDefinitionContext);
773
+ }
774
+ else {
775
+ return this.getRuleContext(i, ApiDefinitionContext);
776
+ }
777
+ }
778
+ constructor(parent, invokingState) {
779
+ super(parent, invokingState);
780
+ }
781
+ // @Override
782
+ get ruleIndex() { return BlendApiParser.RULE_sectionDefinition; }
783
+ // @Override
784
+ enterRule(listener) {
785
+ if (listener.enterSectionDefinition) {
786
+ listener.enterSectionDefinition(this);
787
+ }
788
+ }
789
+ // @Override
790
+ exitRule(listener) {
791
+ if (listener.exitSectionDefinition) {
792
+ listener.exitSectionDefinition(this);
793
+ }
794
+ }
795
+ // @Override
796
+ accept(visitor) {
797
+ if (visitor.visitSectionDefinition) {
798
+ return visitor.visitSectionDefinition(this);
799
+ }
800
+ else {
801
+ return visitor.visitChildren(this);
802
+ }
803
+ }
804
+ }
805
+ exports.SectionDefinitionContext = SectionDefinitionContext;
806
+ class ModuleDefinitionContext extends ParserRuleContext_1.ParserRuleContext {
807
+ CAPITAL_IDENTIFIER() { return this.getToken(BlendApiParser.CAPITAL_IDENTIFIER, 0); }
808
+ constructor(parent, invokingState) {
809
+ super(parent, invokingState);
810
+ }
811
+ // @Override
812
+ get ruleIndex() { return BlendApiParser.RULE_moduleDefinition; }
813
+ // @Override
814
+ enterRule(listener) {
815
+ if (listener.enterModuleDefinition) {
816
+ listener.enterModuleDefinition(this);
817
+ }
818
+ }
819
+ // @Override
820
+ exitRule(listener) {
821
+ if (listener.exitModuleDefinition) {
822
+ listener.exitModuleDefinition(this);
823
+ }
824
+ }
825
+ // @Override
826
+ accept(visitor) {
827
+ if (visitor.visitModuleDefinition) {
828
+ return visitor.visitModuleDefinition(this);
829
+ }
830
+ else {
831
+ return visitor.visitChildren(this);
832
+ }
833
+ }
834
+ }
835
+ exports.ModuleDefinitionContext = ModuleDefinitionContext;
836
+ class ApiDefinitionContext extends ParserRuleContext_1.ParserRuleContext {
837
+ IDENTIFIER() { return this.getToken(BlendApiParser.IDENTIFIER, 0); }
838
+ HTTP_METHOD() { return this.getToken(BlendApiParser.HTTP_METHOD, 0); }
839
+ URL_IDENTIFIER() { return this.getToken(BlendApiParser.URL_IDENTIFIER, 0); }
840
+ authenticated() {
841
+ return this.tryGetRuleContext(0, AuthenticatedContext);
842
+ }
843
+ inputDefinition() {
844
+ return this.tryGetRuleContext(0, InputDefinitionContext);
845
+ }
846
+ outputDefinition() {
847
+ return this.tryGetRuleContext(0, OutputDefinitionContext);
848
+ }
849
+ constructor(parent, invokingState) {
850
+ super(parent, invokingState);
851
+ }
852
+ // @Override
853
+ get ruleIndex() { return BlendApiParser.RULE_apiDefinition; }
854
+ // @Override
855
+ enterRule(listener) {
856
+ if (listener.enterApiDefinition) {
857
+ listener.enterApiDefinition(this);
858
+ }
859
+ }
860
+ // @Override
861
+ exitRule(listener) {
862
+ if (listener.exitApiDefinition) {
863
+ listener.exitApiDefinition(this);
864
+ }
865
+ }
866
+ // @Override
867
+ accept(visitor) {
868
+ if (visitor.visitApiDefinition) {
869
+ return visitor.visitApiDefinition(this);
870
+ }
871
+ else {
872
+ return visitor.visitChildren(this);
873
+ }
874
+ }
875
+ }
876
+ exports.ApiDefinitionContext = ApiDefinitionContext;
877
+ class AuthenticatedContext extends ParserRuleContext_1.ParserRuleContext {
878
+ constructor(parent, invokingState) {
879
+ super(parent, invokingState);
880
+ }
881
+ // @Override
882
+ get ruleIndex() { return BlendApiParser.RULE_authenticated; }
883
+ // @Override
884
+ enterRule(listener) {
885
+ if (listener.enterAuthenticated) {
886
+ listener.enterAuthenticated(this);
887
+ }
888
+ }
889
+ // @Override
890
+ exitRule(listener) {
891
+ if (listener.exitAuthenticated) {
892
+ listener.exitAuthenticated(this);
893
+ }
894
+ }
895
+ // @Override
896
+ accept(visitor) {
897
+ if (visitor.visitAuthenticated) {
898
+ return visitor.visitAuthenticated(this);
899
+ }
900
+ else {
901
+ return visitor.visitChildren(this);
902
+ }
903
+ }
904
+ }
905
+ exports.AuthenticatedContext = AuthenticatedContext;
906
+ class StoreContext extends ParserRuleContext_1.ParserRuleContext {
907
+ constructor(parent, invokingState) {
908
+ super(parent, invokingState);
909
+ }
910
+ // @Override
911
+ get ruleIndex() { return BlendApiParser.RULE_store; }
912
+ // @Override
913
+ enterRule(listener) {
914
+ if (listener.enterStore) {
915
+ listener.enterStore(this);
916
+ }
917
+ }
918
+ // @Override
919
+ exitRule(listener) {
920
+ if (listener.exitStore) {
921
+ listener.exitStore(this);
922
+ }
923
+ }
924
+ // @Override
925
+ accept(visitor) {
926
+ if (visitor.visitStore) {
927
+ return visitor.visitStore(this);
928
+ }
929
+ else {
930
+ return visitor.visitChildren(this);
931
+ }
932
+ }
933
+ }
934
+ exports.StoreContext = StoreContext;
935
+ class InputDefinitionContext extends ParserRuleContext_1.ParserRuleContext {
936
+ field(i) {
937
+ if (i === undefined) {
938
+ return this.getRuleContexts(FieldContext);
939
+ }
940
+ else {
941
+ return this.getRuleContext(i, FieldContext);
942
+ }
943
+ }
944
+ store() {
945
+ return this.tryGetRuleContext(0, StoreContext);
946
+ }
947
+ constructor(parent, invokingState) {
948
+ super(parent, invokingState);
949
+ }
950
+ // @Override
951
+ get ruleIndex() { return BlendApiParser.RULE_inputDefinition; }
952
+ // @Override
953
+ enterRule(listener) {
954
+ if (listener.enterInputDefinition) {
955
+ listener.enterInputDefinition(this);
956
+ }
957
+ }
958
+ // @Override
959
+ exitRule(listener) {
960
+ if (listener.exitInputDefinition) {
961
+ listener.exitInputDefinition(this);
962
+ }
963
+ }
964
+ // @Override
965
+ accept(visitor) {
966
+ if (visitor.visitInputDefinition) {
967
+ return visitor.visitInputDefinition(this);
968
+ }
969
+ else {
970
+ return visitor.visitChildren(this);
971
+ }
972
+ }
973
+ }
974
+ exports.InputDefinitionContext = InputDefinitionContext;
975
+ class OutputDefinitionContext extends ParserRuleContext_1.ParserRuleContext {
976
+ field(i) {
977
+ if (i === undefined) {
978
+ return this.getRuleContexts(FieldContext);
979
+ }
980
+ else {
981
+ return this.getRuleContext(i, FieldContext);
982
+ }
983
+ }
984
+ directOutputDefenition() {
985
+ return this.tryGetRuleContext(0, DirectOutputDefenitionContext);
986
+ }
987
+ constructor(parent, invokingState) {
988
+ super(parent, invokingState);
989
+ }
990
+ // @Override
991
+ get ruleIndex() { return BlendApiParser.RULE_outputDefinition; }
992
+ // @Override
993
+ enterRule(listener) {
994
+ if (listener.enterOutputDefinition) {
995
+ listener.enterOutputDefinition(this);
996
+ }
997
+ }
998
+ // @Override
999
+ exitRule(listener) {
1000
+ if (listener.exitOutputDefinition) {
1001
+ listener.exitOutputDefinition(this);
1002
+ }
1003
+ }
1004
+ // @Override
1005
+ accept(visitor) {
1006
+ if (visitor.visitOutputDefinition) {
1007
+ return visitor.visitOutputDefinition(this);
1008
+ }
1009
+ else {
1010
+ return visitor.visitChildren(this);
1011
+ }
1012
+ }
1013
+ }
1014
+ exports.OutputDefinitionContext = OutputDefinitionContext;
1015
+ class DirectOutputDefenitionContext extends ParserRuleContext_1.ParserRuleContext {
1016
+ type() {
1017
+ return this.getRuleContext(0, TypeContext);
1018
+ }
1019
+ constructor(parent, invokingState) {
1020
+ super(parent, invokingState);
1021
+ }
1022
+ // @Override
1023
+ get ruleIndex() { return BlendApiParser.RULE_directOutputDefenition; }
1024
+ // @Override
1025
+ enterRule(listener) {
1026
+ if (listener.enterDirectOutputDefenition) {
1027
+ listener.enterDirectOutputDefenition(this);
1028
+ }
1029
+ }
1030
+ // @Override
1031
+ exitRule(listener) {
1032
+ if (listener.exitDirectOutputDefenition) {
1033
+ listener.exitDirectOutputDefenition(this);
1034
+ }
1035
+ }
1036
+ // @Override
1037
+ accept(visitor) {
1038
+ if (visitor.visitDirectOutputDefenition) {
1039
+ return visitor.visitDirectOutputDefenition(this);
1040
+ }
1041
+ else {
1042
+ return visitor.visitChildren(this);
1043
+ }
1044
+ }
1045
+ }
1046
+ exports.DirectOutputDefenitionContext = DirectOutputDefenitionContext;
1047
+ class FieldContext extends ParserRuleContext_1.ParserRuleContext {
1048
+ type() {
1049
+ return this.getRuleContext(0, TypeContext);
1050
+ }
1051
+ IDENTIFIER() { return this.tryGetToken(BlendApiParser.IDENTIFIER, 0); }
1052
+ CAPITAL_IDENTIFIER() { return this.tryGetToken(BlendApiParser.CAPITAL_IDENTIFIER, 0); }
1053
+ constructor(parent, invokingState) {
1054
+ super(parent, invokingState);
1055
+ }
1056
+ // @Override
1057
+ get ruleIndex() { return BlendApiParser.RULE_field; }
1058
+ // @Override
1059
+ enterRule(listener) {
1060
+ if (listener.enterField) {
1061
+ listener.enterField(this);
1062
+ }
1063
+ }
1064
+ // @Override
1065
+ exitRule(listener) {
1066
+ if (listener.exitField) {
1067
+ listener.exitField(this);
1068
+ }
1069
+ }
1070
+ // @Override
1071
+ accept(visitor) {
1072
+ if (visitor.visitField) {
1073
+ return visitor.visitField(this);
1074
+ }
1075
+ else {
1076
+ return visitor.visitChildren(this);
1077
+ }
1078
+ }
1079
+ }
1080
+ exports.FieldContext = FieldContext;
1081
+ class TypeContext extends ParserRuleContext_1.ParserRuleContext {
1082
+ primitiveType() {
1083
+ return this.tryGetRuleContext(0, PrimitiveTypeContext);
1084
+ }
1085
+ CAPITAL_IDENTIFIER(i) {
1086
+ if (i === undefined) {
1087
+ return this.getTokens(BlendApiParser.CAPITAL_IDENTIFIER);
1088
+ }
1089
+ else {
1090
+ return this.getToken(BlendApiParser.CAPITAL_IDENTIFIER, i);
1091
+ }
1092
+ }
1093
+ constructor(parent, invokingState) {
1094
+ super(parent, invokingState);
1095
+ }
1096
+ // @Override
1097
+ get ruleIndex() { return BlendApiParser.RULE_type; }
1098
+ // @Override
1099
+ enterRule(listener) {
1100
+ if (listener.enterType) {
1101
+ listener.enterType(this);
1102
+ }
1103
+ }
1104
+ // @Override
1105
+ exitRule(listener) {
1106
+ if (listener.exitType) {
1107
+ listener.exitType(this);
1108
+ }
1109
+ }
1110
+ // @Override
1111
+ accept(visitor) {
1112
+ if (visitor.visitType) {
1113
+ return visitor.visitType(this);
1114
+ }
1115
+ else {
1116
+ return visitor.visitChildren(this);
1117
+ }
1118
+ }
1119
+ }
1120
+ exports.TypeContext = TypeContext;
1121
+ class PrimitiveTypeContext extends ParserRuleContext_1.ParserRuleContext {
1122
+ constructor(parent, invokingState) {
1123
+ super(parent, invokingState);
1124
+ }
1125
+ // @Override
1126
+ get ruleIndex() { return BlendApiParser.RULE_primitiveType; }
1127
+ // @Override
1128
+ enterRule(listener) {
1129
+ if (listener.enterPrimitiveType) {
1130
+ listener.enterPrimitiveType(this);
1131
+ }
1132
+ }
1133
+ // @Override
1134
+ exitRule(listener) {
1135
+ if (listener.exitPrimitiveType) {
1136
+ listener.exitPrimitiveType(this);
1137
+ }
1138
+ }
1139
+ // @Override
1140
+ accept(visitor) {
1141
+ if (visitor.visitPrimitiveType) {
1142
+ return visitor.visitPrimitiveType(this);
1143
+ }
1144
+ else {
1145
+ return visitor.visitChildren(this);
1146
+ }
1147
+ }
1148
+ }
1149
+ exports.PrimitiveTypeContext = PrimitiveTypeContext;