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