blend-kit 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/antlr.readme +1 -0
  2. package/dist/ai-models/api-label/APILabelHelper.js +76 -0
  3. package/dist/ai-models/api-label/APILabelHelper.ts +34 -0
  4. package/dist/ai-models/api-label/labels.json +1 -0
  5. package/dist/ai-models/api-label/model.json +1 -0
  6. package/dist/ai-models/api-label/weights.bin +0 -0
  7. package/dist/ai-models/api-label/wordIndex.json +1 -0
  8. package/dist/ai-models/tokenizer.js +18 -0
  9. package/dist/ai-models/tokenizer.ts +16 -0
  10. package/dist/commands/ui.js +15 -0
  11. package/dist/helper/ExpressHelper.js +18 -12
  12. package/dist/helper/FrontEndApiHelper.js +12 -14
  13. package/dist/helper/FrontEndReactApiHelper.js +6 -6
  14. package/dist/helper/MongoHelper.js +9 -2
  15. package/dist/helper/RNHelper.js +7 -0
  16. package/dist/helper/ReactHelper.js +10 -2
  17. package/dist/helper/grammarHelper/BlendApiGrammarHelper.js +44 -5
  18. package/dist/helper/grammarHelper/BlendMongoGrammarHelper.js +2 -1
  19. package/dist/index.js +2 -2
  20. package/dist/parser/blendExpress/src/grammar/BlendExpressLexer.js +201 -0
  21. package/dist/parser/blendExpress/src/grammar/BlendExpressListener.js +3 -0
  22. package/dist/parser/blendExpress/src/grammar/BlendExpressParser.js +961 -0
  23. package/dist/parser/blendReact/src/grammar/BlendReactLexer.js +1 -1
  24. package/dist/server.js +31 -0
  25. package/dist/types/apiOperationTypes.js +8 -1
  26. package/package.json +6 -3
  27. package/src/ai-models/api-label/APILabelHelper.ts +34 -0
  28. package/src/ai-models/api-label/labels.json +1 -0
  29. package/src/ai-models/api-label/model.json +1 -0
  30. package/src/ai-models/api-label/weights.bin +0 -0
  31. package/src/ai-models/api-label/wordIndex.json +1 -0
  32. package/src/ai-models/tokenizer.ts +16 -0
  33. package/src/grammar/.antlr/BlendApiLexer.java +2 -2
  34. package/src/grammar/.antlr/BlendExpress.interp +70 -0
  35. package/src/grammar/.antlr/BlendExpress.tokens +44 -0
  36. package/src/grammar/.antlr/BlendExpressLexer.interp +89 -0
  37. package/src/grammar/.antlr/BlendExpressLexer.java +237 -0
  38. package/src/grammar/.antlr/BlendExpressLexer.tokens +44 -0
  39. package/src/grammar/.antlr/BlendExpressParser.java +767 -0
  40. package/src/grammar/.antlr/BlendMongo.interp +3 -1
  41. package/src/grammar/.antlr/BlendMongo.tokens +5 -3
  42. package/src/grammar/.antlr/BlendMongoLexer.interp +4 -1
  43. package/src/grammar/.antlr/BlendMongoLexer.java +99 -95
  44. package/src/grammar/.antlr/BlendMongoLexer.tokens +5 -3
  45. package/src/grammar/.antlr/BlendMongoParser.java +11 -11
  46. package/src/grammar/.antlr/BlendReactLexer.interp +1 -1
  47. package/src/grammar/.antlr/BlendReactLexer.java +1 -1
  48. package/src/grammar/BlendExpress.g4 +26 -0
  49. package/src/grammar/BlendMongo.g4 +1 -1
  50. package/src/grammar/BlendReact.g4 +1 -1
  51. package/src/helper/ExpressHelper.ts +153 -141
  52. package/src/helper/FrontEndApiHelper.ts +13 -14
  53. package/src/helper/FrontEndReactApiHelper.ts +6 -6
  54. package/src/helper/MongoHelper.ts +9 -2
  55. package/src/helper/RNHelper.ts +76 -70
  56. package/src/helper/ReactHelper.ts +10 -2
  57. package/src/helper/grammarHelper/BlendApiGrammarHelper.ts +46 -6
  58. package/src/helper/grammarHelper/BlendMongoGrammarHelper.ts +4 -3
  59. package/src/index.ts +3 -2
  60. package/src/parser/blendExpress/src/grammar/BlendExpress.interp +70 -0
  61. package/src/parser/blendExpress/src/grammar/BlendExpress.tokens +44 -0
  62. package/src/parser/blendExpress/src/grammar/BlendExpressLexer.interp +89 -0
  63. package/src/parser/blendExpress/src/grammar/BlendExpressLexer.tokens +44 -0
  64. package/src/parser/blendExpress/src/grammar/BlendExpressLexer.ts +193 -0
  65. package/src/parser/blendExpress/src/grammar/BlendExpressListener.ts +145 -0
  66. package/src/parser/blendExpress/src/grammar/BlendExpressParser.ts +968 -0
  67. package/src/parser/blendReact/src/grammar/BlendReactLexer.interp +1 -1
  68. package/src/parser/blendReact/src/grammar/BlendReactLexer.ts +1 -1
  69. package/src/types/apiOperationTypes.ts +12 -0
  70. package/tsconfig.json +1 -0
