@sap/cds-compiler 5.9.4 → 6.0.12

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