@react-querybuilder/core 8.10.0 → 8.11.1

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 (73) hide show
  1. package/dist/{arrayUtils-C9sO4qLO.mjs → arrayUtils-A_OXU9W1.mjs} +3 -3
  2. package/dist/{arrayUtils-C9sO4qLO.mjs.map → arrayUtils-A_OXU9W1.mjs.map} +1 -1
  3. package/dist/basic-B4vXboTG.d.mts +1257 -0
  4. package/dist/basic-BeKPP0_1.d.ts +1257 -0
  5. package/dist/cjs/react-querybuilder_core.cjs.development.d.ts +412 -278
  6. package/dist/cjs/react-querybuilder_core.cjs.development.js +53 -1
  7. package/dist/cjs/react-querybuilder_core.cjs.development.js.map +1 -1
  8. package/dist/cjs/react-querybuilder_core.cjs.production.d.ts +412 -278
  9. package/dist/cjs/react-querybuilder_core.cjs.production.js +1 -1
  10. package/dist/cjs/react-querybuilder_core.cjs.production.js.map +1 -1
  11. package/dist/{convertQuery-BUgyz1GA.mjs → convertQuery-CqX3rPvj.mjs} +3 -3
  12. package/dist/{convertQuery-BUgyz1GA.mjs.map → convertQuery-CqX3rPvj.mjs.map} +1 -1
  13. package/dist/{export-GUuxJ7zR.d.ts → export-BjRt-qrK.d.mts} +6 -7
  14. package/dist/{export-Ccjfea21.d.mts → export-CQB0nuvW.d.ts} +6 -7
  15. package/dist/formatQuery.d.mts +2 -3
  16. package/dist/formatQuery.d.ts +2 -3
  17. package/dist/formatQuery.mjs +6 -6
  18. package/dist/{import-Dxevzw_-.d.mts → import-Bc_p8ls9.d.mts} +3 -3
  19. package/dist/{import-D-hm1phN.d.ts → import-Dvayhrgj.d.ts} +3 -3
  20. package/dist/{isRuleGroup-CGe_rb2w.mjs → isRuleGroup-CYcfPgbg.mjs} +2 -2
  21. package/dist/{isRuleGroup-CGe_rb2w.mjs.map → isRuleGroup-CYcfPgbg.mjs.map} +1 -1
  22. package/dist/optGroupUtils-B0hTpodo.js.map +1 -1
  23. package/dist/{optGroupUtils-DrubUpx0.mjs → optGroupUtils-VeZ3k7-1.mjs} +3 -3
  24. package/dist/optGroupUtils-VeZ3k7-1.mjs.map +1 -0
  25. package/dist/parseCEL.d.mts +2 -3
  26. package/dist/parseCEL.d.ts +2 -3
  27. package/dist/parseCEL.js +761 -1095
  28. package/dist/parseCEL.js.map +1 -1
  29. package/dist/parseCEL.mjs +763 -1099
  30. package/dist/parseCEL.mjs.map +1 -1
  31. package/dist/parseJSONata.d.mts +2 -3
  32. package/dist/parseJSONata.d.ts +2 -3
  33. package/dist/parseJSONata.mjs +3 -3
  34. package/dist/parseJsonLogic.d.mts +4 -4
  35. package/dist/parseJsonLogic.d.ts +4 -4
  36. package/dist/parseJsonLogic.mjs +5 -5
  37. package/dist/parseMongoDB.d.mts +2 -3
  38. package/dist/parseMongoDB.d.ts +2 -3
  39. package/dist/parseMongoDB.mjs +5 -5
  40. package/dist/{parseNumber-B_-sR6d5.mjs → parseNumber-CXdMVNFx.mjs} +2 -2
  41. package/dist/{parseNumber-B_-sR6d5.mjs.map → parseNumber-CXdMVNFx.mjs.map} +1 -1
  42. package/dist/parseSQL.d.mts +2 -3
  43. package/dist/parseSQL.d.ts +2 -3
  44. package/dist/parseSQL.js +2681 -3021
  45. package/dist/parseSQL.js.map +1 -1
  46. package/dist/parseSQL.mjs +2684 -3026
  47. package/dist/parseSQL.mjs.map +1 -1
  48. package/dist/parseSpEL.d.mts +2 -3
  49. package/dist/parseSpEL.d.ts +2 -3
  50. package/dist/parseSpEL.mjs +4 -4
  51. package/dist/{prepareQueryObjects-CJNpnGcJ.mjs → prepareQueryObjects-DPCC-iHp.mjs} +4 -4
  52. package/dist/{prepareQueryObjects-CJNpnGcJ.mjs.map → prepareQueryObjects-DPCC-iHp.mjs.map} +1 -1
  53. package/dist/query-builder.css +1 -1
  54. package/dist/query-builder.css.map +1 -1
  55. package/dist/react-querybuilder_core.d.mts +412 -278
  56. package/dist/react-querybuilder_core.legacy-esm.d.ts +412 -278
  57. package/dist/react-querybuilder_core.legacy-esm.js +57 -9
  58. package/dist/react-querybuilder_core.legacy-esm.js.map +1 -1
  59. package/dist/react-querybuilder_core.mjs +50 -2
  60. package/dist/react-querybuilder_core.mjs.map +1 -1
  61. package/dist/react-querybuilder_core.production.d.mts +412 -278
  62. package/dist/react-querybuilder_core.production.mjs +1 -1
  63. package/dist/react-querybuilder_core.production.mjs.map +1 -1
  64. package/dist/styles/_main.scss +5 -0
  65. package/dist/{transformQuery-DHvtgDgZ.mjs → transformQuery-DCCpjtyq.mjs} +3 -3
  66. package/dist/{transformQuery-DHvtgDgZ.mjs.map → transformQuery-DCCpjtyq.mjs.map} +1 -1
  67. package/dist/transformQuery.d.mts +1 -1
  68. package/dist/transformQuery.d.ts +1 -1
  69. package/dist/transformQuery.mjs +2 -2
  70. package/package.json +11 -9
  71. package/dist/basic-BmpEwexQ.d.mts +0 -363
  72. package/dist/basic-CDDA-KZa.d.ts +0 -363
  73. package/dist/optGroupUtils-DrubUpx0.mjs.map +0 -1
package/dist/parseCEL.js CHANGED
@@ -2,566 +2,283 @@ const require_isRuleGroup = require('./isRuleGroup-DqAs2x4E.js');
2
2
  const require_optGroupUtils = require('./optGroupUtils-B0hTpodo.js');
3
3
  const require_arrayUtils = require('./arrayUtils-QxZOZTf6.js');
4
4
  const require_prepareQueryObjects = require('./prepareQueryObjects-BOUWfel5.js');
5
+ let __ts_jison_parser = require("@ts-jison/parser");
6
+ __ts_jison_parser = require_isRuleGroup.__toESM(__ts_jison_parser);
7
+ let __ts_jison_lexer = require("@ts-jison/lexer");
8
+ __ts_jison_lexer = require_isRuleGroup.__toESM(__ts_jison_lexer);
5
9
 