@@ -0,0 +1,968 @@
1
+ // Generated from src/grammar/BlendExpress.g4 by ANTLR 4.9.0-SNAPSHOT
2
+
3
+
4
+ import { ATN } from "antlr4ts/atn/ATN";
5
+ import { ATNDeserializer } from "antlr4ts/atn/ATNDeserializer";
6
+ import { FailedPredicateException } from "antlr4ts/FailedPredicateException";
7
+ import { NotNull } from "antlr4ts/Decorators";
8
+ import { NoViableAltException } from "antlr4ts/NoViableAltException";
9
+ import { Override } from "antlr4ts/Decorators";
10
+ import { Parser } from "antlr4ts/Parser";
11
+ import { ParserRuleContext } from "antlr4ts/ParserRuleContext";
12
+ import { ParserATNSimulator } from "antlr4ts/atn/ParserATNSimulator";
13
+ import { ParseTreeListener } from "antlr4ts/tree/ParseTreeListener";
14
+ import { ParseTreeVisitor } from "antlr4ts/tree/ParseTreeVisitor";
15
+ import { RecognitionException } from "antlr4ts/RecognitionException";
16
+ import { RuleContext } from "antlr4ts/RuleContext";
17
+ //import { RuleVersion } from "antlr4ts/RuleVersion";
18
+ import { TerminalNode } from "antlr4ts/tree/TerminalNode";
19
+ import { Token } from "antlr4ts/Token";
20
+ import { TokenStream } from "antlr4ts/TokenStream";
21
+ import { Vocabulary } from "antlr4ts/Vocabulary";
22
+ import { VocabularyImpl } from "antlr4ts/VocabularyImpl";
23
+
24
+ import * as Utils from "antlr4ts/misc/Utils";
25
+
26
+ import { BlendExpressListener } from "./BlendExpressListener";
27
+
28
+ export class BlendExpressParser extends Parser {
29
+ public static readonly T__0 = 1;
30
+ public static readonly T__1 = 2;
31
+ public static readonly T__2 = 3;
32
+ public static readonly T__3 = 4;
33
+ public static readonly T__4 = 5;
34
+ public static readonly T__5 = 6;
35
+ public static readonly T__6 = 7;
36
+ public static readonly T__7 = 8;
37
+ public static readonly T__8 = 9;
38
+ public static readonly T__9 = 10;
39
+ public static readonly T__10 = 11;
40
+ public static readonly T__11 = 12;
41
+ public static readonly T__12 = 13;
42
+ public static readonly T__13 = 14;
43
+ public static readonly T__14 = 15;
44
+ public static readonly T__15 = 16;
45
+ public static readonly T__16 = 17;
46
+ public static readonly T__17 = 18;
47
+ public static readonly T__18 = 19;
48
+ public static readonly T__19 = 20;
49
+ public static readonly HTTP_METHOD = 21;
50
+ public static readonly IDENTIFIER = 22;
51
+ public static readonly CAPITAL_IDENTIFIER = 23;
52
+ public static readonly WS = 24;
53
+ public static readonly RULE_program = 0;
54
+ public static readonly RULE_sectionDefinition = 1;
55
+ public static readonly RULE_moduleDefinition = 2;
56
+ public static readonly RULE_apiDefinition = 3;
57
+ public static readonly RULE_authenticated = 4;
58
+ public static readonly RULE_inputDefinition = 5;
59
+ public static readonly RULE_outputDefinition = 6;
60
+ public static readonly RULE_directOutputDefenition = 7;
61
+ public static readonly RULE_field = 8;
62
+ public static readonly RULE_type = 9;
63
+ public static readonly RULE_primitiveType = 10;
64
+ // tslint:disable:no-trailing-whitespace
65
+ public static readonly ruleNames: string[] = [
66
+ "program", "sectionDefinition", "moduleDefinition", "apiDefinition", "authenticated",
67
+ "inputDefinition", "outputDefinition", "directOutputDefenition", "field",
68
+ "type", "primitiveType",
69
+ ];
70
+
71
+ private static readonly _LITERAL_NAMES: Array<string | undefined> = [
72
+ undefined, "'section'", "'{'", "'}'", "'module'", "'api'", "'('", "')'",
73
+ "'authenticated'", "'input('", "','", "'output('", "':'", "'[]'", "'?'",
74
+ "'->'", "'string'", "'number'", "'boolean'", "'any'", "'object'",
75
+ ];
76
+ private static readonly _SYMBOLIC_NAMES: Array<string | undefined> = [
77
+ undefined, undefined, undefined, undefined, undefined, undefined, undefined,
78
+ undefined, undefined, undefined, undefined, undefined, undefined, undefined,
79
+ undefined, undefined, undefined, undefined, undefined, undefined, undefined,
80
+ "HTTP_METHOD", "IDENTIFIER", "CAPITAL_IDENTIFIER", "WS",
81
+ ];
82
+ public static readonly VOCABULARY: Vocabulary = new VocabularyImpl(BlendExpressParser._LITERAL_NAMES, BlendExpressParser._SYMBOLIC_NAMES, []);
83
+
84
+ // @Override
85
+ // @NotNull
86
+ public get vocabulary(): Vocabulary {
87
+ return BlendExpressParser.VOCABULARY;
88
+ }
89
+ // tslint:enable:no-trailing-whitespace
90
+
91
+ // @Override
92
+ public get grammarFileName(): string { return "BlendExpress.g4"; }
93
+
94
+ // @Override
95
+ public get ruleNames(): string[] { return BlendExpressParser.ruleNames; }
96
+
97
+ // @Override
98
+ public get serializedATN(): string { return BlendExpressParser._serializedATN; }
99
+
100
+ protected createFailedPredicateException(predicate?: string, message?: string): FailedPredicateException {
101
+ return new FailedPredicateException(this, predicate, message);
102
+ }
103
+
104
+ constructor(input: TokenStream) {
105
+ super(input);
106
+ this._interp = new ParserATNSimulator(BlendExpressParser._ATN, this);
107
+ }
108
+ // @RuleVersion(0)
109
+ public program(): ProgramContext {
110
+ let _localctx: ProgramContext = new ProgramContext(this._ctx, this.state);
111
+ this.enterRule(_localctx, 0, BlendExpressParser.RULE_program);
112
+ let _la: number;
113
+ try {
114
+ this.enterOuterAlt(_localctx, 1);
115
+ {
116
+ this.state = 22;
117
+ this.moduleDefinition();
118
+ this.state = 26;
119
+ this._errHandler.sync(this);
120
+ _la = this._input.LA(1);
121
+ while (_la === BlendExpressParser.T__0) {
122
+ {
123
+ {
124
+ this.state = 23;
125
+ this.sectionDefinition();
126
+ }
127
+ }
128
+ this.state = 28;
129
+ this._errHandler.sync(this);
130
+ _la = this._input.LA(1);
131
+ }
132
+ }
133
+ }
134
+ catch (re) {
135
+ if (re instanceof RecognitionException) {
136
+ _localctx.exception = re;
137
+ this._errHandler.reportError(this, re);
138
+ this._errHandler.recover(this, re);
139
+ } else {
140
+ throw re;
141
+ }
142
+ }
143
+ finally {
144
+ this.exitRule();
145
+ }
146
+ return _localctx;
147
+ }
148
+ // @RuleVersion(0)
149
+ public sectionDefinition(): SectionDefinitionContext {
150
+ let _localctx: SectionDefinitionContext = new SectionDefinitionContext(this._ctx, this.state);
151
+ this.enterRule(_localctx, 2, BlendExpressParser.RULE_sectionDefinition);
152
+ let _la: number;
153
+ try {
154
+ this.enterOuterAlt(_localctx, 1);
155
+ {
156
+ this.state = 29;
157
+ this.match(BlendExpressParser.T__0);
158
+ this.state = 30;
159
+ this.match(BlendExpressParser.CAPITAL_IDENTIFIER);
160
+ this.state = 31;
161
+ this.match(BlendExpressParser.T__1);
162
+ this.state = 35;
163
+ this._errHandler.sync(this);
164
+ _la = this._input.LA(1);
165
+ while (_la === BlendExpressParser.T__4) {
166
+ {
167
+ {
168
+ this.state = 32;
169
+ this.apiDefinition();
170
+ }
171
+ }
172
+ this.state = 37;
173
+ this._errHandler.sync(this);
174
+ _la = this._input.LA(1);
175
+ }
176
+ this.state = 38;
177
+ this.match(BlendExpressParser.T__2);
178
+ }
179
+ }
180
+ catch (re) {
181
+ if (re instanceof RecognitionException) {
182
+ _localctx.exception = re;
183
+ this._errHandler.reportError(this, re);
184
+ this._errHandler.recover(this, re);
185
+ } else {
186
+ throw re;
187
+ }
188
+ }
189
+ finally {
190
+ this.exitRule();
191
+ }
192
+ return _localctx;
193
+ }
194
+ // @RuleVersion(0)
195
+ public moduleDefinition(): ModuleDefinitionContext {
196
+ let _localctx: ModuleDefinitionContext = new ModuleDefinitionContext(this._ctx, this.state);
197
+ this.enterRule(_localctx, 4, BlendExpressParser.RULE_moduleDefinition);
198
+ try {
199
+ this.enterOuterAlt(_localctx, 1);
200
+ {
201
+ this.state = 40;
202
+ this.match(BlendExpressParser.T__3);
203
+ this.state = 41;
204
+ this.match(BlendExpressParser.CAPITAL_IDENTIFIER);
205
+ }
206
+ }
207
+ catch (re) {
208
+ if (re instanceof RecognitionException) {
209
+ _localctx.exception = re;
210
+ this._errHandler.reportError(this, re);
211
+ this._errHandler.recover(this, re);
212
+ } else {
213
+ throw re;
214
+ }
215
+ }
216
+ finally {
217
+ this.exitRule();
218
+ }
219
+ return _localctx;
220
+ }
221
+ // @RuleVersion(0)
222
+ public apiDefinition(): ApiDefinitionContext {
223
+ let _localctx: ApiDefinitionContext = new ApiDefinitionContext(this._ctx, this.state);
224
+ this.enterRule(_localctx, 6, BlendExpressParser.RULE_apiDefinition);
225
+ let _la: number;
226
+ try {
227
+ this.enterOuterAlt(_localctx, 1);
228
+ {
229
+ this.state = 43;
230
+ this.match(BlendExpressParser.T__4);
231
+ this.state = 44;
232
+ this.match(BlendExpressParser.IDENTIFIER);
233
+ this.state = 45;
234
+ this.match(BlendExpressParser.T__5);
235
+ this.state = 46;
236
+ this.match(BlendExpressParser.HTTP_METHOD);
237
+ this.state = 47;
238
+ this.match(BlendExpressParser.T__6);
239
+ this.state = 48;
240
+ this.match(BlendExpressParser.T__1);
241
+ this.state = 50;
242
+ this._errHandler.sync(this);
243
+ _la = this._input.LA(1);
244
+ if (_la === BlendExpressParser.T__7) {
245
+ {
246
+ this.state = 49;
247
+ this.authenticated();
248
+ }
249
+ }
250
+
251
+ this.state = 53;
252
+ this._errHandler.sync(this);
253
+ _la = this._input.LA(1);
254
+ if (_la === BlendExpressParser.T__8) {
255
+ {
256
+ this.state = 52;
257
+ this.inputDefinition();
258
+ }
259
+ }
260
+
261
+ this.state = 56;
262
+ this._errHandler.sync(this);
263
+ _la = this._input.LA(1);
264
+ if (_la === BlendExpressParser.T__10) {
265
+ {
266
+ this.state = 55;
267
+ this.outputDefinition();
268
+ }
269
+ }
270
+
271
+ this.state = 58;
272
+ this.match(BlendExpressParser.T__2);
273
+ }
274
+ }
275
+ catch (re) {
276
+ if (re instanceof RecognitionException) {
277
+ _localctx.exception = re;
278
+ this._errHandler.reportError(this, re);
279
+ this._errHandler.recover(this, re);
280
+ } else {
281
+ throw re;
282
+ }
283
+ }
284
+ finally {
285
+ this.exitRule();
286
+ }
287
+ return _localctx;
288
+ }
289
+ // @RuleVersion(0)
290
+ public authenticated(): AuthenticatedContext {
291
+ let _localctx: AuthenticatedContext = new AuthenticatedContext(this._ctx, this.state);
292
+ this.enterRule(_localctx, 8, BlendExpressParser.RULE_authenticated);
293
+ try {
294
+ this.enterOuterAlt(_localctx, 1);
295
+ {
296
+ this.state = 60;
297
+ this.match(BlendExpressParser.T__7);
298
+ }
299
+ }
300
+ catch (re) {
301
+ if (re instanceof RecognitionException) {
302
+ _localctx.exception = re;
303
+ this._errHandler.reportError(this, re);
304
+ this._errHandler.recover(this, re);
305
+ } else {
306
+ throw re;
307
+ }
308
+ }
309
+ finally {
310
+ this.exitRule();
311
+ }
312
+ return _localctx;
313
+ }
314
+ // @RuleVersion(0)
315
+ public inputDefinition(): InputDefinitionContext {
316
+ let _localctx: InputDefinitionContext = new InputDefinitionContext(this._ctx, this.state);
317
+ this.enterRule(_localctx, 10, BlendExpressParser.RULE_inputDefinition);
318
+ let _la: number;
319
+ try {
320
+ this.enterOuterAlt(_localctx, 1);
321
+ {
322
+ this.state = 62;
323
+ this.match(BlendExpressParser.T__8);
324
+ this.state = 63;
325
+ this.field();
326
+ this.state = 68;
327
+ this._errHandler.sync(this);
328
+ _la = this._input.LA(1);
329
+ while (_la === BlendExpressParser.T__9) {
330
+ {
331
+ {
332
+ this.state = 64;
333
+ this.match(BlendExpressParser.T__9);
334
+ this.state = 65;
335
+ this.field();
336
+ }
337
+ }
338
+ this.state = 70;
339
+ this._errHandler.sync(this);
340
+ _la = this._input.LA(1);
341
+ }
342
+ this.state = 71;
343
+ this.match(BlendExpressParser.T__6);
344
+ }
345
+ }
346
+ catch (re) {
347
+ if (re instanceof RecognitionException) {
348
+ _localctx.exception = re;
349
+ this._errHandler.reportError(this, re);
350
+ this._errHandler.recover(this, re);
351
+ } else {
352
+ throw re;
353
+ }
354
+ }
355
+ finally {
356
+ this.exitRule();
357
+ }
358
+ return _localctx;
359
+ }
360
+ // @RuleVersion(0)
361
+ public outputDefinition(): OutputDefinitionContext {
362
+ let _localctx: OutputDefinitionContext = new OutputDefinitionContext(this._ctx, this.state);
363
+ this.enterRule(_localctx, 12, BlendExpressParser.RULE_outputDefinition);
364
+ let _la: number;
365
+ try {
366
+ this.state = 88;
367
+ this._errHandler.sync(this);
368
+ switch ( this.interpreter.adaptivePredict(this._input, 7, this._ctx) ) {
369
+ case 1:
370
+ this.enterOuterAlt(_localctx, 1);
371
+ {
372
+ this.state = 73;
373
+ this.match(BlendExpressParser.T__10);
374
+ this.state = 74;
375
+ this.field();
376
+ this.state = 79;
377
+ this._errHandler.sync(this);
378
+ _la = this._input.LA(1);
379
+ while (_la === BlendExpressParser.T__9) {
380
+ {
381
+ {
382
+ this.state = 75;
383
+ this.match(BlendExpressParser.T__9);
384
+ this.state = 76;
385
+ this.field();
386
+ }
387
+ }
388
+ this.state = 81;
389
+ this._errHandler.sync(this);
390
+ _la = this._input.LA(1);
391
+ }
392
+ this.state = 82;
393
+ this.match(BlendExpressParser.T__6);
394
+ }
395
+ break;
396
+
397
+ case 2:
398
+ this.enterOuterAlt(_localctx, 2);
399
+ {
400
+ this.state = 84;
401
+ this.match(BlendExpressParser.T__10);
402
+ this.state = 85;
403
+ this.directOutputDefenition();
404
+ this.state = 86;
405
+ this.match(BlendExpressParser.T__6);
406
+ }
407
+ break;
408
+ }
409
+ }
410
+ catch (re) {
411
+ if (re instanceof RecognitionException) {
412
+ _localctx.exception = re;
413
+ this._errHandler.reportError(this, re);
414
+ this._errHandler.recover(this, re);
415
+ } else {
416
+ throw re;
417
+ }
418
+ }
419
+ finally {
420
+ this.exitRule();
421
+ }
422
+ return _localctx;
423
+ }
424
+ // @RuleVersion(0)
425
+ public directOutputDefenition(): DirectOutputDefenitionContext {
426
+ let _localctx: DirectOutputDefenitionContext = new DirectOutputDefenitionContext(this._ctx, this.state);
427
+ this.enterRule(_localctx, 14, BlendExpressParser.RULE_directOutputDefenition);
428
+ try {
429
+ this.enterOuterAlt(_localctx, 1);
430
+ {
431
+ this.state = 90;
432
+ this.type();
433
+ }
434
+ }
435
+ catch (re) {
436
+ if (re instanceof RecognitionException) {
437
+ _localctx.exception = re;
438
+ this._errHandler.reportError(this, re);
439
+ this._errHandler.recover(this, re);
440
+ } else {
441
+ throw re;
442
+ }
443
+ }
444
+ finally {
445
+ this.exitRule();
446
+ }
447
+ return _localctx;
448
+ }
449
+ // @RuleVersion(0)
450
+ public field(): FieldContext {
451
+ let _localctx: FieldContext = new FieldContext(this._ctx, this.state);
452
+ this.enterRule(_localctx, 16, BlendExpressParser.RULE_field);
453
+ try {
454
+ this.enterOuterAlt(_localctx, 1);
455
+ {
456
+ this.state = 92;
457
+ this.match(BlendExpressParser.IDENTIFIER);
458
+ this.state = 93;
459
+ this.match(BlendExpressParser.T__11);
460
+ this.state = 94;
461
+ this.type();
462
+ }
463
+ }
464
+ catch (re) {
465
+ if (re instanceof RecognitionException) {
466
+ _localctx.exception = re;
467
+ this._errHandler.reportError(this, re);
468
+ this._errHandler.recover(this, re);
469
+ } else {
470
+ throw re;
471
+ }
472
+ }
473
+ finally {
474
+ this.exitRule();
475
+ }
476
+ return _localctx;
477
+ }
478
+ // @RuleVersion(0)
479
+ public type(): TypeContext {
480
+ let _localctx: TypeContext = new TypeContext(this._ctx, this.state);
481
+ this.enterRule(_localctx, 18, BlendExpressParser.RULE_type);
482
+ try {
483
+ this.state = 114;
484
+ this._errHandler.sync(this);
485
+ switch ( this.interpreter.adaptivePredict(this._input, 8, this._ctx) ) {
486
+ case 1:
487
+ this.enterOuterAlt(_localctx, 1);
488
+ {
489
+ this.state = 96;
490
+ this.primitiveType();
491
+ }
492
+ break;
493
+
494
+ case 2:
495
+ this.enterOuterAlt(_localctx, 2);
496
+ {
497
+ this.state = 97;
498
+ this.primitiveType();
499
+ this.state = 98;
500
+ this.match(BlendExpressParser.T__12);
501
+ }
502
+ break;
503
+
504
+ case 3:
505
+ this.enterOuterAlt(_localctx, 3);
506
+ {
507
+ this.state = 100;
508
+ this.primitiveType();
509
+ this.state = 101;
510
+ this.match(BlendExpressParser.T__13);
511
+ }
512
+ break;
513
+
514
+ case 4:
515
+ this.enterOuterAlt(_localctx, 4);
516
+ {
517
+ this.state = 103;
518
+ this.match(BlendExpressParser.CAPITAL_IDENTIFIER);
519
+ this.state = 104;
520
+ this.match(BlendExpressParser.T__14);
521
+ this.state = 105;
522
+ this.match(BlendExpressParser.CAPITAL_IDENTIFIER);
523
+ }
524
+ break;
525
+
526
+ case 5:
527
+ this.enterOuterAlt(_localctx, 5);
528
+ {
529
+ this.state = 106;
530
+ this.match(BlendExpressParser.CAPITAL_IDENTIFIER);
531
+ this.state = 107;
532
+ this.match(BlendExpressParser.T__14);
533
+ this.state = 108;
534
+ this.match(BlendExpressParser.CAPITAL_IDENTIFIER);
535
+ this.state = 109;
536
+ this.match(BlendExpressParser.T__13);
537
+ }
538
+ break;
539
+
540
+ case 6:
541
+ this.enterOuterAlt(_localctx, 6);
542
+ {
543
+ this.state = 110;
544
+ this.match(BlendExpressParser.CAPITAL_IDENTIFIER);
545
+ this.state = 111;
546
+ this.match(BlendExpressParser.T__14);
547
+ this.state = 112;
548
+ this.match(BlendExpressParser.CAPITAL_IDENTIFIER);
549
+ this.state = 113;
550
+ this.match(BlendExpressParser.T__12);
551
+ }
552
+ break;
553
+ }
554
+ }
555
+ catch (re) {
556
+ if (re instanceof RecognitionException) {
557
+ _localctx.exception = re;
558
+ this._errHandler.reportError(this, re);
559
+ this._errHandler.recover(this, re);
560
+ } else {
561
+ throw re;
562
+ }
563
+ }
564
+ finally {
565
+ this.exitRule();
566
+ }
567
+ return _localctx;
568
+ }
569
+ // @RuleVersion(0)
570
+ public primitiveType(): PrimitiveTypeContext {
571
+ let _localctx: PrimitiveTypeContext = new PrimitiveTypeContext(this._ctx, this.state);
572
+ this.enterRule(_localctx, 20, BlendExpressParser.RULE_primitiveType);
573
+ let _la: number;
574
+ try {
575
+ this.enterOuterAlt(_localctx, 1);
576
+ {
577
+ this.state = 116;
578
+ _la = this._input.LA(1);
579
+ if (!((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << BlendExpressParser.T__15) | (1 << BlendExpressParser.T__16) | (1 << BlendExpressParser.T__17) | (1 << BlendExpressParser.T__18) | (1 << BlendExpressParser.T__19))) !== 0))) {
580
+ this._errHandler.recoverInline(this);
581
+ } else {
582
+ if (this._input.LA(1) === Token.EOF) {
583
+ this.matchedEOF = true;
584
+ }
585
+
586
+ this._errHandler.reportMatch(this);
587
+ this.consume();
588
+ }
589
+ }
590
+ }
591
+ catch (re) {
592
+ if (re instanceof RecognitionException) {
593
+ _localctx.exception = re;
594
+ this._errHandler.reportError(this, re);
595
+ this._errHandler.recover(this, re);
596
+ } else {
597
+ throw re;
598
+ }
599
+ }
600
+ finally {
601
+ this.exitRule();
602
+ }
603
+ return _localctx;
604
+ }
605
+
606
+ public static readonly _serializedATN: string =
607
+ "\x03\uC91D\uCABA\u058D\uAFBA\u4F53\u0607\uEA8B\uC241\x03\x1Ay\x04\x02" +
608
+ "\t\x02\x04\x03\t\x03\x04\x04\t\x04\x04\x05\t\x05\x04\x06\t\x06\x04\x07" +
609
+ "\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" +
610
+ "\x07\x02\x1B\n\x02\f\x02\x0E\x02\x1E\v\x02\x03\x03\x03\x03\x03\x03\x03" +
611
+ "\x03\x07\x03$\n\x03\f\x03\x0E\x03\'\v\x03\x03\x03\x03\x03\x03\x04\x03" +
612
+ "\x04\x03\x04\x03\x05\x03\x05\x03\x05\x03\x05\x03\x05\x03\x05\x03\x05\x05" +
613
+ "\x055\n\x05\x03\x05\x05\x058\n\x05\x03\x05\x05\x05;\n\x05\x03\x05\x03" +
614
+ "\x05\x03\x06\x03\x06\x03\x07\x03\x07\x03\x07\x03\x07\x07\x07E\n\x07\f" +
615
+ "\x07\x0E\x07H\v\x07\x03\x07\x03\x07\x03\b\x03\b\x03\b\x03\b\x07\bP\n\b" +
616
+ "\f\b\x0E\bS\v\b\x03\b\x03\b\x03\b\x03\b\x03\b\x03\b\x05\b[\n\b\x03\t\x03" +
617
+ "\t\x03\n\x03\n\x03\n\x03\n\x03\v\x03\v\x03\v\x03\v\x03\v\x03\v\x03\v\x03" +
618
+ "\v\x03\v\x03\v\x03\v\x03\v\x03\v\x03\v\x03\v\x03\v\x03\v\x03\v\x05\vu" +
619
+ "\n\v\x03\f\x03\f\x03\f\x02\x02\x02\r\x02\x02\x04\x02\x06\x02\b\x02\n\x02" +
620
+ "\f\x02\x0E\x02\x10\x02\x12\x02\x14\x02\x16\x02\x02\x03\x03\x02\x12\x16" +
621
+ "\x02z\x02\x18\x03\x02\x02\x02\x04\x1F\x03\x02\x02\x02\x06*\x03\x02\x02" +
622
+ "\x02\b-\x03\x02\x02\x02\n>\x03\x02\x02\x02\f@\x03\x02\x02\x02\x0EZ\x03" +
623
+ "\x02\x02\x02\x10\\\x03\x02\x02\x02\x12^\x03\x02\x02\x02\x14t\x03\x02\x02" +
624
+ "\x02\x16v\x03\x02\x02\x02\x18\x1C\x05\x06\x04\x02\x19\x1B\x05\x04\x03" +
625
+ "\x02\x1A\x19\x03\x02\x02\x02\x1B\x1E\x03\x02\x02\x02\x1C\x1A\x03\x02\x02" +
626
+ "\x02\x1C\x1D\x03\x02\x02\x02\x1D\x03\x03\x02\x02\x02\x1E\x1C\x03\x02\x02" +
627
+ "\x02\x1F \x07\x03\x02\x02 !\x07\x19\x02\x02!%\x07\x04\x02\x02\"$\x05\b" +
628
+ "\x05\x02#\"\x03\x02\x02\x02$\'\x03\x02\x02\x02%#\x03\x02\x02\x02%&\x03" +
629
+ "\x02\x02\x02&(\x03\x02\x02\x02\'%\x03\x02\x02\x02()\x07\x05\x02\x02)\x05" +
630
+ "\x03\x02\x02\x02*+\x07\x06\x02\x02+,\x07\x19\x02\x02,\x07\x03\x02\x02" +
631
+ "\x02-.\x07\x07\x02\x02./\x07\x18\x02\x02/0\x07\b\x02\x0201\x07\x17\x02" +
632
+ "\x0212\x07\t\x02\x0224\x07\x04\x02\x0235\x05\n\x06\x0243\x03\x02\x02\x02" +
633
+ "45\x03\x02\x02\x0257\x03\x02\x02\x0268\x05\f\x07\x0276\x03\x02\x02\x02" +
634
+ "78\x03\x02\x02\x028:\x03\x02\x02\x029;\x05\x0E\b\x02:9\x03\x02\x02\x02" +
635
+ ":;\x03\x02\x02\x02;<\x03\x02\x02\x02<=\x07\x05\x02\x02=\t\x03\x02\x02" +
636
+ "\x02>?\x07\n\x02\x02?\v\x03\x02\x02\x02@A\x07\v\x02\x02AF\x05\x12\n\x02" +
637
+ "BC\x07\f\x02\x02CE\x05\x12\n\x02DB\x03\x02\x02\x02EH\x03\x02\x02\x02F" +
638
+ "D\x03\x02\x02\x02FG\x03\x02\x02\x02GI\x03\x02\x02\x02HF\x03\x02\x02\x02" +
639
+ "IJ\x07\t\x02\x02J\r\x03\x02\x02\x02KL\x07\r\x02\x02LQ\x05\x12\n\x02MN" +
640
+ "\x07\f\x02\x02NP\x05\x12\n\x02OM\x03\x02\x02\x02PS\x03\x02\x02\x02QO\x03" +
641
+ "\x02\x02\x02QR\x03\x02\x02\x02RT\x03\x02\x02\x02SQ\x03\x02\x02\x02TU\x07" +
642
+ "\t\x02\x02U[\x03\x02\x02\x02VW\x07\r\x02\x02WX\x05\x10\t\x02XY\x07\t\x02" +
643
+ "\x02Y[\x03\x02\x02\x02ZK\x03\x02\x02\x02ZV\x03\x02\x02\x02[\x0F\x03\x02" +
644
+ "\x02\x02\\]\x05\x14\v\x02]\x11\x03\x02\x02\x02^_\x07\x18\x02\x02_`\x07" +
645
+ "\x0E\x02\x02`a\x05\x14\v\x02a\x13\x03\x02\x02\x02bu\x05\x16\f\x02cd\x05" +
646
+ "\x16\f\x02de\x07\x0F\x02\x02eu\x03\x02\x02\x02fg\x05\x16\f\x02gh\x07\x10" +
647
+ "\x02\x02hu\x03\x02\x02\x02ij\x07\x19\x02\x02jk\x07\x11\x02\x02ku\x07\x19" +
648
+ "\x02\x02lm\x07\x19\x02\x02mn\x07\x11\x02\x02no\x07\x19\x02\x02ou\x07\x10" +
649
+ "\x02\x02pq\x07\x19\x02\x02qr\x07\x11\x02\x02rs\x07\x19\x02\x02su\x07\x0F" +
650
+ "\x02\x02tb\x03\x02\x02\x02tc\x03\x02\x02\x02tf\x03\x02\x02\x02ti\x03\x02" +
651
+ "\x02\x02tl\x03\x02\x02\x02tp\x03\x02\x02\x02u\x15\x03\x02\x02\x02vw\t" +
652
+ "\x02\x02\x02w\x17\x03\x02\x02\x02\v\x1C%47:FQZt";
653
+ public static __ATN: ATN;
654
+ public static get _ATN(): ATN {
655
+ if (!BlendExpressParser.__ATN) {
656
+ BlendExpressParser.__ATN = new ATNDeserializer().deserialize(Utils.toCharArray(BlendExpressParser._serializedATN));
657
+ }
658
+
659
+ return BlendExpressParser.__ATN;
660
+ }
661
+
662
+ }
663
+
664
+ export class ProgramContext extends ParserRuleContext {
665
+ public moduleDefinition(): ModuleDefinitionContext {
666
+ return this.getRuleContext(0, ModuleDefinitionContext);
667
+ }
668
+ public sectionDefinition(): SectionDefinitionContext[];
669
+ public sectionDefinition(i: number): SectionDefinitionContext;
670
+ public sectionDefinition(i?: number): SectionDefinitionContext | SectionDefinitionContext[] {
671
+ if (i === undefined) {
672
+ return this.getRuleContexts(SectionDefinitionContext);
673
+ } else {
674
+ return this.getRuleContext(i, SectionDefinitionContext);
675
+ }
676
+ }
677
+ constructor(parent: ParserRuleContext | undefined, invokingState: number) {
678
+ super(parent, invokingState);
679
+ }
680
+ // @Override
681
+ public get ruleIndex(): number { return BlendExpressParser.RULE_program; }
682
+ // @Override
683
+ public enterRule(listener: BlendExpressListener): void {
684
+ if (listener.enterProgram) {
685
+ listener.enterProgram(this);
686
+ }
687
+ }
688
+ // @Override
689
+ public exitRule(listener: BlendExpressListener): void {
690
+ if (listener.exitProgram) {
691
+ listener.exitProgram(this);
692
+ }
693
+ }
694
+ }
695
+
696
+
697
+ export class SectionDefinitionContext extends ParserRuleContext {
698
+ public CAPITAL_IDENTIFIER(): TerminalNode { return this.getToken(BlendExpressParser.CAPITAL_IDENTIFIER, 0); }
699
+ public apiDefinition(): ApiDefinitionContext[];
700
+ public apiDefinition(i: number): ApiDefinitionContext;
701
+ public apiDefinition(i?: number): ApiDefinitionContext | ApiDefinitionContext[] {
702
+ if (i === undefined) {
703
+ return this.getRuleContexts(ApiDefinitionContext);
704
+ } else {
705
+ return this.getRuleContext(i, ApiDefinitionContext);
706
+ }
707
+ }
708
+ constructor(parent: ParserRuleContext | undefined, invokingState: number) {
709
+ super(parent, invokingState);
710
+ }
711
+ // @Override
712
+ public get ruleIndex(): number { return BlendExpressParser.RULE_sectionDefinition; }
713
+ // @Override
714
+ public enterRule(listener: BlendExpressListener): void {
715
+ if (listener.enterSectionDefinition) {
716
+ listener.enterSectionDefinition(this);
717
+ }
718
+ }
719
+ // @Override
720
+ public exitRule(listener: BlendExpressListener): void {
721
+ if (listener.exitSectionDefinition) {
722
+ listener.exitSectionDefinition(this);
723
+ }
724
+ }
725
+ }
726
+
727
+
728
+ export class ModuleDefinitionContext extends ParserRuleContext {
729
+ public CAPITAL_IDENTIFIER(): TerminalNode { return this.getToken(BlendExpressParser.CAPITAL_IDENTIFIER, 0); }
730
+ constructor(parent: ParserRuleContext | undefined, invokingState: number) {
731
+ super(parent, invokingState);
732
+ }
733
+ // @Override
734
+ public get ruleIndex(): number { return BlendExpressParser.RULE_moduleDefinition; }
735
+ // @Override
736
+ public enterRule(listener: BlendExpressListener): void {
737
+ if (listener.enterModuleDefinition) {
738
+ listener.enterModuleDefinition(this);
739
+ }
740
+ }
741
+ // @Override
742
+ public exitRule(listener: BlendExpressListener): void {
743
+ if (listener.exitModuleDefinition) {
744
+ listener.exitModuleDefinition(this);
745
+ }
746
+ }
747
+ }
748
+
749
+
750
+ export class ApiDefinitionContext extends ParserRuleContext {
751
+ public IDENTIFIER(): TerminalNode { return this.getToken(BlendExpressParser.IDENTIFIER, 0); }
752
+ public HTTP_METHOD(): TerminalNode { return this.getToken(BlendExpressParser.HTTP_METHOD, 0); }
753
+ public authenticated(): AuthenticatedContext | undefined {
754
+ return this.tryGetRuleContext(0, AuthenticatedContext);
755
+ }
756
+ public inputDefinition(): InputDefinitionContext | undefined {
757
+ return this.tryGetRuleContext(0, InputDefinitionContext);
758
+ }
759
+ public outputDefinition(): OutputDefinitionContext | undefined {
760
+ return this.tryGetRuleContext(0, OutputDefinitionContext);
761
+ }
762
+ constructor(parent: ParserRuleContext | undefined, invokingState: number) {
763
+ super(parent, invokingState);
764
+ }
765
+ // @Override
766
+ public get ruleIndex(): number { return BlendExpressParser.RULE_apiDefinition; }
767
+ // @Override
768
+ public enterRule(listener: BlendExpressListener): void {
769
+ if (listener.enterApiDefinition) {
770
+ listener.enterApiDefinition(this);
771
+ }
772
+ }
773
+ // @Override
774
+ public exitRule(listener: BlendExpressListener): void {
775
+ if (listener.exitApiDefinition) {
776
+ listener.exitApiDefinition(this);
777
+ }
778
+ }
779
+ }
780
+
781
+
782
+ export class AuthenticatedContext extends ParserRuleContext {
783
+ constructor(parent: ParserRuleContext | undefined, invokingState: number) {
784
+ super(parent, invokingState);
785
+ }
786
+ // @Override
787
+ public get ruleIndex(): number { return BlendExpressParser.RULE_authenticated; }
788
+ // @Override
789
+ public enterRule(listener: BlendExpressListener): void {
790
+ if (listener.enterAuthenticated) {
791
+ listener.enterAuthenticated(this);
792
+ }
793
+ }
794
+ // @Override
795
+ public exitRule(listener: BlendExpressListener): void {
796
+ if (listener.exitAuthenticated) {
797
+ listener.exitAuthenticated(this);
798
+ }
799
+ }
800
+ }
801
+
802
+
803
+ export class InputDefinitionContext extends ParserRuleContext {
804
+ public field(): FieldContext[];
805
+ public field(i: number): FieldContext;
806
+ public field(i?: number): FieldContext | FieldContext[] {
807
+ if (i === undefined) {
808
+ return this.getRuleContexts(FieldContext);
809
+ } else {
810
+ return this.getRuleContext(i, FieldContext);
811
+ }
812
+ }
813
+ constructor(parent: ParserRuleContext | undefined, invokingState: number) {
814
+ super(parent, invokingState);
815
+ }
816
+ // @Override
817
+ public get ruleIndex(): number { return BlendExpressParser.RULE_inputDefinition; }
818
+ // @Override
819
+ public enterRule(listener: BlendExpressListener): void {
820
+ if (listener.enterInputDefinition) {
821
+ listener.enterInputDefinition(this);
822
+ }
823
+ }
824
+ // @Override
825
+ public exitRule(listener: BlendExpressListener): void {
826
+ if (listener.exitInputDefinition) {
827
+ listener.exitInputDefinition(this);
828
+ }
829
+ }
830
+ }
831
+
832
+
833
+ export class OutputDefinitionContext extends ParserRuleContext {
834
+ public field(): FieldContext[];
835
+ public field(i: number): FieldContext;
836
+ public field(i?: number): FieldContext | FieldContext[] {
837
+ if (i === undefined) {
838
+ return this.getRuleContexts(FieldContext);
839
+ } else {
840
+ return this.getRuleContext(i, FieldContext);
841
+ }
842
+ }
843
+ public directOutputDefenition(): DirectOutputDefenitionContext | undefined {
844
+ return this.tryGetRuleContext(0, DirectOutputDefenitionContext);
845
+ }
846
+ constructor(parent: ParserRuleContext | undefined, invokingState: number) {
847
+ super(parent, invokingState);
848
+ }
849
+ // @Override
850
+ public get ruleIndex(): number { return BlendExpressParser.RULE_outputDefinition; }
851
+ // @Override
852
+ public enterRule(listener: BlendExpressListener): void {
853
+ if (listener.enterOutputDefinition) {
854
+ listener.enterOutputDefinition(this);
855
+ }
856
+ }
857
+ // @Override
858
+ public exitRule(listener: BlendExpressListener): void {
859
+ if (listener.exitOutputDefinition) {
860
+ listener.exitOutputDefinition(this);
861
+ }
862
+ }
863
+ }
864
+
865
+
866
+ export class DirectOutputDefenitionContext extends ParserRuleContext {
867
+ public type(): TypeContext {
868
+ return this.getRuleContext(0, TypeContext);
869
+ }
870
+ constructor(parent: ParserRuleContext | undefined, invokingState: number) {
871
+ super(parent, invokingState);
872
+ }
873
+ // @Override
874
+ public get ruleIndex(): number { return BlendExpressParser.RULE_directOutputDefenition; }
875
+ // @Override
876
+ public enterRule(listener: BlendExpressListener): void {
877
+ if (listener.enterDirectOutputDefenition) {
878
+ listener.enterDirectOutputDefenition(this);
879
+ }
880
+ }
881
+ // @Override
882
+ public exitRule(listener: BlendExpressListener): void {
883
+ if (listener.exitDirectOutputDefenition) {
884
+ listener.exitDirectOutputDefenition(this);
885
+ }
886
+ }
887
+ }
888
+
889
+
890
+ export class FieldContext extends ParserRuleContext {
891
+ public IDENTIFIER(): TerminalNode { return this.getToken(BlendExpressParser.IDENTIFIER, 0); }
892
+ public type(): TypeContext {
893
+ return this.getRuleContext(0, TypeContext);
894
+ }
895
+ constructor(parent: ParserRuleContext | undefined, invokingState: number) {
896
+ super(parent, invokingState);
897
+ }
898
+ // @Override
899
+ public get ruleIndex(): number { return BlendExpressParser.RULE_field; }
900
+ // @Override
901
+ public enterRule(listener: BlendExpressListener): void {
902
+ if (listener.enterField) {
903
+ listener.enterField(this);
904
+ }
905
+ }
906
+ // @Override
907
+ public exitRule(listener: BlendExpressListener): void {
908
+ if (listener.exitField) {
909
+ listener.exitField(this);
910
+ }
911
+ }
912
+ }
913
+
914
+
915
+ export class TypeContext extends ParserRuleContext {
916
+ public primitiveType(): PrimitiveTypeContext | undefined {
917
+ return this.tryGetRuleContext(0, PrimitiveTypeContext);
918
+ }
919
+ public CAPITAL_IDENTIFIER(): TerminalNode[];
920
+ public CAPITAL_IDENTIFIER(i: number): TerminalNode;
921
+ public CAPITAL_IDENTIFIER(i?: number): TerminalNode | TerminalNode[] {
922
+ if (i === undefined) {
923
+ return this.getTokens(BlendExpressParser.CAPITAL_IDENTIFIER);
924
+ } else {
925
+ return this.getToken(BlendExpressParser.CAPITAL_IDENTIFIER, i);
926
+ }
927
+ }
928
+ constructor(parent: ParserRuleContext | undefined, invokingState: number) {
929
+ super(parent, invokingState);
930
+ }
931
+ // @Override
932
+ public get ruleIndex(): number { return BlendExpressParser.RULE_type; }
933
+ // @Override
934
+ public enterRule(listener: BlendExpressListener): void {
935
+ if (listener.enterType) {
936
+ listener.enterType(this);
937
+ }
938
+ }
939
+ // @Override
940
+ public exitRule(listener: BlendExpressListener): void {
941
+ if (listener.exitType) {
942
+ listener.exitType(this);
943
+ }
944
+ }
945
+ }
946
+
947
+
948
+ export class PrimitiveTypeContext extends ParserRuleContext {
949
+ constructor(parent: ParserRuleContext | undefined, invokingState: number) {
950
+ super(parent, invokingState);
951
+ }
952
+ // @Override
953
+ public get ruleIndex(): number { return BlendExpressParser.RULE_primitiveType; }
954
+ // @Override
955
+ public enterRule(listener: BlendExpressListener): void {
956
+ if (listener.enterPrimitiveType) {
957
+ listener.enterPrimitiveType(this);
958
+ }
959
+ }
960
+ // @Override
961
+ public exitRule(listener: BlendExpressListener): void {
962
+ if (listener.exitPrimitiveType) {
963
+ listener.exitPrimitiveType(this);
964
+ }
965
+ }
966
+ }
967
+
968
+