@sap/cds-compiler 6.2.2 → 6.3.4
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 +49 -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/enricher.js +15 -3
- 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 +36 -37
- package/lib/compiler/assert-consistency.js +1 -1
- package/lib/compiler/checks.js +47 -18
- package/lib/compiler/extend.js +1 -1
- package/lib/compiler/index.js +88 -6
- package/lib/compiler/populate.js +1 -1
- package/lib/compiler/resolve.js +7 -7
- package/lib/compiler/tweak-assocs.js +48 -25
- package/lib/edm/annotations/edmJson.js +19 -19
- package/lib/gen/BaseParser.js +1 -1
- package/lib/gen/CdlGrammar.checksum +1 -1
- package/lib/gen/CdlParser.js +384 -383
- package/lib/gen/Dictionary.json +0 -2
- package/lib/json/to-csn.js +3 -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 +12 -11
- 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
|
|
@@ -3942,7 +3946,7 @@ case 681:switch(this.l()){
|
|
|
3942
3946
|
case',':this.continueExpressionslist($,682);continue
|
|
3943
3947
|
default:this.s=682;continue
|
|
3944
3948
|
}
|
|
3945
|
-
case 682:if(this.m(0,')')){ this.surroundByParens( $.expr ); }continue
|
|
3949
|
+
case 682:if(this.m(0,')')){ if ($.expr.op?.val !== 'list' || $.expr.location) this.surroundByParens( $.expr ); else this.attachLocation( $.expr ); }continue
|
|
3946
3950
|
default:return this.exit_()
|
|
3947
3951
|
}
|
|
3948
3952
|
}
|
|
@@ -3950,7 +3954,7 @@ continueExpressionslist($,$next){
|
|
|
3950
3954
|
let e;let _
|
|
3951
3955
|
this.rule_(684,$next)
|
|
3952
3956
|
for(;;)switch(this.s){
|
|
3953
|
-
case 684:if(this.m(685,',')){ $.expr = { op: this.valueWithLocation( 'list' ), args: [ $.expr ], location:
|
|
3957
|
+
case 684:if(this.m(685,',')){ $.expr = { op: this.valueWithLocation( 'list' ), args: [ $.expr ], location: null }; }continue
|
|
3954
3958
|
case 685:switch(this.lk()){
|
|
3955
3959
|
case'Id':case'#':case'(':case'+':case'-':case':':case'?':case'not':case'case':case'cast':case'null':case'true':case'false':case'Number':case'String':case'exists':case'QuotedLiteral':this.s=686;continue
|
|
3956
3960
|
default:this.ei();continue
|
|
@@ -3963,9 +3967,7 @@ case 687:switch(this.l()){
|
|
|
3963
3967
|
case',':this.c(686);continue
|
|
3964
3968
|
default:this.gr([')']);continue
|
|
3965
3969
|
}
|
|
3966
|
-
default:
|
|
3967
|
-
this.attachLocation( $.expr )
|
|
3968
|
-
return this.exit_()
|
|
3970
|
+
default:return this.exit_()
|
|
3969
3971
|
}
|
|
3970
3972
|
}
|
|
3971
3973
|
caseExpression($,$next){
|
|
@@ -4022,62 +4024,63 @@ this.rule_(707,$next)
|
|
|
4022
4024
|
for(;;)switch(this.s){
|
|
4023
4025
|
case 707:switch(this.l()){
|
|
4024
4026
|
case'(':if(this.c(708)){open=this.lb();this.prepareSpecialFunction(); $.pathStep.args = this.createArray(); }continue
|
|
4025
|
-
default:this.s=
|
|
4027
|
+
default:this.s=726;continue
|
|
4026
4028
|
}
|
|
4027
4029
|
case 708:switch(this.l()){
|
|
4028
|
-
case'
|
|
4029
|
-
|
|
4030
|
+
case')':this.s=725;continue
|
|
4031
|
+
case'Id':if(this.gc(718,'isNamedArg')&&this.ciA(709,'paramname'))id=this.lb();continue
|
|
4032
|
+
default:this.s=718;continue
|
|
4030
4033
|
}
|
|
4031
4034
|
case 709:switch(this.l()){
|
|
4032
4035
|
case':':if(this.c(710)){ $.pathStep.args = this.createDict( open ); $.pathStep.$syntax = ':'; }continue
|
|
4033
|
-
case'=>':if(this.c(
|
|
4036
|
+
case'=>':if(this.c(714)){ $.pathStep.args = this.createDict(); }continue
|
|
4034
4037
|
default:this.e();continue
|
|
4035
4038
|
}
|
|
4036
4039
|
case 710:if(this.expression(_={},711)){expr=_.expr; this.addNamedArg( $.pathStep, id, expr ); }continue
|
|
4037
4040
|
case 711:switch(this.l()){
|
|
4038
4041
|
case',':this.c(712);continue
|
|
4039
|
-
|
|
4042
|
+
case')':this.s=725;continue
|
|
4043
|
+
default:this.e();continue
|
|
4040
4044
|
}
|
|
4041
4045
|
case 712:switch(this.l()){
|
|
4042
4046
|
case'Id':if(this.ciA(713,'paramname'))id=this.lb();continue
|
|
4043
|
-
case')':this.s=
|
|
4047
|
+
case')':this.s=725;continue
|
|
4044
4048
|
default:this.e();continue
|
|
4045
4049
|
}
|
|
4046
|
-
case 713:this.m(
|
|
4047
|
-
case 714:if(this.expression(_={},
|
|
4048
|
-
case 715:
|
|
4049
|
-
case
|
|
4050
|
-
case'
|
|
4051
|
-
default:this.
|
|
4050
|
+
case 713:this.m(710,':');continue
|
|
4051
|
+
case 714:if(this.expression(_={},715)){expr=_.expr; this.addNamedArg( $.pathStep, id, expr ); }continue
|
|
4052
|
+
case 715:switch(this.l()){
|
|
4053
|
+
case',':this.c(716);continue
|
|
4054
|
+
case')':this.s=725;continue
|
|
4055
|
+
default:this.e();continue
|
|
4052
4056
|
}
|
|
4053
|
-
case
|
|
4054
|
-
case'Id':if(this.ciA(
|
|
4055
|
-
case')':this.s=
|
|
4057
|
+
case 716:switch(this.l()){
|
|
4058
|
+
case'Id':if(this.ciA(717,'paramname'))id=this.lb();continue
|
|
4059
|
+
case')':this.s=725;continue
|
|
4056
4060
|
default:this.e();continue
|
|
4057
4061
|
}
|
|
4058
|
-
case
|
|
4059
|
-
case
|
|
4062
|
+
case 717:this.m(714,'=>');continue
|
|
4063
|
+
case 718:if(this.funcExpression(_={},719)){expr=_.expr; $.pathStep.args.push( expr ); }continue
|
|
4064
|
+
case 719:switch(this.l()){
|
|
4065
|
+
case',':if(this.c(720)){this.nextFunctionArgument()}continue;
|
|
4066
|
+
default:this.s=722;continue
|
|
4067
|
+
}
|
|
4060
4068
|
case 720:switch(this.l()){
|
|
4061
|
-
case'
|
|
4062
|
-
default:this.s=
|
|
4069
|
+
case')':this.c(721);continue
|
|
4070
|
+
default:this.s=718;continue
|
|
4063
4071
|
}
|
|
4064
4072
|
case 721:switch(this.l()){
|
|
4065
|
-
case'
|
|
4066
|
-
default:this.
|
|
4073
|
+
case'[':this.cardinalityAndFilter($,0);continue
|
|
4074
|
+
default:this.gr(['*','+','-','.','/','<','=','>','?','!=','<=','<>','==','>=','in','is','or','||','and','not','like','between']);continue
|
|
4067
4075
|
}
|
|
4068
4076
|
case 722:switch(this.lk()){
|
|
4069
|
-
case'
|
|
4070
|
-
|
|
4071
|
-
default:this.ei();continue
|
|
4072
|
-
}
|
|
4073
|
-
case 723:switch(this.lk()){
|
|
4074
|
-
case'order':if(this.ck(724)){ expr = $.pathStep.args[$.pathStep.args.length - 1] = this.applyOpToken( expr ); }continue
|
|
4075
|
-
default:this.s=726;continue
|
|
4077
|
+
case'order':if(this.ck(723)){ expr = $.pathStep.args[$.pathStep.args.length - 1] = this.applyOpToken( expr ); }continue
|
|
4078
|
+
default:this.s=725;continue
|
|
4076
4079
|
}
|
|
4077
|
-
case
|
|
4078
|
-
case
|
|
4079
|
-
case
|
|
4080
|
-
case
|
|
4080
|
+
case 723:if(this.mk(724,'by')){ this.pushXprToken( expr ); }continue
|
|
4081
|
+
case 724:if(this.orderByClauseAsXpr({outer:expr.args},725)){ this.attachLocation( expr ); }continue
|
|
4082
|
+
case 725:if(this.m(726,')')){ this.finalizeDictOrArray( $.pathStep.args ); }continue
|
|
4083
|
+
case 726:switch(this.l()){
|
|
4081
4084
|
case'[':this.cardinalityAndFilter($,0);continue
|
|
4082
4085
|
default:this.gr(['*','+','-','.','/','<','=','>','?','!=','<=','<>','==','>=','in','is','or','||','and','not','like','between']);continue
|
|
4083
4086
|
}
|
|
@@ -4088,22 +4091,22 @@ funcExpression($,$next){
|
|
|
4088
4091
|
$.expr??=undefined
|
|
4089
4092
|
let args
|
|
4090
4093
|
let tok;let e;let _
|
|
4091
|
-
this.rule_(
|
|
4094
|
+
this.rule_(728,$next)
|
|
4092
4095
|
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(
|
|
4096
|
+
case 728:switch(this.lGenericIntroOrExpr()){
|
|
4097
|
+
case'Id':case'#':case'(':case'+':case'-':case':':case'?':case'Number':case'String':case'QuotedLiteral':if(this.expression(_={},730))$.expr=_.expr;continue
|
|
4098
|
+
case'GenericExpr':if(this.ckA(730)){tok=this.lb(); $.expr = { val: tok.keyword ?? tok.type, location: tok.location, literal: 'token' }; }continue
|
|
4099
|
+
case'GenericIntro':if(this.ckA(729)){ $.expr = this.applyOpToken(); args = $.expr.args; }continue
|
|
4097
4100
|
default:this.e();continue
|
|
4098
4101
|
}
|
|
4099
|
-
case
|
|
4100
|
-
case
|
|
4101
|
-
case'GenericSeparator':if(this.ckA(
|
|
4102
|
+
case 729:if(this.expression(_={},730)){e=_.expr; $.expr.args.push( e ); }continue
|
|
4103
|
+
case 730:switch(this.lGenericSeparator()){
|
|
4104
|
+
case'GenericSeparator':if(this.ckA(731)){ if (args) this.pushXprToken( args ); else { $.expr= this.applyOpToken( $.expr ); args = $.expr.args; } }continue
|
|
4102
4105
|
default:this.gr([')',',','order']);continue
|
|
4103
4106
|
}
|
|
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(
|
|
4107
|
+
case 731:switch(this.lGenericExpr()){
|
|
4108
|
+
case'Id':case'#':case'(':case'+':case'-':case':':case'?':case'Number':case'String':case'QuotedLiteral':if(this.expression(_={},730)){e=_.expr; args.push( e ); }continue
|
|
4109
|
+
case'GenericExpr':if(this.ckA(730)){ this.pushXprToken( args ); }continue
|
|
4107
4110
|
default:this.e();continue
|
|
4108
4111
|
}
|
|
4109
4112
|
default:
|
|
@@ -4113,27 +4116,27 @@ return this.exit_()
|
|
|
4113
4116
|
}
|
|
4114
4117
|
overClause($,$next){
|
|
4115
4118
|
let over=[]
|
|
4116
|
-
this.rule_(
|
|
4119
|
+
this.rule_(733,$next)
|
|
4117
4120
|
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
|
|
4121
|
+
case 733:this.m(734,'(');continue
|
|
4122
|
+
case 734:switch(this.lk()){
|
|
4123
|
+
case'partition':if(this.ck(735)){ this.pushXprToken( over ); }continue
|
|
4124
|
+
default:this.s=737;continue
|
|
4125
|
+
}
|
|
4126
|
+
case 735:if(this.mk(736,'by')){ this.pushXprToken( over ); }continue
|
|
4127
|
+
case 736:this.expressionsAsXpr({outer:over},737);continue
|
|
4128
|
+
case 737:switch(this.lk()){
|
|
4129
|
+
case'order':if(this.ck(738)){ this.pushXprToken( over ); }continue
|
|
4130
|
+
default:this.s=740;continue
|
|
4131
|
+
}
|
|
4132
|
+
case 738:if(this.mk(739,'by')){ this.pushXprToken( over ); }continue
|
|
4133
|
+
case 739:this.orderByClauseAsXpr({outer:over},740);continue
|
|
4134
|
+
case 740:switch(this.lk()){
|
|
4135
|
+
case'rows':if(this.ck(741)){ this.pushXprToken( over ); }continue
|
|
4136
|
+
default:this.s=742;continue
|
|
4137
|
+
}
|
|
4138
|
+
case 741:this.windowFrameClause({outer:over},742);continue
|
|
4139
|
+
case 742:this.m(0,')');continue
|
|
4137
4140
|
default:
|
|
4138
4141
|
$.outer.push( this.surroundByParens( this.ixprAst( over ) ) )
|
|
4139
4142
|
return this.exit_()
|
|
@@ -4142,14 +4145,14 @@ return this.exit_()
|
|
|
4142
4145
|
expressionsAsXpr($,$next){
|
|
4143
4146
|
let args=[]
|
|
4144
4147
|
let expr;let _
|
|
4145
|
-
this.rule_(
|
|
4148
|
+
this.rule_(744,$next)
|
|
4146
4149
|
for(;;)switch(this.s){
|
|
4147
|
-
case
|
|
4148
|
-
case
|
|
4149
|
-
case',':if(this.c(
|
|
4150
|
+
case 744:if(this.expression(_={},745)){expr=_.expr; args.push( expr ); }continue
|
|
4151
|
+
case 745:switch(this.l()){
|
|
4152
|
+
case',':if(this.c(746)){ this.pushXprToken( args ); }continue
|
|
4150
4153
|
default:this.gr([')','rows','order']);continue
|
|
4151
4154
|
}
|
|
4152
|
-
case
|
|
4155
|
+
case 746:if(this.expression(_={},745)){expr=_.expr; args.push( expr ); }continue
|
|
4153
4156
|
default:
|
|
4154
4157
|
$.outer.push( this.ixprAst( args ) )
|
|
4155
4158
|
return this.exit_()
|
|
@@ -4157,14 +4160,14 @@ return this.exit_()
|
|
|
4157
4160
|
}
|
|
4158
4161
|
orderByClauseAsXpr($,$next){
|
|
4159
4162
|
let args=[]
|
|
4160
|
-
this.rule_(
|
|
4163
|
+
this.rule_(748,$next)
|
|
4161
4164
|
for(;;)switch(this.s){
|
|
4162
|
-
case
|
|
4163
|
-
case
|
|
4164
|
-
case',':if(this.c(
|
|
4165
|
+
case 748:this.orderBySpecAsXpr({args},749);continue
|
|
4166
|
+
case 749:switch(this.l()){
|
|
4167
|
+
case',':if(this.c(750)){ this.pushXprToken( args ); }continue
|
|
4165
4168
|
default:this.gr([')']);continue
|
|
4166
4169
|
}
|
|
4167
|
-
case
|
|
4170
|
+
case 750:this.orderBySpecAsXpr({args},749);continue
|
|
4168
4171
|
default:
|
|
4169
4172
|
$.outer.push( this.ixprAst( args ) )
|
|
4170
4173
|
return this.exit_()
|
|
@@ -4172,18 +4175,18 @@ return this.exit_()
|
|
|
4172
4175
|
}
|
|
4173
4176
|
orderBySpecAsXpr($,$next){
|
|
4174
4177
|
let expr;let _
|
|
4175
|
-
this.rule_(
|
|
4178
|
+
this.rule_(752,$next)
|
|
4176
4179
|
for(;;)switch(this.s){
|
|
4177
|
-
case
|
|
4178
|
-
case
|
|
4179
|
-
case'asc':case'desc':if(this.ck(
|
|
4180
|
-
default:this.s=
|
|
4180
|
+
case 752:if(this.expression(_={},753)){expr=_.expr; $.args.push( expr ); }continue
|
|
4181
|
+
case 753:switch(this.lk()){
|
|
4182
|
+
case'asc':case'desc':if(this.ck(754)){ this.pushXprToken( $.args ); }continue
|
|
4183
|
+
default:this.s=754;continue
|
|
4181
4184
|
}
|
|
4182
|
-
case
|
|
4183
|
-
case'nulls':if(this.ck(
|
|
4185
|
+
case 754:switch(this.lk()){
|
|
4186
|
+
case'nulls':if(this.ck(755)){ this.pushXprToken( $.args ); }continue
|
|
4184
4187
|
default:this.gr([')',',']);continue
|
|
4185
4188
|
}
|
|
4186
|
-
case
|
|
4189
|
+
case 755:switch(this.lk()){
|
|
4187
4190
|
case'last':case'first':if(this.ck(0)){ this.pushXprToken( $.args ); }continue
|
|
4188
4191
|
default:this.e();continue
|
|
4189
4192
|
}
|
|
@@ -4192,50 +4195,50 @@ default:return this.exit_()
|
|
|
4192
4195
|
}
|
|
4193
4196
|
windowFrameClause($,$next){
|
|
4194
4197
|
let args=[]
|
|
4195
|
-
this.rule_(
|
|
4198
|
+
this.rule_(757,$next)
|
|
4196
4199
|
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(
|
|
4200
|
+
case 757:switch(this.lk()){
|
|
4201
|
+
case'unbounded':if(this.ck(758)){ this.pushXprToken( args ); }continue
|
|
4202
|
+
case'Number':if(this.c(758)){ args.push( this.unsignedIntegerLiteral() ); }continue
|
|
4203
|
+
case'current':if(this.ck(759)){ this.pushXprToken( args ); }continue
|
|
4204
|
+
case'between':if(this.ck(760)){ this.pushXprToken( args ); }continue
|
|
4202
4205
|
default:this.e();continue
|
|
4203
4206
|
}
|
|
4204
|
-
case
|
|
4205
|
-
case
|
|
4206
|
-
case
|
|
4207
|
-
case
|
|
4208
|
-
case
|
|
4207
|
+
case 758:if(this.mk(0,'preceding')){ this.pushXprToken( args ); }continue
|
|
4208
|
+
case 759:if(this.mk(0,'row')){ this.pushXprToken( args ); }continue
|
|
4209
|
+
case 760:this.windowFrameBoundSpec({args},761);continue
|
|
4210
|
+
case 761:if(this.mk(762,'and')){ this.pushXprToken( args ); }continue
|
|
4211
|
+
case 762:this.windowFrameBoundSpec({args},0);continue
|
|
4209
4212
|
default:
|
|
4210
4213
|
$.outer.push( this.ixprAst( args ) )
|
|
4211
4214
|
return this.exit_()
|
|
4212
4215
|
}
|
|
4213
4216
|
}
|
|
4214
4217
|
windowFrameBoundSpec($,$next){
|
|
4215
|
-
this.rule_(
|
|
4218
|
+
this.rule_(764,$next)
|
|
4216
4219
|
for(;;)switch(this.s){
|
|
4217
|
-
case
|
|
4218
|
-
case'unbounded':if(this.ck(
|
|
4219
|
-
case'Number':if(this.c(
|
|
4220
|
-
case'current':if(this.ck(
|
|
4220
|
+
case 764:switch(this.lk()){
|
|
4221
|
+
case'unbounded':if(this.ck(765)){ this.pushXprToken( $.args ); }continue
|
|
4222
|
+
case'Number':if(this.c(765)){ $.args.push( this.unsignedIntegerLiteral() ); }continue
|
|
4223
|
+
case'current':if(this.ck(767)){ this.pushXprToken( $.args ); }continue
|
|
4221
4224
|
default:this.e();continue
|
|
4222
4225
|
}
|
|
4223
|
-
case
|
|
4224
|
-
case'following':this.ck(
|
|
4225
|
-
case'preceding':this.ck(
|
|
4226
|
+
case 765:switch(this.lk()){
|
|
4227
|
+
case'following':this.ck(766);continue
|
|
4228
|
+
case'preceding':this.ck(766);continue
|
|
4226
4229
|
default:this.e();continue
|
|
4227
4230
|
}
|
|
4228
|
-
case
|
|
4229
|
-
case
|
|
4231
|
+
case 766:if(this.gr()){ this.pushXprToken( $.args ); }continue
|
|
4232
|
+
case 767:if(this.mk(0,'row')){ this.pushXprToken( $.args ); }continue
|
|
4230
4233
|
default:return this.exit_()
|
|
4231
4234
|
}
|
|
4232
4235
|
}
|
|
4233
4236
|
literalValue($,$next){
|
|
4234
4237
|
$.expr??={}
|
|
4235
|
-
this.rule_(
|
|
4238
|
+
this.rule_(769,$next)
|
|
4236
4239
|
for(;;)switch(this.s){
|
|
4237
|
-
case
|
|
4238
|
-
case'#':if(this.c(
|
|
4240
|
+
case 769:switch(this.lk()){
|
|
4241
|
+
case'#':if(this.c(770)){ this.reportUnexpectedSpace(); }continue
|
|
4239
4242
|
case'null':if(this.ck(0)){ $.expr = { literal: 'null', val: null }; }continue
|
|
4240
4243
|
case'true':case'false':if(this.ck(0)){ $.expr = { literal: 'boolean', val: this.lb().keyword === 'true' }; }continue
|
|
4241
4244
|
case'Number':if(this.c(0)){ $.expr = this.numberLiteral(); }continue
|
|
@@ -4243,17 +4246,17 @@ case'String':if(this.c(0)){ $.expr = this.quotedLiteral(); }continue
|
|
|
4243
4246
|
case'QuotedLiteral':if(this.c(0)){ $.expr = this.quotedLiteral(); }continue
|
|
4244
4247
|
default:this.e();continue
|
|
4245
4248
|
}
|
|
4246
|
-
case
|
|
4249
|
+
case 770:if(this.miA(0,'enumref')){ $.expr = { literal: 'enum', sym: this.identAst() } }continue
|
|
4247
4250
|
default:
|
|
4248
4251
|
this.attachLocation( $.expr )
|
|
4249
4252
|
return this.exit_()
|
|
4250
4253
|
}
|
|
4251
4254
|
}
|
|
4252
4255
|
annoAssignStd($,$next){
|
|
4253
|
-
this.rule_(
|
|
4256
|
+
this.rule_(772,$next)
|
|
4254
4257
|
for(;;)switch(this.s){
|
|
4255
|
-
case
|
|
4256
|
-
case
|
|
4258
|
+
case 772:if(this.m(773,'@')){this.annoInSameLine(); this.reportDubiousAnnoSpacing(); }continue
|
|
4259
|
+
case 773:switch(this.l()){
|
|
4257
4260
|
case'(':this.annoAssignParen($,0);continue
|
|
4258
4261
|
case'Id':this.annoAssignBase($,0);continue
|
|
4259
4262
|
default:this.e();continue
|
|
@@ -4264,10 +4267,10 @@ return this.exit_()
|
|
|
4264
4267
|
}
|
|
4265
4268
|
}
|
|
4266
4269
|
annoAssignCol($,$next){
|
|
4267
|
-
this.rule_(
|
|
4270
|
+
this.rule_(775,$next)
|
|
4268
4271
|
for(;;)switch(this.s){
|
|
4269
|
-
case
|
|
4270
|
-
case
|
|
4272
|
+
case 775:if(this.m(776,'@')){ this.reportDubiousAnnoSpacing(); }continue
|
|
4273
|
+
case 776:switch(this.l()){
|
|
4271
4274
|
case'(':this.annoAssignParen($,0);continue
|
|
4272
4275
|
case'Id':this.annoAssignBase($,0);continue
|
|
4273
4276
|
default:this.e();continue
|
|
@@ -4279,10 +4282,10 @@ return this.exit_()
|
|
|
4279
4282
|
}
|
|
4280
4283
|
annoAssignMid($,$next){
|
|
4281
4284
|
let name;let _
|
|
4282
|
-
this.rule_(
|
|
4285
|
+
this.rule_(778,$next)
|
|
4283
4286
|
for(;;)switch(this.s){
|
|
4284
|
-
case
|
|
4285
|
-
case
|
|
4287
|
+
case 778:if(this.m(779,'@')){this.annoInSameLine(); this.reportDubiousAnnoSpacing(); }continue
|
|
4288
|
+
case 779:switch(this.l()){
|
|
4286
4289
|
case'(':this.annoAssignParen($,0);continue
|
|
4287
4290
|
case'Id':if(this.annoNamePath(_={category:'anno'},0)){name=_.name; this.assignAnnotation( $.art, {}, name ); this.warnIfColonFollows( name ); }continue
|
|
4288
4291
|
default:this.e();continue
|
|
@@ -4293,33 +4296,33 @@ return this.exit_()
|
|
|
4293
4296
|
}
|
|
4294
4297
|
}
|
|
4295
4298
|
annoAssignParen($,$next){
|
|
4296
|
-
this.rule_(
|
|
4299
|
+
this.rule_(781,$next)
|
|
4297
4300
|
for(;;)switch(this.s){
|
|
4298
|
-
case
|
|
4299
|
-
case
|
|
4300
|
-
case'Id':this.annoAssignBase({art:$.art},
|
|
4301
|
-
default:this.s=
|
|
4301
|
+
case 781:if(this.m(782,'(')){this.annoInSameLine()}continue;
|
|
4302
|
+
case 782:switch(this.l()){
|
|
4303
|
+
case'Id':this.annoAssignBase({art:$.art},783);continue
|
|
4304
|
+
default:this.s=784;continue
|
|
4302
4305
|
}
|
|
4303
|
-
case
|
|
4304
|
-
case',':this.c(
|
|
4305
|
-
case')':this.s=
|
|
4306
|
+
case 783:switch(this.l()){
|
|
4307
|
+
case',':this.c(782);continue
|
|
4308
|
+
case')':this.s=784;continue
|
|
4306
4309
|
default:this.e();continue
|
|
4307
4310
|
}
|
|
4308
|
-
case
|
|
4311
|
+
case 784:this.m(0,')');continue
|
|
4309
4312
|
default:return this.exit_()
|
|
4310
4313
|
}
|
|
4311
4314
|
}
|
|
4312
4315
|
annoAssignBase($,$next){
|
|
4313
4316
|
let value={}
|
|
4314
4317
|
let name;let _
|
|
4315
|
-
this.rule_(
|
|
4318
|
+
this.rule_(786,$next)
|
|
4316
4319
|
for(;;)switch(this.s){
|
|
4317
|
-
case
|
|
4318
|
-
case
|
|
4319
|
-
case':':this.gc(0,'annoInSameLine')&&this.c(
|
|
4320
|
+
case 786:if(this.annoNamePath(_={category:'anno'},787))name=_.name;continue
|
|
4321
|
+
case 787:switch(this.l()){
|
|
4322
|
+
case':':this.gc(0,'annoInSameLine')&&this.c(788);continue
|
|
4320
4323
|
default:this.gr();continue
|
|
4321
4324
|
}
|
|
4322
|
-
case
|
|
4325
|
+
case 788:if(this.annoValue(_={},0))value=_.value;continue
|
|
4323
4326
|
default:
|
|
4324
4327
|
this.assignAnnotation( $.art, value, name || {} )
|
|
4325
4328
|
return this.exit_()
|
|
@@ -4328,20 +4331,20 @@ return this.exit_()
|
|
|
4328
4331
|
annoNamePath($,$next){
|
|
4329
4332
|
$.name??=new XsnName()
|
|
4330
4333
|
let at
|
|
4331
|
-
this.rule_(
|
|
4334
|
+
this.rule_(790,$next)
|
|
4332
4335
|
for(;;)switch(this.s){
|
|
4333
|
-
case
|
|
4334
|
-
case
|
|
4335
|
-
case'.':this.c(
|
|
4336
|
-
default:this.s=
|
|
4336
|
+
case 790:if(this.miA(791,$.category)){ $.name.path = [ this.identAst() ]; }continue
|
|
4337
|
+
case 791:switch(this.l()){
|
|
4338
|
+
case'.':this.c(792);continue
|
|
4339
|
+
default:this.s=794;continue
|
|
4337
4340
|
}
|
|
4338
|
-
case
|
|
4339
|
-
case'Id':if(this.ciA(
|
|
4340
|
-
case'@':if(this.c(
|
|
4341
|
+
case 792:switch(this.l()){
|
|
4342
|
+
case'Id':if(this.ciA(791,$.category)){ $.name.path.push( this.identAst() ); }continue
|
|
4343
|
+
case'@':if(this.c(793))at=this.lb();continue
|
|
4341
4344
|
default:this.e();continue
|
|
4342
4345
|
}
|
|
4343
|
-
case
|
|
4344
|
-
case
|
|
4346
|
+
case 793:if(this.miA(791,$.category)){ $.name.path.push( this.identAstWithPrefix( at ) ); }continue
|
|
4347
|
+
case 794:switch(this.l()){
|
|
4345
4348
|
case'#':this.gc(0,'annoInSameLine')&&this.annoPathVariant({nameOrRef:$.name},0);continue
|
|
4346
4349
|
default:this.gr();continue
|
|
4347
4350
|
}
|
|
@@ -4352,25 +4355,25 @@ return this.exit_()
|
|
|
4352
4355
|
}
|
|
4353
4356
|
annoPath($,$next){
|
|
4354
4357
|
let at
|
|
4355
|
-
this.rule_(
|
|
4358
|
+
this.rule_(796,$next)
|
|
4356
4359
|
for(;;)switch(this.s){
|
|
4357
|
-
case
|
|
4358
|
-
case'Id':if(this.ciA(
|
|
4359
|
-
case'@':if(this.c(
|
|
4360
|
+
case 796:switch(this.l()){
|
|
4361
|
+
case'Id':if(this.ciA(798,$.category)){ $.nameOrRef.path = [ this.identAst() ]; }continue
|
|
4362
|
+
case'@':if(this.c(797))at=this.lb();continue
|
|
4360
4363
|
default:this.e();continue
|
|
4361
4364
|
}
|
|
4362
|
-
case
|
|
4363
|
-
case
|
|
4364
|
-
case'.':this.c(
|
|
4365
|
-
default:this.s=
|
|
4365
|
+
case 797:if(this.miA(798,$.category)){ $.nameOrRef.path = [ this.identAstWithPrefix( at ) ]; }continue
|
|
4366
|
+
case 798:switch(this.l()){
|
|
4367
|
+
case'.':this.c(799);continue
|
|
4368
|
+
default:this.s=801;continue
|
|
4366
4369
|
}
|
|
4367
|
-
case
|
|
4368
|
-
case'Id':if(this.ciA(
|
|
4369
|
-
case'@':if(this.c(
|
|
4370
|
+
case 799:switch(this.l()){
|
|
4371
|
+
case'Id':if(this.ciA(798,$.category)){ $.nameOrRef.path.push( this.identAst() ); }continue
|
|
4372
|
+
case'@':if(this.c(800))at=this.lb();continue
|
|
4370
4373
|
default:this.e();continue
|
|
4371
4374
|
}
|
|
4372
|
-
case
|
|
4373
|
-
case
|
|
4375
|
+
case 800:if(this.miA(798,$.category)){ $.nameOrRef.path.push( this.identAstWithPrefix( at ) ); }continue
|
|
4376
|
+
case 801:switch(this.l()){
|
|
4374
4377
|
case'#':this.annoPathVariant({nameOrRef:$.nameOrRef},0);continue
|
|
4375
4378
|
default:this.gr();continue
|
|
4376
4379
|
}
|
|
@@ -4380,15 +4383,15 @@ return this.exit_()
|
|
|
4380
4383
|
}
|
|
4381
4384
|
}
|
|
4382
4385
|
annoPathVariant($,$next){
|
|
4383
|
-
this.rule_(
|
|
4386
|
+
this.rule_(803,$next)
|
|
4384
4387
|
for(;;)switch(this.s){
|
|
4385
|
-
case
|
|
4386
|
-
case
|
|
4387
|
-
case
|
|
4388
|
-
case'.':this.c(
|
|
4388
|
+
case 803:if(this.m(804,'#')){ this.reportUnexpectedSpace(); }continue
|
|
4389
|
+
case 804:if(this.miA(805,'variant')){ $.nameOrRef.variant = { path: [ this.identAst() ] }; }continue
|
|
4390
|
+
case 805:switch(this.l()){
|
|
4391
|
+
case'.':this.c(806);continue
|
|
4389
4392
|
default:this.gr();continue
|
|
4390
4393
|
}
|
|
4391
|
-
case
|
|
4394
|
+
case 806:if(this.miA(805,'variant')){ $.nameOrRef.variant.path.push( this.identAst() ); }continue
|
|
4392
4395
|
default:
|
|
4393
4396
|
this.attachLocation( $.nameOrRef.variant )
|
|
4394
4397
|
return this.exit_()
|
|
@@ -4398,14 +4401,14 @@ annoStructValue($,$next){
|
|
|
4398
4401
|
$.value??={}
|
|
4399
4402
|
let name=new XsnName()
|
|
4400
4403
|
let _
|
|
4401
|
-
this.rule_(
|
|
4404
|
+
this.rule_(808,$next)
|
|
4402
4405
|
for(;;)switch(this.s){
|
|
4403
|
-
case
|
|
4404
|
-
case
|
|
4405
|
-
case':':this.c(
|
|
4406
|
+
case 808:if(this.annoPath({nameOrRef:name,category:'name'},809)){ this.attachLocation( name ); }continue
|
|
4407
|
+
case 809:switch(this.l()){
|
|
4408
|
+
case':':this.c(810);continue
|
|
4406
4409
|
default:if(this.gr(['Id',',','@','}'])){ this.attachLocation( $.value ); }continue
|
|
4407
4410
|
}
|
|
4408
|
-
case
|
|
4411
|
+
case 810:if(this.annoValue(_={},0))$.value=_.value;continue
|
|
4409
4412
|
default:
|
|
4410
4413
|
$.value.name = name
|
|
4411
4414
|
return this.exit_()
|
|
@@ -4414,53 +4417,51 @@ return this.exit_()
|
|
|
4414
4417
|
annoValue($,$next){
|
|
4415
4418
|
$.value??={}
|
|
4416
4419
|
let sign;let sub;let ellipsis;let upTo;let _
|
|
4417
|
-
this.rule_(
|
|
4420
|
+
this.rule_(812,$next)
|
|
4418
4421
|
for(;;)switch(this.s){
|
|
4419
|
-
case
|
|
4422
|
+
case 812:switch(this.lk()){
|
|
4420
4423
|
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(
|
|
4424
|
+
case'+':case'-':if(this.c(813))sign=this.lb();continue
|
|
4422
4425
|
case'Id':case'@':this.annoPath({nameOrRef:$.value,category:'annoref'},0);continue
|
|
4423
|
-
case'{':if(this.c(
|
|
4426
|
+
case'{':if(this.c(814)){ if (!this.dynamic_.arrayAnno) $.value.$flatten = [];
|
|
4424
4427
|
else { $.value.struct = Object.create(null); $.value.literal = 'struct'; } }continue
|
|
4425
|
-
case'[':if(this.c(
|
|
4426
|
-
case'(':this.c(
|
|
4428
|
+
case'[':if(this.c(817)){this.arrayAnno(); $.value.val = []; $.value.literal = 'array' }continue
|
|
4429
|
+
case'(':this.c(823);continue
|
|
4427
4430
|
default:this.ei();continue
|
|
4428
4431
|
}
|
|
4429
|
-
case
|
|
4430
|
-
case
|
|
4431
|
-
case'Id':case'@':if(this.annoStructValue(_={},
|
|
4432
|
+
case 813:if(this.m(0,'Number')){ this.adjustAnnoNumber( $.value = this.numberLiteral( sign ) ); }continue
|
|
4433
|
+
case 814:switch(this.l()){
|
|
4434
|
+
case'Id':case'@':if(this.annoStructValue(_={},815)){sub=_.value; if ($.value.$flatten) $.value.$flatten.push( sub );
|
|
4432
4435
|
else this.addDef( sub, $.value, 'struct', null, sub.name ); }continue
|
|
4433
|
-
default:this.s=
|
|
4436
|
+
default:this.s=816;continue
|
|
4434
4437
|
}
|
|
4435
|
-
case
|
|
4436
|
-
case',':this.c(
|
|
4437
|
-
case'}':this.s=
|
|
4438
|
-
case'Id':case'@':this.ec('fail')&&this.g(
|
|
4438
|
+
case 815:switch(this.l()){
|
|
4439
|
+
case',':this.c(814);continue
|
|
4440
|
+
case'}':this.s=816;continue
|
|
4441
|
+
case'Id':case'@':this.ec('fail')&&this.g(814);continue
|
|
4439
4442
|
default:this.e();continue
|
|
4440
4443
|
}
|
|
4441
|
-
case
|
|
4442
|
-
case
|
|
4443
|
-
case
|
|
4444
|
-
case'
|
|
4445
|
-
|
|
4446
|
-
default:this.s=824;continue
|
|
4444
|
+
case 816:this.ec('arrayAnno','orNotEmpty')&&this.m(0,'}');continue
|
|
4445
|
+
case 817:switch(this.l()){
|
|
4446
|
+
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
|
|
4447
|
+
case'...':if(this.gc(822,'arrayAnno','ellipsis')&&this.c(818))ellipsis=this.lb();continue
|
|
4448
|
+
default:this.s=822;continue
|
|
4447
4449
|
}
|
|
4448
|
-
case
|
|
4449
|
-
case'up':this.ck(
|
|
4450
|
-
case',':case']':this.s=
|
|
4450
|
+
case 818:switch(this.lk()){
|
|
4451
|
+
case'up':this.ck(819);continue
|
|
4452
|
+
case',':case']':this.s=821;{ $.value.val.push( { literal: 'token', val: '...', location: ellipsis.location } ); }continue
|
|
4451
4453
|
default:this.e();continue
|
|
4452
4454
|
}
|
|
4453
|
-
case
|
|
4454
|
-
case
|
|
4455
|
-
case
|
|
4456
|
-
case',':this.c(
|
|
4457
|
-
case']':this.s=
|
|
4455
|
+
case 819:this.mk(820,'to');continue
|
|
4456
|
+
case 820:if(this.annoValue(_={},821)){upTo=_.value; $.value.val.push( { literal: 'token', val: '...', location: ellipsis.location, upTo: upTo } ); }continue
|
|
4457
|
+
case 821:switch(this.l()){
|
|
4458
|
+
case',':this.c(817);continue
|
|
4459
|
+
case']':this.s=822;continue
|
|
4458
4460
|
default:this.e();continue
|
|
4459
4461
|
}
|
|
4460
|
-
case
|
|
4461
|
-
case
|
|
4462
|
-
case
|
|
4463
|
-
case 827:if(this.m(0,')')){ $.value.$tokenTexts = this.ruleTokensText(); }continue
|
|
4462
|
+
case 822:this.ec('arrayAnno','bracket')&&this.m(0,']');continue
|
|
4463
|
+
case 823:if(this.condition(_={},824))$.value=_.expr;continue
|
|
4464
|
+
case 824:if(this.m(0,')')){ $.value.$tokenTexts = this.ruleTokensText(); }continue
|
|
4464
4465
|
default:
|
|
4465
4466
|
this.attachLocation( $.value )
|
|
4466
4467
|
return this.exit_()
|