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