@sap/cds-compiler 6.2.2 → 6.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +35 -0
- package/bin/cdsc.js +11 -4
- package/lib/api/options.js +1 -1
- package/lib/base/message-registry.js +36 -7
- package/lib/base/messages.js +11 -4
- package/lib/base/model.js +0 -1
- package/lib/checks/assocOutsideService.js +17 -30
- package/lib/checks/checkForTypes.js +0 -18
- package/lib/checks/checkPathsInStoredCalcElement.js +2 -1
- package/lib/checks/onConditions.js +2 -2
- package/lib/checks/queryNoDbArtifacts.js +16 -15
- package/lib/checks/types.js +1 -1
- package/lib/checks/utils.js +30 -6
- package/lib/checks/validator.js +4 -5
- package/lib/compiler/checks.js +47 -18
- package/lib/compiler/index.js +88 -6
- package/lib/compiler/resolve.js +7 -7
- package/lib/compiler/tweak-assocs.js +47 -25
- package/lib/gen/BaseParser.js +1 -1
- package/lib/gen/CdlGrammar.checksum +1 -1
- package/lib/gen/CdlParser.js +381 -378
- package/lib/gen/Dictionary.json +0 -2
- package/lib/model/csnRefs.js +9 -4
- package/lib/model/csnUtils.js +67 -2
- package/lib/optionProcessor.js +2 -3
- package/lib/parsers/AstBuildingParser.js +5 -6
- package/lib/render/toCdl.js +10 -4
- package/lib/render/utils/common.js +4 -2
- package/lib/transform/db/assertUnique.js +2 -1
- package/lib/transform/db/associations.js +37 -1
- package/lib/transform/db/assocsToQueries/transformExists.js +21 -32
- package/lib/transform/db/assocsToQueries/utils.js +1 -1
- package/lib/transform/db/cdsPersistence.js +1 -1
- package/lib/transform/db/expansion.js +37 -36
- package/lib/transform/draft/db.js +20 -20
- package/lib/transform/draft/odata.js +38 -40
- package/lib/transform/effective/associations.js +1 -1
- package/lib/transform/effective/flattening.js +40 -47
- package/lib/transform/effective/main.js +6 -4
- package/lib/transform/forOdata.js +135 -115
- package/lib/transform/forRelationalDB.js +151 -142
- package/lib/transform/localized.js +116 -109
- package/lib/transform/odata/adaptAnnotationRefs.js +21 -16
- package/lib/transform/odata/createForeignKeys.js +73 -70
- package/lib/transform/odata/flattening.js +216 -200
- package/lib/transform/odata/foreignKeyRefsInXprAnnos.js +47 -45
- package/lib/transform/odata/toFinalBaseType.js +40 -39
- package/lib/transform/odata/typesExposure.js +151 -133
- package/lib/transform/odata/utils.js +7 -6
- package/lib/transform/parseExpr.js +165 -162
- package/lib/transform/transformUtils.js +184 -551
- package/lib/transform/translateAssocsToJoins.js +510 -571
- package/lib/transform/tupleExpansion.js +495 -0
- package/lib/transform/universalCsn/universalCsnEnricher.js +1 -0
- package/package.json +1 -1
- package/lib/base/cleanSymbols.js +0 -17
- package/lib/checks/nonexpandableStructured.js +0 -39
package/lib/gen/CdlParser.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Parser generated by redepage v0.
|
|
1
|
+
// Parser generated by redepage v0.3.0
|
|
2
2
|
'use strict;'
|
|
3
3
|
const { XsnSource, XsnArtifact, XsnName } = require( '../compiler/xsn-model' )
|
|
4
4
|
const AstBuildingParser = require('../parsers/AstBuildingParser')
|
|
@@ -133,7 +133,7 @@ Id:['g',6,,'afterBrace'],'@':'Id',
|
|
|
133
133
|
},
|
|
134
134
|
['m',0,'}',,,'afterBrace'],
|
|
135
135
|
'artifactDefOrExtend',
|
|
136
|
-
{'@':[10,
|
|
136
|
+
{'@':[10,772],'':11},
|
|
137
137
|
{
|
|
138
138
|
type:12,view:12,event:12,action:12,aspect:12,entity:12,context:12,service:12,abstract:12,function:12,annotation:12,
|
|
139
139
|
define:['ck',12],
|
|
@@ -198,22 +198,22 @@ Id:[22,31],
|
|
|
198
198
|
'serviceDef',
|
|
199
199
|
['mk',44,'service',,,'vocabularyRestriction'],
|
|
200
200
|
[45,35],
|
|
201
|
-
{'@':[45,
|
|
201
|
+
{'@':[45,778],'':46},
|
|
202
202
|
{'{':[0,5],'':0},
|
|
203
203
|
'contextDef',
|
|
204
204
|
['mk',49,'context',,,'vocabularyRestriction'],
|
|
205
205
|
[50,35],
|
|
206
|
-
{'@':[50,
|
|
206
|
+
{'@':[50,778],'':51},
|
|
207
207
|
{'{':[0,5],'':0},
|
|
208
208
|
'annotationDef',
|
|
209
209
|
['mk',54,'annotation'],
|
|
210
210
|
[55,35],
|
|
211
|
-
{'@':[55,
|
|
211
|
+
{'@':[55,778],'':56},
|
|
212
212
|
[0,347],
|
|
213
213
|
'typeDef',
|
|
214
214
|
['mk',59,'type'],
|
|
215
215
|
[60,35],
|
|
216
|
-
{'@':[60,
|
|
216
|
+
{'@':[60,778],'':61},
|
|
217
217
|
[0,347],
|
|
218
218
|
'aspectDef',
|
|
219
219
|
{
|
|
@@ -222,7 +222,7 @@ abstract:['ck',64,,'hide_'],
|
|
|
222
222
|
},
|
|
223
223
|
['mk',65,'entity'],
|
|
224
224
|
[66,35],
|
|
225
|
-
{'@':[66,
|
|
225
|
+
{'@':[66,778],'':67},
|
|
226
226
|
{
|
|
227
227
|
'{':[71,158],
|
|
228
228
|
':':['c',68],
|
|
@@ -239,7 +239,7 @@ abstract:['ck',64,,'hide_'],
|
|
|
239
239
|
'entityDef',
|
|
240
240
|
['mk',74,'entity'],
|
|
241
241
|
[75,35],
|
|
242
|
-
{'@':[75,
|
|
242
|
+
{'@':[75,778],'':76},
|
|
243
243
|
{'(':[77,142],'':77},
|
|
244
244
|
{
|
|
245
245
|
'{':81,
|
|
@@ -265,7 +265,7 @@ projection:['g',83,,,'sloppy','afterBrace'],
|
|
|
265
265
|
'viewDef',
|
|
266
266
|
['mk',90,'view'],
|
|
267
267
|
[91,35],
|
|
268
|
-
{'@':[91,
|
|
268
|
+
{'@':[91,778],'':92},
|
|
269
269
|
{
|
|
270
270
|
'(':[98,142],
|
|
271
271
|
with:['ck',93,,'hide_'],
|
|
@@ -281,7 +281,7 @@ with:['ck',93,,'hide_'],
|
|
|
281
281
|
'eventDef',
|
|
282
282
|
['mk',102,'event'],
|
|
283
283
|
[103,35],
|
|
284
|
-
{'@':[103,
|
|
284
|
+
{'@':[103,778],'':104},
|
|
285
285
|
{
|
|
286
286
|
'{':[0,158],
|
|
287
287
|
':':['c',105],
|
|
@@ -299,17 +299,17 @@ projection:[0,446,1],
|
|
|
299
299
|
'{':110,
|
|
300
300
|
},
|
|
301
301
|
[0,158],
|
|
302
|
-
{'@':[111,
|
|
302
|
+
{'@':[111,772],'':0},
|
|
303
303
|
'actionMainDef',
|
|
304
304
|
['mk',114,'action'],
|
|
305
305
|
[115,35],
|
|
306
|
-
{'@':[115,
|
|
306
|
+
{'@':[115,778],'':116},
|
|
307
307
|
[117,142],
|
|
308
308
|
{returns:[0,154],'':0},
|
|
309
309
|
'functionMainDef',
|
|
310
310
|
['mk',120,'function'],
|
|
311
311
|
[121,35],
|
|
312
|
-
{'@':[121,
|
|
312
|
+
{'@':[121,778],'':122},
|
|
313
313
|
[123,142],
|
|
314
314
|
[0,154],
|
|
315
315
|
'actionsBlock',
|
|
@@ -323,17 +323,17 @@ Id:['g',127,,'afterBrace'],'@':'Id',
|
|
|
323
323
|
},
|
|
324
324
|
['m',0,'}',,,'afterBrace'],
|
|
325
325
|
'boundActionFunctionDef',
|
|
326
|
-
{'@':[131,
|
|
326
|
+
{'@':[131,772],'':132},
|
|
327
327
|
{
|
|
328
328
|
action:['ck',133],
|
|
329
329
|
function:['ck',137],
|
|
330
330
|
},
|
|
331
331
|
['mi',134],
|
|
332
|
-
{'@':[134,
|
|
332
|
+
{'@':[134,778],'':135},
|
|
333
333
|
[136,142],
|
|
334
334
|
{returns:[0,154],'':0},
|
|
335
335
|
['mi',138],
|
|
336
|
-
{'@':[138,
|
|
336
|
+
{'@':[138,778],'':139},
|
|
337
337
|
[140,142],
|
|
338
338
|
[0,154],
|
|
339
339
|
'paramsList',
|
|
@@ -345,9 +345,9 @@ function:['ck',137],
|
|
|
345
345
|
},
|
|
346
346
|
['m',0,')'],
|
|
347
347
|
'paramDef',
|
|
348
|
-
{'@':[147,
|
|
348
|
+
{'@':[147,772],'':148},
|
|
349
349
|
['miA',149],
|
|
350
|
-
{'@':[149,
|
|
350
|
+
{'@':[149,778],'':150},
|
|
351
351
|
{
|
|
352
352
|
'{':[151,158],
|
|
353
353
|
':':['c',152],
|
|
@@ -356,7 +356,7 @@ function:['ck',137],
|
|
|
356
356
|
[0,358],
|
|
357
357
|
'returnsSpec',
|
|
358
358
|
['mk',155,'returns',,'default','elementRestriction'],
|
|
359
|
-
{'@':[155,
|
|
359
|
+
{'@':[155,772],'':156},
|
|
360
360
|
[0,358],
|
|
361
361
|
'elementsBlock',
|
|
362
362
|
['m',159,'{'],
|
|
@@ -368,13 +368,13 @@ Id:['g',159,,'afterBrace'],'@':'Id',
|
|
|
368
368
|
},
|
|
369
369
|
['m',0,'}',,,'afterBrace'],
|
|
370
370
|
'elementDef',
|
|
371
|
-
{'@':[163,
|
|
371
|
+
{'@':[163,772],'':164},
|
|
372
372
|
{virtual:['ck',165,1],'':165},
|
|
373
373
|
{key:['ck',166],'':166},
|
|
374
374
|
{masked:['ck',167,1,'hide_'],'':167},
|
|
375
375
|
{element:['ck',168,1,'hide_'],'':168},
|
|
376
376
|
['mi',169,,,'elem','elementRestriction'],
|
|
377
|
-
{'@':[169,
|
|
377
|
+
{'@':[169,778],'':170},
|
|
378
378
|
{
|
|
379
379
|
'{':[171,158],
|
|
380
380
|
':':['c',172],
|
|
@@ -386,7 +386,7 @@ Id:['g',159,,'afterBrace'],'@':'Id',
|
|
|
386
386
|
[175,642],
|
|
387
387
|
{stored:['ck',176],'':176},
|
|
388
388
|
['g',177],
|
|
389
|
-
{'@':[177,
|
|
389
|
+
{'@':[177,772,,'elementRestriction','anno'],'':0},
|
|
390
390
|
'enumSymbolsBlock',
|
|
391
391
|
['mk',180,'enum'],
|
|
392
392
|
['m',181,'{'],
|
|
@@ -397,19 +397,19 @@ Id:['g',159,,'afterBrace'],'@':'Id',
|
|
|
397
397
|
},
|
|
398
398
|
['m',0,'}',,,'afterBrace'],
|
|
399
399
|
'enumSymbolDef',
|
|
400
|
-
{'@':[185,
|
|
400
|
+
{'@':[185,772],'':186},
|
|
401
401
|
['mi',187],
|
|
402
|
-
{'@':[187,
|
|
402
|
+
{'@':[187,772],'':188},
|
|
403
403
|
{'=':['c',189],'':0},
|
|
404
404
|
{
|
|
405
405
|
String:['c',191],
|
|
406
406
|
Number:['c',191],
|
|
407
407
|
'+':['c',190],'-':'+',
|
|
408
|
-
Id:[191,
|
|
408
|
+
Id:[191,769,,'hide_'],'#':'Id',QuotedLiteral:'Id',
|
|
409
409
|
},
|
|
410
410
|
['m',191,'Number'],
|
|
411
411
|
['g',192],
|
|
412
|
-
{'@':[192,
|
|
412
|
+
{'@':[192,772],'':0},
|
|
413
413
|
'foreignKeysBlock',
|
|
414
414
|
['m',195,'{'],
|
|
415
415
|
{Id:[196,199],'@':'Id','':197},
|
|
@@ -419,7 +419,7 @@ Id:[191,770,,'hide_'],'#':'Id',QuotedLiteral:'Id',
|
|
|
419
419
|
},
|
|
420
420
|
['m',0,'}'],
|
|
421
421
|
'foreignKeyDef',
|
|
422
|
-
{'@':[199,
|
|
422
|
+
{'@':[199,772],'':200},
|
|
423
423
|
[201,39],
|
|
424
424
|
{as:['ck',202],'':0},
|
|
425
425
|
['mi',0],
|
|
@@ -448,10 +448,10 @@ with:['ck',223],
|
|
|
448
448
|
[219,35],
|
|
449
449
|
{with:['ck',220],'':220},
|
|
450
450
|
['g',221],
|
|
451
|
-
{'@':[221,
|
|
451
|
+
{'@':[221,772],'':222},
|
|
452
452
|
{'{':[0,321],'':0},
|
|
453
453
|
['g',224],
|
|
454
|
-
{'@':[224,
|
|
454
|
+
{'@':[224,772],'':225},
|
|
455
455
|
{'(':[226,308],'':226},
|
|
456
456
|
{
|
|
457
457
|
returns:[0,317],
|
|
@@ -469,7 +469,7 @@ with:['ck',240],
|
|
|
469
469
|
[232,35],
|
|
470
470
|
{with:['ck',233],'':233},
|
|
471
471
|
['g',234],
|
|
472
|
-
{'@':[234,
|
|
472
|
+
{'@':[234,772],'':235},
|
|
473
473
|
{
|
|
474
474
|
'{':236,
|
|
475
475
|
elements:['ck',236],
|
|
@@ -478,10 +478,10 @@ enum:[0,179],
|
|
|
478
478
|
'':0
|
|
479
479
|
},
|
|
480
480
|
[0,331],
|
|
481
|
-
{'@':[237,
|
|
481
|
+
{'@':[237,772],'':238},
|
|
482
482
|
{'{':[239,331],'':0},
|
|
483
483
|
{actions:[0,125],'':0},
|
|
484
|
-
{'@':[240,
|
|
484
|
+
{'@':[240,772],'':241},
|
|
485
485
|
{
|
|
486
486
|
Id:[242,39],
|
|
487
487
|
'{':246,
|
|
@@ -506,22 +506,22 @@ definitions:['ck',249,1],
|
|
|
506
506
|
[253,35],
|
|
507
507
|
{with:['ck',254],'':254},
|
|
508
508
|
['g',255],
|
|
509
|
-
{'@':[255,
|
|
509
|
+
{'@':[255,772],'':256},
|
|
510
510
|
{'{':[0,5],'':0},
|
|
511
511
|
'extendContext',
|
|
512
512
|
['mk',259,'context'],
|
|
513
513
|
[260,35],
|
|
514
514
|
{with:['ck',261],'':261},
|
|
515
515
|
['g',262],
|
|
516
|
-
{'@':[262,
|
|
516
|
+
{'@':[262,772],'':263},
|
|
517
517
|
{'{':[0,5],'':0},
|
|
518
518
|
'extendType',
|
|
519
519
|
['mk',266,'type'],
|
|
520
520
|
[267,35],
|
|
521
521
|
{with:['ck',270],'':268},
|
|
522
|
-
{'@':[268,
|
|
522
|
+
{'@':[268,772],'':269},
|
|
523
523
|
{'{':[0,331],'':0},
|
|
524
|
-
{'@':[270,
|
|
524
|
+
{'@':[270,772],'':271},
|
|
525
525
|
{
|
|
526
526
|
Id:[272,39],
|
|
527
527
|
'{':275,
|
|
@@ -538,8 +538,8 @@ enum:[0,179,1],
|
|
|
538
538
|
{aspect:['ck',278],entity:'aspect'},
|
|
539
539
|
[279,35],
|
|
540
540
|
{with:['ck',281],'':280},
|
|
541
|
-
{'@':[280,
|
|
542
|
-
{'@':[281,
|
|
541
|
+
{'@':[280,772],'':285},
|
|
542
|
+
{'@':[281,772],'':282},
|
|
543
543
|
{
|
|
544
544
|
Id:[283,39],
|
|
545
545
|
actions:['g',285,1],
|
|
@@ -554,7 +554,7 @@ actions:['g',285,1],
|
|
|
554
554
|
[290,35],
|
|
555
555
|
{with:['ck',291],'':291},
|
|
556
556
|
['g',292],
|
|
557
|
-
{'@':[292,
|
|
557
|
+
{'@':[292,772],'':293},
|
|
558
558
|
{'{':[294,558],'':294},
|
|
559
559
|
{actions:[0,125],'':0},
|
|
560
560
|
'annotateActionsBlock',
|
|
@@ -568,9 +568,9 @@ Id:['g',298,,'afterBrace'],'@':'Id',
|
|
|
568
568
|
},
|
|
569
569
|
['m',0,'}',,,'afterBrace'],
|
|
570
570
|
'annotateBoundAction',
|
|
571
|
-
{'@':[302,
|
|
571
|
+
{'@':[302,772],'':303},
|
|
572
572
|
['mi',304],
|
|
573
|
-
{'@':[304,
|
|
573
|
+
{'@':[304,772],'':305},
|
|
574
574
|
{'(':[306,308],'':306},
|
|
575
575
|
{returns:[0,317,1],'':0},
|
|
576
576
|
'annotateParamsBlock',
|
|
@@ -582,12 +582,12 @@ Id:['g',298,,'afterBrace'],'@':'Id',
|
|
|
582
582
|
},
|
|
583
583
|
['m',0,')'],
|
|
584
584
|
'annotateParam',
|
|
585
|
-
{'@':[313,
|
|
585
|
+
{'@':[313,772],'':314},
|
|
586
586
|
['mi',315],
|
|
587
|
-
{'@':[315,
|
|
587
|
+
{'@':[315,772],'':0},
|
|
588
588
|
'annotateReturns',
|
|
589
589
|
['mk',318,'returns'],
|
|
590
|
-
{'@':[318,
|
|
590
|
+
{'@':[318,772],'':319},
|
|
591
591
|
{'{':[0,321],'':0},
|
|
592
592
|
'annotateElementsBlock',
|
|
593
593
|
['m',322,'{'],
|
|
@@ -599,9 +599,9 @@ Id:['g',322,,'afterBrace'],'@':'Id',
|
|
|
599
599
|
},
|
|
600
600
|
['m',0,'}',,,'afterBrace'],
|
|
601
601
|
'annotateElement',
|
|
602
|
-
{'@':[326,
|
|
602
|
+
{'@':[326,772],'':327},
|
|
603
603
|
['mi',328],
|
|
604
|
-
{'@':[328,
|
|
604
|
+
{'@':[328,772],'':329},
|
|
605
605
|
{'{':[0,321],'':0},
|
|
606
606
|
'extendElementsBlock',
|
|
607
607
|
['m',332,'{'],
|
|
@@ -613,7 +613,7 @@ Id:['g',332,,'afterBrace'],'@':'Id',
|
|
|
613
613
|
},
|
|
614
614
|
['m',0,'}',,,'afterBrace'],
|
|
615
615
|
'elementDefOrExtend',
|
|
616
|
-
{'@':[336,
|
|
616
|
+
{'@':[336,772],'':337},
|
|
617
617
|
{
|
|
618
618
|
Id:[0,163],'@':'Id',key:'Id',
|
|
619
619
|
extend:['ck',338,1],
|
|
@@ -621,9 +621,9 @@ extend:['ck',338,1],
|
|
|
621
621
|
{element:['ck',339,1],'':339},
|
|
622
622
|
['mi',340],
|
|
623
623
|
{with:['ck',343],'':341},
|
|
624
|
-
{'@':[341,
|
|
624
|
+
{'@':[341,772],'':342},
|
|
625
625
|
{'{':[0,331],'':0},
|
|
626
|
-
{'@':[343,
|
|
626
|
+
{'@':[343,772],'':344},
|
|
627
627
|
{
|
|
628
628
|
'{':345,
|
|
629
629
|
elements:['ck',345],
|
|
@@ -670,9 +670,9 @@ many:['ck',379,1,,'calc','elementRestriction'],
|
|
|
670
670
|
'{':[384,158,,,'calc','elementRestriction'],
|
|
671
671
|
},
|
|
672
672
|
['g',360],
|
|
673
|
-
{'@':[360,
|
|
673
|
+
{'@':[360,772],'':361},
|
|
674
674
|
{not:[362,439,,'elementRestriction','notNull'],null:'not','':363},
|
|
675
|
-
{'@':[362,
|
|
675
|
+
{'@':[362,772],'':363},
|
|
676
676
|
{
|
|
677
677
|
enum:[364,179,,,'anno','elementRestriction'],
|
|
678
678
|
'@':[0,393],not:'@',null:'@',default:'@',
|
|
@@ -703,12 +703,12 @@ type:[380,396,1],
|
|
|
703
703
|
},
|
|
704
704
|
{not:[381,439,,'elementRestriction','notNull'],null:'not','':381},
|
|
705
705
|
{enum:[383,179],'':382},
|
|
706
|
-
{'@':[382,
|
|
706
|
+
{'@':[382,772],'':0},
|
|
707
707
|
{not:[0,439,,'elementRestriction','notNull'],null:'not','':0},
|
|
708
708
|
{not:[0,439],null:'not','':0},
|
|
709
709
|
'typeAssocProperties',
|
|
710
710
|
[387,39],
|
|
711
|
-
{'@':[387,
|
|
711
|
+
{'@':[387,772],'':388},
|
|
712
712
|
{
|
|
713
713
|
on:['ck',389],
|
|
714
714
|
'{':[391,194],
|
|
@@ -716,11 +716,11 @@ on:['ck',389],
|
|
|
716
716
|
'':0
|
|
717
717
|
},
|
|
718
718
|
[390,640],
|
|
719
|
-
{'@':[390,
|
|
719
|
+
{'@':[390,772],'':0},
|
|
720
720
|
{'@':[0,393],not:'@',null:'@',default:'@','':0},
|
|
721
721
|
'typeProperties',
|
|
722
722
|
{
|
|
723
|
-
'@':[393,
|
|
723
|
+
'@':[393,772],
|
|
724
724
|
not:[393,439,,'elementRestriction','notNull'],null:'not',
|
|
725
725
|
default:['ck',394,,'elementRestriction','default'],
|
|
726
726
|
'':0
|
|
@@ -1018,7 +1018,7 @@ Id:[565,568],'#':'Id','(':'Id','+':'Id','-':'Id',':':'Id','?':'Id','@':'Id','{':
|
|
|
1018
1018
|
},
|
|
1019
1019
|
['m',0,'}',,,'afterBrace'],
|
|
1020
1020
|
'selectItemDef',
|
|
1021
|
-
{'@':[568,
|
|
1021
|
+
{'@':[568,775],'':569},
|
|
1022
1022
|
{virtual:['ck',570,1,'modifierRestriction'],'':570},
|
|
1023
1023
|
['g',571,,,'key','columnExpr'],
|
|
1024
1024
|
{key:['ck',572,,'modifierRestriction'],'':572},
|
|
@@ -1041,7 +1041,7 @@ Id:['ci',583,,,,'nestedExpand'],
|
|
|
1041
1041
|
'.':['c',581],
|
|
1042
1042
|
'':583
|
|
1043
1043
|
},
|
|
1044
|
-
[577,
|
|
1044
|
+
[577,733],
|
|
1045
1045
|
{'*':[578,643],'+':'*','-':'*','/':'*','<':'*','=':'*','>':'*','?':'*','!=':'*','<=':'*','<>':'*','==':'*','>=':'*',in:'*',is:'*',or:'*','||':'*',and:'*',not:'*',like:'*',between:'*','':578},
|
|
1046
1046
|
{
|
|
1047
1047
|
as:['ck',579],
|
|
@@ -1062,7 +1062,7 @@ Id:['ci',583],
|
|
|
1062
1062
|
['mk',588,'as'],
|
|
1063
1063
|
['mi',589],
|
|
1064
1064
|
['g',590,,,,'columnExpr'],
|
|
1065
|
-
{'@':[590,
|
|
1065
|
+
{'@':[590,778],'':591},
|
|
1066
1066
|
{':':['c',592],'':0},
|
|
1067
1067
|
{
|
|
1068
1068
|
Id:[605,358],'{':'Id',
|
|
@@ -1087,7 +1087,7 @@ on:['ck',596],
|
|
|
1087
1087
|
['mk',604,'on'],
|
|
1088
1088
|
[605,640],
|
|
1089
1089
|
['g',606],
|
|
1090
|
-
{'@':[606,
|
|
1090
|
+
{'@':[606,772],'':0},
|
|
1091
1091
|
'whereGroupByHaving',
|
|
1092
1092
|
{where:['ck',609],'':610},
|
|
1093
1093
|
[610,640],
|
|
@@ -1125,7 +1125,7 @@ on:['ck',596],
|
|
|
1125
1125
|
'expression',
|
|
1126
1126
|
{
|
|
1127
1127
|
'(':[643,677],
|
|
1128
|
-
'#':[654,
|
|
1128
|
+
'#':[654,769],null:'#',true:'#',false:'#',Number:'#',String:'#',QuotedLiteral:'#',
|
|
1129
1129
|
':':['c',644],
|
|
1130
1130
|
'?':['c',654,,'hide_'],
|
|
1131
1131
|
Id:[646,671],
|
|
@@ -1143,7 +1143,7 @@ Number:['c',654,,'hide_'],
|
|
|
1143
1143
|
},
|
|
1144
1144
|
{'.':[654,673],'':654},
|
|
1145
1145
|
{over:['ck',647],'':648},
|
|
1146
|
-
[648,
|
|
1146
|
+
[648,733],
|
|
1147
1147
|
['g',654],
|
|
1148
1148
|
[654,671],
|
|
1149
1149
|
{
|
|
@@ -1233,108 +1233,114 @@ limit:[682,455,,'queryOnLeft'],minus:'limit',order:'limit',union:'limit',except:
|
|
|
1233
1233
|
[705,404],
|
|
1234
1234
|
['m',0,')'],
|
|
1235
1235
|
'argumentsAndFilter',
|
|
1236
|
-
{'(':['c',708,,,,'prepareSpecialFunction'],'':
|
|
1237
|
-
{
|
|
1236
|
+
{'(':['c',708,,,,'prepareSpecialFunction'],'':726},
|
|
1237
|
+
{
|
|
1238
|
+
')':725,
|
|
1239
|
+
Id:['ciA',709,,'isNamedArg'],
|
|
1240
|
+
'':718
|
|
1241
|
+
},
|
|
1238
1242
|
{
|
|
1239
1243
|
':':['c',710],
|
|
1240
|
-
'=>':['c',
|
|
1244
|
+
'=>':['c',714],
|
|
1241
1245
|
},
|
|
1242
1246
|
[711,642],
|
|
1243
|
-
{
|
|
1247
|
+
{
|
|
1248
|
+
',':['c',712],
|
|
1249
|
+
')':725,
|
|
1250
|
+
},
|
|
1244
1251
|
{
|
|
1245
1252
|
Id:['ciA',713],
|
|
1246
|
-
')':
|
|
1253
|
+
')':725,
|
|
1247
1254
|
},
|
|
1248
|
-
['m',
|
|
1249
|
-
[
|
|
1250
|
-
[716,642],
|
|
1251
|
-
{',':['c',717],'':726},
|
|
1255
|
+
['m',710,':'],
|
|
1256
|
+
[715,642],
|
|
1252
1257
|
{
|
|
1253
|
-
|
|
1254
|
-
')':
|
|
1258
|
+
',':['c',716],
|
|
1259
|
+
')':725,
|
|
1255
1260
|
},
|
|
1256
|
-
['m',719,'=>'],
|
|
1257
|
-
[716,642],
|
|
1258
|
-
{Id:[721,729],'#':'Id','(':'Id','*':'Id','+':'Id','-':'Id',':':'Id','?':'Id',Number:'Id',String:'Id',QuotedLiteral:'Id',DeleteStarFromSet:'Id','':726},
|
|
1259
|
-
{',':['c',722,,,,'nextFunctionArgument'],'':723},
|
|
1260
1261
|
{
|
|
1261
|
-
Id:[
|
|
1262
|
-
')':
|
|
1262
|
+
Id:['ciA',717],
|
|
1263
|
+
')':725,
|
|
1263
1264
|
},
|
|
1264
|
-
|
|
1265
|
-
[
|
|
1266
|
-
[
|
|
1267
|
-
['
|
|
1265
|
+
['m',714,'=>'],
|
|
1266
|
+
[719,728],
|
|
1267
|
+
{',':['c',720,,,,'nextFunctionArgument'],'':722},
|
|
1268
|
+
{')':['c',721],'':718},
|
|
1269
|
+
{'[':[0,536],'':0},
|
|
1270
|
+
{order:['ck',723],'':725},
|
|
1271
|
+
['mk',724,'by'],
|
|
1272
|
+
[725,748],
|
|
1273
|
+
['m',726,')'],
|
|
1268
1274
|
{'[':[0,536],'':0},
|
|
1269
1275
|
'funcExpression',
|
|
1270
1276
|
{
|
|
1271
1277
|
' lookahead':'lGenericIntroOrExpr',
|
|
1272
|
-
Id:[
|
|
1273
|
-
GenericExpr:['ckA',
|
|
1274
|
-
GenericIntro:['ckA',
|
|
1278
|
+
Id:[730,642],'#':'Id','(':'Id','+':'Id','-':'Id',':':'Id','?':'Id',Number:'Id',String:'Id',QuotedLiteral:'Id',
|
|
1279
|
+
GenericExpr:['ckA',730],
|
|
1280
|
+
GenericIntro:['ckA',729],
|
|
1275
1281
|
},
|
|
1276
|
-
[
|
|
1282
|
+
[730,642],
|
|
1277
1283
|
{
|
|
1278
1284
|
' lookahead':'lGenericSeparator',
|
|
1279
|
-
GenericSeparator:['ckA',
|
|
1285
|
+
GenericSeparator:['ckA',731],
|
|
1280
1286
|
'':0
|
|
1281
1287
|
},
|
|
1282
1288
|
{
|
|
1283
1289
|
' lookahead':'lGenericExpr',
|
|
1284
|
-
Id:[
|
|
1285
|
-
GenericExpr:['ckA',
|
|
1290
|
+
Id:[730,642],'#':'Id','(':'Id','+':'Id','-':'Id',':':'Id','?':'Id',Number:'Id',String:'Id',QuotedLiteral:'Id',
|
|
1291
|
+
GenericExpr:['ckA',730],
|
|
1286
1292
|
},
|
|
1287
1293
|
'overClause',
|
|
1288
|
-
['m',
|
|
1289
|
-
{partition:['ck',
|
|
1290
|
-
['mk',
|
|
1291
|
-
[
|
|
1292
|
-
{order:['ck',
|
|
1293
|
-
['mk',
|
|
1294
|
-
[
|
|
1295
|
-
{rows:['ck',
|
|
1296
|
-
[
|
|
1294
|
+
['m',734,'('],
|
|
1295
|
+
{partition:['ck',735],'':737},
|
|
1296
|
+
['mk',736,'by'],
|
|
1297
|
+
[737,744],
|
|
1298
|
+
{order:['ck',738],'':740},
|
|
1299
|
+
['mk',739,'by'],
|
|
1300
|
+
[740,748],
|
|
1301
|
+
{rows:['ck',741],'':742},
|
|
1302
|
+
[742,757],
|
|
1297
1303
|
['m',0,')'],
|
|
1298
1304
|
'expressionsAsXpr',
|
|
1299
|
-
[
|
|
1300
|
-
{',':['c',
|
|
1301
|
-
[
|
|
1305
|
+
[745,642],
|
|
1306
|
+
{',':['c',746],'':0},
|
|
1307
|
+
[745,642],
|
|
1302
1308
|
'orderByClauseAsXpr',
|
|
1303
|
-
[
|
|
1304
|
-
{',':['c',
|
|
1305
|
-
[
|
|
1309
|
+
[749,752],
|
|
1310
|
+
{',':['c',750],'':0},
|
|
1311
|
+
[749,752],
|
|
1306
1312
|
'orderBySpecAsXpr',
|
|
1307
|
-
[
|
|
1308
|
-
{asc:['ck',
|
|
1309
|
-
{nulls:['ck',
|
|
1313
|
+
[753,642],
|
|
1314
|
+
{asc:['ck',754],desc:'asc','':754},
|
|
1315
|
+
{nulls:['ck',755],'':0},
|
|
1310
1316
|
{last:['ck',0],first:'last'},
|
|
1311
1317
|
'windowFrameClause',
|
|
1312
1318
|
{
|
|
1313
|
-
unbounded:['ck',
|
|
1314
|
-
Number:['c',
|
|
1315
|
-
current:['ck',
|
|
1316
|
-
between:['ck',
|
|
1319
|
+
unbounded:['ck',758],
|
|
1320
|
+
Number:['c',758],
|
|
1321
|
+
current:['ck',759],
|
|
1322
|
+
between:['ck',760],
|
|
1317
1323
|
},
|
|
1318
1324
|
['mk',0,'preceding'],
|
|
1319
1325
|
['mk',0,'row'],
|
|
1320
|
-
[
|
|
1321
|
-
['mk',
|
|
1322
|
-
[0,
|
|
1326
|
+
[761,764],
|
|
1327
|
+
['mk',762,'and'],
|
|
1328
|
+
[0,764],
|
|
1323
1329
|
'windowFrameBoundSpec',
|
|
1324
1330
|
{
|
|
1325
|
-
unbounded:['ck',
|
|
1326
|
-
Number:['c',
|
|
1327
|
-
current:['ck',
|
|
1331
|
+
unbounded:['ck',765],
|
|
1332
|
+
Number:['c',765],
|
|
1333
|
+
current:['ck',767],
|
|
1328
1334
|
},
|
|
1329
1335
|
{
|
|
1330
|
-
following:['ck',
|
|
1331
|
-
preceding:['ck',
|
|
1336
|
+
following:['ck',766],
|
|
1337
|
+
preceding:['ck',766],
|
|
1332
1338
|
},
|
|
1333
1339
|
['g',0],
|
|
1334
1340
|
['mk',0,'row'],
|
|
1335
1341
|
'literalValue',
|
|
1336
1342
|
{
|
|
1337
|
-
'#':['c',
|
|
1343
|
+
'#':['c',770],
|
|
1338
1344
|
null:['ck',0],
|
|
1339
1345
|
true:['ck',0],false:'true',
|
|
1340
1346
|
Number:['c',0],
|
|
@@ -1343,102 +1349,100 @@ QuotedLiteral:['c',0],
|
|
|
1343
1349
|
},
|
|
1344
1350
|
['miA',0],
|
|
1345
1351
|
'annoAssignStd',
|
|
1346
|
-
['m',
|
|
1352
|
+
['m',773,'@',,,'annoInSameLine'],
|
|
1347
1353
|
{
|
|
1348
|
-
'(':[0,
|
|
1349
|
-
Id:[0,
|
|
1354
|
+
'(':[0,781],
|
|
1355
|
+
Id:[0,786],
|
|
1350
1356
|
},
|
|
1351
1357
|
'annoAssignCol',
|
|
1352
|
-
['m',
|
|
1358
|
+
['m',776,'@'],
|
|
1353
1359
|
{
|
|
1354
|
-
'(':[0,
|
|
1355
|
-
Id:[0,
|
|
1360
|
+
'(':[0,781],
|
|
1361
|
+
Id:[0,786],
|
|
1356
1362
|
},
|
|
1357
1363
|
'annoAssignMid',
|
|
1358
|
-
['m',
|
|
1364
|
+
['m',779,'@',,,'annoInSameLine'],
|
|
1359
1365
|
{
|
|
1360
|
-
'(':[0,
|
|
1361
|
-
Id:[0,
|
|
1366
|
+
'(':[0,781],
|
|
1367
|
+
Id:[0,790],
|
|
1362
1368
|
},
|
|
1363
1369
|
'annoAssignParen',
|
|
1364
|
-
['m',
|
|
1365
|
-
{Id:[
|
|
1370
|
+
['m',782,'(',,,'annoInSameLine'],
|
|
1371
|
+
{Id:[783,786],'':784},
|
|
1366
1372
|
{
|
|
1367
|
-
',':['c',
|
|
1368
|
-
')':
|
|
1373
|
+
',':['c',782],
|
|
1374
|
+
')':784,
|
|
1369
1375
|
},
|
|
1370
1376
|
['m',0,')'],
|
|
1371
1377
|
'annoAssignBase',
|
|
1372
|
-
[
|
|
1373
|
-
{':':['c',
|
|
1374
|
-
[0,
|
|
1378
|
+
[787,790],
|
|
1379
|
+
{':':['c',788,,'annoInSameLine'],'':0},
|
|
1380
|
+
[0,812],
|
|
1375
1381
|
'annoNamePath',
|
|
1376
|
-
['miA',
|
|
1377
|
-
{'.':['c',
|
|
1382
|
+
['miA',791],
|
|
1383
|
+
{'.':['c',792],'':794},
|
|
1378
1384
|
{
|
|
1379
|
-
Id:['ciA',
|
|
1380
|
-
'@':['c',
|
|
1385
|
+
Id:['ciA',791],
|
|
1386
|
+
'@':['c',793],
|
|
1381
1387
|
},
|
|
1382
|
-
['miA',
|
|
1383
|
-
{'#':[0,
|
|
1388
|
+
['miA',791],
|
|
1389
|
+
{'#':[0,803,,'annoInSameLine'],'':0},
|
|
1384
1390
|
'annoPath',
|
|
1385
1391
|
{
|
|
1386
|
-
Id:['ciA',
|
|
1387
|
-
'@':['c',
|
|
1392
|
+
Id:['ciA',798],
|
|
1393
|
+
'@':['c',797],
|
|
1388
1394
|
},
|
|
1389
|
-
['miA',
|
|
1390
|
-
{'.':['c',
|
|
1395
|
+
['miA',798],
|
|
1396
|
+
{'.':['c',799],'':801},
|
|
1391
1397
|
{
|
|
1392
|
-
Id:['ciA',
|
|
1393
|
-
'@':['c',
|
|
1398
|
+
Id:['ciA',798],
|
|
1399
|
+
'@':['c',800],
|
|
1394
1400
|
},
|
|
1395
|
-
['miA',
|
|
1396
|
-
{'#':[0,
|
|
1401
|
+
['miA',798],
|
|
1402
|
+
{'#':[0,803],'':0},
|
|
1397
1403
|
'annoPathVariant',
|
|
1398
|
-
['m',
|
|
1399
|
-
['miA',
|
|
1400
|
-
{'.':['c',
|
|
1401
|
-
['miA',
|
|
1404
|
+
['m',804,'#'],
|
|
1405
|
+
['miA',805],
|
|
1406
|
+
{'.':['c',806],'':0},
|
|
1407
|
+
['miA',805],
|
|
1402
1408
|
'annoStructValue',
|
|
1403
|
-
[
|
|
1404
|
-
{':':['c',
|
|
1405
|
-
[0,
|
|
1409
|
+
[809,796],
|
|
1410
|
+
{':':['c',810],'':0},
|
|
1411
|
+
[0,812],
|
|
1406
1412
|
'annoValue',
|
|
1407
1413
|
{
|
|
1408
|
-
'#':[0,
|
|
1409
|
-
'+':['c',
|
|
1410
|
-
Id:[0,
|
|
1411
|
-
'{':['c',
|
|
1412
|
-
'[':['c',
|
|
1413
|
-
'(':['c',
|
|
1414
|
+
'#':[0,769],null:'#',true:'#',false:'#',Number:'#',String:'#',QuotedLiteral:'#',
|
|
1415
|
+
'+':['c',813],'-':'+',
|
|
1416
|
+
Id:[0,796],'@':'Id',
|
|
1417
|
+
'{':['c',814],
|
|
1418
|
+
'[':['c',817,,,,'arrayAnno'],
|
|
1419
|
+
'(':['c',823],
|
|
1414
1420
|
},
|
|
1415
1421
|
['m',0,'Number'],
|
|
1416
|
-
{Id:[
|
|
1422
|
+
{Id:[815,808],'@':'Id','':816},
|
|
1417
1423
|
{
|
|
1418
|
-
',':['c',
|
|
1419
|
-
'}':
|
|
1420
|
-
Id:['g',
|
|
1424
|
+
',':['c',814],
|
|
1425
|
+
'}':816,
|
|
1426
|
+
Id:['g',814,,'fail'],'@':'Id',
|
|
1421
1427
|
},
|
|
1422
|
-
['
|
|
1423
|
-
['m',0,'}'],
|
|
1428
|
+
['m',0,'}','arrayAnno','orNotEmpty'],
|
|
1424
1429
|
{
|
|
1425
|
-
Id:[
|
|
1426
|
-
'...':['c',
|
|
1427
|
-
'':
|
|
1430
|
+
Id:[821,812],'#':'Id','(':'Id','+':'Id','-':'Id','@':'Id','[':'Id','{':'Id',Number:'Id',String:'Id',QuotedLiteral:'Id',
|
|
1431
|
+
'...':['c',818,,'arrayAnno','ellipsis'],
|
|
1432
|
+
'':822
|
|
1428
1433
|
},
|
|
1429
1434
|
{
|
|
1430
|
-
up:['ck',
|
|
1431
|
-
',':
|
|
1435
|
+
up:['ck',819],
|
|
1436
|
+
',':821,']':821,
|
|
1432
1437
|
},
|
|
1433
|
-
['mk',
|
|
1434
|
-
[
|
|
1438
|
+
['mk',820,'to'],
|
|
1439
|
+
[821,812],
|
|
1435
1440
|
{
|
|
1436
|
-
',':['c',
|
|
1437
|
-
']':
|
|
1441
|
+
',':['c',817],
|
|
1442
|
+
']':822,
|
|
1438
1443
|
},
|
|
1439
|
-
['
|
|
1440
|
-
[
|
|
1441
|
-
[827,640],
|
|
1444
|
+
['m',0,']','arrayAnno','bracket'],
|
|
1445
|
+
[824,640],
|
|
1442
1446
|
['m',0,')'],
|
|
1443
1447
|
]
|
|
1444
1448
|
class CdlParser extends AstBuildingParser{
|
|
@@ -3502,8 +3506,8 @@ default:return this.exit_()
|
|
|
3502
3506
|
excludingClause($,$next){
|
|
3503
3507
|
this.rule_(551,$next)
|
|
3504
3508
|
for(;;)switch(this.s){
|
|
3505
|
-
case 551:this.mk(552,'excluding');continue
|
|
3506
|
-
case 552:
|
|
3509
|
+
case 551:if(this.mk(552,'excluding')){ $.query.excludingDict = this.createDict(); }continue
|
|
3510
|
+
case 552:this.m(553,'{');continue
|
|
3507
3511
|
case 553:switch(this.l()){
|
|
3508
3512
|
case'Id':this.s=554;continue
|
|
3509
3513
|
default:this.e();continue
|
|
@@ -4022,62 +4026,63 @@ this.rule_(707,$next)
|
|
|
4022
4026
|
for(;;)switch(this.s){
|
|
4023
4027
|
case 707:switch(this.l()){
|
|
4024
4028
|
case'(':if(this.c(708)){open=this.lb();this.prepareSpecialFunction(); $.pathStep.args = this.createArray(); }continue
|
|
4025
|
-
default:this.s=
|
|
4029
|
+
default:this.s=726;continue
|
|
4026
4030
|
}
|
|
4027
4031
|
case 708:switch(this.l()){
|
|
4028
|
-
case'
|
|
4029
|
-
|
|
4032
|
+
case')':this.s=725;continue
|
|
4033
|
+
case'Id':if(this.gc(718,'isNamedArg')&&this.ciA(709,'paramname'))id=this.lb();continue
|
|
4034
|
+
default:this.s=718;continue
|
|
4030
4035
|
}
|
|
4031
4036
|
case 709:switch(this.l()){
|
|
4032
4037
|
case':':if(this.c(710)){ $.pathStep.args = this.createDict( open ); $.pathStep.$syntax = ':'; }continue
|
|
4033
|
-
case'=>':if(this.c(
|
|
4038
|
+
case'=>':if(this.c(714)){ $.pathStep.args = this.createDict(); }continue
|
|
4034
4039
|
default:this.e();continue
|
|
4035
4040
|
}
|
|
4036
4041
|
case 710:if(this.expression(_={},711)){expr=_.expr; this.addNamedArg( $.pathStep, id, expr ); }continue
|
|
4037
4042
|
case 711:switch(this.l()){
|
|
4038
4043
|
case',':this.c(712);continue
|
|
4039
|
-
|
|
4044
|
+
case')':this.s=725;continue
|
|
4045
|
+
default:this.e();continue
|
|
4040
4046
|
}
|
|
4041
4047
|
case 712:switch(this.l()){
|
|
4042
4048
|
case'Id':if(this.ciA(713,'paramname'))id=this.lb();continue
|
|
4043
|
-
case')':this.s=
|
|
4049
|
+
case')':this.s=725;continue
|
|
4044
4050
|
default:this.e();continue
|
|
4045
4051
|
}
|
|
4046
|
-
case 713:this.m(
|
|
4047
|
-
case 714:if(this.expression(_={},
|
|
4048
|
-
case 715:
|
|
4049
|
-
case
|
|
4050
|
-
case'
|
|
4051
|
-
default:this.
|
|
4052
|
+
case 713:this.m(710,':');continue
|
|
4053
|
+
case 714:if(this.expression(_={},715)){expr=_.expr; this.addNamedArg( $.pathStep, id, expr ); }continue
|
|
4054
|
+
case 715:switch(this.l()){
|
|
4055
|
+
case',':this.c(716);continue
|
|
4056
|
+
case')':this.s=725;continue
|
|
4057
|
+
default:this.e();continue
|
|
4052
4058
|
}
|
|
4053
|
-
case
|
|
4054
|
-
case'Id':if(this.ciA(
|
|
4055
|
-
case')':this.s=
|
|
4059
|
+
case 716:switch(this.l()){
|
|
4060
|
+
case'Id':if(this.ciA(717,'paramname'))id=this.lb();continue
|
|
4061
|
+
case')':this.s=725;continue
|
|
4056
4062
|
default:this.e();continue
|
|
4057
4063
|
}
|
|
4058
|
-
case
|
|
4059
|
-
case
|
|
4064
|
+
case 717:this.m(714,'=>');continue
|
|
4065
|
+
case 718:if(this.funcExpression(_={},719)){expr=_.expr; $.pathStep.args.push( expr ); }continue
|
|
4066
|
+
case 719:switch(this.l()){
|
|
4067
|
+
case',':if(this.c(720)){this.nextFunctionArgument()}continue;
|
|
4068
|
+
default:this.s=722;continue
|
|
4069
|
+
}
|
|
4060
4070
|
case 720:switch(this.l()){
|
|
4061
|
-
case'
|
|
4062
|
-
default:this.s=
|
|
4071
|
+
case')':this.c(721);continue
|
|
4072
|
+
default:this.s=718;continue
|
|
4063
4073
|
}
|
|
4064
4074
|
case 721:switch(this.l()){
|
|
4065
|
-
case'
|
|
4066
|
-
default:this.
|
|
4075
|
+
case'[':this.cardinalityAndFilter($,0);continue
|
|
4076
|
+
default:this.gr(['*','+','-','.','/','<','=','>','?','!=','<=','<>','==','>=','in','is','or','||','and','not','like','between']);continue
|
|
4067
4077
|
}
|
|
4068
4078
|
case 722:switch(this.lk()){
|
|
4069
|
-
case'
|
|
4070
|
-
|
|
4071
|
-
default:this.ei();continue
|
|
4079
|
+
case'order':if(this.ck(723)){ expr = $.pathStep.args[$.pathStep.args.length - 1] = this.applyOpToken( expr ); }continue
|
|
4080
|
+
default:this.s=725;continue
|
|
4072
4081
|
}
|
|
4073
|
-
case 723:
|
|
4074
|
-
case
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
case 724:if(this.mk(725,'by')){ this.pushXprToken( expr ); }continue
|
|
4078
|
-
case 725:if(this.orderByClauseAsXpr({outer:expr.args},726)){ this.attachLocation( expr ); }continue
|
|
4079
|
-
case 726:if(this.m(727,')')){ this.finalizeDictOrArray( $.pathStep.args ); }continue
|
|
4080
|
-
case 727:switch(this.l()){
|
|
4082
|
+
case 723:if(this.mk(724,'by')){ this.pushXprToken( expr ); }continue
|
|
4083
|
+
case 724:if(this.orderByClauseAsXpr({outer:expr.args},725)){ this.attachLocation( expr ); }continue
|
|
4084
|
+
case 725:if(this.m(726,')')){ this.finalizeDictOrArray( $.pathStep.args ); }continue
|
|
4085
|
+
case 726:switch(this.l()){
|
|
4081
4086
|
case'[':this.cardinalityAndFilter($,0);continue
|
|
4082
4087
|
default:this.gr(['*','+','-','.','/','<','=','>','?','!=','<=','<>','==','>=','in','is','or','||','and','not','like','between']);continue
|
|
4083
4088
|
}
|
|
@@ -4088,22 +4093,22 @@ funcExpression($,$next){
|
|
|
4088
4093
|
$.expr??=undefined
|
|
4089
4094
|
let args
|
|
4090
4095
|
let tok;let e;let _
|
|
4091
|
-
this.rule_(
|
|
4096
|
+
this.rule_(728,$next)
|
|
4092
4097
|
for(;;)switch(this.s){
|
|
4093
|
-
case
|
|
4094
|
-
case'Id':case'#':case'(':case'+':case'-':case':':case'?':case'Number':case'String':case'QuotedLiteral':if(this.expression(_={},
|
|
4095
|
-
case'GenericExpr':if(this.ckA(
|
|
4096
|
-
case'GenericIntro':if(this.ckA(
|
|
4098
|
+
case 728:switch(this.lGenericIntroOrExpr()){
|
|
4099
|
+
case'Id':case'#':case'(':case'+':case'-':case':':case'?':case'Number':case'String':case'QuotedLiteral':if(this.expression(_={},730))$.expr=_.expr;continue
|
|
4100
|
+
case'GenericExpr':if(this.ckA(730)){tok=this.lb(); $.expr = { val: tok.keyword ?? tok.type, location: tok.location, literal: 'token' }; }continue
|
|
4101
|
+
case'GenericIntro':if(this.ckA(729)){ $.expr = this.applyOpToken(); args = $.expr.args; }continue
|
|
4097
4102
|
default:this.e();continue
|
|
4098
4103
|
}
|
|
4099
|
-
case
|
|
4100
|
-
case
|
|
4101
|
-
case'GenericSeparator':if(this.ckA(
|
|
4104
|
+
case 729:if(this.expression(_={},730)){e=_.expr; $.expr.args.push( e ); }continue
|
|
4105
|
+
case 730:switch(this.lGenericSeparator()){
|
|
4106
|
+
case'GenericSeparator':if(this.ckA(731)){ if (args) this.pushXprToken( args ); else { $.expr= this.applyOpToken( $.expr ); args = $.expr.args; } }continue
|
|
4102
4107
|
default:this.gr([')',',','order']);continue
|
|
4103
4108
|
}
|
|
4104
|
-
case
|
|
4105
|
-
case'Id':case'#':case'(':case'+':case'-':case':':case'?':case'Number':case'String':case'QuotedLiteral':if(this.expression(_={},
|
|
4106
|
-
case'GenericExpr':if(this.ckA(
|
|
4109
|
+
case 731:switch(this.lGenericExpr()){
|
|
4110
|
+
case'Id':case'#':case'(':case'+':case'-':case':':case'?':case'Number':case'String':case'QuotedLiteral':if(this.expression(_={},730)){e=_.expr; args.push( e ); }continue
|
|
4111
|
+
case'GenericExpr':if(this.ckA(730)){ this.pushXprToken( args ); }continue
|
|
4107
4112
|
default:this.e();continue
|
|
4108
4113
|
}
|
|
4109
4114
|
default:
|
|
@@ -4113,27 +4118,27 @@ return this.exit_()
|
|
|
4113
4118
|
}
|
|
4114
4119
|
overClause($,$next){
|
|
4115
4120
|
let over=[]
|
|
4116
|
-
this.rule_(
|
|
4121
|
+
this.rule_(733,$next)
|
|
4117
4122
|
for(;;)switch(this.s){
|
|
4118
|
-
case
|
|
4119
|
-
case
|
|
4120
|
-
case'partition':if(this.ck(
|
|
4121
|
-
default:this.s=
|
|
4122
|
-
}
|
|
4123
|
-
case
|
|
4124
|
-
case
|
|
4125
|
-
case
|
|
4126
|
-
case'order':if(this.ck(
|
|
4127
|
-
default:this.s=
|
|
4128
|
-
}
|
|
4129
|
-
case
|
|
4130
|
-
case
|
|
4131
|
-
case
|
|
4132
|
-
case'rows':if(this.ck(
|
|
4133
|
-
default:this.s=
|
|
4134
|
-
}
|
|
4135
|
-
case
|
|
4136
|
-
case
|
|
4123
|
+
case 733:this.m(734,'(');continue
|
|
4124
|
+
case 734:switch(this.lk()){
|
|
4125
|
+
case'partition':if(this.ck(735)){ this.pushXprToken( over ); }continue
|
|
4126
|
+
default:this.s=737;continue
|
|
4127
|
+
}
|
|
4128
|
+
case 735:if(this.mk(736,'by')){ this.pushXprToken( over ); }continue
|
|
4129
|
+
case 736:this.expressionsAsXpr({outer:over},737);continue
|
|
4130
|
+
case 737:switch(this.lk()){
|
|
4131
|
+
case'order':if(this.ck(738)){ this.pushXprToken( over ); }continue
|
|
4132
|
+
default:this.s=740;continue
|
|
4133
|
+
}
|
|
4134
|
+
case 738:if(this.mk(739,'by')){ this.pushXprToken( over ); }continue
|
|
4135
|
+
case 739:this.orderByClauseAsXpr({outer:over},740);continue
|
|
4136
|
+
case 740:switch(this.lk()){
|
|
4137
|
+
case'rows':if(this.ck(741)){ this.pushXprToken( over ); }continue
|
|
4138
|
+
default:this.s=742;continue
|
|
4139
|
+
}
|
|
4140
|
+
case 741:this.windowFrameClause({outer:over},742);continue
|
|
4141
|
+
case 742:this.m(0,')');continue
|
|
4137
4142
|
default:
|
|
4138
4143
|
$.outer.push( this.surroundByParens( this.ixprAst( over ) ) )
|
|
4139
4144
|
return this.exit_()
|
|
@@ -4142,14 +4147,14 @@ return this.exit_()
|
|
|
4142
4147
|
expressionsAsXpr($,$next){
|
|
4143
4148
|
let args=[]
|
|
4144
4149
|
let expr;let _
|
|
4145
|
-
this.rule_(
|
|
4150
|
+
this.rule_(744,$next)
|
|
4146
4151
|
for(;;)switch(this.s){
|
|
4147
|
-
case
|
|
4148
|
-
case
|
|
4149
|
-
case',':if(this.c(
|
|
4152
|
+
case 744:if(this.expression(_={},745)){expr=_.expr; args.push( expr ); }continue
|
|
4153
|
+
case 745:switch(this.l()){
|
|
4154
|
+
case',':if(this.c(746)){ this.pushXprToken( args ); }continue
|
|
4150
4155
|
default:this.gr([')','rows','order']);continue
|
|
4151
4156
|
}
|
|
4152
|
-
case
|
|
4157
|
+
case 746:if(this.expression(_={},745)){expr=_.expr; args.push( expr ); }continue
|
|
4153
4158
|
default:
|
|
4154
4159
|
$.outer.push( this.ixprAst( args ) )
|
|
4155
4160
|
return this.exit_()
|
|
@@ -4157,14 +4162,14 @@ return this.exit_()
|
|
|
4157
4162
|
}
|
|
4158
4163
|
orderByClauseAsXpr($,$next){
|
|
4159
4164
|
let args=[]
|
|
4160
|
-
this.rule_(
|
|
4165
|
+
this.rule_(748,$next)
|
|
4161
4166
|
for(;;)switch(this.s){
|
|
4162
|
-
case
|
|
4163
|
-
case
|
|
4164
|
-
case',':if(this.c(
|
|
4167
|
+
case 748:this.orderBySpecAsXpr({args},749);continue
|
|
4168
|
+
case 749:switch(this.l()){
|
|
4169
|
+
case',':if(this.c(750)){ this.pushXprToken( args ); }continue
|
|
4165
4170
|
default:this.gr([')']);continue
|
|
4166
4171
|
}
|
|
4167
|
-
case
|
|
4172
|
+
case 750:this.orderBySpecAsXpr({args},749);continue
|
|
4168
4173
|
default:
|
|
4169
4174
|
$.outer.push( this.ixprAst( args ) )
|
|
4170
4175
|
return this.exit_()
|
|
@@ -4172,18 +4177,18 @@ return this.exit_()
|
|
|
4172
4177
|
}
|
|
4173
4178
|
orderBySpecAsXpr($,$next){
|
|
4174
4179
|
let expr;let _
|
|
4175
|
-
this.rule_(
|
|
4180
|
+
this.rule_(752,$next)
|
|
4176
4181
|
for(;;)switch(this.s){
|
|
4177
|
-
case
|
|
4178
|
-
case
|
|
4179
|
-
case'asc':case'desc':if(this.ck(
|
|
4180
|
-
default:this.s=
|
|
4182
|
+
case 752:if(this.expression(_={},753)){expr=_.expr; $.args.push( expr ); }continue
|
|
4183
|
+
case 753:switch(this.lk()){
|
|
4184
|
+
case'asc':case'desc':if(this.ck(754)){ this.pushXprToken( $.args ); }continue
|
|
4185
|
+
default:this.s=754;continue
|
|
4181
4186
|
}
|
|
4182
|
-
case
|
|
4183
|
-
case'nulls':if(this.ck(
|
|
4187
|
+
case 754:switch(this.lk()){
|
|
4188
|
+
case'nulls':if(this.ck(755)){ this.pushXprToken( $.args ); }continue
|
|
4184
4189
|
default:this.gr([')',',']);continue
|
|
4185
4190
|
}
|
|
4186
|
-
case
|
|
4191
|
+
case 755:switch(this.lk()){
|
|
4187
4192
|
case'last':case'first':if(this.ck(0)){ this.pushXprToken( $.args ); }continue
|
|
4188
4193
|
default:this.e();continue
|
|
4189
4194
|
}
|
|
@@ -4192,50 +4197,50 @@ default:return this.exit_()
|
|
|
4192
4197
|
}
|
|
4193
4198
|
windowFrameClause($,$next){
|
|
4194
4199
|
let args=[]
|
|
4195
|
-
this.rule_(
|
|
4200
|
+
this.rule_(757,$next)
|
|
4196
4201
|
for(;;)switch(this.s){
|
|
4197
|
-
case
|
|
4198
|
-
case'unbounded':if(this.ck(
|
|
4199
|
-
case'Number':if(this.c(
|
|
4200
|
-
case'current':if(this.ck(
|
|
4201
|
-
case'between':if(this.ck(
|
|
4202
|
+
case 757:switch(this.lk()){
|
|
4203
|
+
case'unbounded':if(this.ck(758)){ this.pushXprToken( args ); }continue
|
|
4204
|
+
case'Number':if(this.c(758)){ args.push( this.unsignedIntegerLiteral() ); }continue
|
|
4205
|
+
case'current':if(this.ck(759)){ this.pushXprToken( args ); }continue
|
|
4206
|
+
case'between':if(this.ck(760)){ this.pushXprToken( args ); }continue
|
|
4202
4207
|
default:this.e();continue
|
|
4203
4208
|
}
|
|
4204
|
-
case
|
|
4205
|
-
case
|
|
4206
|
-
case
|
|
4207
|
-
case
|
|
4208
|
-
case
|
|
4209
|
+
case 758:if(this.mk(0,'preceding')){ this.pushXprToken( args ); }continue
|
|
4210
|
+
case 759:if(this.mk(0,'row')){ this.pushXprToken( args ); }continue
|
|
4211
|
+
case 760:this.windowFrameBoundSpec({args},761);continue
|
|
4212
|
+
case 761:if(this.mk(762,'and')){ this.pushXprToken( args ); }continue
|
|
4213
|
+
case 762:this.windowFrameBoundSpec({args},0);continue
|
|
4209
4214
|
default:
|
|
4210
4215
|
$.outer.push( this.ixprAst( args ) )
|
|
4211
4216
|
return this.exit_()
|
|
4212
4217
|
}
|
|
4213
4218
|
}
|
|
4214
4219
|
windowFrameBoundSpec($,$next){
|
|
4215
|
-
this.rule_(
|
|
4220
|
+
this.rule_(764,$next)
|
|
4216
4221
|
for(;;)switch(this.s){
|
|
4217
|
-
case
|
|
4218
|
-
case'unbounded':if(this.ck(
|
|
4219
|
-
case'Number':if(this.c(
|
|
4220
|
-
case'current':if(this.ck(
|
|
4222
|
+
case 764:switch(this.lk()){
|
|
4223
|
+
case'unbounded':if(this.ck(765)){ this.pushXprToken( $.args ); }continue
|
|
4224
|
+
case'Number':if(this.c(765)){ $.args.push( this.unsignedIntegerLiteral() ); }continue
|
|
4225
|
+
case'current':if(this.ck(767)){ this.pushXprToken( $.args ); }continue
|
|
4221
4226
|
default:this.e();continue
|
|
4222
4227
|
}
|
|
4223
|
-
case
|
|
4224
|
-
case'following':this.ck(
|
|
4225
|
-
case'preceding':this.ck(
|
|
4228
|
+
case 765:switch(this.lk()){
|
|
4229
|
+
case'following':this.ck(766);continue
|
|
4230
|
+
case'preceding':this.ck(766);continue
|
|
4226
4231
|
default:this.e();continue
|
|
4227
4232
|
}
|
|
4228
|
-
case
|
|
4229
|
-
case
|
|
4233
|
+
case 766:if(this.gr()){ this.pushXprToken( $.args ); }continue
|
|
4234
|
+
case 767:if(this.mk(0,'row')){ this.pushXprToken( $.args ); }continue
|
|
4230
4235
|
default:return this.exit_()
|
|
4231
4236
|
}
|
|
4232
4237
|
}
|
|
4233
4238
|
literalValue($,$next){
|
|
4234
4239
|
$.expr??={}
|
|
4235
|
-
this.rule_(
|
|
4240
|
+
this.rule_(769,$next)
|
|
4236
4241
|
for(;;)switch(this.s){
|
|
4237
|
-
case
|
|
4238
|
-
case'#':if(this.c(
|
|
4242
|
+
case 769:switch(this.lk()){
|
|
4243
|
+
case'#':if(this.c(770)){ this.reportUnexpectedSpace(); }continue
|
|
4239
4244
|
case'null':if(this.ck(0)){ $.expr = { literal: 'null', val: null }; }continue
|
|
4240
4245
|
case'true':case'false':if(this.ck(0)){ $.expr = { literal: 'boolean', val: this.lb().keyword === 'true' }; }continue
|
|
4241
4246
|
case'Number':if(this.c(0)){ $.expr = this.numberLiteral(); }continue
|
|
@@ -4243,17 +4248,17 @@ case'String':if(this.c(0)){ $.expr = this.quotedLiteral(); }continue
|
|
|
4243
4248
|
case'QuotedLiteral':if(this.c(0)){ $.expr = this.quotedLiteral(); }continue
|
|
4244
4249
|
default:this.e();continue
|
|
4245
4250
|
}
|
|
4246
|
-
case
|
|
4251
|
+
case 770:if(this.miA(0,'enumref')){ $.expr = { literal: 'enum', sym: this.identAst() } }continue
|
|
4247
4252
|
default:
|
|
4248
4253
|
this.attachLocation( $.expr )
|
|
4249
4254
|
return this.exit_()
|
|
4250
4255
|
}
|
|
4251
4256
|
}
|
|
4252
4257
|
annoAssignStd($,$next){
|
|
4253
|
-
this.rule_(
|
|
4258
|
+
this.rule_(772,$next)
|
|
4254
4259
|
for(;;)switch(this.s){
|
|
4255
|
-
case
|
|
4256
|
-
case
|
|
4260
|
+
case 772:if(this.m(773,'@')){this.annoInSameLine(); this.reportDubiousAnnoSpacing(); }continue
|
|
4261
|
+
case 773:switch(this.l()){
|
|
4257
4262
|
case'(':this.annoAssignParen($,0);continue
|
|
4258
4263
|
case'Id':this.annoAssignBase($,0);continue
|
|
4259
4264
|
default:this.e();continue
|
|
@@ -4264,10 +4269,10 @@ return this.exit_()
|
|
|
4264
4269
|
}
|
|
4265
4270
|
}
|
|
4266
4271
|
annoAssignCol($,$next){
|
|
4267
|
-
this.rule_(
|
|
4272
|
+
this.rule_(775,$next)
|
|
4268
4273
|
for(;;)switch(this.s){
|
|
4269
|
-
case
|
|
4270
|
-
case
|
|
4274
|
+
case 775:if(this.m(776,'@')){ this.reportDubiousAnnoSpacing(); }continue
|
|
4275
|
+
case 776:switch(this.l()){
|
|
4271
4276
|
case'(':this.annoAssignParen($,0);continue
|
|
4272
4277
|
case'Id':this.annoAssignBase($,0);continue
|
|
4273
4278
|
default:this.e();continue
|
|
@@ -4279,10 +4284,10 @@ return this.exit_()
|
|
|
4279
4284
|
}
|
|
4280
4285
|
annoAssignMid($,$next){
|
|
4281
4286
|
let name;let _
|
|
4282
|
-
this.rule_(
|
|
4287
|
+
this.rule_(778,$next)
|
|
4283
4288
|
for(;;)switch(this.s){
|
|
4284
|
-
case
|
|
4285
|
-
case
|
|
4289
|
+
case 778:if(this.m(779,'@')){this.annoInSameLine(); this.reportDubiousAnnoSpacing(); }continue
|
|
4290
|
+
case 779:switch(this.l()){
|
|
4286
4291
|
case'(':this.annoAssignParen($,0);continue
|
|
4287
4292
|
case'Id':if(this.annoNamePath(_={category:'anno'},0)){name=_.name; this.assignAnnotation( $.art, {}, name ); this.warnIfColonFollows( name ); }continue
|
|
4288
4293
|
default:this.e();continue
|
|
@@ -4293,33 +4298,33 @@ return this.exit_()
|
|
|
4293
4298
|
}
|
|
4294
4299
|
}
|
|
4295
4300
|
annoAssignParen($,$next){
|
|
4296
|
-
this.rule_(
|
|
4301
|
+
this.rule_(781,$next)
|
|
4297
4302
|
for(;;)switch(this.s){
|
|
4298
|
-
case
|
|
4299
|
-
case
|
|
4300
|
-
case'Id':this.annoAssignBase({art:$.art},
|
|
4301
|
-
default:this.s=
|
|
4303
|
+
case 781:if(this.m(782,'(')){this.annoInSameLine()}continue;
|
|
4304
|
+
case 782:switch(this.l()){
|
|
4305
|
+
case'Id':this.annoAssignBase({art:$.art},783);continue
|
|
4306
|
+
default:this.s=784;continue
|
|
4302
4307
|
}
|
|
4303
|
-
case
|
|
4304
|
-
case',':this.c(
|
|
4305
|
-
case')':this.s=
|
|
4308
|
+
case 783:switch(this.l()){
|
|
4309
|
+
case',':this.c(782);continue
|
|
4310
|
+
case')':this.s=784;continue
|
|
4306
4311
|
default:this.e();continue
|
|
4307
4312
|
}
|
|
4308
|
-
case
|
|
4313
|
+
case 784:this.m(0,')');continue
|
|
4309
4314
|
default:return this.exit_()
|
|
4310
4315
|
}
|
|
4311
4316
|
}
|
|
4312
4317
|
annoAssignBase($,$next){
|
|
4313
4318
|
let value={}
|
|
4314
4319
|
let name;let _
|
|
4315
|
-
this.rule_(
|
|
4320
|
+
this.rule_(786,$next)
|
|
4316
4321
|
for(;;)switch(this.s){
|
|
4317
|
-
case
|
|
4318
|
-
case
|
|
4319
|
-
case':':this.gc(0,'annoInSameLine')&&this.c(
|
|
4322
|
+
case 786:if(this.annoNamePath(_={category:'anno'},787))name=_.name;continue
|
|
4323
|
+
case 787:switch(this.l()){
|
|
4324
|
+
case':':this.gc(0,'annoInSameLine')&&this.c(788);continue
|
|
4320
4325
|
default:this.gr();continue
|
|
4321
4326
|
}
|
|
4322
|
-
case
|
|
4327
|
+
case 788:if(this.annoValue(_={},0))value=_.value;continue
|
|
4323
4328
|
default:
|
|
4324
4329
|
this.assignAnnotation( $.art, value, name || {} )
|
|
4325
4330
|
return this.exit_()
|
|
@@ -4328,20 +4333,20 @@ return this.exit_()
|
|
|
4328
4333
|
annoNamePath($,$next){
|
|
4329
4334
|
$.name??=new XsnName()
|
|
4330
4335
|
let at
|
|
4331
|
-
this.rule_(
|
|
4336
|
+
this.rule_(790,$next)
|
|
4332
4337
|
for(;;)switch(this.s){
|
|
4333
|
-
case
|
|
4334
|
-
case
|
|
4335
|
-
case'.':this.c(
|
|
4336
|
-
default:this.s=
|
|
4338
|
+
case 790:if(this.miA(791,$.category)){ $.name.path = [ this.identAst() ]; }continue
|
|
4339
|
+
case 791:switch(this.l()){
|
|
4340
|
+
case'.':this.c(792);continue
|
|
4341
|
+
default:this.s=794;continue
|
|
4337
4342
|
}
|
|
4338
|
-
case
|
|
4339
|
-
case'Id':if(this.ciA(
|
|
4340
|
-
case'@':if(this.c(
|
|
4343
|
+
case 792:switch(this.l()){
|
|
4344
|
+
case'Id':if(this.ciA(791,$.category)){ $.name.path.push( this.identAst() ); }continue
|
|
4345
|
+
case'@':if(this.c(793))at=this.lb();continue
|
|
4341
4346
|
default:this.e();continue
|
|
4342
4347
|
}
|
|
4343
|
-
case
|
|
4344
|
-
case
|
|
4348
|
+
case 793:if(this.miA(791,$.category)){ $.name.path.push( this.identAstWithPrefix( at ) ); }continue
|
|
4349
|
+
case 794:switch(this.l()){
|
|
4345
4350
|
case'#':this.gc(0,'annoInSameLine')&&this.annoPathVariant({nameOrRef:$.name},0);continue
|
|
4346
4351
|
default:this.gr();continue
|
|
4347
4352
|
}
|
|
@@ -4352,25 +4357,25 @@ return this.exit_()
|
|
|
4352
4357
|
}
|
|
4353
4358
|
annoPath($,$next){
|
|
4354
4359
|
let at
|
|
4355
|
-
this.rule_(
|
|
4360
|
+
this.rule_(796,$next)
|
|
4356
4361
|
for(;;)switch(this.s){
|
|
4357
|
-
case
|
|
4358
|
-
case'Id':if(this.ciA(
|
|
4359
|
-
case'@':if(this.c(
|
|
4362
|
+
case 796:switch(this.l()){
|
|
4363
|
+
case'Id':if(this.ciA(798,$.category)){ $.nameOrRef.path = [ this.identAst() ]; }continue
|
|
4364
|
+
case'@':if(this.c(797))at=this.lb();continue
|
|
4360
4365
|
default:this.e();continue
|
|
4361
4366
|
}
|
|
4362
|
-
case
|
|
4363
|
-
case
|
|
4364
|
-
case'.':this.c(
|
|
4365
|
-
default:this.s=
|
|
4367
|
+
case 797:if(this.miA(798,$.category)){ $.nameOrRef.path = [ this.identAstWithPrefix( at ) ]; }continue
|
|
4368
|
+
case 798:switch(this.l()){
|
|
4369
|
+
case'.':this.c(799);continue
|
|
4370
|
+
default:this.s=801;continue
|
|
4366
4371
|
}
|
|
4367
|
-
case
|
|
4368
|
-
case'Id':if(this.ciA(
|
|
4369
|
-
case'@':if(this.c(
|
|
4372
|
+
case 799:switch(this.l()){
|
|
4373
|
+
case'Id':if(this.ciA(798,$.category)){ $.nameOrRef.path.push( this.identAst() ); }continue
|
|
4374
|
+
case'@':if(this.c(800))at=this.lb();continue
|
|
4370
4375
|
default:this.e();continue
|
|
4371
4376
|
}
|
|
4372
|
-
case
|
|
4373
|
-
case
|
|
4377
|
+
case 800:if(this.miA(798,$.category)){ $.nameOrRef.path.push( this.identAstWithPrefix( at ) ); }continue
|
|
4378
|
+
case 801:switch(this.l()){
|
|
4374
4379
|
case'#':this.annoPathVariant({nameOrRef:$.nameOrRef},0);continue
|
|
4375
4380
|
default:this.gr();continue
|
|
4376
4381
|
}
|
|
@@ -4380,15 +4385,15 @@ return this.exit_()
|
|
|
4380
4385
|
}
|
|
4381
4386
|
}
|
|
4382
4387
|
annoPathVariant($,$next){
|
|
4383
|
-
this.rule_(
|
|
4388
|
+
this.rule_(803,$next)
|
|
4384
4389
|
for(;;)switch(this.s){
|
|
4385
|
-
case
|
|
4386
|
-
case
|
|
4387
|
-
case
|
|
4388
|
-
case'.':this.c(
|
|
4390
|
+
case 803:if(this.m(804,'#')){ this.reportUnexpectedSpace(); }continue
|
|
4391
|
+
case 804:if(this.miA(805,'variant')){ $.nameOrRef.variant = { path: [ this.identAst() ] }; }continue
|
|
4392
|
+
case 805:switch(this.l()){
|
|
4393
|
+
case'.':this.c(806);continue
|
|
4389
4394
|
default:this.gr();continue
|
|
4390
4395
|
}
|
|
4391
|
-
case
|
|
4396
|
+
case 806:if(this.miA(805,'variant')){ $.nameOrRef.variant.path.push( this.identAst() ); }continue
|
|
4392
4397
|
default:
|
|
4393
4398
|
this.attachLocation( $.nameOrRef.variant )
|
|
4394
4399
|
return this.exit_()
|
|
@@ -4398,14 +4403,14 @@ annoStructValue($,$next){
|
|
|
4398
4403
|
$.value??={}
|
|
4399
4404
|
let name=new XsnName()
|
|
4400
4405
|
let _
|
|
4401
|
-
this.rule_(
|
|
4406
|
+
this.rule_(808,$next)
|
|
4402
4407
|
for(;;)switch(this.s){
|
|
4403
|
-
case
|
|
4404
|
-
case
|
|
4405
|
-
case':':this.c(
|
|
4408
|
+
case 808:if(this.annoPath({nameOrRef:name,category:'name'},809)){ this.attachLocation( name ); }continue
|
|
4409
|
+
case 809:switch(this.l()){
|
|
4410
|
+
case':':this.c(810);continue
|
|
4406
4411
|
default:if(this.gr(['Id',',','@','}'])){ this.attachLocation( $.value ); }continue
|
|
4407
4412
|
}
|
|
4408
|
-
case
|
|
4413
|
+
case 810:if(this.annoValue(_={},0))$.value=_.value;continue
|
|
4409
4414
|
default:
|
|
4410
4415
|
$.value.name = name
|
|
4411
4416
|
return this.exit_()
|
|
@@ -4414,53 +4419,51 @@ return this.exit_()
|
|
|
4414
4419
|
annoValue($,$next){
|
|
4415
4420
|
$.value??={}
|
|
4416
4421
|
let sign;let sub;let ellipsis;let upTo;let _
|
|
4417
|
-
this.rule_(
|
|
4422
|
+
this.rule_(812,$next)
|
|
4418
4423
|
for(;;)switch(this.s){
|
|
4419
|
-
case
|
|
4424
|
+
case 812:switch(this.lk()){
|
|
4420
4425
|
case'#':case'null':case'true':case'false':case'Number':case'String':case'QuotedLiteral':if(this.literalValue(_={},0)){$.value=_.expr; this.adjustAnnoNumber( $.value ); }continue
|
|
4421
|
-
case'+':case'-':if(this.c(
|
|
4426
|
+
case'+':case'-':if(this.c(813))sign=this.lb();continue
|
|
4422
4427
|
case'Id':case'@':this.annoPath({nameOrRef:$.value,category:'annoref'},0);continue
|
|
4423
|
-
case'{':if(this.c(
|
|
4428
|
+
case'{':if(this.c(814)){ if (!this.dynamic_.arrayAnno) $.value.$flatten = [];
|
|
4424
4429
|
else { $.value.struct = Object.create(null); $.value.literal = 'struct'; } }continue
|
|
4425
|
-
case'[':if(this.c(
|
|
4426
|
-
case'(':this.c(
|
|
4430
|
+
case'[':if(this.c(817)){this.arrayAnno(); $.value.val = []; $.value.literal = 'array' }continue
|
|
4431
|
+
case'(':this.c(823);continue
|
|
4427
4432
|
default:this.ei();continue
|
|
4428
4433
|
}
|
|
4429
|
-
case
|
|
4430
|
-
case
|
|
4431
|
-
case'Id':case'@':if(this.annoStructValue(_={},
|
|
4434
|
+
case 813:if(this.m(0,'Number')){ this.adjustAnnoNumber( $.value = this.numberLiteral( sign ) ); }continue
|
|
4435
|
+
case 814:switch(this.l()){
|
|
4436
|
+
case'Id':case'@':if(this.annoStructValue(_={},815)){sub=_.value; if ($.value.$flatten) $.value.$flatten.push( sub );
|
|
4432
4437
|
else this.addDef( sub, $.value, 'struct', null, sub.name ); }continue
|
|
4433
|
-
default:this.s=
|
|
4438
|
+
default:this.s=816;continue
|
|
4434
4439
|
}
|
|
4435
|
-
case
|
|
4436
|
-
case',':this.c(
|
|
4437
|
-
case'}':this.s=
|
|
4438
|
-
case'Id':case'@':this.ec('fail')&&this.g(
|
|
4440
|
+
case 815:switch(this.l()){
|
|
4441
|
+
case',':this.c(814);continue
|
|
4442
|
+
case'}':this.s=816;continue
|
|
4443
|
+
case'Id':case'@':this.ec('fail')&&this.g(814);continue
|
|
4439
4444
|
default:this.e();continue
|
|
4440
4445
|
}
|
|
4441
|
-
case
|
|
4442
|
-
case
|
|
4443
|
-
case
|
|
4444
|
-
case'
|
|
4445
|
-
|
|
4446
|
-
default:this.s=824;continue
|
|
4446
|
+
case 816:this.ec('arrayAnno','orNotEmpty')&&this.m(0,'}');continue
|
|
4447
|
+
case 817:switch(this.l()){
|
|
4448
|
+
case'Id':case'#':case'(':case'+':case'-':case'@':case'[':case'{':case'Number':case'String':case'QuotedLiteral':if(this.annoValue(_={},821)){sub=_.value; $.value.val.push( sub ) }continue
|
|
4449
|
+
case'...':if(this.gc(822,'arrayAnno','ellipsis')&&this.c(818))ellipsis=this.lb();continue
|
|
4450
|
+
default:this.s=822;continue
|
|
4447
4451
|
}
|
|
4448
|
-
case
|
|
4449
|
-
case'up':this.ck(
|
|
4450
|
-
case',':case']':this.s=
|
|
4452
|
+
case 818:switch(this.lk()){
|
|
4453
|
+
case'up':this.ck(819);continue
|
|
4454
|
+
case',':case']':this.s=821;{ $.value.val.push( { literal: 'token', val: '...', location: ellipsis.location } ); }continue
|
|
4451
4455
|
default:this.e();continue
|
|
4452
4456
|
}
|
|
4453
|
-
case
|
|
4454
|
-
case
|
|
4455
|
-
case
|
|
4456
|
-
case',':this.c(
|
|
4457
|
-
case']':this.s=
|
|
4457
|
+
case 819:this.mk(820,'to');continue
|
|
4458
|
+
case 820:if(this.annoValue(_={},821)){upTo=_.value; $.value.val.push( { literal: 'token', val: '...', location: ellipsis.location, upTo: upTo } ); }continue
|
|
4459
|
+
case 821:switch(this.l()){
|
|
4460
|
+
case',':this.c(817);continue
|
|
4461
|
+
case']':this.s=822;continue
|
|
4458
4462
|
default:this.e();continue
|
|
4459
4463
|
}
|
|
4460
|
-
case
|
|
4461
|
-
case
|
|
4462
|
-
case
|
|
4463
|
-
case 827:if(this.m(0,')')){ $.value.$tokenTexts = this.ruleTokensText(); }continue
|
|
4464
|
+
case 822:this.ec('arrayAnno','bracket')&&this.m(0,']');continue
|
|
4465
|
+
case 823:if(this.condition(_={},824))$.value=_.expr;continue
|
|
4466
|
+
case 824:if(this.m(0,')')){ $.value.$tokenTexts = this.ruleTokensText(); }continue
|
|
4464
4467
|
default:
|
|
4465
4468
|
this.attachLocation( $.value )
|
|
4466
4469
|
return this.exit_()
|