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