6
- //#region src/utils/parseCEL/celParser.js
7
- var celParser = (function() {
8
- var o = function(k, v, o$1, l) {
9
- for (o$1 = o$1 || {}, l = k.length; l--; o$1[k[l]] = v);
10
- return o$1;
11
- }, $V0 = [1, 27], $V1 = [1, 31], $V2 = [1, 32], $V3 = [1, 28], $V4 = [1, 29], $V5 = [1, 30], $V6 = [1, 33], $V7 = [1, 34], $V8 = [1, 18], $V9 = [1, 26], $Va = [1, 12], $Vb = [1, 13], $Vc = [1, 19], $Vd = [1, 20], $Ve = [1, 40], $Vf = [1, 39], $Vg = [1, 41], $Vh = [1, 42], $Vi = [1, 43], $Vj = [1, 36], $Vk = [1, 37], $Vl = [1, 38], $Vm = [
12
- 5,
13
- 37,
14
- 43,
15
- 45,
16
- 49,
17
- 50,
18
- 53,
19
- 54,
20
- 55,
21
- 56,
22
- 60,
23
- 61,
24
- 62,
25
- 63
26
- ], $Vn = [1, 44], $Vo = [1, 45], $Vp = [1, 46], $Vq = [
27
- 5,
28
- 23,
29
- 24,
30
- 25,
31
- 26,
32
- 27,
33
- 28,
34
- 31,
35
- 37,
36
- 40,
37
- 43,
38
- 44,
39
- 45,
40
- 46,
41
- 49,
42
- 50,
43
- 53,
44
- 54,
45
- 55,
46
- 56,
47
- 60,
48
- 61,
49
- 62,
50
- 63
51
- ], $Vr = [
52
- 7,
53
- 9,
54
- 10,
55
- 12,
56
- 13,
57
- 14,
58
- 16,
59
- 18,
60
- 21,
61
- 35,
62
- 40,
63
- 41,
64
- 44,
65
- 46
66
- ], $Vs = [2, 36], $Vt = [1, 85], $Vu = [
67
- 43,
68
- 45,
69
- 50
70
- ], $Vv = [
71
- 5,
72
- 37,
73
- 43,
74
- 45,
75
- 49,
76
- 50,
77
- 53,
78
- 61,
79
- 62,
80
- 63
81
- ], $Vw = [
82
- 5,
83
- 37,
84
- 43,
85
- 45,
86
- 49,
87
- 50,
88
- 53,
89
- 54,
90
- 55,
91
- 56,
92
- 61,
93
- 62,
94
- 63
95
- ], $Vx = [2, 37], $Vy = [49, 50];
96
- var parser = {
97
- trace: function trace() {},
98
- yy: {},
99
- symbols_: {
100
- "error": 2,
101
- "main": 3,
102
- "expr": 4,
103
- "EOF": 5,
104
- "string_literal": 6,
105
- "STRING_LIT": 7,
106
- "bytes_literal": 8,
107
- "b": 9,
108
- "B": 10,
109
- "number_literal": 11,
110
- "INT_LIT": 12,
111
- "UINT_LIT": 13,
112
- "FLOAT_LIT": 14,
113
- "boolean_literal": 15,
114
- "BOOL_LIT": 16,
115
- "null_literal": 17,
116
- "NULL_LIT": 18,
117
- "literal": 19,
118
- "ident": 20,
119
- "IDENT": 21,
120
- "relop": 22,
121
- "==": 23,
122
- ">=": 24,
123
- ">": 25,
124
- "<=": 26,
125
- "<": 27,
126
- "!=": 28,
127
- "relation": 29,
128
- "member": 30,
129
- "in": 31,
130
- "list": 32,
131
- "map": 33,
132
- "negation": 34,
133
- "!": 35,
134
- "negative": 36,
135
- "-": 37,
136
- "unary": 38,
137
- "primary": 39,
138
- "DOT": 40,
139
- "(": 41,
140
- "expr_list": 42,
141
- ")": 43,
142
- "[": 44,
143
- "]": 45,
144
- "{": 46,
145
- "field_inits": 47,
146
- "trailing_comma": 48,
147
- "}": 49,
148
- ",": 50,
149
- "map_inits": 51,
150
- "math_operation": 52,
151
- "+": 53,
152
- "*": 54,
153
- "/": 55,
154
- "%": 56,
155
- "conditional_expr": 57,
156
- "conditional_and": 58,
157
- "conditional_or": 59,
158
- "?": 60,
159
- ":": 61,
160
- "&&": 62,
161
- "||": 63,
162
- "$accept": 0,
163
- "$end": 1
164
- },
165
- terminals_: {
166
- 2: "error",
167
- 5: "EOF",
168
- 7: "STRING_LIT",
169
- 9: "b",
170
- 10: "B",
171
- 12: "INT_LIT",
172
- 13: "UINT_LIT",
173
- 14: "FLOAT_LIT",
174
- 16: "BOOL_LIT",
175
- 18: "NULL_LIT",
176
- 21: "IDENT",
177
- 23: "==",
178
- 24: ">=",
179
- 25: ">",
180
- 26: "<=",
181
- 27: "<",
182
- 28: "!=",
183
- 31: "in",
184
- 35: "!",
185
- 37: "-",
186
- 40: "DOT",
187
- 41: "(",
188
- 43: ")",
189
- 44: "[",
190
- 45: "]",
191
- 46: "{",
192
- 49: "}",
193
- 50: ",",
194
- 53: "+",
195
- 54: "*",
196
- 55: "/",
197
- 56: "%",
198
- 60: "?",
199
- 61: ":",
200
- 62: "&&",
201
- 63: "||"
202
- },
203
- productions_: [
204
- 0,
205
- [3, 2],
206
- [6, 1],
207
- [8, 2],
208
- [8, 2],
209
- [11, 1],
210
- [11, 1],
211
- [11, 1],
212
- [15, 1],
213
- [17, 1],
214
- [19, 1],
215
- [19, 1],
216
- [19, 1],
217
- [19, 1],
218
- [19, 1],
219
- [20, 1],
220
- [22, 1],
221
- [22, 1],
222
- [22, 1],
223
- [22, 1],
224
- [22, 1],
225
- [22, 1],
226
- [29, 3],
227
- [29, 3],
228
- [29, 3],
229
- [34, 1],
230
- [34, 2],
231
- [36, 1],
232
- [36, 2],
233
- [38, 2],
234
- [30, 1],
235
- [30, 1],
236
- [30, 3],
237
- [30, 6],
238
- [30, 4],
239
- [30, 5],
240
- [48, 0],
241
- [48, 1],
242
- [39, 1],
243
- [39, 2],
244
- [39, 5],
245
- [39, 6],
246
- [39, 3],
247
- [39, 1],
248
- [39, 1],
249
- [39, 1],
250
- [32, 4],
251
- [33, 4],
252
- [52, 3],
253
- [52, 3],
254
- [52, 3],
255
- [52, 3],
256
- [52, 3],
257
- [4, 1],
258
- [4, 1],
259
- [4, 1],
260
- [4, 1],
261
- [4, 1],
262
- [4, 1],
263
- [57, 5],
264
- [58, 3],
265
- [59, 3],
266
- [42, 1],
267
- [42, 3],
268
- [47, 3],
269
- [47, 5],
270
- [51, 3],
271
- [51, 5]
272
- ],
273
- performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
274
- var $0 = $$.length - 1;
275
- switch (yystate) {
276
- case 1: return {
277
- nodeType: "Main",
278
- value: $$[$0 - 1]
279
- };
280
- case 2:
281
- this.$ = {
282
- type: "StringLiteral",
283
- value: $$[$0]
284
- };
285
- break;
286
- case 3:
287
- case 4:
288
- this.$ = {
289
- type: "BytesLiteral",
290
- value: $$[$0]
291
- };
292
- break;
293
- case 5:
294
- this.$ = {
295
- type: "IntegerLiteral",
296
- value: parseInt($$[$0], /x/.test($$[$0]) ? 16 : 10)
297
- };
298
- break;
299
- case 6:
300
- this.$ = {
301
- type: "UnsignedIntegerLiteral",
302
- value: parseInt($$[$0].replace(/u$/i, ""), /^0x/.test($$[$0]) ? 16 : 10)
303
- };
304
- break;
305
- case 7:
306
- this.$ = {
307
- type: "FloatLiteral",
308
- value: parseFloat($$[$0])
309
- };
310
- break;
311
- case 8:
312
- this.$ = {
313
- type: "BooleanLiteral",
314
- value: $$[$0] === "true"
315
- };
316
- break;
317
- case 9:
318
- this.$ = {
319
- type: "NullLiteral",
320
- value: null
321
- };
322
- break;
323
- case 10:
324
- case 11:
325
- case 12:
326
- case 13:
327
- case 14:
328
- case 16:
329
- case 17:
330
- case 18:
331
- case 19:
332
- case 20:
333
- case 21:
334
- case 38:
335
- case 43:
336
- case 44:
337
- case 45:
338
- case 53:
339
- case 54:
340
- case 55:
341
- case 56:
342
- case 57:
343
- case 58:
344
- this.$ = $$[$0];
345
- break;
346
- case 15:
347
- this.$ = {
348
- type: "Identifier",
349
- value: $$[$0]
350
- };
351
- break;
352
- case 22:
353
- case 23:
354
- case 24:
355
- this.$ = {
356
- type: "Relation",
357
- left: $$[$0 - 2],
358
- operator: $$[$0 - 1],
359
- right: $$[$0]
360
- };
361
- break;
362
- case 25:
363
- case 27:
364
- this.$ = 1;
365
- break;
366
- case 26:
367
- case 28:
368
- this.$ = this.$ += 1;
369
- break;
370
- case 29:
371
- this.$ = {
372
- type: "Negation",
373
- negations: $$[$0 - 1],
374
- value: $$[$0]
375
- };
376
- break;
377
- case 30:
378
- case 31:
379
- this.$ = $$[$0];
380
- break;
381
- case 32:
382
- this.$ = {
383
- type: "Member",
384
- left: $$[$0 - 2],
385
- right: $$[$0]
386
- };
387
- break;
388
- case 33:
389
- this.$ = {
390
- type: "Member",
391
- left: $$[$0 - 5],
392
- right: $$[$0 - 3],
393
- list: $$[$0 - 1]
394
- };
395
- break;
396
- case 34:
397
- this.$ = {
398
- type: "DynamicPropertyAccessor",
399
- left: $$[$0 - 3],
400
- right: $$[$0 - 1]
401
- };
402
- break;
403
- case 35:
404
- this.$ = {
405
- type: "FieldsObject",
406
- left: $$[$0 - 4],
407
- list: $$[$0 - 2],
408
- trailingComma: $$[$0 - 1]
409
- };
410
- break;
411
- case 36:
412
- this.$ = false;
413
- break;
414
- case 37:
415
- this.$ = true;
416
- break;
417
- case 39:
418
- this.$ = {
419
- type: "Property",
420
- value: $$[$0]
421
- };
422
- break;
423
- case 40:
424
- this.$ = {
425
- type: "FunctionCall",
426
- name: $$[$0 - 4],
427
- args: $$[$0 - 2],
428
- trailingComma: $$[$0 - 1]
429
- };
430
- break;
431
- case 41:
432
- this.$ = {
433
- type: "Property",
434
- value: $$[$0 - 4],
435
- args: $$[$0 - 2],
436
- trailingComma: $$[$0 - 1]
437
- };
438
- break;
439
- case 42:
440
- this.$ = {
441
- type: "ExpressionGroup",
442
- value: $$[$0 - 1]
443
- };
444
- break;
445
- case 46:
446
- this.$ = {
447
- type: "List",
448
- value: $$[$0 - 2],
449
- trailingComma: $$[$0 - 1]
450
- };
451
- break;
452
- case 47:
453
- this.$ = {
454
- type: "Map",
455
- value: $$[$0 - 2],
456
- trailingComma: $$[$0 - 1]
457
- };
458
- break;
459
- case 48:
460
- this.$ = {
461
- type: "Addition",
462
- left: $$[$0 - 2],
463
- right: $$[$0]
464
- };
465
- break;
466
- case 49:
467
- this.$ = {
468
- type: "Subtraction",
469
- left: $$[$0 - 2],
470
- right: $$[$0]
471
- };
472
- break;
473
- case 50:
474
- this.$ = {
475
- type: "Multiplication",
476
- left: $$[$0 - 2],
477
- right: $$[$0]
478
- };
479
- break;
480
- case 51:
481
- this.$ = {
482
- type: "Division",
483
- left: $$[$0 - 2],
484
- right: $$[$0]
485
- };
486
- break;
487
- case 52:
488
- this.$ = {
489
- type: "Modulo",
490
- left: $$[$0 - 2],
491
- right: $$[$0]
492
- };
493
- break;
494
- case 59:
495
- this.$ = {
496
- type: "ConditionalExpr",
497
- condition: $$[$0 - 4],
498
- valueIfTrue: $$[$0 - 2],
499
- valueIfFalse: $$[$0]
500
- };
501
- break;
502
- case 60:
503
- this.$ = {
504
- type: "ConditionalAnd",
505
- left: $$[$0 - 2],
506
- right: $$[$0]
507
- };
508
- break;
509
- case 61:
510
- this.$ = {
511
- type: "ConditionalOr",
512
- left: $$[$0 - 2],
513
- right: $$[$0]
514
- };
515
- break;
516
- case 62:
517
- this.$ = {
518
- type: "ExpressionList",
519
- value: [$$[$0]]
520
- };
521
- break;
522
- case 63:
523
- this.$ = $$[$0 - 2];
524
- this.$.value.push($$[$0]);
525
- break;
526
- case 64:
527
- this.$ = {
528
- type: "FieldInits",
529
- value: [{
530
- type: "FieldInit",
531
- left: $$[$0 - 2],
532
- right: $$[$0]
533
- }]
534
- };
535
- break;
536
- case 65:
537
- this.$ = $$[$0 - 4];
538
- this.$.value.push({
539
- type: "FieldInit",
540
- left: $$[$0 - 2],
541
- right: $$[$0]
542
- });
543
- break;
544
- case 66:
545
- this.$ = {
546
- type: "MapInits",
547
- value: [{
548
- type: "MapInit",
549
- left: $$[$0 - 2],
550
- right: $$[$0]
551
- }]
552
- };
553
- break;
554
- case 67:
555
- this.$ = $$[$0 - 4];
556
- this.$.value.push({
557
- type: "MapInit",
558
- left: $$[$0 - 2],
559
- right: $$[$0]
560
- });
561
- break;
562
- }
563
- },
564
- table: [
10
+ //#region src/utils/parseCEL/celParser.ts
11
+ /**
12
+ * parser generated by @ts-jison/parser-generator 0.4.1-alpha.2
13
+ * @returns Parser implementing JisonParserApi and a Lexer implementing JisonLexerApi.
14
+ */
15
+ var CELParser = class extends __ts_jison_parser.JisonParser {
16
+ $;
17
+ symbols_ = {
18
+ "error": 2,
19
+ "main": 3,
20
+ "expr": 4,
21
+ "EOF": 5,
22
+ "string_literal": 6,
23
+ "STRING_LIT": 7,
24
+ "bytes_literal": 8,
25
+ "b": 9,
26
+ "B": 10,
27
+ "number_literal": 11,
28
+ "INT_LIT": 12,
29
+ "UINT_LIT": 13,
30
+ "FLOAT_LIT": 14,
31
+ "boolean_literal": 15,
32
+ "BOOL_LIT": 16,
33
+ "null_literal": 17,
34
+ "NULL_LIT": 18,
35
+ "literal": 19,
36
+ "ident": 20,
37
+ "IDENT": 21,
38
+ "relop": 22,
39
+ "==": 23,
40
+ ">=": 24,
41
+ ">": 25,
42
+ "<=": 26,
43
+ "<": 27,
44
+ "!=": 28,
45
+ "relation": 29,
46
+ "member": 30,
47
+ "in": 31,
48
+ "list": 32,
49
+ "map": 33,
50
+ "negation": 34,
51
+ "!": 35,
52
+ "negative": 36,
53
+ "-": 37,
54
+ "unary": 38,
55
+ "primary": 39,
56
+ "DOT": 40,
57
+ "(": 41,
58
+ "expr_list": 42,
59
+ ")": 43,
60
+ "[": 44,
61
+ "]": 45,
62
+ "{": 46,
63
+ "field_inits": 47,
64
+ "trailing_comma": 48,
65
+ "}": 49,
66
+ ",": 50,
67
+ "map_inits": 51,
68
+ "math_operation": 52,
69
+ "+": 53,
70
+ "*": 54,
71
+ "/": 55,
72
+ "%": 56,
73
+ "conditional_expr": 57,
74
+ "conditional_and": 58,
75
+ "conditional_or": 59,
76
+ "?": 60,
77
+ ":": 61,
78
+ "&&": 62,
79
+ "||": 63,
80
+ "$accept": 0,
81
+ "$end": 1
82
+ };
83
+ terminals_ = {
84
+ 2: "error",
85
+ 5: "EOF",
86
+ 7: "STRING_LIT",
87
+ 9: "b",
88
+ 10: "B",
89
+ 12: "INT_LIT",
90
+ 13: "UINT_LIT",
91
+ 14: "FLOAT_LIT",
92
+ 16: "BOOL_LIT",
93
+ 18: "NULL_LIT",
94
+ 21: "IDENT",
95
+ 23: "==",
96
+ 24: ">=",
97
+ 25: ">",
98
+ 26: "<=",
99
+ 27: "<",
100
+ 28: "!=",
101
+ 31: "in",
102
+ 35: "!",
103
+ 37: "-",
104
+ 40: "DOT",
105
+ 41: "(",
106
+ 43: ")",
107
+ 44: "[",
108
+ 45: "]",
109
+ 46: "{",
110
+ 49: "}",
111
+ 50: ",",
112
+ 53: "+",
113
+ 54: "*",
114
+ 55: "/",
115
+ 56: "%",
116
+ 60: "?",
117
+ 61: ":",
118
+ 62: "&&",
119
+ 63: "||"
120
+ };
121
+ productions_ = [
122
+ 0,
123
+ [3, 2],
124
+ [6, 1],
125
+ [8, 2],
126
+ [8, 2],
127
+ [11, 1],
128
+ [11, 1],
129
+ [11, 1],
130
+ [15, 1],
131
+ [17, 1],
132
+ [19, 1],
133
+ [19, 1],
134
+ [19, 1],
135
+ [19, 1],
136
+ [19, 1],
137
+ [20, 1],
138
+ [22, 1],
139
+ [22, 1],
140
+ [22, 1],
141
+ [22, 1],
142
+ [22, 1],
143
+ [22, 1],
144
+ [29, 3],
145
+ [29, 3],
146
+ [29, 3],
147
+ [34, 1],
148
+ [34, 2],
149
+ [36, 1],
150
+ [36, 2],
151
+ [38, 2],
152
+ [30, 1],
153
+ [30, 1],
154
+ [30, 3],
155
+ [30, 6],
156
+ [30, 4],
157
+ [30, 5],
158
+ [48, 0],
159
+ [48, 1],
160
+ [39, 1],
161
+ [39, 2],
162
+ [39, 5],
163
+ [39, 6],
164
+ [39, 3],
165
+ [39, 1],
166
+ [39, 1],
167
+ [39, 1],
168
+ [32, 4],
169
+ [33, 4],
170
+ [52, 3],
171
+ [52, 3],
172
+ [52, 3],
173
+ [52, 3],
174
+ [52, 3],
175
+ [4, 1],
176
+ [4, 1],
177
+ [4, 1],
178
+ [4, 1],
179
+ [4, 1],
180
+ [4, 1],
181
+ [57, 5],
182
+ [58, 3],
183
+ [59, 3],
184
+ [42, 1],
185
+ [42, 3],
186
+ [47, 3],
187
+ [47, 5],
188
+ [51, 3],
189
+ [51, 5]
190
+ ];
191
+ table;
192
+ defaultActions = { 35: [2, 1] };
193
+ constructor(yy = {}, lexer = new CELLexer(yy)) {
194
+ super(yy, lexer);
195
+ const $V0 = [1, 27], $V1 = [1, 31], $V2 = [1, 32], $V3 = [1, 28], $V4 = [1, 29], $V5 = [1, 30], $V6 = [1, 33], $V7 = [1, 34], $V8 = [1, 18], $V9 = [1, 26], $Va = [1, 12], $Vb = [1, 13], $Vc = [1, 19], $Vd = [1, 20], $Ve = [1, 40], $Vf = [1, 39], $Vg = [1, 41], $Vh = [1, 42], $Vi = [1, 43], $Vj = [1, 36], $Vk = [1, 37], $Vl = [1, 38], $Vm = [
196
+ 5,
197
+ 37,
198
+ 43,
199
+ 45,
200
+ 49,
201
+ 50,
202
+ 53,
203
+ 54,
204
+ 55,
205
+ 56,
206
+ 60,
207
+ 61,
208
+ 62,
209
+ 63
210
+ ], $Vn = [1, 44], $Vo = [1, 45], $Vp = [1, 46], $Vq = [
211
+ 5,
212
+ 23,
213
+ 24,
214
+ 25,
215
+ 26,
216
+ 27,
217
+ 28,
218
+ 31,
219
+ 37,
220
+ 40,
221
+ 43,
222
+ 44,
223
+ 45,
224
+ 46,
225
+ 49,
226
+ 50,
227
+ 53,
228
+ 54,
229
+ 55,
230
+ 56,
231
+ 60,
232
+ 61,
233
+ 62,
234
+ 63
235
+ ], $Vr = [
236
+ 7,
237
+ 9,
238
+ 10,
239
+ 12,
240
+ 13,
241
+ 14,
242
+ 16,
243
+ 18,
244
+ 21,
245
+ 35,
246
+ 40,
247
+ 41,
248
+ 44,
249
+ 46
250
+ ], $Vs = [2, 36], $Vt = [1, 85], $Vu = [
251
+ 43,
252
+ 45,
253
+ 50
254
+ ], $Vv = [
255
+ 5,
256
+ 37,
257
+ 43,
258
+ 45,
259
+ 49,
260
+ 50,
261
+ 53,
262
+ 61,
263
+ 62,
264
+ 63
265
+ ], $Vw = [
266
+ 5,
267
+ 37,
268
+ 43,
269
+ 45,
270
+ 49,
271
+ 50,
272
+ 53,
273
+ 54,
274
+ 55,
275
+ 56,
276
+ 61,
277
+ 62,
278
+ 63
279
+ ], $Vx = [2, 37], $Vy = [49, 50];
280
+ const o = __ts_jison_parser.JisonParser.expandParseTable;
281
+ this.table = [
565
282
  {
566
283
  3: 1,
567
284
  4: 2,
@@ -1800,548 +1517,496 @@ var celParser = (function() {
1800
1517
  62: $Vk,
1801
1518
  63: $Vl
1802
1519
  })
1803
- ],
1804
- defaultActions: { 35: [2, 1] },
1805
- parseError: function parseError(str, hash) {
1806
- if (hash.recoverable) this.trace(str);
1807
- else {
1808
- var error = Error(str);
1809
- error.hash = hash;
1810
- throw error;
1811
- }
1812
- },
1813
- parse: function parse(input) {
1814
- var self = this, stack = [0], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1, args = lstack.slice.call(arguments, 1), lexer = Object.create(this.lexer), sharedState = { yy: {} };
1815
- for (var k in this.yy) if (Object.prototype.hasOwnProperty.call(this.yy, k)) sharedState.yy[k] = this.yy[k];
1816
- lexer.setInput(input, sharedState.yy);
1817
- sharedState.yy.lexer = lexer;
1818
- sharedState.yy.parser = this;
1819
- if (typeof lexer.yylloc > "u") lexer.yylloc = {};
1820
- var yyloc = lexer.yylloc;
1821
- lstack.push(yyloc);
1822
- var ranges = lexer.options && lexer.options.ranges;
1823
- if (typeof sharedState.yy.parseError === "function") this.parseError = sharedState.yy.parseError;
1824
- else this.parseError = Object.getPrototypeOf(this).parseError;
1825
- function popStack(n) {
1826
- stack.length = stack.length - 2 * n;
1827
- vstack.length = vstack.length - n;
1828
- lstack.length = lstack.length - n;
1829
- }
1830
- var lex = function() {
1831
- var token = lexer.lex() || EOF;
1832
- if (typeof token !== "number") token = self.symbols_[token] || token;
1833
- return token;
1834
- }, symbol, preErrorSymbol, state, action, r, yyval = {}, p, len, newState, expected;
1835
- while (!0) {
1836
- state = stack[stack.length - 1];
1837
- if (this.defaultActions[state]) action = this.defaultActions[state];
1838
- else {
1839
- if (symbol === null || typeof symbol > "u") symbol = lex();
1840
- action = table[state] && table[state][symbol];
1841
- }
1842
- if (typeof action > "u" || !action.length || !action[0]) {
1843
- let locateNearestErrorRecoveryRule = function(state$1) {
1844
- var stack_probe = stack.length - 1, depth = 0;
1845
- for (;;) {
1846
- if (TERROR.toString() in table[state$1]) return depth;
1847
- if (state$1 === 0 || stack_probe < 2) return !1;
1848
- stack_probe -= 2;
1849
- state$1 = stack[stack_probe];
1850
- ++depth;
1851
- }
1852
- };
1853
- var error_rule_depth, errStr = "";
1854
- if (!recovering) {
1855
- error_rule_depth = locateNearestErrorRecoveryRule(state);
1856
- expected = [];
1857
- for (p in table[state]) if (this.terminals_[p] && p > TERROR) expected.push("'" + this.terminals_[p] + "'");
1858
- if (lexer.showPosition) errStr = "Parse error on line " + (yylineno + 1) + `:
1859
- ` + lexer.showPosition() + `
1860
- Expecting ` + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
1861
- else errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
1862
- this.parseError(errStr, {
1863
- text: lexer.match,
1864
- token: this.terminals_[symbol] || symbol,
1865
- line: lexer.yylineno,
1866
- loc: yyloc,
1867
- expected,
1868
- recoverable: error_rule_depth !== !1
1869
- });
1870
- } else if (preErrorSymbol !== EOF) error_rule_depth = locateNearestErrorRecoveryRule(state);
1871
- if (recovering == 3) {
1872
- if (symbol === EOF || preErrorSymbol === EOF) throw Error(errStr || "Parsing halted while starting to recover from another error.");
1873
- yyleng = lexer.yyleng;
1874
- yytext = lexer.yytext;
1875
- yylineno = lexer.yylineno;
1876
- yyloc = lexer.yylloc;
1877
- symbol = lex();
1878
- }
1879
- if (error_rule_depth === !1) throw Error(errStr || "Parsing halted. No suitable error recovery rule available.");
1880
- popStack(error_rule_depth);
1881
- preErrorSymbol = symbol == TERROR ? null : symbol;
1882
- symbol = TERROR;
1883
- state = stack[stack.length - 1];
1884
- action = table[state] && table[state][TERROR];
1885
- recovering = 3;
1886
- }
1887
- if (action[0] instanceof Array && action.length > 1) throw Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
1888
- switch (action[0]) {
1889
- case 1:
1890
- stack.push(symbol);
1891
- vstack.push(lexer.yytext);
1892
- lstack.push(lexer.yylloc);
1893
- stack.push(action[1]);
1894
- symbol = null;
1895
- if (!preErrorSymbol) {
1896
- yyleng = lexer.yyleng;
1897
- yytext = lexer.yytext;
1898
- yylineno = lexer.yylineno;
1899
- yyloc = lexer.yylloc;
1900
- if (recovering > 0) recovering--;
1901
- } else {
1902
- symbol = preErrorSymbol;
1903
- preErrorSymbol = null;
1904
- }
1905
- break;
1906
- case 2:
1907
- len = this.productions_[action[1]][1];
1908
- yyval.$ = vstack[vstack.length - len];
1909
- yyval._$ = {
1910
- first_line: lstack[lstack.length - (len || 1)].first_line,
1911
- last_line: lstack[lstack.length - 1].last_line,
1912
- first_column: lstack[lstack.length - (len || 1)].first_column,
1913
- last_column: lstack[lstack.length - 1].last_column
1914
- };
1915
- if (ranges) yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];
1916
- r = this.performAction.apply(yyval, [
1917
- yytext,
1918
- yyleng,
1919
- yylineno,
1920
- sharedState.yy,
1921
- action[1],
1922
- vstack,
1923
- lstack
1924
- ].concat(args));
1925
- if (typeof r < "u") return r;
1926
- if (len) {
1927
- stack = stack.slice(0, -1 * len * 2);
1928
- vstack = vstack.slice(0, -1 * len);
1929
- lstack = lstack.slice(0, -1 * len);
1930
- }
1931
- stack.push(this.productions_[action[1]][0]);
1932
- vstack.push(yyval.$);
1933
- lstack.push(yyval._$);
1934
- newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
1935
- stack.push(newState);
1936
- break;
1937
- case 3: return !0;
1938
- }
1939
- }
1940
- return !0;
1941
- }
1942
- };
1943
- parser.lexer = (function() {
1944
- return {
1945
- EOF: 1,
1946
- parseError: function parseError(str, hash) {
1947
- if (this.yy.parser) this.yy.parser.parseError(str, hash);
1948
- else throw Error(str);
1949
- },
1950
- setInput: function(input, yy) {
1951
- this.yy = yy || this.yy || {};
1952
- this._input = input;
1953
- this._more = this._backtrack = this.done = !1;
1954
- this.yylineno = this.yyleng = 0;
1955
- this.yytext = this.matched = this.match = "";
1956
- this.conditionStack = ["INITIAL"];
1957
- this.yylloc = {
1958
- first_line: 1,
1959
- first_column: 0,
1960
- last_line: 1,
1961
- last_column: 0
1520
+ ];
1521
+ }
1522
+ performAction(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
1523
+ var $0 = $$.length - 1;
1524
+ switch (yystate) {
1525
+ case 1: return {
1526
+ nodeType: "Main",
1527
+ value: $$[$0 - 1]
1528
+ };
1529
+ case 2:
1530
+ this.$ = {
1531
+ type: "StringLiteral",
1532
+ value: $$[$0]
1962
1533
  };
1963
- if (this.options.ranges) this.yylloc.range = [0, 0];
1964
- this.offset = 0;
1965
- return this;
1966
- },
1967
- input: function() {
1968
- var ch = this._input[0];
1969
- this.yytext += ch;
1970
- this.yyleng++;
1971
- this.offset++;
1972
- this.match += ch;
1973
- this.matched += ch;
1974
- if (ch.match(/(?:\r\n?|\n).*/g)) {
1975
- this.yylineno++;
1976
- this.yylloc.last_line++;
1977
- } else this.yylloc.last_column++;
1978
- if (this.options.ranges) this.yylloc.range[1]++;
1979
- this._input = this._input.slice(1);
1980
- return ch;
1981
- },
1982
- unput: function(ch) {
1983
- var len = ch.length, lines = ch.split(/(?:\r\n?|\n)/g);
1984
- this._input = ch + this._input;
1985
- this.yytext = this.yytext.substr(0, this.yytext.length - len);
1986
- this.offset -= len;
1987
- var oldLines = this.match.split(/(?:\r\n?|\n)/g);
1988
- this.match = this.match.substr(0, this.match.length - 1);
1989
- this.matched = this.matched.substr(0, this.matched.length - 1);
1990
- if (lines.length - 1) this.yylineno -= lines.length - 1;
1991
- var r = this.yylloc.range;
1992
- this.yylloc = {
1993
- first_line: this.yylloc.first_line,
1994
- last_line: this.yylineno + 1,
1995
- first_column: this.yylloc.first_column,
1996
- last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
1534
+ break;
1535
+ case 3:
1536
+ case 4:
1537
+ this.$ = {
1538
+ type: "BytesLiteral",
1539
+ value: $$[$0]
1997
1540
  };
1998
- if (this.options.ranges) this.yylloc.range = [r[0], r[0] + this.yyleng - len];
1999
- this.yyleng = this.yytext.length;
2000
- return this;
2001
- },
2002
- more: function() {
2003
- this._more = !0;
2004
- return this;
2005
- },
2006
- reject: function() {
2007
- if (this.options.backtrack_lexer) this._backtrack = !0;
2008
- else return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
2009
- ` + this.showPosition(), {
2010
- text: "",
2011
- token: null,
2012
- line: this.yylineno
1541
+ break;
1542
+ case 5:
1543
+ this.$ = {
1544
+ type: "IntegerLiteral",
1545
+ value: parseInt($$[$0], /x/.test($$[$0]) ? 16 : 10)
1546
+ };
1547
+ break;
1548
+ case 6:
1549
+ this.$ = {
1550
+ type: "UnsignedIntegerLiteral",
1551
+ value: parseInt($$[$0].replace(/u$/i, ""), /^0x/.test($$[$0]) ? 16 : 10)
1552
+ };
1553
+ break;
1554
+ case 7:
1555
+ this.$ = {
1556
+ type: "FloatLiteral",
1557
+ value: parseFloat($$[$0])
1558
+ };
1559
+ break;
1560
+ case 8:
1561
+ this.$ = {
1562
+ type: "BooleanLiteral",
1563
+ value: $$[$0] === "true"
1564
+ };
1565
+ break;
1566
+ case 9:
1567
+ this.$ = {
1568
+ type: "NullLiteral",
1569
+ value: null
1570
+ };
1571
+ break;
1572
+ case 10:
1573
+ case 11:
1574
+ case 12:
1575
+ case 13:
1576
+ case 14:
1577
+ case 16:
1578
+ case 17:
1579
+ case 18:
1580
+ case 19:
1581
+ case 20:
1582
+ case 21:
1583
+ case 38:
1584
+ case 43:
1585
+ case 44:
1586
+ case 45:
1587
+ case 53:
1588
+ case 54:
1589
+ case 55:
1590
+ case 56:
1591
+ case 57:
1592
+ case 58:
1593
+ this.$ = $$[$0];
1594
+ break;
1595
+ case 15:
1596
+ this.$ = {
1597
+ type: "Identifier",
1598
+ value: $$[$0]
1599
+ };
1600
+ break;
1601
+ case 22:
1602
+ case 23:
1603
+ case 24:
1604
+ this.$ = {
1605
+ type: "Relation",
1606
+ left: $$[$0 - 2],
1607
+ operator: $$[$0 - 1],
1608
+ right: $$[$0]
1609
+ };
1610
+ break;
1611
+ case 25:
1612
+ case 27:
1613
+ this.$ = 1;
1614
+ break;
1615
+ case 26:
1616
+ case 28:
1617
+ this.$ = this.$ += 1;
1618
+ break;
1619
+ case 29:
1620
+ this.$ = {
1621
+ type: "Negation",
1622
+ negations: $$[$0 - 1],
1623
+ value: $$[$0]
1624
+ };
1625
+ break;
1626
+ case 30:
1627
+ case 31:
1628
+ this.$ = $$[$0];
1629
+ break;
1630
+ case 32:
1631
+ this.$ = {
1632
+ type: "Member",
1633
+ left: $$[$0 - 2],
1634
+ right: $$[$0]
1635
+ };
1636
+ break;
1637
+ case 33:
1638
+ this.$ = {
1639
+ type: "Member",
1640
+ left: $$[$0 - 5],
1641
+ right: $$[$0 - 3],
1642
+ list: $$[$0 - 1]
1643
+ };
1644
+ break;
1645
+ case 34:
1646
+ this.$ = {
1647
+ type: "DynamicPropertyAccessor",
1648
+ left: $$[$0 - 3],
1649
+ right: $$[$0 - 1]
1650
+ };
1651
+ break;
1652
+ case 35:
1653
+ this.$ = {
1654
+ type: "FieldsObject",
1655
+ left: $$[$0 - 4],
1656
+ list: $$[$0 - 2],
1657
+ trailingComma: $$[$0 - 1]
1658
+ };
1659
+ break;
1660
+ case 36:
1661
+ this.$ = false;
1662
+ break;
1663
+ case 37:
1664
+ this.$ = true;
1665
+ break;
1666
+ case 39:
1667
+ this.$ = {
1668
+ type: "Property",
1669
+ value: $$[$0]
1670
+ };
1671
+ break;
1672
+ case 40:
1673
+ this.$ = {
1674
+ type: "FunctionCall",
1675
+ name: $$[$0 - 4],
1676
+ args: $$[$0 - 2],
1677
+ trailingComma: $$[$0 - 1]
1678
+ };
1679
+ break;
1680
+ case 41:
1681
+ this.$ = {
1682
+ type: "Property",
1683
+ value: $$[$0 - 4],
1684
+ args: $$[$0 - 2],
1685
+ trailingComma: $$[$0 - 1]
1686
+ };
1687
+ break;
1688
+ case 42:
1689
+ this.$ = {
1690
+ type: "ExpressionGroup",
1691
+ value: $$[$0 - 1]
1692
+ };
1693
+ break;
1694
+ case 46:
1695
+ this.$ = {
1696
+ type: "List",
1697
+ value: $$[$0 - 2],
1698
+ trailingComma: $$[$0 - 1]
1699
+ };
1700
+ break;
1701
+ case 47:
1702
+ this.$ = {
1703
+ type: "Map",
1704
+ value: $$[$0 - 2],
1705
+ trailingComma: $$[$0 - 1]
1706
+ };
1707
+ break;
1708
+ case 48:
1709
+ this.$ = {
1710
+ type: "Addition",
1711
+ left: $$[$0 - 2],
1712
+ right: $$[$0]
1713
+ };
1714
+ break;
1715
+ case 49:
1716
+ this.$ = {
1717
+ type: "Subtraction",
1718
+ left: $$[$0 - 2],
1719
+ right: $$[$0]
1720
+ };
1721
+ break;
1722
+ case 50:
1723
+ this.$ = {
1724
+ type: "Multiplication",
1725
+ left: $$[$0 - 2],
1726
+ right: $$[$0]
1727
+ };
1728
+ break;
1729
+ case 51:
1730
+ this.$ = {
1731
+ type: "Division",
1732
+ left: $$[$0 - 2],
1733
+ right: $$[$0]
1734
+ };
1735
+ break;
1736
+ case 52:
1737
+ this.$ = {
1738
+ type: "Modulo",
1739
+ left: $$[$0 - 2],
1740
+ right: $$[$0]
1741
+ };
1742
+ break;
1743
+ case 59:
1744
+ this.$ = {
1745
+ type: "ConditionalExpr",
1746
+ condition: $$[$0 - 4],
1747
+ valueIfTrue: $$[$0 - 2],
1748
+ valueIfFalse: $$[$0]
1749
+ };
1750
+ break;
1751
+ case 60:
1752
+ this.$ = {
1753
+ type: "ConditionalAnd",
1754
+ left: $$[$0 - 2],
1755
+ right: $$[$0]
1756
+ };
1757
+ break;
1758
+ case 61:
1759
+ this.$ = {
1760
+ type: "ConditionalOr",
1761
+ left: $$[$0 - 2],
1762
+ right: $$[$0]
1763
+ };
1764
+ break;
1765
+ case 62:
1766
+ this.$ = {
1767
+ type: "ExpressionList",
1768
+ value: [$$[$0]]
1769
+ };
1770
+ break;
1771
+ case 63:
1772
+ this.$ = $$[$0 - 2];
1773
+ this.$.value.push($$[$0]);
1774
+ break;
1775
+ case 64:
1776
+ this.$ = {
1777
+ type: "FieldInits",
1778
+ value: [{
1779
+ type: "FieldInit",
1780
+ left: $$[$0 - 2],
1781
+ right: $$[$0]
1782
+ }]
1783
+ };
1784
+ break;
1785
+ case 65:
1786
+ this.$ = $$[$0 - 4];
1787
+ this.$.value.push({
1788
+ type: "FieldInit",
1789
+ left: $$[$0 - 2],
1790
+ right: $$[$0]
2013
1791
  });
2014
- return this;
2015
- },
2016
- less: function(n) {
2017
- this.unput(this.match.slice(n));
2018
- },
2019
- pastInput: function() {
2020
- var past = this.matched.substr(0, this.matched.length - this.match.length);
2021
- return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
2022
- },
2023
- upcomingInput: function() {
2024
- var next = this.match;
2025
- if (next.length < 20) next += this._input.substr(0, 20 - next.length);
2026
- return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
2027
- },
2028
- showPosition: function() {
2029
- var pre = this.pastInput(), c = Array(pre.length + 1).join("-");
2030
- return pre + this.upcomingInput() + `
2031
- ` + c + "^";
2032
- },
2033
- test_match: function(match, indexed_rule) {
2034
- var token, lines, backup;
2035
- if (this.options.backtrack_lexer) {
2036
- backup = {
2037
- yylineno: this.yylineno,
2038
- yylloc: {
2039
- first_line: this.yylloc.first_line,
2040
- last_line: this.last_line,
2041
- first_column: this.yylloc.first_column,
2042
- last_column: this.yylloc.last_column
2043
- },
2044
- yytext: this.yytext,
2045
- match: this.match,
2046
- matches: this.matches,
2047
- matched: this.matched,
2048
- yyleng: this.yyleng,
2049
- offset: this.offset,
2050
- _more: this._more,
2051
- _input: this._input,
2052
- yy: this.yy,
2053
- conditionStack: this.conditionStack.slice(0),
2054
- done: this.done
2055
- };
2056
- if (this.options.ranges) backup.yylloc.range = this.yylloc.range.slice(0);
2057
- }
2058
- lines = match[0].match(/(?:\r\n?|\n).*/g);
2059
- if (lines) this.yylineno += lines.length;
2060
- this.yylloc = {
2061
- first_line: this.yylloc.last_line,
2062
- last_line: this.yylineno + 1,
2063
- first_column: this.yylloc.last_column,
2064
- last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
1792
+ break;
1793
+ case 66:
1794
+ this.$ = {
1795
+ type: "MapInits",
1796
+ value: [{
1797
+ type: "MapInit",
1798
+ left: $$[$0 - 2],
1799
+ right: $$[$0]
1800
+ }]
2065
1801
  };
2066
- this.yytext += match[0];
2067
- this.match += match[0];
2068
- this.matches = match;
2069
- this.yyleng = this.yytext.length;
2070
- if (this.options.ranges) this.yylloc.range = [this.offset, this.offset += this.yyleng];
2071
- this._more = !1;
2072
- this._backtrack = !1;
2073
- this._input = this._input.slice(match[0].length);
2074
- this.matched += match[0];
2075
- token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
2076
- if (this.done && this._input) this.done = !1;
2077
- if (token) return token;
2078
- else if (this._backtrack) {
2079
- for (var k in backup) this[k] = backup[k];
2080
- return !1;
2081
- }
2082
- return !1;
2083
- },
2084
- next: function() {
2085
- if (this.done) return this.EOF;
2086
- if (!this._input) this.done = !0;
2087
- var token, match, tempMatch, index;
2088
- if (!this._more) {
2089
- this.yytext = "";
2090
- this.match = "";
2091
- }
2092
- var rules = this._currentRules();
2093
- for (var i = 0; i < rules.length; i++) {
2094
- tempMatch = this._input.match(this.rules[rules[i]]);
2095
- if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
2096
- match = tempMatch;
2097
- index = i;
2098
- if (this.options.backtrack_lexer) {
2099
- token = this.test_match(tempMatch, rules[i]);
2100
- if (token !== !1) return token;
2101
- else if (this._backtrack) {
2102
- match = !1;
2103
- continue;
2104
- } else return !1;
2105
- } else if (!this.options.flex) break;
2106
- }
2107
- }
2108
- if (match) {
2109
- token = this.test_match(match, rules[index]);
2110
- if (token !== !1) return token;
2111
- return !1;
2112
- }
2113
- if (this._input === "") return this.EOF;
2114
- else return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
2115
- ` + this.showPosition(), {
2116
- text: "",
2117
- token: null,
2118
- line: this.yylineno
1802
+ break;
1803
+ case 67:
1804
+ this.$ = $$[$0 - 4];
1805
+ this.$.value.push({
1806
+ type: "MapInit",
1807
+ left: $$[$0 - 2],
1808
+ right: $$[$0]
2119
1809
  });
2120
- },
2121
- lex: function lex() {
2122
- var r = this.next();
2123
- if (r) return r;
2124
- else return this.lex();
2125
- },
2126
- begin: function begin(condition) {
2127
- this.conditionStack.push(condition);
2128
- },
2129
- popState: function popState() {
2130
- if (this.conditionStack.length - 1 > 0) return this.conditionStack.pop();
2131
- else return this.conditionStack[0];
2132
- },
2133
- _currentRules: function _currentRules() {
2134
- if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
2135
- else return this.conditions.INITIAL.rules;
2136
- },
2137
- topState: function topState(n) {
2138
- n = this.conditionStack.length - 1 - Math.abs(n || 0);
2139
- if (n >= 0) return this.conditionStack[n];
2140
- else return "INITIAL";
2141
- },
2142
- pushState: function pushState(condition) {
2143
- this.begin(condition);
2144
- },
2145
- stateStackSize: function stateStackSize() {
2146
- return this.conditionStack.length;
2147
- },
2148
- options: { "flex": true },
2149
- performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
2150
- switch ($avoiding_name_collisions) {
2151
- case 0: break;
2152
- case 1: break;
2153
- case 2: return 31;
2154
- case 3: return "as";
2155
- case 4: return "break";
2156
- case 5: return "const";
2157
- case 6: return "continue";
2158
- case 7: return "else";
2159
- case 8: return "for";
2160
- case 9: return "function";
2161
- case 10: return "if";
2162
- case 11: return "import";
2163
- case 12: return "let";
2164
- case 13: return "loop";
2165
- case 14: return "package";
2166
- case 15: return "namespace";
2167
- case 16: return "return";
2168
- case 17: return "var";
2169
- case 18: return "void";
2170
- case 19: return "while";
2171
- case 20: return 18;
2172
- case 21: return 16;
2173
- case 22: return 16;
2174
- case 23: return 40;
2175
- case 24: return 60;
2176
- case 25: return 61;
2177
- case 26: return 50;
2178
- case 27: return 44;
2179
- case 28: return 45;
2180
- case 29: return 41;
2181
- case 30: return 43;
2182
- case 31: return 28;
2183
- case 32: return 35;
2184
- case 33: return 53;
2185
- case 34: return 37;
2186
- case 35: return 54;
2187
- case 36: return 55;
2188
- case 37: return 56;
2189
- case 38: return 23;
2190
- case 39: return 24;
2191
- case 40: return 25;
2192
- case 41: return 26;
2193
- case 42: return 27;
2194
- case 43: return 46;
2195
- case 44: return 49;
2196
- case 45: return 62;
2197
- case 46: return 63;
2198
- case 47: return 21;
2199
- case 48: return 7;
2200
- case 49: return 7;
2201
- case 50: return 7;
2202
- case 51: return 7;
2203
- case 52: return 12;
2204
- case 53: return 13;
2205
- case 54: return 14;
2206
- case 55: return 5;
2207
- case 56: return "INVALID";
2208
- case 57:
2209
- console.log(yy_.yytext);
2210
- break;
2211
- }
2212
- },
2213
- rules: [
2214
- /^(?:[/][/]\s.*\n)/,
2215
- /^(?:\s+)/,
2216
- /^(?:in)/,
2217
- /^(?:as)/,
2218
- /^(?:break)/,
2219
- /^(?:const)/,
2220
- /^(?:continue)/,
2221
- /^(?:else)/,
2222
- /^(?:for)/,
2223
- /^(?:function)/,
2224
- /^(?:if)/,
2225
- /^(?:import)/,
2226
- /^(?:let)/,
2227
- /^(?:loop)/,
2228
- /^(?:package)/,
2229
- /^(?:namespace)/,
2230
- /^(?:return)/,
2231
- /^(?:var)/,
2232
- /^(?:void)/,
2233
- /^(?:while)/,
2234
- /^(?:null)/,
2235
- /^(?:true)/,
2236
- /^(?:false)/,
2237
- /^(?:\.)/,
2238
- /^(?:\?)/,
2239
- /^(?::)/,
2240
- /^(?:,)/,
2241
- /^(?:\[)/,
2242
- /^(?:\])/,
2243
- /^(?:\()/,
2244
- /^(?:\))/,
2245
- /^(?:!=)/,
2246
- /^(?:!)/,
2247
- /^(?:\+)/,
2248
- /^(?:-)/,
2249
- /^(?:\*)/,
2250
- /^(?:\/)/,
2251
- /^(?:%)/,
2252
- /^(?:==)/,
2253
- /^(?:>=)/,
2254
- /^(?:>)/,
2255
- /^(?:<=)/,
2256
- /^(?:<)/,
2257
- /^(?:\{)/,
2258
- /^(?:\})/,
2259
- /^(?:&&)/,
2260
- /^(?:\|\|)/,
2261
- /^(?:[_a-zA-Z][_a-zA-Z0-9]*)/,
2262
- /^(?:[rR]?['][']['](\.|[^'])*['][']['])/,
2263
- /^(?:[rR]?["]["]["](\.|[^"])*["]["]["])/,
2264
- /^(?:[rR]?['](\.|[^'\n\r])*['])/,
2265
- /^(?:[rR]?["](\.|[^"\n\r])*["])/,
2266
- /^(?:[-]?([0-9]+|0x[0-9a-fA-F]+))/,
2267
- /^(?:([0-9]+|0x[0-9a-fA-F]+)[uU])/,
2268
- /^(?:[-]?[0-9]+(\.[0-9]+)?([eE][+-]?[0-9]+(\.[0-9]+)?)?)/,
2269
- /^(?:$)/,
2270
- /^(?:.)/,
2271
- /^(?:.)/
2272
- ],
2273
- conditions: { "INITIAL": {
2274
- "rules": [
2275
- 0,
2276
- 1,
2277
- 2,
2278
- 3,
2279
- 4,
2280
- 5,
2281
- 6,
2282
- 7,
2283
- 8,
2284
- 9,
2285
- 10,
2286
- 11,
2287
- 12,
2288
- 13,
2289
- 14,
2290
- 15,
2291
- 16,
2292
- 17,
2293
- 18,
2294
- 19,
2295
- 20,
2296
- 21,
2297
- 22,
2298
- 23,
2299
- 24,
2300
- 25,
2301
- 26,
2302
- 27,
2303
- 28,
2304
- 29,
2305
- 30,
2306
- 31,
2307
- 32,
2308
- 33,
2309
- 34,
2310
- 35,
2311
- 36,
2312
- 37,
2313
- 38,
2314
- 39,
2315
- 40,
2316
- 41,
2317
- 42,
2318
- 43,
2319
- 44,
2320
- 45,
2321
- 46,
2322
- 47,
2323
- 48,
2324
- 49,
2325
- 50,
2326
- 51,
2327
- 52,
2328
- 53,
2329
- 54,
2330
- 55,
2331
- 56,
2332
- 57
2333
- ],
2334
- "inclusive": true
2335
- } }
2336
- };
2337
- })();
2338
- function Parser() {
2339
- this.yy = {};
1810
+ break;
1811
+ }
1812
+ }
1813
+ };
1814
+ var CELLexer = class extends __ts_jison_lexer.JisonLexer {
1815
+ options = {
1816
+ "flex": true,
1817
+ "moduleName": "CEL"
1818
+ };
1819
+ constructor(yy = {}) {
1820
+ super(yy);
2340
1821
  }
2341
- Parser.prototype = parser;
2342
- parser.Parser = Parser;
2343
- return new Parser();
2344
- })();
1822
+ rules = [
1823
+ /^(?:[/][/]\s.*\n)/,
1824
+ /^(?:\s+)/,
1825
+ /^(?:in)/,
1826
+ /^(?:as)/,
1827
+ /^(?:break)/,
1828
+ /^(?:const)/,
1829
+ /^(?:continue)/,
1830
+ /^(?:else)/,
1831
+ /^(?:for)/,
1832
+ /^(?:function)/,
1833
+ /^(?:if)/,
1834
+ /^(?:import)/,
1835
+ /^(?:let)/,
1836
+ /^(?:loop)/,
1837
+ /^(?:package)/,
1838
+ /^(?:namespace)/,
1839
+ /^(?:return)/,
1840
+ /^(?:var)/,
1841
+ /^(?:void)/,
1842
+ /^(?:while)/,
1843
+ /^(?:null)/,
1844
+ /^(?:true)/,
1845
+ /^(?:false)/,
1846
+ /^(?:\.)/,
1847
+ /^(?:\?)/,
1848
+ /^(?::)/,
1849
+ /^(?:,)/,
1850
+ /^(?:\[)/,
1851
+ /^(?:\])/,
1852
+ /^(?:\()/,
1853
+ /^(?:\))/,
1854
+ /^(?:!=)/,
1855
+ /^(?:!)/,
1856
+ /^(?:\+)/,
1857
+ /^(?:-)/,
1858
+ /^(?:\*)/,
1859
+ /^(?:\/)/,
1860
+ /^(?:%)/,
1861
+ /^(?:==)/,
1862
+ /^(?:>=)/,
1863
+ /^(?:>)/,
1864
+ /^(?:<=)/,
1865
+ /^(?:<)/,
1866
+ /^(?:\{)/,
1867
+ /^(?:\})/,
1868
+ /^(?:&&)/,
1869
+ /^(?:\|\|)/,
1870
+ /^(?:[_a-zA-Z][_a-zA-Z0-9]*)/,
1871
+ /^(?:[rR]?['][']['](?:\.|[^'])*['][']['])/,
1872
+ /^(?:[rR]?["]["]["](?:\.|[^"])*["]["]["])/,
1873
+ /^(?:[rR]?['](?:\.|[^'\n\r])*['])/,
1874
+ /^(?:[rR]?["](?:\.|[^"\n\r])*["])/,
1875
+ /^(?:[-]?(?:[0-9]+|0x[0-9a-fA-F]+))/,
1876
+ /^(?:(?:[0-9]+|0x[0-9a-fA-F]+)[uU])/,
1877
+ /^(?:[-]?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+(?:\.[0-9]+)?)?)/,
1878
+ /^(?:$)/,
1879
+ /^(?:.)/,
1880
+ /^(?:.)/
1881
+ ];
1882
+ conditions = { "INITIAL": {
1883
+ "rules": [
1884
+ 0,
1885
+ 1,
1886
+ 2,
1887
+ 3,
1888
+ 4,
1889
+ 5,
1890
+ 6,
1891
+ 7,
1892
+ 8,
1893
+ 9,
1894
+ 10,
1895
+ 11,
1896
+ 12,
1897
+ 13,
1898
+ 14,
1899
+ 15,
1900
+ 16,
1901
+ 17,
1902
+ 18,
1903
+ 19,
1904
+ 20,
1905
+ 21,
1906
+ 22,
1907
+ 23,
1908
+ 24,
1909
+ 25,
1910
+ 26,
1911
+ 27,
1912
+ 28,
1913
+ 29,
1914
+ 30,
1915
+ 31,
1916
+ 32,
1917
+ 33,
1918
+ 34,
1919
+ 35,
1920
+ 36,
1921
+ 37,
1922
+ 38,
1923
+ 39,
1924
+ 40,
1925
+ 41,
1926
+ 42,
1927
+ 43,
1928
+ 44,
1929
+ 45,
1930
+ 46,
1931
+ 47,
1932
+ 48,
1933
+ 49,
1934
+ 50,
1935
+ 51,
1936
+ 52,
1937
+ 53,
1938
+ 54,
1939
+ 55,
1940
+ 56,
1941
+ 57
1942
+ ],
1943
+ "inclusive": true
1944
+ } };
1945
+ performAction(yy, yy_, $avoiding_name_collisions, YY_START) {
1946
+ switch ($avoiding_name_collisions) {
1947
+ case 0: break;
1948
+ case 1: break;
1949
+ case 2: return 31;
1950
+ case 3: return "as";
1951
+ case 4: return "break";
1952
+ case 5: return "const";
1953
+ case 6: return "continue";
1954
+ case 7: return "else";
1955
+ case 8: return "for";
1956
+ case 9: return "function";
1957
+ case 10: return "if";
1958
+ case 11: return "import";
1959
+ case 12: return "let";
1960
+ case 13: return "loop";
1961
+ case 14: return "package";
1962
+ case 15: return "namespace";
1963
+ case 16: return "return";
1964
+ case 17: return "var";
1965
+ case 18: return "void";
1966
+ case 19: return "while";
1967
+ case 20: return 18;
1968
+ case 21: return 16;
1969
+ case 22: return 16;
1970
+ case 23: return 40;
1971
+ case 24: return 60;
1972
+ case 25: return 61;
1973
+ case 26: return 50;
1974
+ case 27: return 44;
1975
+ case 28: return 45;
1976
+ case 29: return 41;
1977
+ case 30: return 43;
1978
+ case 31: return 28;
1979
+ case 32: return 35;
1980
+ case 33: return 53;
1981
+ case 34: return 37;
1982
+ case 35: return 54;
1983
+ case 36: return 55;
1984
+ case 37: return 56;
1985
+ case 38: return 23;
1986
+ case 39: return 24;
1987
+ case 40: return 25;
1988
+ case 41: return 26;
1989
+ case 42: return 27;
1990
+ case 43: return 46;
1991
+ case 44: return 49;
1992
+ case 45: return 62;
1993
+ case 46: return 63;
1994
+ case 47: return 21;
1995
+ case 48: return 7;
1996
+ case 49: return 7;
1997
+ case 50: return 7;
1998
+ case 51: return 7;
1999
+ case 52: return 12;
2000
+ case 53: return 13;
2001
+ case 54: return 14;
2002
+ case 55: return 5;
2003
+ case 56: return "INVALID";
2004
+ case 57:
2005
+ console.log(yy_.yytext);
2006
+ break;
2007
+ }
2008
+ }
2009
+ };
2345
2010
 
2346
2011
  //#endregion
2347
2012
  //#region src/utils/parseCEL/utils.ts
@@ -2609,6 +2274,7 @@ function parseCEL(cel, options = {}) {
2609
2274
  return null;
2610
2275
  };
2611
2276
  const prepare = options.generateIDs ? require_prepareQueryObjects.prepareRuleGroup : (g) => g;
2277
+ const celParser = new CELParser();
2612
2278
  let processedCEL;
2613
2279
  try {
2614
2280
  processedCEL = celParser.parse(cel).value;