blend-r 1.1.6

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.
Files changed (30) hide show
  1. package/README.md +213 -0
  2. package/dist/helper/ApiHelper.js +766 -0
  3. package/dist/helper/BasicHelper.js +43 -0
  4. package/dist/helper/DataHelper.js +231 -0
  5. package/dist/helper/FrontEndHelper.js +201 -0
  6. package/dist/helper/fileHelper.js +127 -0
  7. package/dist/helper/grammarHelper/BlendApiGrammarHelper.js +90 -0
  8. package/dist/helper/grammarHelper/BlendBasicGrammarHelper.js +135 -0
  9. package/dist/helper/grammarHelper/BlendDataGrammarHelper.js +47 -0
  10. package/dist/helper/grammarHelper/GrammarErrorHelper.js +16 -0
  11. package/dist/index.js +87 -0
  12. package/dist/parser/blendApi/src/grammar/BlendApiLexer.js +207 -0
  13. package/dist/parser/blendApi/src/grammar/BlendApiListener.js +3 -0
  14. package/dist/parser/blendApi/src/grammar/BlendApiParser.js +978 -0
  15. package/dist/parser/blendData/src/grammar/BlendDataLexer.js +154 -0
  16. package/dist/parser/blendData/src/grammar/BlendDataListener.js +3 -0
  17. package/dist/parser/blendData/src/grammar/BlendDataParser.js +642 -0
  18. package/dist/parser/blendRBasic/src/grammar/BlendRBasicListener.js +3 -0
  19. package/dist/parser/blendRBasic/src/grammar/blendRBasicLexer.js +184 -0
  20. package/dist/parser/blendRBasic/src/grammar/blendRBasicParser.js +993 -0
  21. package/dist/parser/blendRnBasic/src/grammar/BlendRnBasicLexer.js +214 -0
  22. package/dist/parser/blendRnBasic/src/grammar/BlendRnBasicListener.js +3 -0
  23. package/dist/parser/blendRnBasic/src/grammar/BlendRnBasicParser.js +1224 -0
  24. package/dist/types/apiOperationTypes.js +20 -0
  25. package/dist/types/basicOperationTypes.js +3 -0
  26. package/dist/types/dataOperationTypes.js +2 -0
  27. package/dist/types/frontendOperationTypes.js +4 -0
  28. package/dist/types/generalTypes.js +0 -0
  29. package/dist/types/mongoOperationTypes.js +12 -0
  30. package/package.json +36 -0
