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