@sap/cds-compiler 5.3.2 → 5.4.0
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/CHANGELOG.md +23 -2
- package/bin/cdsc.js +1 -1
- package/doc/CHANGELOG_BETA.md +2 -2
- package/lib/api/options.js +4 -2
- package/lib/base/builtins.js +0 -10
- package/lib/base/keywords.js +3 -31
- package/lib/base/message-registry.js +23 -5
- package/lib/base/messages.js +1 -1
- package/lib/checks/existsMustEndInAssoc.js +7 -2
- package/lib/checks/foreignKeys.js +12 -7
- package/lib/compiler/assert-consistency.js +11 -3
- package/lib/compiler/builtins.js +2 -0
- package/lib/compiler/checks.js +88 -38
- package/lib/compiler/define.js +2 -2
- package/lib/compiler/shared.js +9 -10
- package/lib/compiler/xpr-rewrite.js +11 -0
- package/lib/compiler/xsn-model.js +1 -1
- package/lib/edm/csn2edm.js +2 -0
- package/lib/edm/edm.js +2 -1
- package/lib/edm/edmPreprocessor.js +14 -1
- package/lib/edm/edmUtils.js +17 -2
- package/lib/gen/BaseParser.js +291 -197
- package/lib/gen/CdlParser.js +1631 -1605
- package/lib/gen/Dictionary.json +74 -6
- package/lib/gen/language.checksum +1 -1
- package/lib/gen/language.interp +1 -1
- package/lib/gen/languageParser.js +1808 -1804
- package/lib/language/antlrParser.js +8 -4
- package/lib/language/genericAntlrParser.js +3 -3
- package/lib/model/csnUtils.js +6 -1
- package/lib/optionProcessor.js +4 -0
- package/lib/parsers/AstBuildingParser.js +172 -108
- package/lib/parsers/CdlGrammar.g4 +154 -134
- package/lib/parsers/Lexer.js +3 -3
- package/lib/parsers/identifiers.js +59 -0
- package/lib/render/toCdl.js +5 -5
- package/lib/render/utils/common.js +5 -0
- package/lib/render/utils/delta.js +23 -5
- package/lib/transform/db/expansion.js +2 -1
- package/lib/transform/db/transformExists.js +10 -9
- package/lib/transform/effective/annotations.js +147 -0
- package/lib/transform/effective/main.js +16 -2
- package/lib/transform/forOdata.js +53 -10
- package/lib/transform/forRelationalDB.js +7 -0
- package/lib/transform/odata/createForeignKeys.js +180 -0
- package/lib/transform/odata/flattening.js +135 -19
- package/lib/transform/odata/typesExposure.js +4 -3
- package/lib/transform/transformUtils.js +6 -6
- package/package.json +1 -1
package/lib/gen/CdlParser.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Parser generated by redepage v0.1.
|
|
1
|
+
// Parser generated by redepage v0.1.16
|
|
2
2
|
'use strict;'
|
|
3
3
|
const { XsnSource, XsnArtifact, XsnName } = require( '../compiler/xsn-model' );
|
|
4
4
|
const AstBuildingParser = require('../parsers/AstBuildingParser');
|
|
@@ -133,7 +133,7 @@ const table = [
|
|
|
133
133
|
},
|
|
134
134
|
/* 8 */ ['m',0,'}'],
|
|
135
135
|
'artifactDefOrExtend',
|
|
136
|
-
/* 10 */ { '@': [10,
|
|
136
|
+
/* 10 */ { '@': [10,780], '': 11 },
|
|
137
137
|
/* 11 */ {
|
|
138
138
|
define: ['ck',12],
|
|
139
139
|
type: 12, view: 12, event: 12, action: 12, aspect: 12, entity: 12, context: 12, service: 12, abstract: 12, function: 12, annotation: 12,
|
|
@@ -199,22 +199,22 @@ const table = [
|
|
|
199
199
|
'serviceDef',
|
|
200
200
|
/* 44 */ ['mk',45,'service'],
|
|
201
201
|
/* 45 */ [46,36],
|
|
202
|
-
/* 46 */ { '@': [46,
|
|
202
|
+
/* 46 */ { '@': [46,786], '': 47 },
|
|
203
203
|
/* 47 */ { '{': [0,5], '': 0 },
|
|
204
204
|
'contextDef',
|
|
205
205
|
/* 49 */ ['mk',50,'context'],
|
|
206
206
|
/* 50 */ [51,36],
|
|
207
|
-
/* 51 */ { '@': [51,
|
|
207
|
+
/* 51 */ { '@': [51,786], '': 52 },
|
|
208
208
|
/* 52 */ { '{': [0,5], '': 0 },
|
|
209
209
|
'annotationDef',
|
|
210
210
|
/* 54 */ ['mk',55,'annotation'],
|
|
211
211
|
/* 55 */ [56,36],
|
|
212
|
-
/* 56 */ { '@': [56,
|
|
212
|
+
/* 56 */ { '@': [56,786], '': 57 },
|
|
213
213
|
/* 57 */ [0,349],
|
|
214
214
|
'typeDef',
|
|
215
215
|
/* 59 */ ['mk',60,'type'],
|
|
216
216
|
/* 60 */ [61,36],
|
|
217
|
-
/* 61 */ { '@': [61,
|
|
217
|
+
/* 61 */ { '@': [61,786], '': 62 },
|
|
218
218
|
/* 62 */ [0,349],
|
|
219
219
|
'aspectDef',
|
|
220
220
|
/* 64 */ {
|
|
@@ -223,7 +223,7 @@ const table = [
|
|
|
223
223
|
},
|
|
224
224
|
/* 65 */ ['mk',66,'entity'],
|
|
225
225
|
/* 66 */ [67,36],
|
|
226
|
-
/* 67 */ { '@': [67,
|
|
226
|
+
/* 67 */ { '@': [67,786], '': 68 },
|
|
227
227
|
/* 68 */ {
|
|
228
228
|
'{': [69,160],
|
|
229
229
|
':': ['c',70],
|
|
@@ -239,7 +239,7 @@ const table = [
|
|
|
239
239
|
'entityDef',
|
|
240
240
|
/* 77 */ ['mk',78,'entity'],
|
|
241
241
|
/* 78 */ [79,36],
|
|
242
|
-
/* 79 */ { '@': [79,
|
|
242
|
+
/* 79 */ { '@': [79,786], '': 80 },
|
|
243
243
|
/* 80 */ { '(': [81,144], '': 81 },
|
|
244
244
|
/* 81 */ {
|
|
245
245
|
':': ['c',82],
|
|
@@ -254,16 +254,16 @@ const table = [
|
|
|
254
254
|
},
|
|
255
255
|
/* 85 */ [89,160],
|
|
256
256
|
/* 86 */ {
|
|
257
|
-
'(': [89,
|
|
258
|
-
projection: [87,
|
|
257
|
+
'(': [89,463], select: '(',
|
|
258
|
+
projection: [87,457],
|
|
259
259
|
},
|
|
260
|
-
/* 87 */ { group: [88,
|
|
261
|
-
/* 88 */ { limit: [89,
|
|
260
|
+
/* 87 */ { group: [88,613], where: 'group', having: 'group', '': 88 },
|
|
261
|
+
/* 88 */ { limit: [89,625], order: 'limit', '': 89 },
|
|
262
262
|
/* 89 */ { actions: [0,127], '': 0 },
|
|
263
263
|
'viewDef',
|
|
264
264
|
/* 91 */ ['mk',92,'view'],
|
|
265
265
|
/* 92 */ [93,36],
|
|
266
|
-
/* 93 */ { '@': [93,
|
|
266
|
+
/* 93 */ { '@': [93,786], '': 94 },
|
|
267
267
|
/* 94 */ {
|
|
268
268
|
'(': [100,144],
|
|
269
269
|
with: ['ck',95],
|
|
@@ -275,11 +275,11 @@ const table = [
|
|
|
275
275
|
/* 98 */ [97,149],
|
|
276
276
|
/* 99 */ ['g',100],
|
|
277
277
|
/* 100 */ ['mk',101,'as'],
|
|
278
|
-
/* 101 */ [0,
|
|
278
|
+
/* 101 */ [0,463],
|
|
279
279
|
'eventDef',
|
|
280
280
|
/* 103 */ ['mk',104,'event'],
|
|
281
281
|
/* 104 */ [105,36],
|
|
282
|
-
/* 105 */ { '@': [105,
|
|
282
|
+
/* 105 */ { '@': [105,786], '': 106 },
|
|
283
283
|
/* 106 */ {
|
|
284
284
|
'{': [0,160],
|
|
285
285
|
':': ['c',107],
|
|
@@ -287,7 +287,7 @@ const table = [
|
|
|
287
287
|
/* 107 */ {
|
|
288
288
|
'{': [0,160],
|
|
289
289
|
Id: [108,40],
|
|
290
|
-
projection: [0,
|
|
290
|
+
projection: [0,457,1],
|
|
291
291
|
},
|
|
292
292
|
/* 108 */ { ',': 109, '{': 109, '': 113 },
|
|
293
293
|
/* 109 */ { ',': ['c',110], '': 112 },
|
|
@@ -297,17 +297,17 @@ const table = [
|
|
|
297
297
|
'{': 112,
|
|
298
298
|
},
|
|
299
299
|
/* 112 */ [0,160],
|
|
300
|
-
/* 113 */ { '@': [113,
|
|
300
|
+
/* 113 */ { '@': [113,780], '': 0 },
|
|
301
301
|
'actionMainDef',
|
|
302
302
|
/* 115 */ ['mk',116,'action'],
|
|
303
303
|
/* 116 */ [117,36],
|
|
304
|
-
/* 117 */ { '@': [117,
|
|
304
|
+
/* 117 */ { '@': [117,786], '': 118 },
|
|
305
305
|
/* 118 */ [119,144],
|
|
306
306
|
/* 119 */ { returns: [0,156], '': 0 },
|
|
307
307
|
'functionMainDef',
|
|
308
308
|
/* 121 */ ['mk',122,'function'],
|
|
309
309
|
/* 122 */ [123,36],
|
|
310
|
-
/* 123 */ { '@': [123,
|
|
310
|
+
/* 123 */ { '@': [123,786], '': 124 },
|
|
311
311
|
/* 124 */ [125,144],
|
|
312
312
|
/* 125 */ [0,156],
|
|
313
313
|
'actionsBlock',
|
|
@@ -321,17 +321,17 @@ const table = [
|
|
|
321
321
|
},
|
|
322
322
|
/* 131 */ ['m',0,'}'],
|
|
323
323
|
'boundActionFunctionDef',
|
|
324
|
-
/* 133 */ { '@': [133,
|
|
324
|
+
/* 133 */ { '@': [133,780], '': 134 },
|
|
325
325
|
/* 134 */ {
|
|
326
326
|
action: ['ck',135],
|
|
327
327
|
function: ['ck',139],
|
|
328
328
|
},
|
|
329
329
|
/* 135 */ ['mi',136],
|
|
330
|
-
/* 136 */ { '@': [136,
|
|
330
|
+
/* 136 */ { '@': [136,786], '': 137 },
|
|
331
331
|
/* 137 */ [138,144],
|
|
332
332
|
/* 138 */ { returns: [0,156], '': 0 },
|
|
333
333
|
/* 139 */ ['mi',140],
|
|
334
|
-
/* 140 */ { '@': [140,
|
|
334
|
+
/* 140 */ { '@': [140,786], '': 141 },
|
|
335
335
|
/* 141 */ [142,144],
|
|
336
336
|
/* 142 */ [0,156],
|
|
337
337
|
'paramsList',
|
|
@@ -343,18 +343,18 @@ const table = [
|
|
|
343
343
|
},
|
|
344
344
|
/* 147 */ ['m',0,')'],
|
|
345
345
|
'paramDef',
|
|
346
|
-
/* 149 */ { '@': [149,
|
|
346
|
+
/* 149 */ { '@': [149,780], '': 150 },
|
|
347
347
|
/* 150 */ ['miA',151],
|
|
348
|
-
/* 151 */ { '@': [151,
|
|
348
|
+
/* 151 */ { '@': [151,786], '': 152 },
|
|
349
349
|
/* 152 */ {
|
|
350
350
|
'{': [153,160],
|
|
351
351
|
':': ['c',154],
|
|
352
352
|
},
|
|
353
|
-
/* 153 */ { not: [0,
|
|
353
|
+
/* 153 */ { not: [0,450], null: 'not', '': 0 },
|
|
354
354
|
/* 154 */ [0,360],
|
|
355
355
|
'returnsSpec',
|
|
356
356
|
/* 156 */ ['mk',157,'returns'],
|
|
357
|
-
/* 157 */ { '@': [157,
|
|
357
|
+
/* 157 */ { '@': [157,780], '': 158 },
|
|
358
358
|
/* 158 */ [0,360],
|
|
359
359
|
'elementsBlock',
|
|
360
360
|
/* 160 */ ['m',161,'{'],
|
|
@@ -366,25 +366,25 @@ const table = [
|
|
|
366
366
|
},
|
|
367
367
|
/* 163 */ ['m',0,'}'],
|
|
368
368
|
'elementDef',
|
|
369
|
-
/* 165 */ { '@': [165,
|
|
369
|
+
/* 165 */ { '@': [165,780], '': 166 },
|
|
370
370
|
/* 166 */ { virtual: ['ck',167,1], '': 167 },
|
|
371
371
|
/* 167 */ { key: ['ck',168], '': 168 },
|
|
372
372
|
/* 168 */ { masked: ['ck',169,1], '': 169 },
|
|
373
373
|
/* 169 */ { element: ['ck',170,1], '': 170 },
|
|
374
374
|
/* 170 */ ['mi',171],
|
|
375
|
-
/* 171 */ { '@': [171,
|
|
375
|
+
/* 171 */ { '@': [171,786], '': 172 },
|
|
376
376
|
/* 172 */ {
|
|
377
377
|
'{': [173,160],
|
|
378
378
|
':': ['c',174],
|
|
379
379
|
'': 175
|
|
380
380
|
},
|
|
381
|
-
/* 173 */ { not: [175,
|
|
381
|
+
/* 173 */ { not: [175,450], null: 'not', '': 175 },
|
|
382
382
|
/* 174 */ [175,360],
|
|
383
383
|
/* 175 */ { '=': ['c',176], '': 0 },
|
|
384
|
-
/* 176 */ [177,
|
|
384
|
+
/* 176 */ [177,653],
|
|
385
385
|
/* 177 */ { stored: ['ck',178], '': 178 },
|
|
386
386
|
/* 178 */ ['g',179],
|
|
387
|
-
/* 179 */ { '@': [179,
|
|
387
|
+
/* 179 */ { '@': [179,780], '': 0 },
|
|
388
388
|
'enumSymbolsBlock',
|
|
389
389
|
/* 181 */ ['mk',182,'enum'],
|
|
390
390
|
/* 182 */ ['m',183,'{'],
|
|
@@ -395,19 +395,19 @@ const table = [
|
|
|
395
395
|
},
|
|
396
396
|
/* 185 */ ['m',0,'}'],
|
|
397
397
|
'enumSymbolDef',
|
|
398
|
-
/* 187 */ { '@': [187,
|
|
398
|
+
/* 187 */ { '@': [187,780], '': 188 },
|
|
399
399
|
/* 188 */ ['mi',189],
|
|
400
|
-
/* 189 */ { '@': [189,
|
|
400
|
+
/* 189 */ { '@': [189,780], '': 190 },
|
|
401
401
|
/* 190 */ { '=': ['c',191], '': 0 },
|
|
402
402
|
/* 191 */ {
|
|
403
403
|
String: ['c',193],
|
|
404
404
|
Number: ['c',193],
|
|
405
405
|
'+': ['c',192], '-': '+',
|
|
406
|
-
Id: [193,
|
|
406
|
+
Id: [193,777], '#': 'Id', QuotedLiteral: 'Id',
|
|
407
407
|
},
|
|
408
408
|
/* 192 */ ['m',193,'Number'],
|
|
409
409
|
/* 193 */ ['g',194],
|
|
410
|
-
/* 194 */ { '@': [194,
|
|
410
|
+
/* 194 */ { '@': [194,780], '': 0 },
|
|
411
411
|
'foreignKeysBlock',
|
|
412
412
|
/* 196 */ ['m',197,'{'],
|
|
413
413
|
/* 197 */ { Id: [198,201], '@': 'Id', '': 199 },
|
|
@@ -417,7 +417,7 @@ const table = [
|
|
|
417
417
|
},
|
|
418
418
|
/* 199 */ ['m',0,'}'],
|
|
419
419
|
'foreignKeyDef',
|
|
420
|
-
/* 201 */ { '@': [201,
|
|
420
|
+
/* 201 */ { '@': [201,780], '': 202 },
|
|
421
421
|
/* 202 */ [203,40],
|
|
422
422
|
/* 203 */ { as: ['ck',204], '': 0 },
|
|
423
423
|
/* 204 */ ['mi',0],
|
|
@@ -428,14 +428,14 @@ const table = [
|
|
|
428
428
|
association: ['ck',209],
|
|
429
429
|
composition: ['ck',211],
|
|
430
430
|
},
|
|
431
|
-
/* 209 */ { '[': [210,
|
|
431
|
+
/* 209 */ { '[': [210,432], '': 210 },
|
|
432
432
|
/* 210 */ ['mk',213,'to'],
|
|
433
|
-
/* 211 */ { '[': [212,
|
|
433
|
+
/* 211 */ { '[': [212,432], '': 212 },
|
|
434
434
|
/* 212 */ ['mk',213,'of'],
|
|
435
435
|
/* 213 */ { one: ['ck',214,1], many: 'one', '': 214 },
|
|
436
436
|
/* 214 */ [215,40],
|
|
437
437
|
/* 215 */ ['mk',216,'on'],
|
|
438
|
-
/* 216 */ [0,
|
|
438
|
+
/* 216 */ [0,645],
|
|
439
439
|
'annotateArtifact',
|
|
440
440
|
/* 218 */ [219,36],
|
|
441
441
|
/* 219 */ {
|
|
@@ -446,10 +446,10 @@ const table = [
|
|
|
446
446
|
/* 220 */ [221,36],
|
|
447
447
|
/* 221 */ { with: ['ck',222], '': 222 },
|
|
448
448
|
/* 222 */ ['g',223],
|
|
449
|
-
/* 223 */ { '@': [223,
|
|
449
|
+
/* 223 */ { '@': [223,780], '': 224 },
|
|
450
450
|
/* 224 */ { '{': [0,323], '': 0 },
|
|
451
451
|
/* 225 */ ['g',226],
|
|
452
|
-
/* 226 */ { '@': [226,
|
|
452
|
+
/* 226 */ { '@': [226,780], '': 227 },
|
|
453
453
|
/* 227 */ { '(': [228,310], '': 228 },
|
|
454
454
|
/* 228 */ {
|
|
455
455
|
returns: [0,319],
|
|
@@ -467,26 +467,26 @@ const table = [
|
|
|
467
467
|
/* 233 */ [234,36],
|
|
468
468
|
/* 234 */ { with: ['ck',235], '': 235 },
|
|
469
469
|
/* 235 */ ['g',236],
|
|
470
|
-
/* 236 */ { '@': [236,
|
|
470
|
+
/* 236 */ { '@': [236,780], '': 237 },
|
|
471
471
|
/* 237 */ {
|
|
472
472
|
elements: ['ck',238],
|
|
473
473
|
'{': 238,
|
|
474
474
|
enum: [0,181],
|
|
475
|
-
'(': [0,
|
|
475
|
+
'(': [0,423],
|
|
476
476
|
'': 0
|
|
477
477
|
},
|
|
478
478
|
/* 238 */ [0,333],
|
|
479
|
-
/* 239 */ { '@': [239,
|
|
479
|
+
/* 239 */ { '@': [239,780], '': 240 },
|
|
480
480
|
/* 240 */ { '{': [241,333], '': 0 },
|
|
481
481
|
/* 241 */ { actions: [0,127], '': 0 },
|
|
482
|
-
/* 242 */ { '@': [242,
|
|
482
|
+
/* 242 */ { '@': [242,780], '': 243 },
|
|
483
483
|
/* 243 */ {
|
|
484
484
|
Id: [244,40],
|
|
485
485
|
elements: ['ck',248,1],
|
|
486
486
|
'{': 248,
|
|
487
487
|
actions: [0,127,1],
|
|
488
488
|
enum: [0,181,1],
|
|
489
|
-
'(': [0,
|
|
489
|
+
'(': [0,423],
|
|
490
490
|
columns: ['ck',250,1],
|
|
491
491
|
definitions: ['ck',251,1],
|
|
492
492
|
'': 0
|
|
@@ -497,35 +497,35 @@ const table = [
|
|
|
497
497
|
/* 247 */ { actions: [0,127], '': 0 },
|
|
498
498
|
/* 248 */ [249,333],
|
|
499
499
|
/* 249 */ { actions: [0,127], '': 0 },
|
|
500
|
-
/* 250 */ [0,
|
|
500
|
+
/* 250 */ [0,569],
|
|
501
501
|
/* 251 */ [0,5],
|
|
502
502
|
'extendService',
|
|
503
503
|
/* 253 */ ['mk',254,'service'],
|
|
504
504
|
/* 254 */ [255,36],
|
|
505
505
|
/* 255 */ { with: ['ck',256], '': 256 },
|
|
506
506
|
/* 256 */ ['g',257],
|
|
507
|
-
/* 257 */ { '@': [257,
|
|
507
|
+
/* 257 */ { '@': [257,780], '': 258 },
|
|
508
508
|
/* 258 */ { '{': [0,5], '': 0 },
|
|
509
509
|
'extendContext',
|
|
510
510
|
/* 260 */ ['mk',261,'context'],
|
|
511
511
|
/* 261 */ [262,36],
|
|
512
512
|
/* 262 */ { with: ['ck',263], '': 263 },
|
|
513
513
|
/* 263 */ ['g',264],
|
|
514
|
-
/* 264 */ { '@': [264,
|
|
514
|
+
/* 264 */ { '@': [264,780], '': 265 },
|
|
515
515
|
/* 265 */ { '{': [0,5], '': 0 },
|
|
516
516
|
'extendType',
|
|
517
517
|
/* 267 */ ['mk',268,'type'],
|
|
518
518
|
/* 268 */ [269,36],
|
|
519
519
|
/* 269 */ { with: ['ck',272], '': 270 },
|
|
520
|
-
/* 270 */ { '@': [270,
|
|
520
|
+
/* 270 */ { '@': [270,780], '': 271 },
|
|
521
521
|
/* 271 */ { '{': [0,333], '': 0 },
|
|
522
|
-
/* 272 */ { '@': [272,
|
|
522
|
+
/* 272 */ { '@': [272,780], '': 273 },
|
|
523
523
|
/* 273 */ {
|
|
524
524
|
Id: [274,40],
|
|
525
525
|
elements: ['ck',277,1],
|
|
526
526
|
'{': 277,
|
|
527
527
|
enum: [0,181,1],
|
|
528
|
-
'(': [0,
|
|
528
|
+
'(': [0,423],
|
|
529
529
|
'': 0
|
|
530
530
|
},
|
|
531
531
|
/* 274 */ { ',': ['c',275], '': 276 },
|
|
@@ -536,8 +536,8 @@ const table = [
|
|
|
536
536
|
/* 279 */ { aspect: ['ck',280], entity: 'aspect' },
|
|
537
537
|
/* 280 */ [281,36],
|
|
538
538
|
/* 281 */ { with: ['ck',283], '': 282 },
|
|
539
|
-
/* 282 */ { '@': [282,
|
|
540
|
-
/* 283 */ { '@': [283,
|
|
539
|
+
/* 282 */ { '@': [282,780], '': 287 },
|
|
540
|
+
/* 283 */ { '@': [283,780], '': 284 },
|
|
541
541
|
/* 284 */ {
|
|
542
542
|
Id: [285,40],
|
|
543
543
|
actions: ['g',287,1],
|
|
@@ -552,8 +552,8 @@ const table = [
|
|
|
552
552
|
/* 291 */ [292,36],
|
|
553
553
|
/* 292 */ { with: ['ck',293], '': 293 },
|
|
554
554
|
/* 293 */ ['g',294],
|
|
555
|
-
/* 294 */ { '@': [294,
|
|
556
|
-
/* 295 */ { '{': [296,
|
|
555
|
+
/* 294 */ { '@': [294,780], '': 295 },
|
|
556
|
+
/* 295 */ { '{': [296,569], '': 296 },
|
|
557
557
|
/* 296 */ { actions: [0,127], '': 0 },
|
|
558
558
|
'annotateActionsBlock',
|
|
559
559
|
/* 298 */ ['mk',299,'actions'],
|
|
@@ -566,9 +566,9 @@ const table = [
|
|
|
566
566
|
},
|
|
567
567
|
/* 302 */ ['m',0,'}'],
|
|
568
568
|
'annotateBoundAction',
|
|
569
|
-
/* 304 */ { '@': [304,
|
|
569
|
+
/* 304 */ { '@': [304,780], '': 305 },
|
|
570
570
|
/* 305 */ ['mi',306],
|
|
571
|
-
/* 306 */ { '@': [306,
|
|
571
|
+
/* 306 */ { '@': [306,780], '': 307 },
|
|
572
572
|
/* 307 */ { '(': [308,310], '': 308 },
|
|
573
573
|
/* 308 */ { returns: [0,319,1], '': 0 },
|
|
574
574
|
'annotateParamsBlock',
|
|
@@ -580,12 +580,12 @@ const table = [
|
|
|
580
580
|
},
|
|
581
581
|
/* 313 */ ['m',0,')'],
|
|
582
582
|
'annotateParam',
|
|
583
|
-
/* 315 */ { '@': [315,
|
|
583
|
+
/* 315 */ { '@': [315,780], '': 316 },
|
|
584
584
|
/* 316 */ ['mi',317],
|
|
585
|
-
/* 317 */ { '@': [317,
|
|
585
|
+
/* 317 */ { '@': [317,780], '': 0 },
|
|
586
586
|
'annotateReturns',
|
|
587
587
|
/* 319 */ ['mk',320,'returns'],
|
|
588
|
-
/* 320 */ { '@': [320,
|
|
588
|
+
/* 320 */ { '@': [320,780], '': 321 },
|
|
589
589
|
/* 321 */ { '{': [0,323], '': 0 },
|
|
590
590
|
'annotateElementsBlock',
|
|
591
591
|
/* 323 */ ['m',324,'{'],
|
|
@@ -597,9 +597,9 @@ const table = [
|
|
|
597
597
|
},
|
|
598
598
|
/* 326 */ ['m',0,'}'],
|
|
599
599
|
'annotateElement',
|
|
600
|
-
/* 328 */ { '@': [328,
|
|
600
|
+
/* 328 */ { '@': [328,780], '': 329 },
|
|
601
601
|
/* 329 */ ['mi',330],
|
|
602
|
-
/* 330 */ { '@': [330,
|
|
602
|
+
/* 330 */ { '@': [330,780], '': 331 },
|
|
603
603
|
/* 331 */ { '{': [0,323], '': 0 },
|
|
604
604
|
'extendElementsBlock',
|
|
605
605
|
/* 333 */ ['m',334,'{'],
|
|
@@ -611,7 +611,7 @@ const table = [
|
|
|
611
611
|
},
|
|
612
612
|
/* 336 */ ['m',0,'}'],
|
|
613
613
|
'elementDefOrExtend',
|
|
614
|
-
/* 338 */ { '@': [338,
|
|
614
|
+
/* 338 */ { '@': [338,780], '': 339 },
|
|
615
615
|
/* 339 */ {
|
|
616
616
|
Id: [0,165], '@': 'Id', key: 'Id',
|
|
617
617
|
extend: ['ck',340,1],
|
|
@@ -619,14 +619,14 @@ const table = [
|
|
|
619
619
|
/* 340 */ { element: ['ck',341,1], '': 341 },
|
|
620
620
|
/* 341 */ ['mi',342],
|
|
621
621
|
/* 342 */ { with: ['ck',345], '': 343 },
|
|
622
|
-
/* 343 */ { '@': [343,
|
|
622
|
+
/* 343 */ { '@': [343,780], '': 344 },
|
|
623
623
|
/* 344 */ { '{': [0,333], '': 0 },
|
|
624
|
-
/* 345 */ { '@': [345,
|
|
624
|
+
/* 345 */ { '@': [345,780], '': 346 },
|
|
625
625
|
/* 346 */ {
|
|
626
626
|
elements: ['ck',347],
|
|
627
627
|
'{': 347,
|
|
628
628
|
enum: [0,181],
|
|
629
|
-
'(': [0,
|
|
629
|
+
'(': [0,423],
|
|
630
630
|
'': 0
|
|
631
631
|
},
|
|
632
632
|
/* 347 */ [0,333],
|
|
@@ -635,13 +635,13 @@ const table = [
|
|
|
635
635
|
'{': [350,160],
|
|
636
636
|
':': ['c',351],
|
|
637
637
|
},
|
|
638
|
-
/* 350 */ { not: [0,
|
|
638
|
+
/* 350 */ { not: [0,450], null: 'not', '': 0 },
|
|
639
639
|
/* 351 */ {
|
|
640
640
|
'{': [0,360,1], many: '{', type: '{', array: '{', localized: '{', association: '{', composition: '{',
|
|
641
641
|
Id: [352,40],
|
|
642
642
|
},
|
|
643
643
|
/* 352 */ {
|
|
644
|
-
'(': [353,
|
|
644
|
+
'(': [353,411], ':': '(',
|
|
645
645
|
'@': [0,362], not: '@', enum: '@', null: '@', default: '@',
|
|
646
646
|
',': 354, '{': 354,
|
|
647
647
|
'': 0
|
|
@@ -654,785 +654,793 @@ const table = [
|
|
|
654
654
|
'{': 357,
|
|
655
655
|
},
|
|
656
656
|
/* 357 */ [358,160],
|
|
657
|
-
/* 358 */ { not: [0,
|
|
657
|
+
/* 358 */ { not: [0,450], null: 'not', '': 0 },
|
|
658
658
|
'typeExpression',
|
|
659
659
|
/* 360 */ {
|
|
660
660
|
'{': [361,160],
|
|
661
|
-
Id: [362,
|
|
662
|
-
type: [362,
|
|
663
|
-
localized: ['ck',
|
|
664
|
-
association: ['ck',
|
|
665
|
-
composition: ['ck',
|
|
666
|
-
array: ['ck',
|
|
667
|
-
many: ['ck',
|
|
661
|
+
Id: [362,410],
|
|
662
|
+
type: [362,402,1],
|
|
663
|
+
localized: ['ck',371,1],
|
|
664
|
+
association: ['ck',375,1],
|
|
665
|
+
composition: ['ck',384,1],
|
|
666
|
+
array: ['ck',394,1],
|
|
667
|
+
many: ['ck',395,1],
|
|
668
668
|
},
|
|
669
|
-
/* 361 */ { not: [0,
|
|
670
|
-
/* 362 */ { not: [363,
|
|
671
|
-
/* 363 */
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
enum:
|
|
675
|
-
'@': 367,
|
|
669
|
+
/* 361 */ { not: [0,450], null: 'not', '': 0 },
|
|
670
|
+
/* 362 */ { not: [363,450], null: 'not', '': 363 },
|
|
671
|
+
/* 363 */ {
|
|
672
|
+
not: [364,444], null: 'not', default: 'not',
|
|
673
|
+
'@': 366,
|
|
674
|
+
enum: 369,
|
|
676
675
|
'': 0
|
|
677
676
|
},
|
|
678
|
-
/*
|
|
679
|
-
/*
|
|
680
|
-
/*
|
|
681
|
-
/*
|
|
682
|
-
/*
|
|
683
|
-
/*
|
|
684
|
-
/*
|
|
685
|
-
/*
|
|
686
|
-
/*
|
|
687
|
-
/*
|
|
688
|
-
/*
|
|
689
|
-
/*
|
|
690
|
-
/*
|
|
691
|
-
/*
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
''
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
/* 380 */ { not: [381,442], null: 'not', default: 'not', '': 381 },
|
|
698
|
-
/* 381 */ ['g',382],
|
|
699
|
-
/* 382 */ { '@': [382,777], '': 0 },
|
|
700
|
-
/* 383 */ { '[': [384,430], '': 384 },
|
|
701
|
-
/* 384 */ ['mk',385,'of'],
|
|
702
|
-
/* 385 */ { one: ['ck',386,1], many: 'one', '': 386 },
|
|
703
|
-
/* 386 */ {
|
|
704
|
-
Id: [387,40],
|
|
705
|
-
'{': 392,
|
|
677
|
+
/* 364 */ { '@': 365, '': 0 },
|
|
678
|
+
/* 365 */ { '@': [365,780], '': 0 },
|
|
679
|
+
/* 366 */ { '@': [366,780], '': 367 },
|
|
680
|
+
/* 367 */ { enum: [368,181], '': 0 },
|
|
681
|
+
/* 368 */ { not: [0,444], null: 'not', default: 'not', '': 0 },
|
|
682
|
+
/* 369 */ [370,181],
|
|
683
|
+
/* 370 */ { not: [0,444], null: 'not', default: 'not', '': 0 },
|
|
684
|
+
/* 371 */ [372,410],
|
|
685
|
+
/* 372 */ { not: [373,444], null: 'not', default: 'not', '': 373 },
|
|
686
|
+
/* 373 */ { '@': 374, '': 0 },
|
|
687
|
+
/* 374 */ { '@': [374,780], '': 0 },
|
|
688
|
+
/* 375 */ { '[': [376,432], '': 376 },
|
|
689
|
+
/* 376 */ ['mk',377,'to'],
|
|
690
|
+
/* 377 */ { one: ['ck',378,1], many: 'one', '': 378 },
|
|
691
|
+
/* 378 */ [379,40],
|
|
692
|
+
/* 379 */ {
|
|
693
|
+
on: ['ck',380],
|
|
694
|
+
'{': [381,196],
|
|
695
|
+
'': 381
|
|
706
696
|
},
|
|
697
|
+
/* 380 */ [382,645],
|
|
698
|
+
/* 381 */ { not: [382,444], null: 'not', default: 'not', '': 382 },
|
|
699
|
+
/* 382 */ ['g',383],
|
|
700
|
+
/* 383 */ { '@': [383,780], '': 0 },
|
|
701
|
+
/* 384 */ { '[': [385,432], '': 385 },
|
|
702
|
+
/* 385 */ ['mk',386,'of'],
|
|
703
|
+
/* 386 */ { one: ['ck',387,1], many: 'one', '': 387 },
|
|
707
704
|
/* 387 */ {
|
|
708
|
-
|
|
709
|
-
'{':
|
|
710
|
-
|
|
705
|
+
Id: [388,40],
|
|
706
|
+
'{': 393,
|
|
707
|
+
},
|
|
708
|
+
/* 388 */ {
|
|
709
|
+
on: ['ck',389],
|
|
710
|
+
'{': [390,196],
|
|
711
|
+
'': 390
|
|
711
712
|
},
|
|
712
|
-
/*
|
|
713
|
-
/*
|
|
714
|
-
/*
|
|
715
|
-
/*
|
|
716
|
-
/*
|
|
717
|
-
/*
|
|
718
|
-
/*
|
|
719
|
-
'{': [
|
|
720
|
-
Id: [
|
|
721
|
-
type: [
|
|
713
|
+
/* 389 */ [391,645],
|
|
714
|
+
/* 390 */ { not: [391,444], null: 'not', default: 'not', '': 391 },
|
|
715
|
+
/* 391 */ ['g',392],
|
|
716
|
+
/* 392 */ { '@': [392,780], '': 0 },
|
|
717
|
+
/* 393 */ [0,160],
|
|
718
|
+
/* 394 */ ['mk',395,'of'],
|
|
719
|
+
/* 395 */ {
|
|
720
|
+
'{': [396,160],
|
|
721
|
+
Id: [397,410],
|
|
722
|
+
type: [397,402,1],
|
|
723
|
+
},
|
|
724
|
+
/* 396 */ { not: [0,450], null: 'not', '': 0 },
|
|
725
|
+
/* 397 */ { not: [398,450], null: 'not', '': 398 },
|
|
726
|
+
/* 398 */ {
|
|
727
|
+
enum: [399,181],
|
|
728
|
+
'@': 400,
|
|
729
|
+
'': 0
|
|
722
730
|
},
|
|
723
|
-
/*
|
|
724
|
-
/*
|
|
725
|
-
/* 397 */ { enum: [398,181], '': 399 },
|
|
726
|
-
/* 398 */ { not: [0,448], null: 'not', '': 0 },
|
|
727
|
-
/* 399 */ { '@': [399,777], '': 0 },
|
|
731
|
+
/* 399 */ { not: [0,450], null: 'not', '': 0 },
|
|
732
|
+
/* 400 */ { '@': [400,780], '': 0 },
|
|
728
733
|
'typeTypeOf',
|
|
729
|
-
/*
|
|
730
|
-
/*
|
|
731
|
-
/*
|
|
732
|
-
/*
|
|
733
|
-
/*
|
|
734
|
-
/*
|
|
735
|
-
/*
|
|
734
|
+
/* 402 */ ['mk',403,'type'],
|
|
735
|
+
/* 403 */ ['mk',404,'of'],
|
|
736
|
+
/* 404 */ [405,40],
|
|
737
|
+
/* 405 */ { ':': ['c',406], '': 0 },
|
|
738
|
+
/* 406 */ ['miA',407],
|
|
739
|
+
/* 407 */ { '.': ['c',408], '': 0 },
|
|
740
|
+
/* 408 */ ['miA',407],
|
|
736
741
|
'typeRefOptArgs',
|
|
737
|
-
/*
|
|
738
|
-
/*
|
|
739
|
-
':': ['c',
|
|
740
|
-
'(': ['c',
|
|
742
|
+
/* 410 */ [411,40],
|
|
743
|
+
/* 411 */ {
|
|
744
|
+
':': ['c',412],
|
|
745
|
+
'(': ['c',415],
|
|
741
746
|
'': 0
|
|
742
747
|
},
|
|
743
|
-
/*
|
|
744
|
-
/*
|
|
745
|
-
/*
|
|
746
|
-
/*
|
|
747
|
-
Number: ['c',
|
|
748
|
-
Id:
|
|
748
|
+
/* 412 */ ['miA',413],
|
|
749
|
+
/* 413 */ { '.': ['c',414], '': 0 },
|
|
750
|
+
/* 414 */ ['miA',413],
|
|
751
|
+
/* 415 */ {
|
|
752
|
+
Number: ['c',416],
|
|
753
|
+
Id: 419,
|
|
749
754
|
},
|
|
750
|
-
/*
|
|
751
|
-
/*
|
|
752
|
-
Number: ['c',
|
|
753
|
-
floating: ['ck',
|
|
754
|
-
')':
|
|
755
|
+
/* 416 */ { ',': ['c',417], '': 418 },
|
|
756
|
+
/* 417 */ {
|
|
757
|
+
Number: ['c',416],
|
|
758
|
+
floating: ['ck',416], variable: 'floating',
|
|
759
|
+
')': 418,
|
|
755
760
|
},
|
|
756
|
-
/*
|
|
757
|
-
/*
|
|
758
|
-
|
|
759
|
-
'
|
|
761
|
+
/* 418 */ ['g',421],
|
|
762
|
+
/* 419 */ { Id: [420,428], '': 421 },
|
|
763
|
+
/* 420 */ {
|
|
764
|
+
',': ['c',419],
|
|
765
|
+
')': 421,
|
|
760
766
|
},
|
|
761
|
-
/*
|
|
767
|
+
/* 421 */ ['m',0,')'],
|
|
762
768
|
'typeNamedArgsList',
|
|
763
|
-
/*
|
|
764
|
-
/*
|
|
765
|
-
/*
|
|
766
|
-
',': ['c',
|
|
767
|
-
')':
|
|
769
|
+
/* 423 */ ['m',424,'('],
|
|
770
|
+
/* 424 */ { Id: [425,428], '': 426 },
|
|
771
|
+
/* 425 */ {
|
|
772
|
+
',': ['c',424],
|
|
773
|
+
')': 426,
|
|
768
774
|
},
|
|
769
|
-
/*
|
|
775
|
+
/* 426 */ ['m',0,')'],
|
|
770
776
|
'typeNamedArg',
|
|
771
|
-
/*
|
|
772
|
-
/*
|
|
773
|
-
/*
|
|
777
|
+
/* 428 */ ['mi',429],
|
|
778
|
+
/* 429 */ ['m',430,':'],
|
|
779
|
+
/* 430 */ {
|
|
774
780
|
Number: ['c',0],
|
|
775
781
|
floating: ['ck',0], variable: 'floating',
|
|
776
782
|
},
|
|
777
783
|
'cardinality',
|
|
778
|
-
/*
|
|
779
|
-
/*
|
|
780
|
-
'*': ['c',
|
|
781
|
-
Number: ['c',
|
|
782
|
-
'':
|
|
784
|
+
/* 432 */ ['m',433,'['],
|
|
785
|
+
/* 433 */ {
|
|
786
|
+
'*': ['c',434],
|
|
787
|
+
Number: ['c',436],
|
|
788
|
+
'': 438
|
|
783
789
|
},
|
|
784
|
-
/*
|
|
785
|
-
/*
|
|
786
|
-
/*
|
|
787
|
-
',': ['c',
|
|
788
|
-
'..': [
|
|
789
|
-
'':
|
|
790
|
+
/* 434 */ { ',': ['c',435], '': 438 },
|
|
791
|
+
/* 435 */ [438,440],
|
|
792
|
+
/* 436 */ {
|
|
793
|
+
',': ['c',437],
|
|
794
|
+
'..': [438,441],
|
|
795
|
+
'': 438
|
|
790
796
|
},
|
|
791
|
-
/*
|
|
792
|
-
/*
|
|
797
|
+
/* 437 */ [438,440],
|
|
798
|
+
/* 438 */ ['m',0,']'],
|
|
793
799
|
'targetCardinality',
|
|
794
|
-
/*
|
|
800
|
+
/* 440 */ {
|
|
795
801
|
'*': ['c',0],
|
|
796
|
-
Number: ['c',
|
|
802
|
+
Number: ['c',441],
|
|
797
803
|
},
|
|
798
|
-
/*
|
|
799
|
-
/*
|
|
804
|
+
/* 441 */ { '..': ['c',442], '': 0 },
|
|
805
|
+
/* 442 */ {
|
|
800
806
|
'*': ['c',0],
|
|
801
807
|
Number: ['c',0],
|
|
802
808
|
},
|
|
803
809
|
'nullabilityAndDefault',
|
|
804
|
-
/*
|
|
805
|
-
not: [
|
|
806
|
-
default: ['ck',
|
|
810
|
+
/* 444 */ {
|
|
811
|
+
not: [445,450], null: 'not',
|
|
812
|
+
default: ['ck',447],
|
|
807
813
|
},
|
|
808
|
-
/*
|
|
809
|
-
/*
|
|
810
|
-
/*
|
|
811
|
-
/*
|
|
814
|
+
/* 445 */ { default: ['ck',446], '': 0 },
|
|
815
|
+
/* 446 */ [0,653],
|
|
816
|
+
/* 447 */ [448,653],
|
|
817
|
+
/* 448 */ { not: [0,450], null: 'not', '': 0 },
|
|
812
818
|
'nullability',
|
|
813
|
-
/*
|
|
819
|
+
/* 450 */ {
|
|
814
820
|
null: ['ck',0],
|
|
815
|
-
not: ['ck',
|
|
821
|
+
not: ['ck',451],
|
|
816
822
|
},
|
|
817
|
-
/*
|
|
823
|
+
/* 451 */ ['mk',0,'null'],
|
|
818
824
|
'queryEOF',
|
|
819
|
-
/*
|
|
820
|
-
/*
|
|
821
|
-
/*
|
|
825
|
+
/* 453 */ [454,463],
|
|
826
|
+
/* 454 */ { ';': ['c',455], '': 455 },
|
|
827
|
+
/* 455 */ ['m',0,'EOF'],
|
|
822
828
|
'projectionSpec',
|
|
823
|
-
/*
|
|
824
|
-
/*
|
|
825
|
-
/*
|
|
826
|
-
/*
|
|
827
|
-
/*
|
|
829
|
+
/* 457 */ ['mk',458,'projection'],
|
|
830
|
+
/* 458 */ ['mk',459,'on'],
|
|
831
|
+
/* 459 */ [460,523],
|
|
832
|
+
/* 460 */ { '{': [461,569], '': 461 },
|
|
833
|
+
/* 461 */ { excluding: [0,562], '': 0 },
|
|
828
834
|
'queryExpression',
|
|
829
|
-
/*
|
|
830
|
-
'(': ['c',
|
|
831
|
-
Id: [
|
|
835
|
+
/* 463 */ {
|
|
836
|
+
'(': ['c',464],
|
|
837
|
+
Id: [466,473],
|
|
832
838
|
},
|
|
833
|
-
/*
|
|
834
|
-
/*
|
|
835
|
-
/*
|
|
836
|
-
intersect: ['ck',
|
|
837
|
-
minus: ['ck',
|
|
838
|
-
union: ['ck',
|
|
839
|
-
'':
|
|
839
|
+
/* 464 */ [465,463],
|
|
840
|
+
/* 465 */ ['m',466,')'],
|
|
841
|
+
/* 466 */ {
|
|
842
|
+
intersect: ['ck',467],
|
|
843
|
+
minus: ['ck',467], except: 'minus',
|
|
844
|
+
union: ['ck',468],
|
|
845
|
+
'': 470
|
|
840
846
|
},
|
|
841
|
-
/*
|
|
842
|
-
/*
|
|
843
|
-
/*
|
|
844
|
-
/*
|
|
845
|
-
/*
|
|
847
|
+
/* 467 */ { distinct: ['ck',469], '': 469 },
|
|
848
|
+
/* 468 */ { all: ['ck',469], distinct: 'all', '': 469 },
|
|
849
|
+
/* 469 */ [466,463],
|
|
850
|
+
/* 470 */ { limit: ['g',471], order: 'limit', '': 0 },
|
|
851
|
+
/* 471 */ [0,625],
|
|
846
852
|
'selectQuery',
|
|
847
|
-
/*
|
|
848
|
-
/*
|
|
849
|
-
from: ['ck',
|
|
850
|
-
all: ['ck',
|
|
851
|
-
Id:
|
|
852
|
-
},
|
|
853
|
-
/* 473 */ [474,490],
|
|
854
|
-
/* 474 */ { mixin: ['ck',475], '': 480 },
|
|
855
|
-
/* 475 */ ['m',476,'{'],
|
|
856
|
-
/* 476 */ { Id: [477,206], '': 478 },
|
|
857
|
-
/* 477 */ {
|
|
858
|
-
';': ['c',476],
|
|
859
|
-
'}': 478,
|
|
853
|
+
/* 473 */ ['mk',474,'select'],
|
|
854
|
+
/* 474 */ {
|
|
855
|
+
from: ['ck',475],
|
|
856
|
+
all: ['ck',485,1], distinct: 'all',
|
|
857
|
+
Id: 485, '#': 485, '(': 485, '*': 485, '+': 485, '-': 485, ':': 485, '?': 485, '@': 485, '{': 485, key: 485, not: 485, case: 485, cast: 485, null: 485, true: 485, false: 485, Number: 485, String: 485, exists: 485, QuotedLiteral: 485,
|
|
860
858
|
},
|
|
861
|
-
/*
|
|
862
|
-
/*
|
|
863
|
-
/*
|
|
864
|
-
/*
|
|
865
|
-
/*
|
|
866
|
-
|
|
867
|
-
'
|
|
868
|
-
Id: [484,576], '#': 'Id', '(': 'Id', '+': 'Id', '-': 'Id', ':': 'Id', '?': 'Id', '@': 'Id', '{': 'Id', Number: 'Id', String: 'Id', QuotedLiteral: 'Id',
|
|
859
|
+
/* 475 */ [476,492],
|
|
860
|
+
/* 476 */ { mixin: ['ck',477], '': 482 },
|
|
861
|
+
/* 477 */ ['m',478,'{'],
|
|
862
|
+
/* 478 */ { Id: [479,206], '': 480 },
|
|
863
|
+
/* 479 */ {
|
|
864
|
+
';': ['c',478],
|
|
865
|
+
'}': 480,
|
|
869
866
|
},
|
|
870
|
-
/*
|
|
867
|
+
/* 480 */ ['m',481,'}'],
|
|
868
|
+
/* 481 */ ['mk',482,'into'],
|
|
869
|
+
/* 482 */ { all: ['ck',483], distinct: 'all', '': 483 },
|
|
870
|
+
/* 483 */ { '{': [484,569], '': 484 },
|
|
871
|
+
/* 484 */ { excluding: [490,562], '': 490 },
|
|
871
872
|
/* 485 */ {
|
|
872
|
-
'*': ['c',
|
|
873
|
-
Id: [
|
|
873
|
+
'*': ['c',486],
|
|
874
|
+
Id: [486,579], '#': 'Id', '(': 'Id', '+': 'Id', '-': 'Id', ':': 'Id', '?': 'Id', '@': 'Id', '{': 'Id', Number: 'Id', String: 'Id', QuotedLiteral: 'Id',
|
|
875
|
+
},
|
|
876
|
+
/* 486 */ { ',': ['c',487], '': 488 },
|
|
877
|
+
/* 487 */ {
|
|
878
|
+
'*': ['c',486],
|
|
879
|
+
Id: [486,579], '#': 'Id', '(': 'Id', '+': 'Id', '-': 'Id', ':': 'Id', '?': 'Id', '@': 'Id', '{': 'Id', Number: 'Id', String: 'Id', QuotedLiteral: 'Id',
|
|
874
880
|
},
|
|
875
|
-
/*
|
|
876
|
-
/*
|
|
877
|
-
/*
|
|
881
|
+
/* 488 */ ['mk',489,'from'],
|
|
882
|
+
/* 489 */ [490,492],
|
|
883
|
+
/* 490 */ { group: [0,613], where: 'group', having: 'group', '': 0 },
|
|
878
884
|
'querySource',
|
|
879
|
-
/*
|
|
880
|
-
/*
|
|
881
|
-
/*
|
|
882
|
-
/*
|
|
885
|
+
/* 492 */ [493,497],
|
|
886
|
+
/* 493 */ { ',': 494, '': 0 },
|
|
887
|
+
/* 494 */ { ',': ['c',495], '': 0 },
|
|
888
|
+
/* 495 */ [494,497],
|
|
883
889
|
'tableExpression',
|
|
884
|
-
/* 495 */ {
|
|
885
|
-
'(': [496,507],
|
|
886
|
-
Id: [497,520],
|
|
887
|
-
},
|
|
888
|
-
/* 496 */ ['g',497],
|
|
889
890
|
/* 497 */ {
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
full: ['ck',500], left: 'full', right: 'full',
|
|
893
|
-
join: 502,
|
|
894
|
-
'': 0
|
|
891
|
+
'(': [498,510],
|
|
892
|
+
Id: [499,523],
|
|
895
893
|
},
|
|
896
|
-
/* 498 */ ['
|
|
894
|
+
/* 498 */ ['g',499],
|
|
897
895
|
/* 499 */ {
|
|
898
|
-
|
|
899
|
-
|
|
896
|
+
cross: ['ck',500],
|
|
897
|
+
inner: ['ck',503],
|
|
898
|
+
full: ['ck',502], left: 'full', right: 'full',
|
|
899
|
+
join: ['ck',505],
|
|
900
|
+
'': 0
|
|
900
901
|
},
|
|
901
|
-
/* 500 */
|
|
902
|
-
/* 501 */ {
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
/*
|
|
902
|
+
/* 500 */ ['mk',501,'join'],
|
|
903
|
+
/* 501 */ {
|
|
904
|
+
'(': [499,510],
|
|
905
|
+
Id: [499,523],
|
|
906
|
+
},
|
|
907
|
+
/* 502 */ { outer: ['ck',503], '': 503 },
|
|
908
|
+
/* 503 */ { one: [504,517], many: 'one', exact: 'one', '': 504 },
|
|
909
|
+
/* 504 */ ['mk',505,'join'],
|
|
910
|
+
/* 505 */ ['g',506],
|
|
911
|
+
/* 506 */ [507,497],
|
|
912
|
+
/* 507 */ ['mk',508,'on'],
|
|
913
|
+
/* 508 */ [499,645],
|
|
907
914
|
'tableOrQueryParens',
|
|
908
|
-
/*
|
|
909
|
-
/*
|
|
910
|
-
'(': [
|
|
911
|
-
Id: [
|
|
912
|
-
select: [
|
|
915
|
+
/* 510 */ ['m',511,'('],
|
|
916
|
+
/* 511 */ {
|
|
917
|
+
'(': [512,510],
|
|
918
|
+
Id: [513,497],
|
|
919
|
+
select: [513,463],
|
|
913
920
|
},
|
|
914
|
-
/*
|
|
915
|
-
full: [
|
|
916
|
-
limit: [
|
|
917
|
-
'':
|
|
921
|
+
/* 512 */ {
|
|
922
|
+
full: [513,498], join: 'full', left: 'full', cross: 'full', inner: 'full', right: 'full',
|
|
923
|
+
limit: [513,466], minus: 'limit', order: 'limit', union: 'limit', except: 'limit', intersect: 'limit',
|
|
924
|
+
'': 513
|
|
918
925
|
},
|
|
919
|
-
/*
|
|
920
|
-
/*
|
|
921
|
-
as: ['ck',
|
|
926
|
+
/* 513 */ ['m',514,')'],
|
|
927
|
+
/* 514 */ {
|
|
928
|
+
as: ['ck',515],
|
|
922
929
|
Id: ['ci',0],
|
|
923
930
|
'': 0
|
|
924
931
|
},
|
|
925
|
-
/*
|
|
932
|
+
/* 515 */ ['mi',0],
|
|
926
933
|
'joinCardinality',
|
|
927
|
-
/* 514 */ {
|
|
928
|
-
exact: ['ck',515],
|
|
929
|
-
one: 515,
|
|
930
|
-
many: ['ck',516],
|
|
931
|
-
},
|
|
932
|
-
/* 515 */ ['mk',516,'one'],
|
|
933
|
-
/* 516 */ ['mk',517,'to'],
|
|
934
934
|
/* 517 */ {
|
|
935
935
|
exact: ['ck',518],
|
|
936
936
|
one: 518,
|
|
937
|
+
many: ['ck',519],
|
|
938
|
+
},
|
|
939
|
+
/* 518 */ ['mk',519,'one'],
|
|
940
|
+
/* 519 */ ['mk',520,'to'],
|
|
941
|
+
/* 520 */ {
|
|
942
|
+
exact: ['ck',521],
|
|
943
|
+
one: 521,
|
|
937
944
|
many: ['ck',0],
|
|
938
945
|
},
|
|
939
|
-
/*
|
|
946
|
+
/* 521 */ ['mk',0,'one'],
|
|
940
947
|
'fromRefWithOptAlias',
|
|
941
|
-
/*
|
|
942
|
-
/*
|
|
943
|
-
/*
|
|
944
|
-
/*
|
|
945
|
-
as: ['ck',
|
|
948
|
+
/* 523 */ [524,530],
|
|
949
|
+
/* 524 */ { ':': ['c',525], '': 526 },
|
|
950
|
+
/* 525 */ [526,530],
|
|
951
|
+
/* 526 */ {
|
|
952
|
+
as: ['ck',527],
|
|
946
953
|
Id: ['ci',0],
|
|
947
|
-
'':
|
|
954
|
+
'': 528
|
|
948
955
|
},
|
|
949
|
-
/*
|
|
950
|
-
/*
|
|
956
|
+
/* 527 */ ['mi',0],
|
|
957
|
+
/* 528 */ ['g',0,[]],
|
|
951
958
|
'fromPath',
|
|
952
|
-
/*
|
|
953
|
-
/*
|
|
954
|
-
/*
|
|
955
|
-
/*
|
|
956
|
-
/*
|
|
959
|
+
/* 530 */ ['mi',531],
|
|
960
|
+
/* 531 */ { '(': [532,536], '[': '(', '': 532 },
|
|
961
|
+
/* 532 */ { '.': ['c',533], '': 0 },
|
|
962
|
+
/* 533 */ ['miA',534],
|
|
963
|
+
/* 534 */ { '(': [532,536], '[': '(', '': 532 },
|
|
957
964
|
'fromArgumentsAndFilter',
|
|
958
|
-
/*
|
|
959
|
-
/*
|
|
960
|
-
/*
|
|
961
|
-
/*
|
|
962
|
-
',': ['c',
|
|
963
|
-
')':
|
|
965
|
+
/* 536 */ { '(': ['c',537], '': 541 },
|
|
966
|
+
/* 537 */ { Id: 538 },
|
|
967
|
+
/* 538 */ { Id: [539,543], '': 540 },
|
|
968
|
+
/* 539 */ {
|
|
969
|
+
',': ['c',538],
|
|
970
|
+
')': 540,
|
|
964
971
|
},
|
|
965
|
-
/*
|
|
966
|
-
/*
|
|
972
|
+
/* 540 */ ['m',541,')'],
|
|
973
|
+
/* 541 */ { '[': [0,547], '': 0 },
|
|
967
974
|
'fromNamedArgument',
|
|
968
|
-
/*
|
|
969
|
-
/*
|
|
970
|
-
/*
|
|
975
|
+
/* 543 */ ['mi',544],
|
|
976
|
+
/* 544 */ ['m',545,':'],
|
|
977
|
+
/* 545 */ [0,653],
|
|
971
978
|
'cardinalityAndFilter',
|
|
972
|
-
/*
|
|
973
|
-
/*
|
|
974
|
-
/*
|
|
975
|
-
/*
|
|
976
|
-
/*
|
|
979
|
+
/* 547 */ ['m',548,'['],
|
|
980
|
+
/* 548 */ { Number: ['c',549], '': 550 },
|
|
981
|
+
/* 549 */ ['m',550,':'],
|
|
982
|
+
/* 550 */ [551,553],
|
|
983
|
+
/* 551 */ ['m',0,']'],
|
|
977
984
|
'filterClauses',
|
|
978
|
-
/*
|
|
979
|
-
where: ['ck',
|
|
980
|
-
Id:
|
|
981
|
-
group: ['g',
|
|
982
|
-
'':
|
|
985
|
+
/* 553 */ {
|
|
986
|
+
where: ['ck',554],
|
|
987
|
+
Id: 554, '#': 554, '(': 554, '+': 554, '-': 554, ':': 554, '?': 554, not: 554, case: 554, cast: 554, null: 554, true: 554, false: 554, Number: 554, String: 554, exists: 554, QuotedLiteral: 554,
|
|
988
|
+
group: ['g',555,1], limit: 'group', order: 'group', having: 'group',
|
|
989
|
+
'': 555
|
|
983
990
|
},
|
|
984
|
-
/*
|
|
985
|
-
/*
|
|
986
|
-
/*
|
|
987
|
-
/*
|
|
988
|
-
/*
|
|
989
|
-
/*
|
|
990
|
-
/*
|
|
991
|
+
/* 554 */ [555,645],
|
|
992
|
+
/* 555 */ { group: 556, '': 557 },
|
|
993
|
+
/* 556 */ [557,619],
|
|
994
|
+
/* 557 */ { having: ['ck',558], '': 559 },
|
|
995
|
+
/* 558 */ [559,645],
|
|
996
|
+
/* 559 */ { limit: 560, order: 560, '': 0 },
|
|
997
|
+
/* 560 */ [0,625],
|
|
991
998
|
'excludingClause',
|
|
992
|
-
/*
|
|
993
|
-
/*
|
|
994
|
-
/*
|
|
995
|
-
/*
|
|
996
|
-
/*
|
|
997
|
-
',': ['c',
|
|
998
|
-
'}':
|
|
999
|
+
/* 562 */ ['mk',563,'excluding'],
|
|
1000
|
+
/* 563 */ ['m',564,'{'],
|
|
1001
|
+
/* 564 */ { Id: 565 },
|
|
1002
|
+
/* 565 */ { Id: ['ciA',566], '': 567 },
|
|
1003
|
+
/* 566 */ {
|
|
1004
|
+
',': ['c',565],
|
|
1005
|
+
'}': 567,
|
|
999
1006
|
},
|
|
1000
|
-
/*
|
|
1007
|
+
/* 567 */ ['m',0,'}'],
|
|
1001
1008
|
'selectItemsList',
|
|
1002
|
-
/*
|
|
1003
|
-
/*
|
|
1004
|
-
'*': ['c',
|
|
1005
|
-
Id: [
|
|
1006
|
-
'':
|
|
1009
|
+
/* 569 */ ['m',570,'{'],
|
|
1010
|
+
/* 570 */ {
|
|
1011
|
+
'*': ['c',571],
|
|
1012
|
+
Id: [571,579], '#': 'Id', '(': 'Id', '+': 'Id', '-': 'Id', ':': 'Id', '?': 'Id', '@': 'Id', '{': 'Id', Number: 'Id', String: 'Id', QuotedLiteral: 'Id',
|
|
1013
|
+
'': 572
|
|
1007
1014
|
},
|
|
1008
|
-
/*
|
|
1009
|
-
',': ['c',
|
|
1010
|
-
'}':
|
|
1015
|
+
/* 571 */ {
|
|
1016
|
+
',': ['c',570],
|
|
1017
|
+
'}': 572,
|
|
1011
1018
|
},
|
|
1012
|
-
/*
|
|
1019
|
+
/* 572 */ ['m',0,'}'],
|
|
1013
1020
|
'nestedSelectItemsList',
|
|
1014
|
-
/*
|
|
1015
|
-
/*
|
|
1016
|
-
'*': ['c',
|
|
1017
|
-
Id: [
|
|
1018
|
-
'':
|
|
1021
|
+
/* 574 */ ['m',575,'{'],
|
|
1022
|
+
/* 575 */ {
|
|
1023
|
+
'*': ['c',576],
|
|
1024
|
+
Id: [576,579], '#': 'Id', '(': 'Id', '+': 'Id', '-': 'Id', ':': 'Id', '?': 'Id', '@': 'Id', '{': 'Id', Number: 'Id', String: 'Id', QuotedLiteral: 'Id',
|
|
1025
|
+
'': 577
|
|
1019
1026
|
},
|
|
1020
|
-
/*
|
|
1021
|
-
',': ['c',
|
|
1022
|
-
'}':
|
|
1027
|
+
/* 576 */ {
|
|
1028
|
+
',': ['c',575],
|
|
1029
|
+
'}': 577,
|
|
1023
1030
|
},
|
|
1024
|
-
/*
|
|
1031
|
+
/* 577 */ ['m',0,'}'],
|
|
1025
1032
|
'selectItemDef',
|
|
1026
|
-
/*
|
|
1027
|
-
/*
|
|
1028
|
-
/*
|
|
1029
|
-
/* 579 */ {
|
|
1030
|
-
Id: [580,650], '#': 'Id', '(': 'Id', '+': 'Id', '-': 'Id', ':': 'Id', '?': 'Id', Number: 'Id', String: 'Id', QuotedLiteral: 'Id',
|
|
1031
|
-
'{': [587,571],
|
|
1032
|
-
},
|
|
1033
|
-
/* 580 */ {
|
|
1034
|
-
as: ['ck',581],
|
|
1035
|
-
Id: ['ci',582],
|
|
1036
|
-
'': 582
|
|
1037
|
-
},
|
|
1038
|
-
/* 581 */ ['mi',582],
|
|
1033
|
+
/* 579 */ { '@': [579,783], '': 580 },
|
|
1034
|
+
/* 580 */ { virtual: ['ck',581,1], '': 581 },
|
|
1035
|
+
/* 581 */ { key: ['ck',582], '': 582 },
|
|
1039
1036
|
/* 582 */ {
|
|
1040
|
-
'
|
|
1041
|
-
'
|
|
1042
|
-
|
|
1037
|
+
Id: [583,653], '#': 'Id', '(': 'Id', '+': 'Id', '-': 'Id', ':': 'Id', '?': 'Id', Number: 'Id', String: 'Id', QuotedLiteral: 'Id',
|
|
1038
|
+
'{': [590,574],
|
|
1039
|
+
},
|
|
1040
|
+
/* 583 */ {
|
|
1041
|
+
as: ['ck',584],
|
|
1042
|
+
Id: ['ci',585],
|
|
1043
|
+
'': 585
|
|
1043
1044
|
},
|
|
1044
|
-
/*
|
|
1045
|
-
/* 584 */ { excluding: [590,559], '': 590 },
|
|
1045
|
+
/* 584 */ ['mi',585],
|
|
1046
1046
|
/* 585 */ {
|
|
1047
|
-
'{':
|
|
1048
|
-
'
|
|
1047
|
+
'{': 586,
|
|
1048
|
+
'.': ['c',588],
|
|
1049
|
+
'': 593
|
|
1049
1050
|
},
|
|
1050
|
-
/* 586 */
|
|
1051
|
-
/* 587 */ { excluding: [
|
|
1052
|
-
/* 588 */
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
/* 591 */ { '@': [591,783], '': 592 },
|
|
1056
|
-
/* 592 */ { ':': ['c',593], '': 0 },
|
|
1057
|
-
/* 593 */ {
|
|
1058
|
-
type: [607,401,1],
|
|
1059
|
-
localized: ['ck',594,1],
|
|
1060
|
-
Id: 594,
|
|
1061
|
-
redirected: ['ck',595,1],
|
|
1062
|
-
association: ['ck',599,1],
|
|
1063
|
-
composition: ['ck',601,1],
|
|
1051
|
+
/* 586 */ [587,574],
|
|
1052
|
+
/* 587 */ { excluding: [593,562], '': 593 },
|
|
1053
|
+
/* 588 */ {
|
|
1054
|
+
'{': [589,574],
|
|
1055
|
+
'*': ['c',593],
|
|
1064
1056
|
},
|
|
1065
|
-
/*
|
|
1066
|
-
/*
|
|
1067
|
-
/*
|
|
1068
|
-
/*
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1057
|
+
/* 589 */ { excluding: [593,562], '': 593 },
|
|
1058
|
+
/* 590 */ { excluding: [591,562], '': 591 },
|
|
1059
|
+
/* 591 */ ['mk',592,'as'],
|
|
1060
|
+
/* 592 */ ['mi',593],
|
|
1061
|
+
/* 593 */ ['g',594],
|
|
1062
|
+
/* 594 */ { '@': [594,786], '': 595 },
|
|
1063
|
+
/* 595 */ { ':': ['c',596], '': 0 },
|
|
1064
|
+
/* 596 */ {
|
|
1065
|
+
type: [610,402,1],
|
|
1066
|
+
localized: ['ck',597,1],
|
|
1067
|
+
Id: 597,
|
|
1068
|
+
redirected: ['ck',598,1],
|
|
1069
|
+
association: ['ck',602,1],
|
|
1070
|
+
composition: ['ck',604,1],
|
|
1072
1071
|
},
|
|
1073
|
-
/*
|
|
1074
|
-
/*
|
|
1075
|
-
/*
|
|
1076
|
-
/*
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
/*
|
|
1082
|
-
/*
|
|
1083
|
-
/*
|
|
1072
|
+
/* 597 */ [610,410],
|
|
1073
|
+
/* 598 */ ['mk',599,'to'],
|
|
1074
|
+
/* 599 */ [600,40],
|
|
1075
|
+
/* 600 */ {
|
|
1076
|
+
on: ['ck',601],
|
|
1077
|
+
'{': [610,196],
|
|
1078
|
+
'': 610
|
|
1079
|
+
},
|
|
1080
|
+
/* 601 */ [610,645],
|
|
1081
|
+
/* 602 */ { '[': [603,432], '': 603 },
|
|
1082
|
+
/* 603 */ ['mk',606,'to'],
|
|
1083
|
+
/* 604 */ { '[': [605,432], '': 605 },
|
|
1084
|
+
/* 605 */ ['mk',606,'of'],
|
|
1085
|
+
/* 606 */ { one: ['ck',607,1], many: 'one', '': 607 },
|
|
1086
|
+
/* 607 */ [608,40],
|
|
1087
|
+
/* 608 */ ['mk',609,'on'],
|
|
1088
|
+
/* 609 */ [610,645],
|
|
1089
|
+
/* 610 */ ['g',611],
|
|
1090
|
+
/* 611 */ { '@': [611,780], '': 0 },
|
|
1084
1091
|
'whereGroupByHaving',
|
|
1085
|
-
/*
|
|
1086
|
-
/*
|
|
1087
|
-
/*
|
|
1088
|
-
/*
|
|
1089
|
-
/*
|
|
1092
|
+
/* 613 */ { where: ['ck',614], '': 615 },
|
|
1093
|
+
/* 614 */ [615,645],
|
|
1094
|
+
/* 615 */ { group: [616,619], '': 616 },
|
|
1095
|
+
/* 616 */ { having: ['ck',617], '': 0 },
|
|
1096
|
+
/* 617 */ [0,645],
|
|
1090
1097
|
'groupByClause',
|
|
1091
|
-
/*
|
|
1092
|
-
/*
|
|
1093
|
-
/*
|
|
1094
|
-
/*
|
|
1095
|
-
/*
|
|
1098
|
+
/* 619 */ ['mk',620,'group'],
|
|
1099
|
+
/* 620 */ ['mk',621,'by'],
|
|
1100
|
+
/* 621 */ [622,653],
|
|
1101
|
+
/* 622 */ { ',': ['c',623], '': 0 },
|
|
1102
|
+
/* 623 */ [622,653],
|
|
1096
1103
|
'orderByLimitOffset',
|
|
1097
|
-
/*
|
|
1098
|
-
/*
|
|
1099
|
-
/*
|
|
1100
|
-
/*
|
|
1101
|
-
/*
|
|
1104
|
+
/* 625 */ { order: [626,631], '': 626 },
|
|
1105
|
+
/* 626 */ { limit: ['ck',627], '': 0 },
|
|
1106
|
+
/* 627 */ [628,653],
|
|
1107
|
+
/* 628 */ { offset: ['ck',629], '': 0 },
|
|
1108
|
+
/* 629 */ [0,653],
|
|
1102
1109
|
'orderByClause',
|
|
1103
|
-
/*
|
|
1104
|
-
/*
|
|
1105
|
-
/*
|
|
1106
|
-
/*
|
|
1107
|
-
/*
|
|
1110
|
+
/* 631 */ ['mk',632,'order'],
|
|
1111
|
+
/* 632 */ ['mk',633,'by'],
|
|
1112
|
+
/* 633 */ [634,637],
|
|
1113
|
+
/* 634 */ { ',': ['c',635], '': 0 },
|
|
1114
|
+
/* 635 */ [634,637],
|
|
1108
1115
|
'orderByExpression',
|
|
1109
|
-
/*
|
|
1110
|
-
/*
|
|
1111
|
-
/*
|
|
1112
|
-
/*
|
|
1116
|
+
/* 637 */ [638,653],
|
|
1117
|
+
/* 638 */ { asc: ['ck',639], desc: 'asc', '': 639 },
|
|
1118
|
+
/* 639 */ { nulls: ['ck',640], '': 0 },
|
|
1119
|
+
/* 640 */ { last: ['ck',0], first: 'last' },
|
|
1113
1120
|
'conditionEOF',
|
|
1114
|
-
/*
|
|
1115
|
-
/*
|
|
1121
|
+
/* 642 */ [643,653],
|
|
1122
|
+
/* 643 */ ['m',0,'EOF'],
|
|
1116
1123
|
'condition',
|
|
1117
|
-
/*
|
|
1124
|
+
/* 645 */ [0,653],
|
|
1118
1125
|
'valuePath',
|
|
1119
|
-
/*
|
|
1120
|
-
/*
|
|
1121
|
-
/*
|
|
1122
|
-
/*
|
|
1123
|
-
/*
|
|
1126
|
+
/* 647 */ ['mi',648],
|
|
1127
|
+
/* 648 */ { '(': [649,714], '[': '(', '': 649 },
|
|
1128
|
+
/* 649 */ { '.': ['c',650], '': 0 },
|
|
1129
|
+
/* 650 */ ['miA',651],
|
|
1130
|
+
/* 651 */ { '(': [649,714], '[': '(', '': 649 },
|
|
1124
1131
|
'expression',
|
|
1125
|
-
/*
|
|
1126
|
-
'(': [
|
|
1127
|
-
'#': [
|
|
1128
|
-
':': ['c',
|
|
1129
|
-
'?': ['c',
|
|
1130
|
-
Id: [
|
|
1131
|
-
new: [
|
|
1132
|
-
exists: ['ck',
|
|
1133
|
-
case: [
|
|
1134
|
-
cast: [
|
|
1135
|
-
'+': ['c',
|
|
1136
|
-
not: ['ck',
|
|
1132
|
+
/* 653 */ {
|
|
1133
|
+
'(': [654,681],
|
|
1134
|
+
'#': [664,777], null: '#', true: '#', false: '#', Number: '#', String: '#', QuotedLiteral: '#',
|
|
1135
|
+
':': ['c',655],
|
|
1136
|
+
'?': ['c',664],
|
|
1137
|
+
Id: [657,647],
|
|
1138
|
+
new: [664,693,1],
|
|
1139
|
+
exists: ['ck',660],
|
|
1140
|
+
case: [664,696],
|
|
1141
|
+
cast: [664,707],
|
|
1142
|
+
'+': ['c',663], '-': '+',
|
|
1143
|
+
not: ['ck',663],
|
|
1137
1144
|
},
|
|
1138
|
-
/*
|
|
1139
|
-
/*
|
|
1140
|
-
Id: ['ciA',
|
|
1141
|
-
Number: ['c',
|
|
1145
|
+
/* 654 */ ['g',664],
|
|
1146
|
+
/* 655 */ {
|
|
1147
|
+
Id: ['ciA',656],
|
|
1148
|
+
Number: ['c',664],
|
|
1142
1149
|
},
|
|
1143
|
-
/*
|
|
1144
|
-
/*
|
|
1145
|
-
/*
|
|
1146
|
-
/*
|
|
1147
|
-
/*
|
|
1148
|
-
'(': ['c',
|
|
1149
|
-
Id: [
|
|
1150
|
-
'?': ['c',
|
|
1150
|
+
/* 656 */ { '.': [664,649], '': 664 },
|
|
1151
|
+
/* 657 */ { over: ['ck',658], '': 659 },
|
|
1152
|
+
/* 658 */ [659,741],
|
|
1153
|
+
/* 659 */ ['g',664],
|
|
1154
|
+
/* 660 */ {
|
|
1155
|
+
'(': ['c',661],
|
|
1156
|
+
Id: [664,647],
|
|
1157
|
+
'?': ['c',664],
|
|
1151
1158
|
},
|
|
1152
|
-
/*
|
|
1153
|
-
/*
|
|
1154
|
-
/*
|
|
1155
|
-
/*
|
|
1156
|
-
'*': ['c',
|
|
1157
|
-
'+': ['c',
|
|
1158
|
-
'||': ['c',
|
|
1159
|
-
and: ['ck',
|
|
1160
|
-
or: ['ck',
|
|
1161
|
-
'?': ['c',
|
|
1162
|
-
'<': ['c',
|
|
1163
|
-
is: ['ck',
|
|
1164
|
-
not: ['ck',
|
|
1165
|
-
in: ['g',
|
|
1159
|
+
/* 661 */ [662,463],
|
|
1160
|
+
/* 662 */ ['m',664,')'],
|
|
1161
|
+
/* 663 */ [664,653],
|
|
1162
|
+
/* 664 */ {
|
|
1163
|
+
'*': ['c',668], '/': '*',
|
|
1164
|
+
'+': ['c',668], '-': '+',
|
|
1165
|
+
'||': ['c',668],
|
|
1166
|
+
and: ['ck',668],
|
|
1167
|
+
or: ['ck',668],
|
|
1168
|
+
'?': ['c',665],
|
|
1169
|
+
'<': ['c',667], '=': '<', '>': '<', '!=': '<', '<=': '<', '<>': '<', '>=': '<',
|
|
1170
|
+
is: ['ck',669],
|
|
1171
|
+
not: ['ck',671],
|
|
1172
|
+
in: ['g',671], like: 'in', between: 'in',
|
|
1166
1173
|
'': 0
|
|
1167
1174
|
},
|
|
1168
|
-
/*
|
|
1169
|
-
/*
|
|
1170
|
-
/*
|
|
1171
|
-
/*
|
|
1172
|
-
/*
|
|
1173
|
-
/*
|
|
1174
|
-
/*
|
|
1175
|
-
between: ['ck',
|
|
1176
|
-
in: ['ck',
|
|
1177
|
-
like: ['ck',
|
|
1175
|
+
/* 665 */ [666,653],
|
|
1176
|
+
/* 666 */ ['m',668,':'],
|
|
1177
|
+
/* 667 */ { all: ['ck',668], any: 'all', some: 'all', '': 668 },
|
|
1178
|
+
/* 668 */ [679,653],
|
|
1179
|
+
/* 669 */ { not: ['ck',670], '': 670 },
|
|
1180
|
+
/* 670 */ ['mk',679,'null'],
|
|
1181
|
+
/* 671 */ {
|
|
1182
|
+
between: ['ck',672],
|
|
1183
|
+
in: ['ck',675],
|
|
1184
|
+
like: ['ck',676],
|
|
1178
1185
|
},
|
|
1179
|
-
/*
|
|
1180
|
-
/*
|
|
1181
|
-
/*
|
|
1182
|
-
/*
|
|
1183
|
-
/*
|
|
1184
|
-
/*
|
|
1185
|
-
/*
|
|
1186
|
-
/*
|
|
1186
|
+
/* 672 */ [673,653],
|
|
1187
|
+
/* 673 */ ['mk',674,'and'],
|
|
1188
|
+
/* 674 */ [679,653],
|
|
1189
|
+
/* 675 */ [679,653],
|
|
1190
|
+
/* 676 */ [677,653],
|
|
1191
|
+
/* 677 */ { escape: ['ck',678], '': 679 },
|
|
1192
|
+
/* 678 */ [679,653],
|
|
1193
|
+
/* 679 */ ['g',664],
|
|
1187
1194
|
'expressionOrQueryParens',
|
|
1188
|
-
/*
|
|
1189
|
-
/*
|
|
1190
|
-
'(': [
|
|
1191
|
-
Id: [
|
|
1192
|
-
select: [
|
|
1195
|
+
/* 681 */ ['m',682,'('],
|
|
1196
|
+
/* 682 */ {
|
|
1197
|
+
'(': [683,681],
|
|
1198
|
+
Id: [685,653], '#': 'Id', '+': 'Id', '-': 'Id', ':': 'Id', '?': 'Id', not: 'Id', case: 'Id', cast: 'Id', null: 'Id', true: 'Id', false: 'Id', Number: 'Id', String: 'Id', exists: 'Id', QuotedLiteral: 'Id',
|
|
1199
|
+
select: [686,463],
|
|
1193
1200
|
},
|
|
1194
|
-
/*
|
|
1195
|
-
'*': [
|
|
1196
|
-
',': [
|
|
1197
|
-
limit: [
|
|
1198
|
-
'':
|
|
1201
|
+
/* 683 */ {
|
|
1202
|
+
'*': [684,654], '+': '*', '-': '*', '/': '*', '<': '*', '=': '*', '>': '*', '?': '*', '!=': '*', '<=': '*', '<>': '*', '>=': '*', in: '*', is: '*', or: '*', '||': '*', and: '*', not: '*', like: '*', between: '*',
|
|
1203
|
+
',': [686,688],
|
|
1204
|
+
limit: [686,466], minus: 'limit', order: 'limit', union: 'limit', except: 'limit', intersect: 'limit',
|
|
1205
|
+
'': 686
|
|
1199
1206
|
},
|
|
1200
|
-
/*
|
|
1201
|
-
/*
|
|
1202
|
-
/*
|
|
1207
|
+
/* 684 */ { ',': [686,688], '': 686 },
|
|
1208
|
+
/* 685 */ { ',': [686,688], '': 686 },
|
|
1209
|
+
/* 686 */ ['m',0,')'],
|
|
1203
1210
|
'continueExpressionslist',
|
|
1204
|
-
/*
|
|
1205
|
-
/*
|
|
1206
|
-
/*
|
|
1207
|
-
/*
|
|
1211
|
+
/* 688 */ ['m',689,','],
|
|
1212
|
+
/* 689 */ { Id: 690, '#': 690, '(': 690, '+': 690, '-': 690, ':': 690, '?': 690, not: 690, case: 690, cast: 690, null: 690, true: 690, false: 690, Number: 690, String: 690, exists: 690, QuotedLiteral: 690 },
|
|
1213
|
+
/* 690 */ { Id: [691,653], '#': 'Id', '(': 'Id', '+': 'Id', '-': 'Id', ':': 'Id', '?': 'Id', not: 'Id', case: 'Id', cast: 'Id', null: 'Id', true: 'Id', false: 'Id', Number: 'Id', String: 'Id', exists: 'Id', QuotedLiteral: 'Id', '': 0 },
|
|
1214
|
+
/* 691 */ { ',': ['c',690], '': 0 },
|
|
1208
1215
|
'newAndValuePath',
|
|
1209
|
-
/*
|
|
1210
|
-
/*
|
|
1216
|
+
/* 693 */ ['mk',694,'new'],
|
|
1217
|
+
/* 694 */ [0,647],
|
|
1211
1218
|
'caseExpression',
|
|
1212
|
-
/*
|
|
1213
|
-
/*
|
|
1214
|
-
Id: [
|
|
1215
|
-
when: ['g',
|
|
1216
|
-
'':
|
|
1219
|
+
/* 696 */ ['mk',697,'case'],
|
|
1220
|
+
/* 697 */ {
|
|
1221
|
+
Id: [698,653], '#': 'Id', '(': 'Id', '+': 'Id', '-': 'Id', ':': 'Id', '?': 'Id', not: 'Id', case: 'Id', cast: 'Id', null: 'Id', true: 'Id', false: 'Id', Number: 'Id', String: 'Id', exists: 'Id', QuotedLiteral: 'Id',
|
|
1222
|
+
when: ['g',698,1],
|
|
1223
|
+
'': 698
|
|
1217
1224
|
},
|
|
1218
|
-
/*
|
|
1219
|
-
/*
|
|
1220
|
-
/*
|
|
1221
|
-
/*
|
|
1222
|
-
/*
|
|
1223
|
-
/*
|
|
1224
|
-
/*
|
|
1225
|
-
/*
|
|
1225
|
+
/* 698 */ { when: 699 },
|
|
1226
|
+
/* 699 */ { when: ['ck',700], '': 703 },
|
|
1227
|
+
/* 700 */ [701,653],
|
|
1228
|
+
/* 701 */ ['mk',702,'then'],
|
|
1229
|
+
/* 702 */ [699,653],
|
|
1230
|
+
/* 703 */ { else: ['ck',704], '': 705 },
|
|
1231
|
+
/* 704 */ [705,653],
|
|
1232
|
+
/* 705 */ ['mk',0,'end'],
|
|
1226
1233
|
'castFunction',
|
|
1227
|
-
/*
|
|
1228
|
-
/*
|
|
1229
|
-
/*
|
|
1230
|
-
/*
|
|
1231
|
-
/*
|
|
1232
|
-
/*
|
|
1234
|
+
/* 707 */ ['mk',708,'cast'],
|
|
1235
|
+
/* 708 */ ['m',709,'('],
|
|
1236
|
+
/* 709 */ [710,653],
|
|
1237
|
+
/* 710 */ ['mk',711,'as'],
|
|
1238
|
+
/* 711 */ [712,410],
|
|
1239
|
+
/* 712 */ ['m',0,')'],
|
|
1233
1240
|
'argumentsAndFilter',
|
|
1234
|
-
/*
|
|
1235
|
-
/*
|
|
1236
|
-
/*
|
|
1237
|
-
/*
|
|
1238
|
-
/*
|
|
1239
|
-
Id: [
|
|
1240
|
-
')': ['g',
|
|
1241
|
-
},
|
|
1242
|
-
/* 716 */ { order: ['ck',717], '': 730 },
|
|
1243
|
-
/* 717 */ ['mk',718,'by'],
|
|
1244
|
-
/* 718 */ [730,753],
|
|
1245
|
-
/* 719 */ {
|
|
1246
|
-
':': ['c',720],
|
|
1247
|
-
'=>': ['c',725],
|
|
1241
|
+
/* 714 */ { '(': ['c',715], '': 734 },
|
|
1242
|
+
/* 715 */ { Id: ['ciA',722], '': 716 },
|
|
1243
|
+
/* 716 */ { Id: [717,736], '#': 'Id', '(': 'Id', '*': 'Id', '+': 'Id', '-': 'Id', ':': 'Id', '?': 'Id', Id_all: 'Id', Number: 'Id', String: 'Id', QuotedLiteral: 'Id', '': 733 },
|
|
1244
|
+
/* 717 */ { ',': ['c',718], '': 719 },
|
|
1245
|
+
/* 718 */ {
|
|
1246
|
+
Id: [717,736], '#': 'Id', '(': 'Id', '*': 'Id', '+': 'Id', '-': 'Id', ':': 'Id', '?': 'Id', not: 'Id', case: 'Id', cast: 'Id', null: 'Id', true: 'Id', false: 'Id', Id_all: 'Id', Number: 'Id', String: 'Id', exists: 'Id', QuotedLiteral: 'Id',
|
|
1247
|
+
')': ['g',719,1], order: ')',
|
|
1248
1248
|
},
|
|
1249
|
-
/*
|
|
1250
|
-
/*
|
|
1249
|
+
/* 719 */ { order: ['ck',720], '': 733 },
|
|
1250
|
+
/* 720 */ ['mk',721,'by'],
|
|
1251
|
+
/* 721 */ [733,756],
|
|
1251
1252
|
/* 722 */ {
|
|
1252
|
-
|
|
1253
|
-
'
|
|
1253
|
+
':': ['c',723],
|
|
1254
|
+
'=>': ['c',728],
|
|
1255
|
+
},
|
|
1256
|
+
/* 723 */ [724,653],
|
|
1257
|
+
/* 724 */ { ',': ['c',725], '': 733 },
|
|
1258
|
+
/* 725 */ {
|
|
1259
|
+
Id: ['ciA',726],
|
|
1260
|
+
')': 733,
|
|
1254
1261
|
},
|
|
1255
|
-
/*
|
|
1256
|
-
/*
|
|
1257
|
-
/*
|
|
1258
|
-
/*
|
|
1259
|
-
/*
|
|
1260
|
-
Id: ['ciA',
|
|
1261
|
-
')':
|
|
1262
|
+
/* 726 */ ['m',727,':'],
|
|
1263
|
+
/* 727 */ [724,653],
|
|
1264
|
+
/* 728 */ [729,653],
|
|
1265
|
+
/* 729 */ { ',': ['c',730], '': 733 },
|
|
1266
|
+
/* 730 */ {
|
|
1267
|
+
Id: ['ciA',731],
|
|
1268
|
+
')': 733,
|
|
1262
1269
|
},
|
|
1263
|
-
/*
|
|
1264
|
-
/*
|
|
1265
|
-
/*
|
|
1266
|
-
/*
|
|
1270
|
+
/* 731 */ ['m',732,'=>'],
|
|
1271
|
+
/* 732 */ [729,653],
|
|
1272
|
+
/* 733 */ ['m',734,')'],
|
|
1273
|
+
/* 734 */ { '[': [0,547], '': 0 },
|
|
1267
1274
|
'funcExpression',
|
|
1268
|
-
/*
|
|
1275
|
+
/* 736 */ {
|
|
1269
1276
|
' lookahead': 'lGenericIntroOrExpr',
|
|
1270
|
-
Id: [
|
|
1271
|
-
GenericExpr: ['ckA',
|
|
1272
|
-
GenericIntro: ['ckA',
|
|
1277
|
+
Id: [738,653], '#': 'Id', '(': 'Id', '+': 'Id', '-': 'Id', ':': 'Id', '?': 'Id', Number: 'Id', String: 'Id', QuotedLiteral: 'Id',
|
|
1278
|
+
GenericExpr: ['ckA',738],
|
|
1279
|
+
GenericIntro: ['ckA',737],
|
|
1273
1280
|
},
|
|
1274
|
-
/*
|
|
1275
|
-
/*
|
|
1281
|
+
/* 737 */ [738,653],
|
|
1282
|
+
/* 738 */ {
|
|
1276
1283
|
' lookahead': 'lGenericSeparator',
|
|
1277
|
-
GenericSeparator: ['ckA',
|
|
1284
|
+
GenericSeparator: ['ckA',739],
|
|
1278
1285
|
'': 0
|
|
1279
1286
|
},
|
|
1280
|
-
/*
|
|
1287
|
+
/* 739 */ {
|
|
1281
1288
|
' lookahead': 'lGenericExpr',
|
|
1282
|
-
Id: [
|
|
1283
|
-
GenericExpr: ['ckA',
|
|
1289
|
+
Id: [738,653], '#': 'Id', '(': 'Id', '+': 'Id', '-': 'Id', ':': 'Id', '?': 'Id', Number: 'Id', String: 'Id', QuotedLiteral: 'Id',
|
|
1290
|
+
GenericExpr: ['ckA',738],
|
|
1284
1291
|
},
|
|
1285
1292
|
'overClause',
|
|
1286
|
-
/*
|
|
1287
|
-
/*
|
|
1288
|
-
/* 740 */ ['mk',741,'by'],
|
|
1289
|
-
/* 741 */ [742,749],
|
|
1290
|
-
/* 742 */ { order: ['ck',743], '': 745 },
|
|
1293
|
+
/* 741 */ ['m',742,'('],
|
|
1294
|
+
/* 742 */ { partition: ['ck',743], '': 745 },
|
|
1291
1295
|
/* 743 */ ['mk',744,'by'],
|
|
1292
|
-
/* 744 */ [745,
|
|
1293
|
-
/* 745 */ {
|
|
1294
|
-
/* 746 */ [747,
|
|
1295
|
-
/* 747 */ [
|
|
1296
|
+
/* 744 */ [745,752],
|
|
1297
|
+
/* 745 */ { order: ['ck',746], '': 748 },
|
|
1298
|
+
/* 746 */ ['mk',747,'by'],
|
|
1299
|
+
/* 747 */ [748,756],
|
|
1300
|
+
/* 748 */ { rows: ['ck',749], '': 750 },
|
|
1301
|
+
/* 749 */ [750,765],
|
|
1302
|
+
/* 750 */ ['m',0,')'],
|
|
1296
1303
|
'expressionsAsXpr',
|
|
1297
|
-
/*
|
|
1298
|
-
/*
|
|
1299
|
-
/*
|
|
1304
|
+
/* 752 */ [753,653],
|
|
1305
|
+
/* 753 */ { ',': ['c',754], '': 0 },
|
|
1306
|
+
/* 754 */ [753,653],
|
|
1300
1307
|
'orderByClauseAsXpr',
|
|
1301
|
-
/*
|
|
1302
|
-
/*
|
|
1303
|
-
/*
|
|
1308
|
+
/* 756 */ [757,760],
|
|
1309
|
+
/* 757 */ { ',': ['c',758], '': 0 },
|
|
1310
|
+
/* 758 */ [757,760],
|
|
1304
1311
|
'orderBySpecAsXpr',
|
|
1305
|
-
/*
|
|
1306
|
-
/*
|
|
1307
|
-
/*
|
|
1308
|
-
/*
|
|
1312
|
+
/* 760 */ [761,653],
|
|
1313
|
+
/* 761 */ { asc: ['ck',762], desc: 'asc', '': 762 },
|
|
1314
|
+
/* 762 */ { nulls: ['ck',763], '': 0 },
|
|
1315
|
+
/* 763 */ { last: ['ck',0], first: 'last' },
|
|
1309
1316
|
'windowFrameClause',
|
|
1310
|
-
/*
|
|
1311
|
-
unbounded: ['ck',
|
|
1312
|
-
Number: ['c',
|
|
1313
|
-
current: ['ck',
|
|
1314
|
-
between: ['ck',
|
|
1317
|
+
/* 765 */ {
|
|
1318
|
+
unbounded: ['ck',766],
|
|
1319
|
+
Number: ['c',766],
|
|
1320
|
+
current: ['ck',767],
|
|
1321
|
+
between: ['ck',768],
|
|
1315
1322
|
},
|
|
1316
|
-
/*
|
|
1317
|
-
/*
|
|
1318
|
-
/*
|
|
1319
|
-
/*
|
|
1320
|
-
/*
|
|
1323
|
+
/* 766 */ ['mk',0,'preceding'],
|
|
1324
|
+
/* 767 */ ['mk',0,'row'],
|
|
1325
|
+
/* 768 */ [769,772],
|
|
1326
|
+
/* 769 */ ['mk',770,'and'],
|
|
1327
|
+
/* 770 */ [0,772],
|
|
1321
1328
|
'windowFrameBoundSpec',
|
|
1322
|
-
/*
|
|
1323
|
-
unbounded: ['ck',
|
|
1324
|
-
Number: ['c',
|
|
1325
|
-
current: ['ck',
|
|
1329
|
+
/* 772 */ {
|
|
1330
|
+
unbounded: ['ck',773],
|
|
1331
|
+
Number: ['c',773],
|
|
1332
|
+
current: ['ck',775],
|
|
1326
1333
|
},
|
|
1327
|
-
/*
|
|
1328
|
-
following: ['ck',
|
|
1329
|
-
preceding: ['ck',
|
|
1334
|
+
/* 773 */ {
|
|
1335
|
+
following: ['ck',774],
|
|
1336
|
+
preceding: ['ck',774],
|
|
1330
1337
|
},
|
|
1331
|
-
/*
|
|
1332
|
-
/*
|
|
1338
|
+
/* 774 */ ['g',0,[]],
|
|
1339
|
+
/* 775 */ ['mk',0,'row'],
|
|
1333
1340
|
'literalValue',
|
|
1334
|
-
/*
|
|
1335
|
-
'#': ['c',
|
|
1341
|
+
/* 777 */ {
|
|
1342
|
+
'#': ['c',778],
|
|
1336
1343
|
null: ['ck',0],
|
|
1337
1344
|
true: ['ck',0], false: 'true',
|
|
1338
1345
|
Number: ['c',0],
|
|
1339
1346
|
String: ['c',0],
|
|
1340
1347
|
QuotedLiteral: ['c',0],
|
|
1341
1348
|
},
|
|
1342
|
-
/*
|
|
1349
|
+
/* 778 */ ['mi',0],
|
|
1343
1350
|
'annoAssignStd',
|
|
1344
|
-
/* 777 */ ['m',778,'@'],
|
|
1345
|
-
/* 778 */ {
|
|
1346
|
-
'(': [0,786],
|
|
1347
|
-
Id: [0,791],
|
|
1348
|
-
},
|
|
1349
|
-
'annoAssignCol',
|
|
1350
1351
|
/* 780 */ ['m',781,'@'],
|
|
1351
1352
|
/* 781 */ {
|
|
1352
|
-
'(': [0,
|
|
1353
|
-
Id: [0,
|
|
1353
|
+
'(': [0,789],
|
|
1354
|
+
Id: [0,794],
|
|
1354
1355
|
},
|
|
1355
|
-
'
|
|
1356
|
+
'annoAssignCol',
|
|
1356
1357
|
/* 783 */ ['m',784,'@'],
|
|
1357
1358
|
/* 784 */ {
|
|
1358
|
-
'(': [0,
|
|
1359
|
-
Id: [0,
|
|
1359
|
+
'(': [0,789],
|
|
1360
|
+
Id: [0,794],
|
|
1361
|
+
},
|
|
1362
|
+
'annoAssignMid',
|
|
1363
|
+
/* 786 */ ['m',787,'@'],
|
|
1364
|
+
/* 787 */ {
|
|
1365
|
+
'(': [0,789],
|
|
1366
|
+
Id: [0,798],
|
|
1360
1367
|
},
|
|
1361
1368
|
'annoAssignParen',
|
|
1362
|
-
/*
|
|
1363
|
-
/*
|
|
1364
|
-
/*
|
|
1365
|
-
',': ['c',
|
|
1366
|
-
')':
|
|
1369
|
+
/* 789 */ ['m',790,'('],
|
|
1370
|
+
/* 790 */ { Id: [791,794], '': 792 },
|
|
1371
|
+
/* 791 */ {
|
|
1372
|
+
',': ['c',790],
|
|
1373
|
+
')': 792,
|
|
1367
1374
|
},
|
|
1368
|
-
/*
|
|
1375
|
+
/* 792 */ ['m',0,')'],
|
|
1369
1376
|
'annoAssignBase',
|
|
1370
|
-
/*
|
|
1371
|
-
/*
|
|
1372
|
-
/*
|
|
1377
|
+
/* 794 */ [795,798],
|
|
1378
|
+
/* 795 */ { ':': ['c',796], '': 0 },
|
|
1379
|
+
/* 796 */ [0,820],
|
|
1373
1380
|
'annoNamePath',
|
|
1374
|
-
/*
|
|
1375
|
-
/*
|
|
1376
|
-
/*
|
|
1377
|
-
Id: ['ciA',
|
|
1378
|
-
'@': ['c',
|
|
1381
|
+
/* 798 */ ['miA',799],
|
|
1382
|
+
/* 799 */ { '.': ['c',800], '': 802 },
|
|
1383
|
+
/* 800 */ {
|
|
1384
|
+
Id: ['ciA',799],
|
|
1385
|
+
'@': ['c',801],
|
|
1379
1386
|
},
|
|
1380
|
-
/*
|
|
1381
|
-
/*
|
|
1387
|
+
/* 801 */ ['miA',799],
|
|
1388
|
+
/* 802 */ { '#': [0,811], '': 0 },
|
|
1382
1389
|
'annoPath',
|
|
1383
|
-
/* 801 */ {
|
|
1384
|
-
Id: ['ciA',803],
|
|
1385
|
-
'@': ['c',802],
|
|
1386
|
-
},
|
|
1387
|
-
/* 802 */ ['miA',803],
|
|
1388
|
-
/* 803 */ { '.': ['c',804], '': 806 },
|
|
1389
1390
|
/* 804 */ {
|
|
1390
|
-
Id: ['ciA',
|
|
1391
|
+
Id: ['ciA',806],
|
|
1391
1392
|
'@': ['c',805],
|
|
1392
1393
|
},
|
|
1393
|
-
/* 805 */ ['miA',
|
|
1394
|
-
/* 806 */ { '
|
|
1394
|
+
/* 805 */ ['miA',806],
|
|
1395
|
+
/* 806 */ { '.': ['c',807], '': 809 },
|
|
1396
|
+
/* 807 */ {
|
|
1397
|
+
Id: ['ciA',806],
|
|
1398
|
+
'@': ['c',808],
|
|
1399
|
+
},
|
|
1400
|
+
/* 808 */ ['miA',806],
|
|
1401
|
+
/* 809 */ { '#': [0,811], '': 0 },
|
|
1395
1402
|
'annoPathVariant',
|
|
1396
|
-
/*
|
|
1397
|
-
/*
|
|
1398
|
-
/*
|
|
1399
|
-
/*
|
|
1403
|
+
/* 811 */ ['m',812,'#'],
|
|
1404
|
+
/* 812 */ ['miA',813],
|
|
1405
|
+
/* 813 */ { '.': ['c',814], '': 0 },
|
|
1406
|
+
/* 814 */ ['miA',813],
|
|
1400
1407
|
'annoStructValue',
|
|
1401
|
-
/*
|
|
1402
|
-
/*
|
|
1403
|
-
/*
|
|
1408
|
+
/* 816 */ [817,804],
|
|
1409
|
+
/* 817 */ { ':': ['c',818], '': 0 },
|
|
1410
|
+
/* 818 */ [0,820],
|
|
1404
1411
|
'annoValue',
|
|
1405
|
-
/* 817 */ {
|
|
1406
|
-
'#': [0,774], null: '#', true: '#', false: '#', Number: '#', String: '#', QuotedLiteral: '#',
|
|
1407
|
-
'+': ['c',818], '-': '+',
|
|
1408
|
-
Id: [0,801], '@': 'Id',
|
|
1409
|
-
'{': ['c',819],
|
|
1410
|
-
'[': ['c',822],
|
|
1411
|
-
'(': ['c',829],
|
|
1412
|
-
},
|
|
1413
|
-
/* 818 */ ['m',0,'Number'],
|
|
1414
|
-
/* 819 */ { Id: [820,813], '@': 'Id', '': 821 },
|
|
1415
1412
|
/* 820 */ {
|
|
1416
|
-
'
|
|
1417
|
-
'
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
'...': ['c',823],
|
|
1423
|
-
'': 828
|
|
1413
|
+
'#': [0,777], null: '#', true: '#', false: '#', Number: '#', String: '#', QuotedLiteral: '#',
|
|
1414
|
+
'+': ['c',821], '-': '+',
|
|
1415
|
+
Id: [0,804], '@': 'Id',
|
|
1416
|
+
'{': ['c',822],
|
|
1417
|
+
'[': ['c',826],
|
|
1418
|
+
'(': ['c',833],
|
|
1424
1419
|
},
|
|
1425
|
-
/*
|
|
1426
|
-
/*
|
|
1427
|
-
/*
|
|
1428
|
-
/* 826 */ ['g',827],
|
|
1429
|
-
/* 827 */ {
|
|
1420
|
+
/* 821 */ ['m',0,'Number'],
|
|
1421
|
+
/* 822 */ { Id: [823,816], '@': 'Id', '': 824 },
|
|
1422
|
+
/* 823 */ {
|
|
1430
1423
|
',': ['c',822],
|
|
1431
|
-
'
|
|
1424
|
+
'}': 824,
|
|
1425
|
+
},
|
|
1426
|
+
/* 824 */ ['g',825],
|
|
1427
|
+
/* 825 */ ['m',0,'}'],
|
|
1428
|
+
/* 826 */ {
|
|
1429
|
+
Id: [831,820], '#': 'Id', '(': 'Id', '+': 'Id', '-': 'Id', '@': 'Id', '[': 'Id', '{': 'Id', Number: 'Id', String: 'Id', QuotedLiteral: 'Id',
|
|
1430
|
+
'...': ['c',827],
|
|
1431
|
+
'': 832
|
|
1432
1432
|
},
|
|
1433
|
-
/*
|
|
1434
|
-
/*
|
|
1435
|
-
/*
|
|
1433
|
+
/* 827 */ { up: ['ck',828], '': 830 },
|
|
1434
|
+
/* 828 */ ['mk',829,'to'],
|
|
1435
|
+
/* 829 */ [830,820],
|
|
1436
|
+
/* 830 */ ['g',831],
|
|
1437
|
+
/* 831 */ {
|
|
1438
|
+
',': ['c',826],
|
|
1439
|
+
']': 832,
|
|
1440
|
+
},
|
|
1441
|
+
/* 832 */ ['m',0,']'],
|
|
1442
|
+
/* 833 */ [834,645],
|
|
1443
|
+
/* 834 */ ['m',0,')'],
|
|
1436
1444
|
];
|
|
1437
1445
|
class CdlParser extends AstBuildingParser {
|
|
1438
1446
|
constructor(lexer,...args) { super(lexer,keywords,table,...args) }
|
|
@@ -1660,7 +1668,7 @@ this.docComment( $.art ); } continue;
|
|
|
1660
1668
|
let name; let _;
|
|
1661
1669
|
for(;;) switch(this.s) {
|
|
1662
1670
|
case 54: this.mk(55,'annotation'); continue;
|
|
1663
|
-
case 55: if(this.namePath(_={category:'AnnoDef'},56)) {name=_.name; this.addDef( $.art, $.outer, 'vocabularies', 'annotation', name );
|
|
1671
|
+
case 55: if(this.namePath(_={category:'AnnoDef'},56)) {name=_.name; this.addDef( $.art, $.outer, ($.outer.kind === 'source' ? 'vocabularies' : 'artifacts'), 'annotation', name );
|
|
1664
1672
|
this.docComment( $.art ); } continue;
|
|
1665
1673
|
case 56: switch(this.l()) {
|
|
1666
1674
|
case '@': this.annoAssignMid({art:$.art},56); continue;
|
|
@@ -2026,8 +2034,9 @@ this.docComment( art ); } continue;
|
|
|
2026
2034
|
returnsSpec($,$next) {
|
|
2027
2035
|
this.rule_(156,$next);
|
|
2028
2036
|
let art=new XsnArtifact();
|
|
2037
|
+
let ret;
|
|
2029
2038
|
for(;;) switch(this.s) {
|
|
2030
|
-
case 156: if(this.mk(157,'returns')) {this.elementRestriction(); art.kind = 'param'; $.outer.returns = art;
|
|
2039
|
+
case 156: if(this.mk(157,'returns')) {ret=this.lb();this.elementRestriction(0,'default'); art.kind = 'param'; $.outer.returns = art;
|
|
2031
2040
|
this.docComment( art ); } continue;
|
|
2032
2041
|
case 157: switch(this.l()) {
|
|
2033
2042
|
case '@': this.annoAssignStd({art},157); continue;
|
|
@@ -2035,7 +2044,7 @@ this.docComment( art ); } continue;
|
|
|
2035
2044
|
}
|
|
2036
2045
|
case 158: this.typeExpression({art},0); continue;
|
|
2037
2046
|
default:
|
|
2038
|
-
this.attachLocation( art );
|
|
2047
|
+
this.attachLocation( art ); if (ret) art.location.tokenIndex = ret.location.tokenIndex;
|
|
2039
2048
|
return this.exit_();
|
|
2040
2049
|
}
|
|
2041
2050
|
}
|
|
@@ -2084,7 +2093,7 @@ this.message( 'syntax-unsupported-masked', this.lb(), { keyword: 'masked' } ); }
|
|
|
2084
2093
|
case 'element': if(this.ckP(170,['Id'])) { $.art.$syntax = 'element'; } continue;
|
|
2085
2094
|
default: this.s=170; continue;
|
|
2086
2095
|
}
|
|
2087
|
-
case 170: if(this.mi(171,'Element')) { this.addDef( $.art, $.outer, 'elements', 'element', this.identAst() );
|
|
2096
|
+
case 170: if(this.mi(171,'Element')) {this.elementRestriction(0,'elem'); this.addDef( $.art, $.outer, 'elements', 'element', this.identAst() );
|
|
2088
2097
|
this.docComment( $.art ); } continue;
|
|
2089
2098
|
case 171: switch(this.l()) {
|
|
2090
2099
|
case '@': this.annoAssignMid({art:$.art},171); continue;
|
|
@@ -2092,8 +2101,8 @@ this.docComment( $.art ); } continue;
|
|
|
2092
2101
|
}
|
|
2093
2102
|
case 172: switch(this.l()) {
|
|
2094
2103
|
case '{': this.elementsBlock({art:$.art},173); continue;
|
|
2095
|
-
case ':':
|
|
2096
|
-
default: this.s=175;
|
|
2104
|
+
case ':': this.c(174); continue;
|
|
2105
|
+
default: this.s=175; continue;
|
|
2097
2106
|
}
|
|
2098
2107
|
case 173: switch(this.lk()) {
|
|
2099
2108
|
case 'not': case 'null': this.nullability({art:$.art},175); continue;
|
|
@@ -2101,17 +2110,17 @@ this.docComment( $.art ); } continue;
|
|
|
2101
2110
|
}
|
|
2102
2111
|
case 174: this.typeExpression({art:$.art},175); continue;
|
|
2103
2112
|
case 175: switch(this.l()) {
|
|
2104
|
-
case '=': this.gc(0,'
|
|
2105
|
-
default: this.gr(['Id',';','@','}','key']); continue;
|
|
2113
|
+
case '=': this.gc(0,'elementRestriction','calc') && this.c(176); continue;
|
|
2114
|
+
default: if(this.gr(['Id',';','@','}','key'])) { this.docComment( $.art, 'type' ); } continue;
|
|
2106
2115
|
}
|
|
2107
2116
|
case 176: if(this.expression(_={},177)) {expr=_.expr; $.art.value = expr; } continue;
|
|
2108
2117
|
case 177: switch(this.lk()) {
|
|
2109
2118
|
case 'stored': if(this.ck(178)) { $.art.value.stored = this.valueWithLocation( true ); } continue;
|
|
2110
2119
|
default: this.s=178; continue;
|
|
2111
2120
|
}
|
|
2112
|
-
case 178: this.s=179;{ this.docComment( $.art ); } continue;
|
|
2121
|
+
case 178: this.s=179;{ if (this.elementRestriction( true, 'anno' )) this.docComment( $.art ); } continue;
|
|
2113
2122
|
case 179: switch(this.l()) {
|
|
2114
|
-
case '@': this.gc(0,'elementRestriction') && this.annoAssignStd({art:$.art},179); continue;
|
|
2123
|
+
case '@': this.gc(0,'elementRestriction','anno') && this.annoAssignStd({art:$.art},179); continue;
|
|
2115
2124
|
default: this.gr(['Id',';','@','}','key']); continue;
|
|
2116
2125
|
}
|
|
2117
2126
|
default:
|
|
@@ -2250,17 +2259,17 @@ this.docComment( art ); } continue;
|
|
|
2250
2259
|
}
|
|
2251
2260
|
annotateArtifact($,$next) {
|
|
2252
2261
|
this.rule_(218,$next);
|
|
2253
|
-
let name; let elemName; let _;
|
|
2262
|
+
let name; let elemName; let keyword; let _;
|
|
2254
2263
|
for(;;) switch(this.s) {
|
|
2255
2264
|
case 218: if(this.namePath(_={category:'Ext'},219)) name=_.name; continue;
|
|
2256
2265
|
case 219: switch(this.lk()) {
|
|
2257
2266
|
case ':': this.c(220); continue;
|
|
2258
|
-
case 'with': this.ck(225); continue;
|
|
2267
|
+
case 'with': if(this.ck(225)) keyword=this.lb(); continue;
|
|
2259
2268
|
default: this.s=225; continue;
|
|
2260
2269
|
}
|
|
2261
2270
|
case 220: if(this.namePath(_={category:'ExtElement'},221)) {elemName=_.name; this.addExtension( $.art, $.outer, 'annotate', name, elemName.path ); } continue;
|
|
2262
2271
|
case 221: switch(this.lk()) {
|
|
2263
|
-
case 'with': this.ck(222); continue;
|
|
2272
|
+
case 'with': if(this.ck(222)) keyword=this.lb(); continue;
|
|
2264
2273
|
default: this.s=222; continue;
|
|
2265
2274
|
}
|
|
2266
2275
|
case 222: this.s=223;{ this.docComment( $.art ); } continue;
|
|
@@ -2292,25 +2301,25 @@ this.docComment( $.art ); } continue;
|
|
|
2292
2301
|
default: this.gr([';']); continue;
|
|
2293
2302
|
}
|
|
2294
2303
|
default:
|
|
2295
|
-
this.attachLocation( $.art );
|
|
2304
|
+
this.checkWith( keyword ); this.attachLocation( $.art );
|
|
2296
2305
|
return this.exit_();
|
|
2297
2306
|
}
|
|
2298
2307
|
}
|
|
2299
2308
|
extendArtifact($,$next) {
|
|
2300
2309
|
this.rule_(231,$next);
|
|
2301
|
-
let name; let elemName; let elements; let incl; let _;
|
|
2310
|
+
let name; let elemName; let keyword; let elements; let incl; let _;
|
|
2302
2311
|
for(;;) switch(this.s) {
|
|
2303
2312
|
case 231: if(this.namePath(_={category:'Ext'},232)) name=_.name; continue;
|
|
2304
2313
|
case 232: switch(this.lk()) {
|
|
2305
2314
|
case ':': this.c(233); continue;
|
|
2306
|
-
case 'with': if(this.ck(242)) { this.addExtension( $.art, $.outer, 'extend', name );
|
|
2315
|
+
case 'with': if(this.ck(242)) {keyword=this.lb(); this.addExtension( $.art, $.outer, 'extend', name );
|
|
2307
2316
|
this.docComment( $.art ); } continue;
|
|
2308
2317
|
default: this.s=239;{ this.addExtension( $.art, $.outer, 'extend', name );
|
|
2309
2318
|
this.docComment( $.art ); } continue;
|
|
2310
2319
|
}
|
|
2311
2320
|
case 233: if(this.namePath(_={category:'ExtElement'},234)) {elemName=_.name; this.addExtension( $.art, $.outer, 'extend', name, elemName.path ); } continue;
|
|
2312
2321
|
case 234: switch(this.lk()) {
|
|
2313
|
-
case 'with': this.ck(235); continue;
|
|
2322
|
+
case 'with': if(this.ck(235)) keyword=this.lb(); continue;
|
|
2314
2323
|
default: this.s=235; continue;
|
|
2315
2324
|
}
|
|
2316
2325
|
case 235: this.s=236;{ this.docComment( $.art ); } continue;
|
|
@@ -2374,18 +2383,18 @@ this.docComment( $.art ); } continue;
|
|
|
2374
2383
|
case 250: this.selectItemsList({query:$.art,start:this.lb()},0); continue;
|
|
2375
2384
|
case 251: this.artifactsBlock({art:$.art,start:this.lb()},0); continue;
|
|
2376
2385
|
default:
|
|
2377
|
-
this.attachLocation( $.art );
|
|
2386
|
+
this.checkWith( keyword ); this.attachLocation( $.art );
|
|
2378
2387
|
return this.exit_();
|
|
2379
2388
|
}
|
|
2380
2389
|
}
|
|
2381
2390
|
extendService($,$next) {
|
|
2382
2391
|
this.rule_(253,$next);
|
|
2383
|
-
let name; let _;
|
|
2392
|
+
let name; let keyword; let _;
|
|
2384
2393
|
for(;;) switch(this.s) {
|
|
2385
2394
|
case 253: if(this.mk(254,'service')) { $.art.expectedKind = this.valueWithLocation(); } continue;
|
|
2386
2395
|
case 254: if(this.namePath(_={category:'ExtService'},255)) {name=_.name; $.art.name = name; $.outer.extensions.push( $.art ); } continue;
|
|
2387
2396
|
case 255: switch(this.lk()) {
|
|
2388
|
-
case 'with': this.ck(256); continue;
|
|
2397
|
+
case 'with': if(this.ck(256)) keyword=this.lb(); continue;
|
|
2389
2398
|
default: this.s=256; continue;
|
|
2390
2399
|
}
|
|
2391
2400
|
case 256: this.s=257;{ this.docComment( $.art ); } continue;
|
|
@@ -2398,18 +2407,18 @@ this.docComment( $.art ); } continue;
|
|
|
2398
2407
|
default: this.gr([';']); continue;
|
|
2399
2408
|
}
|
|
2400
2409
|
default:
|
|
2401
|
-
this.attachLocation( $.art );
|
|
2410
|
+
this.checkWith( keyword ); this.attachLocation( $.art );
|
|
2402
2411
|
return this.exit_();
|
|
2403
2412
|
}
|
|
2404
2413
|
}
|
|
2405
2414
|
extendContext($,$next) {
|
|
2406
2415
|
this.rule_(260,$next);
|
|
2407
|
-
let name; let _;
|
|
2416
|
+
let name; let keyword; let _;
|
|
2408
2417
|
for(;;) switch(this.s) {
|
|
2409
2418
|
case 260: if(this.mk(261,'context')) { $.art.expectedKind = this.valueWithLocation(); } continue;
|
|
2410
2419
|
case 261: if(this.namePath(_={category:'ExtContext'},262)) {name=_.name; $.art.name = name; $.outer.extensions.push( $.art ); } continue;
|
|
2411
2420
|
case 262: switch(this.lk()) {
|
|
2412
|
-
case 'with': this.ck(263); continue;
|
|
2421
|
+
case 'with': if(this.ck(263)) keyword=this.lb(); continue;
|
|
2413
2422
|
default: this.s=263; continue;
|
|
2414
2423
|
}
|
|
2415
2424
|
case 263: this.s=264;{ this.docComment( $.art ); } continue;
|
|
@@ -2422,18 +2431,18 @@ this.docComment( $.art ); } continue;
|
|
|
2422
2431
|
default: this.gr([';']); continue;
|
|
2423
2432
|
}
|
|
2424
2433
|
default:
|
|
2425
|
-
this.attachLocation( $.art );
|
|
2434
|
+
this.checkWith( keyword ); this.attachLocation( $.art );
|
|
2426
2435
|
return this.exit_();
|
|
2427
2436
|
}
|
|
2428
2437
|
}
|
|
2429
2438
|
extendType($,$next) {
|
|
2430
2439
|
this.rule_(267,$next);
|
|
2431
|
-
let name; let incl; let elements; let _;
|
|
2440
|
+
let name; let keyword; let incl; let elements; let _;
|
|
2432
2441
|
for(;;) switch(this.s) {
|
|
2433
2442
|
case 267: if(this.mk(268,'type')) { $.art.expectedKind = this.valueWithLocation(); } continue;
|
|
2434
2443
|
case 268: if(this.namePath(_={category:'Ext'},269)) {name=_.name; $.art.name = name; $.outer.extensions.push( $.art ); } continue;
|
|
2435
2444
|
case 269: switch(this.lk()) {
|
|
2436
|
-
case 'with': if(this.ck(272)) { this.docComment( $.art ); } continue;
|
|
2445
|
+
case 'with': if(this.ck(272)) {keyword=this.lb(); this.docComment( $.art ); } continue;
|
|
2437
2446
|
default: this.s=270;{ this.docComment( $.art ); } continue;
|
|
2438
2447
|
}
|
|
2439
2448
|
case 270: switch(this.l()) {
|
|
@@ -2467,13 +2476,13 @@ this.docComment( $.art ); } continue;
|
|
|
2467
2476
|
}
|
|
2468
2477
|
case 277: this.extendElementsBlock({art:$.art,start:elements},0); continue;
|
|
2469
2478
|
default:
|
|
2470
|
-
this.attachLocation( $.art );
|
|
2479
|
+
this.checkWith( keyword ); this.attachLocation( $.art );
|
|
2471
2480
|
return this.exit_();
|
|
2472
2481
|
}
|
|
2473
2482
|
}
|
|
2474
2483
|
extendEntityOrAspect($,$next) {
|
|
2475
2484
|
this.rule_(279,$next);
|
|
2476
|
-
let name; let incl; let _;
|
|
2485
|
+
let name; let keyword; let incl; let _;
|
|
2477
2486
|
for(;;) switch(this.s) {
|
|
2478
2487
|
case 279: switch(this.lk()) {
|
|
2479
2488
|
case 'aspect': case 'entity': if(this.ck(280)) { $.art.expectedKind = this.valueWithLocation(); } continue;
|
|
@@ -2481,7 +2490,7 @@ this.docComment( $.art ); } continue;
|
|
|
2481
2490
|
}
|
|
2482
2491
|
case 280: if(this.namePath(_={category:'Ext'},281)) {name=_.name; $.art.name = name; $.outer.extensions.push( $.art ); } continue;
|
|
2483
2492
|
case 281: switch(this.lk()) {
|
|
2484
|
-
case 'with': if(this.ck(283)) { this.docComment( $.art ); } continue;
|
|
2493
|
+
case 'with': if(this.ck(283)) {keyword=this.lb(); this.docComment( $.art ); } continue;
|
|
2485
2494
|
default: this.s=282;{ this.docComment( $.art ); } continue;
|
|
2486
2495
|
}
|
|
2487
2496
|
case 282: switch(this.l()) {
|
|
@@ -2511,18 +2520,18 @@ this.docComment( $.art ); } continue;
|
|
|
2511
2520
|
default: this.gr([';']); continue;
|
|
2512
2521
|
}
|
|
2513
2522
|
default:
|
|
2514
|
-
this.attachLocation( $.art );
|
|
2523
|
+
this.checkWith( keyword ); this.attachLocation( $.art );
|
|
2515
2524
|
return this.exit_();
|
|
2516
2525
|
}
|
|
2517
2526
|
}
|
|
2518
2527
|
extendProjection($,$next) {
|
|
2519
2528
|
this.rule_(290,$next);
|
|
2520
|
-
let name; let _;
|
|
2529
|
+
let name; let keyword; let _;
|
|
2521
2530
|
for(;;) switch(this.s) {
|
|
2522
2531
|
case 290: if(this.mk(291,'projection')) { $.art.expectedKind = this.valueWithLocation(); } continue;
|
|
2523
2532
|
case 291: if(this.namePath(_={category:'Ext'},292)) {name=_.name; $.art.name = name; $.outer.extensions.push( $.art ); } continue;
|
|
2524
2533
|
case 292: switch(this.lk()) {
|
|
2525
|
-
case 'with': this.ck(293); continue;
|
|
2534
|
+
case 'with': if(this.ck(293)) keyword=this.lb(); continue;
|
|
2526
2535
|
default: this.s=293; continue;
|
|
2527
2536
|
}
|
|
2528
2537
|
case 293: this.s=294;{ this.docComment( $.art ); } continue;
|
|
@@ -2539,7 +2548,7 @@ this.docComment( $.art ); } continue;
|
|
|
2539
2548
|
default: this.gr([';']); continue;
|
|
2540
2549
|
}
|
|
2541
2550
|
default:
|
|
2542
|
-
this.attachLocation( $.art );
|
|
2551
|
+
this.checkWith( keyword ); this.attachLocation( $.art );
|
|
2543
2552
|
return this.exit_();
|
|
2544
2553
|
}
|
|
2545
2554
|
}
|
|
@@ -2630,8 +2639,9 @@ this.docComment( art ); } continue;
|
|
|
2630
2639
|
annotateReturns($,$next) {
|
|
2631
2640
|
this.rule_(319,$next);
|
|
2632
2641
|
let art=new XsnArtifact();
|
|
2642
|
+
let ret;
|
|
2633
2643
|
for(;;) switch(this.s) {
|
|
2634
|
-
case 319: if(this.mk(320,'returns')) { $.outer.returns = art; art.kind = 'annotate';
|
|
2644
|
+
case 319: if(this.mk(320,'returns')) {ret=this.lb(); $.outer.returns = art; art.kind = 'annotate';
|
|
2635
2645
|
this.docComment( art ); } continue;
|
|
2636
2646
|
case 320: switch(this.l()) {
|
|
2637
2647
|
case '@': this.annoAssignStd({art},320); continue;
|
|
@@ -2642,7 +2652,7 @@ this.docComment( art ); } continue;
|
|
|
2642
2652
|
default: this.gr([';']); continue;
|
|
2643
2653
|
}
|
|
2644
2654
|
default:
|
|
2645
|
-
this.attachLocation( art );
|
|
2655
|
+
this.attachLocation( art ); if (ret) art.location.tokenIndex = ret.location.tokenIndex;
|
|
2646
2656
|
return this.exit_();
|
|
2647
2657
|
}
|
|
2648
2658
|
}
|
|
@@ -2709,7 +2719,7 @@ this.docComment( art ); } continue;
|
|
|
2709
2719
|
elementDefOrExtend($,$next) {
|
|
2710
2720
|
this.rule_(338,$next);
|
|
2711
2721
|
let art=new XsnArtifact();
|
|
2712
|
-
let elements;
|
|
2722
|
+
let keyword; let elements;
|
|
2713
2723
|
{ this.docComment( art ); }
|
|
2714
2724
|
for(;;) switch(this.s) {
|
|
2715
2725
|
case 338: switch(this.l()) {
|
|
@@ -2727,7 +2737,7 @@ this.docComment( art ); } continue;
|
|
|
2727
2737
|
}
|
|
2728
2738
|
case 341: if(this.mi(342,'ExtElement')) { this.addDef( art, $.outer, 'elements', 'extend', this.identAst() ); } continue;
|
|
2729
2739
|
case 342: switch(this.lk()) {
|
|
2730
|
-
case 'with': if(this.ck(345)) { this.docComment( art ); } continue;
|
|
2740
|
+
case 'with': if(this.ck(345)) {keyword=this.lb(); this.docComment( art ); } continue;
|
|
2731
2741
|
default: this.s=343;{ this.docComment( art ); } continue;
|
|
2732
2742
|
}
|
|
2733
2743
|
case 343: switch(this.l()) {
|
|
@@ -2750,7 +2760,9 @@ this.docComment( art ); } continue;
|
|
|
2750
2760
|
default: this.gr(['Id',';','@','}','key']); continue;
|
|
2751
2761
|
}
|
|
2752
2762
|
case 347: this.extendElementsBlock({art,start:elements},0); continue;
|
|
2753
|
-
default:
|
|
2763
|
+
default:
|
|
2764
|
+
this.checkWith( keyword ); this.attachLocation( art );
|
|
2765
|
+
return this.exit_();
|
|
2754
2766
|
}
|
|
2755
2767
|
}
|
|
2756
2768
|
typeOrIncludesSpec($,$next) {
|
|
@@ -2772,7 +2784,7 @@ this.docComment( art ); } continue;
|
|
|
2772
2784
|
default: this.ei(); continue;
|
|
2773
2785
|
}
|
|
2774
2786
|
case 352: switch(this.lk()) {
|
|
2775
|
-
case '(': case ':': this.typeRefOptArgs({art:$.art},353,
|
|
2787
|
+
case '(': case ':': this.typeRefOptArgs({art:$.art},353,411); continue;
|
|
2776
2788
|
case '@': case 'not': case 'enum': case 'null': case 'default': this.typeExpression({art:$.art},0,362); continue;
|
|
2777
2789
|
case ',': case '{': this.s=354;{ $.art.includes = [ $.art.type ]; delete $.art.type; } continue;
|
|
2778
2790
|
default: if(this.gr([';'])) { this.docComment( $.art ); } continue;
|
|
@@ -2807,14 +2819,14 @@ this.docComment( art ); } continue;
|
|
|
2807
2819
|
let assoc; let card; let target; let cond; let _;
|
|
2808
2820
|
for(;;) switch(this.s) {
|
|
2809
2821
|
case 360: switch(this.lk()) {
|
|
2810
|
-
case '{': this.elementsBlock({art:$.art},361); continue;
|
|
2822
|
+
case '{': if(this.elementsBlock({art:$.art},361)) {this.elementRestriction(0,'calc');} continue;
|
|
2811
2823
|
case 'Id': this.typeRefOptArgs({art:$.art},362); continue;
|
|
2812
2824
|
case 'type': this.lP() && this.typeTypeOf({art:$.art},362); continue;
|
|
2813
|
-
case 'localized': if(this.ckP(
|
|
2814
|
-
case 'association': if(this.ckP(
|
|
2815
|
-
case 'composition': if(this.ckP(
|
|
2816
|
-
case 'array': this.ckP(
|
|
2817
|
-
case 'many': if(this.ckP(
|
|
2825
|
+
case 'localized': if(this.ckP(371,['Id'])) { $.art.localized = this.valueWithLocation( true ); } continue;
|
|
2826
|
+
case 'association': if(this.ckP(375,['[','to'])) {assoc=this.lb();this.elementRestriction(0,'calc');} continue;
|
|
2827
|
+
case 'composition': if(this.ckP(384,['[','of'])) {assoc=this.lb();this.elementRestriction(0,'calc');} continue;
|
|
2828
|
+
case 'array': if(this.ckP(394,['of'])) {this.elementRestriction(0,'calc');} continue;
|
|
2829
|
+
case 'many': if(this.ckP(395,['Id','{'])) {this.elementRestriction(0,'calc'); $.art.items = { location: this.lb().location }; } continue;
|
|
2818
2830
|
default: this.ei(); continue;
|
|
2819
2831
|
}
|
|
2820
2832
|
case 361: switch(this.lk()) {
|
|
@@ -2825,221 +2837,232 @@ this.docComment( art ); } continue;
|
|
|
2825
2837
|
case 'not': case 'null': this.nullability({art:$.art},363); continue;
|
|
2826
2838
|
default: this.s=363; continue;
|
|
2827
2839
|
}
|
|
2828
|
-
case 363: this.
|
|
2829
|
-
|
|
2830
|
-
case '
|
|
2831
|
-
case 'enum': this.
|
|
2832
|
-
|
|
2833
|
-
|
|
2840
|
+
case 363: switch(this.lk()) {
|
|
2841
|
+
case 'not': case 'null': case 'default': this.nullabilityAndDefault({art:$.art},364); continue;
|
|
2842
|
+
case '@': this.s=366;{ this.docComment( $.art ); } continue;
|
|
2843
|
+
case 'enum': this.s=369;{ this.docComment( $.art ); } continue;
|
|
2844
|
+
default: if(this.gr([])) { this.docComment( $.art, 'elem' ); } continue;
|
|
2845
|
+
}
|
|
2846
|
+
case 364: switch(this.l()) {
|
|
2847
|
+
case '@': this.s=365;{ this.elementRestriction( false, 'calc' );
|
|
2848
|
+
this.docComment( $.art ); } continue;
|
|
2849
|
+
default: if(this.gr([])) { this.docComment( $.art, 'elem' ); } continue;
|
|
2834
2850
|
}
|
|
2835
2851
|
case 365: switch(this.l()) {
|
|
2836
2852
|
case '@': this.annoAssignStd({art:$.art},365); continue;
|
|
2837
2853
|
default: this.gr([]); continue;
|
|
2838
2854
|
}
|
|
2839
|
-
case 366: switch(this.
|
|
2840
|
-
case '
|
|
2841
|
-
default: this.
|
|
2855
|
+
case 366: switch(this.l()) {
|
|
2856
|
+
case '@': this.annoAssignStd({art:$.art},366); continue;
|
|
2857
|
+
default: this.s=367; continue;
|
|
2842
2858
|
}
|
|
2843
|
-
case 367: switch(this.
|
|
2844
|
-
case '
|
|
2845
|
-
default: this.
|
|
2859
|
+
case 367: switch(this.lk()) {
|
|
2860
|
+
case 'enum': if(this.enumSymbolsBlock({art:$.art},368)) {this.elementRestriction(0,'anno');} continue;
|
|
2861
|
+
default: this.gr([]); continue;
|
|
2846
2862
|
}
|
|
2847
2863
|
case 368: switch(this.lk()) {
|
|
2848
|
-
case '
|
|
2864
|
+
case 'not': case 'null': case 'default': this.nullabilityAndDefault({art:$.art},0); continue;
|
|
2849
2865
|
default: this.gr([]); continue;
|
|
2850
2866
|
}
|
|
2851
|
-
case 369:
|
|
2867
|
+
case 369: if(this.enumSymbolsBlock({art:$.art},370)) {this.elementRestriction(0,'anno');} continue;
|
|
2868
|
+
case 370: switch(this.lk()) {
|
|
2852
2869
|
case 'not': case 'null': case 'default': this.nullabilityAndDefault({art:$.art},0); continue;
|
|
2853
2870
|
default: this.gr([]); continue;
|
|
2854
2871
|
}
|
|
2855
|
-
case
|
|
2856
|
-
case
|
|
2857
|
-
case 'not': case 'null': case 'default': this.nullabilityAndDefault({art:$.art},
|
|
2858
|
-
default: this.s=
|
|
2872
|
+
case 371: this.typeRefOptArgs({art:$.art},372); continue;
|
|
2873
|
+
case 372: switch(this.lk()) {
|
|
2874
|
+
case 'not': case 'null': case 'default': this.nullabilityAndDefault({art:$.art},373); continue;
|
|
2875
|
+
default: this.s=373; continue;
|
|
2859
2876
|
}
|
|
2860
|
-
case 372: this.s=373;{ this.docComment( $.art ); } continue;
|
|
2861
2877
|
case 373: switch(this.l()) {
|
|
2862
|
-
case '@': this.
|
|
2863
|
-
|
|
2878
|
+
case '@': this.s=374;{ this.elementRestriction( false, 'calc' );
|
|
2879
|
+
this.docComment( $.art ); } continue;
|
|
2880
|
+
default: if(this.gr([])) { this.docComment( $.art, 'elem' ); } continue;
|
|
2864
2881
|
}
|
|
2865
2882
|
case 374: switch(this.l()) {
|
|
2866
|
-
case '
|
|
2867
|
-
default: this.
|
|
2868
|
-
}
|
|
2869
|
-
case 375: this.
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
case 377:
|
|
2875
|
-
this.
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
case 380: switch(this.lk()) {
|
|
2883
|
-
case 'not': case 'null': case 'default': this.nullabilityAndDefault({art:$.art},381); continue;
|
|
2883
|
+
case '@': this.annoAssignStd({art:$.art},374); continue;
|
|
2884
|
+
default: this.gr([]); continue;
|
|
2885
|
+
}
|
|
2886
|
+
case 375: switch(this.l()) {
|
|
2887
|
+
case '[': this.cardinality({art:$.art},376); continue;
|
|
2888
|
+
default: this.s=376; continue;
|
|
2889
|
+
}
|
|
2890
|
+
case 376: this.mk(377,'to'); continue;
|
|
2891
|
+
case 377: switch(this.lk()) {
|
|
2892
|
+
case 'one': case 'many': if(this.ckP(378,['Id'])) card=this.lb(); continue;
|
|
2893
|
+
default: this.s=378; continue;
|
|
2894
|
+
}
|
|
2895
|
+
case 378: if(this.simplePath(_={category:'artref'},379)) {target=_.ref; this.setAssocAndComposition( $.art, assoc, card, target ); } continue;
|
|
2896
|
+
case 379: switch(this.lk()) {
|
|
2897
|
+
case 'on': this.ck(380); continue;
|
|
2898
|
+
case '{': this.foreignKeysBlock({art:$.art},381); continue;
|
|
2884
2899
|
default: this.s=381; continue;
|
|
2885
2900
|
}
|
|
2886
|
-
case
|
|
2887
|
-
case
|
|
2888
|
-
case '
|
|
2889
|
-
default: this.
|
|
2901
|
+
case 380: if(this.condition(_={},382)) {cond=_.expr; $.art.on = cond; } continue;
|
|
2902
|
+
case 381: switch(this.lk()) {
|
|
2903
|
+
case 'not': case 'null': case 'default': this.nullabilityAndDefault({art:$.art},382); continue;
|
|
2904
|
+
default: this.s=382; continue;
|
|
2890
2905
|
}
|
|
2906
|
+
case 382: this.s=383;{ this.docComment( $.art ); } continue;
|
|
2891
2907
|
case 383: switch(this.l()) {
|
|
2892
|
-
case '
|
|
2893
|
-
default: this.
|
|
2894
|
-
}
|
|
2895
|
-
case 384: this.
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
default: this.s=386; continue;
|
|
2899
|
-
}
|
|
2900
|
-
case 386: switch(this.l()) {
|
|
2901
|
-
case 'Id': if(this.simplePath(_={category:'artref'},387)) {target=_.ref; this.setAssocAndComposition( $.art, assoc, card, target );
|
|
2902
|
-
this.calcOrDefaultRestriction(false,true); } continue;
|
|
2903
|
-
case '{': this.s=392;{ target = {}; this.setAssocAndComposition( $.art, assoc, card, target ); } continue;
|
|
2904
|
-
default: this.e(); continue;
|
|
2908
|
+
case '@': this.annoAssignStd({art:$.art},383); continue;
|
|
2909
|
+
default: this.gr([]); continue;
|
|
2910
|
+
}
|
|
2911
|
+
case 384: switch(this.l()) {
|
|
2912
|
+
case '[': this.cardinality({art:$.art},385); continue;
|
|
2913
|
+
default: this.s=385; continue;
|
|
2905
2914
|
}
|
|
2906
|
-
case
|
|
2907
|
-
|
|
2908
|
-
case '
|
|
2909
|
-
default: this.s=
|
|
2915
|
+
case 385: this.mk(386,'of'); continue;
|
|
2916
|
+
case 386: switch(this.lk()) {
|
|
2917
|
+
case 'one': case 'many': if(this.ckP(387,['Id','{'])) card=this.lb(); continue;
|
|
2918
|
+
default: this.s=387; continue;
|
|
2910
2919
|
}
|
|
2911
|
-
case
|
|
2912
|
-
|
|
2913
|
-
case '
|
|
2920
|
+
case 387: switch(this.l()) {
|
|
2921
|
+
case 'Id': if(this.simplePath(_={category:'artref'},388)) {target=_.ref; this.setAssocAndComposition( $.art, assoc, card, target ); } continue;
|
|
2922
|
+
case '{': this.s=393;{ target = { location: this.startLocation( this.la() ) };
|
|
2923
|
+
this.setAssocAndComposition( $.art, assoc, card, target ); } continue;
|
|
2924
|
+
default: this.e(); continue;
|
|
2925
|
+
}
|
|
2926
|
+
case 388: switch(this.lk()) {
|
|
2927
|
+
case 'on': this.ck(389); continue;
|
|
2928
|
+
case '{': this.foreignKeysBlock({art:$.art},390); continue;
|
|
2914
2929
|
default: this.s=390; continue;
|
|
2915
2930
|
}
|
|
2916
|
-
case
|
|
2917
|
-
case
|
|
2918
|
-
case '
|
|
2931
|
+
case 389: if(this.condition(_={},391)) {cond=_.expr; $.art.on = cond; } continue;
|
|
2932
|
+
case 390: switch(this.lk()) {
|
|
2933
|
+
case 'not': case 'null': case 'default': this.nullabilityAndDefault({art:$.art},391); continue;
|
|
2934
|
+
default: this.s=391; continue;
|
|
2935
|
+
}
|
|
2936
|
+
case 391: this.s=392;{ this.docComment( $.art ); } continue;
|
|
2937
|
+
case 392: switch(this.l()) {
|
|
2938
|
+
case '@': this.annoAssignStd({art:$.art},392); continue;
|
|
2919
2939
|
default: this.gr([]); continue;
|
|
2920
2940
|
}
|
|
2921
|
-
case
|
|
2922
|
-
case
|
|
2923
|
-
case
|
|
2924
|
-
case '{': this.elementsBlock({art:$.art.items},
|
|
2925
|
-
case 'Id': this.typeRefOptArgs({art:$.art.items},
|
|
2926
|
-
case 'type': this.lP() && this.typeTypeOf({art:$.art.items},
|
|
2941
|
+
case 393: if(this.elementsBlock({art:target},0)) { target.location = target.elements[Symbol.for('cds.$location')]; } continue;
|
|
2942
|
+
case 394: if(this.mk(395,'of')) { $.art.items = { location: this.locationOfPrevTokens( 2 ) }; } continue;
|
|
2943
|
+
case 395: switch(this.lk()) {
|
|
2944
|
+
case '{': this.elementsBlock({art:$.art.items},396); continue;
|
|
2945
|
+
case 'Id': this.typeRefOptArgs({art:$.art.items},397); continue;
|
|
2946
|
+
case 'type': this.lP() && this.typeTypeOf({art:$.art.items},397); continue;
|
|
2927
2947
|
default: this.ei(); continue;
|
|
2928
2948
|
}
|
|
2929
|
-
case
|
|
2949
|
+
case 396: switch(this.lk()) {
|
|
2930
2950
|
case 'not': case 'null': this.nullability({art:$.art.items},0); continue;
|
|
2931
2951
|
default: this.gr([]); continue;
|
|
2932
2952
|
}
|
|
2933
|
-
case 396: switch(this.lk()) {
|
|
2934
|
-
case 'not': case 'null': this.nullability({art:$.art.items},397); continue;
|
|
2935
|
-
default: this.s=397; continue;
|
|
2936
|
-
}
|
|
2937
2953
|
case 397: switch(this.lk()) {
|
|
2938
|
-
case '
|
|
2939
|
-
default: this.s=
|
|
2954
|
+
case 'not': case 'null': this.nullability({art:$.art.items},398); continue;
|
|
2955
|
+
default: this.s=398; continue;
|
|
2940
2956
|
}
|
|
2941
2957
|
case 398: switch(this.lk()) {
|
|
2958
|
+
case 'enum': this.enumSymbolsBlock({art:$.art.items},399); continue;
|
|
2959
|
+
case '@': this.s=400;{ this.elementRestriction( false, 'calc' );
|
|
2960
|
+
this.docComment( $.art ); } continue;
|
|
2961
|
+
default: if(this.gr([])) { this.docComment( $.art, 'elem' ); } continue;
|
|
2962
|
+
}
|
|
2963
|
+
case 399: switch(this.lk()) {
|
|
2942
2964
|
case 'not': case 'null': this.nullability({art:$.art.items},0); continue;
|
|
2943
2965
|
default: this.gr([]); continue;
|
|
2944
2966
|
}
|
|
2945
|
-
case
|
|
2946
|
-
case '@': this.annoAssignStd({art:$.art},
|
|
2967
|
+
case 400: switch(this.l()) {
|
|
2968
|
+
case '@': this.annoAssignStd({art:$.art},400); continue;
|
|
2947
2969
|
default: this.gr([]); continue;
|
|
2948
2970
|
}
|
|
2949
2971
|
default: return this.exit_();
|
|
2950
2972
|
}
|
|
2951
2973
|
}
|
|
2952
2974
|
typeTypeOf($,$next) {
|
|
2953
|
-
this.rule_(
|
|
2975
|
+
this.rule_(402,$next);
|
|
2954
2976
|
let location;
|
|
2955
2977
|
let type; let _;
|
|
2956
2978
|
for(;;) switch(this.s) {
|
|
2957
|
-
case
|
|
2958
|
-
case
|
|
2959
|
-
case
|
|
2960
|
-
case
|
|
2961
|
-
case ':': if(this.c(
|
|
2979
|
+
case 402: this.mk(403,'type'); continue;
|
|
2980
|
+
case 403: if(this.mk(404,'of')) { location = this.locationOfPrevTokens( 2 ); } continue;
|
|
2981
|
+
case 404: if(this.simplePath(_={category:'ref'},405)) {type=_.ref; $.art.type = type; } continue;
|
|
2982
|
+
case 405: switch(this.l()) {
|
|
2983
|
+
case ':': if(this.c(406)) { type.scope = type.path.length; } continue;
|
|
2962
2984
|
default: if(this.gr(['@'])) { type.scope = 'typeOf'; type.path.unshift( { id: 'type of', location } ); } continue;
|
|
2963
2985
|
}
|
|
2964
|
-
case
|
|
2965
|
-
case
|
|
2966
|
-
case '.': this.c(
|
|
2986
|
+
case 406: if(this.miA(407,'ref')) { type.path.push( this.identAst() ); } continue;
|
|
2987
|
+
case 407: switch(this.l()) {
|
|
2988
|
+
case '.': this.c(408); continue;
|
|
2967
2989
|
default: this.gr(['@']); continue;
|
|
2968
2990
|
}
|
|
2969
|
-
case
|
|
2991
|
+
case 408: if(this.miA(407,'ref')) { type.path.push( this.identAst() ); } continue;
|
|
2970
2992
|
default: return this.exit_();
|
|
2971
2993
|
}
|
|
2972
2994
|
}
|
|
2973
2995
|
typeRefOptArgs($,$next,$startState) {
|
|
2974
|
-
this.rule_($startState??
|
|
2996
|
+
this.rule_($startState??410,$next);
|
|
2975
2997
|
let type=$.art.type;
|
|
2976
2998
|
let open; let tok; let _;
|
|
2977
2999
|
for(;;) switch(this.s) {
|
|
2978
|
-
case
|
|
2979
|
-
case
|
|
2980
|
-
case ':': if(this.c(
|
|
2981
|
-
case '(': if(this.c(
|
|
3000
|
+
case 410: if(this.simplePath(_={category:'artref'},411)) {type=_.ref; $.art.type = type; } continue;
|
|
3001
|
+
case 411: switch(this.l()) {
|
|
3002
|
+
case ':': if(this.c(412)) { type.scope = type.path.length; } continue;
|
|
3003
|
+
case '(': if(this.c(415)) open=this.lb(); continue;
|
|
2982
3004
|
default: this.gr([]); continue;
|
|
2983
3005
|
}
|
|
2984
|
-
case
|
|
2985
|
-
case
|
|
2986
|
-
case '.': this.c(
|
|
3006
|
+
case 412: if(this.miA(413,'ref')) { type.path.push( this.identAst() ); } continue;
|
|
3007
|
+
case 413: switch(this.l()) {
|
|
3008
|
+
case '.': this.c(414); continue;
|
|
2987
3009
|
default: this.gr([]); continue;
|
|
2988
3010
|
}
|
|
2989
|
-
case
|
|
2990
|
-
case
|
|
2991
|
-
case 'Number': if(this.c(
|
|
3011
|
+
case 414: if(this.miA(413,'ref')) { type.path.push( this.identAst() ); } continue;
|
|
3012
|
+
case 415: switch(this.lk()) {
|
|
3013
|
+
case 'Number': if(this.c(416)) { $.art.$typeArgs = this.createArray( open );
|
|
2992
3014
|
$.art.$typeArgs.push( this.unsignedIntegerLiteral() ); } continue;
|
|
2993
|
-
case 'Id': this.s=
|
|
3015
|
+
case 'Id': this.s=419;{ $.art.$typeArgs = this.createDict( open ); } continue;
|
|
2994
3016
|
default: this.ei(); continue;
|
|
2995
3017
|
}
|
|
2996
|
-
case
|
|
2997
|
-
case ',': this.c(
|
|
2998
|
-
default: this.s=
|
|
3018
|
+
case 416: switch(this.l()) {
|
|
3019
|
+
case ',': this.c(417); continue;
|
|
3020
|
+
default: this.s=418; continue;
|
|
2999
3021
|
}
|
|
3000
|
-
case
|
|
3001
|
-
case 'Number': if(this.c(
|
|
3002
|
-
case 'floating': case 'variable': if(this.ck(
|
|
3003
|
-
case ')': this.s=
|
|
3022
|
+
case 417: switch(this.lk()) {
|
|
3023
|
+
case 'Number': if(this.c(416)) { $.art.$typeArgs.push( this.unsignedIntegerLiteral() ); } continue;
|
|
3024
|
+
case 'floating': case 'variable': if(this.ck(416)) {tok=this.lb(); $.art.$typeArgs.push( { literal: 'string', val: tok.keyword, location: tok.location } ); } continue;
|
|
3025
|
+
case ')': this.s=418; continue;
|
|
3004
3026
|
default: this.e(); continue;
|
|
3005
3027
|
}
|
|
3006
|
-
case
|
|
3007
|
-
|
|
3008
|
-
|
|
3028
|
+
case 418: this.s=421;{ this.checkTypeArgs( $.art ); } continue;
|
|
3029
|
+
case 419: switch(this.l()) {
|
|
3030
|
+
case 'Id': this.typeNamedArg({art:$.art},420); continue;
|
|
3031
|
+
default: this.s=421; continue;
|
|
3009
3032
|
}
|
|
3010
|
-
case
|
|
3011
|
-
case ',': this.c(
|
|
3012
|
-
case ')': this.s=
|
|
3033
|
+
case 420: switch(this.l()) {
|
|
3034
|
+
case ',': this.c(419); continue;
|
|
3035
|
+
case ')': this.s=421; continue;
|
|
3013
3036
|
default: this.e(); continue;
|
|
3014
3037
|
}
|
|
3015
|
-
case
|
|
3038
|
+
case 421: if(this.m(0,')')) { if ($.art.$typeArgs) this.finalizeDictOrArray( $.art.$typeArgs ); } continue;
|
|
3016
3039
|
default: return this.exit_();
|
|
3017
3040
|
}
|
|
3018
3041
|
}
|
|
3019
3042
|
typeNamedArgsList($,$next) {
|
|
3020
|
-
this.rule_(
|
|
3043
|
+
this.rule_(423,$next);
|
|
3021
3044
|
for(;;) switch(this.s) {
|
|
3022
|
-
case
|
|
3023
|
-
case
|
|
3024
|
-
case 'Id': this.typeNamedArg({art:$.art},
|
|
3025
|
-
default: this.s=
|
|
3026
|
-
}
|
|
3027
|
-
case
|
|
3028
|
-
case ',': this.c(
|
|
3029
|
-
case ')': this.s=
|
|
3045
|
+
case 423: if(this.m(424,'(')) { $.art.$typeArgs = this.createDict(); } continue;
|
|
3046
|
+
case 424: switch(this.l()) {
|
|
3047
|
+
case 'Id': this.typeNamedArg({art:$.art},425); continue;
|
|
3048
|
+
default: this.s=426; continue;
|
|
3049
|
+
}
|
|
3050
|
+
case 425: switch(this.l()) {
|
|
3051
|
+
case ',': this.c(424); continue;
|
|
3052
|
+
case ')': this.s=426; continue;
|
|
3030
3053
|
default: this.e(); continue;
|
|
3031
3054
|
}
|
|
3032
|
-
case
|
|
3055
|
+
case 426: if(this.m(0,')')) { this.finalizeDictOrArray( $.art.$typeArgs ); } continue;
|
|
3033
3056
|
default: return this.exit_();
|
|
3034
3057
|
}
|
|
3035
3058
|
}
|
|
3036
3059
|
typeNamedArg($,$next) {
|
|
3037
|
-
this.rule_(
|
|
3060
|
+
this.rule_(428,$next);
|
|
3038
3061
|
let name; let tok;
|
|
3039
3062
|
for(;;) switch(this.s) {
|
|
3040
|
-
case
|
|
3041
|
-
case
|
|
3042
|
-
case
|
|
3063
|
+
case 428: if(this.mi(429,'typeparamname')) name=this.lb(); continue;
|
|
3064
|
+
case 429: this.m(430,':'); continue;
|
|
3065
|
+
case 430: switch(this.lk()) {
|
|
3043
3066
|
case 'Number': if(this.c(0)) { this.setTypeFacet( $.art, name, this.unsignedIntegerLiteral() ); } continue;
|
|
3044
3067
|
case 'floating': case 'variable': if(this.ck(0)) {tok=this.lb(); this.setTypeFacet( $.art, name, { literal: 'string', val: tok.keyword, location: tok.location } ); } continue;
|
|
3045
3068
|
default: this.e(); continue;
|
|
@@ -3048,46 +3071,46 @@ $.art.$typeArgs.push( this.unsignedIntegerLiteral() ); } continue;
|
|
|
3048
3071
|
}
|
|
3049
3072
|
}
|
|
3050
3073
|
cardinality($,$next) {
|
|
3051
|
-
this.rule_(
|
|
3074
|
+
this.rule_(432,$next);
|
|
3052
3075
|
let card={};
|
|
3053
3076
|
for(;;) switch(this.s) {
|
|
3054
|
-
case
|
|
3055
|
-
case
|
|
3056
|
-
case '*': if(this.c(
|
|
3057
|
-
case 'Number': if(this.c(
|
|
3058
|
-
default: this.s=
|
|
3059
|
-
}
|
|
3060
|
-
case 432: switch(this.l()) {
|
|
3061
|
-
case ',': this.c(433); continue;
|
|
3062
|
-
default: this.s=436; continue;
|
|
3077
|
+
case 432: this.m(433,'['); continue;
|
|
3078
|
+
case 433: switch(this.l()) {
|
|
3079
|
+
case '*': if(this.c(434)) { card.targetMax = this.valueWithLocation(); } continue;
|
|
3080
|
+
case 'Number': if(this.c(436)) { card.targetMax = this.unsignedIntegerLiteral(); } continue;
|
|
3081
|
+
default: this.s=438;{ card.targetMax = this.valueWithLocation( '*' ); } continue;
|
|
3063
3082
|
}
|
|
3064
|
-
case 433: this.targetCardinality({card,atAlt:false},436); continue;
|
|
3065
3083
|
case 434: switch(this.l()) {
|
|
3066
3084
|
case ',': this.c(435); continue;
|
|
3067
|
-
|
|
3068
|
-
default: this.s=436; continue;
|
|
3085
|
+
default: this.s=438; continue;
|
|
3069
3086
|
}
|
|
3070
|
-
case 435: this.targetCardinality({card,atAlt:false},
|
|
3071
|
-
case 436: this.
|
|
3087
|
+
case 435: this.targetCardinality({card,atAlt:false},438); continue;
|
|
3088
|
+
case 436: switch(this.l()) {
|
|
3089
|
+
case ',': this.c(437); continue;
|
|
3090
|
+
case '..': this.targetCardinality({card,atAlt:true},438,441); continue;
|
|
3091
|
+
default: this.s=438; continue;
|
|
3092
|
+
}
|
|
3093
|
+
case 437: this.targetCardinality({card,atAlt:false},438); continue;
|
|
3094
|
+
case 438: this.m(0,']'); continue;
|
|
3072
3095
|
default:
|
|
3073
3096
|
$.art.cardinality = this.attachLocation(card);
|
|
3074
3097
|
return this.exit_();
|
|
3075
3098
|
}
|
|
3076
3099
|
}
|
|
3077
3100
|
targetCardinality($,$next,$startState) {
|
|
3078
|
-
this.rule_($startState??
|
|
3101
|
+
this.rule_($startState??440,$next);
|
|
3079
3102
|
{ if (!$.atAlt) $.card.sourceMax = $.card.targetMax; }
|
|
3080
3103
|
for(;;) switch(this.s) {
|
|
3081
|
-
case
|
|
3104
|
+
case 440: switch(this.l()) {
|
|
3082
3105
|
case '*': if(this.c(0)) { $.card.targetMax = this.valueWithLocation(); } continue;
|
|
3083
|
-
case 'Number': if(this.c(
|
|
3106
|
+
case 'Number': if(this.c(441)) { $.card.targetMax = this.unsignedIntegerLiteral(); } continue;
|
|
3084
3107
|
default: this.e(); continue;
|
|
3085
3108
|
}
|
|
3086
|
-
case
|
|
3087
|
-
case '..': if(this.c(
|
|
3109
|
+
case 441: switch(this.l()) {
|
|
3110
|
+
case '..': if(this.c(442)) { $.card.targetMin = $.card.targetMax; } continue;
|
|
3088
3111
|
default: this.gr([']']); continue;
|
|
3089
3112
|
}
|
|
3090
|
-
case
|
|
3113
|
+
case 442: switch(this.l()) {
|
|
3091
3114
|
case '*': if(this.c(0)) { $.card.targetMax = this.valueWithLocation(); } continue;
|
|
3092
3115
|
case 'Number': if(this.c(0)) { $.card.targetMax = this.unsignedIntegerLiteral(); } continue;
|
|
3093
3116
|
default: this.e(); continue;
|
|
@@ -3096,21 +3119,21 @@ $.art.$typeArgs.push( this.unsignedIntegerLiteral() ); } continue;
|
|
|
3096
3119
|
}
|
|
3097
3120
|
}
|
|
3098
3121
|
nullabilityAndDefault($,$next) {
|
|
3099
|
-
this.rule_(
|
|
3122
|
+
this.rule_(444,$next);
|
|
3100
3123
|
let expr; let _;
|
|
3101
3124
|
for(;;) switch(this.s) {
|
|
3102
|
-
case
|
|
3103
|
-
case 'not': case 'null': this.nullability({art:$.art},
|
|
3104
|
-
case 'default': this.ec('
|
|
3125
|
+
case 444: switch(this.lk()) {
|
|
3126
|
+
case 'not': case 'null': this.nullability({art:$.art},445); continue;
|
|
3127
|
+
case 'default': this.ec('elementRestriction','default') && this.ck(447); continue;
|
|
3105
3128
|
default: this.e(); continue;
|
|
3106
3129
|
}
|
|
3107
|
-
case
|
|
3108
|
-
case 'default': this.gc(0,'
|
|
3130
|
+
case 445: switch(this.lk()) {
|
|
3131
|
+
case 'default': this.gc(0,'elementRestriction','default') && this.ck(446); continue;
|
|
3109
3132
|
default: this.gr([]); continue;
|
|
3110
3133
|
}
|
|
3111
|
-
case
|
|
3112
|
-
case
|
|
3113
|
-
case
|
|
3134
|
+
case 446: if(this.expression(_={},0)) {expr=_.expr; $.art.default = expr; } continue;
|
|
3135
|
+
case 447: if(this.expression(_={},448)) {expr=_.expr; $.art.default = expr; } continue;
|
|
3136
|
+
case 448: switch(this.lk()) {
|
|
3114
3137
|
case 'not': case 'null': this.nullability({art:$.art},0); continue;
|
|
3115
3138
|
default: this.gr([]); continue;
|
|
3116
3139
|
}
|
|
@@ -3118,45 +3141,45 @@ $.art.$typeArgs.push( this.unsignedIntegerLiteral() ); } continue;
|
|
|
3118
3141
|
}
|
|
3119
3142
|
}
|
|
3120
3143
|
nullability($,$next) {
|
|
3121
|
-
this.rule_(
|
|
3144
|
+
this.rule_(450,$next);
|
|
3122
3145
|
for(;;) switch(this.s) {
|
|
3123
|
-
case
|
|
3146
|
+
case 450: switch(this.lk()) {
|
|
3124
3147
|
case 'null': if(this.ck(0)) { this.setNullability( $.art, false ); } continue;
|
|
3125
|
-
case 'not': this.ck(
|
|
3148
|
+
case 'not': this.ck(451); continue;
|
|
3126
3149
|
default: this.e(); continue;
|
|
3127
3150
|
}
|
|
3128
|
-
case
|
|
3151
|
+
case 451: if(this.mk(0,'null')) { this.setNullability( $.art, true, this.locationOfPrevTokens( 2 ) ); } continue;
|
|
3129
3152
|
default: return this.exit_();
|
|
3130
3153
|
}
|
|
3131
3154
|
}
|
|
3132
3155
|
queryEOF($,$next) {
|
|
3133
3156
|
$.query??=undefined;
|
|
3134
|
-
this.rule_(
|
|
3157
|
+
this.rule_(453,$next);
|
|
3135
3158
|
let _;
|
|
3136
3159
|
for(;;) switch(this.s) {
|
|
3137
|
-
case
|
|
3138
|
-
case
|
|
3139
|
-
case ';': this.c(
|
|
3140
|
-
default: this.s=
|
|
3160
|
+
case 453: if(this.queryExpression(_={},454)) $.query=_.expr; continue;
|
|
3161
|
+
case 454: switch(this.l()) {
|
|
3162
|
+
case ';': this.c(455); continue;
|
|
3163
|
+
default: this.s=455; continue;
|
|
3141
3164
|
}
|
|
3142
|
-
case
|
|
3165
|
+
case 455: this.m(0,'EOF'); continue;
|
|
3143
3166
|
default: return this.exit_();
|
|
3144
3167
|
}
|
|
3145
3168
|
}
|
|
3146
3169
|
projectionSpec($,$next) {
|
|
3147
3170
|
$.query??={};
|
|
3148
|
-
this.rule_(
|
|
3171
|
+
this.rule_(457,$next);
|
|
3149
3172
|
let tab; let _;
|
|
3150
3173
|
for(;;) switch(this.s) {
|
|
3151
|
-
case
|
|
3152
|
-
case
|
|
3153
|
-
case
|
|
3174
|
+
case 457: if(this.mk(458,'projection')) { $.query = { op: this.valueWithLocation( 'SELECT' ) }; } continue;
|
|
3175
|
+
case 458: this.mk(459,'on'); continue;
|
|
3176
|
+
case 459: if(this.fromRefWithOptAlias(_={},460)) {tab=_.expr; this.afterBrace();
|
|
3154
3177
|
$.query.from = tab; } continue;
|
|
3155
|
-
case
|
|
3156
|
-
case '{': this.selectItemsList({query:$.query,start:undefined},
|
|
3157
|
-
default: this.s=
|
|
3178
|
+
case 460: switch(this.l()) {
|
|
3179
|
+
case '{': this.selectItemsList({query:$.query,start:undefined},461); continue;
|
|
3180
|
+
default: this.s=461; continue;
|
|
3158
3181
|
}
|
|
3159
|
-
case
|
|
3182
|
+
case 461: switch(this.lk()) {
|
|
3160
3183
|
case 'excluding': this.excludingClause({query:$.query},0); continue;
|
|
3161
3184
|
default: this.gr([';']); continue;
|
|
3162
3185
|
}
|
|
@@ -3167,39 +3190,39 @@ $.query.from = tab; } continue;
|
|
|
3167
3190
|
}
|
|
3168
3191
|
queryExpression($,$next,$startState) {
|
|
3169
3192
|
$.expr??={};
|
|
3170
|
-
this.rule_($startState??
|
|
3193
|
+
this.rule_($startState??463,$next);
|
|
3171
3194
|
let op; let quantifier;
|
|
3172
3195
|
let query; let _;
|
|
3173
3196
|
for(;;) switch(this.s) {
|
|
3174
|
-
case
|
|
3175
|
-
case '(': this.c(
|
|
3176
|
-
case 'Id': if(this.selectQuery(_={},
|
|
3197
|
+
case 463: switch(this.l()) {
|
|
3198
|
+
case '(': this.c(464); continue;
|
|
3199
|
+
case 'Id': if(this.selectQuery(_={},466)) $.expr=_.query; continue;
|
|
3177
3200
|
default: this.e(); continue;
|
|
3178
3201
|
}
|
|
3179
|
-
case
|
|
3180
|
-
case
|
|
3181
|
-
case
|
|
3182
|
-
case 'intersect': if(this.
|
|
3183
|
-
case 'minus': case 'except': if(this.
|
|
3184
|
-
case 'union': if(this.
|
|
3185
|
-
default: this.s=
|
|
3202
|
+
case 464: this.queryExpression($,465); continue;
|
|
3203
|
+
case 465: if(this.m(466,')')) { this.surroundByParens( $.expr ); } continue;
|
|
3204
|
+
case 466: switch(this.lk()) {
|
|
3205
|
+
case 'intersect': if(this.gc(470,'precLeft_',4) && this.ck(467)) { op = this.valueWithLocation(); } continue;
|
|
3206
|
+
case 'minus': case 'except': if(this.gc(470,'precLeft_',2) && this.ck(467)) { op = this.valueWithLocation(); } continue;
|
|
3207
|
+
case 'union': if(this.gc(470,'precLeft_',2) && this.ck(468)) { op = this.valueWithLocation(); } continue;
|
|
3208
|
+
default: this.s=470; continue;
|
|
3186
3209
|
}
|
|
3187
|
-
case
|
|
3188
|
-
case 'distinct': if(this.ck(
|
|
3189
|
-
default: this.s=
|
|
3210
|
+
case 467: switch(this.lk()) {
|
|
3211
|
+
case 'distinct': if(this.ck(469)) { quantifier = this.valueWithLocation(); } continue;
|
|
3212
|
+
default: this.s=469; continue;
|
|
3190
3213
|
}
|
|
3191
|
-
case
|
|
3192
|
-
case 'all': case 'distinct': if(this.ck(
|
|
3193
|
-
default: this.s=
|
|
3214
|
+
case 468: switch(this.lk()) {
|
|
3215
|
+
case 'all': case 'distinct': if(this.ck(469)) { quantifier = this.valueWithLocation(); } continue;
|
|
3216
|
+
default: this.s=469; continue;
|
|
3194
3217
|
}
|
|
3195
|
-
case
|
|
3218
|
+
case 469: if(this.queryExpression(_={},466)) {query=_.expr; if ($.expr.$parens || op.val !== $.expr.op.val || quantifier?.val !== $.expr.quantifier?.val) $.expr = { op, args: [$.expr], quantifier };
|
|
3196
3219
|
quantifier = undefined;
|
|
3197
3220
|
$.expr.args.push( query ); this.attachLocation( $.expr ); } continue;
|
|
3198
|
-
case
|
|
3199
|
-
case 'limit': case 'order': if(this.
|
|
3221
|
+
case 470: switch(this.lk()) {
|
|
3222
|
+
case 'limit': case 'order': if(this.gc(0,'precPost_',0) && this.g(471)) { if ($.expr.$parens) { this.attachLocation( $.expr ); $.expr = { op: this.valueWithLocation( '$query', this.la() ), args: [ $.expr ] }; } } continue;
|
|
3200
3223
|
default: this.gr([]); continue;
|
|
3201
3224
|
}
|
|
3202
|
-
case
|
|
3225
|
+
case 471: this.orderByLimitOffset({query:$.expr},0); continue;
|
|
3203
3226
|
default:
|
|
3204
3227
|
this.attachLocation( $.expr );
|
|
3205
3228
|
return this.exit_();
|
|
@@ -3207,61 +3230,61 @@ $.expr.args.push( query ); this.attachLocation( $.expr ); } continue;
|
|
|
3207
3230
|
}
|
|
3208
3231
|
selectQuery($,$next) {
|
|
3209
3232
|
$.query??={};
|
|
3210
|
-
this.rule_(
|
|
3233
|
+
this.rule_(473,$next);
|
|
3211
3234
|
for(;;) switch(this.s) {
|
|
3212
|
-
case
|
|
3213
|
-
case
|
|
3214
|
-
case 'from': this.ck(
|
|
3215
|
-
case 'all': case 'distinct': if(this.ckP(
|
|
3216
|
-
case 'Id': case '#': case '(': case '*': case '+': case '-': case ':': case '?': case '@': case '{': case 'key': case 'not': case 'case': case 'cast': case 'null': case 'true': case 'false': case 'Number': case 'String': case 'exists': case 'QuotedLiteral': this.s=
|
|
3235
|
+
case 473: if(this.mk(474,'select')) { $.query = { op: this.valueWithLocation( 'SELECT' ) }; } continue;
|
|
3236
|
+
case 474: switch(this.lk()) {
|
|
3237
|
+
case 'from': this.ck(475); continue;
|
|
3238
|
+
case 'all': case 'distinct': if(this.ckP(485,['Id','#','(','*','+','-',':','?','@','{','key','not','case','cast','null','true','false','Number','String','exists','QuotedLiteral'])) { $.query.quantifier = this.valueWithLocation(); } continue;
|
|
3239
|
+
case 'Id': case '#': case '(': case '*': case '+': case '-': case ':': case '?': case '@': case '{': case 'key': case 'not': case 'case': case 'cast': case 'null': case 'true': case 'false': case 'Number': case 'String': case 'exists': case 'QuotedLiteral': this.s=485; continue;
|
|
3217
3240
|
default: this.ei(); continue;
|
|
3218
3241
|
}
|
|
3219
|
-
case
|
|
3220
|
-
case
|
|
3221
|
-
case 'mixin': this.ck(
|
|
3222
|
-
default: this.s=
|
|
3242
|
+
case 475: this.querySource({query:$.query},476); continue;
|
|
3243
|
+
case 476: switch(this.lk()) {
|
|
3244
|
+
case 'mixin': this.ck(477); continue;
|
|
3245
|
+
default: this.s=482; continue;
|
|
3223
3246
|
}
|
|
3224
|
-
case
|
|
3225
|
-
case
|
|
3226
|
-
case 'Id': this.mixinElementDef({outer:$.query},
|
|
3227
|
-
default: this.s=
|
|
3247
|
+
case 477: if(this.m(478,'{')) { $.query.mixin = this.createDict(); } continue;
|
|
3248
|
+
case 478: switch(this.l()) {
|
|
3249
|
+
case 'Id': this.mixinElementDef({outer:$.query},479); continue;
|
|
3250
|
+
default: this.s=480; continue;
|
|
3228
3251
|
}
|
|
3229
|
-
case
|
|
3230
|
-
case ';': this.c(
|
|
3231
|
-
case '}': this.s=
|
|
3252
|
+
case 479: switch(this.l()) {
|
|
3253
|
+
case ';': this.c(478); continue;
|
|
3254
|
+
case '}': this.s=480; continue;
|
|
3232
3255
|
default: this.e(); continue;
|
|
3233
3256
|
}
|
|
3234
|
-
case
|
|
3235
|
-
case
|
|
3236
|
-
case 480: switch(this.lk()) {
|
|
3237
|
-
case 'all': case 'distinct': if(this.ck(481)) { $.query.quantifier = this.valueWithLocation(); } continue;
|
|
3238
|
-
default: this.s=481; continue;
|
|
3239
|
-
}
|
|
3240
|
-
case 481: switch(this.l()) {
|
|
3241
|
-
case '{': this.selectItemsList({query:$.query,start:undefined},482); continue;
|
|
3242
|
-
default: this.s=482; continue;
|
|
3243
|
-
}
|
|
3257
|
+
case 480: if(this.m(481,'}')) { this.finalizeDictOrArray( $.query.mixin ); } continue;
|
|
3258
|
+
case 481: this.mk(482,'into'); continue;
|
|
3244
3259
|
case 482: switch(this.lk()) {
|
|
3245
|
-
case '
|
|
3246
|
-
default: this.s=
|
|
3260
|
+
case 'all': case 'distinct': if(this.ck(483)) { $.query.quantifier = this.valueWithLocation(); } continue;
|
|
3261
|
+
default: this.s=483; continue;
|
|
3247
3262
|
}
|
|
3248
3263
|
case 483: switch(this.l()) {
|
|
3249
|
-
case '
|
|
3250
|
-
|
|
3251
|
-
default: this.e(); continue;
|
|
3264
|
+
case '{': this.selectItemsList({query:$.query,start:undefined},484); continue;
|
|
3265
|
+
default: this.s=484; continue;
|
|
3252
3266
|
}
|
|
3253
|
-
case 484: switch(this.
|
|
3254
|
-
case '
|
|
3255
|
-
default: this.s=
|
|
3267
|
+
case 484: switch(this.lk()) {
|
|
3268
|
+
case 'excluding': this.excludingClause({query:$.query},490); continue;
|
|
3269
|
+
default: this.s=490; continue;
|
|
3256
3270
|
}
|
|
3257
3271
|
case 485: switch(this.l()) {
|
|
3258
|
-
case '*': if(this.c(
|
|
3259
|
-
case 'Id': case '#': case '(': case '+': case '-': case ':': case '?': case '@': case '{': case 'Number': case 'String': case 'QuotedLiteral': this.selectItemDef({columns
|
|
3272
|
+
case '*': if(this.c(486)) { $.query.columns = [ this.valueWithLocation() ]; } continue;
|
|
3273
|
+
case 'Id': case '#': case '(': case '+': case '-': case ':': case '?': case '@': case '{': case 'Number': case 'String': case 'QuotedLiteral': this.selectItemDef({columns:($.query.columns = [])},486); continue;
|
|
3260
3274
|
default: this.e(); continue;
|
|
3261
3275
|
}
|
|
3262
|
-
case 486: this.
|
|
3263
|
-
|
|
3264
|
-
|
|
3276
|
+
case 486: switch(this.l()) {
|
|
3277
|
+
case ',': this.c(487); continue;
|
|
3278
|
+
default: this.s=488; continue;
|
|
3279
|
+
}
|
|
3280
|
+
case 487: switch(this.l()) {
|
|
3281
|
+
case '*': if(this.c(486)) { $.query.columns.push( this.valueWithLocation() ); } continue;
|
|
3282
|
+
case 'Id': case '#': case '(': case '+': case '-': case ':': case '?': case '@': case '{': case 'Number': case 'String': case 'QuotedLiteral': this.selectItemDef({columns:$.query.columns},486); continue;
|
|
3283
|
+
default: this.e(); continue;
|
|
3284
|
+
}
|
|
3285
|
+
case 488: this.mk(489,'from'); continue;
|
|
3286
|
+
case 489: this.querySource({query:$.query},490); continue;
|
|
3287
|
+
case 490: switch(this.lk()) {
|
|
3265
3288
|
case 'group': case 'where': case 'having': this.whereGroupByHaving({query:$.query},0); continue;
|
|
3266
3289
|
default: this.gr(['limit','minus','order','union','except','intersect']); continue;
|
|
3267
3290
|
}
|
|
@@ -3271,164 +3294,165 @@ $.expr.args.push( query ); this.attachLocation( $.expr ); } continue;
|
|
|
3271
3294
|
}
|
|
3272
3295
|
}
|
|
3273
3296
|
querySource($,$next) {
|
|
3274
|
-
this.rule_(
|
|
3297
|
+
this.rule_(492,$next);
|
|
3275
3298
|
let tab; let _;
|
|
3276
3299
|
for(;;) switch(this.s) {
|
|
3277
|
-
case
|
|
3278
|
-
case
|
|
3279
|
-
case ',': this.s=
|
|
3300
|
+
case 492: if(this.tableExpression(_={},493)) {tab=_.expr; $.query.from = tab; } continue;
|
|
3301
|
+
case 493: switch(this.l()) {
|
|
3302
|
+
case ',': this.s=494;{ const { location } = this.la();
|
|
3280
3303
|
$.query.from = { op: { val: 'join', location }, join: { val: 'cross', location }, args: [tab] }; } continue;
|
|
3281
3304
|
default: this.gr(['group','limit','minus','order','union','where','except','having','intersect']); continue;
|
|
3282
3305
|
}
|
|
3283
|
-
case
|
|
3284
|
-
case ',': this.c(
|
|
3306
|
+
case 494: switch(this.l()) {
|
|
3307
|
+
case ',': this.c(495); continue;
|
|
3285
3308
|
default: this.gr(['group','limit','minus','order','union','where','except','having','intersect']); continue;
|
|
3286
3309
|
}
|
|
3287
|
-
case
|
|
3310
|
+
case 495: if(this.tableExpression(_={},494)) {tab=_.expr; $.query.from.args.push( tab ); } continue;
|
|
3288
3311
|
case 0:
|
|
3289
3312
|
this.attachLocation($.query.from);
|
|
3290
3313
|
default: return this.exit_();
|
|
3291
3314
|
}
|
|
3292
3315
|
}
|
|
3293
3316
|
tableExpression($,$next,$startState) {
|
|
3294
|
-
$.expr??=
|
|
3295
|
-
this.rule_($startState??
|
|
3317
|
+
$.expr??={};
|
|
3318
|
+
this.rule_($startState??497,$next);
|
|
3296
3319
|
let join; let tab; let card; let cond; let _;
|
|
3297
3320
|
for(;;) switch(this.s) {
|
|
3298
|
-
case
|
|
3299
|
-
case '(': this.tableOrQueryParens($,
|
|
3300
|
-
case 'Id': this.fromRefWithOptAlias($,
|
|
3321
|
+
case 497: switch(this.l()) {
|
|
3322
|
+
case '(': this.tableOrQueryParens($,498); continue;
|
|
3323
|
+
case 'Id': this.fromRefWithOptAlias($,499); continue;
|
|
3301
3324
|
default: this.e(); continue;
|
|
3302
3325
|
}
|
|
3303
|
-
case
|
|
3304
|
-
case
|
|
3305
|
-
case 'cross': if(this.ck(
|
|
3306
|
-
case 'inner': if(this.ck(
|
|
3307
|
-
case 'full': case 'left': case 'right': if(this.ck(
|
|
3308
|
-
case 'join': this.
|
|
3309
|
-
default:
|
|
3310
|
-
}
|
|
3311
|
-
case
|
|
3312
|
-
case
|
|
3313
|
-
case '(': if(this.tableOrQueryParens(_={},
|
|
3326
|
+
case 498: this.s=499;{ $.expr = this.taggedIfQuery( $.expr ); } continue;
|
|
3327
|
+
case 499: switch(this.lk()) {
|
|
3328
|
+
case 'cross': if(this.ck(500)) join=this.lb(); continue;
|
|
3329
|
+
case 'inner': if(this.ck(503)) join=this.lb(); continue;
|
|
3330
|
+
case 'full': case 'left': case 'right': if(this.ck(502)) join=this.lb(); continue;
|
|
3331
|
+
case 'join': if(this.ck(505)) { join = undefined; } continue;
|
|
3332
|
+
default: this.gr([]); continue;
|
|
3333
|
+
}
|
|
3334
|
+
case 500: if(this.mk(501,'join')) { if ($.expr?.join?.val !== 'cross' || $.expr.$parens) $.expr = { op: this.valueWithLocation(), join: this.valueWithLocation( undefined, join ), args: [ $.expr ] }; } continue;
|
|
3335
|
+
case 501: switch(this.l()) {
|
|
3336
|
+
case '(': if(this.tableOrQueryParens(_={},499)) {tab=_.expr; $.expr.args.push( this.taggedIfQuery( tab ) );
|
|
3314
3337
|
this.attachLocation( $.expr ); } continue;
|
|
3315
|
-
case 'Id': if(this.fromRefWithOptAlias(_={},
|
|
3338
|
+
case 'Id': if(this.fromRefWithOptAlias(_={},499)) {tab=_.expr; $.expr.args.push( tab );
|
|
3316
3339
|
this.attachLocation( $.expr ); } continue;
|
|
3317
3340
|
default: this.e(); continue;
|
|
3318
3341
|
}
|
|
3319
|
-
case
|
|
3320
|
-
case 'outer': this.ck(
|
|
3321
|
-
default: this.s=
|
|
3342
|
+
case 502: switch(this.lk()) {
|
|
3343
|
+
case 'outer': this.ck(503); continue;
|
|
3344
|
+
default: this.s=503; continue;
|
|
3322
3345
|
}
|
|
3323
|
-
case
|
|
3324
|
-
case 'one': case 'many': case 'exact': this.joinCardinality(card={},
|
|
3325
|
-
default: this.s=
|
|
3346
|
+
case 503: switch(this.lk()) {
|
|
3347
|
+
case 'one': case 'many': case 'exact': this.joinCardinality(card={},504); continue;
|
|
3348
|
+
default: this.s=504; continue;
|
|
3326
3349
|
}
|
|
3327
|
-
case
|
|
3328
|
-
join = undefined; } continue;
|
|
3329
|
-
case
|
|
3330
|
-
case
|
|
3331
|
-
case
|
|
3350
|
+
case 504: this.mk(505,'join'); continue;
|
|
3351
|
+
case 505: this.s=506;{ $.expr = { op: this.valueWithLocation(), join: this.valueWithLocation( join?.keyword || 'inner', join ), args: [ $.expr ] }; if (card) $.expr.cardinality = card; card = undefined; } continue;
|
|
3352
|
+
case 506: if(this.tableExpression(_={},507)) {tab=_.expr; $.expr.args.push( tab ); this.attachLocation( $.expr ); } continue;
|
|
3353
|
+
case 507: this.mk(508,'on'); continue;
|
|
3354
|
+
case 508: if(this.condition(_={},499)) {cond=_.expr; $.expr.on = cond;
|
|
3332
3355
|
this.attachLocation( $.expr ); } continue;
|
|
3333
3356
|
default: return this.exit_();
|
|
3334
3357
|
}
|
|
3335
3358
|
}
|
|
3336
3359
|
tableOrQueryParens($,$next) {
|
|
3337
3360
|
$.expr??=undefined;
|
|
3338
|
-
this.rule_(
|
|
3361
|
+
this.rule_(510,$next);
|
|
3339
3362
|
for(;;) switch(this.s) {
|
|
3340
|
-
case
|
|
3341
|
-
case
|
|
3342
|
-
case '(': this.tableOrQueryParens($,
|
|
3343
|
-
case 'Id': this.
|
|
3344
|
-
case 'select': this.
|
|
3363
|
+
case 510: if(this.m(511,'(')) {this.queryOnLeft();} continue;
|
|
3364
|
+
case 511: switch(this.lk()) {
|
|
3365
|
+
case '(': this.tableOrQueryParens($,512); continue;
|
|
3366
|
+
case 'Id': if(this.tableExpression($,513)) {this.queryOnLeft(0,'table');} continue;
|
|
3367
|
+
case 'select': this.queryExpression($,513); continue;
|
|
3345
3368
|
default: this.ei(); continue;
|
|
3346
3369
|
}
|
|
3347
|
-
case
|
|
3348
|
-
case 'full': case 'join': case 'left': case 'cross': case 'inner': case 'right': this.
|
|
3349
|
-
case 'limit': case 'minus': case 'order': case 'union': case 'except': case 'intersect': this.
|
|
3350
|
-
default: this.s=
|
|
3370
|
+
case 512: switch(this.lk()) {
|
|
3371
|
+
case 'full': case 'join': case 'left': case 'cross': case 'inner': case 'right': if(this.tableExpression($,513,498)) {this.queryOnLeft(0,'table');} continue;
|
|
3372
|
+
case 'limit': case 'minus': case 'order': case 'union': case 'except': case 'intersect': this.gc(513,'queryOnLeft') && this.queryExpression($,513,466); continue;
|
|
3373
|
+
default: this.s=513; continue;
|
|
3351
3374
|
}
|
|
3352
|
-
case
|
|
3353
|
-
case
|
|
3354
|
-
case 'as': this.
|
|
3355
|
-
case 'Id': if(this.gc(0,'
|
|
3356
|
-
default:
|
|
3375
|
+
case 513: if(this.m(514,')')) { this.surroundByParens( $.expr ); } continue;
|
|
3376
|
+
case 514: switch(this.lk()) {
|
|
3377
|
+
case 'as': this.gc(0,'queryOnLeft','table') && this.ck(515); continue;
|
|
3378
|
+
case 'Id': if(this.gc(0,'queryOnLeft','tableWithoutAs') && this.ci(0,'FromAlias')) { $.expr = this.taggedIfQuery( $.expr ); $.expr.name = this.fragileAlias(); } continue;
|
|
3379
|
+
default: this.gi(0,['full','join','left','cross','inner','right']); continue;
|
|
3357
3380
|
}
|
|
3358
|
-
case
|
|
3381
|
+
case 515: if(this.mi(0,'FromAlias')) { $.expr = this.taggedIfQuery( $.expr ); $.expr.name = this.identAst(); } continue;
|
|
3359
3382
|
default: return this.exit_();
|
|
3360
3383
|
}
|
|
3361
3384
|
}
|
|
3362
3385
|
joinCardinality($,$next) {
|
|
3363
3386
|
$.sourceMax??=undefined; $.targetMax??=undefined;
|
|
3364
|
-
this.rule_(
|
|
3387
|
+
this.rule_(517,$next);
|
|
3365
3388
|
for(;;) switch(this.s) {
|
|
3366
|
-
case 514: switch(this.lk()) {
|
|
3367
|
-
case 'exact': if(this.ck(515)) { $.sourceMin = this.valueWithLocation( 1 ); } continue;
|
|
3368
|
-
case 'one': this.s=515; continue;
|
|
3369
|
-
case 'many': if(this.ck(516)) { $.sourceMax = this.valueWithLocation( '*' ); } continue;
|
|
3370
|
-
default: this.e(); continue;
|
|
3371
|
-
}
|
|
3372
|
-
case 515: if(this.mk(516,'one')) { $.sourceMax = this.valueWithLocation( 1 ); } continue;
|
|
3373
|
-
case 516: this.mk(517,'to'); continue;
|
|
3374
3389
|
case 517: switch(this.lk()) {
|
|
3375
|
-
case 'exact': if(this.ck(518)) { $.
|
|
3390
|
+
case 'exact': if(this.ck(518)) { $.sourceMin = this.valueWithLocation( 1 ); } continue;
|
|
3376
3391
|
case 'one': this.s=518; continue;
|
|
3392
|
+
case 'many': if(this.ck(519)) { $.sourceMax = this.valueWithLocation( '*' ); } continue;
|
|
3393
|
+
default: this.e(); continue;
|
|
3394
|
+
}
|
|
3395
|
+
case 518: if(this.mk(519,'one')) { $.sourceMax = this.valueWithLocation( 1 ); } continue;
|
|
3396
|
+
case 519: this.mk(520,'to'); continue;
|
|
3397
|
+
case 520: switch(this.lk()) {
|
|
3398
|
+
case 'exact': if(this.ck(521)) { $.targetMin = this.valueWithLocation( 1 ); } continue;
|
|
3399
|
+
case 'one': this.s=521; continue;
|
|
3377
3400
|
case 'many': if(this.ck(0)) { $.targetMax = this.valueWithLocation( '*' ); } continue;
|
|
3378
3401
|
default: this.e(); continue;
|
|
3379
3402
|
}
|
|
3380
|
-
case
|
|
3403
|
+
case 521: if(this.mk(0,'one')) { $.targetMax = this.valueWithLocation( 1 ); } continue;
|
|
3381
3404
|
default:
|
|
3382
3405
|
this.attachLocation( $ );
|
|
3383
3406
|
return this.exit_();
|
|
3384
3407
|
}
|
|
3385
3408
|
}
|
|
3386
3409
|
fromRefWithOptAlias($,$next) {
|
|
3387
|
-
$.expr??={
|
|
3388
|
-
this.rule_(
|
|
3410
|
+
$.expr??={};
|
|
3411
|
+
this.rule_(523,$next);
|
|
3412
|
+
{ $.expr.path = []; }
|
|
3389
3413
|
for(;;) switch(this.s) {
|
|
3390
|
-
case
|
|
3391
|
-
case
|
|
3392
|
-
case ':': if(this.c(
|
|
3414
|
+
case 523: this.fromPath({table:$.expr,category:'artref'},524); continue;
|
|
3415
|
+
case 524: switch(this.l()) {
|
|
3416
|
+
case ':': if(this.c(525)) { if (!$.expr.scope) $.expr.scope = $.expr.path.length; else {
|
|
3393
3417
|
this.warning( 'syntax-invalid-path-separator', this.lb(),
|
|
3394
3418
|
{ '#': 'colon', code: ':', newcode: '.' } );
|
|
3395
3419
|
} } continue;
|
|
3396
|
-
default: this.s=
|
|
3420
|
+
default: this.s=526; continue;
|
|
3397
3421
|
}
|
|
3398
|
-
case
|
|
3399
|
-
case
|
|
3400
|
-
case 'as': this.ck(
|
|
3401
|
-
case 'Id': if(this.gc(
|
|
3402
|
-
default: this.giR(
|
|
3422
|
+
case 525: this.fromPath({table:$.expr,category:'ref'},526); continue;
|
|
3423
|
+
case 526: switch(this.lk()) {
|
|
3424
|
+
case 'as': this.ck(527); continue;
|
|
3425
|
+
case 'Id': if(this.gc(528,'tableWithoutAs') && this.ci(0,'FromAlias')) { $.expr.name = this.fragileAlias(); } continue;
|
|
3426
|
+
default: this.giR(528); continue;
|
|
3403
3427
|
}
|
|
3404
|
-
case
|
|
3405
|
-
case
|
|
3428
|
+
case 527: if(this.mi(0,'FromAlias')) { $.expr.name = this.identAst(); } continue;
|
|
3429
|
+
case 528: if(this.gr([])) { this.classifyImplicitName( $.expr.scope ? 'FromElemImplicit' : 'FromImplicit', $.expr ); } continue;
|
|
3406
3430
|
default:
|
|
3407
3431
|
this.attachLocation( $.expr );
|
|
3408
3432
|
return this.exit_();
|
|
3409
3433
|
}
|
|
3410
3434
|
}
|
|
3411
3435
|
fromPath($,$next) {
|
|
3412
|
-
this.rule_(
|
|
3436
|
+
this.rule_(530,$next);
|
|
3413
3437
|
let pathItem;
|
|
3414
3438
|
for(;;) switch(this.s) {
|
|
3415
|
-
case
|
|
3416
|
-
case
|
|
3417
|
-
case '(': case '[': if(this.fromArgumentsAndFilter({pathStep:pathItem},
|
|
3418
|
-
default: this.s=
|
|
3439
|
+
case 530: if(this.mi(531,$.category)) { $.table.path.push( pathItem = this.identAst() ); } continue;
|
|
3440
|
+
case 531: switch(this.l()) {
|
|
3441
|
+
case '(': case '[': if(this.fromArgumentsAndFilter({pathStep:pathItem},532)) { pathItem = null; } continue;
|
|
3442
|
+
default: this.s=532; continue;
|
|
3419
3443
|
}
|
|
3420
|
-
case
|
|
3421
|
-
case '.': if(this.c(
|
|
3444
|
+
case 532: switch(this.l()) {
|
|
3445
|
+
case '.': if(this.c(533)) { if (!pathItem && !$.table.scope) {
|
|
3422
3446
|
$.table.scope = $.table.path.length; $.category = 'ref';
|
|
3423
3447
|
this.warning( 'syntax-invalid-path-separator', this.lb(),
|
|
3424
3448
|
{ '#': 'dot', code: '.', newcode: ':' } );
|
|
3425
3449
|
} } continue;
|
|
3426
3450
|
default: this.gr(['Id','as']); continue;
|
|
3427
3451
|
}
|
|
3428
|
-
case
|
|
3429
|
-
case
|
|
3430
|
-
case '(': case '[': if(this.fromArgumentsAndFilter({pathStep:pathItem},
|
|
3431
|
-
default: this.s=
|
|
3452
|
+
case 533: if(this.miA(534,$.category)) { $.table.path.push( pathItem = this.identAst() ); } continue;
|
|
3453
|
+
case 534: switch(this.l()) {
|
|
3454
|
+
case '(': case '[': if(this.fromArgumentsAndFilter({pathStep:pathItem},532)) { pathItem = null; } continue;
|
|
3455
|
+
default: this.s=532; continue;
|
|
3432
3456
|
}
|
|
3433
3457
|
default:
|
|
3434
3458
|
this.attachLocation( $.table.path );
|
|
@@ -3436,27 +3460,27 @@ this.warning( 'syntax-invalid-path-separator', this.lb(),
|
|
|
3436
3460
|
}
|
|
3437
3461
|
}
|
|
3438
3462
|
fromArgumentsAndFilter($,$next) {
|
|
3439
|
-
this.rule_(
|
|
3463
|
+
this.rule_(536,$next);
|
|
3440
3464
|
for(;;) switch(this.s) {
|
|
3441
|
-
case
|
|
3442
|
-
case '(': if(this.c(
|
|
3443
|
-
default: this.s=
|
|
3465
|
+
case 536: switch(this.l()) {
|
|
3466
|
+
case '(': if(this.c(537)) { $.pathStep.args = this.createDict(); $.pathStep.$syntax = ':'; } continue;
|
|
3467
|
+
default: this.s=541; continue;
|
|
3444
3468
|
}
|
|
3445
|
-
case
|
|
3446
|
-
case 'Id': this.s=
|
|
3469
|
+
case 537: switch(this.lk()) {
|
|
3470
|
+
case 'Id': this.s=538; continue;
|
|
3447
3471
|
default: this.ei(); continue;
|
|
3448
3472
|
}
|
|
3449
|
-
case
|
|
3450
|
-
case 'Id': this.fromNamedArgument($,
|
|
3451
|
-
default: this.s=
|
|
3473
|
+
case 538: switch(this.l()) {
|
|
3474
|
+
case 'Id': this.fromNamedArgument($,539); continue;
|
|
3475
|
+
default: this.s=540; continue;
|
|
3452
3476
|
}
|
|
3453
|
-
case
|
|
3454
|
-
case ',': this.c(
|
|
3455
|
-
case ')': this.s=
|
|
3477
|
+
case 539: switch(this.l()) {
|
|
3478
|
+
case ',': this.c(538); continue;
|
|
3479
|
+
case ')': this.s=540; continue;
|
|
3456
3480
|
default: this.e(); continue;
|
|
3457
3481
|
}
|
|
3458
|
-
case
|
|
3459
|
-
case
|
|
3482
|
+
case 540: this.m(541,')'); continue;
|
|
3483
|
+
case 541: switch(this.l()) {
|
|
3460
3484
|
case '[': this.cardinalityAndFilter($,0); continue;
|
|
3461
3485
|
default: this.gr(['Id','.','as']); continue;
|
|
3462
3486
|
}
|
|
@@ -3464,219 +3488,220 @@ this.warning( 'syntax-invalid-path-separator', this.lb(),
|
|
|
3464
3488
|
}
|
|
3465
3489
|
}
|
|
3466
3490
|
fromNamedArgument($,$next) {
|
|
3467
|
-
this.rule_(
|
|
3491
|
+
this.rule_(543,$next);
|
|
3468
3492
|
let name; let expr; let _;
|
|
3469
3493
|
for(;;) switch(this.s) {
|
|
3470
|
-
case
|
|
3471
|
-
case
|
|
3472
|
-
case
|
|
3494
|
+
case 543: if(this.mi(544,'paramname')) name=this.lb(); continue;
|
|
3495
|
+
case 544: this.m(545,':'); continue;
|
|
3496
|
+
case 545: if(this.expression(_={},0)) {expr=_.expr; this.addDef( expr, $.pathStep, 'args', 0, this.identAst( name ) ); } continue;
|
|
3473
3497
|
default: return this.exit_();
|
|
3474
3498
|
}
|
|
3475
3499
|
}
|
|
3476
3500
|
cardinalityAndFilter($,$next) {
|
|
3477
|
-
this.rule_(
|
|
3501
|
+
this.rule_(547,$next);
|
|
3478
3502
|
for(;;) switch(this.s) {
|
|
3479
|
-
case
|
|
3480
|
-
case
|
|
3481
|
-
case 'Number': if(this.gc(
|
|
3482
|
-
default: this.s=
|
|
3483
|
-
}
|
|
3484
|
-
case
|
|
3485
|
-
case
|
|
3486
|
-
case
|
|
3503
|
+
case 547: this.m(548,'['); continue;
|
|
3504
|
+
case 548: switch(this.l()) {
|
|
3505
|
+
case 'Number': if(this.gc(550,'beforeColon') && this.c(549)) { $.pathStep.cardinality = { targetMax: this.unsignedIntegerLiteral(), location: this.lb().location }; } continue;
|
|
3506
|
+
default: this.s=550; continue;
|
|
3507
|
+
}
|
|
3508
|
+
case 549: this.m(550,':'); continue;
|
|
3509
|
+
case 550: this.filterClauses({pathStep:$.pathStep},551); continue;
|
|
3510
|
+
case 551: this.m(0,']'); continue;
|
|
3487
3511
|
default: return this.exit_();
|
|
3488
3512
|
}
|
|
3489
3513
|
}
|
|
3490
3514
|
filterClauses($,$next) {
|
|
3491
|
-
this.rule_(
|
|
3515
|
+
this.rule_(553,$next);
|
|
3492
3516
|
let cond; let _;
|
|
3493
3517
|
for(;;) switch(this.s) {
|
|
3494
|
-
case
|
|
3495
|
-
case 'where': this.ck(
|
|
3496
|
-
case 'Id': case '#': case '(': case '+': case '-': case ':': case '?': case 'not': case 'case': case 'cast': case 'null': case 'true': case 'false': case 'Number': case 'String': case 'exists': case 'QuotedLiteral': this.s=
|
|
3497
|
-
case 'group': case 'limit': case 'order': case 'having': this.gP(
|
|
3498
|
-
default: this.gi(
|
|
3499
|
-
}
|
|
3500
|
-
case
|
|
3501
|
-
case
|
|
3502
|
-
case 'group': this.s=
|
|
3503
|
-
default: this.s=
|
|
3504
|
-
}
|
|
3505
|
-
case
|
|
3506
|
-
case
|
|
3507
|
-
case 'having': if(this.ck(
|
|
3508
|
-
default: this.s=
|
|
3509
|
-
}
|
|
3510
|
-
case
|
|
3511
|
-
case
|
|
3512
|
-
case 'limit': case 'order': this.s=
|
|
3518
|
+
case 553: switch(this.lk()) {
|
|
3519
|
+
case 'where': this.ck(554); continue;
|
|
3520
|
+
case 'Id': case '#': case '(': case '+': case '-': case ':': case '?': case 'not': case 'case': case 'cast': case 'null': case 'true': case 'false': case 'Number': case 'String': case 'exists': case 'QuotedLiteral': this.s=554; continue;
|
|
3521
|
+
case 'group': case 'limit': case 'order': case 'having': this.gP(555); continue;
|
|
3522
|
+
default: this.gi(555); continue;
|
|
3523
|
+
}
|
|
3524
|
+
case 554: if(this.condition(_={},555)) {cond=_.expr; $.pathStep.where = cond; } continue;
|
|
3525
|
+
case 555: switch(this.lk()) {
|
|
3526
|
+
case 'group': this.s=556;{ this.csnParseOnly('syntax-unexpected-sql-clause', 1, { keyword: 'group by' }); } continue;
|
|
3527
|
+
default: this.s=557; continue;
|
|
3528
|
+
}
|
|
3529
|
+
case 556: this.groupByClause({query:$.pathStep},557); continue;
|
|
3530
|
+
case 557: switch(this.lk()) {
|
|
3531
|
+
case 'having': if(this.ck(558)) { this.csnParseOnly('syntax-unexpected-sql-clause', -1, { keyword: 'having' }); } continue;
|
|
3532
|
+
default: this.s=559; continue;
|
|
3533
|
+
}
|
|
3534
|
+
case 558: if(this.condition(_={},559)) {cond=_.expr; $.pathStep.having = cond; } continue;
|
|
3535
|
+
case 559: switch(this.lk()) {
|
|
3536
|
+
case 'limit': case 'order': this.s=560;{ if (this.lk() === 'limit') this.csnParseOnly('syntax-unexpected-sql-clause', 0, { keyword: 'limit' } ); else this.csnParseOnly('syntax-unexpected-sql-clause', 1, { keyword: 'order by' } ); } continue;
|
|
3513
3537
|
default: this.gr([']']); continue;
|
|
3514
3538
|
}
|
|
3515
|
-
case
|
|
3539
|
+
case 560: this.orderByLimitOffset({query:$.pathStep},0); continue;
|
|
3516
3540
|
default: return this.exit_();
|
|
3517
3541
|
}
|
|
3518
3542
|
}
|
|
3519
3543
|
excludingClause($,$next) {
|
|
3520
|
-
this.rule_(
|
|
3544
|
+
this.rule_(562,$next);
|
|
3521
3545
|
for(;;) switch(this.s) {
|
|
3522
|
-
case
|
|
3523
|
-
case
|
|
3524
|
-
case
|
|
3525
|
-
case 'Id': this.s=
|
|
3546
|
+
case 562: this.mk(563,'excluding'); continue;
|
|
3547
|
+
case 563: if(this.m(564,'{')) { $.query.excludingDict = this.createDict(); } continue;
|
|
3548
|
+
case 564: switch(this.l()) {
|
|
3549
|
+
case 'Id': this.s=565; continue;
|
|
3526
3550
|
default: this.e(); continue;
|
|
3527
3551
|
}
|
|
3528
|
-
case
|
|
3529
|
-
case 'Id': if(this.ciA(
|
|
3530
|
-
default: this.s=
|
|
3552
|
+
case 565: switch(this.l()) {
|
|
3553
|
+
case 'Id': if(this.ciA(566,'ref')) { this.addDef( { location: this.lb().location }, $.query, 'excludingDict', '', this.identAst() ); } continue;
|
|
3554
|
+
default: this.s=567; continue;
|
|
3531
3555
|
}
|
|
3532
|
-
case
|
|
3533
|
-
case ',': this.c(
|
|
3534
|
-
case '}': this.s=
|
|
3556
|
+
case 566: switch(this.l()) {
|
|
3557
|
+
case ',': this.c(565); continue;
|
|
3558
|
+
case '}': this.s=567; continue;
|
|
3535
3559
|
default: this.e(); continue;
|
|
3536
3560
|
}
|
|
3537
|
-
case
|
|
3561
|
+
case 567: if(this.m(0,'}')) {this.afterBrace(); this.finalizeDictOrArray( $.query.excludingDict ); } continue;
|
|
3538
3562
|
default: return this.exit_();
|
|
3539
3563
|
}
|
|
3540
3564
|
}
|
|
3541
3565
|
selectItemsList($,$next) {
|
|
3542
|
-
this.rule_(
|
|
3566
|
+
this.rule_(569,$next);
|
|
3543
3567
|
for(;;) switch(this.s) {
|
|
3544
|
-
case
|
|
3545
|
-
case
|
|
3546
|
-
case '*': if(this.c(
|
|
3547
|
-
case 'Id': case '#': case '(': case '+': case '-': case ':': case '?': case '@': case '{': case 'Number': case 'String': case 'QuotedLiteral': this.selectItemDef({columns:$.query.columns},
|
|
3548
|
-
default: this.s=
|
|
3549
|
-
}
|
|
3550
|
-
case
|
|
3551
|
-
case ',': this.c(
|
|
3552
|
-
case '}': this.s=
|
|
3568
|
+
case 569: if(this.m(570,'{')) {this.inSelectItem(0,'top'); $.query.columns = this.createArray( $.start ); } continue;
|
|
3569
|
+
case 570: switch(this.l()) {
|
|
3570
|
+
case '*': if(this.c(571)) { $.query.columns.push( this.valueWithLocation() ); } continue;
|
|
3571
|
+
case 'Id': case '#': case '(': case '+': case '-': case ':': case '?': case '@': case '{': case 'Number': case 'String': case 'QuotedLiteral': this.selectItemDef({columns:$.query.columns},571); continue;
|
|
3572
|
+
default: this.s=572; continue;
|
|
3573
|
+
}
|
|
3574
|
+
case 571: switch(this.l()) {
|
|
3575
|
+
case ',': this.c(570); continue;
|
|
3576
|
+
case '}': this.s=572; continue;
|
|
3553
3577
|
default: this.e(); continue;
|
|
3554
3578
|
}
|
|
3555
|
-
case
|
|
3579
|
+
case 572: if(this.m(0,'}')) {this.afterBrace(); this.finalizeDictOrArray( $.query.columns ); } continue;
|
|
3556
3580
|
default: return this.exit_();
|
|
3557
3581
|
}
|
|
3558
3582
|
}
|
|
3559
3583
|
nestedSelectItemsList($,$next) {
|
|
3560
|
-
this.rule_(
|
|
3584
|
+
this.rule_(574,$next);
|
|
3561
3585
|
for(;;) switch(this.s) {
|
|
3562
|
-
case
|
|
3563
|
-
case
|
|
3564
|
-
case '*': if(this.c(
|
|
3565
|
-
case 'Id': case '#': case '(': case '+': case '-': case ':': case '?': case '@': case '{': case 'Number': case 'String': case 'QuotedLiteral': this.selectItemDef({columns:$.query[$.clause]},
|
|
3566
|
-
default: this.s=
|
|
3567
|
-
}
|
|
3568
|
-
case
|
|
3569
|
-
case ',': this.c(
|
|
3570
|
-
case '}': this.s=
|
|
3586
|
+
case 574: if(this.m(575,'{')) {this.inSelectItem(0,'nested'); $.query[$.clause] = this.createArray(); } continue;
|
|
3587
|
+
case 575: switch(this.l()) {
|
|
3588
|
+
case '*': if(this.c(576)) { $.query[$.clause].push( this.valueWithLocation() ); } continue;
|
|
3589
|
+
case 'Id': case '#': case '(': case '+': case '-': case ':': case '?': case '@': case '{': case 'Number': case 'String': case 'QuotedLiteral': this.selectItemDef({columns:$.query[$.clause]},576); continue;
|
|
3590
|
+
default: this.s=577; continue;
|
|
3591
|
+
}
|
|
3592
|
+
case 576: switch(this.l()) {
|
|
3593
|
+
case ',': this.c(575); continue;
|
|
3594
|
+
case '}': this.s=577; continue;
|
|
3571
3595
|
default: this.e(); continue;
|
|
3572
3596
|
}
|
|
3573
|
-
case
|
|
3597
|
+
case 577: if(this.m(0,'}')) {this.afterBrace(); this.finalizeDictOrArray( $.query[$.clause] ); } continue;
|
|
3574
3598
|
default: return this.exit_();
|
|
3575
3599
|
}
|
|
3576
3600
|
}
|
|
3577
3601
|
selectItemDef($,$next) {
|
|
3578
|
-
this.rule_(
|
|
3602
|
+
this.rule_(579,$next);
|
|
3579
3603
|
let art=new XsnArtifact(); let alias;
|
|
3580
3604
|
let expr; let as; let target; let cond; let assoc; let card; let _;
|
|
3581
3605
|
{ $.columns.push( art );
|
|
3582
3606
|
this.docComment( art ); }
|
|
3583
3607
|
for(;;) switch(this.s) {
|
|
3584
|
-
case
|
|
3585
|
-
case '@': this.annoAssignCol({art},
|
|
3586
|
-
default: this.s=
|
|
3608
|
+
case 579: switch(this.l()) {
|
|
3609
|
+
case '@': this.annoAssignCol({art},579); continue;
|
|
3610
|
+
default: this.s=580; continue;
|
|
3587
3611
|
}
|
|
3588
|
-
case
|
|
3589
|
-
case 'virtual': if(this.lP(['Id','#','(','+','-',':','?','{','key','not','case','cast','null','true','false','Number','String','exists','QuotedLiteral']) && this.gc(
|
|
3590
|
-
default: this.s=
|
|
3612
|
+
case 580: switch(this.lk()) {
|
|
3613
|
+
case 'virtual': if(this.lP(['Id','#','(','+','-',':','?','{','key','not','case','cast','null','true','false','Number','String','exists','QuotedLiteral']) && this.gc(581,'modifierRestriction') && this.ck(581)) { art.virtual = this.valueWithLocation( true ); } continue;
|
|
3614
|
+
default: this.s=581; continue;
|
|
3591
3615
|
}
|
|
3592
|
-
case
|
|
3593
|
-
case 'key': if(this.gc(
|
|
3594
|
-
default: this.s=
|
|
3616
|
+
case 581: switch(this.lk()) {
|
|
3617
|
+
case 'key': if(this.gc(582,'modifierRestriction') && this.ck(582)) { art.key = this.valueWithLocation( true ); } continue;
|
|
3618
|
+
default: this.s=582; continue;
|
|
3595
3619
|
}
|
|
3596
|
-
case
|
|
3597
|
-
case 'Id': case '#': case '(': case '+': case '-': case ':': case '?': case 'Number': case 'String': case 'QuotedLiteral': if(this.expression(_={},
|
|
3598
|
-
case '{': this.nestedSelectItemsList({query:art,clause:'expand'},
|
|
3620
|
+
case 582: switch(this.l()) {
|
|
3621
|
+
case 'Id': case '#': case '(': case '+': case '-': case ':': case '?': case 'Number': case 'String': case 'QuotedLiteral': if(this.expression(_={},583)) {expr=_.expr; art.value = expr; } continue;
|
|
3622
|
+
case '{': this.nestedSelectItemsList({query:art,clause:'expand'},590); continue;
|
|
3599
3623
|
default: this.e(); continue;
|
|
3600
3624
|
}
|
|
3601
|
-
case
|
|
3602
|
-
case 'as': if(this.ck(
|
|
3603
|
-
case 'Id': if(this.ci(
|
|
3604
|
-
default: if(this.gi(
|
|
3625
|
+
case 583: switch(this.lk()) {
|
|
3626
|
+
case 'as': if(this.ck(584)) as=this.lb(); continue;
|
|
3627
|
+
case 'Id': if(this.ci(585,'ItemAlias')) { art.name = this.fragileAlias( true ); } continue;
|
|
3628
|
+
default: if(this.gi(585)) { alias = this.classifyImplicitName( 'ItemImplicit', expr ); } continue;
|
|
3605
3629
|
}
|
|
3606
|
-
case
|
|
3607
|
-
case
|
|
3608
|
-
case '{': this.s=
|
|
3609
|
-
case '.': if(this.c(
|
|
3630
|
+
case 584: if(this.mi(585,'ItemAlias')) { art.name = this.identAst(); } continue;
|
|
3631
|
+
case 585: switch(this.l()) {
|
|
3632
|
+
case '{': this.s=586;{ this.reportExpandInline( art, false ); } continue;
|
|
3633
|
+
case '.': if(this.c(588)) { this.reportUnexpectedSpace( this.lb(), this.la().location, true );
|
|
3634
|
+
this.reportExpandInline( art, as || true );
|
|
3610
3635
|
if (alias) alias.token.parsedAs = alias.parsedAs; } continue;
|
|
3611
|
-
default: this.s=
|
|
3636
|
+
default: this.s=593; continue;
|
|
3612
3637
|
}
|
|
3613
|
-
case
|
|
3614
|
-
case
|
|
3615
|
-
case 'excluding': this.excludingClause({query:art},
|
|
3616
|
-
default: this.s=
|
|
3638
|
+
case 586: this.nestedSelectItemsList({query:art,clause:'expand'},587); continue;
|
|
3639
|
+
case 587: switch(this.lk()) {
|
|
3640
|
+
case 'excluding': this.excludingClause({query:art},593); continue;
|
|
3641
|
+
default: this.s=593; continue;
|
|
3617
3642
|
}
|
|
3618
|
-
case
|
|
3619
|
-
case '{': this.nestedSelectItemsList({query:art,clause:'inline'},
|
|
3620
|
-
case '*': if(this.c(
|
|
3643
|
+
case 588: switch(this.l()) {
|
|
3644
|
+
case '{': this.nestedSelectItemsList({query:art,clause:'inline'},589); continue;
|
|
3645
|
+
case '*': if(this.c(593)) { art.inline = [ this.valueWithLocation() ]; } continue;
|
|
3621
3646
|
default: this.e(); continue;
|
|
3622
3647
|
}
|
|
3623
|
-
case
|
|
3624
|
-
case 'excluding': this.excludingClause({query:art},
|
|
3625
|
-
default: this.s=
|
|
3648
|
+
case 589: switch(this.lk()) {
|
|
3649
|
+
case 'excluding': this.excludingClause({query:art},593); continue;
|
|
3650
|
+
default: this.s=593; continue;
|
|
3626
3651
|
}
|
|
3627
|
-
case
|
|
3628
|
-
case 'excluding': this.excludingClause({query:art},
|
|
3629
|
-
default: this.s=
|
|
3630
|
-
}
|
|
3631
|
-
case
|
|
3632
|
-
case
|
|
3633
|
-
case
|
|
3634
|
-
case
|
|
3635
|
-
case '@': this.annoAssignMid({art},
|
|
3636
|
-
default: this.s=
|
|
3637
|
-
}
|
|
3638
|
-
case
|
|
3639
|
-
case ':': this.c(
|
|
3652
|
+
case 590: switch(this.lk()) {
|
|
3653
|
+
case 'excluding': this.excludingClause({query:art},591); continue;
|
|
3654
|
+
default: this.s=591; continue;
|
|
3655
|
+
}
|
|
3656
|
+
case 591: this.mk(592,'as'); continue;
|
|
3657
|
+
case 592: if(this.mi(593,'ItemAlias')) { art.name = this.identAst(); } continue;
|
|
3658
|
+
case 593: this.s=594;{ this.docComment( art ); } continue;
|
|
3659
|
+
case 594: switch(this.l()) {
|
|
3660
|
+
case '@': this.annoAssignMid({art},594); continue;
|
|
3661
|
+
default: this.s=595; continue;
|
|
3662
|
+
}
|
|
3663
|
+
case 595: switch(this.l()) {
|
|
3664
|
+
case ':': this.c(596); continue;
|
|
3640
3665
|
default: this.gr([',']); continue;
|
|
3641
3666
|
}
|
|
3642
|
-
case
|
|
3643
|
-
case 'type': this.lP() && this.typeTypeOf({art},
|
|
3644
|
-
case 'localized': if(this.ckP(
|
|
3645
|
-
case 'Id': this.s=
|
|
3646
|
-
case 'redirected': this.ckP(
|
|
3647
|
-
case 'association': if(this.ckP(
|
|
3648
|
-
case 'composition': if(this.ckP(
|
|
3667
|
+
case 596: switch(this.lk()) {
|
|
3668
|
+
case 'type': this.lP() && this.typeTypeOf({art},610); continue;
|
|
3669
|
+
case 'localized': if(this.ckP(597,['Id'])) { art.localized = this.valueWithLocation( true ); } continue;
|
|
3670
|
+
case 'Id': this.s=597; continue;
|
|
3671
|
+
case 'redirected': this.ckP(598,['to']); continue;
|
|
3672
|
+
case 'association': if(this.ckP(602,['[','to'])) {assoc=this.lb(); this.associationInSelectItem( art ); } continue;
|
|
3673
|
+
case 'composition': if(this.ckP(604,['[','of'])) {assoc=this.lb(); this.associationInSelectItem( art ); } continue;
|
|
3649
3674
|
default: this.ei(); continue;
|
|
3650
3675
|
}
|
|
3651
|
-
case
|
|
3652
|
-
case
|
|
3653
|
-
case
|
|
3654
|
-
case
|
|
3655
|
-
case 'on': this.ck(
|
|
3656
|
-
case '{': this.foreignKeysBlock({art},
|
|
3676
|
+
case 597: this.typeRefOptArgs({art},610); continue;
|
|
3677
|
+
case 598: this.mk(599,'to'); continue;
|
|
3678
|
+
case 599: if(this.simplePath(_={category:'artref'},600)) {target=_.ref; art.target = target; } continue;
|
|
3679
|
+
case 600: switch(this.lk()) {
|
|
3680
|
+
case 'on': this.ck(601); continue;
|
|
3681
|
+
case '{': this.foreignKeysBlock({art},610); continue;
|
|
3682
|
+
default: this.s=610; continue;
|
|
3683
|
+
}
|
|
3684
|
+
case 601: if(this.condition(_={},610)) {cond=_.expr; art.on = cond; } continue;
|
|
3685
|
+
case 602: switch(this.l()) {
|
|
3686
|
+
case '[': this.cardinality({art},603); continue;
|
|
3687
|
+
default: this.s=603; continue;
|
|
3688
|
+
}
|
|
3689
|
+
case 603: this.mk(606,'to'); continue;
|
|
3690
|
+
case 604: switch(this.l()) {
|
|
3691
|
+
case '[': this.cardinality({art},605); continue;
|
|
3692
|
+
default: this.s=605; continue;
|
|
3693
|
+
}
|
|
3694
|
+
case 605: this.mk(606,'of'); continue;
|
|
3695
|
+
case 606: switch(this.lk()) {
|
|
3696
|
+
case 'one': case 'many': if(this.ckP(607,['Id'])) card=this.lb(); continue;
|
|
3657
3697
|
default: this.s=607; continue;
|
|
3658
3698
|
}
|
|
3659
|
-
case
|
|
3660
|
-
case
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
case 601: switch(this.l()) {
|
|
3666
|
-
case '[': this.cardinality({art},602); continue;
|
|
3667
|
-
default: this.s=602; continue;
|
|
3668
|
-
}
|
|
3669
|
-
case 602: this.mk(603,'of'); continue;
|
|
3670
|
-
case 603: switch(this.lk()) {
|
|
3671
|
-
case 'one': case 'many': if(this.ckP(604,['Id'])) card=this.lb(); continue;
|
|
3672
|
-
default: this.s=604; continue;
|
|
3673
|
-
}
|
|
3674
|
-
case 604: if(this.simplePath(_={category:'artref'},605)) {target=_.ref; this.setAssocAndComposition( art, assoc, card, target ); } continue;
|
|
3675
|
-
case 605: this.mk(606,'on'); continue;
|
|
3676
|
-
case 606: if(this.condition(_={},607)) {expr=_.expr; art.on = expr; } continue;
|
|
3677
|
-
case 607: this.s=608;{ this.docComment( art ); } continue;
|
|
3678
|
-
case 608: switch(this.l()) {
|
|
3679
|
-
case '@': this.annoAssignStd({art},608); continue;
|
|
3699
|
+
case 607: if(this.simplePath(_={category:'artref'},608)) {target=_.ref; this.setAssocAndComposition( art, assoc, card, target ); } continue;
|
|
3700
|
+
case 608: this.mk(609,'on'); continue;
|
|
3701
|
+
case 609: if(this.condition(_={},610)) {expr=_.expr; art.on = expr; } continue;
|
|
3702
|
+
case 610: this.s=611;{ this.docComment( art ); } continue;
|
|
3703
|
+
case 611: switch(this.l()) {
|
|
3704
|
+
case '@': this.annoAssignStd({art},611); continue;
|
|
3680
3705
|
default: this.gr([',']); continue;
|
|
3681
3706
|
}
|
|
3682
3707
|
default:
|
|
@@ -3685,91 +3710,91 @@ if (alias) alias.token.parsedAs = alias.parsedAs; } continue;
|
|
|
3685
3710
|
}
|
|
3686
3711
|
}
|
|
3687
3712
|
whereGroupByHaving($,$next) {
|
|
3688
|
-
this.rule_(
|
|
3713
|
+
this.rule_(613,$next);
|
|
3689
3714
|
let cond; let _;
|
|
3690
3715
|
for(;;) switch(this.s) {
|
|
3691
|
-
case
|
|
3692
|
-
case 'where': this.ck(
|
|
3693
|
-
default: this.s=
|
|
3716
|
+
case 613: switch(this.lk()) {
|
|
3717
|
+
case 'where': this.ck(614); continue;
|
|
3718
|
+
default: this.s=615; continue;
|
|
3694
3719
|
}
|
|
3695
|
-
case
|
|
3696
|
-
case
|
|
3697
|
-
case 'group': this.groupByClause($,
|
|
3698
|
-
default: this.s=
|
|
3720
|
+
case 614: if(this.condition(_={},615)) {cond=_.expr; $.query.where = cond; } continue;
|
|
3721
|
+
case 615: switch(this.lk()) {
|
|
3722
|
+
case 'group': this.groupByClause($,616); continue;
|
|
3723
|
+
default: this.s=616; continue;
|
|
3699
3724
|
}
|
|
3700
|
-
case
|
|
3701
|
-
case 'having': this.ck(
|
|
3725
|
+
case 616: switch(this.lk()) {
|
|
3726
|
+
case 'having': this.ck(617); continue;
|
|
3702
3727
|
default: this.gr(['limit','order']); continue;
|
|
3703
3728
|
}
|
|
3704
|
-
case
|
|
3729
|
+
case 617: if(this.condition(_={},0)) {cond=_.expr; $.query.having = cond; } continue;
|
|
3705
3730
|
default: return this.exit_();
|
|
3706
3731
|
}
|
|
3707
3732
|
}
|
|
3708
3733
|
groupByClause($,$next) {
|
|
3709
|
-
this.rule_(
|
|
3734
|
+
this.rule_(619,$next);
|
|
3710
3735
|
let expr; let _;
|
|
3711
3736
|
for(;;) switch(this.s) {
|
|
3712
|
-
case
|
|
3713
|
-
case
|
|
3714
|
-
case
|
|
3715
|
-
case
|
|
3716
|
-
case ',': this.c(
|
|
3737
|
+
case 619: this.mk(620,'group'); continue;
|
|
3738
|
+
case 620: this.mk(621,'by'); continue;
|
|
3739
|
+
case 621: if(this.expression(_={},622)) {expr=_.expr; $.query.groupBy = [ expr ]; } continue;
|
|
3740
|
+
case 622: switch(this.l()) {
|
|
3741
|
+
case ',': this.c(623); continue;
|
|
3717
3742
|
default: this.gr(['limit','order','having']); continue;
|
|
3718
3743
|
}
|
|
3719
|
-
case
|
|
3744
|
+
case 623: if(this.expression(_={},622)) {expr=_.expr; $.query.groupBy.push( expr ); } continue;
|
|
3720
3745
|
default: return this.exit_();
|
|
3721
3746
|
}
|
|
3722
3747
|
}
|
|
3723
3748
|
orderByLimitOffset($,$next) {
|
|
3724
|
-
this.rule_(
|
|
3749
|
+
this.rule_(625,$next);
|
|
3725
3750
|
let expr; let _;
|
|
3726
3751
|
for(;;) switch(this.s) {
|
|
3727
|
-
case
|
|
3728
|
-
case 'order': this.orderByClause($,
|
|
3729
|
-
default: this.s=
|
|
3752
|
+
case 625: switch(this.lk()) {
|
|
3753
|
+
case 'order': this.orderByClause($,626); continue;
|
|
3754
|
+
default: this.s=626; continue;
|
|
3730
3755
|
}
|
|
3731
|
-
case
|
|
3732
|
-
case 'limit': this.ck(
|
|
3756
|
+
case 626: switch(this.lk()) {
|
|
3757
|
+
case 'limit': this.ck(627); continue;
|
|
3733
3758
|
default: this.gr([]); continue;
|
|
3734
3759
|
}
|
|
3735
|
-
case
|
|
3736
|
-
case
|
|
3737
|
-
case 'offset': this.ck(
|
|
3760
|
+
case 627: if(this.expression(_={},628)) {expr=_.expr; $.query.limit = { rows: expr }; } continue;
|
|
3761
|
+
case 628: switch(this.lk()) {
|
|
3762
|
+
case 'offset': this.ck(629); continue;
|
|
3738
3763
|
default: this.gr([]); continue;
|
|
3739
3764
|
}
|
|
3740
|
-
case
|
|
3765
|
+
case 629: if(this.expression(_={},0)) {expr=_.expr; $.query.limit.offset = expr; } continue;
|
|
3741
3766
|
default: return this.exit_();
|
|
3742
3767
|
}
|
|
3743
3768
|
}
|
|
3744
3769
|
orderByClause($,$next) {
|
|
3745
|
-
this.rule_(
|
|
3770
|
+
this.rule_(631,$next);
|
|
3746
3771
|
let expr; let _;
|
|
3747
3772
|
for(;;) switch(this.s) {
|
|
3748
|
-
case
|
|
3749
|
-
case
|
|
3750
|
-
case
|
|
3751
|
-
case
|
|
3752
|
-
case ',': this.c(
|
|
3773
|
+
case 631: this.mk(632,'order'); continue;
|
|
3774
|
+
case 632: this.mk(633,'by'); continue;
|
|
3775
|
+
case 633: if(this.orderByExpression(_={},634)) {expr=_.expr; $.query.orderBy = [ expr ]; } continue;
|
|
3776
|
+
case 634: switch(this.l()) {
|
|
3777
|
+
case ',': this.c(635); continue;
|
|
3753
3778
|
default: this.gr(['limit']); continue;
|
|
3754
3779
|
}
|
|
3755
|
-
case
|
|
3780
|
+
case 635: if(this.orderByExpression(_={},634)) {expr=_.expr; $.query.orderBy.push( expr ); } continue;
|
|
3756
3781
|
default: return this.exit_();
|
|
3757
3782
|
}
|
|
3758
3783
|
}
|
|
3759
3784
|
orderByExpression($,$next) {
|
|
3760
3785
|
$.expr??=undefined;
|
|
3761
|
-
this.rule_(
|
|
3786
|
+
this.rule_(637,$next);
|
|
3762
3787
|
for(;;) switch(this.s) {
|
|
3763
|
-
case
|
|
3764
|
-
case
|
|
3765
|
-
case 'asc': case 'desc': if(this.ck(
|
|
3766
|
-
default: this.s=
|
|
3788
|
+
case 637: this.expression($,638); continue;
|
|
3789
|
+
case 638: switch(this.lk()) {
|
|
3790
|
+
case 'asc': case 'desc': if(this.ck(639)) { $.expr.sort = this.valueWithLocation(); } continue;
|
|
3791
|
+
default: this.s=639; continue;
|
|
3767
3792
|
}
|
|
3768
|
-
case
|
|
3769
|
-
case 'nulls': this.ck(
|
|
3793
|
+
case 639: switch(this.lk()) {
|
|
3794
|
+
case 'nulls': this.ck(640); continue;
|
|
3770
3795
|
default: this.gr([',','limit']); continue;
|
|
3771
3796
|
}
|
|
3772
|
-
case
|
|
3797
|
+
case 640: switch(this.lk()) {
|
|
3773
3798
|
case 'last': case 'first': if(this.ck(0)) { $.expr.nulls = this.valueWithLocation(); } continue;
|
|
3774
3799
|
default: this.e(); continue;
|
|
3775
3800
|
}
|
|
@@ -3778,40 +3803,40 @@ if (alias) alias.token.parsedAs = alias.parsedAs; } continue;
|
|
|
3778
3803
|
}
|
|
3779
3804
|
conditionEOF($,$next) {
|
|
3780
3805
|
$.cond??=undefined;
|
|
3781
|
-
this.rule_(
|
|
3806
|
+
this.rule_(642,$next);
|
|
3782
3807
|
let _;
|
|
3783
3808
|
for(;;) switch(this.s) {
|
|
3784
|
-
case
|
|
3785
|
-
case
|
|
3809
|
+
case 642: if(this.expression(_={},643)) $.cond=_.expr; continue;
|
|
3810
|
+
case 643: this.m(0,'EOF'); continue;
|
|
3786
3811
|
default: return this.exit_();
|
|
3787
3812
|
}
|
|
3788
3813
|
}
|
|
3789
3814
|
condition($,$next) {
|
|
3790
3815
|
$.expr??=undefined;
|
|
3791
|
-
this.rule_(
|
|
3816
|
+
this.rule_(645,$next);
|
|
3792
3817
|
for(;;) switch(this.s) {
|
|
3793
|
-
case
|
|
3818
|
+
case 645: this.expression($,0); continue;
|
|
3794
3819
|
default: return this.exit_();
|
|
3795
3820
|
}
|
|
3796
3821
|
}
|
|
3797
3822
|
valuePath($,$next,$startState) {
|
|
3798
3823
|
$.expr??={ path: [] };
|
|
3799
|
-
this.rule_($startState??
|
|
3824
|
+
this.rule_($startState??647,$next);
|
|
3800
3825
|
let pathItem;
|
|
3801
3826
|
for(;;) switch(this.s) {
|
|
3802
|
-
case
|
|
3803
|
-
case
|
|
3804
|
-
case '(': case '[': this.argumentsAndFilter({pathStep:pathItem},
|
|
3805
|
-
default: this.s=
|
|
3827
|
+
case 647: if(this.mi(648,'ref')) { $.expr.path.push( pathItem = this.identAst() ); } continue;
|
|
3828
|
+
case 648: switch(this.l()) {
|
|
3829
|
+
case '(': case '[': this.argumentsAndFilter({pathStep:pathItem},649); continue;
|
|
3830
|
+
default: this.s=649; continue;
|
|
3806
3831
|
}
|
|
3807
|
-
case
|
|
3808
|
-
case '.': this.gc(0,'isDotForPath') && this.c(
|
|
3832
|
+
case 649: switch(this.l()) {
|
|
3833
|
+
case '.': this.gc(0,'isDotForPath') && this.c(650); continue;
|
|
3809
3834
|
default: this.gr(['*','+','-','/','<','=','>','?','!=','<=','<>','>=','in','is','or','||','and','not','like','between']); continue;
|
|
3810
3835
|
}
|
|
3811
|
-
case
|
|
3812
|
-
case
|
|
3813
|
-
case '(': case '[': if(this.argumentsAndFilter({pathStep:pathItem},
|
|
3814
|
-
default: this.s=
|
|
3836
|
+
case 650: if(this.miA(651,'ref')) { $.expr.path.push( pathItem = this.identAst() ); } continue;
|
|
3837
|
+
case 651: switch(this.l()) {
|
|
3838
|
+
case '(': case '[': if(this.argumentsAndFilter({pathStep:pathItem},649)) { pathItem = null; } continue;
|
|
3839
|
+
default: this.s=649; continue;
|
|
3815
3840
|
}
|
|
3816
3841
|
default:
|
|
3817
3842
|
this.attachLocation( $.expr );
|
|
@@ -3819,143 +3844,143 @@ if (alias) alias.token.parsedAs = alias.parsedAs; } continue;
|
|
|
3819
3844
|
}
|
|
3820
3845
|
}
|
|
3821
3846
|
expression($,$next,$startState) {
|
|
3822
|
-
$.expr??=
|
|
3823
|
-
this.rule_($startState??
|
|
3847
|
+
$.expr??={};
|
|
3848
|
+
this.rule_($startState??653,$next);
|
|
3824
3849
|
let e; let open; let _;
|
|
3825
3850
|
for(;;) switch(this.s) {
|
|
3826
|
-
case
|
|
3827
|
-
case '(': this.expressionOrQueryParens($,
|
|
3828
|
-
case '#': case 'null': case 'true': case 'false': case 'Number': case 'String': case 'QuotedLiteral': this.literalValue($,
|
|
3829
|
-
case ':': if(this.c(
|
|
3830
|
-
case '?': if(this.c(
|
|
3851
|
+
case 653: switch(this.lk()) {
|
|
3852
|
+
case '(': this.expressionOrQueryParens($,654); continue;
|
|
3853
|
+
case '#': case 'null': case 'true': case 'false': case 'Number': case 'String': case 'QuotedLiteral': this.literalValue($,664); continue;
|
|
3854
|
+
case ':': if(this.c(655)) { this.reportUnexpectedSpace(); } continue;
|
|
3855
|
+
case '?': if(this.c(664)) { this.csnParseOnly( 'syntax-unsupported-param', -1, { '#': 'dynamic', code: '?' } );
|
|
3831
3856
|
$.expr = this.attachLocation({ param: this.valueWithLocation(), scope: 'param' }); } continue;
|
|
3832
|
-
case 'Id': if(this.valuePath(_={},
|
|
3833
|
-
case 'new': this.lP() && this.newAndValuePath($,
|
|
3834
|
-
case 'exists': if(this.ck(
|
|
3835
|
-
case 'case': this.caseExpression($,
|
|
3836
|
-
case 'cast': this.castFunction($,
|
|
3837
|
-
case '+': case '-': if(this.
|
|
3838
|
-
case 'not': if(this.
|
|
3857
|
+
case 'Id': if(this.valuePath(_={},657)) {e=_.expr; $.expr = this.valuePathAst( e ); } continue;
|
|
3858
|
+
case 'new': this.lP() && this.newAndValuePath($,664); continue;
|
|
3859
|
+
case 'exists': if(this.ck(660)) { $.expr = this.applyOpToken(); } continue;
|
|
3860
|
+
case 'case': this.caseExpression($,664); continue;
|
|
3861
|
+
case 'cast': this.castFunction($,664); continue;
|
|
3862
|
+
case '+': case '-': if(this.ec('precRight_',30) && this.c(663)) { $.expr = this.applyOpToken(); } continue;
|
|
3863
|
+
case 'not': if(this.ec('precRight_',8) && this.ck(663)) { $.expr = this.applyOpToken(); } continue;
|
|
3839
3864
|
default: this.ei(); continue;
|
|
3840
3865
|
}
|
|
3841
|
-
case
|
|
3842
|
-
case
|
|
3843
|
-
case 'Id': if(this.ciA(
|
|
3844
|
-
case 'Number': if(this.c(
|
|
3866
|
+
case 654: this.s=664;{ $.expr = this.taggedIfQuery( $.expr ); } continue;
|
|
3867
|
+
case 655: switch(this.l()) {
|
|
3868
|
+
case 'Id': if(this.ciA(656,'paramref')) { $.expr = { path: [ this.identAst() ], location: this.startLocation(), scope: 'param' }; } continue;
|
|
3869
|
+
case 'Number': if(this.c(664)) { this.csnParseOnly( 'syntax-unsupported-param', -1, { '#': 'positional', code: ':' + this.lb().text } );
|
|
3845
3870
|
$.expr = this.attachLocation({ param: this.unsignedIntegerLiteral(), scope: 'param' }); } continue;
|
|
3846
3871
|
default: this.e(); continue;
|
|
3847
3872
|
}
|
|
3848
|
-
case
|
|
3849
|
-
case '.': if(this.valuePath($,
|
|
3850
|
-
default: this.s=
|
|
3873
|
+
case 656: switch(this.l()) {
|
|
3874
|
+
case '.': if(this.valuePath($,664,649)) { $.expr = this.valuePathAst( $.expr ); } continue;
|
|
3875
|
+
default: this.s=664;{ this.attachLocation( $.expr ); } continue;
|
|
3851
3876
|
}
|
|
3852
|
-
case
|
|
3853
|
-
case 'over': if(this.
|
|
3854
|
-
default: this.s=
|
|
3877
|
+
case 657: switch(this.lk()) {
|
|
3878
|
+
case 'over': if(this.ck(658)) { this.pushXprToken( $.expr.suffix = [] ); } continue;
|
|
3879
|
+
default: this.s=659; continue;
|
|
3855
3880
|
}
|
|
3856
|
-
case
|
|
3857
|
-
case
|
|
3858
|
-
case
|
|
3859
|
-
case '(': if(this.c(
|
|
3860
|
-
case 'Id': if(this.valuePath(_={},
|
|
3881
|
+
case 658: this.overClause(e={outer:$.expr.suffix},659); continue;
|
|
3882
|
+
case 659: this.s=664;{ this.attachLocation( $.expr ); } continue;
|
|
3883
|
+
case 660: switch(this.l()) {
|
|
3884
|
+
case '(': if(this.c(661)) open=this.lb(); continue;
|
|
3885
|
+
case 'Id': if(this.valuePath(_={},664)) {e=_.expr; e = this.valuePathAst( e ); e.$expected = 'exists';
|
|
3861
3886
|
$.expr.args.push( e ); this.attachLocation( $.expr ); } continue;
|
|
3862
|
-
case '?': if(this.c(
|
|
3887
|
+
case '?': if(this.c(664)) { this.csnParseOnly( 'syntax-unsupported-param', -1, { '#': 'dynamic', code: '?' } );
|
|
3863
3888
|
$.expr.args.push( { param: this.valueWithLocation(), scope: 'param' } ); this.attachLocation( $.expr ); } continue;
|
|
3864
3889
|
default: this.e(); continue;
|
|
3865
3890
|
}
|
|
3866
|
-
case
|
|
3867
|
-
case
|
|
3891
|
+
case 661: if(this.queryExpression(_={},662)) e=_.expr; continue;
|
|
3892
|
+
case 662: if(this.m(664,')')) { $.expr.args.push( this.taggedIfQuery( this.surroundByParens( e, open ) ) );
|
|
3868
3893
|
this.attachLocation( $.expr ); } continue;
|
|
3869
|
-
case
|
|
3870
|
-
case
|
|
3871
|
-
case '*': case '/': if(this.
|
|
3872
|
-
case '+': case '-': if(this.
|
|
3873
|
-
case '||': if(this.
|
|
3874
|
-
case 'and': if(this.
|
|
3875
|
-
case 'or': if(this.
|
|
3876
|
-
case '?': if(this.
|
|
3877
|
-
case '<': case '=': case '>': case '!=': case '<=': case '<>': case '>=': if(this.
|
|
3878
|
-
case 'is': if(this.
|
|
3879
|
-
case 'not': if(this.gc(0,'isNegatedRelation') && this.ck(
|
|
3880
|
-
case 'in': case 'like': case 'between': if(this.
|
|
3894
|
+
case 663: if(this.expression(_={},664)) {e=_.expr; $.expr = this.signedExpression( $.expr, e ); } continue;
|
|
3895
|
+
case 664: switch(this.lk()) {
|
|
3896
|
+
case '*': case '/': if(this.gc(0,'precLeft_',24) && this.c(668)) { $.expr = this.applyOpToken( $.expr, 'nary' ); } continue;
|
|
3897
|
+
case '+': case '-': if(this.gc(0,'precLeft_',22) && this.c(668)) { $.expr = this.applyOpToken( $.expr, 'nary' ); } continue;
|
|
3898
|
+
case '||': if(this.gc(0,'precLeft_',20) && this.c(668)) { $.expr = this.applyOpToken( $.expr, 'nary' ); } continue;
|
|
3899
|
+
case 'and': if(this.gc(0,'precLeft_',4) && this.ck(668)) { $.expr = this.applyOpToken( $.expr, 'nary' ); } continue;
|
|
3900
|
+
case 'or': if(this.gc(0,'precLeft_',2) && this.ck(668)) { $.expr = this.applyOpToken( $.expr, 'nary' ); } continue;
|
|
3901
|
+
case '?': if(this.gc(0,'precLeft_',0) && this.c(665)) { $.expr = this.applyOpToken( $.expr, '?:' ); } continue;
|
|
3902
|
+
case '<': case '=': case '>': case '!=': case '<=': case '<>': case '>=': if(this.gc(0,'precNone_',10) && this.c(667)) { $.expr = this.applyOpToken( $.expr ); } continue;
|
|
3903
|
+
case 'is': if(this.gc(0,'precNone_',10) && this.ck(669)) { $.expr = this.applyOpToken( $.expr ); } continue;
|
|
3904
|
+
case 'not': if(this.gc(0,'isNegatedRelation','10') && this.ck(671)) { $.expr = this.applyOpToken( $.expr ); } continue;
|
|
3905
|
+
case 'in': case 'like': case 'between': if(this.gc(0,'precNone_',10) && this.g(671)) { $.expr = { op: { val: 'ixpr', location: this.la().location }, args: [ $.expr ] }; } continue;
|
|
3881
3906
|
default: this.gr([]); continue;
|
|
3882
3907
|
}
|
|
3883
|
-
case
|
|
3884
|
-
case
|
|
3885
|
-
case
|
|
3886
|
-
case 'all': case 'any': case 'some': if(this.ck(
|
|
3887
|
-
default: this.s=
|
|
3888
|
-
}
|
|
3889
|
-
case
|
|
3890
|
-
case
|
|
3891
|
-
case 'not': if(this.ck(
|
|
3892
|
-
default: this.s=
|
|
3893
|
-
}
|
|
3894
|
-
case
|
|
3895
|
-
case
|
|
3896
|
-
case 'between': if(this.ck(
|
|
3897
|
-
case 'in': if(this.ck(
|
|
3898
|
-
case 'like': if(this.ck(
|
|
3908
|
+
case 665: if(this.expression(_={},666)) {e=_.expr; $.expr.args.push( e ); } continue;
|
|
3909
|
+
case 666: if(this.m(668,':')) { this.pushXprToken( $.expr ); } continue;
|
|
3910
|
+
case 667: switch(this.lk()) {
|
|
3911
|
+
case 'all': case 'any': case 'some': if(this.ck(668)) { this.pushXprToken( $.expr ); } continue;
|
|
3912
|
+
default: this.s=668; continue;
|
|
3913
|
+
}
|
|
3914
|
+
case 668: if(this.expression(_={},679)) {e=_.expr; $.expr.args.push( e ); } continue;
|
|
3915
|
+
case 669: switch(this.lk()) {
|
|
3916
|
+
case 'not': if(this.ck(670)) { this.pushXprToken( $.expr ); } continue;
|
|
3917
|
+
default: this.s=670; continue;
|
|
3918
|
+
}
|
|
3919
|
+
case 670: if(this.mk(679,'null')) { this.pushXprToken( $.expr ); } continue;
|
|
3920
|
+
case 671: switch(this.lk()) {
|
|
3921
|
+
case 'between': if(this.ck(672)) { this.pushXprToken( $.expr ); } continue;
|
|
3922
|
+
case 'in': if(this.ck(675)) { this.pushXprToken( $.expr ); } continue;
|
|
3923
|
+
case 'like': if(this.ck(676)) { this.pushXprToken( $.expr ); } continue;
|
|
3899
3924
|
default: this.e(); continue;
|
|
3900
3925
|
}
|
|
3901
|
-
case
|
|
3902
|
-
case
|
|
3903
|
-
case
|
|
3904
|
-
case
|
|
3905
|
-
case
|
|
3906
|
-
case
|
|
3907
|
-
case 'escape': if(this.
|
|
3908
|
-
default: this.s=
|
|
3909
|
-
}
|
|
3910
|
-
case
|
|
3911
|
-
case
|
|
3926
|
+
case 672: if(this.expression(_={},673)) {e=_.expr; $.expr.args?.push( e ); } continue;
|
|
3927
|
+
case 673: if(this.mk(674,'and')) { this.pushXprToken( $.expr ); } continue;
|
|
3928
|
+
case 674: if(this.expression(_={},679)) {e=_.expr; $.expr.args?.push( e ); } continue;
|
|
3929
|
+
case 675: if(this.expression(_={},679)) {e=_.expr; $.expr.args?.push( this.secureParens( e ) ); } continue;
|
|
3930
|
+
case 676: if(this.expression(_={},677)) {e=_.expr; $.expr.args?.push( e ); } continue;
|
|
3931
|
+
case 677: switch(this.lk()) {
|
|
3932
|
+
case 'escape': if(this.ck(678)) { this.pushXprToken( $.expr ); } continue;
|
|
3933
|
+
default: this.s=679; continue;
|
|
3934
|
+
}
|
|
3935
|
+
case 678: if(this.expression(_={},679)) {e=_.expr; $.expr.args?.push( e ); } continue;
|
|
3936
|
+
case 679: this.s=664;{ this.attachLocation( $.expr ); } continue;
|
|
3912
3937
|
default: return this.exit_();
|
|
3913
3938
|
}
|
|
3914
3939
|
}
|
|
3915
3940
|
expressionOrQueryParens($,$next) {
|
|
3916
3941
|
$.expr??=undefined;
|
|
3917
|
-
this.rule_(
|
|
3942
|
+
this.rule_(681,$next);
|
|
3918
3943
|
for(;;) switch(this.s) {
|
|
3919
|
-
case
|
|
3920
|
-
case
|
|
3921
|
-
case '(': this.expressionOrQueryParens($,
|
|
3922
|
-
case 'Id': case '#': case '+': case '-': case ':': case '?': case 'not': case 'case': case 'cast': case 'null': case 'true': case 'false': case 'Number': case 'String': case 'exists': case 'QuotedLiteral': this.
|
|
3923
|
-
case 'select': this.
|
|
3944
|
+
case 681: if(this.m(682,'(')) {this.queryOnLeft();} continue;
|
|
3945
|
+
case 682: switch(this.lk()) {
|
|
3946
|
+
case '(': this.expressionOrQueryParens($,683); continue;
|
|
3947
|
+
case 'Id': case '#': case '+': case '-': case ':': case '?': case 'not': case 'case': case 'cast': case 'null': case 'true': case 'false': case 'Number': case 'String': case 'exists': case 'QuotedLiteral': if(this.expression($,685)) {this.queryOnLeft(0,'expr');} continue;
|
|
3948
|
+
case 'select': this.queryExpression($,686); continue;
|
|
3924
3949
|
default: this.ei(); continue;
|
|
3925
3950
|
}
|
|
3926
|
-
case
|
|
3927
|
-
case '*': case '+': case '-': case '/': case '<': case '=': case '>': case '?': case '!=': case '<=': case '<>': case '>=': case 'in': case 'is': case 'or': case '||': case 'and': case 'not': case 'like': case 'between': this.
|
|
3928
|
-
case ',': this.
|
|
3929
|
-
case 'limit': case 'minus': case 'order': case 'union': case 'except': case 'intersect': this.
|
|
3930
|
-
default: this.s=
|
|
3951
|
+
case 683: switch(this.lk()) {
|
|
3952
|
+
case '*': case '+': case '-': case '/': case '<': case '=': case '>': case '?': case '!=': case '<=': case '<>': case '>=': case 'in': case 'is': case 'or': case '||': case 'and': case 'not': case 'like': case 'between': if(this.expression($,684,654)) {this.queryOnLeft(0,'expr');} continue;
|
|
3953
|
+
case ',': if(this.continueExpressionslist($,686)) {this.queryOnLeft(0,'expr');} continue;
|
|
3954
|
+
case 'limit': case 'minus': case 'order': case 'union': case 'except': case 'intersect': this.gc(686,'queryOnLeft') && this.queryExpression($,686,466); continue;
|
|
3955
|
+
default: this.s=686; continue;
|
|
3931
3956
|
}
|
|
3932
|
-
case
|
|
3933
|
-
case ',': this.continueExpressionslist($,
|
|
3934
|
-
default: this.s=
|
|
3957
|
+
case 684: switch(this.l()) {
|
|
3958
|
+
case ',': this.continueExpressionslist($,686); continue;
|
|
3959
|
+
default: this.s=686; continue;
|
|
3935
3960
|
}
|
|
3936
|
-
case
|
|
3937
|
-
case ',': this.continueExpressionslist($,
|
|
3938
|
-
default: this.s=
|
|
3961
|
+
case 685: switch(this.l()) {
|
|
3962
|
+
case ',': this.continueExpressionslist($,686); continue;
|
|
3963
|
+
default: this.s=686; continue;
|
|
3939
3964
|
}
|
|
3940
|
-
case
|
|
3965
|
+
case 686: if(this.m(0,')')) { this.surroundByParens( $.expr ); } continue;
|
|
3941
3966
|
default: return this.exit_();
|
|
3942
3967
|
}
|
|
3943
3968
|
}
|
|
3944
3969
|
continueExpressionslist($,$next) {
|
|
3945
|
-
this.rule_(
|
|
3970
|
+
this.rule_(688,$next);
|
|
3946
3971
|
let e; let _;
|
|
3947
3972
|
for(;;) switch(this.s) {
|
|
3948
|
-
case
|
|
3949
|
-
case
|
|
3950
|
-
case 'Id': case '#': case '(': case '+': case '-': case ':': case '?': case 'not': case 'case': case 'cast': case 'null': case 'true': case 'false': case 'Number': case 'String': case 'exists': case 'QuotedLiteral': this.s=
|
|
3973
|
+
case 688: if(this.m(689,',')) { $.expr = { op: this.valueWithLocation( 'list' ), args: [ $.expr ], location: { ... $.expr.$parens?.at( -1 ) ?? $.expr.location } }; } continue;
|
|
3974
|
+
case 689: switch(this.lk()) {
|
|
3975
|
+
case 'Id': case '#': case '(': case '+': case '-': case ':': case '?': case 'not': case 'case': case 'cast': case 'null': case 'true': case 'false': case 'Number': case 'String': case 'exists': case 'QuotedLiteral': this.s=690; continue;
|
|
3951
3976
|
default: this.ei(); continue;
|
|
3952
3977
|
}
|
|
3953
|
-
case
|
|
3954
|
-
case 'Id': case '#': case '(': case '+': case '-': case ':': case '?': case 'not': case 'case': case 'cast': case 'null': case 'true': case 'false': case 'Number': case 'String': case 'exists': case 'QuotedLiteral': if(this.expression(_={},
|
|
3978
|
+
case 690: switch(this.lk()) {
|
|
3979
|
+
case 'Id': case '#': case '(': case '+': case '-': case ':': case '?': case 'not': case 'case': case 'cast': case 'null': case 'true': case 'false': case 'Number': case 'String': case 'exists': case 'QuotedLiteral': if(this.expression(_={},691)) {e=_.expr; $.expr.args.push( e ); } continue;
|
|
3955
3980
|
default: this.gi(0,[')']); continue;
|
|
3956
3981
|
}
|
|
3957
|
-
case
|
|
3958
|
-
case ',': this.c(
|
|
3982
|
+
case 691: switch(this.l()) {
|
|
3983
|
+
case ',': this.c(690); continue;
|
|
3959
3984
|
default: this.gr([')']); continue;
|
|
3960
3985
|
}
|
|
3961
3986
|
case 0: { this.attachLocation( $.expr ); }
|
|
@@ -3966,11 +3991,11 @@ this.attachLocation( $.expr ); } continue;
|
|
|
3966
3991
|
}
|
|
3967
3992
|
newAndValuePath($,$next) {
|
|
3968
3993
|
$.expr??=undefined;
|
|
3969
|
-
this.rule_(
|
|
3994
|
+
this.rule_(693,$next);
|
|
3970
3995
|
let e; let _;
|
|
3971
3996
|
for(;;) switch(this.s) {
|
|
3972
|
-
case
|
|
3973
|
-
case
|
|
3997
|
+
case 693: if(this.mk(694,'new')) { $.expr = this.applyOpToken(); } continue;
|
|
3998
|
+
case 694: if(this.valuePath(_={},0)) {e=_.expr; e = this.valuePathAst( e );
|
|
3974
3999
|
if (e.op?.val !== 'ixpr') $.expr.args.push( e ); else $.expr.args.push( ...e.args ); } continue;
|
|
3975
4000
|
default:
|
|
3976
4001
|
this.attachLocation( $.expr );
|
|
@@ -3978,116 +4003,116 @@ if (e.op?.val !== 'ixpr') $.expr.args.push( e ); else $.expr.args.push( ...e.arg
|
|
|
3978
4003
|
}
|
|
3979
4004
|
}
|
|
3980
4005
|
caseExpression($,$next) {
|
|
3981
|
-
$.expr??=
|
|
3982
|
-
this.rule_(
|
|
4006
|
+
$.expr??=undefined;
|
|
4007
|
+
this.rule_(696,$next);
|
|
3983
4008
|
let e; let _;
|
|
3984
4009
|
for(;;) switch(this.s) {
|
|
3985
|
-
case
|
|
3986
|
-
case
|
|
3987
|
-
case 'Id': case '#': case '(': case '+': case '-': case ':': case '?': case 'not': case 'case': case 'cast': case 'null': case 'true': case 'false': case 'Number': case 'String': case 'exists': case 'QuotedLiteral': if(this.expression(_={},
|
|
3988
|
-
case 'when': this.gP(
|
|
3989
|
-
default: this.gi(
|
|
3990
|
-
}
|
|
3991
|
-
case
|
|
3992
|
-
case 'when': this.s=
|
|
4010
|
+
case 696: if(this.mk(697,'case')) { $.expr.op = { val: 'ixpr', location: this.lb().location }; $.expr.args = []; this.pushXprToken( $.expr ); } continue;
|
|
4011
|
+
case 697: switch(this.lk()) {
|
|
4012
|
+
case 'Id': case '#': case '(': case '+': case '-': case ':': case '?': case 'not': case 'case': case 'cast': case 'null': case 'true': case 'false': case 'Number': case 'String': case 'exists': case 'QuotedLiteral': if(this.expression(_={},698)) {e=_.expr; $.expr.args.push( e ); } continue;
|
|
4013
|
+
case 'when': this.gP(698); continue;
|
|
4014
|
+
default: this.gi(698); continue;
|
|
4015
|
+
}
|
|
4016
|
+
case 698: switch(this.lk()) {
|
|
4017
|
+
case 'when': this.s=699; continue;
|
|
3993
4018
|
default: this.e(); continue;
|
|
3994
4019
|
}
|
|
3995
|
-
case
|
|
3996
|
-
case 'when': if(this.ck(
|
|
3997
|
-
default: this.s=
|
|
4020
|
+
case 699: switch(this.lk()) {
|
|
4021
|
+
case 'when': if(this.ck(700)) { this.pushXprToken( $.expr ); } continue;
|
|
4022
|
+
default: this.s=703; continue;
|
|
3998
4023
|
}
|
|
3999
|
-
case
|
|
4000
|
-
case
|
|
4001
|
-
case
|
|
4002
|
-
case
|
|
4003
|
-
case 'else': if(this.ck(
|
|
4004
|
-
default: this.s=
|
|
4024
|
+
case 700: if(this.expression(_={},701)) {e=_.expr; $.expr.args.push( e ); } continue;
|
|
4025
|
+
case 701: if(this.mk(702,'then')) { this.pushXprToken( $.expr ); } continue;
|
|
4026
|
+
case 702: if(this.expression(_={},699)) {e=_.expr; $.expr.args.push( e ); } continue;
|
|
4027
|
+
case 703: switch(this.lk()) {
|
|
4028
|
+
case 'else': if(this.ck(704)) { this.pushXprToken( $.expr ); } continue;
|
|
4029
|
+
default: this.s=705; continue;
|
|
4005
4030
|
}
|
|
4006
|
-
case
|
|
4007
|
-
case
|
|
4031
|
+
case 704: if(this.expression(_={},705)) {e=_.expr; $.expr.args.push( e ); } continue;
|
|
4032
|
+
case 705: if(this.mk(0,'end')) { this.pushXprToken( $.expr ); } continue;
|
|
4008
4033
|
default:
|
|
4009
4034
|
this.attachLocation( $.expr );
|
|
4010
4035
|
return this.exit_();
|
|
4011
4036
|
}
|
|
4012
4037
|
}
|
|
4013
4038
|
castFunction($,$next) {
|
|
4014
|
-
$.expr??=
|
|
4015
|
-
this.rule_(
|
|
4039
|
+
$.expr??=undefined;
|
|
4040
|
+
this.rule_(707,$next);
|
|
4016
4041
|
let arg; let _;
|
|
4017
4042
|
for(;;) switch(this.s) {
|
|
4018
|
-
case
|
|
4019
|
-
case
|
|
4020
|
-
case
|
|
4021
|
-
case
|
|
4022
|
-
case
|
|
4023
|
-
case
|
|
4043
|
+
case 707: if(this.mk(708,'cast')) { $.expr.op = this.valueWithLocation(); } continue;
|
|
4044
|
+
case 708: if(this.m(709,'(')) { $.expr.args = this.createArray(); } continue;
|
|
4045
|
+
case 709: if(this.expression(_={},710)) {arg=_.expr; $.expr.args?.push( arg ); } continue;
|
|
4046
|
+
case 710: this.mk(711,'as'); continue;
|
|
4047
|
+
case 711: this.typeRefOptArgs({art:$.expr},712); continue;
|
|
4048
|
+
case 712: if(this.m(0,')')) { this.finalizeDictOrArray( $.expr.args ); } continue;
|
|
4024
4049
|
default:
|
|
4025
4050
|
this.attachLocation( $.expr );
|
|
4026
4051
|
return this.exit_();
|
|
4027
4052
|
}
|
|
4028
4053
|
}
|
|
4029
4054
|
argumentsAndFilter($,$next) {
|
|
4030
|
-
this.rule_(
|
|
4055
|
+
this.rule_(714,$next);
|
|
4031
4056
|
let open; let expr; let id; let _;
|
|
4032
4057
|
for(;;) switch(this.s) {
|
|
4033
|
-
case
|
|
4034
|
-
case '(': if(this.c(
|
|
4035
|
-
default: this.s=
|
|
4058
|
+
case 714: switch(this.l()) {
|
|
4059
|
+
case '(': if(this.c(715)) {open=this.lb();this.prepareSpecialFunction(); $.pathStep.args = this.createArray(); } continue;
|
|
4060
|
+
default: this.s=734; continue;
|
|
4036
4061
|
}
|
|
4037
|
-
case
|
|
4038
|
-
case 'Id': if(this.gc(
|
|
4039
|
-
default: this.s=
|
|
4062
|
+
case 715: switch(this.l()) {
|
|
4063
|
+
case 'Id': if(this.gc(716,'isNamedArg') && this.ciA(722,'paramname')) id=this.lb(); continue;
|
|
4064
|
+
default: this.s=716; continue;
|
|
4040
4065
|
}
|
|
4041
|
-
case
|
|
4042
|
-
case 'Id': case '#': case '(': case '*': case '+': case '-': case ':': case '?': case 'Id_all': case 'Number': case 'String': case 'QuotedLiteral': if(this.funcExpression(_={},
|
|
4043
|
-
default: this.s=
|
|
4066
|
+
case 716: switch(this.l()) {
|
|
4067
|
+
case 'Id': case '#': case '(': case '*': case '+': case '-': case ':': case '?': case 'Id_all': case 'Number': case 'String': case 'QuotedLiteral': if(this.funcExpression(_={},717)) {expr=_.expr; $.pathStep.args.push( expr ); } continue;
|
|
4068
|
+
default: this.s=733; continue;
|
|
4044
4069
|
}
|
|
4045
|
-
case
|
|
4046
|
-
case ',': if(this.c(
|
|
4047
|
-
default: this.s=
|
|
4070
|
+
case 717: switch(this.l()) {
|
|
4071
|
+
case ',': if(this.c(718)) {this.nextFunctionArgument();} continue;
|
|
4072
|
+
default: this.s=719; continue;
|
|
4048
4073
|
}
|
|
4049
|
-
case
|
|
4050
|
-
case 'Id': case '#': case '(': case '*': case '+': case '-': case ':': case '?': case 'not': case 'case': case 'cast': case 'null': case 'true': case 'false': case 'Id_all': case 'Number': case 'String': case 'exists': case 'QuotedLiteral': if(this.funcExpression(_={},
|
|
4051
|
-
case ')': case 'order': this.gP(
|
|
4074
|
+
case 718: switch(this.lk()) {
|
|
4075
|
+
case 'Id': case '#': case '(': case '*': case '+': case '-': case ':': case '?': case 'not': case 'case': case 'cast': case 'null': case 'true': case 'false': case 'Id_all': case 'Number': case 'String': case 'exists': case 'QuotedLiteral': if(this.funcExpression(_={},717)) {expr=_.expr; $.pathStep.args.push( expr ); } continue;
|
|
4076
|
+
case ')': case 'order': this.gP(719); continue;
|
|
4052
4077
|
default: this.ei(); continue;
|
|
4053
4078
|
}
|
|
4054
|
-
case
|
|
4055
|
-
case 'order': if(this.ck(
|
|
4056
|
-
default: this.s=
|
|
4079
|
+
case 719: switch(this.lk()) {
|
|
4080
|
+
case 'order': if(this.ck(720)) { expr = $.pathStep.args[$.pathStep.args.length - 1] = this.applyOpToken( expr ); } continue;
|
|
4081
|
+
default: this.s=733; continue;
|
|
4057
4082
|
}
|
|
4058
|
-
case
|
|
4059
|
-
case
|
|
4060
|
-
case
|
|
4061
|
-
case ':': if(this.c(
|
|
4062
|
-
case '=>': if(this.c(
|
|
4083
|
+
case 720: if(this.mk(721,'by')) { this.pushXprToken( expr ); } continue;
|
|
4084
|
+
case 721: if(this.orderByClauseAsXpr({outer:expr.args},733)) { this.attachLocation( expr ); } continue;
|
|
4085
|
+
case 722: switch(this.l()) {
|
|
4086
|
+
case ':': if(this.c(723)) { $.pathStep.args = this.createDict( open ); $.pathStep.$syntax = ':'; } continue;
|
|
4087
|
+
case '=>': if(this.c(728)) { $.pathStep.args = this.createDict(); } continue;
|
|
4063
4088
|
default: this.e(); continue;
|
|
4064
4089
|
}
|
|
4065
|
-
case
|
|
4066
|
-
case
|
|
4067
|
-
case ',': this.c(
|
|
4068
|
-
default: this.s=
|
|
4090
|
+
case 723: if(this.expression(_={},724)) {expr=_.expr; this.addNamedArg( $.pathStep, id, expr ); } continue;
|
|
4091
|
+
case 724: switch(this.l()) {
|
|
4092
|
+
case ',': this.c(725); continue;
|
|
4093
|
+
default: this.s=733; continue;
|
|
4069
4094
|
}
|
|
4070
|
-
case
|
|
4071
|
-
case 'Id': if(this.ciA(
|
|
4072
|
-
case ')': this.s=
|
|
4095
|
+
case 725: switch(this.l()) {
|
|
4096
|
+
case 'Id': if(this.ciA(726,'paramname')) id=this.lb(); continue;
|
|
4097
|
+
case ')': this.s=733; continue;
|
|
4073
4098
|
default: this.e(); continue;
|
|
4074
4099
|
}
|
|
4075
|
-
case
|
|
4076
|
-
case
|
|
4077
|
-
case
|
|
4078
|
-
case
|
|
4079
|
-
case ',': this.c(
|
|
4080
|
-
default: this.s=
|
|
4100
|
+
case 726: this.m(727,':'); continue;
|
|
4101
|
+
case 727: if(this.expression(_={},724)) {expr=_.expr; this.addNamedArg( $.pathStep, id, expr ); } continue;
|
|
4102
|
+
case 728: if(this.expression(_={},729)) {expr=_.expr; this.addNamedArg( $.pathStep, id, expr ); } continue;
|
|
4103
|
+
case 729: switch(this.l()) {
|
|
4104
|
+
case ',': this.c(730); continue;
|
|
4105
|
+
default: this.s=733; continue;
|
|
4081
4106
|
}
|
|
4082
|
-
case
|
|
4083
|
-
case 'Id': if(this.ciA(
|
|
4084
|
-
case ')': this.s=
|
|
4107
|
+
case 730: switch(this.l()) {
|
|
4108
|
+
case 'Id': if(this.ciA(731,'paramname')) id=this.lb(); continue;
|
|
4109
|
+
case ')': this.s=733; continue;
|
|
4085
4110
|
default: this.e(); continue;
|
|
4086
4111
|
}
|
|
4087
|
-
case
|
|
4088
|
-
case
|
|
4089
|
-
case
|
|
4090
|
-
case
|
|
4112
|
+
case 731: this.m(732,'=>'); continue;
|
|
4113
|
+
case 732: if(this.expression(_={},729)) {expr=_.expr; this.addNamedArg( $.pathStep, id, expr ); } continue;
|
|
4114
|
+
case 733: this.m(734,')'); continue;
|
|
4115
|
+
case 734: switch(this.l()) {
|
|
4091
4116
|
case '[': this.cardinalityAndFilter($,0); continue;
|
|
4092
4117
|
default: this.gr(['*','+','-','.','/','<','=','>','?','!=','<=','<>','>=','in','is','or','||','and','not','like','between']); continue;
|
|
4093
4118
|
}
|
|
@@ -4096,24 +4121,24 @@ if (e.op?.val !== 'ixpr') $.expr.args.push( e ); else $.expr.args.push( ...e.arg
|
|
|
4096
4121
|
}
|
|
4097
4122
|
funcExpression($,$next) {
|
|
4098
4123
|
$.expr??=undefined;
|
|
4099
|
-
this.rule_(
|
|
4124
|
+
this.rule_(736,$next);
|
|
4100
4125
|
let args;
|
|
4101
4126
|
let tok; let e; let _;
|
|
4102
4127
|
for(;;) switch(this.s) {
|
|
4103
|
-
case
|
|
4104
|
-
case 'Id': case '#': case '(': case '+': case '-': case ':': case '?': case 'Number': case 'String': case 'QuotedLiteral': if(this.expression(_={},
|
|
4105
|
-
case 'GenericExpr': if(this.ckA(
|
|
4106
|
-
case 'GenericIntro': if(this.ckA(
|
|
4128
|
+
case 736: switch(this.lGenericIntroOrExpr()) {
|
|
4129
|
+
case 'Id': case '#': case '(': case '+': case '-': case ':': case '?': case 'Number': case 'String': case 'QuotedLiteral': if(this.expression(_={},738)) $.expr=_.expr; continue;
|
|
4130
|
+
case 'GenericExpr': if(this.ckA(738)) {tok=this.lb(); $.expr = { val: tok.keyword ?? tok.type, location: tok.location, literal: 'token' }; } continue;
|
|
4131
|
+
case 'GenericIntro': if(this.ckA(737)) { $.expr = this.applyOpToken(); args = $.expr.args; } continue;
|
|
4107
4132
|
default: this.e(); continue;
|
|
4108
4133
|
}
|
|
4109
|
-
case
|
|
4110
|
-
case
|
|
4111
|
-
case 'GenericSeparator': if(this.ckA(
|
|
4134
|
+
case 737: if(this.expression(_={},738)) {e=_.expr; $.expr.args.push( e ); } continue;
|
|
4135
|
+
case 738: switch(this.lGenericSeparator()) {
|
|
4136
|
+
case 'GenericSeparator': if(this.ckA(739)) { if (args) this.pushXprToken( args ); else { $.expr= this.applyOpToken( $.expr ); args = $.expr.args; } } continue;
|
|
4112
4137
|
default: this.gr([')',',','order']); continue;
|
|
4113
4138
|
}
|
|
4114
|
-
case
|
|
4115
|
-
case 'Id': case '#': case '(': case '+': case '-': case ':': case '?': case 'Number': case 'String': case 'QuotedLiteral': if(this.expression(_={},
|
|
4116
|
-
case 'GenericExpr': if(this.ckA(
|
|
4139
|
+
case 739: switch(this.lGenericExpr()) {
|
|
4140
|
+
case 'Id': case '#': case '(': case '+': case '-': case ':': case '?': case 'Number': case 'String': case 'QuotedLiteral': if(this.expression(_={},738)) {e=_.expr; args.push( e ); } continue;
|
|
4141
|
+
case 'GenericExpr': if(this.ckA(738)) { this.pushXprToken( args ); } continue;
|
|
4117
4142
|
default: this.e(); continue;
|
|
4118
4143
|
}
|
|
4119
4144
|
default:
|
|
@@ -4122,78 +4147,78 @@ if (e.op?.val !== 'ixpr') $.expr.args.push( e ); else $.expr.args.push( ...e.arg
|
|
|
4122
4147
|
}
|
|
4123
4148
|
}
|
|
4124
4149
|
overClause($,$next) {
|
|
4125
|
-
this.rule_(
|
|
4150
|
+
this.rule_(741,$next);
|
|
4126
4151
|
let over=[];
|
|
4127
4152
|
for(;;) switch(this.s) {
|
|
4128
|
-
case
|
|
4129
|
-
case 739: switch(this.lk()) {
|
|
4130
|
-
case 'partition': if(this.ck(740)) { this.pushXprToken( over ); } continue;
|
|
4131
|
-
default: this.s=742; continue;
|
|
4132
|
-
}
|
|
4133
|
-
case 740: if(this.mk(741,'by')) { this.pushXprToken( over ); } continue;
|
|
4134
|
-
case 741: this.expressionsAsXpr({outer:over},742); continue;
|
|
4153
|
+
case 741: this.m(742,'('); continue;
|
|
4135
4154
|
case 742: switch(this.lk()) {
|
|
4136
|
-
case '
|
|
4155
|
+
case 'partition': if(this.ck(743)) { this.pushXprToken( over ); } continue;
|
|
4137
4156
|
default: this.s=745; continue;
|
|
4138
4157
|
}
|
|
4139
4158
|
case 743: if(this.mk(744,'by')) { this.pushXprToken( over ); } continue;
|
|
4140
|
-
case 744: this.
|
|
4159
|
+
case 744: this.expressionsAsXpr({outer:over},745); continue;
|
|
4141
4160
|
case 745: switch(this.lk()) {
|
|
4142
|
-
case '
|
|
4143
|
-
default: this.s=
|
|
4161
|
+
case 'order': if(this.ck(746)) { this.pushXprToken( over ); } continue;
|
|
4162
|
+
default: this.s=748; continue;
|
|
4144
4163
|
}
|
|
4145
|
-
case 746: this.
|
|
4146
|
-
case 747: this.
|
|
4164
|
+
case 746: if(this.mk(747,'by')) { this.pushXprToken( over ); } continue;
|
|
4165
|
+
case 747: this.orderByClauseAsXpr({outer:over},748); continue;
|
|
4166
|
+
case 748: switch(this.lk()) {
|
|
4167
|
+
case 'rows': if(this.ck(749)) { this.pushXprToken( over ); } continue;
|
|
4168
|
+
default: this.s=750; continue;
|
|
4169
|
+
}
|
|
4170
|
+
case 749: this.windowFrameClause({outer:over},750); continue;
|
|
4171
|
+
case 750: this.m(0,')'); continue;
|
|
4147
4172
|
default:
|
|
4148
4173
|
$.outer.push( this.surroundByParens( this.ixprAst( over ) ) );
|
|
4149
4174
|
return this.exit_();
|
|
4150
4175
|
}
|
|
4151
4176
|
}
|
|
4152
4177
|
expressionsAsXpr($,$next) {
|
|
4153
|
-
this.rule_(
|
|
4178
|
+
this.rule_(752,$next);
|
|
4154
4179
|
let args=[];
|
|
4155
4180
|
let expr; let _;
|
|
4156
4181
|
for(;;) switch(this.s) {
|
|
4157
|
-
case
|
|
4158
|
-
case
|
|
4159
|
-
case ',': if(this.c(
|
|
4182
|
+
case 752: if(this.expression(_={},753)) {expr=_.expr; args.push( expr ); } continue;
|
|
4183
|
+
case 753: switch(this.l()) {
|
|
4184
|
+
case ',': if(this.c(754)) { this.pushXprToken( args ); } continue;
|
|
4160
4185
|
default: this.gr([')','rows','order']); continue;
|
|
4161
4186
|
}
|
|
4162
|
-
case
|
|
4187
|
+
case 754: if(this.expression(_={},753)) {expr=_.expr; args.push( expr ); } continue;
|
|
4163
4188
|
default:
|
|
4164
4189
|
$.outer.push( this.ixprAst( args ) );
|
|
4165
4190
|
return this.exit_();
|
|
4166
4191
|
}
|
|
4167
4192
|
}
|
|
4168
4193
|
orderByClauseAsXpr($,$next) {
|
|
4169
|
-
this.rule_(
|
|
4194
|
+
this.rule_(756,$next);
|
|
4170
4195
|
let args=[];
|
|
4171
4196
|
for(;;) switch(this.s) {
|
|
4172
|
-
case
|
|
4173
|
-
case
|
|
4174
|
-
case ',': if(this.c(
|
|
4197
|
+
case 756: this.orderBySpecAsXpr({args},757); continue;
|
|
4198
|
+
case 757: switch(this.l()) {
|
|
4199
|
+
case ',': if(this.c(758)) { this.pushXprToken( args ); } continue;
|
|
4175
4200
|
default: this.gr([')']); continue;
|
|
4176
4201
|
}
|
|
4177
|
-
case
|
|
4202
|
+
case 758: this.orderBySpecAsXpr({args},757); continue;
|
|
4178
4203
|
default:
|
|
4179
4204
|
$.outer.push( this.ixprAst( args ) );
|
|
4180
4205
|
return this.exit_();
|
|
4181
4206
|
}
|
|
4182
4207
|
}
|
|
4183
4208
|
orderBySpecAsXpr($,$next) {
|
|
4184
|
-
this.rule_(
|
|
4209
|
+
this.rule_(760,$next);
|
|
4185
4210
|
let expr; let _;
|
|
4186
4211
|
for(;;) switch(this.s) {
|
|
4187
|
-
case
|
|
4188
|
-
case
|
|
4189
|
-
case 'asc': case 'desc': if(this.ck(
|
|
4190
|
-
default: this.s=
|
|
4212
|
+
case 760: if(this.expression(_={},761)) {expr=_.expr; $.args.push( expr ); } continue;
|
|
4213
|
+
case 761: switch(this.lk()) {
|
|
4214
|
+
case 'asc': case 'desc': if(this.ck(762)) { this.pushXprToken( $.args ); } continue;
|
|
4215
|
+
default: this.s=762; continue;
|
|
4191
4216
|
}
|
|
4192
|
-
case
|
|
4193
|
-
case 'nulls': if(this.ck(
|
|
4217
|
+
case 762: switch(this.lk()) {
|
|
4218
|
+
case 'nulls': if(this.ck(763)) { this.pushXprToken( $.args ); } continue;
|
|
4194
4219
|
default: this.gr([')',',']); continue;
|
|
4195
4220
|
}
|
|
4196
|
-
case
|
|
4221
|
+
case 763: switch(this.lk()) {
|
|
4197
4222
|
case 'last': case 'first': if(this.ck(0)) { this.pushXprToken( $.args ); } continue;
|
|
4198
4223
|
default: this.e(); continue;
|
|
4199
4224
|
}
|
|
@@ -4201,51 +4226,51 @@ if (e.op?.val !== 'ixpr') $.expr.args.push( e ); else $.expr.args.push( ...e.arg
|
|
|
4201
4226
|
}
|
|
4202
4227
|
}
|
|
4203
4228
|
windowFrameClause($,$next) {
|
|
4204
|
-
this.rule_(
|
|
4229
|
+
this.rule_(765,$next);
|
|
4205
4230
|
let args=[];
|
|
4206
4231
|
for(;;) switch(this.s) {
|
|
4207
|
-
case
|
|
4208
|
-
case 'unbounded': if(this.ck(
|
|
4209
|
-
case 'Number': if(this.c(
|
|
4210
|
-
case 'current': if(this.ck(
|
|
4211
|
-
case 'between': if(this.ck(
|
|
4232
|
+
case 765: switch(this.lk()) {
|
|
4233
|
+
case 'unbounded': if(this.ck(766)) { this.pushXprToken( args ); } continue;
|
|
4234
|
+
case 'Number': if(this.c(766)) { args.push( this.unsignedIntegerLiteral() ); } continue;
|
|
4235
|
+
case 'current': if(this.ck(767)) { this.pushXprToken( args ); } continue;
|
|
4236
|
+
case 'between': if(this.ck(768)) { this.pushXprToken( args ); } continue;
|
|
4212
4237
|
default: this.e(); continue;
|
|
4213
4238
|
}
|
|
4214
|
-
case
|
|
4215
|
-
case
|
|
4216
|
-
case
|
|
4217
|
-
case
|
|
4218
|
-
case
|
|
4239
|
+
case 766: if(this.mk(0,'preceding')) { this.pushXprToken( args ); } continue;
|
|
4240
|
+
case 767: if(this.mk(0,'row')) { this.pushXprToken( args ); } continue;
|
|
4241
|
+
case 768: this.windowFrameBoundSpec({args},769); continue;
|
|
4242
|
+
case 769: if(this.mk(770,'and')) { this.pushXprToken( args ); } continue;
|
|
4243
|
+
case 770: this.windowFrameBoundSpec({args},0); continue;
|
|
4219
4244
|
default:
|
|
4220
4245
|
$.outer.push( this.ixprAst( args ) );
|
|
4221
4246
|
return this.exit_();
|
|
4222
4247
|
}
|
|
4223
4248
|
}
|
|
4224
4249
|
windowFrameBoundSpec($,$next) {
|
|
4225
|
-
this.rule_(
|
|
4250
|
+
this.rule_(772,$next);
|
|
4226
4251
|
for(;;) switch(this.s) {
|
|
4227
|
-
case
|
|
4228
|
-
case 'unbounded': if(this.ck(
|
|
4229
|
-
case 'Number': if(this.c(
|
|
4230
|
-
case 'current': if(this.ck(
|
|
4252
|
+
case 772: switch(this.lk()) {
|
|
4253
|
+
case 'unbounded': if(this.ck(773)) { this.pushXprToken( $.args ); } continue;
|
|
4254
|
+
case 'Number': if(this.c(773)) { $.args.push( this.unsignedIntegerLiteral() ); } continue;
|
|
4255
|
+
case 'current': if(this.ck(775)) { this.pushXprToken( $.args ); } continue;
|
|
4231
4256
|
default: this.e(); continue;
|
|
4232
4257
|
}
|
|
4233
|
-
case
|
|
4234
|
-
case 'following': this.ck(
|
|
4235
|
-
case 'preceding': this.ck(
|
|
4258
|
+
case 773: switch(this.lk()) {
|
|
4259
|
+
case 'following': this.ck(774); continue;
|
|
4260
|
+
case 'preceding': this.ck(774); continue;
|
|
4236
4261
|
default: this.e(); continue;
|
|
4237
4262
|
}
|
|
4238
|
-
case
|
|
4239
|
-
case
|
|
4263
|
+
case 774: if(this.gr([])) { this.pushXprToken( $.args ); } continue;
|
|
4264
|
+
case 775: if(this.mk(0,'row')) { this.pushXprToken( $.args ); } continue;
|
|
4240
4265
|
default: return this.exit_();
|
|
4241
4266
|
}
|
|
4242
4267
|
}
|
|
4243
4268
|
literalValue($,$next) {
|
|
4244
4269
|
$.expr??={};
|
|
4245
|
-
this.rule_(
|
|
4270
|
+
this.rule_(777,$next);
|
|
4246
4271
|
for(;;) switch(this.s) {
|
|
4247
|
-
case
|
|
4248
|
-
case '#': if(this.c(
|
|
4272
|
+
case 777: switch(this.lk()) {
|
|
4273
|
+
case '#': if(this.c(778)) { this.reportUnexpectedSpace(); } continue;
|
|
4249
4274
|
case 'null': if(this.ck(0)) { $.expr = { literal: 'null', val: null }; } continue;
|
|
4250
4275
|
case 'true': case 'false': if(this.ck(0)) { $.expr = { literal: 'boolean', val: this.lb().keyword === 'true' }; } continue;
|
|
4251
4276
|
case 'Number': if(this.c(0)) { $.expr = this.numberLiteral(); } continue;
|
|
@@ -4253,17 +4278,17 @@ if (e.op?.val !== 'ixpr') $.expr.args.push( e ); else $.expr.args.push( ...e.arg
|
|
|
4253
4278
|
case 'QuotedLiteral': if(this.c(0)) { $.expr = this.quotedLiteral(); } continue;
|
|
4254
4279
|
default: this.e(); continue;
|
|
4255
4280
|
}
|
|
4256
|
-
case
|
|
4281
|
+
case 778: if(this.mi(0,'enumref')) { $.expr = { literal: 'enum', sym: this.identAst() } } continue;
|
|
4257
4282
|
default:
|
|
4258
4283
|
this.attachLocation( $.expr );
|
|
4259
4284
|
return this.exit_();
|
|
4260
4285
|
}
|
|
4261
4286
|
}
|
|
4262
4287
|
annoAssignStd($,$next) {
|
|
4263
|
-
this.rule_(
|
|
4288
|
+
this.rule_(780,$next);
|
|
4264
4289
|
for(;;) switch(this.s) {
|
|
4265
|
-
case
|
|
4266
|
-
case
|
|
4290
|
+
case 780: if(this.m(781,'@')) {this.annoInSameLine(); this.reportUnexpectedSpace(); } continue;
|
|
4291
|
+
case 781: switch(this.l()) {
|
|
4267
4292
|
case '(': this.annoAssignParen($,0); continue;
|
|
4268
4293
|
case 'Id': this.annoAssignBase($,0); continue;
|
|
4269
4294
|
default: this.e(); continue;
|
|
@@ -4274,10 +4299,10 @@ if (e.op?.val !== 'ixpr') $.expr.args.push( e ); else $.expr.args.push( ...e.arg
|
|
|
4274
4299
|
}
|
|
4275
4300
|
}
|
|
4276
4301
|
annoAssignCol($,$next) {
|
|
4277
|
-
this.rule_(
|
|
4302
|
+
this.rule_(783,$next);
|
|
4278
4303
|
for(;;) switch(this.s) {
|
|
4279
|
-
case
|
|
4280
|
-
case
|
|
4304
|
+
case 783: if(this.m(784,'@')) { this.reportUnexpectedSpace(); } continue;
|
|
4305
|
+
case 784: switch(this.l()) {
|
|
4281
4306
|
case '(': this.annoAssignParen($,0); continue;
|
|
4282
4307
|
case 'Id': this.annoAssignBase($,0); continue;
|
|
4283
4308
|
default: this.e(); continue;
|
|
@@ -4288,11 +4313,11 @@ if (e.op?.val !== 'ixpr') $.expr.args.push( e ); else $.expr.args.push( ...e.arg
|
|
|
4288
4313
|
}
|
|
4289
4314
|
}
|
|
4290
4315
|
annoAssignMid($,$next) {
|
|
4291
|
-
this.rule_(
|
|
4316
|
+
this.rule_(786,$next);
|
|
4292
4317
|
let name; let _;
|
|
4293
4318
|
for(;;) switch(this.s) {
|
|
4294
|
-
case
|
|
4295
|
-
case
|
|
4319
|
+
case 786: if(this.m(787,'@')) {this.annoInSameLine(); this.reportUnexpectedSpace(); } continue;
|
|
4320
|
+
case 787: switch(this.l()) {
|
|
4296
4321
|
case '(': this.annoAssignParen($,0); continue;
|
|
4297
4322
|
case 'Id': if(this.annoNamePath(_={category:'anno'},0)) {name=_.name; this.assignAnnotation( $.art, {}, name ); this.warnIfColonFollows( name ); } continue;
|
|
4298
4323
|
default: this.e(); continue;
|
|
@@ -4303,33 +4328,33 @@ if (e.op?.val !== 'ixpr') $.expr.args.push( e ); else $.expr.args.push( ...e.arg
|
|
|
4303
4328
|
}
|
|
4304
4329
|
}
|
|
4305
4330
|
annoAssignParen($,$next) {
|
|
4306
|
-
this.rule_(
|
|
4331
|
+
this.rule_(789,$next);
|
|
4307
4332
|
for(;;) switch(this.s) {
|
|
4308
|
-
case
|
|
4309
|
-
case
|
|
4310
|
-
case 'Id': this.annoAssignBase({art:$.art},
|
|
4311
|
-
default: this.s=
|
|
4312
|
-
}
|
|
4313
|
-
case
|
|
4314
|
-
case ',': this.c(
|
|
4315
|
-
case ')': this.s=
|
|
4333
|
+
case 789: if(this.m(790,'(')) {this.annoInSameLine();} continue;
|
|
4334
|
+
case 790: switch(this.l()) {
|
|
4335
|
+
case 'Id': this.annoAssignBase({art:$.art},791); continue;
|
|
4336
|
+
default: this.s=792; continue;
|
|
4337
|
+
}
|
|
4338
|
+
case 791: switch(this.l()) {
|
|
4339
|
+
case ',': this.c(790); continue;
|
|
4340
|
+
case ')': this.s=792; continue;
|
|
4316
4341
|
default: this.e(); continue;
|
|
4317
4342
|
}
|
|
4318
|
-
case
|
|
4343
|
+
case 792: this.m(0,')'); continue;
|
|
4319
4344
|
default: return this.exit_();
|
|
4320
4345
|
}
|
|
4321
4346
|
}
|
|
4322
4347
|
annoAssignBase($,$next) {
|
|
4323
|
-
this.rule_(
|
|
4348
|
+
this.rule_(794,$next);
|
|
4324
4349
|
let value={};
|
|
4325
4350
|
let name; let _;
|
|
4326
4351
|
for(;;) switch(this.s) {
|
|
4327
|
-
case
|
|
4328
|
-
case
|
|
4329
|
-
case ':': this.gc(0,'annoInSameLine') && this.c(
|
|
4352
|
+
case 794: if(this.annoNamePath(_={category:'anno'},795)) name=_.name; continue;
|
|
4353
|
+
case 795: switch(this.l()) {
|
|
4354
|
+
case ':': this.gc(0,'annoInSameLine') && this.c(796); continue;
|
|
4330
4355
|
default: this.gr([]); continue;
|
|
4331
4356
|
}
|
|
4332
|
-
case
|
|
4357
|
+
case 796: if(this.annoValue(_={},0)) value=_.value; continue;
|
|
4333
4358
|
default:
|
|
4334
4359
|
this.assignAnnotation( $.art, value, name || {} );
|
|
4335
4360
|
return this.exit_();
|
|
@@ -4337,21 +4362,21 @@ if (e.op?.val !== 'ixpr') $.expr.args.push( e ); else $.expr.args.push( ...e.arg
|
|
|
4337
4362
|
}
|
|
4338
4363
|
annoNamePath($,$next) {
|
|
4339
4364
|
$.name??=new XsnName();
|
|
4340
|
-
this.rule_(
|
|
4365
|
+
this.rule_(798,$next);
|
|
4341
4366
|
let at;
|
|
4342
4367
|
for(;;) switch(this.s) {
|
|
4343
|
-
case
|
|
4344
|
-
case
|
|
4345
|
-
case '.': this.c(
|
|
4346
|
-
default: this.s=
|
|
4347
|
-
}
|
|
4348
|
-
case
|
|
4349
|
-
case 'Id': if(this.ciA(
|
|
4350
|
-
case '@': if(this.c(
|
|
4368
|
+
case 798: if(this.miA(799,$.category)) { $.name.path = [ this.identAst() ]; } continue;
|
|
4369
|
+
case 799: switch(this.l()) {
|
|
4370
|
+
case '.': this.c(800); continue;
|
|
4371
|
+
default: this.s=802; continue;
|
|
4372
|
+
}
|
|
4373
|
+
case 800: switch(this.l()) {
|
|
4374
|
+
case 'Id': if(this.ciA(799,$.category)) { $.name.path.push( this.identAst() ); } continue;
|
|
4375
|
+
case '@': if(this.c(801)) at=this.lb(); continue;
|
|
4351
4376
|
default: this.e(); continue;
|
|
4352
4377
|
}
|
|
4353
|
-
case
|
|
4354
|
-
case
|
|
4378
|
+
case 801: if(this.miA(799,$.category)) { $.name.path.push( this.identAstWithPrefix( at ) ); } continue;
|
|
4379
|
+
case 802: switch(this.l()) {
|
|
4355
4380
|
case '#': this.gc(0,'annoInSameLine') && this.annoPathVariant({nameOrRef:$.name},0); continue;
|
|
4356
4381
|
default: this.gr([]); continue;
|
|
4357
4382
|
}
|
|
@@ -4361,26 +4386,26 @@ if (e.op?.val !== 'ixpr') $.expr.args.push( e ); else $.expr.args.push( ...e.arg
|
|
|
4361
4386
|
}
|
|
4362
4387
|
}
|
|
4363
4388
|
annoPath($,$next) {
|
|
4364
|
-
this.rule_(
|
|
4389
|
+
this.rule_(804,$next);
|
|
4365
4390
|
let at;
|
|
4366
4391
|
for(;;) switch(this.s) {
|
|
4367
|
-
case 801: switch(this.l()) {
|
|
4368
|
-
case 'Id': if(this.ciA(803,$.category)) { $.nameOrRef.path = [ this.identAst() ]; } continue;
|
|
4369
|
-
case '@': if(this.c(802)) at=this.lb(); continue;
|
|
4370
|
-
default: this.e(); continue;
|
|
4371
|
-
}
|
|
4372
|
-
case 802: if(this.miA(803,$.category)) { $.nameOrRef.path = [ this.identAstWithPrefix( at ) ]; } continue;
|
|
4373
|
-
case 803: switch(this.l()) {
|
|
4374
|
-
case '.': this.c(804); continue;
|
|
4375
|
-
default: this.s=806; continue;
|
|
4376
|
-
}
|
|
4377
4392
|
case 804: switch(this.l()) {
|
|
4378
|
-
case 'Id': if(this.ciA(
|
|
4393
|
+
case 'Id': if(this.ciA(806,$.category)) { $.nameOrRef.path = [ this.identAst() ]; } continue;
|
|
4379
4394
|
case '@': if(this.c(805)) at=this.lb(); continue;
|
|
4380
4395
|
default: this.e(); continue;
|
|
4381
4396
|
}
|
|
4382
|
-
case 805: if(this.miA(
|
|
4397
|
+
case 805: if(this.miA(806,$.category)) { $.nameOrRef.path = [ this.identAstWithPrefix( at ) ]; } continue;
|
|
4383
4398
|
case 806: switch(this.l()) {
|
|
4399
|
+
case '.': this.c(807); continue;
|
|
4400
|
+
default: this.s=809; continue;
|
|
4401
|
+
}
|
|
4402
|
+
case 807: switch(this.l()) {
|
|
4403
|
+
case 'Id': if(this.ciA(806,$.category)) { $.nameOrRef.path.push( this.identAst() ); } continue;
|
|
4404
|
+
case '@': if(this.c(808)) at=this.lb(); continue;
|
|
4405
|
+
default: this.e(); continue;
|
|
4406
|
+
}
|
|
4407
|
+
case 808: if(this.miA(806,$.category)) { $.nameOrRef.path.push( this.identAstWithPrefix( at ) ); } continue;
|
|
4408
|
+
case 809: switch(this.l()) {
|
|
4384
4409
|
case '#': this.annoPathVariant({nameOrRef:$.nameOrRef},0); continue;
|
|
4385
4410
|
default: this.gr([]); continue;
|
|
4386
4411
|
}
|
|
@@ -4390,15 +4415,15 @@ if (e.op?.val !== 'ixpr') $.expr.args.push( e ); else $.expr.args.push( ...e.arg
|
|
|
4390
4415
|
}
|
|
4391
4416
|
}
|
|
4392
4417
|
annoPathVariant($,$next) {
|
|
4393
|
-
this.rule_(
|
|
4418
|
+
this.rule_(811,$next);
|
|
4394
4419
|
for(;;) switch(this.s) {
|
|
4395
|
-
case
|
|
4396
|
-
case
|
|
4397
|
-
case
|
|
4398
|
-
case '.': this.c(
|
|
4420
|
+
case 811: if(this.m(812,'#')) { this.reportUnexpectedSpace(); } continue;
|
|
4421
|
+
case 812: if(this.miA(813,'variant')) { $.nameOrRef.variant = { path: [ this.identAst() ] }; } continue;
|
|
4422
|
+
case 813: switch(this.l()) {
|
|
4423
|
+
case '.': this.c(814); continue;
|
|
4399
4424
|
default: this.gr([]); continue;
|
|
4400
4425
|
}
|
|
4401
|
-
case
|
|
4426
|
+
case 814: if(this.miA(813,'variant')) { $.nameOrRef.variant.path.push( this.identAst() ); } continue;
|
|
4402
4427
|
default:
|
|
4403
4428
|
this.attachLocation( $.nameOrRef.variant );
|
|
4404
4429
|
return this.exit_();
|
|
@@ -4406,16 +4431,16 @@ if (e.op?.val !== 'ixpr') $.expr.args.push( e ); else $.expr.args.push( ...e.arg
|
|
|
4406
4431
|
}
|
|
4407
4432
|
annoStructValue($,$next) {
|
|
4408
4433
|
$.value??={};
|
|
4409
|
-
this.rule_(
|
|
4434
|
+
this.rule_(816,$next);
|
|
4410
4435
|
let name=new XsnName();
|
|
4411
4436
|
let _;
|
|
4412
4437
|
for(;;) switch(this.s) {
|
|
4413
|
-
case
|
|
4414
|
-
case
|
|
4415
|
-
case ':': this.c(
|
|
4438
|
+
case 816: if(this.annoPath({nameOrRef:name,category:'name'},817)) { this.attachLocation( name ); } continue;
|
|
4439
|
+
case 817: switch(this.l()) {
|
|
4440
|
+
case ':': this.c(818); continue;
|
|
4416
4441
|
default: if(this.gr([',','}'])) { this.attachLocation( $.value ); } continue;
|
|
4417
4442
|
}
|
|
4418
|
-
case
|
|
4443
|
+
case 818: if(this.annoValue(_={},0)) $.value=_.value; continue;
|
|
4419
4444
|
default:
|
|
4420
4445
|
$.value.name = name;
|
|
4421
4446
|
return this.exit_();
|
|
@@ -4423,51 +4448,52 @@ if (e.op?.val !== 'ixpr') $.expr.args.push( e ); else $.expr.args.push( ...e.arg
|
|
|
4423
4448
|
}
|
|
4424
4449
|
annoValue($,$next) {
|
|
4425
4450
|
$.value??={};
|
|
4426
|
-
this.rule_(
|
|
4451
|
+
this.rule_(820,$next);
|
|
4427
4452
|
let sign; let sub; let ellipsis; let upTo; let _;
|
|
4428
4453
|
for(;;) switch(this.s) {
|
|
4429
|
-
case
|
|
4454
|
+
case 820: switch(this.lk()) {
|
|
4430
4455
|
case '#': case 'null': case 'true': case 'false': case 'Number': case 'String': case 'QuotedLiteral': if(this.literalValue(_={},0)) {$.value=_.expr; this.adjustAnnoNumber( $.value ); } continue;
|
|
4431
|
-
case '+': case '-': if(this.c(
|
|
4456
|
+
case '+': case '-': if(this.c(821)) sign=this.lb(); continue;
|
|
4432
4457
|
case 'Id': case '@': this.annoPath({nameOrRef:$.value,category:'annoref'},0); continue;
|
|
4433
|
-
case '{': if(this.c(
|
|
4458
|
+
case '{': if(this.c(822)) { if (!this.dynamic_.arrayAnno) $.value.$flatten = [];
|
|
4434
4459
|
else { $.value.struct = Object.create(null); $.value.literal = 'struct'; } } continue;
|
|
4435
|
-
case '[': if(this.c(
|
|
4436
|
-
case '(': this.c(
|
|
4460
|
+
case '[': if(this.c(826)) {this.arrayAnno(); $.value.val = []; $.value.literal = 'array' } continue;
|
|
4461
|
+
case '(': this.c(833); continue;
|
|
4437
4462
|
default: this.ei(); continue;
|
|
4438
4463
|
}
|
|
4439
|
-
case
|
|
4440
|
-
case
|
|
4441
|
-
case 'Id': case '@': if(this.annoStructValue(_={},
|
|
4464
|
+
case 821: if(this.m(0,'Number')) { this.adjustAnnoNumber( $.value = this.numberLiteral( sign ) ); } continue;
|
|
4465
|
+
case 822: switch(this.l()) {
|
|
4466
|
+
case 'Id': case '@': if(this.annoStructValue(_={},823)) {sub=_.value; if ($.value.$flatten) $.value.$flatten.push( sub );
|
|
4442
4467
|
else this.addDef( sub, $.value, 'struct', null, sub.name ); } continue;
|
|
4443
|
-
default: this.s=
|
|
4468
|
+
default: this.s=824; continue;
|
|
4444
4469
|
}
|
|
4445
|
-
case
|
|
4446
|
-
case ',': this.c(
|
|
4447
|
-
case '}': this.s=
|
|
4470
|
+
case 823: switch(this.l()) {
|
|
4471
|
+
case ',': this.c(822); continue;
|
|
4472
|
+
case '}': this.s=824; continue;
|
|
4448
4473
|
default: this.e(); continue;
|
|
4449
4474
|
}
|
|
4450
|
-
case
|
|
4451
|
-
case
|
|
4452
|
-
|
|
4453
|
-
case '
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
case
|
|
4462
|
-
case
|
|
4463
|
-
case
|
|
4464
|
-
|
|
4465
|
-
case '
|
|
4475
|
+
case 824: this.s=825;{ this.ec( 'arrayAnno', 'orNotEmpty' ); } continue;
|
|
4476
|
+
case 825: this.m(0,'}'); continue;
|
|
4477
|
+
case 826: switch(this.l()) {
|
|
4478
|
+
case 'Id': case '#': case '(': case '+': case '-': case '@': case '[': case '{': case 'Number': case 'String': case 'QuotedLiteral': if(this.annoValue(_={},831)) {sub=_.value; $.value.val.push( sub ) } continue;
|
|
4479
|
+
case '...': if(this.gc(832,'arrayAnno','ellipsis') && this.c(827)) ellipsis=this.lb(); continue;
|
|
4480
|
+
default: this.s=832; continue;
|
|
4481
|
+
}
|
|
4482
|
+
case 827: switch(this.lk()) {
|
|
4483
|
+
case 'up': this.ck(828); continue;
|
|
4484
|
+
default: this.s=830;{ upTo = undefined; } continue;
|
|
4485
|
+
}
|
|
4486
|
+
case 828: this.mk(829,'to'); continue;
|
|
4487
|
+
case 829: if(this.annoValue(_={},830)) upTo=_.value; continue;
|
|
4488
|
+
case 830: this.s=831;{ $.value.val.push( { literal: 'token', val: '...', location: ellipsis.location, upTo: upTo } ); } continue;
|
|
4489
|
+
case 831: switch(this.l()) {
|
|
4490
|
+
case ',': this.c(826); continue;
|
|
4491
|
+
case ']': this.s=832; continue;
|
|
4466
4492
|
default: this.e(); continue;
|
|
4467
4493
|
}
|
|
4468
|
-
case
|
|
4469
|
-
case
|
|
4470
|
-
case
|
|
4494
|
+
case 832: this.m(0,']'); continue;
|
|
4495
|
+
case 833: if(this.condition(_={},834)) $.value=_.expr; continue;
|
|
4496
|
+
case 834: if(this.m(0,')')) { $.value.$tokenTexts = this.ruleTokensText(); } continue;
|
|
4471
4497
|
default:
|
|
4472
4498
|
this.attachLocation( $.value );
|
|
4473
4499
|
return this.exit_();
|