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