@@ -0,0 +1,978 @@
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.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 = 22;
76
+ this.moduleDefinition();
77
+ this.state = 26;
78
+ this._errHandler.sync(this);
79
+ _la = this._input.LA(1);
80
+ while (_la === BlendApiParser.T__0) {
81
+ {
82
+ {
83
+ this.state = 23;
84
+ this.sectionDefinition();
85
+ }
86
+ }
87
+ this.state = 28;
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 = 29;
117
+ this.match(BlendApiParser.T__0);
118
+ this.state = 30;
119
+ this.match(BlendApiParser.CAPITAL_IDENTIFIER);
120
+ this.state = 31;
121
+ this.match(BlendApiParser.T__1);
122
+ this.state = 35;
123
+ this._errHandler.sync(this);
124
+ _la = this._input.LA(1);
125
+ while (_la === BlendApiParser.T__4) {
126
+ {
127
+ {
128
+ this.state = 32;
129
+ this.apiDefinition();
130
+ }
131
+ }
132
+ this.state = 37;
133
+ this._errHandler.sync(this);
134
+ _la = this._input.LA(1);
135
+ }
136
+ this.state = 38;
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 = 40;
163
+ this.match(BlendApiParser.T__3);
164
+ this.state = 41;
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 = 43;
192
+ this.match(BlendApiParser.T__4);
193
+ this.state = 44;
194
+ this.match(BlendApiParser.IDENTIFIER);
195
+ this.state = 45;
196
+ this.match(BlendApiParser.T__5);
197
+ this.state = 46;
198
+ this.match(BlendApiParser.HTTP_METHOD);
199
+ this.state = 47;
200
+ this.match(BlendApiParser.T__6);
201
+ this.state = 48;
202
+ this.match(BlendApiParser.URL_IDENTIFIER);
203
+ this.state = 49;
204
+ this.match(BlendApiParser.T__1);
205
+ this.state = 51;
206
+ this._errHandler.sync(this);
207
+ _la = this._input.LA(1);
208
+ if (_la === BlendApiParser.T__7) {
209
+ {
210
+ this.state = 50;
211
+ this.authenticated();
212
+ }
213
+ }
214
+ this.state = 54;
215
+ this._errHandler.sync(this);
216
+ _la = this._input.LA(1);
217
+ if (_la === BlendApiParser.T__8) {
218
+ {
219
+ this.state = 53;
220
+ this.inputDefinition();
221
+ }
222
+ }
223
+ this.state = 57;
224
+ this._errHandler.sync(this);
225
+ _la = this._input.LA(1);
226
+ if (_la === BlendApiParser.T__10) {
227
+ {
228
+ this.state = 56;
229
+ this.outputDefinition();
230
+ }
231
+ }
232
+ this.state = 59;
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 = 61;
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
+ inputDefinition() {
279
+ let _localctx = new InputDefinitionContext(this._ctx, this.state);
280
+ this.enterRule(_localctx, 10, BlendApiParser.RULE_inputDefinition);
281
+ let _la;
282
+ try {
283
+ this.enterOuterAlt(_localctx, 1);
284
+ {
285
+ this.state = 63;
286
+ this.match(BlendApiParser.T__8);
287
+ this.state = 64;
288
+ this.field();
289
+ this.state = 69;
290
+ this._errHandler.sync(this);
291
+ _la = this._input.LA(1);
292
+ while (_la === BlendApiParser.T__9) {
293
+ {
294
+ {
295
+ this.state = 65;
296
+ this.match(BlendApiParser.T__9);
297
+ this.state = 66;
298
+ this.field();
299
+ }
300
+ }
301
+ this.state = 71;
302
+ this._errHandler.sync(this);
303
+ _la = this._input.LA(1);
304
+ }
305
+ this.state = 72;
306
+ this.match(BlendApiParser.T__6);
307
+ }
308
+ }
309
+ catch (re) {
310
+ if (re instanceof RecognitionException_1.RecognitionException) {
311
+ _localctx.exception = re;
312
+ this._errHandler.reportError(this, re);
313
+ this._errHandler.recover(this, re);
314
+ }
315
+ else {
316
+ throw re;
317
+ }
318
+ }
319
+ finally {
320
+ this.exitRule();
321
+ }
322
+ return _localctx;
323
+ }
324
+ // @RuleVersion(0)
325
+ outputDefinition() {
326
+ let _localctx = new OutputDefinitionContext(this._ctx, this.state);
327
+ this.enterRule(_localctx, 12, BlendApiParser.RULE_outputDefinition);
328
+ let _la;
329
+ try {
330
+ this.state = 89;
331
+ this._errHandler.sync(this);
332
+ switch (this.interpreter.adaptivePredict(this._input, 7, this._ctx)) {
333
+ case 1:
334
+ this.enterOuterAlt(_localctx, 1);
335
+ {
336
+ this.state = 74;
337
+ this.match(BlendApiParser.T__10);
338
+ this.state = 75;
339
+ this.field();
340
+ this.state = 80;
341
+ this._errHandler.sync(this);
342
+ _la = this._input.LA(1);
343
+ while (_la === BlendApiParser.T__9) {
344
+ {
345
+ {
346
+ this.state = 76;
347
+ this.match(BlendApiParser.T__9);
348
+ this.state = 77;
349
+ this.field();
350
+ }
351
+ }
352
+ this.state = 82;
353
+ this._errHandler.sync(this);
354
+ _la = this._input.LA(1);
355
+ }
356
+ this.state = 83;
357
+ this.match(BlendApiParser.T__6);
358
+ }
359
+ break;
360
+ case 2:
361
+ this.enterOuterAlt(_localctx, 2);
362
+ {
363
+ this.state = 85;
364
+ this.match(BlendApiParser.T__10);
365
+ this.state = 86;
366
+ this.directOutputDefenition();
367
+ this.state = 87;
368
+ this.match(BlendApiParser.T__6);
369
+ }
370
+ break;
371
+ }
372
+ }
373
+ catch (re) {
374
+ if (re instanceof RecognitionException_1.RecognitionException) {
375
+ _localctx.exception = re;
376
+ this._errHandler.reportError(this, re);
377
+ this._errHandler.recover(this, re);
378
+ }
379
+ else {
380
+ throw re;
381
+ }
382
+ }
383
+ finally {
384
+ this.exitRule();
385
+ }
386
+ return _localctx;
387
+ }
388
+ // @RuleVersion(0)
389
+ directOutputDefenition() {
390
+ let _localctx = new DirectOutputDefenitionContext(this._ctx, this.state);
391
+ this.enterRule(_localctx, 14, BlendApiParser.RULE_directOutputDefenition);
392
+ try {
393
+ this.enterOuterAlt(_localctx, 1);
394
+ {
395
+ this.state = 91;
396
+ this.type();
397
+ }
398
+ }
399
+ catch (re) {
400
+ if (re instanceof RecognitionException_1.RecognitionException) {
401
+ _localctx.exception = re;
402
+ this._errHandler.reportError(this, re);
403
+ this._errHandler.recover(this, re);
404
+ }
405
+ else {
406
+ throw re;
407
+ }
408
+ }
409
+ finally {
410
+ this.exitRule();
411
+ }
412
+ return _localctx;
413
+ }
414
+ // @RuleVersion(0)
415
+ field() {
416
+ let _localctx = new FieldContext(this._ctx, this.state);
417
+ this.enterRule(_localctx, 16, BlendApiParser.RULE_field);
418
+ let _la;
419
+ try {
420
+ this.enterOuterAlt(_localctx, 1);
421
+ {
422
+ this.state = 93;
423
+ _la = this._input.LA(1);
424
+ if (!(_la === BlendApiParser.IDENTIFIER || _la === BlendApiParser.CAPITAL_IDENTIFIER)) {
425
+ this._errHandler.recoverInline(this);
426
+ }
427
+ else {
428
+ if (this._input.LA(1) === Token_1.Token.EOF) {
429
+ this.matchedEOF = true;
430
+ }
431
+ this._errHandler.reportMatch(this);
432
+ this.consume();
433
+ }
434
+ this.state = 94;
435
+ this.match(BlendApiParser.T__11);
436
+ this.state = 95;
437
+ this.type();
438
+ }
439
+ }
440
+ catch (re) {
441
+ if (re instanceof RecognitionException_1.RecognitionException) {
442
+ _localctx.exception = re;
443
+ this._errHandler.reportError(this, re);
444
+ this._errHandler.recover(this, re);
445
+ }
446
+ else {
447
+ throw re;
448
+ }
449
+ }
450
+ finally {
451
+ this.exitRule();
452
+ }
453
+ return _localctx;
454
+ }
455
+ // @RuleVersion(0)
456
+ type() {
457
+ let _localctx = new TypeContext(this._ctx, this.state);
458
+ this.enterRule(_localctx, 18, BlendApiParser.RULE_type);
459
+ try {
460
+ this.state = 115;
461
+ this._errHandler.sync(this);
462
+ switch (this.interpreter.adaptivePredict(this._input, 8, this._ctx)) {
463
+ case 1:
464
+ this.enterOuterAlt(_localctx, 1);
465
+ {
466
+ this.state = 97;
467
+ this.primitiveType();
468
+ }
469
+ break;
470
+ case 2:
471
+ this.enterOuterAlt(_localctx, 2);
472
+ {
473
+ this.state = 98;
474
+ this.primitiveType();
475
+ this.state = 99;
476
+ this.match(BlendApiParser.T__12);
477
+ }
478
+ break;
479
+ case 3:
480
+ this.enterOuterAlt(_localctx, 3);
481
+ {
482
+ this.state = 101;
483
+ this.primitiveType();
484
+ this.state = 102;
485
+ this.match(BlendApiParser.T__13);
486
+ }
487
+ break;
488
+ case 4:
489
+ this.enterOuterAlt(_localctx, 4);
490
+ {
491
+ this.state = 104;
492
+ this.match(BlendApiParser.CAPITAL_IDENTIFIER);
493
+ this.state = 105;
494
+ this.match(BlendApiParser.T__14);
495
+ this.state = 106;
496
+ this.match(BlendApiParser.CAPITAL_IDENTIFIER);
497
+ }
498
+ break;
499
+ case 5:
500
+ this.enterOuterAlt(_localctx, 5);
501
+ {
502
+ this.state = 107;
503
+ this.match(BlendApiParser.CAPITAL_IDENTIFIER);
504
+ this.state = 108;
505
+ this.match(BlendApiParser.T__14);
506
+ this.state = 109;
507
+ this.match(BlendApiParser.CAPITAL_IDENTIFIER);
508
+ this.state = 110;
509
+ this.match(BlendApiParser.T__13);
510
+ }
511
+ break;
512
+ case 6:
513
+ this.enterOuterAlt(_localctx, 6);
514
+ {
515
+ this.state = 111;
516
+ this.match(BlendApiParser.CAPITAL_IDENTIFIER);
517
+ this.state = 112;
518
+ this.match(BlendApiParser.T__14);
519
+ this.state = 113;
520
+ this.match(BlendApiParser.CAPITAL_IDENTIFIER);
521
+ this.state = 114;
522
+ this.match(BlendApiParser.T__12);
523
+ }
524
+ break;
525
+ }
526
+ }
527
+ catch (re) {
528
+ if (re instanceof RecognitionException_1.RecognitionException) {
529
+ _localctx.exception = re;
530
+ this._errHandler.reportError(this, re);
531
+ this._errHandler.recover(this, re);
532
+ }
533
+ else {
534
+ throw re;
535
+ }
536
+ }
537
+ finally {
538
+ this.exitRule();
539
+ }
540
+ return _localctx;
541
+ }
542
+ // @RuleVersion(0)
543
+ primitiveType() {
544
+ let _localctx = new PrimitiveTypeContext(this._ctx, this.state);
545
+ this.enterRule(_localctx, 20, BlendApiParser.RULE_primitiveType);
546
+ let _la;
547
+ try {
548
+ this.enterOuterAlt(_localctx, 1);
549
+ {
550
+ this.state = 117;
551
+ _la = this._input.LA(1);
552
+ if (!((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << BlendApiParser.T__15) | (1 << BlendApiParser.T__16) | (1 << BlendApiParser.T__17) | (1 << BlendApiParser.T__18) | (1 << BlendApiParser.T__19))) !== 0))) {
553
+ this._errHandler.recoverInline(this);
554
+ }
555
+ else {
556
+ if (this._input.LA(1) === Token_1.Token.EOF) {
557
+ this.matchedEOF = true;
558
+ }
559
+ this._errHandler.reportMatch(this);
560
+ this.consume();
561
+ }
562
+ }
563
+ }
564
+ catch (re) {
565
+ if (re instanceof RecognitionException_1.RecognitionException) {
566
+ _localctx.exception = re;
567
+ this._errHandler.reportError(this, re);
568
+ this._errHandler.recover(this, re);
569
+ }
570
+ else {
571
+ throw re;
572
+ }
573
+ }
574
+ finally {
575
+ this.exitRule();
576
+ }
577
+ return _localctx;
578
+ }
579
+ static get _ATN() {
580
+ if (!BlendApiParser.__ATN) {
581
+ BlendApiParser.__ATN = new ATNDeserializer_1.ATNDeserializer().deserialize(Utils.toCharArray(BlendApiParser._serializedATN));
582
+ }
583
+ return BlendApiParser.__ATN;
584
+ }
585
+ }
586
+ exports.BlendApiParser = BlendApiParser;
587
+ BlendApiParser.T__0 = 1;
588
+ BlendApiParser.T__1 = 2;
589
+ BlendApiParser.T__2 = 3;
590
+ BlendApiParser.T__3 = 4;
591
+ BlendApiParser.T__4 = 5;
592
+ BlendApiParser.T__5 = 6;
593
+ BlendApiParser.T__6 = 7;
594
+ BlendApiParser.T__7 = 8;
595
+ BlendApiParser.T__8 = 9;
596
+ BlendApiParser.T__9 = 10;
597
+ BlendApiParser.T__10 = 11;
598
+ BlendApiParser.T__11 = 12;
599
+ BlendApiParser.T__12 = 13;
600
+ BlendApiParser.T__13 = 14;
601
+ BlendApiParser.T__14 = 15;
602
+ BlendApiParser.T__15 = 16;
603
+ BlendApiParser.T__16 = 17;
604
+ BlendApiParser.T__17 = 18;
605
+ BlendApiParser.T__18 = 19;
606
+ BlendApiParser.T__19 = 20;
607
+ BlendApiParser.HTTP_METHOD = 21;
608
+ BlendApiParser.IDENTIFIER = 22;
609
+ BlendApiParser.CAPITAL_IDENTIFIER = 23;
610
+ BlendApiParser.URL_IDENTIFIER = 24;
611
+ BlendApiParser.WS = 25;
612
+ BlendApiParser.RULE_program = 0;
613
+ BlendApiParser.RULE_sectionDefinition = 1;
614
+ BlendApiParser.RULE_moduleDefinition = 2;
615
+ BlendApiParser.RULE_apiDefinition = 3;
616
+ BlendApiParser.RULE_authenticated = 4;
617
+ BlendApiParser.RULE_inputDefinition = 5;
618
+ BlendApiParser.RULE_outputDefinition = 6;
619
+ BlendApiParser.RULE_directOutputDefenition = 7;
620
+ BlendApiParser.RULE_field = 8;
621
+ BlendApiParser.RULE_type = 9;
622
+ BlendApiParser.RULE_primitiveType = 10;
623
+ // tslint:disable:no-trailing-whitespace
624
+ BlendApiParser.ruleNames = [
625
+ "program", "sectionDefinition", "moduleDefinition", "apiDefinition", "authenticated",
626
+ "inputDefinition", "outputDefinition", "directOutputDefenition", "field",
627
+ "type", "primitiveType",
628
+ ];
629
+ BlendApiParser._LITERAL_NAMES = [
630
+ undefined, "'section'", "'{'", "'}'", "'module'", "'api'", "'('", "')'",
631
+ "'authenticated'", "'input('", "','", "'output('", "':'", "'[]'", "'?'",
632
+ "'->'", "'string'", "'number'", "'boolean'", "'any'", "'object'",
633
+ ];
634
+ BlendApiParser._SYMBOLIC_NAMES = [
635
+ undefined, undefined, undefined, undefined, undefined, undefined, undefined,
636
+ undefined, undefined, undefined, undefined, undefined, undefined, undefined,
637
+ undefined, undefined, undefined, undefined, undefined, undefined, undefined,
638
+ "HTTP_METHOD", "IDENTIFIER", "CAPITAL_IDENTIFIER", "URL_IDENTIFIER", "WS",
639
+ ];
640
+ BlendApiParser.VOCABULARY = new VocabularyImpl_1.VocabularyImpl(BlendApiParser._LITERAL_NAMES, BlendApiParser._SYMBOLIC_NAMES, []);
641
+ BlendApiParser._serializedATN = "\x03\uC91D\uCABA\u058D\uAFBA\u4F53\u0607\uEA8B\uC241\x03\x1Bz\x04\x02" +
642
+ "\t\x02\x04\x03\t\x03\x04\x04\t\x04\x04\x05\t\x05\x04\x06\t\x06\x04\x07" +
643
+ "\t\x07\x04\b\t\b\x04\t\t\t\x04\n\t\n\x04\v\t\v\x04\f\t\f\x03\x02\x03\x02" +
644
+ "\x07\x02\x1B\n\x02\f\x02\x0E\x02\x1E\v\x02\x03\x03\x03\x03\x03\x03\x03" +
645
+ "\x03\x07\x03$\n\x03\f\x03\x0E\x03\'\v\x03\x03\x03\x03\x03\x03\x04\x03" +
646
+ "\x04\x03\x04\x03\x05\x03\x05\x03\x05\x03\x05\x03\x05\x03\x05\x03\x05\x03" +
647
+ "\x05\x05\x056\n\x05\x03\x05\x05\x059\n\x05\x03\x05\x05\x05<\n\x05\x03" +
648
+ "\x05\x03\x05\x03\x06\x03\x06\x03\x07\x03\x07\x03\x07\x03\x07\x07\x07F" +
649
+ "\n\x07\f\x07\x0E\x07I\v\x07\x03\x07\x03\x07\x03\b\x03\b\x03\b\x03\b\x07" +
650
+ "\bQ\n\b\f\b\x0E\bT\v\b\x03\b\x03\b\x03\b\x03\b\x03\b\x03\b\x05\b\\\n\b" +
651
+ "\x03\t\x03\t\x03\n\x03\n\x03\n\x03\n\x03\v\x03\v\x03\v\x03\v\x03\v\x03" +
652
+ "\v\x03\v\x03\v\x03\v\x03\v\x03\v\x03\v\x03\v\x03\v\x03\v\x03\v\x03\v\x03" +
653
+ "\v\x05\vv\n\v\x03\f\x03\f\x03\f\x02\x02\x02\r\x02\x02\x04\x02\x06\x02" +
654
+ "\b\x02\n\x02\f\x02\x0E\x02\x10\x02\x12\x02\x14\x02\x16\x02\x02\x04\x03" +
655
+ "\x02\x18\x19\x03\x02\x12\x16\x02{\x02\x18\x03\x02\x02\x02\x04\x1F\x03" +
656
+ "\x02\x02\x02\x06*\x03\x02\x02\x02\b-\x03\x02\x02\x02\n?\x03\x02\x02\x02" +
657
+ "\fA\x03\x02\x02\x02\x0E[\x03\x02\x02\x02\x10]\x03\x02\x02\x02\x12_\x03" +
658
+ "\x02\x02\x02\x14u\x03\x02\x02\x02\x16w\x03\x02\x02\x02\x18\x1C\x05\x06" +
659
+ "\x04\x02\x19\x1B\x05\x04\x03\x02\x1A\x19\x03\x02\x02\x02\x1B\x1E\x03\x02" +
660
+ "\x02\x02\x1C\x1A\x03\x02\x02\x02\x1C\x1D\x03\x02\x02\x02\x1D\x03\x03\x02" +
661
+ "\x02\x02\x1E\x1C\x03\x02\x02\x02\x1F \x07\x03\x02\x02 !\x07\x19\x02\x02" +
662
+ "!%\x07\x04\x02\x02\"$\x05\b\x05\x02#\"\x03\x02\x02\x02$\'\x03\x02\x02" +
663
+ "\x02%#\x03\x02\x02\x02%&\x03\x02\x02\x02&(\x03\x02\x02\x02\'%\x03\x02" +
664
+ "\x02\x02()\x07\x05\x02\x02)\x05\x03\x02\x02\x02*+\x07\x06\x02\x02+,\x07" +
665
+ "\x19\x02\x02,\x07\x03\x02\x02\x02-.\x07\x07\x02\x02./\x07\x18\x02\x02" +
666
+ "/0\x07\b\x02\x0201\x07\x17\x02\x0212\x07\t\x02\x0223\x07\x1A\x02\x023" +
667
+ "5\x07\x04\x02\x0246\x05\n\x06\x0254\x03\x02\x02\x0256\x03\x02\x02\x02" +
668
+ "68\x03\x02\x02\x0279\x05\f\x07\x0287\x03\x02\x02\x0289\x03\x02\x02\x02" +
669
+ "9;\x03\x02\x02\x02:<\x05\x0E\b\x02;:\x03\x02\x02\x02;<\x03\x02\x02\x02" +
670
+ "<=\x03\x02\x02\x02=>\x07\x05\x02\x02>\t\x03\x02\x02\x02?@\x07\n\x02\x02" +
671
+ "@\v\x03\x02\x02\x02AB\x07\v\x02\x02BG\x05\x12\n\x02CD\x07\f\x02\x02DF" +
672
+ "\x05\x12\n\x02EC\x03\x02\x02\x02FI\x03\x02\x02\x02GE\x03\x02\x02\x02G" +
673
+ "H\x03\x02\x02\x02HJ\x03\x02\x02\x02IG\x03\x02\x02\x02JK\x07\t\x02\x02" +
674
+ "K\r\x03\x02\x02\x02LM\x07\r\x02\x02MR\x05\x12\n\x02NO\x07\f\x02\x02OQ" +
675
+ "\x05\x12\n\x02PN\x03\x02\x02\x02QT\x03\x02\x02\x02RP\x03\x02\x02\x02R" +
676
+ "S\x03\x02\x02\x02SU\x03\x02\x02\x02TR\x03\x02\x02\x02UV\x07\t\x02\x02" +
677
+ "V\\\x03\x02\x02\x02WX\x07\r\x02\x02XY\x05\x10\t\x02YZ\x07\t\x02\x02Z\\" +
678
+ "\x03\x02\x02\x02[L\x03\x02\x02\x02[W\x03\x02\x02\x02\\\x0F\x03\x02\x02" +
679
+ "\x02]^\x05\x14\v\x02^\x11\x03\x02\x02\x02_`\t\x02\x02\x02`a\x07\x0E\x02" +
680
+ "\x02ab\x05\x14\v\x02b\x13\x03\x02\x02\x02cv\x05\x16\f\x02de\x05\x16\f" +
681
+ "\x02ef\x07\x0F\x02\x02fv\x03\x02\x02\x02gh\x05\x16\f\x02hi\x07\x10\x02" +
682
+ "\x02iv\x03\x02\x02\x02jk\x07\x19\x02\x02kl\x07\x11\x02\x02lv\x07\x19\x02" +
683
+ "\x02mn\x07\x19\x02\x02no\x07\x11\x02\x02op\x07\x19\x02\x02pv\x07\x10\x02" +
684
+ "\x02qr\x07\x19\x02\x02rs\x07\x11\x02\x02st\x07\x19\x02\x02tv\x07\x0F\x02" +
685
+ "\x02uc\x03\x02\x02\x02ud\x03\x02\x02\x02ug\x03\x02\x02\x02uj\x03\x02\x02" +
686
+ "\x02um\x03\x02\x02\x02uq\x03\x02\x02\x02v\x15\x03\x02\x02\x02wx\t\x03" +
687
+ "\x02\x02x\x17\x03\x02\x02\x02\v\x1C%58;GR[u";
688
+ class ProgramContext extends ParserRuleContext_1.ParserRuleContext {
689
+ moduleDefinition() {
690
+ return this.getRuleContext(0, ModuleDefinitionContext);
691
+ }
692
+ sectionDefinition(i) {
693
+ if (i === undefined) {
694
+ return this.getRuleContexts(SectionDefinitionContext);
695
+ }
696
+ else {
697
+ return this.getRuleContext(i, SectionDefinitionContext);
698
+ }
699
+ }
700
+ constructor(parent, invokingState) {
701
+ super(parent, invokingState);
702
+ }
703
+ // @Override
704
+ get ruleIndex() { return BlendApiParser.RULE_program; }
705
+ // @Override
706
+ enterRule(listener) {
707
+ if (listener.enterProgram) {
708
+ listener.enterProgram(this);
709
+ }
710
+ }
711
+ // @Override
712
+ exitRule(listener) {
713
+ if (listener.exitProgram) {
714
+ listener.exitProgram(this);
715
+ }
716
+ }
717
+ }
718
+ exports.ProgramContext = ProgramContext;
719
+ class SectionDefinitionContext extends ParserRuleContext_1.ParserRuleContext {
720
+ CAPITAL_IDENTIFIER() { return this.getToken(BlendApiParser.CAPITAL_IDENTIFIER, 0); }
721
+ apiDefinition(i) {
722
+ if (i === undefined) {
723
+ return this.getRuleContexts(ApiDefinitionContext);
724
+ }
725
+ else {
726
+ return this.getRuleContext(i, ApiDefinitionContext);
727
+ }
728
+ }
729
+ constructor(parent, invokingState) {
730
+ super(parent, invokingState);
731
+ }
732
+ // @Override
733
+ get ruleIndex() { return BlendApiParser.RULE_sectionDefinition; }
734
+ // @Override
735
+ enterRule(listener) {
736
+ if (listener.enterSectionDefinition) {
737
+ listener.enterSectionDefinition(this);
738
+ }
739
+ }
740
+ // @Override
741
+ exitRule(listener) {
742
+ if (listener.exitSectionDefinition) {
743
+ listener.exitSectionDefinition(this);
744
+ }
745
+ }
746
+ }
747
+ exports.SectionDefinitionContext = SectionDefinitionContext;
748
+ class ModuleDefinitionContext extends ParserRuleContext_1.ParserRuleContext {
749
+ CAPITAL_IDENTIFIER() { return this.getToken(BlendApiParser.CAPITAL_IDENTIFIER, 0); }
750
+ constructor(parent, invokingState) {
751
+ super(parent, invokingState);
752
+ }
753
+ // @Override
754
+ get ruleIndex() { return BlendApiParser.RULE_moduleDefinition; }
755
+ // @Override
756
+ enterRule(listener) {
757
+ if (listener.enterModuleDefinition) {
758
+ listener.enterModuleDefinition(this);
759
+ }
760
+ }
761
+ // @Override
762
+ exitRule(listener) {
763
+ if (listener.exitModuleDefinition) {
764
+ listener.exitModuleDefinition(this);
765
+ }
766
+ }
767
+ }
768
+ exports.ModuleDefinitionContext = ModuleDefinitionContext;
769
+ class ApiDefinitionContext extends ParserRuleContext_1.ParserRuleContext {
770
+ IDENTIFIER() { return this.getToken(BlendApiParser.IDENTIFIER, 0); }
771
+ HTTP_METHOD() { return this.getToken(BlendApiParser.HTTP_METHOD, 0); }
772
+ URL_IDENTIFIER() { return this.getToken(BlendApiParser.URL_IDENTIFIER, 0); }
773
+ authenticated() {
774
+ return this.tryGetRuleContext(0, AuthenticatedContext);
775
+ }
776
+ inputDefinition() {
777
+ return this.tryGetRuleContext(0, InputDefinitionContext);
778
+ }
779
+ outputDefinition() {
780
+ return this.tryGetRuleContext(0, OutputDefinitionContext);
781
+ }
782
+ constructor(parent, invokingState) {
783
+ super(parent, invokingState);
784
+ }
785
+ // @Override
786
+ get ruleIndex() { return BlendApiParser.RULE_apiDefinition; }
787
+ // @Override
788
+ enterRule(listener) {
789
+ if (listener.enterApiDefinition) {
790
+ listener.enterApiDefinition(this);
791
+ }
792
+ }
793
+ // @Override
794
+ exitRule(listener) {
795
+ if (listener.exitApiDefinition) {
796
+ listener.exitApiDefinition(this);
797
+ }
798
+ }
799
+ }
800
+ exports.ApiDefinitionContext = ApiDefinitionContext;
801
+ class AuthenticatedContext extends ParserRuleContext_1.ParserRuleContext {
802
+ constructor(parent, invokingState) {
803
+ super(parent, invokingState);
804
+ }
805
+ // @Override
806
+ get ruleIndex() { return BlendApiParser.RULE_authenticated; }
807
+ // @Override
808
+ enterRule(listener) {
809
+ if (listener.enterAuthenticated) {
810
+ listener.enterAuthenticated(this);
811
+ }
812
+ }
813
+ // @Override
814
+ exitRule(listener) {
815
+ if (listener.exitAuthenticated) {
816
+ listener.exitAuthenticated(this);
817
+ }
818
+ }
819
+ }
820
+ exports.AuthenticatedContext = AuthenticatedContext;
821
+ class InputDefinitionContext extends ParserRuleContext_1.ParserRuleContext {
822
+ field(i) {
823
+ if (i === undefined) {
824
+ return this.getRuleContexts(FieldContext);
825
+ }
826
+ else {
827
+ return this.getRuleContext(i, FieldContext);
828
+ }
829
+ }
830
+ constructor(parent, invokingState) {
831
+ super(parent, invokingState);
832
+ }
833
+ // @Override
834
+ get ruleIndex() { return BlendApiParser.RULE_inputDefinition; }
835
+ // @Override
836
+ enterRule(listener) {
837
+ if (listener.enterInputDefinition) {
838
+ listener.enterInputDefinition(this);
839
+ }
840
+ }
841
+ // @Override
842
+ exitRule(listener) {
843
+ if (listener.exitInputDefinition) {
844
+ listener.exitInputDefinition(this);
845
+ }
846
+ }
847
+ }
848
+ exports.InputDefinitionContext = InputDefinitionContext;
849
+ class OutputDefinitionContext extends ParserRuleContext_1.ParserRuleContext {
850
+ field(i) {
851
+ if (i === undefined) {
852
+ return this.getRuleContexts(FieldContext);
853
+ }
854
+ else {
855
+ return this.getRuleContext(i, FieldContext);
856
+ }
857
+ }
858
+ directOutputDefenition() {
859
+ return this.tryGetRuleContext(0, DirectOutputDefenitionContext);
860
+ }
861
+ constructor(parent, invokingState) {
862
+ super(parent, invokingState);
863
+ }
864
+ // @Override
865
+ get ruleIndex() { return BlendApiParser.RULE_outputDefinition; }
866
+ // @Override
867
+ enterRule(listener) {
868
+ if (listener.enterOutputDefinition) {
869
+ listener.enterOutputDefinition(this);
870
+ }
871
+ }
872
+ // @Override
873
+ exitRule(listener) {
874
+ if (listener.exitOutputDefinition) {
875
+ listener.exitOutputDefinition(this);
876
+ }
877
+ }
878
+ }
879
+ exports.OutputDefinitionContext = OutputDefinitionContext;
880
+ class DirectOutputDefenitionContext extends ParserRuleContext_1.ParserRuleContext {
881
+ type() {
882
+ return this.getRuleContext(0, TypeContext);
883
+ }
884
+ constructor(parent, invokingState) {
885
+ super(parent, invokingState);
886
+ }
887
+ // @Override
888
+ get ruleIndex() { return BlendApiParser.RULE_directOutputDefenition; }
889
+ // @Override
890
+ enterRule(listener) {
891
+ if (listener.enterDirectOutputDefenition) {
892
+ listener.enterDirectOutputDefenition(this);
893
+ }
894
+ }
895
+ // @Override
896
+ exitRule(listener) {
897
+ if (listener.exitDirectOutputDefenition) {
898
+ listener.exitDirectOutputDefenition(this);
899
+ }
900
+ }
901
+ }
902
+ exports.DirectOutputDefenitionContext = DirectOutputDefenitionContext;
903
+ class FieldContext extends ParserRuleContext_1.ParserRuleContext {
904
+ type() {
905
+ return this.getRuleContext(0, TypeContext);
906
+ }
907
+ IDENTIFIER() { return this.tryGetToken(BlendApiParser.IDENTIFIER, 0); }
908
+ CAPITAL_IDENTIFIER() { return this.tryGetToken(BlendApiParser.CAPITAL_IDENTIFIER, 0); }
909
+ constructor(parent, invokingState) {
910
+ super(parent, invokingState);
911
+ }
912
+ // @Override
913
+ get ruleIndex() { return BlendApiParser.RULE_field; }
914
+ // @Override
915
+ enterRule(listener) {
916
+ if (listener.enterField) {
917
+ listener.enterField(this);
918
+ }
919
+ }
920
+ // @Override
921
+ exitRule(listener) {
922
+ if (listener.exitField) {
923
+ listener.exitField(this);
924
+ }
925
+ }
926
+ }
927
+ exports.FieldContext = FieldContext;
928
+ class TypeContext extends ParserRuleContext_1.ParserRuleContext {
929
+ primitiveType() {
930
+ return this.tryGetRuleContext(0, PrimitiveTypeContext);
931
+ }
932
+ CAPITAL_IDENTIFIER(i) {
933
+ if (i === undefined) {
934
+ return this.getTokens(BlendApiParser.CAPITAL_IDENTIFIER);
935
+ }
936
+ else {
937
+ return this.getToken(BlendApiParser.CAPITAL_IDENTIFIER, i);
938
+ }
939
+ }
940
+ constructor(parent, invokingState) {
941
+ super(parent, invokingState);
942
+ }
943
+ // @Override
944
+ get ruleIndex() { return BlendApiParser.RULE_type; }
945
+ // @Override
946
+ enterRule(listener) {
947
+ if (listener.enterType) {
948
+ listener.enterType(this);
949
+ }
950
+ }
951
+ // @Override
952
+ exitRule(listener) {
953
+ if (listener.exitType) {
954
+ listener.exitType(this);
955
+ }
956
+ }
957
+ }
958
+ exports.TypeContext = TypeContext;
959
+ class PrimitiveTypeContext extends ParserRuleContext_1.ParserRuleContext {
960
+ constructor(parent, invokingState) {
961
+ super(parent, invokingState);
962
+ }
963
+ // @Override
964
+ get ruleIndex() { return BlendApiParser.RULE_primitiveType; }
965
+ // @Override
966
+ enterRule(listener) {
967
+ if (listener.enterPrimitiveType) {
968
+ listener.enterPrimitiveType(this);
969
+ }
970
+ }
971
+ // @Override
972
+ exitRule(listener) {
973
+ if (listener.exitPrimitiveType) {
974
+ listener.exitPrimitiveType(this);
975
+ }
976
+ }
977
+ }
978
+ exports.PrimitiveTypeContext = PrimitiveTypeContext;