@react-querybuilder/core 8.9.1 → 8.9.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.
- package/dist/arrayUtils-BF1P8iHS.mjs +122 -0
- package/dist/arrayUtils-BF1P8iHS.mjs.map +1 -0
- package/dist/basic-BfD-7CN3.d.mts +1235 -0
- package/dist/cjs/react-querybuilder_core.cjs.development.d.ts +21 -10
- package/dist/cjs/react-querybuilder_core.cjs.development.js +22 -19
- package/dist/cjs/react-querybuilder_core.cjs.development.js.map +1 -1
- package/dist/cjs/react-querybuilder_core.cjs.production.d.ts +21 -10
- package/dist/cjs/react-querybuilder_core.cjs.production.js +1 -1
- package/dist/cjs/react-querybuilder_core.cjs.production.js.map +1 -1
- package/dist/convertQuery-H7RhQiIc.mjs +75 -0
- package/dist/convertQuery-H7RhQiIc.mjs.map +1 -0
- package/dist/export-r-V7bU31.d.mts +452 -0
- package/dist/formatQuery.d.mts +667 -0
- package/dist/formatQuery.mjs +2366 -0
- package/dist/formatQuery.mjs.map +1 -0
- package/dist/import-BwbbP4oU.d.mts +28 -0
- package/dist/isRuleGroup-CnhYpLOM.mjs +40 -0
- package/dist/isRuleGroup-CnhYpLOM.mjs.map +1 -0
- package/dist/isRuleGroup-DqAs2x4E.js.map +1 -1
- package/dist/objectUtils-BtWdcZVG.mjs +11 -0
- package/dist/objectUtils-BtWdcZVG.mjs.map +1 -0
- package/dist/optGroupUtils-Duv-M8rf.mjs +102 -0
- package/dist/optGroupUtils-Duv-M8rf.mjs.map +1 -0
- package/dist/parseCEL.d.mts +34 -0
- package/dist/parseCEL.mjs +2593 -0
- package/dist/parseCEL.mjs.map +1 -0
- package/dist/parseJSONata.d.mts +36 -0
- package/dist/parseJSONata.mjs +268 -0
- package/dist/parseJSONata.mjs.map +1 -0
- package/dist/parseJsonLogic.d.mts +36 -0
- package/dist/parseJsonLogic.mjs +191 -0
- package/dist/parseJsonLogic.mjs.map +1 -0
- package/dist/parseMongoDB.d.mts +79 -0
- package/dist/parseMongoDB.mjs +267 -0
- package/dist/parseMongoDB.mjs.map +1 -0
- package/dist/parseNumber-BtGKa58z.mjs +24 -0
- package/dist/parseNumber-BtGKa58z.mjs.map +1 -0
- package/dist/parseSQL.d.mts +37 -0
- package/dist/parseSQL.mjs +6626 -0
- package/dist/parseSQL.mjs.map +1 -0
- package/dist/parseSpEL.d.mts +34 -0
- package/dist/parseSpEL.mjs +273 -0
- package/dist/parseSpEL.mjs.map +1 -0
- package/dist/prepareQueryObjects-CS6Wmhmf.mjs +154 -0
- package/dist/prepareQueryObjects-CS6Wmhmf.mjs.map +1 -0
- package/dist/react-querybuilder_core.d.mts +21 -10
- package/dist/react-querybuilder_core.legacy-esm.d.ts +21 -10
- package/dist/react-querybuilder_core.legacy-esm.js +19 -18
- package/dist/react-querybuilder_core.legacy-esm.js.map +1 -1
- package/dist/react-querybuilder_core.mjs +22 -20
- package/dist/react-querybuilder_core.mjs.map +1 -1
- package/dist/react-querybuilder_core.production.d.mts +21 -10
- package/dist/react-querybuilder_core.production.mjs +1 -1
- package/dist/react-querybuilder_core.production.mjs.map +1 -1
- package/dist/transformQuery-DdMvmrCh.mjs +41 -0
- package/dist/transformQuery-DdMvmrCh.mjs.map +1 -0
- package/dist/transformQuery.d.mts +118 -0
- package/dist/transformQuery.mjs +4 -0
- package/package.json +66 -18
|
@@ -0,0 +1,2593 @@
|
|
|
1
|
+
import { defaultOperatorNegationMap, joinWith } from "./arrayUtils-BF1P8iHS.mjs";
|
|
2
|
+
import { isRuleGroup } from "./isRuleGroup-CnhYpLOM.mjs";
|
|
3
|
+
import "./optGroupUtils-Duv-M8rf.mjs";
|
|
4
|
+
import { fieldIsValidUtil, getFieldsArray, prepareRuleGroup } from "./prepareQueryObjects-CS6Wmhmf.mjs";
|
|
5
|
+
|
|
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: [
|
|
565
|
+
{
|
|
566
|
+
3: 1,
|
|
567
|
+
4: 2,
|
|
568
|
+
6: 21,
|
|
569
|
+
7: $V0,
|
|
570
|
+
8: 23,
|
|
571
|
+
9: $V1,
|
|
572
|
+
10: $V2,
|
|
573
|
+
11: 22,
|
|
574
|
+
12: $V3,
|
|
575
|
+
13: $V4,
|
|
576
|
+
14: $V5,
|
|
577
|
+
15: 24,
|
|
578
|
+
16: $V6,
|
|
579
|
+
17: 25,
|
|
580
|
+
18: $V7,
|
|
581
|
+
19: 16,
|
|
582
|
+
20: 11,
|
|
583
|
+
21: $V8,
|
|
584
|
+
29: 7,
|
|
585
|
+
30: 3,
|
|
586
|
+
32: 14,
|
|
587
|
+
33: 15,
|
|
588
|
+
34: 17,
|
|
589
|
+
35: $V9,
|
|
590
|
+
38: 10,
|
|
591
|
+
39: 9,
|
|
592
|
+
40: $Va,
|
|
593
|
+
41: $Vb,
|
|
594
|
+
44: $Vc,
|
|
595
|
+
46: $Vd,
|
|
596
|
+
52: 8,
|
|
597
|
+
57: 4,
|
|
598
|
+
58: 5,
|
|
599
|
+
59: 6
|
|
600
|
+
},
|
|
601
|
+
{ 1: [3] },
|
|
602
|
+
{
|
|
603
|
+
5: [1, 35],
|
|
604
|
+
37: $Ve,
|
|
605
|
+
53: $Vf,
|
|
606
|
+
54: $Vg,
|
|
607
|
+
55: $Vh,
|
|
608
|
+
56: $Vi,
|
|
609
|
+
60: $Vj,
|
|
610
|
+
62: $Vk,
|
|
611
|
+
63: $Vl
|
|
612
|
+
},
|
|
613
|
+
o($Vm, [2, 53], {
|
|
614
|
+
22: 47,
|
|
615
|
+
23: [1, 49],
|
|
616
|
+
24: [1, 50],
|
|
617
|
+
25: [1, 51],
|
|
618
|
+
26: [1, 52],
|
|
619
|
+
27: [1, 53],
|
|
620
|
+
28: [1, 54],
|
|
621
|
+
31: [1, 48],
|
|
622
|
+
40: $Vn,
|
|
623
|
+
44: $Vo,
|
|
624
|
+
46: $Vp
|
|
625
|
+
}),
|
|
626
|
+
o($Vm, [2, 54]),
|
|
627
|
+
o($Vm, [2, 55]),
|
|
628
|
+
o($Vm, [2, 56]),
|
|
629
|
+
o($Vm, [2, 57]),
|
|
630
|
+
o($Vm, [2, 58]),
|
|
631
|
+
o($Vq, [2, 30]),
|
|
632
|
+
o($Vq, [2, 31]),
|
|
633
|
+
o($Vq, [2, 38], { 41: [1, 55] }),
|
|
634
|
+
{
|
|
635
|
+
20: 56,
|
|
636
|
+
21: $V8
|
|
637
|
+
},
|
|
638
|
+
{
|
|
639
|
+
4: 57,
|
|
640
|
+
6: 21,
|
|
641
|
+
7: $V0,
|
|
642
|
+
8: 23,
|
|
643
|
+
9: $V1,
|
|
644
|
+
10: $V2,
|
|
645
|
+
11: 22,
|
|
646
|
+
12: $V3,
|
|
647
|
+
13: $V4,
|
|
648
|
+
14: $V5,
|
|
649
|
+
15: 24,
|
|
650
|
+
16: $V6,
|
|
651
|
+
17: 25,
|
|
652
|
+
18: $V7,
|
|
653
|
+
19: 16,
|
|
654
|
+
20: 11,
|
|
655
|
+
21: $V8,
|
|
656
|
+
29: 7,
|
|
657
|
+
30: 3,
|
|
658
|
+
32: 14,
|
|
659
|
+
33: 15,
|
|
660
|
+
34: 17,
|
|
661
|
+
35: $V9,
|
|
662
|
+
38: 10,
|
|
663
|
+
39: 9,
|
|
664
|
+
40: $Va,
|
|
665
|
+
41: $Vb,
|
|
666
|
+
44: $Vc,
|
|
667
|
+
46: $Vd,
|
|
668
|
+
52: 8,
|
|
669
|
+
57: 4,
|
|
670
|
+
58: 5,
|
|
671
|
+
59: 6
|
|
672
|
+
},
|
|
673
|
+
o($Vq, [2, 43]),
|
|
674
|
+
o($Vq, [2, 44]),
|
|
675
|
+
o($Vq, [2, 45]),
|
|
676
|
+
{
|
|
677
|
+
6: 21,
|
|
678
|
+
7: $V0,
|
|
679
|
+
8: 23,
|
|
680
|
+
9: $V1,
|
|
681
|
+
10: $V2,
|
|
682
|
+
11: 22,
|
|
683
|
+
12: $V3,
|
|
684
|
+
13: $V4,
|
|
685
|
+
14: $V5,
|
|
686
|
+
15: 24,
|
|
687
|
+
16: $V6,
|
|
688
|
+
17: 25,
|
|
689
|
+
18: $V7,
|
|
690
|
+
19: 16,
|
|
691
|
+
20: 11,
|
|
692
|
+
21: $V8,
|
|
693
|
+
32: 14,
|
|
694
|
+
33: 15,
|
|
695
|
+
35: [1, 59],
|
|
696
|
+
39: 58,
|
|
697
|
+
40: $Va,
|
|
698
|
+
41: $Vb,
|
|
699
|
+
44: $Vc,
|
|
700
|
+
46: $Vd
|
|
701
|
+
},
|
|
702
|
+
o([
|
|
703
|
+
5,
|
|
704
|
+
23,
|
|
705
|
+
24,
|
|
706
|
+
25,
|
|
707
|
+
26,
|
|
708
|
+
27,
|
|
709
|
+
28,
|
|
710
|
+
31,
|
|
711
|
+
37,
|
|
712
|
+
40,
|
|
713
|
+
41,
|
|
714
|
+
43,
|
|
715
|
+
44,
|
|
716
|
+
45,
|
|
717
|
+
46,
|
|
718
|
+
49,
|
|
719
|
+
50,
|
|
720
|
+
53,
|
|
721
|
+
54,
|
|
722
|
+
55,
|
|
723
|
+
56,
|
|
724
|
+
60,
|
|
725
|
+
61,
|
|
726
|
+
62,
|
|
727
|
+
63
|
|
728
|
+
], [2, 15]),
|
|
729
|
+
{
|
|
730
|
+
4: 61,
|
|
731
|
+
6: 21,
|
|
732
|
+
7: $V0,
|
|
733
|
+
8: 23,
|
|
734
|
+
9: $V1,
|
|
735
|
+
10: $V2,
|
|
736
|
+
11: 22,
|
|
737
|
+
12: $V3,
|
|
738
|
+
13: $V4,
|
|
739
|
+
14: $V5,
|
|
740
|
+
15: 24,
|
|
741
|
+
16: $V6,
|
|
742
|
+
17: 25,
|
|
743
|
+
18: $V7,
|
|
744
|
+
19: 16,
|
|
745
|
+
20: 11,
|
|
746
|
+
21: $V8,
|
|
747
|
+
29: 7,
|
|
748
|
+
30: 3,
|
|
749
|
+
32: 14,
|
|
750
|
+
33: 15,
|
|
751
|
+
34: 17,
|
|
752
|
+
35: $V9,
|
|
753
|
+
38: 10,
|
|
754
|
+
39: 9,
|
|
755
|
+
40: $Va,
|
|
756
|
+
41: $Vb,
|
|
757
|
+
42: 60,
|
|
758
|
+
44: $Vc,
|
|
759
|
+
46: $Vd,
|
|
760
|
+
52: 8,
|
|
761
|
+
57: 4,
|
|
762
|
+
58: 5,
|
|
763
|
+
59: 6
|
|
764
|
+
},
|
|
765
|
+
{
|
|
766
|
+
4: 63,
|
|
767
|
+
6: 21,
|
|
768
|
+
7: $V0,
|
|
769
|
+
8: 23,
|
|
770
|
+
9: $V1,
|
|
771
|
+
10: $V2,
|
|
772
|
+
11: 22,
|
|
773
|
+
12: $V3,
|
|
774
|
+
13: $V4,
|
|
775
|
+
14: $V5,
|
|
776
|
+
15: 24,
|
|
777
|
+
16: $V6,
|
|
778
|
+
17: 25,
|
|
779
|
+
18: $V7,
|
|
780
|
+
19: 16,
|
|
781
|
+
20: 11,
|
|
782
|
+
21: $V8,
|
|
783
|
+
29: 7,
|
|
784
|
+
30: 3,
|
|
785
|
+
32: 14,
|
|
786
|
+
33: 15,
|
|
787
|
+
34: 17,
|
|
788
|
+
35: $V9,
|
|
789
|
+
38: 10,
|
|
790
|
+
39: 9,
|
|
791
|
+
40: $Va,
|
|
792
|
+
41: $Vb,
|
|
793
|
+
44: $Vc,
|
|
794
|
+
46: $Vd,
|
|
795
|
+
51: 62,
|
|
796
|
+
52: 8,
|
|
797
|
+
57: 4,
|
|
798
|
+
58: 5,
|
|
799
|
+
59: 6
|
|
800
|
+
},
|
|
801
|
+
o($Vq, [2, 10]),
|
|
802
|
+
o($Vq, [2, 11]),
|
|
803
|
+
o($Vq, [2, 12]),
|
|
804
|
+
o($Vq, [2, 13]),
|
|
805
|
+
o($Vq, [2, 14]),
|
|
806
|
+
o($Vr, [2, 25]),
|
|
807
|
+
o($Vq, [2, 2]),
|
|
808
|
+
o($Vq, [2, 5]),
|
|
809
|
+
o($Vq, [2, 6]),
|
|
810
|
+
o($Vq, [2, 7]),
|
|
811
|
+
{
|
|
812
|
+
6: 64,
|
|
813
|
+
7: $V0
|
|
814
|
+
},
|
|
815
|
+
{
|
|
816
|
+
6: 65,
|
|
817
|
+
7: $V0
|
|
818
|
+
},
|
|
819
|
+
o($Vq, [2, 8]),
|
|
820
|
+
o($Vq, [2, 9]),
|
|
821
|
+
{ 1: [2, 1] },
|
|
822
|
+
{
|
|
823
|
+
4: 66,
|
|
824
|
+
6: 21,
|
|
825
|
+
7: $V0,
|
|
826
|
+
8: 23,
|
|
827
|
+
9: $V1,
|
|
828
|
+
10: $V2,
|
|
829
|
+
11: 22,
|
|
830
|
+
12: $V3,
|
|
831
|
+
13: $V4,
|
|
832
|
+
14: $V5,
|
|
833
|
+
15: 24,
|
|
834
|
+
16: $V6,
|
|
835
|
+
17: 25,
|
|
836
|
+
18: $V7,
|
|
837
|
+
19: 16,
|
|
838
|
+
20: 11,
|
|
839
|
+
21: $V8,
|
|
840
|
+
29: 7,
|
|
841
|
+
30: 3,
|
|
842
|
+
32: 14,
|
|
843
|
+
33: 15,
|
|
844
|
+
34: 17,
|
|
845
|
+
35: $V9,
|
|
846
|
+
38: 10,
|
|
847
|
+
39: 9,
|
|
848
|
+
40: $Va,
|
|
849
|
+
41: $Vb,
|
|
850
|
+
44: $Vc,
|
|
851
|
+
46: $Vd,
|
|
852
|
+
52: 8,
|
|
853
|
+
57: 4,
|
|
854
|
+
58: 5,
|
|
855
|
+
59: 6
|
|
856
|
+
},
|
|
857
|
+
{
|
|
858
|
+
4: 67,
|
|
859
|
+
6: 21,
|
|
860
|
+
7: $V0,
|
|
861
|
+
8: 23,
|
|
862
|
+
9: $V1,
|
|
863
|
+
10: $V2,
|
|
864
|
+
11: 22,
|
|
865
|
+
12: $V3,
|
|
866
|
+
13: $V4,
|
|
867
|
+
14: $V5,
|
|
868
|
+
15: 24,
|
|
869
|
+
16: $V6,
|
|
870
|
+
17: 25,
|
|
871
|
+
18: $V7,
|
|
872
|
+
19: 16,
|
|
873
|
+
20: 11,
|
|
874
|
+
21: $V8,
|
|
875
|
+
29: 7,
|
|
876
|
+
30: 3,
|
|
877
|
+
32: 14,
|
|
878
|
+
33: 15,
|
|
879
|
+
34: 17,
|
|
880
|
+
35: $V9,
|
|
881
|
+
38: 10,
|
|
882
|
+
39: 9,
|
|
883
|
+
40: $Va,
|
|
884
|
+
41: $Vb,
|
|
885
|
+
44: $Vc,
|
|
886
|
+
46: $Vd,
|
|
887
|
+
52: 8,
|
|
888
|
+
57: 4,
|
|
889
|
+
58: 5,
|
|
890
|
+
59: 6
|
|
891
|
+
},
|
|
892
|
+
{
|
|
893
|
+
4: 68,
|
|
894
|
+
6: 21,
|
|
895
|
+
7: $V0,
|
|
896
|
+
8: 23,
|
|
897
|
+
9: $V1,
|
|
898
|
+
10: $V2,
|
|
899
|
+
11: 22,
|
|
900
|
+
12: $V3,
|
|
901
|
+
13: $V4,
|
|
902
|
+
14: $V5,
|
|
903
|
+
15: 24,
|
|
904
|
+
16: $V6,
|
|
905
|
+
17: 25,
|
|
906
|
+
18: $V7,
|
|
907
|
+
19: 16,
|
|
908
|
+
20: 11,
|
|
909
|
+
21: $V8,
|
|
910
|
+
29: 7,
|
|
911
|
+
30: 3,
|
|
912
|
+
32: 14,
|
|
913
|
+
33: 15,
|
|
914
|
+
34: 17,
|
|
915
|
+
35: $V9,
|
|
916
|
+
38: 10,
|
|
917
|
+
39: 9,
|
|
918
|
+
40: $Va,
|
|
919
|
+
41: $Vb,
|
|
920
|
+
44: $Vc,
|
|
921
|
+
46: $Vd,
|
|
922
|
+
52: 8,
|
|
923
|
+
57: 4,
|
|
924
|
+
58: 5,
|
|
925
|
+
59: 6
|
|
926
|
+
},
|
|
927
|
+
{
|
|
928
|
+
4: 69,
|
|
929
|
+
6: 21,
|
|
930
|
+
7: $V0,
|
|
931
|
+
8: 23,
|
|
932
|
+
9: $V1,
|
|
933
|
+
10: $V2,
|
|
934
|
+
11: 22,
|
|
935
|
+
12: $V3,
|
|
936
|
+
13: $V4,
|
|
937
|
+
14: $V5,
|
|
938
|
+
15: 24,
|
|
939
|
+
16: $V6,
|
|
940
|
+
17: 25,
|
|
941
|
+
18: $V7,
|
|
942
|
+
19: 16,
|
|
943
|
+
20: 11,
|
|
944
|
+
21: $V8,
|
|
945
|
+
29: 7,
|
|
946
|
+
30: 3,
|
|
947
|
+
32: 14,
|
|
948
|
+
33: 15,
|
|
949
|
+
34: 17,
|
|
950
|
+
35: $V9,
|
|
951
|
+
38: 10,
|
|
952
|
+
39: 9,
|
|
953
|
+
40: $Va,
|
|
954
|
+
41: $Vb,
|
|
955
|
+
44: $Vc,
|
|
956
|
+
46: $Vd,
|
|
957
|
+
52: 8,
|
|
958
|
+
57: 4,
|
|
959
|
+
58: 5,
|
|
960
|
+
59: 6
|
|
961
|
+
},
|
|
962
|
+
{
|
|
963
|
+
4: 70,
|
|
964
|
+
6: 21,
|
|
965
|
+
7: $V0,
|
|
966
|
+
8: 23,
|
|
967
|
+
9: $V1,
|
|
968
|
+
10: $V2,
|
|
969
|
+
11: 22,
|
|
970
|
+
12: $V3,
|
|
971
|
+
13: $V4,
|
|
972
|
+
14: $V5,
|
|
973
|
+
15: 24,
|
|
974
|
+
16: $V6,
|
|
975
|
+
17: 25,
|
|
976
|
+
18: $V7,
|
|
977
|
+
19: 16,
|
|
978
|
+
20: 11,
|
|
979
|
+
21: $V8,
|
|
980
|
+
29: 7,
|
|
981
|
+
30: 3,
|
|
982
|
+
32: 14,
|
|
983
|
+
33: 15,
|
|
984
|
+
34: 17,
|
|
985
|
+
35: $V9,
|
|
986
|
+
38: 10,
|
|
987
|
+
39: 9,
|
|
988
|
+
40: $Va,
|
|
989
|
+
41: $Vb,
|
|
990
|
+
44: $Vc,
|
|
991
|
+
46: $Vd,
|
|
992
|
+
52: 8,
|
|
993
|
+
57: 4,
|
|
994
|
+
58: 5,
|
|
995
|
+
59: 6
|
|
996
|
+
},
|
|
997
|
+
{
|
|
998
|
+
4: 71,
|
|
999
|
+
6: 21,
|
|
1000
|
+
7: $V0,
|
|
1001
|
+
8: 23,
|
|
1002
|
+
9: $V1,
|
|
1003
|
+
10: $V2,
|
|
1004
|
+
11: 22,
|
|
1005
|
+
12: $V3,
|
|
1006
|
+
13: $V4,
|
|
1007
|
+
14: $V5,
|
|
1008
|
+
15: 24,
|
|
1009
|
+
16: $V6,
|
|
1010
|
+
17: 25,
|
|
1011
|
+
18: $V7,
|
|
1012
|
+
19: 16,
|
|
1013
|
+
20: 11,
|
|
1014
|
+
21: $V8,
|
|
1015
|
+
29: 7,
|
|
1016
|
+
30: 3,
|
|
1017
|
+
32: 14,
|
|
1018
|
+
33: 15,
|
|
1019
|
+
34: 17,
|
|
1020
|
+
35: $V9,
|
|
1021
|
+
38: 10,
|
|
1022
|
+
39: 9,
|
|
1023
|
+
40: $Va,
|
|
1024
|
+
41: $Vb,
|
|
1025
|
+
44: $Vc,
|
|
1026
|
+
46: $Vd,
|
|
1027
|
+
52: 8,
|
|
1028
|
+
57: 4,
|
|
1029
|
+
58: 5,
|
|
1030
|
+
59: 6
|
|
1031
|
+
},
|
|
1032
|
+
{
|
|
1033
|
+
4: 72,
|
|
1034
|
+
6: 21,
|
|
1035
|
+
7: $V0,
|
|
1036
|
+
8: 23,
|
|
1037
|
+
9: $V1,
|
|
1038
|
+
10: $V2,
|
|
1039
|
+
11: 22,
|
|
1040
|
+
12: $V3,
|
|
1041
|
+
13: $V4,
|
|
1042
|
+
14: $V5,
|
|
1043
|
+
15: 24,
|
|
1044
|
+
16: $V6,
|
|
1045
|
+
17: 25,
|
|
1046
|
+
18: $V7,
|
|
1047
|
+
19: 16,
|
|
1048
|
+
20: 11,
|
|
1049
|
+
21: $V8,
|
|
1050
|
+
29: 7,
|
|
1051
|
+
30: 3,
|
|
1052
|
+
32: 14,
|
|
1053
|
+
33: 15,
|
|
1054
|
+
34: 17,
|
|
1055
|
+
35: $V9,
|
|
1056
|
+
38: 10,
|
|
1057
|
+
39: 9,
|
|
1058
|
+
40: $Va,
|
|
1059
|
+
41: $Vb,
|
|
1060
|
+
44: $Vc,
|
|
1061
|
+
46: $Vd,
|
|
1062
|
+
52: 8,
|
|
1063
|
+
57: 4,
|
|
1064
|
+
58: 5,
|
|
1065
|
+
59: 6
|
|
1066
|
+
},
|
|
1067
|
+
{
|
|
1068
|
+
4: 73,
|
|
1069
|
+
6: 21,
|
|
1070
|
+
7: $V0,
|
|
1071
|
+
8: 23,
|
|
1072
|
+
9: $V1,
|
|
1073
|
+
10: $V2,
|
|
1074
|
+
11: 22,
|
|
1075
|
+
12: $V3,
|
|
1076
|
+
13: $V4,
|
|
1077
|
+
14: $V5,
|
|
1078
|
+
15: 24,
|
|
1079
|
+
16: $V6,
|
|
1080
|
+
17: 25,
|
|
1081
|
+
18: $V7,
|
|
1082
|
+
19: 16,
|
|
1083
|
+
20: 11,
|
|
1084
|
+
21: $V8,
|
|
1085
|
+
29: 7,
|
|
1086
|
+
30: 3,
|
|
1087
|
+
32: 14,
|
|
1088
|
+
33: 15,
|
|
1089
|
+
34: 17,
|
|
1090
|
+
35: $V9,
|
|
1091
|
+
38: 10,
|
|
1092
|
+
39: 9,
|
|
1093
|
+
40: $Va,
|
|
1094
|
+
41: $Vb,
|
|
1095
|
+
44: $Vc,
|
|
1096
|
+
46: $Vd,
|
|
1097
|
+
52: 8,
|
|
1098
|
+
57: 4,
|
|
1099
|
+
58: 5,
|
|
1100
|
+
59: 6
|
|
1101
|
+
},
|
|
1102
|
+
{
|
|
1103
|
+
20: 74,
|
|
1104
|
+
21: $V8
|
|
1105
|
+
},
|
|
1106
|
+
{
|
|
1107
|
+
4: 75,
|
|
1108
|
+
6: 21,
|
|
1109
|
+
7: $V0,
|
|
1110
|
+
8: 23,
|
|
1111
|
+
9: $V1,
|
|
1112
|
+
10: $V2,
|
|
1113
|
+
11: 22,
|
|
1114
|
+
12: $V3,
|
|
1115
|
+
13: $V4,
|
|
1116
|
+
14: $V5,
|
|
1117
|
+
15: 24,
|
|
1118
|
+
16: $V6,
|
|
1119
|
+
17: 25,
|
|
1120
|
+
18: $V7,
|
|
1121
|
+
19: 16,
|
|
1122
|
+
20: 11,
|
|
1123
|
+
21: $V8,
|
|
1124
|
+
29: 7,
|
|
1125
|
+
30: 3,
|
|
1126
|
+
32: 14,
|
|
1127
|
+
33: 15,
|
|
1128
|
+
34: 17,
|
|
1129
|
+
35: $V9,
|
|
1130
|
+
38: 10,
|
|
1131
|
+
39: 9,
|
|
1132
|
+
40: $Va,
|
|
1133
|
+
41: $Vb,
|
|
1134
|
+
44: $Vc,
|
|
1135
|
+
46: $Vd,
|
|
1136
|
+
52: 8,
|
|
1137
|
+
57: 4,
|
|
1138
|
+
58: 5,
|
|
1139
|
+
59: 6
|
|
1140
|
+
},
|
|
1141
|
+
{
|
|
1142
|
+
20: 77,
|
|
1143
|
+
21: $V8,
|
|
1144
|
+
47: 76
|
|
1145
|
+
},
|
|
1146
|
+
{
|
|
1147
|
+
6: 21,
|
|
1148
|
+
7: $V0,
|
|
1149
|
+
8: 23,
|
|
1150
|
+
9: $V1,
|
|
1151
|
+
10: $V2,
|
|
1152
|
+
11: 22,
|
|
1153
|
+
12: $V3,
|
|
1154
|
+
13: $V4,
|
|
1155
|
+
14: $V5,
|
|
1156
|
+
15: 24,
|
|
1157
|
+
16: $V6,
|
|
1158
|
+
17: 25,
|
|
1159
|
+
18: $V7,
|
|
1160
|
+
19: 16,
|
|
1161
|
+
20: 11,
|
|
1162
|
+
21: $V8,
|
|
1163
|
+
30: 78,
|
|
1164
|
+
32: 14,
|
|
1165
|
+
33: 15,
|
|
1166
|
+
34: 17,
|
|
1167
|
+
35: $V9,
|
|
1168
|
+
38: 10,
|
|
1169
|
+
39: 9,
|
|
1170
|
+
40: $Va,
|
|
1171
|
+
41: $Vb,
|
|
1172
|
+
44: $Vc,
|
|
1173
|
+
46: $Vd
|
|
1174
|
+
},
|
|
1175
|
+
{
|
|
1176
|
+
32: 79,
|
|
1177
|
+
33: 80,
|
|
1178
|
+
44: $Vc,
|
|
1179
|
+
46: $Vd
|
|
1180
|
+
},
|
|
1181
|
+
o($Vr, [2, 16]),
|
|
1182
|
+
o($Vr, [2, 17]),
|
|
1183
|
+
o($Vr, [2, 18]),
|
|
1184
|
+
o($Vr, [2, 19]),
|
|
1185
|
+
o($Vr, [2, 20]),
|
|
1186
|
+
o($Vr, [2, 21]),
|
|
1187
|
+
{
|
|
1188
|
+
4: 61,
|
|
1189
|
+
6: 21,
|
|
1190
|
+
7: $V0,
|
|
1191
|
+
8: 23,
|
|
1192
|
+
9: $V1,
|
|
1193
|
+
10: $V2,
|
|
1194
|
+
11: 22,
|
|
1195
|
+
12: $V3,
|
|
1196
|
+
13: $V4,
|
|
1197
|
+
14: $V5,
|
|
1198
|
+
15: 24,
|
|
1199
|
+
16: $V6,
|
|
1200
|
+
17: 25,
|
|
1201
|
+
18: $V7,
|
|
1202
|
+
19: 16,
|
|
1203
|
+
20: 11,
|
|
1204
|
+
21: $V8,
|
|
1205
|
+
29: 7,
|
|
1206
|
+
30: 3,
|
|
1207
|
+
32: 14,
|
|
1208
|
+
33: 15,
|
|
1209
|
+
34: 17,
|
|
1210
|
+
35: $V9,
|
|
1211
|
+
38: 10,
|
|
1212
|
+
39: 9,
|
|
1213
|
+
40: $Va,
|
|
1214
|
+
41: $Vb,
|
|
1215
|
+
42: 81,
|
|
1216
|
+
44: $Vc,
|
|
1217
|
+
46: $Vd,
|
|
1218
|
+
52: 8,
|
|
1219
|
+
57: 4,
|
|
1220
|
+
58: 5,
|
|
1221
|
+
59: 6
|
|
1222
|
+
},
|
|
1223
|
+
o($Vq, [2, 39], { 41: [1, 82] }),
|
|
1224
|
+
{
|
|
1225
|
+
37: $Ve,
|
|
1226
|
+
43: [1, 83],
|
|
1227
|
+
53: $Vf,
|
|
1228
|
+
54: $Vg,
|
|
1229
|
+
55: $Vh,
|
|
1230
|
+
56: $Vi,
|
|
1231
|
+
60: $Vj,
|
|
1232
|
+
62: $Vk,
|
|
1233
|
+
63: $Vl
|
|
1234
|
+
},
|
|
1235
|
+
o($Vq, [2, 29]),
|
|
1236
|
+
o($Vr, [2, 26]),
|
|
1237
|
+
{
|
|
1238
|
+
45: $Vs,
|
|
1239
|
+
48: 84,
|
|
1240
|
+
50: $Vt
|
|
1241
|
+
},
|
|
1242
|
+
o($Vu, [2, 62], {
|
|
1243
|
+
37: $Ve,
|
|
1244
|
+
53: $Vf,
|
|
1245
|
+
54: $Vg,
|
|
1246
|
+
55: $Vh,
|
|
1247
|
+
56: $Vi,
|
|
1248
|
+
60: $Vj,
|
|
1249
|
+
62: $Vk,
|
|
1250
|
+
63: $Vl
|
|
1251
|
+
}),
|
|
1252
|
+
{
|
|
1253
|
+
48: 86,
|
|
1254
|
+
49: $Vs,
|
|
1255
|
+
50: [1, 87]
|
|
1256
|
+
},
|
|
1257
|
+
{
|
|
1258
|
+
37: $Ve,
|
|
1259
|
+
53: $Vf,
|
|
1260
|
+
54: $Vg,
|
|
1261
|
+
55: $Vh,
|
|
1262
|
+
56: $Vi,
|
|
1263
|
+
60: $Vj,
|
|
1264
|
+
61: [1, 88],
|
|
1265
|
+
62: $Vk,
|
|
1266
|
+
63: $Vl
|
|
1267
|
+
},
|
|
1268
|
+
o($Vq, [2, 3]),
|
|
1269
|
+
o($Vq, [2, 4]),
|
|
1270
|
+
{
|
|
1271
|
+
37: $Ve,
|
|
1272
|
+
53: $Vf,
|
|
1273
|
+
54: $Vg,
|
|
1274
|
+
55: $Vh,
|
|
1275
|
+
56: $Vi,
|
|
1276
|
+
60: $Vj,
|
|
1277
|
+
61: [1, 89],
|
|
1278
|
+
62: $Vk,
|
|
1279
|
+
63: $Vl
|
|
1280
|
+
},
|
|
1281
|
+
o([
|
|
1282
|
+
5,
|
|
1283
|
+
43,
|
|
1284
|
+
45,
|
|
1285
|
+
49,
|
|
1286
|
+
50,
|
|
1287
|
+
61,
|
|
1288
|
+
62,
|
|
1289
|
+
63
|
|
1290
|
+
], [2, 60], {
|
|
1291
|
+
37: $Ve,
|
|
1292
|
+
53: $Vf,
|
|
1293
|
+
54: $Vg,
|
|
1294
|
+
55: $Vh,
|
|
1295
|
+
56: $Vi,
|
|
1296
|
+
60: $Vj
|
|
1297
|
+
}),
|
|
1298
|
+
o([
|
|
1299
|
+
5,
|
|
1300
|
+
43,
|
|
1301
|
+
45,
|
|
1302
|
+
49,
|
|
1303
|
+
50,
|
|
1304
|
+
61,
|
|
1305
|
+
63
|
|
1306
|
+
], [2, 61], {
|
|
1307
|
+
37: $Ve,
|
|
1308
|
+
53: $Vf,
|
|
1309
|
+
54: $Vg,
|
|
1310
|
+
55: $Vh,
|
|
1311
|
+
56: $Vi,
|
|
1312
|
+
60: $Vj,
|
|
1313
|
+
62: $Vk
|
|
1314
|
+
}),
|
|
1315
|
+
o($Vv, [2, 48], {
|
|
1316
|
+
54: $Vg,
|
|
1317
|
+
55: $Vh,
|
|
1318
|
+
56: $Vi,
|
|
1319
|
+
60: $Vj
|
|
1320
|
+
}),
|
|
1321
|
+
o($Vv, [2, 49], {
|
|
1322
|
+
54: $Vg,
|
|
1323
|
+
55: $Vh,
|
|
1324
|
+
56: $Vi,
|
|
1325
|
+
60: $Vj
|
|
1326
|
+
}),
|
|
1327
|
+
o($Vw, [2, 50], { 60: $Vj }),
|
|
1328
|
+
o($Vw, [2, 51], { 60: $Vj }),
|
|
1329
|
+
o($Vw, [2, 52], { 60: $Vj }),
|
|
1330
|
+
o($Vq, [2, 32], { 41: [1, 90] }),
|
|
1331
|
+
{
|
|
1332
|
+
37: $Ve,
|
|
1333
|
+
45: [1, 91],
|
|
1334
|
+
53: $Vf,
|
|
1335
|
+
54: $Vg,
|
|
1336
|
+
55: $Vh,
|
|
1337
|
+
56: $Vi,
|
|
1338
|
+
60: $Vj,
|
|
1339
|
+
62: $Vk,
|
|
1340
|
+
63: $Vl
|
|
1341
|
+
},
|
|
1342
|
+
{
|
|
1343
|
+
48: 92,
|
|
1344
|
+
49: $Vs,
|
|
1345
|
+
50: [1, 93]
|
|
1346
|
+
},
|
|
1347
|
+
{ 61: [1, 94] },
|
|
1348
|
+
o($Vm, [2, 22], {
|
|
1349
|
+
40: $Vn,
|
|
1350
|
+
44: $Vo,
|
|
1351
|
+
46: $Vp
|
|
1352
|
+
}),
|
|
1353
|
+
o($Vm, [2, 23]),
|
|
1354
|
+
o($Vm, [2, 24]),
|
|
1355
|
+
{
|
|
1356
|
+
43: $Vs,
|
|
1357
|
+
48: 95,
|
|
1358
|
+
50: $Vt
|
|
1359
|
+
},
|
|
1360
|
+
{
|
|
1361
|
+
4: 61,
|
|
1362
|
+
6: 21,
|
|
1363
|
+
7: $V0,
|
|
1364
|
+
8: 23,
|
|
1365
|
+
9: $V1,
|
|
1366
|
+
10: $V2,
|
|
1367
|
+
11: 22,
|
|
1368
|
+
12: $V3,
|
|
1369
|
+
13: $V4,
|
|
1370
|
+
14: $V5,
|
|
1371
|
+
15: 24,
|
|
1372
|
+
16: $V6,
|
|
1373
|
+
17: 25,
|
|
1374
|
+
18: $V7,
|
|
1375
|
+
19: 16,
|
|
1376
|
+
20: 11,
|
|
1377
|
+
21: $V8,
|
|
1378
|
+
29: 7,
|
|
1379
|
+
30: 3,
|
|
1380
|
+
32: 14,
|
|
1381
|
+
33: 15,
|
|
1382
|
+
34: 17,
|
|
1383
|
+
35: $V9,
|
|
1384
|
+
38: 10,
|
|
1385
|
+
39: 9,
|
|
1386
|
+
40: $Va,
|
|
1387
|
+
41: $Vb,
|
|
1388
|
+
42: 96,
|
|
1389
|
+
44: $Vc,
|
|
1390
|
+
46: $Vd,
|
|
1391
|
+
52: 8,
|
|
1392
|
+
57: 4,
|
|
1393
|
+
58: 5,
|
|
1394
|
+
59: 6
|
|
1395
|
+
},
|
|
1396
|
+
o($Vq, [2, 42]),
|
|
1397
|
+
{ 45: [1, 97] },
|
|
1398
|
+
o([43, 45], $Vx, {
|
|
1399
|
+
30: 3,
|
|
1400
|
+
57: 4,
|
|
1401
|
+
58: 5,
|
|
1402
|
+
59: 6,
|
|
1403
|
+
29: 7,
|
|
1404
|
+
52: 8,
|
|
1405
|
+
39: 9,
|
|
1406
|
+
38: 10,
|
|
1407
|
+
20: 11,
|
|
1408
|
+
32: 14,
|
|
1409
|
+
33: 15,
|
|
1410
|
+
19: 16,
|
|
1411
|
+
34: 17,
|
|
1412
|
+
6: 21,
|
|
1413
|
+
11: 22,
|
|
1414
|
+
8: 23,
|
|
1415
|
+
15: 24,
|
|
1416
|
+
17: 25,
|
|
1417
|
+
4: 98,
|
|
1418
|
+
7: $V0,
|
|
1419
|
+
9: $V1,
|
|
1420
|
+
10: $V2,
|
|
1421
|
+
12: $V3,
|
|
1422
|
+
13: $V4,
|
|
1423
|
+
14: $V5,
|
|
1424
|
+
16: $V6,
|
|
1425
|
+
18: $V7,
|
|
1426
|
+
21: $V8,
|
|
1427
|
+
35: $V9,
|
|
1428
|
+
40: $Va,
|
|
1429
|
+
41: $Vb,
|
|
1430
|
+
44: $Vc,
|
|
1431
|
+
46: $Vd
|
|
1432
|
+
}),
|
|
1433
|
+
{ 49: [1, 99] },
|
|
1434
|
+
{
|
|
1435
|
+
4: 100,
|
|
1436
|
+
6: 21,
|
|
1437
|
+
7: $V0,
|
|
1438
|
+
8: 23,
|
|
1439
|
+
9: $V1,
|
|
1440
|
+
10: $V2,
|
|
1441
|
+
11: 22,
|
|
1442
|
+
12: $V3,
|
|
1443
|
+
13: $V4,
|
|
1444
|
+
14: $V5,
|
|
1445
|
+
15: 24,
|
|
1446
|
+
16: $V6,
|
|
1447
|
+
17: 25,
|
|
1448
|
+
18: $V7,
|
|
1449
|
+
19: 16,
|
|
1450
|
+
20: 11,
|
|
1451
|
+
21: $V8,
|
|
1452
|
+
29: 7,
|
|
1453
|
+
30: 3,
|
|
1454
|
+
32: 14,
|
|
1455
|
+
33: 15,
|
|
1456
|
+
34: 17,
|
|
1457
|
+
35: $V9,
|
|
1458
|
+
38: 10,
|
|
1459
|
+
39: 9,
|
|
1460
|
+
40: $Va,
|
|
1461
|
+
41: $Vb,
|
|
1462
|
+
44: $Vc,
|
|
1463
|
+
46: $Vd,
|
|
1464
|
+
49: $Vx,
|
|
1465
|
+
52: 8,
|
|
1466
|
+
57: 4,
|
|
1467
|
+
58: 5,
|
|
1468
|
+
59: 6
|
|
1469
|
+
},
|
|
1470
|
+
{
|
|
1471
|
+
4: 101,
|
|
1472
|
+
6: 21,
|
|
1473
|
+
7: $V0,
|
|
1474
|
+
8: 23,
|
|
1475
|
+
9: $V1,
|
|
1476
|
+
10: $V2,
|
|
1477
|
+
11: 22,
|
|
1478
|
+
12: $V3,
|
|
1479
|
+
13: $V4,
|
|
1480
|
+
14: $V5,
|
|
1481
|
+
15: 24,
|
|
1482
|
+
16: $V6,
|
|
1483
|
+
17: 25,
|
|
1484
|
+
18: $V7,
|
|
1485
|
+
19: 16,
|
|
1486
|
+
20: 11,
|
|
1487
|
+
21: $V8,
|
|
1488
|
+
29: 7,
|
|
1489
|
+
30: 3,
|
|
1490
|
+
32: 14,
|
|
1491
|
+
33: 15,
|
|
1492
|
+
34: 17,
|
|
1493
|
+
35: $V9,
|
|
1494
|
+
38: 10,
|
|
1495
|
+
39: 9,
|
|
1496
|
+
40: $Va,
|
|
1497
|
+
41: $Vb,
|
|
1498
|
+
44: $Vc,
|
|
1499
|
+
46: $Vd,
|
|
1500
|
+
52: 8,
|
|
1501
|
+
57: 4,
|
|
1502
|
+
58: 5,
|
|
1503
|
+
59: 6
|
|
1504
|
+
},
|
|
1505
|
+
{
|
|
1506
|
+
4: 102,
|
|
1507
|
+
6: 21,
|
|
1508
|
+
7: $V0,
|
|
1509
|
+
8: 23,
|
|
1510
|
+
9: $V1,
|
|
1511
|
+
10: $V2,
|
|
1512
|
+
11: 22,
|
|
1513
|
+
12: $V3,
|
|
1514
|
+
13: $V4,
|
|
1515
|
+
14: $V5,
|
|
1516
|
+
15: 24,
|
|
1517
|
+
16: $V6,
|
|
1518
|
+
17: 25,
|
|
1519
|
+
18: $V7,
|
|
1520
|
+
19: 16,
|
|
1521
|
+
20: 11,
|
|
1522
|
+
21: $V8,
|
|
1523
|
+
29: 7,
|
|
1524
|
+
30: 3,
|
|
1525
|
+
32: 14,
|
|
1526
|
+
33: 15,
|
|
1527
|
+
34: 17,
|
|
1528
|
+
35: $V9,
|
|
1529
|
+
38: 10,
|
|
1530
|
+
39: 9,
|
|
1531
|
+
40: $Va,
|
|
1532
|
+
41: $Vb,
|
|
1533
|
+
44: $Vc,
|
|
1534
|
+
46: $Vd,
|
|
1535
|
+
52: 8,
|
|
1536
|
+
57: 4,
|
|
1537
|
+
58: 5,
|
|
1538
|
+
59: 6
|
|
1539
|
+
},
|
|
1540
|
+
{
|
|
1541
|
+
4: 61,
|
|
1542
|
+
6: 21,
|
|
1543
|
+
7: $V0,
|
|
1544
|
+
8: 23,
|
|
1545
|
+
9: $V1,
|
|
1546
|
+
10: $V2,
|
|
1547
|
+
11: 22,
|
|
1548
|
+
12: $V3,
|
|
1549
|
+
13: $V4,
|
|
1550
|
+
14: $V5,
|
|
1551
|
+
15: 24,
|
|
1552
|
+
16: $V6,
|
|
1553
|
+
17: 25,
|
|
1554
|
+
18: $V7,
|
|
1555
|
+
19: 16,
|
|
1556
|
+
20: 11,
|
|
1557
|
+
21: $V8,
|
|
1558
|
+
29: 7,
|
|
1559
|
+
30: 3,
|
|
1560
|
+
32: 14,
|
|
1561
|
+
33: 15,
|
|
1562
|
+
34: 17,
|
|
1563
|
+
35: $V9,
|
|
1564
|
+
38: 10,
|
|
1565
|
+
39: 9,
|
|
1566
|
+
40: $Va,
|
|
1567
|
+
41: $Vb,
|
|
1568
|
+
42: 103,
|
|
1569
|
+
44: $Vc,
|
|
1570
|
+
46: $Vd,
|
|
1571
|
+
52: 8,
|
|
1572
|
+
57: 4,
|
|
1573
|
+
58: 5,
|
|
1574
|
+
59: 6
|
|
1575
|
+
},
|
|
1576
|
+
o($Vq, [2, 34]),
|
|
1577
|
+
{ 49: [1, 104] },
|
|
1578
|
+
{
|
|
1579
|
+
20: 105,
|
|
1580
|
+
21: $V8,
|
|
1581
|
+
49: $Vx
|
|
1582
|
+
},
|
|
1583
|
+
{
|
|
1584
|
+
4: 106,
|
|
1585
|
+
6: 21,
|
|
1586
|
+
7: $V0,
|
|
1587
|
+
8: 23,
|
|
1588
|
+
9: $V1,
|
|
1589
|
+
10: $V2,
|
|
1590
|
+
11: 22,
|
|
1591
|
+
12: $V3,
|
|
1592
|
+
13: $V4,
|
|
1593
|
+
14: $V5,
|
|
1594
|
+
15: 24,
|
|
1595
|
+
16: $V6,
|
|
1596
|
+
17: 25,
|
|
1597
|
+
18: $V7,
|
|
1598
|
+
19: 16,
|
|
1599
|
+
20: 11,
|
|
1600
|
+
21: $V8,
|
|
1601
|
+
29: 7,
|
|
1602
|
+
30: 3,
|
|
1603
|
+
32: 14,
|
|
1604
|
+
33: 15,
|
|
1605
|
+
34: 17,
|
|
1606
|
+
35: $V9,
|
|
1607
|
+
38: 10,
|
|
1608
|
+
39: 9,
|
|
1609
|
+
40: $Va,
|
|
1610
|
+
41: $Vb,
|
|
1611
|
+
44: $Vc,
|
|
1612
|
+
46: $Vd,
|
|
1613
|
+
52: 8,
|
|
1614
|
+
57: 4,
|
|
1615
|
+
58: 5,
|
|
1616
|
+
59: 6
|
|
1617
|
+
},
|
|
1618
|
+
{ 43: [1, 107] },
|
|
1619
|
+
{
|
|
1620
|
+
43: $Vs,
|
|
1621
|
+
48: 108,
|
|
1622
|
+
50: $Vt
|
|
1623
|
+
},
|
|
1624
|
+
o($Vq, [2, 46]),
|
|
1625
|
+
o($Vu, [2, 63], {
|
|
1626
|
+
37: $Ve,
|
|
1627
|
+
53: $Vf,
|
|
1628
|
+
54: $Vg,
|
|
1629
|
+
55: $Vh,
|
|
1630
|
+
56: $Vi,
|
|
1631
|
+
60: $Vj,
|
|
1632
|
+
62: $Vk,
|
|
1633
|
+
63: $Vl
|
|
1634
|
+
}),
|
|
1635
|
+
o($Vq, [2, 47]),
|
|
1636
|
+
{
|
|
1637
|
+
37: $Ve,
|
|
1638
|
+
53: $Vf,
|
|
1639
|
+
54: $Vg,
|
|
1640
|
+
55: $Vh,
|
|
1641
|
+
56: $Vi,
|
|
1642
|
+
60: $Vj,
|
|
1643
|
+
61: [1, 109],
|
|
1644
|
+
62: $Vk,
|
|
1645
|
+
63: $Vl
|
|
1646
|
+
},
|
|
1647
|
+
o($Vy, [2, 66], {
|
|
1648
|
+
37: $Ve,
|
|
1649
|
+
53: $Vf,
|
|
1650
|
+
54: $Vg,
|
|
1651
|
+
55: $Vh,
|
|
1652
|
+
56: $Vi,
|
|
1653
|
+
60: $Vj,
|
|
1654
|
+
62: $Vk,
|
|
1655
|
+
63: $Vl
|
|
1656
|
+
}),
|
|
1657
|
+
o($Vm, [2, 59]),
|
|
1658
|
+
{
|
|
1659
|
+
43: [1, 110],
|
|
1660
|
+
50: [1, 111]
|
|
1661
|
+
},
|
|
1662
|
+
o($Vq, [2, 35]),
|
|
1663
|
+
{ 61: [1, 112] },
|
|
1664
|
+
o($Vy, [2, 64], {
|
|
1665
|
+
37: $Ve,
|
|
1666
|
+
53: $Vf,
|
|
1667
|
+
54: $Vg,
|
|
1668
|
+
55: $Vh,
|
|
1669
|
+
56: $Vi,
|
|
1670
|
+
60: $Vj,
|
|
1671
|
+
62: $Vk,
|
|
1672
|
+
63: $Vl
|
|
1673
|
+
}),
|
|
1674
|
+
o($Vq, [2, 40]),
|
|
1675
|
+
{ 43: [1, 113] },
|
|
1676
|
+
{
|
|
1677
|
+
4: 114,
|
|
1678
|
+
6: 21,
|
|
1679
|
+
7: $V0,
|
|
1680
|
+
8: 23,
|
|
1681
|
+
9: $V1,
|
|
1682
|
+
10: $V2,
|
|
1683
|
+
11: 22,
|
|
1684
|
+
12: $V3,
|
|
1685
|
+
13: $V4,
|
|
1686
|
+
14: $V5,
|
|
1687
|
+
15: 24,
|
|
1688
|
+
16: $V6,
|
|
1689
|
+
17: 25,
|
|
1690
|
+
18: $V7,
|
|
1691
|
+
19: 16,
|
|
1692
|
+
20: 11,
|
|
1693
|
+
21: $V8,
|
|
1694
|
+
29: 7,
|
|
1695
|
+
30: 3,
|
|
1696
|
+
32: 14,
|
|
1697
|
+
33: 15,
|
|
1698
|
+
34: 17,
|
|
1699
|
+
35: $V9,
|
|
1700
|
+
38: 10,
|
|
1701
|
+
39: 9,
|
|
1702
|
+
40: $Va,
|
|
1703
|
+
41: $Vb,
|
|
1704
|
+
44: $Vc,
|
|
1705
|
+
46: $Vd,
|
|
1706
|
+
52: 8,
|
|
1707
|
+
57: 4,
|
|
1708
|
+
58: 5,
|
|
1709
|
+
59: 6
|
|
1710
|
+
},
|
|
1711
|
+
o($Vq, [2, 33]),
|
|
1712
|
+
{
|
|
1713
|
+
4: 98,
|
|
1714
|
+
6: 21,
|
|
1715
|
+
7: $V0,
|
|
1716
|
+
8: 23,
|
|
1717
|
+
9: $V1,
|
|
1718
|
+
10: $V2,
|
|
1719
|
+
11: 22,
|
|
1720
|
+
12: $V3,
|
|
1721
|
+
13: $V4,
|
|
1722
|
+
14: $V5,
|
|
1723
|
+
15: 24,
|
|
1724
|
+
16: $V6,
|
|
1725
|
+
17: 25,
|
|
1726
|
+
18: $V7,
|
|
1727
|
+
19: 16,
|
|
1728
|
+
20: 11,
|
|
1729
|
+
21: $V8,
|
|
1730
|
+
29: 7,
|
|
1731
|
+
30: 3,
|
|
1732
|
+
32: 14,
|
|
1733
|
+
33: 15,
|
|
1734
|
+
34: 17,
|
|
1735
|
+
35: $V9,
|
|
1736
|
+
38: 10,
|
|
1737
|
+
39: 9,
|
|
1738
|
+
40: $Va,
|
|
1739
|
+
41: $Vb,
|
|
1740
|
+
44: $Vc,
|
|
1741
|
+
46: $Vd,
|
|
1742
|
+
52: 8,
|
|
1743
|
+
57: 4,
|
|
1744
|
+
58: 5,
|
|
1745
|
+
59: 6
|
|
1746
|
+
},
|
|
1747
|
+
{
|
|
1748
|
+
4: 115,
|
|
1749
|
+
6: 21,
|
|
1750
|
+
7: $V0,
|
|
1751
|
+
8: 23,
|
|
1752
|
+
9: $V1,
|
|
1753
|
+
10: $V2,
|
|
1754
|
+
11: 22,
|
|
1755
|
+
12: $V3,
|
|
1756
|
+
13: $V4,
|
|
1757
|
+
14: $V5,
|
|
1758
|
+
15: 24,
|
|
1759
|
+
16: $V6,
|
|
1760
|
+
17: 25,
|
|
1761
|
+
18: $V7,
|
|
1762
|
+
19: 16,
|
|
1763
|
+
20: 11,
|
|
1764
|
+
21: $V8,
|
|
1765
|
+
29: 7,
|
|
1766
|
+
30: 3,
|
|
1767
|
+
32: 14,
|
|
1768
|
+
33: 15,
|
|
1769
|
+
34: 17,
|
|
1770
|
+
35: $V9,
|
|
1771
|
+
38: 10,
|
|
1772
|
+
39: 9,
|
|
1773
|
+
40: $Va,
|
|
1774
|
+
41: $Vb,
|
|
1775
|
+
44: $Vc,
|
|
1776
|
+
46: $Vd,
|
|
1777
|
+
52: 8,
|
|
1778
|
+
57: 4,
|
|
1779
|
+
58: 5,
|
|
1780
|
+
59: 6
|
|
1781
|
+
},
|
|
1782
|
+
o($Vq, [2, 41]),
|
|
1783
|
+
o($Vy, [2, 67], {
|
|
1784
|
+
37: $Ve,
|
|
1785
|
+
53: $Vf,
|
|
1786
|
+
54: $Vg,
|
|
1787
|
+
55: $Vh,
|
|
1788
|
+
56: $Vi,
|
|
1789
|
+
60: $Vj,
|
|
1790
|
+
62: $Vk,
|
|
1791
|
+
63: $Vl
|
|
1792
|
+
}),
|
|
1793
|
+
o($Vy, [2, 65], {
|
|
1794
|
+
37: $Ve,
|
|
1795
|
+
53: $Vf,
|
|
1796
|
+
54: $Vg,
|
|
1797
|
+
55: $Vh,
|
|
1798
|
+
56: $Vi,
|
|
1799
|
+
60: $Vj,
|
|
1800
|
+
62: $Vk,
|
|
1801
|
+
63: $Vl
|
|
1802
|
+
})
|
|
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
|
|
1962
|
+
};
|
|
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
|
|
1997
|
+
};
|
|
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
|
|
2013
|
+
});
|
|
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
|
|
2065
|
+
};
|
|
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
|
|
2119
|
+
});
|
|
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 = {};
|
|
2340
|
+
}
|
|
2341
|
+
Parser.prototype = parser;
|
|
2342
|
+
parser.Parser = Parser;
|
|
2343
|
+
return new Parser();
|
|
2344
|
+
})();
|
|
2345
|
+
|
|
2346
|
+
//#endregion
|
|
2347
|
+
//#region src/utils/parseCEL/utils.ts
|
|
2348
|
+
const isCELExpressionGroup = (expr) => expr.type === "ExpressionGroup";
|
|
2349
|
+
const isCELConditionalAnd = (expr) => expr.type === "ConditionalAnd";
|
|
2350
|
+
const isCELConditionalOr = (expr) => expr.type === "ConditionalOr";
|
|
2351
|
+
const isCELStringLiteral = (expr) => expr.type === "StringLiteral";
|
|
2352
|
+
const isCELLiteral = (expr) => isCELNumericLiteral(expr) || isCELStringLiteral(expr) || expr.type === "BooleanLiteral" || expr.type === "NullLiteral" || expr.type === "BytesLiteral";
|
|
2353
|
+
const isCELNumericLiteral = (expr) => expr.type === "FloatLiteral" || expr.type === "IntegerLiteral" || expr.type === "UnsignedIntegerLiteral";
|
|
2354
|
+
const isCELRelation = (expr) => expr.type === "Relation";
|
|
2355
|
+
const isCELList = (expr) => expr.type === "List";
|
|
2356
|
+
const isCELMap = (expr) => expr.type === "Map";
|
|
2357
|
+
const isCELIdentifier = (expr) => expr.type === "Identifier";
|
|
2358
|
+
const isCELNegation = (expr) => expr.type === "Negation";
|
|
2359
|
+
const isCELMember = (expr) => expr.type === "Member";
|
|
2360
|
+
const isCELIdentifierOrChain = (expr) => isCELIdentifier(expr) || isCELMember(expr) && !!expr.left && !!expr.right && !expr.list && !expr.value && isCELIdentifierOrChain(expr.left) && isCELIdentifier(expr.right);
|
|
2361
|
+
const isCELNegatedIdentifier = (expr) => isCELNegation(expr) && isCELIdentifier(expr.value);
|
|
2362
|
+
const isCELNegatedIdentifierOrChain = (expr) => isCELNegatedIdentifier(expr) || isCELMember(expr) && !!expr.left && !!expr.right && !expr.list && !expr.value && isCELIdentifierOrChain(expr.right) && isCELNegatedIdentifier(expr.left);
|
|
2363
|
+
const isCELLikeExpression = (expr) => isCELMember(expr) && !!expr.left && !!expr.right && !!expr.list && isCELIdentifierOrChain(expr.left) && isCELIdentifier(expr.right) && (expr.right.value === "contains" || expr.right.value === "startsWith" || expr.right.value === "endsWith") && expr.list.value.length === 1 && (isCELStringLiteral(expr.list.value[0]) || isCELIdentifier(expr.list.value[0]));
|
|
2364
|
+
const isCELNegatedLikeExpression = (expr) => isCELMember(expr) && !!expr.left && !!expr.right && !!expr.list && isCELNegatedIdentifierOrChain(expr.left) && isCELIdentifier(expr.right) && (expr.right.value === "contains" || expr.right.value === "startsWith" || expr.right.value === "endsWith") && expr.list.value.length === 1 && (isCELStringLiteral(expr.list.value[0]) || isCELIdentifier(expr.list.value[0]));
|
|
2365
|
+
const getIdentifierFromChain = (expr) => {
|
|
2366
|
+
if (isCELIdentifier(expr)) return expr.value;
|
|
2367
|
+
return `${getIdentifierFromChain(expr.left)}.${expr.right.value}`;
|
|
2368
|
+
};
|
|
2369
|
+
const getIdentifierFromNegatedChain = (expr) => {
|
|
2370
|
+
if (isCELNegatedIdentifier(expr)) return `${``.padStart(expr.negations, `!`)}${expr.value.value}`;
|
|
2371
|
+
return `${getIdentifierFromNegatedChain(expr.left)}.${expr.right.value}`;
|
|
2372
|
+
};
|
|
2373
|
+
function evalCELLiteralValue(literal) {
|
|
2374
|
+
switch (literal.type) {
|
|
2375
|
+
case "StringLiteral": return literal.value.replaceAll(/^((?:'''|"""|'|")?)([\S\s]*?)\1$/gm, "$2");
|
|
2376
|
+
case "BooleanLiteral": return literal.value;
|
|
2377
|
+
case "NullLiteral":
|
|
2378
|
+
case "BytesLiteral": return null;
|
|
2379
|
+
default: return literal.value;
|
|
2380
|
+
}
|
|
2381
|
+
}
|
|
2382
|
+
const normalizeCombinator = (c) => c === "||" ? "or" : "and";
|
|
2383
|
+
const normalizeOperator = (op, flip) => {
|
|
2384
|
+
if (flip) {
|
|
2385
|
+
if (op === "<") return ">";
|
|
2386
|
+
if (op === "<=") return ">=";
|
|
2387
|
+
if (op === ">") return "<";
|
|
2388
|
+
if (op === ">=") return "<=";
|
|
2389
|
+
}
|
|
2390
|
+
if (op === "==") return "=";
|
|
2391
|
+
return op;
|
|
2392
|
+
};
|
|
2393
|
+
const generateFlatAndOrList = (expr) => {
|
|
2394
|
+
const combinator = normalizeCombinator(expr.type === "ConditionalAnd" ? "&&" : "||");
|
|
2395
|
+
const { left, right } = expr;
|
|
2396
|
+
if (isCELConditionalAnd(left) || isCELConditionalOr(left)) return [
|
|
2397
|
+
...generateFlatAndOrList(left),
|
|
2398
|
+
combinator,
|
|
2399
|
+
right
|
|
2400
|
+
];
|
|
2401
|
+
return [
|
|
2402
|
+
left,
|
|
2403
|
+
combinator,
|
|
2404
|
+
right
|
|
2405
|
+
];
|
|
2406
|
+
};
|
|
2407
|
+
const generateMixedAndOrList = (expr) => {
|
|
2408
|
+
const arr = generateFlatAndOrList(expr);
|
|
2409
|
+
const returnArray = [];
|
|
2410
|
+
let startIndex = 0;
|
|
2411
|
+
for (let i = 0; i < arr.length; i += 2) if (arr[i + 1] === "and") {
|
|
2412
|
+
startIndex = i;
|
|
2413
|
+
let j = 1;
|
|
2414
|
+
while (arr[startIndex + j] === "and") {
|
|
2415
|
+
i += 2;
|
|
2416
|
+
j += 2;
|
|
2417
|
+
}
|
|
2418
|
+
const tempAndArray = arr.slice(startIndex, i + 1);
|
|
2419
|
+
returnArray.push(tempAndArray);
|
|
2420
|
+
i -= 2;
|
|
2421
|
+
} else if (arr[i + 1] === "or") if (i === 0 || i === arr.length - 3) {
|
|
2422
|
+
if (i === 0 || arr[i - 1] === "or") returnArray.push(arr[i]);
|
|
2423
|
+
returnArray.push(arr[i + 1]);
|
|
2424
|
+
if (i === arr.length - 3) returnArray.push(arr[i + 2]);
|
|
2425
|
+
} else if (arr[i - 1] === "and") returnArray.push(arr[i + 1]);
|
|
2426
|
+
else returnArray.push(arr[i], arr[i + 1]);
|
|
2427
|
+
if (returnArray.length === 1 && Array.isArray(returnArray[0])) return returnArray[0];
|
|
2428
|
+
return returnArray;
|
|
2429
|
+
};
|
|
2430
|
+
|
|
2431
|
+
//#endregion
|
|
2432
|
+
//#region src/utils/parseCEL/parseCEL.ts
|
|
2433
|
+
function parseCEL(cel, options = {}) {
|
|
2434
|
+
const { fields, independentCombinators, listsAsArrays } = options;
|
|
2435
|
+
const ic = !!independentCombinators;
|
|
2436
|
+
const fieldsFlat = getFieldsArray(fields);
|
|
2437
|
+
const fieldIsValid = (fieldName, operator, subordinateFieldName) => fieldIsValidUtil({
|
|
2438
|
+
fieldName,
|
|
2439
|
+
fieldsFlat,
|
|
2440
|
+
operator,
|
|
2441
|
+
subordinateFieldName,
|
|
2442
|
+
getValueSources: options?.getValueSources
|
|
2443
|
+
});
|
|
2444
|
+
const emptyQuery = {
|
|
2445
|
+
rules: [],
|
|
2446
|
+
...ic ? {} : { combinator: "and" }
|
|
2447
|
+
};
|
|
2448
|
+
const processCELExpression = (expr, processOpts = {}) => {
|
|
2449
|
+
const { forwardNegation: forwardedNegation, groupOnlyIfNecessary } = processOpts;
|
|
2450
|
+
/* istanbul ignore if */
|
|
2451
|
+
if (isCELNegation(expr) || isCELNegatedLikeExpression(expr)) {
|
|
2452
|
+
const negate = isCELNegation(expr) ? expr.negations % 2 === 1 : (getIdentifierFromNegatedChain(expr.left).match(/^!+/)?.[0].length ?? 0) % 2 === 1;
|
|
2453
|
+
const negatedExpr = isCELNegation(expr) && isCELExpressionGroup(expr.value) && isCELLikeExpression(expr.value.value) ? processCELExpression(expr.value.value, { forwardNegation: negate }) : isCELNegatedLikeExpression(expr) ? processCELExpression({
|
|
2454
|
+
...expr,
|
|
2455
|
+
left: {
|
|
2456
|
+
type: "Identifier",
|
|
2457
|
+
value: getIdentifierFromNegatedChain(expr.left).replace(/^!+/, "")
|
|
2458
|
+
}
|
|
2459
|
+
}, { forwardNegation: negate }) : isCELNegation(expr) && isCELExpressionGroup(expr.value) && isCELRelation(expr.value.value) ? processCELExpression(expr.value.value, { forwardNegation: negate }) : processCELExpression(expr.value, {
|
|
2460
|
+
groupOnlyIfNecessary: true,
|
|
2461
|
+
forwardNegation: negate
|
|
2462
|
+
});
|
|
2463
|
+
if (negatedExpr) {
|
|
2464
|
+
if (isCELNegatedLikeExpression(expr) || isCELNegation(expr) && isCELExpressionGroup(expr.value) && isCELRelation(expr.value.value)) return negatedExpr;
|
|
2465
|
+
else if (!negate || negate && !isRuleGroup(negatedExpr) && negatedExpr.operator.startsWith("doesNot")) return ic ? { rules: [negatedExpr] } : {
|
|
2466
|
+
combinator: "and",
|
|
2467
|
+
rules: [negatedExpr]
|
|
2468
|
+
};
|
|
2469
|
+
return ic ? {
|
|
2470
|
+
rules: [negatedExpr],
|
|
2471
|
+
not: true
|
|
2472
|
+
} : {
|
|
2473
|
+
combinator: "and",
|
|
2474
|
+
rules: [negatedExpr],
|
|
2475
|
+
not: true
|
|
2476
|
+
};
|
|
2477
|
+
}
|
|
2478
|
+
} else if (isCELExpressionGroup(expr)) {
|
|
2479
|
+
const rule = processCELExpression(expr.value, { groupOnlyIfNecessary: true });
|
|
2480
|
+
if (rule) {
|
|
2481
|
+
if (isRuleGroup(rule) || groupOnlyIfNecessary && isCELExpressionGroup(expr.value)) return rule;
|
|
2482
|
+
return ic ? { rules: [rule] } : {
|
|
2483
|
+
combinator: "and",
|
|
2484
|
+
rules: [rule]
|
|
2485
|
+
};
|
|
2486
|
+
}
|
|
2487
|
+
} else if (isCELConditionalAnd(expr) || isCELConditionalOr(expr)) {
|
|
2488
|
+
if (ic) {
|
|
2489
|
+
const rules$1 = generateFlatAndOrList(expr).map((v) => {
|
|
2490
|
+
if (typeof v === "string") return v;
|
|
2491
|
+
return processCELExpression(v);
|
|
2492
|
+
});
|
|
2493
|
+
if (!rules$1.every(Boolean)) return null;
|
|
2494
|
+
return { rules: rules$1 };
|
|
2495
|
+
}
|
|
2496
|
+
const andOrList = generateMixedAndOrList(expr);
|
|
2497
|
+
const combinator = andOrList[1];
|
|
2498
|
+
const rules = andOrList.filter((v) => Array.isArray(v) || !!v && typeof v !== "string" && "type" in v).map((v) => Array.isArray(v) ? v.filter((vf) => !!v && typeof vf !== "string" && "type" in vf) : v).map((exp) => {
|
|
2499
|
+
if (Array.isArray(exp)) return {
|
|
2500
|
+
combinator: "and",
|
|
2501
|
+
rules: exp.map((e) => processCELExpression(e)).filter(Boolean)
|
|
2502
|
+
};
|
|
2503
|
+
return processCELExpression(exp);
|
|
2504
|
+
}).filter(Boolean);
|
|
2505
|
+
/* istanbul ignore else */
|
|
2506
|
+
if (rules.length > 0) return {
|
|
2507
|
+
combinator,
|
|
2508
|
+
rules
|
|
2509
|
+
};
|
|
2510
|
+
} else if (isCELLikeExpression(expr)) {
|
|
2511
|
+
const field = getIdentifierFromChain(expr.left);
|
|
2512
|
+
const func = expr.right.value;
|
|
2513
|
+
const operatorPre = func === "startsWith" ? "beginsWith" : func;
|
|
2514
|
+
const operator = forwardedNegation ? `doesNot${operatorPre[0].toUpperCase()}${operatorPre.slice(1).replace("s", "")}` : operatorPre;
|
|
2515
|
+
const valueObj = expr.list.value[0];
|
|
2516
|
+
const value = isCELStringLiteral(valueObj) ? evalCELLiteralValue(valueObj) : valueObj.value;
|
|
2517
|
+
const valueSource = expr.list.value[0].type === "Identifier" ? "field" : void 0;
|
|
2518
|
+
if (fieldIsValid(field, operator, valueSource === "field" ? value : void 0)) return valueSource ? {
|
|
2519
|
+
field,
|
|
2520
|
+
operator,
|
|
2521
|
+
value,
|
|
2522
|
+
valueSource
|
|
2523
|
+
} : {
|
|
2524
|
+
field,
|
|
2525
|
+
operator,
|
|
2526
|
+
value
|
|
2527
|
+
};
|
|
2528
|
+
} else if (isCELRelation(expr)) {
|
|
2529
|
+
let field = null;
|
|
2530
|
+
let value = void 0;
|
|
2531
|
+
let valueSource = void 0;
|
|
2532
|
+
let flip = false;
|
|
2533
|
+
const { left, right } = expr;
|
|
2534
|
+
if (isCELIdentifierOrChain(left)) {
|
|
2535
|
+
field = getIdentifierFromChain(left);
|
|
2536
|
+
if (isCELIdentifierOrChain(right)) {
|
|
2537
|
+
value = getIdentifierFromChain(right);
|
|
2538
|
+
valueSource = "field";
|
|
2539
|
+
} else if (isCELLiteral(right)) value = evalCELLiteralValue(right);
|
|
2540
|
+
} else if (isCELIdentifierOrChain(right) && isCELLiteral(left) && expr.operator !== "in") {
|
|
2541
|
+
flip = true;
|
|
2542
|
+
field = getIdentifierFromChain(right);
|
|
2543
|
+
value = evalCELLiteralValue(left);
|
|
2544
|
+
}
|
|
2545
|
+
let operator = normalizeOperator(expr.operator, flip);
|
|
2546
|
+
if (forwardedNegation) operator = defaultOperatorNegationMap[operator];
|
|
2547
|
+
if (value === null && (operator === "=" || operator === "!=")) operator = operator === "=" ? "null" : "notNull";
|
|
2548
|
+
else if ((operator === "in" || operator === "notIn") && isCELList(right)) {
|
|
2549
|
+
if (right.value.value.every((v) => isCELLiteral(v))) value = right.value.value.map((v) => evalCELLiteralValue(v));
|
|
2550
|
+
else if (right.value.value.every((v) => isCELIdentifierOrChain(v))) {
|
|
2551
|
+
valueSource = "field";
|
|
2552
|
+
value = right.value.value.map((id) => getIdentifierFromChain(id));
|
|
2553
|
+
}
|
|
2554
|
+
if (value && !listsAsArrays) value = joinWith(value.map((v) => `${v}`), ",");
|
|
2555
|
+
} else if ((operator === "in" || operator === "notIn") && isCELMap(right)) {
|
|
2556
|
+
const keys = right.value.value.map((v) => v.left);
|
|
2557
|
+
if (keys.every((k) => isCELLiteral(k) || isCELIdentifierOrChain(k))) value = keys.map((k) => isCELLiteral(k) ? evalCELLiteralValue(k) : getIdentifierFromChain(k));
|
|
2558
|
+
if (value && !listsAsArrays) value = joinWith(value.map((v) => `${v}`), ",");
|
|
2559
|
+
}
|
|
2560
|
+
if (field && fieldIsValid(field, operator, valueSource === "field" ? value : void 0) && value !== void 0) return valueSource ? {
|
|
2561
|
+
field,
|
|
2562
|
+
operator,
|
|
2563
|
+
value,
|
|
2564
|
+
valueSource
|
|
2565
|
+
} : {
|
|
2566
|
+
field,
|
|
2567
|
+
operator,
|
|
2568
|
+
value
|
|
2569
|
+
};
|
|
2570
|
+
}
|
|
2571
|
+
return null;
|
|
2572
|
+
};
|
|
2573
|
+
const prepare = options.generateIDs ? prepareRuleGroup : (g) => g;
|
|
2574
|
+
let processedCEL;
|
|
2575
|
+
try {
|
|
2576
|
+
processedCEL = celParser.parse(cel).value;
|
|
2577
|
+
} catch {
|
|
2578
|
+
return prepare(emptyQuery);
|
|
2579
|
+
}
|
|
2580
|
+
const result = processCELExpression(processedCEL);
|
|
2581
|
+
if (result) {
|
|
2582
|
+
if (isRuleGroup(result)) return prepare(result);
|
|
2583
|
+
return prepare({
|
|
2584
|
+
rules: [result],
|
|
2585
|
+
...ic ? {} : { combinator: "and" }
|
|
2586
|
+
});
|
|
2587
|
+
}
|
|
2588
|
+
return prepare(emptyQuery);
|
|
2589
|
+
}
|
|
2590
|
+
|
|
2591
|
+
//#endregion
|
|
2592
|
+
export { parseCEL };
|
|
2593
|
+
//# sourceMappingURL=parseCEL.mjs.map
|