@sap/cds-compiler 5.1.0 → 5.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +32 -0
- package/bin/cdsc.js +2 -2
- package/bin/cdshi.js +24 -17
- package/bin/cdsse.js +17 -18
- package/lib/api/main.js +19 -2
- package/lib/api/options.js +4 -1
- package/lib/base/builtins.js +1 -0
- package/lib/base/message-registry.js +16 -3
- package/lib/base/model.js +0 -10
- package/lib/checks/actionsFunctions.js +0 -12
- package/lib/checks/structuredAnnoExpressions.js +10 -14
- package/lib/compiler/assert-consistency.js +19 -11
- package/lib/compiler/builtins.js +1 -1
- package/lib/compiler/define.js +6 -4
- package/lib/compiler/extend.js +5 -5
- package/lib/compiler/populate.js +9 -9
- package/lib/compiler/propagator.js +1 -0
- package/lib/compiler/resolve.js +29 -34
- package/lib/compiler/shared.js +7 -8
- package/lib/compiler/tweak-assocs.js +155 -64
- package/lib/compiler/utils.js +1 -1
- package/lib/compiler/xpr-rewrite.js +4 -3
- package/lib/edm/annotations/genericTranslation.js +13 -9
- package/lib/edm/csn2edm.js +26 -2
- package/lib/edm/edm.js +23 -8
- package/lib/edm/edmInboundChecks.js +5 -7
- package/lib/edm/edmPreprocessor.js +43 -30
- package/lib/gen/BaseParser.js +720 -0
- package/lib/gen/CdlParser.js +4421 -0
- package/lib/gen/language.checksum +1 -1
- package/lib/gen/language.interp +1 -1
- package/lib/gen/languageParser.js +4006 -4001
- package/lib/language/antlrParser.js +62 -0
- package/lib/language/genericAntlrParser.js +28 -0
- package/lib/model/csnUtils.js +2 -0
- package/lib/model/revealInternalProperties.js +2 -0
- package/lib/modelCompare/utils/filter.js +70 -42
- package/lib/optionProcessor.js +9 -3
- package/lib/parsers/AstBuildingParser.js +1172 -0
- package/lib/parsers/CdlGrammar.g4 +1940 -0
- package/lib/parsers/Lexer.js +239 -0
- package/lib/render/toCdl.js +23 -27
- package/lib/render/toSql.js +5 -5
- package/lib/transform/db/applyTransformations.js +54 -16
- package/lib/transform/draft/odata.js +10 -11
- package/lib/transform/effective/flattening.js +10 -14
- package/lib/transform/odata/flattening.js +42 -31
- package/lib/transform/odata/toFinalBaseType.js +7 -6
- package/lib/transform/universalCsn/universalCsnEnricher.js +1 -0
- package/package.json +2 -2
- package/share/messages/redirected-to-ambiguous.md +5 -4
|
@@ -0,0 +1,4421 @@
|
|
|
1
|
+
// Parser generated by redepage v0.1.7
|
|
2
|
+
'use strict;'
|
|
3
|
+
const { XsnSource, XsnArtifact, XsnName } = require( '../compiler/xsn-model' );
|
|
4
|
+
const AstBuildingParser = require('../parsers/AstBuildingParser');
|
|
5
|
+
const keywords = {
|
|
6
|
+
abstract: true,
|
|
7
|
+
action: true,
|
|
8
|
+
actions: true,
|
|
9
|
+
all: false,
|
|
10
|
+
and: true,
|
|
11
|
+
annotate: true,
|
|
12
|
+
annotation: true,
|
|
13
|
+
any: false,
|
|
14
|
+
array: true,
|
|
15
|
+
as: false,
|
|
16
|
+
asc: true,
|
|
17
|
+
aspect: true,
|
|
18
|
+
association: true,
|
|
19
|
+
between: true,
|
|
20
|
+
by: false,
|
|
21
|
+
case: false,
|
|
22
|
+
cast: false,
|
|
23
|
+
columns: true,
|
|
24
|
+
composition: true,
|
|
25
|
+
context: true,
|
|
26
|
+
cross: true,
|
|
27
|
+
current: true,
|
|
28
|
+
default: true,
|
|
29
|
+
define: true,
|
|
30
|
+
definitions: true,
|
|
31
|
+
desc: true,
|
|
32
|
+
distinct: true,
|
|
33
|
+
element: true,
|
|
34
|
+
elements: true,
|
|
35
|
+
else: true,
|
|
36
|
+
end: true,
|
|
37
|
+
entity: true,
|
|
38
|
+
enum: true,
|
|
39
|
+
escape: true,
|
|
40
|
+
event: true,
|
|
41
|
+
exact: true,
|
|
42
|
+
except: true,
|
|
43
|
+
excluding: true,
|
|
44
|
+
exists: false,
|
|
45
|
+
extend: true,
|
|
46
|
+
false: false,
|
|
47
|
+
first: true,
|
|
48
|
+
floating: true,
|
|
49
|
+
following: true,
|
|
50
|
+
from: false,
|
|
51
|
+
full: true,
|
|
52
|
+
function: true,
|
|
53
|
+
group: true,
|
|
54
|
+
having: true,
|
|
55
|
+
in: false,
|
|
56
|
+
inner: true,
|
|
57
|
+
intersect: true,
|
|
58
|
+
into: true,
|
|
59
|
+
is: true,
|
|
60
|
+
join: true,
|
|
61
|
+
key: false,
|
|
62
|
+
last: true,
|
|
63
|
+
left: true,
|
|
64
|
+
like: true,
|
|
65
|
+
limit: true,
|
|
66
|
+
localized: true,
|
|
67
|
+
many: true,
|
|
68
|
+
masked: true,
|
|
69
|
+
minus: true,
|
|
70
|
+
mixin: true,
|
|
71
|
+
namespace: true,
|
|
72
|
+
new: true,
|
|
73
|
+
not: false,
|
|
74
|
+
null: false,
|
|
75
|
+
nulls: true,
|
|
76
|
+
of: false,
|
|
77
|
+
offset: true,
|
|
78
|
+
on: false,
|
|
79
|
+
one: true,
|
|
80
|
+
or: true,
|
|
81
|
+
order: true,
|
|
82
|
+
outer: true,
|
|
83
|
+
over: true,
|
|
84
|
+
parameters: true,
|
|
85
|
+
partition: true,
|
|
86
|
+
preceding: true,
|
|
87
|
+
projection: true,
|
|
88
|
+
redirected: true,
|
|
89
|
+
returns: true,
|
|
90
|
+
right: true,
|
|
91
|
+
row: true,
|
|
92
|
+
rows: true,
|
|
93
|
+
select: false,
|
|
94
|
+
service: true,
|
|
95
|
+
some: false,
|
|
96
|
+
stored: true,
|
|
97
|
+
then: true,
|
|
98
|
+
to: true,
|
|
99
|
+
true: false,
|
|
100
|
+
type: true,
|
|
101
|
+
unbounded: true,
|
|
102
|
+
union: true,
|
|
103
|
+
up: true,
|
|
104
|
+
using: true,
|
|
105
|
+
variable: true,
|
|
106
|
+
view: true,
|
|
107
|
+
virtual: true,
|
|
108
|
+
when: true,
|
|
109
|
+
where: false,
|
|
110
|
+
with: false,
|
|
111
|
+
};
|
|
112
|
+
const table = [
|
|
113
|
+
'start',
|
|
114
|
+
/* 1 */ {
|
|
115
|
+
namespace: [2,16],
|
|
116
|
+
using: [2,19],
|
|
117
|
+
'@': [2,10], type: '@', view: '@', event: '@', action: '@', aspect: '@', define: '@', entity: '@', extend: '@', context: '@', service: '@', abstract: '@', annotate: '@', function: '@', annotation: '@',
|
|
118
|
+
'': 3
|
|
119
|
+
},
|
|
120
|
+
/* 2 */ {
|
|
121
|
+
';': ['c',1],
|
|
122
|
+
EOF: 3,
|
|
123
|
+
Id: ['g',1], '@': 'Id',
|
|
124
|
+
},
|
|
125
|
+
/* 3 */ ['m',0,'EOF'],
|
|
126
|
+
'artifactsBlock',
|
|
127
|
+
/* 5 */ ['m',6,'{'],
|
|
128
|
+
/* 6 */ { Id: [7,10], '@': 'Id', '': 8 },
|
|
129
|
+
/* 7 */ {
|
|
130
|
+
';': ['c',6],
|
|
131
|
+
'}': 8,
|
|
132
|
+
Id: ['g',6], '@': 'Id',
|
|
133
|
+
},
|
|
134
|
+
/* 8 */ ['m',0,'}'],
|
|
135
|
+
'artifactDefOrExtend',
|
|
136
|
+
/* 10 */ { '@': [10,769], '': 11 },
|
|
137
|
+
/* 11 */ {
|
|
138
|
+
define: ['ck',12],
|
|
139
|
+
type: 12, view: 12, event: 12, action: 12, aspect: 12, entity: 12, context: 12, service: 12, abstract: 12, function: 12, annotation: 12,
|
|
140
|
+
extend: ['ck',13],
|
|
141
|
+
annotate: ['ck',14],
|
|
142
|
+
},
|
|
143
|
+
/* 12 */ {
|
|
144
|
+
service: [0,44],
|
|
145
|
+
context: [0,49],
|
|
146
|
+
annotation: [0,54],
|
|
147
|
+
type: [0,59],
|
|
148
|
+
aspect: [0,64], abstract: 'aspect',
|
|
149
|
+
entity: [0,77],
|
|
150
|
+
view: [0,91],
|
|
151
|
+
event: [0,103],
|
|
152
|
+
action: [0,115],
|
|
153
|
+
function: [0,121],
|
|
154
|
+
},
|
|
155
|
+
/* 13 */ {
|
|
156
|
+
Id: [0,232],
|
|
157
|
+
service: [0,254,1],
|
|
158
|
+
context: [0,261,1],
|
|
159
|
+
type: [0,268,1],
|
|
160
|
+
aspect: [0,280,1], entity: 'aspect',
|
|
161
|
+
projection: [0,291,1],
|
|
162
|
+
},
|
|
163
|
+
/* 14 */ [0,219],
|
|
164
|
+
'namespaceDeclaration',
|
|
165
|
+
/* 16 */ ['mk',17,'namespace'],
|
|
166
|
+
/* 17 */ [0,36],
|
|
167
|
+
'usingDeclaration',
|
|
168
|
+
/* 19 */ ['mk',20,'using'],
|
|
169
|
+
/* 20 */ {
|
|
170
|
+
from: ['ck',21],
|
|
171
|
+
Id: [22,32],
|
|
172
|
+
'{': 24,
|
|
173
|
+
},
|
|
174
|
+
/* 21 */ ['m',0,'String'],
|
|
175
|
+
/* 22 */ { from: ['ck',23], '': 0 },
|
|
176
|
+
/* 23 */ ['m',0,'String'],
|
|
177
|
+
/* 24 */ ['m',25,'{'],
|
|
178
|
+
/* 25 */ { Id: 26 },
|
|
179
|
+
/* 26 */ { Id: [27,32], '': 28 },
|
|
180
|
+
/* 27 */ {
|
|
181
|
+
',': ['c',26],
|
|
182
|
+
'}': 28,
|
|
183
|
+
},
|
|
184
|
+
/* 28 */ ['m',29,'}'],
|
|
185
|
+
/* 29 */ { from: ['ck',30], '': 0 },
|
|
186
|
+
/* 30 */ ['m',0,'String'],
|
|
187
|
+
'usingProxy',
|
|
188
|
+
/* 32 */ [33,40],
|
|
189
|
+
/* 33 */ { as: ['ck',34], '': 0 },
|
|
190
|
+
/* 34 */ ['mi',0],
|
|
191
|
+
'namePath',
|
|
192
|
+
/* 36 */ ['mi',37],
|
|
193
|
+
/* 37 */ { '.': ['c',38], '': 0 },
|
|
194
|
+
/* 38 */ ['miA',37],
|
|
195
|
+
'simplePath',
|
|
196
|
+
/* 40 */ ['mi',41],
|
|
197
|
+
/* 41 */ { '.': ['c',42], '': 0 },
|
|
198
|
+
/* 42 */ ['miA',41],
|
|
199
|
+
'serviceDef',
|
|
200
|
+
/* 44 */ ['mk',45,'service'],
|
|
201
|
+
/* 45 */ [46,36],
|
|
202
|
+
/* 46 */ { '@': [46,775], '': 47 },
|
|
203
|
+
/* 47 */ { '{': [0,5], '': 0 },
|
|
204
|
+
'contextDef',
|
|
205
|
+
/* 49 */ ['mk',50,'context'],
|
|
206
|
+
/* 50 */ [51,36],
|
|
207
|
+
/* 51 */ { '@': [51,775], '': 52 },
|
|
208
|
+
/* 52 */ { '{': [0,5], '': 0 },
|
|
209
|
+
'annotationDef',
|
|
210
|
+
/* 54 */ ['mk',55,'annotation'],
|
|
211
|
+
/* 55 */ [56,36],
|
|
212
|
+
/* 56 */ { '@': [56,775], '': 57 },
|
|
213
|
+
/* 57 */ [0,350],
|
|
214
|
+
'typeDef',
|
|
215
|
+
/* 59 */ ['mk',60,'type'],
|
|
216
|
+
/* 60 */ [61,36],
|
|
217
|
+
/* 61 */ { '@': [61,775], '': 62 },
|
|
218
|
+
/* 62 */ [0,350],
|
|
219
|
+
'aspectDef',
|
|
220
|
+
/* 64 */ {
|
|
221
|
+
aspect: ['ck',66],
|
|
222
|
+
abstract: ['ck',65],
|
|
223
|
+
},
|
|
224
|
+
/* 65 */ ['mk',66,'entity'],
|
|
225
|
+
/* 66 */ [67,36],
|
|
226
|
+
/* 67 */ { '@': [67,775], '': 68 },
|
|
227
|
+
/* 68 */ {
|
|
228
|
+
'{': [69,161],
|
|
229
|
+
':': ['c',70],
|
|
230
|
+
'': 0
|
|
231
|
+
},
|
|
232
|
+
/* 69 */ { actions: [0,127], '': 0 },
|
|
233
|
+
/* 70 */ [0,72],
|
|
234
|
+
'aspectColonSpec',
|
|
235
|
+
/* 72 */ { Id: [73,40], '': 74 },
|
|
236
|
+
/* 73 */ { ',': ['c',72], '': 74 },
|
|
237
|
+
/* 74 */ { '{': [75,161], '': 0 },
|
|
238
|
+
/* 75 */ { actions: [0,127], '': 0 },
|
|
239
|
+
'entityDef',
|
|
240
|
+
/* 77 */ ['mk',78,'entity'],
|
|
241
|
+
/* 78 */ [79,36],
|
|
242
|
+
/* 79 */ { '@': [79,775], '': 80 },
|
|
243
|
+
/* 80 */ { '(': [81,144], '': 81 },
|
|
244
|
+
/* 81 */ {
|
|
245
|
+
':': ['c',82],
|
|
246
|
+
'{': 85,
|
|
247
|
+
as: ['ck',86],
|
|
248
|
+
},
|
|
249
|
+
/* 82 */ { Id: 83 },
|
|
250
|
+
/* 83 */ { Id: [84,40], '': 85 },
|
|
251
|
+
/* 84 */ {
|
|
252
|
+
',': ['c',83],
|
|
253
|
+
'{': 85,
|
|
254
|
+
},
|
|
255
|
+
/* 85 */ [89,161],
|
|
256
|
+
/* 86 */ {
|
|
257
|
+
'(': [89,459], select: '(',
|
|
258
|
+
projection: [87,453],
|
|
259
|
+
},
|
|
260
|
+
/* 87 */ { group: [88,602], where: 'group', having: 'group', '': 88 },
|
|
261
|
+
/* 88 */ { limit: [89,614], order: 'limit', '': 89 },
|
|
262
|
+
/* 89 */ { actions: [0,127], '': 0 },
|
|
263
|
+
'viewDef',
|
|
264
|
+
/* 91 */ ['mk',92,'view'],
|
|
265
|
+
/* 92 */ [93,36],
|
|
266
|
+
/* 93 */ { '@': [93,775], '': 94 },
|
|
267
|
+
/* 94 */ {
|
|
268
|
+
'(': [100,144],
|
|
269
|
+
with: ['ck',95],
|
|
270
|
+
'': 100
|
|
271
|
+
},
|
|
272
|
+
/* 95 */ ['mk',96,'parameters'],
|
|
273
|
+
/* 96 */ [97,149],
|
|
274
|
+
/* 97 */ { ',': ['c',98], '': 99 },
|
|
275
|
+
/* 98 */ [97,149],
|
|
276
|
+
/* 99 */ 100,
|
|
277
|
+
/* 100 */ ['mk',101,'as'],
|
|
278
|
+
/* 101 */ [0,459],
|
|
279
|
+
'eventDef',
|
|
280
|
+
/* 103 */ ['mk',104,'event'],
|
|
281
|
+
/* 104 */ [105,36],
|
|
282
|
+
/* 105 */ { '@': [105,775], '': 106 },
|
|
283
|
+
/* 106 */ {
|
|
284
|
+
'{': [0,161],
|
|
285
|
+
':': ['c',107],
|
|
286
|
+
},
|
|
287
|
+
/* 107 */ {
|
|
288
|
+
'{': [0,161],
|
|
289
|
+
Id: [108,40],
|
|
290
|
+
projection: [0,453,1],
|
|
291
|
+
},
|
|
292
|
+
/* 108 */ { ',': 109, '{': 109, '': 113 },
|
|
293
|
+
/* 109 */ { ',': ['c',110], '': 112 },
|
|
294
|
+
/* 110 */ { Id: [111,40], '': 112 },
|
|
295
|
+
/* 111 */ {
|
|
296
|
+
',': ['c',110],
|
|
297
|
+
'{': 112,
|
|
298
|
+
},
|
|
299
|
+
/* 112 */ [0,161],
|
|
300
|
+
/* 113 */ { '@': [113,769], '': 0 },
|
|
301
|
+
'actionMainDef',
|
|
302
|
+
/* 115 */ ['mk',116,'action'],
|
|
303
|
+
/* 116 */ [117,36],
|
|
304
|
+
/* 117 */ { '@': [117,775], '': 118 },
|
|
305
|
+
/* 118 */ [119,144],
|
|
306
|
+
/* 119 */ { returns: [0,157], '': 0 },
|
|
307
|
+
'functionMainDef',
|
|
308
|
+
/* 121 */ ['mk',122,'function'],
|
|
309
|
+
/* 122 */ [123,36],
|
|
310
|
+
/* 123 */ { '@': [123,775], '': 124 },
|
|
311
|
+
/* 124 */ [125,144],
|
|
312
|
+
/* 125 */ [0,157],
|
|
313
|
+
'actionsBlock',
|
|
314
|
+
/* 127 */ ['mk',128,'actions'],
|
|
315
|
+
/* 128 */ ['m',129,'{'],
|
|
316
|
+
/* 129 */ { Id: [130,133], '@': 'Id', '': 131 },
|
|
317
|
+
/* 130 */ {
|
|
318
|
+
';': ['c',129],
|
|
319
|
+
'}': 131,
|
|
320
|
+
Id: ['g',129], '@': 'Id',
|
|
321
|
+
},
|
|
322
|
+
/* 131 */ ['m',0,'}'],
|
|
323
|
+
'boundActionFunctionDef',
|
|
324
|
+
/* 133 */ { '@': [133,769], '': 134 },
|
|
325
|
+
/* 134 */ {
|
|
326
|
+
action: ['ck',135],
|
|
327
|
+
function: ['ck',139],
|
|
328
|
+
},
|
|
329
|
+
/* 135 */ ['mi',136],
|
|
330
|
+
/* 136 */ { '@': [136,775], '': 137 },
|
|
331
|
+
/* 137 */ [138,144],
|
|
332
|
+
/* 138 */ { returns: [0,157], '': 0 },
|
|
333
|
+
/* 139 */ ['mi',140],
|
|
334
|
+
/* 140 */ { '@': [140,775], '': 141 },
|
|
335
|
+
/* 141 */ [142,144],
|
|
336
|
+
/* 142 */ [0,157],
|
|
337
|
+
'paramsList',
|
|
338
|
+
/* 144 */ ['m',145,'('],
|
|
339
|
+
/* 145 */ { Id: [146,149], '@': 'Id', '': 147 },
|
|
340
|
+
/* 146 */ {
|
|
341
|
+
',': ['c',145],
|
|
342
|
+
')': 147,
|
|
343
|
+
},
|
|
344
|
+
/* 147 */ ['m',0,')'],
|
|
345
|
+
'paramDef',
|
|
346
|
+
/* 149 */ { '@': [149,769], '': 150 },
|
|
347
|
+
/* 150 */ ['miA',151],
|
|
348
|
+
/* 151 */ { '@': [151,775], '': 152 },
|
|
349
|
+
/* 152 */ {
|
|
350
|
+
'{': [153,161],
|
|
351
|
+
':': ['c',154],
|
|
352
|
+
},
|
|
353
|
+
/* 153 */ { not: [0,446], null: 'not', '': 0 },
|
|
354
|
+
/* 154 */ [155,365],
|
|
355
|
+
/* 155 */ { '@': [155,769], '': 0 },
|
|
356
|
+
'returnsSpec',
|
|
357
|
+
/* 157 */ ['mk',158,'returns'],
|
|
358
|
+
/* 158 */ { '@': [158,769], '': 159 },
|
|
359
|
+
/* 159 */ [0,365],
|
|
360
|
+
'elementsBlock',
|
|
361
|
+
/* 161 */ ['m',162,'{'],
|
|
362
|
+
/* 162 */ { Id: [163,166], '@': 'Id', '': 164 },
|
|
363
|
+
/* 163 */ {
|
|
364
|
+
';': ['c',162],
|
|
365
|
+
'}': 164,
|
|
366
|
+
Id: ['g',162], '@': 'Id',
|
|
367
|
+
},
|
|
368
|
+
/* 164 */ ['m',0,'}'],
|
|
369
|
+
'elementDef',
|
|
370
|
+
/* 166 */ { '@': [166,769], '': 167 },
|
|
371
|
+
/* 167 */ { virtual: ['ck',168,1], '': 168 },
|
|
372
|
+
/* 168 */ { key: ['ck',169], '': 169 },
|
|
373
|
+
/* 169 */ { masked: ['ck',170,1], '': 170 },
|
|
374
|
+
/* 170 */ { element: ['ck',171,1], '': 171 },
|
|
375
|
+
/* 171 */ ['mi',172],
|
|
376
|
+
/* 172 */ { '@': [172,775], '': 173 },
|
|
377
|
+
/* 173 */ {
|
|
378
|
+
'{': [174,161],
|
|
379
|
+
':': ['c',175],
|
|
380
|
+
'': 176
|
|
381
|
+
},
|
|
382
|
+
/* 174 */ { not: [176,446], null: 'not', '': 176 },
|
|
383
|
+
/* 175 */ [176,365],
|
|
384
|
+
/* 176 */ { '=': ['c',177], '': 179 },
|
|
385
|
+
/* 177 */ [178,642],
|
|
386
|
+
/* 178 */ { stored: ['ck',179], '': 179 },
|
|
387
|
+
/* 179 */ 180,
|
|
388
|
+
/* 180 */ { '@': [180,769], '': 0 },
|
|
389
|
+
'enumSymbolsBlock',
|
|
390
|
+
/* 182 */ ['mk',183,'enum'],
|
|
391
|
+
/* 183 */ ['m',184,'{'],
|
|
392
|
+
/* 184 */ { Id: [185,188], '@': 'Id', '': 186 },
|
|
393
|
+
/* 185 */ {
|
|
394
|
+
';': ['c',184],
|
|
395
|
+
'}': 186,
|
|
396
|
+
},
|
|
397
|
+
/* 186 */ ['m',0,'}'],
|
|
398
|
+
'enumSymbolDef',
|
|
399
|
+
/* 188 */ { '@': [188,769], '': 189 },
|
|
400
|
+
/* 189 */ ['mi',190],
|
|
401
|
+
/* 190 */ { '@': [190,769], '': 191 },
|
|
402
|
+
/* 191 */ { '=': ['c',192], '': 0 },
|
|
403
|
+
/* 192 */ {
|
|
404
|
+
String: ['c',194],
|
|
405
|
+
Number: ['c',194],
|
|
406
|
+
'+': ['c',193], '-': '+',
|
|
407
|
+
Id: [194,766], '#': 'Id', QuotedLiteral: 'Id',
|
|
408
|
+
},
|
|
409
|
+
/* 193 */ ['m',194,'Number'],
|
|
410
|
+
/* 194 */ 195,
|
|
411
|
+
/* 195 */ { '@': [195,769], '': 0 },
|
|
412
|
+
'foreignKeysBlock',
|
|
413
|
+
/* 197 */ ['m',198,'{'],
|
|
414
|
+
/* 198 */ { Id: [199,202], '@': 'Id', '': 200 },
|
|
415
|
+
/* 199 */ {
|
|
416
|
+
',': ['c',198],
|
|
417
|
+
'}': 200,
|
|
418
|
+
},
|
|
419
|
+
/* 200 */ ['m',0,'}'],
|
|
420
|
+
'foreignKeyDef',
|
|
421
|
+
/* 202 */ { '@': [202,769], '': 203 },
|
|
422
|
+
/* 203 */ [204,40],
|
|
423
|
+
/* 204 */ { as: ['ck',205], '': 0 },
|
|
424
|
+
/* 205 */ ['mi',0],
|
|
425
|
+
'mixinElementDef',
|
|
426
|
+
/* 207 */ ['mi',208],
|
|
427
|
+
/* 208 */ ['m',209,':'],
|
|
428
|
+
/* 209 */ {
|
|
429
|
+
association: ['ck',210],
|
|
430
|
+
composition: ['ck',212],
|
|
431
|
+
},
|
|
432
|
+
/* 210 */ { '[': [211,428], '': 211 },
|
|
433
|
+
/* 211 */ ['mk',214,'to'],
|
|
434
|
+
/* 212 */ { '[': [213,428], '': 213 },
|
|
435
|
+
/* 213 */ ['mk',214,'of'],
|
|
436
|
+
/* 214 */ { one: ['ck',215,1], many: 'one', '': 215 },
|
|
437
|
+
/* 215 */ [216,40],
|
|
438
|
+
/* 216 */ ['mk',217,'on'],
|
|
439
|
+
/* 217 */ [0,634],
|
|
440
|
+
'annotateArtifact',
|
|
441
|
+
/* 219 */ [220,36],
|
|
442
|
+
/* 220 */ {
|
|
443
|
+
':': ['c',221],
|
|
444
|
+
with: ['ck',226],
|
|
445
|
+
'': 226
|
|
446
|
+
},
|
|
447
|
+
/* 221 */ [222,36],
|
|
448
|
+
/* 222 */ { with: ['ck',223], '': 223 },
|
|
449
|
+
/* 223 */ 224,
|
|
450
|
+
/* 224 */ { '@': [224,769], '': 225 },
|
|
451
|
+
/* 225 */ { '{': [0,324], '': 0 },
|
|
452
|
+
/* 226 */ 227,
|
|
453
|
+
/* 227 */ { '@': [227,769], '': 228 },
|
|
454
|
+
/* 228 */ { '(': [229,311], '': 229 },
|
|
455
|
+
/* 229 */ {
|
|
456
|
+
returns: [0,320],
|
|
457
|
+
'{': [230,324],
|
|
458
|
+
'': 230
|
|
459
|
+
},
|
|
460
|
+
/* 230 */ { actions: [0,299], '': 0 },
|
|
461
|
+
'extendArtifact',
|
|
462
|
+
/* 232 */ [233,36],
|
|
463
|
+
/* 233 */ {
|
|
464
|
+
':': ['c',234],
|
|
465
|
+
with: ['ck',243],
|
|
466
|
+
'': 240
|
|
467
|
+
},
|
|
468
|
+
/* 234 */ [235,36],
|
|
469
|
+
/* 235 */ { with: ['ck',236], '': 236 },
|
|
470
|
+
/* 236 */ 237,
|
|
471
|
+
/* 237 */ { '@': [237,769], '': 238 },
|
|
472
|
+
/* 238 */ {
|
|
473
|
+
elements: ['ck',239],
|
|
474
|
+
'{': 239,
|
|
475
|
+
enum: [0,182],
|
|
476
|
+
'(': [0,419],
|
|
477
|
+
'': 0
|
|
478
|
+
},
|
|
479
|
+
/* 239 */ [0,334],
|
|
480
|
+
/* 240 */ { '@': [240,769], '': 241 },
|
|
481
|
+
/* 241 */ { '{': [242,334], '': 0 },
|
|
482
|
+
/* 242 */ { actions: [0,127], '': 0 },
|
|
483
|
+
/* 243 */ { '@': [243,769], '': 244 },
|
|
484
|
+
/* 244 */ {
|
|
485
|
+
Id: [245,40],
|
|
486
|
+
elements: ['ck',249,1],
|
|
487
|
+
'{': 249,
|
|
488
|
+
actions: [0,127,1],
|
|
489
|
+
enum: [0,182,1],
|
|
490
|
+
'(': [0,419],
|
|
491
|
+
columns: ['ck',251,1],
|
|
492
|
+
definitions: ['ck',252,1],
|
|
493
|
+
'': 0
|
|
494
|
+
},
|
|
495
|
+
/* 245 */ { ',': ['c',246], '': 247 },
|
|
496
|
+
/* 246 */ [245,40],
|
|
497
|
+
/* 247 */ { '{': [248,334], '': 248 },
|
|
498
|
+
/* 248 */ { actions: [0,127], '': 0 },
|
|
499
|
+
/* 249 */ [250,334],
|
|
500
|
+
/* 250 */ { actions: [0,127], '': 0 },
|
|
501
|
+
/* 251 */ [0,563],
|
|
502
|
+
/* 252 */ [0,5],
|
|
503
|
+
'extendService',
|
|
504
|
+
/* 254 */ ['mk',255,'service'],
|
|
505
|
+
/* 255 */ [256,36],
|
|
506
|
+
/* 256 */ { with: ['ck',257], '': 257 },
|
|
507
|
+
/* 257 */ 258,
|
|
508
|
+
/* 258 */ { '@': [258,769], '': 259 },
|
|
509
|
+
/* 259 */ { '{': [0,5], '': 0 },
|
|
510
|
+
'extendContext',
|
|
511
|
+
/* 261 */ ['mk',262,'context'],
|
|
512
|
+
/* 262 */ [263,36],
|
|
513
|
+
/* 263 */ { with: ['ck',264], '': 264 },
|
|
514
|
+
/* 264 */ 265,
|
|
515
|
+
/* 265 */ { '@': [265,769], '': 266 },
|
|
516
|
+
/* 266 */ { '{': [0,5], '': 0 },
|
|
517
|
+
'extendType',
|
|
518
|
+
/* 268 */ ['mk',269,'type'],
|
|
519
|
+
/* 269 */ [270,36],
|
|
520
|
+
/* 270 */ { with: ['ck',273], '': 271 },
|
|
521
|
+
/* 271 */ { '@': [271,769], '': 272 },
|
|
522
|
+
/* 272 */ { '{': [0,334], '': 0 },
|
|
523
|
+
/* 273 */ { '@': [273,769], '': 274 },
|
|
524
|
+
/* 274 */ {
|
|
525
|
+
Id: [275,40],
|
|
526
|
+
elements: ['ck',278,1],
|
|
527
|
+
'{': 278,
|
|
528
|
+
enum: [0,182,1],
|
|
529
|
+
'(': [0,419],
|
|
530
|
+
'': 0
|
|
531
|
+
},
|
|
532
|
+
/* 275 */ { ',': ['c',276], '': 277 },
|
|
533
|
+
/* 276 */ [275,40],
|
|
534
|
+
/* 277 */ { '{': [0,334], '': 0 },
|
|
535
|
+
/* 278 */ [0,334],
|
|
536
|
+
'extendEntityOrAspect',
|
|
537
|
+
/* 280 */ { aspect: ['ck',281], entity: 'aspect' },
|
|
538
|
+
/* 281 */ [282,36],
|
|
539
|
+
/* 282 */ { with: ['ck',284], '': 283 },
|
|
540
|
+
/* 283 */ { '@': [283,769], '': 288 },
|
|
541
|
+
/* 284 */ { '@': [284,769], '': 285 },
|
|
542
|
+
/* 285 */ {
|
|
543
|
+
Id: [286,40],
|
|
544
|
+
actions: ['g',288,1],
|
|
545
|
+
'': 288
|
|
546
|
+
},
|
|
547
|
+
/* 286 */ { ',': ['c',287], '': 288 },
|
|
548
|
+
/* 287 */ [286,40],
|
|
549
|
+
/* 288 */ { '{': [289,334], '': 289 },
|
|
550
|
+
/* 289 */ { actions: [0,127], '': 0 },
|
|
551
|
+
'extendProjection',
|
|
552
|
+
/* 291 */ ['mk',292,'projection'],
|
|
553
|
+
/* 292 */ [293,36],
|
|
554
|
+
/* 293 */ { with: ['ck',294], '': 294 },
|
|
555
|
+
/* 294 */ 295,
|
|
556
|
+
/* 295 */ { '@': [295,769], '': 296 },
|
|
557
|
+
/* 296 */ { '{': [297,563], '': 297 },
|
|
558
|
+
/* 297 */ { actions: [0,127], '': 0 },
|
|
559
|
+
'annotateActionsBlock',
|
|
560
|
+
/* 299 */ ['mk',300,'actions'],
|
|
561
|
+
/* 300 */ ['m',301,'{'],
|
|
562
|
+
/* 301 */ { Id: [302,305], '@': 'Id', '': 303 },
|
|
563
|
+
/* 302 */ {
|
|
564
|
+
';': ['c',301],
|
|
565
|
+
'}': 303,
|
|
566
|
+
Id: ['g',301], '@': 'Id',
|
|
567
|
+
},
|
|
568
|
+
/* 303 */ ['m',0,'}'],
|
|
569
|
+
'annotateBoundAction',
|
|
570
|
+
/* 305 */ { '@': [305,769], '': 306 },
|
|
571
|
+
/* 306 */ ['mi',307],
|
|
572
|
+
/* 307 */ { '@': [307,769], '': 308 },
|
|
573
|
+
/* 308 */ { '(': [309,311], '': 309 },
|
|
574
|
+
/* 309 */ { returns: [0,320,1], '': 0 },
|
|
575
|
+
'annotateParamsBlock',
|
|
576
|
+
/* 311 */ ['m',312,'('],
|
|
577
|
+
/* 312 */ { Id: [313,316], '@': 'Id', '': 314 },
|
|
578
|
+
/* 313 */ {
|
|
579
|
+
',': ['c',312],
|
|
580
|
+
')': 314,
|
|
581
|
+
},
|
|
582
|
+
/* 314 */ ['m',0,')'],
|
|
583
|
+
'annotateParam',
|
|
584
|
+
/* 316 */ { '@': [316,769], '': 317 },
|
|
585
|
+
/* 317 */ ['mi',318],
|
|
586
|
+
/* 318 */ { '@': [318,769], '': 0 },
|
|
587
|
+
'annotateReturns',
|
|
588
|
+
/* 320 */ ['mk',321,'returns'],
|
|
589
|
+
/* 321 */ { '@': [321,769], '': 322 },
|
|
590
|
+
/* 322 */ { '{': [0,324], '': 0 },
|
|
591
|
+
'annotateElementsBlock',
|
|
592
|
+
/* 324 */ ['m',325,'{'],
|
|
593
|
+
/* 325 */ { Id: [326,329], '@': 'Id', '': 327 },
|
|
594
|
+
/* 326 */ {
|
|
595
|
+
';': ['c',325],
|
|
596
|
+
'}': 327,
|
|
597
|
+
Id: ['g',325], '@': 'Id',
|
|
598
|
+
},
|
|
599
|
+
/* 327 */ ['m',0,'}'],
|
|
600
|
+
'annotateElement',
|
|
601
|
+
/* 329 */ { '@': [329,769], '': 330 },
|
|
602
|
+
/* 330 */ ['mi',331],
|
|
603
|
+
/* 331 */ { '@': [331,769], '': 332 },
|
|
604
|
+
/* 332 */ { '{': [0,324], '': 0 },
|
|
605
|
+
'extendElementsBlock',
|
|
606
|
+
/* 334 */ ['m',335,'{'],
|
|
607
|
+
/* 335 */ { Id: [336,339], '@': 'Id', '': 337 },
|
|
608
|
+
/* 336 */ {
|
|
609
|
+
';': ['c',335],
|
|
610
|
+
'}': 337,
|
|
611
|
+
Id: ['g',335], '@': 'Id',
|
|
612
|
+
},
|
|
613
|
+
/* 337 */ ['m',0,'}'],
|
|
614
|
+
'elementDefOrExtend',
|
|
615
|
+
/* 339 */ { '@': [339,769], '': 340 },
|
|
616
|
+
/* 340 */ {
|
|
617
|
+
Id: [0,166], '@': 'Id', key: 'Id',
|
|
618
|
+
extend: ['ck',341,1],
|
|
619
|
+
},
|
|
620
|
+
/* 341 */ { element: ['ck',342,1], '': 342 },
|
|
621
|
+
/* 342 */ ['mi',343],
|
|
622
|
+
/* 343 */ { with: ['ck',346], '': 344 },
|
|
623
|
+
/* 344 */ { '@': [344,769], '': 345 },
|
|
624
|
+
/* 345 */ { '{': [0,334], '': 0 },
|
|
625
|
+
/* 346 */ { '@': [346,769], '': 347 },
|
|
626
|
+
/* 347 */ {
|
|
627
|
+
elements: ['ck',348],
|
|
628
|
+
'{': 348,
|
|
629
|
+
enum: [0,182],
|
|
630
|
+
'(': [0,419],
|
|
631
|
+
'': 0
|
|
632
|
+
},
|
|
633
|
+
/* 348 */ [0,334],
|
|
634
|
+
'typeOrIncludesSpec',
|
|
635
|
+
/* 350 */ {
|
|
636
|
+
'{': [351,161],
|
|
637
|
+
':': ['c',352],
|
|
638
|
+
},
|
|
639
|
+
/* 351 */ { not: [0,446], null: 'not', '': 0 },
|
|
640
|
+
/* 352 */ {
|
|
641
|
+
'{': [0,365,1], many: '{', type: '{', array: '{', localized: '{', association: '{', composition: '{',
|
|
642
|
+
Id: [353,40],
|
|
643
|
+
},
|
|
644
|
+
/* 353 */ {
|
|
645
|
+
'(': [354,408], ':': '(',
|
|
646
|
+
',': 359, '{': 359,
|
|
647
|
+
'': 354
|
|
648
|
+
},
|
|
649
|
+
/* 354 */ { not: [355,446], null: 'not', '': 355 },
|
|
650
|
+
/* 355 */ 356,
|
|
651
|
+
/* 356 */ { '@': [356,769], '': 357 },
|
|
652
|
+
/* 357 */ { enum: [358,182], '': 358 },
|
|
653
|
+
/* 358 */ { not: [0,440], null: 'not', default: 'not', '': 0 },
|
|
654
|
+
/* 359 */ { ',': ['c',360], '': 362 },
|
|
655
|
+
/* 360 */ { Id: [361,40], '': 362 },
|
|
656
|
+
/* 361 */ {
|
|
657
|
+
',': ['c',360],
|
|
658
|
+
'{': 362,
|
|
659
|
+
},
|
|
660
|
+
/* 362 */ [363,161],
|
|
661
|
+
/* 363 */ { not: [0,446], null: 'not', '': 0 },
|
|
662
|
+
'typeExpression',
|
|
663
|
+
/* 365 */ {
|
|
664
|
+
'{': [366,161],
|
|
665
|
+
Id: [367,407],
|
|
666
|
+
type: [367,399,1],
|
|
667
|
+
localized: ['ck',372,1],
|
|
668
|
+
association: ['ck',375,1],
|
|
669
|
+
composition: ['ck',382,1],
|
|
670
|
+
array: ['ck',390,1],
|
|
671
|
+
many: ['ck',391,1],
|
|
672
|
+
},
|
|
673
|
+
/* 366 */ { not: [0,446], null: 'not', '': 0 },
|
|
674
|
+
/* 367 */ { not: [368,446], null: 'not', '': 368 },
|
|
675
|
+
/* 368 */ 369,
|
|
676
|
+
/* 369 */ { '@': [369,769], '': 370 },
|
|
677
|
+
/* 370 */ { enum: [371,182], '': 371 },
|
|
678
|
+
/* 371 */ { not: [0,440], null: 'not', default: 'not', '': 0 },
|
|
679
|
+
/* 372 */ [373,407],
|
|
680
|
+
/* 373 */ { '@': [373,769], '': 374 },
|
|
681
|
+
/* 374 */ { not: [0,440], null: 'not', default: 'not', '': 0 },
|
|
682
|
+
/* 375 */ { '[': [376,428], '': 376 },
|
|
683
|
+
/* 376 */ ['mk',377,'to'],
|
|
684
|
+
/* 377 */ { one: ['ck',378,1], many: 'one', '': 378 },
|
|
685
|
+
/* 378 */ [379,40],
|
|
686
|
+
/* 379 */ {
|
|
687
|
+
on: ['ck',380],
|
|
688
|
+
'{': [381,197],
|
|
689
|
+
'': 381
|
|
690
|
+
},
|
|
691
|
+
/* 380 */ [0,634],
|
|
692
|
+
/* 381 */ { not: [0,440], null: 'not', default: 'not', '': 0 },
|
|
693
|
+
/* 382 */ { '[': [383,428], '': 383 },
|
|
694
|
+
/* 383 */ ['mk',384,'of'],
|
|
695
|
+
/* 384 */ { one: ['ck',385,1], many: 'one', '': 385 },
|
|
696
|
+
/* 385 */ {
|
|
697
|
+
Id: [386,40],
|
|
698
|
+
'{': 389,
|
|
699
|
+
},
|
|
700
|
+
/* 386 */ {
|
|
701
|
+
on: ['ck',387],
|
|
702
|
+
'{': [388,197],
|
|
703
|
+
'': 388
|
|
704
|
+
},
|
|
705
|
+
/* 387 */ [0,634],
|
|
706
|
+
/* 388 */ { not: [0,440], null: 'not', default: 'not', '': 0 },
|
|
707
|
+
/* 389 */ [0,161],
|
|
708
|
+
/* 390 */ ['mk',391,'of'],
|
|
709
|
+
/* 391 */ {
|
|
710
|
+
'{': [392,161],
|
|
711
|
+
Id: [393,407],
|
|
712
|
+
type: [393,399,1],
|
|
713
|
+
},
|
|
714
|
+
/* 392 */ { not: [0,446], null: 'not', '': 0 },
|
|
715
|
+
/* 393 */ { not: [394,446], null: 'not', '': 394 },
|
|
716
|
+
/* 394 */ 395,
|
|
717
|
+
/* 395 */ { '@': [395,769], '': 396 },
|
|
718
|
+
/* 396 */ { enum: [397,182], '': 397 },
|
|
719
|
+
/* 397 */ { not: [0,446], null: 'not', '': 0 },
|
|
720
|
+
'typeTypeOf',
|
|
721
|
+
/* 399 */ ['mk',400,'type'],
|
|
722
|
+
/* 400 */ ['mk',401,'of'],
|
|
723
|
+
/* 401 */ [402,40],
|
|
724
|
+
/* 402 */ { ':': ['c',403], '': 0 },
|
|
725
|
+
/* 403 */ ['miA',404],
|
|
726
|
+
/* 404 */ { '.': ['c',405], '': 0 },
|
|
727
|
+
/* 405 */ ['miA',404],
|
|
728
|
+
'typeRefOptArgs',
|
|
729
|
+
/* 407 */ [408,40],
|
|
730
|
+
/* 408 */ {
|
|
731
|
+
':': ['c',409],
|
|
732
|
+
'(': ['c',412],
|
|
733
|
+
'': 0
|
|
734
|
+
},
|
|
735
|
+
/* 409 */ ['miA',410],
|
|
736
|
+
/* 410 */ { '.': ['c',411], '': 0 },
|
|
737
|
+
/* 411 */ ['miA',410],
|
|
738
|
+
/* 412 */ {
|
|
739
|
+
Number: ['c',413],
|
|
740
|
+
Id: 415,
|
|
741
|
+
},
|
|
742
|
+
/* 413 */ { ',': ['c',414], '': 417 },
|
|
743
|
+
/* 414 */ {
|
|
744
|
+
Number: ['c',413],
|
|
745
|
+
floating: ['ck',413], variable: 'floating',
|
|
746
|
+
')': 417,
|
|
747
|
+
},
|
|
748
|
+
/* 415 */ { Id: [416,424], '': 417 },
|
|
749
|
+
/* 416 */ {
|
|
750
|
+
',': ['c',415],
|
|
751
|
+
')': 417,
|
|
752
|
+
},
|
|
753
|
+
/* 417 */ ['m',0,')'],
|
|
754
|
+
'typeNamedArgsList',
|
|
755
|
+
/* 419 */ ['m',420,'('],
|
|
756
|
+
/* 420 */ { Id: [421,424], '': 422 },
|
|
757
|
+
/* 421 */ {
|
|
758
|
+
',': ['c',420],
|
|
759
|
+
')': 422,
|
|
760
|
+
},
|
|
761
|
+
/* 422 */ ['m',0,')'],
|
|
762
|
+
'typeNamedArg',
|
|
763
|
+
/* 424 */ ['mi',425],
|
|
764
|
+
/* 425 */ ['m',426,':'],
|
|
765
|
+
/* 426 */ {
|
|
766
|
+
Number: ['c',0],
|
|
767
|
+
floating: ['ck',0], variable: 'floating',
|
|
768
|
+
},
|
|
769
|
+
'cardinality',
|
|
770
|
+
/* 428 */ ['m',429,'['],
|
|
771
|
+
/* 429 */ {
|
|
772
|
+
'*': ['c',430],
|
|
773
|
+
Number: ['c',432],
|
|
774
|
+
'': 434
|
|
775
|
+
},
|
|
776
|
+
/* 430 */ { ',': ['c',431], '': 434 },
|
|
777
|
+
/* 431 */ [434,436],
|
|
778
|
+
/* 432 */ {
|
|
779
|
+
',': ['c',433],
|
|
780
|
+
'..': [434,437],
|
|
781
|
+
'': 434
|
|
782
|
+
},
|
|
783
|
+
/* 433 */ [434,436],
|
|
784
|
+
/* 434 */ ['m',0,']'],
|
|
785
|
+
'targetCardinality',
|
|
786
|
+
/* 436 */ {
|
|
787
|
+
'*': ['c',0],
|
|
788
|
+
Number: ['c',437],
|
|
789
|
+
},
|
|
790
|
+
/* 437 */ { '..': ['c',438], '': 0 },
|
|
791
|
+
/* 438 */ {
|
|
792
|
+
'*': ['c',0],
|
|
793
|
+
Number: ['c',0],
|
|
794
|
+
},
|
|
795
|
+
'nullabilityAndDefault',
|
|
796
|
+
/* 440 */ {
|
|
797
|
+
not: [441,446], null: 'not',
|
|
798
|
+
default: ['ck',443],
|
|
799
|
+
},
|
|
800
|
+
/* 441 */ { default: ['ck',442], '': 0 },
|
|
801
|
+
/* 442 */ [0,642],
|
|
802
|
+
/* 443 */ [444,642],
|
|
803
|
+
/* 444 */ { not: [0,446], null: 'not', '': 0 },
|
|
804
|
+
'nullability',
|
|
805
|
+
/* 446 */ {
|
|
806
|
+
null: ['ck',0],
|
|
807
|
+
not: ['ck',447],
|
|
808
|
+
},
|
|
809
|
+
/* 447 */ ['mk',0,'null'],
|
|
810
|
+
'queryEOF',
|
|
811
|
+
/* 449 */ [450,459],
|
|
812
|
+
/* 450 */ { ';': ['c',451], '': 451 },
|
|
813
|
+
/* 451 */ ['m',0,'EOF'],
|
|
814
|
+
'projectionSpec',
|
|
815
|
+
/* 453 */ ['mk',454,'projection'],
|
|
816
|
+
/* 454 */ ['mk',455,'on'],
|
|
817
|
+
/* 455 */ [456,518],
|
|
818
|
+
/* 456 */ { '{': [457,563], '': 457 },
|
|
819
|
+
/* 457 */ { excluding: [0,556], '': 0 },
|
|
820
|
+
'queryExpression',
|
|
821
|
+
/* 459 */ {
|
|
822
|
+
'(': ['c',460],
|
|
823
|
+
Id: [462,469],
|
|
824
|
+
},
|
|
825
|
+
/* 460 */ [461,459],
|
|
826
|
+
/* 461 */ ['m',462,')'],
|
|
827
|
+
/* 462 */ {
|
|
828
|
+
intersect: ['ck',463],
|
|
829
|
+
minus: ['ck',463], except: 'minus',
|
|
830
|
+
union: ['ck',464],
|
|
831
|
+
'': 466
|
|
832
|
+
},
|
|
833
|
+
/* 463 */ { distinct: ['ck',465], '': 465 },
|
|
834
|
+
/* 464 */ { all: ['ck',465], distinct: 'all', '': 465 },
|
|
835
|
+
/* 465 */ [462,459],
|
|
836
|
+
/* 466 */ { limit: ['g',467], order: 'limit', '': 0 },
|
|
837
|
+
/* 467 */ [0,614],
|
|
838
|
+
'selectQuery',
|
|
839
|
+
/* 469 */ ['mk',470,'select'],
|
|
840
|
+
/* 470 */ {
|
|
841
|
+
from: ['ck',471],
|
|
842
|
+
all: ['ck',481,1], distinct: 'all',
|
|
843
|
+
Id: 481, '#': 481, '(': 481, '*': 481, '+': 481, '-': 481, ':': 481, '?': 481, '@': 481, '{': 481, key: 481, not: 481, case: 481, cast: 481, null: 481, true: 481, false: 481, Number: 481, String: 481, exists: 481, QuotedLiteral: 481,
|
|
844
|
+
},
|
|
845
|
+
/* 471 */ [472,488],
|
|
846
|
+
/* 472 */ { mixin: ['ck',473], '': 478 },
|
|
847
|
+
/* 473 */ ['m',474,'{'],
|
|
848
|
+
/* 474 */ { Id: [475,207], '': 476 },
|
|
849
|
+
/* 475 */ {
|
|
850
|
+
';': ['c',474],
|
|
851
|
+
'}': 476,
|
|
852
|
+
},
|
|
853
|
+
/* 476 */ ['m',477,'}'],
|
|
854
|
+
/* 477 */ ['mk',478,'into'],
|
|
855
|
+
/* 478 */ { all: ['ck',479], distinct: 'all', '': 479 },
|
|
856
|
+
/* 479 */ { '{': [480,563], '': 480 },
|
|
857
|
+
/* 480 */ { excluding: [486,556], '': 486 },
|
|
858
|
+
/* 481 */ {
|
|
859
|
+
'*': ['c',482],
|
|
860
|
+
Id: [482,568], '#': 'Id', '(': 'Id', '+': 'Id', '-': 'Id', ':': 'Id', '?': 'Id', '@': 'Id', '{': 'Id', Number: 'Id', String: 'Id', QuotedLiteral: 'Id',
|
|
861
|
+
},
|
|
862
|
+
/* 482 */ { ',': ['c',483], '': 484 },
|
|
863
|
+
/* 483 */ {
|
|
864
|
+
'*': ['c',482],
|
|
865
|
+
Id: [482,568], '#': 'Id', '(': 'Id', '+': 'Id', '-': 'Id', ':': 'Id', '?': 'Id', '@': 'Id', '{': 'Id', Number: 'Id', String: 'Id', QuotedLiteral: 'Id',
|
|
866
|
+
},
|
|
867
|
+
/* 484 */ ['mk',485,'from'],
|
|
868
|
+
/* 485 */ [486,488],
|
|
869
|
+
/* 486 */ { group: [0,602], where: 'group', having: 'group', '': 0 },
|
|
870
|
+
'querySource',
|
|
871
|
+
/* 488 */ [489,493],
|
|
872
|
+
/* 489 */ { ',': 490, '': 0 },
|
|
873
|
+
/* 490 */ { ',': ['c',491], '': 0 },
|
|
874
|
+
/* 491 */ [490,493],
|
|
875
|
+
'tableExpression',
|
|
876
|
+
/* 493 */ {
|
|
877
|
+
'(': [494,505],
|
|
878
|
+
Id: [495,518],
|
|
879
|
+
},
|
|
880
|
+
/* 494 */ 495,
|
|
881
|
+
/* 495 */ {
|
|
882
|
+
cross: ['ck',496],
|
|
883
|
+
inner: ['ck',499],
|
|
884
|
+
full: ['ck',498], left: 'full', right: 'full',
|
|
885
|
+
join: 500,
|
|
886
|
+
'': 0
|
|
887
|
+
},
|
|
888
|
+
/* 496 */ ['mk',497,'join'],
|
|
889
|
+
/* 497 */ {
|
|
890
|
+
'(': [495,505],
|
|
891
|
+
Id: [495,518],
|
|
892
|
+
},
|
|
893
|
+
/* 498 */ { outer: ['ck',499], '': 499 },
|
|
894
|
+
/* 499 */ { one: [500,512], many: 'one', exact: 'one', '': 500 },
|
|
895
|
+
/* 500 */ ['mk',501,'join'],
|
|
896
|
+
/* 501 */ [502,493],
|
|
897
|
+
/* 502 */ ['mk',503,'on'],
|
|
898
|
+
/* 503 */ [495,634],
|
|
899
|
+
'tableOrQueryParens',
|
|
900
|
+
/* 505 */ ['m',506,'('],
|
|
901
|
+
/* 506 */ {
|
|
902
|
+
'(': [507,505],
|
|
903
|
+
Id: [508,493],
|
|
904
|
+
select: [508,459],
|
|
905
|
+
},
|
|
906
|
+
/* 507 */ {
|
|
907
|
+
full: [508,494], join: 'full', left: 'full', cross: 'full', inner: 'full', right: 'full',
|
|
908
|
+
limit: [508,462], minus: 'limit', order: 'limit', union: 'limit', except: 'limit', intersect: 'limit',
|
|
909
|
+
'': 508
|
|
910
|
+
},
|
|
911
|
+
/* 508 */ ['m',509,')'],
|
|
912
|
+
/* 509 */ {
|
|
913
|
+
as: ['ck',510],
|
|
914
|
+
Id: ['ci',0],
|
|
915
|
+
'': 0
|
|
916
|
+
},
|
|
917
|
+
/* 510 */ ['mi',0],
|
|
918
|
+
'joinCardinality',
|
|
919
|
+
/* 512 */ {
|
|
920
|
+
exact: ['ck',513],
|
|
921
|
+
one: 513,
|
|
922
|
+
many: ['ck',514],
|
|
923
|
+
},
|
|
924
|
+
/* 513 */ ['mk',514,'one'],
|
|
925
|
+
/* 514 */ ['mk',515,'to'],
|
|
926
|
+
/* 515 */ {
|
|
927
|
+
exact: ['ck',516],
|
|
928
|
+
one: 516,
|
|
929
|
+
many: ['ck',0],
|
|
930
|
+
},
|
|
931
|
+
/* 516 */ ['mk',0,'one'],
|
|
932
|
+
'fromRefWithOptAlias',
|
|
933
|
+
/* 518 */ [519,524],
|
|
934
|
+
/* 519 */ { ':': ['c',520], '': 521 },
|
|
935
|
+
/* 520 */ [521,524],
|
|
936
|
+
/* 521 */ {
|
|
937
|
+
as: ['ck',522],
|
|
938
|
+
Id: ['ci',0],
|
|
939
|
+
'': 0
|
|
940
|
+
},
|
|
941
|
+
/* 522 */ ['mi',0],
|
|
942
|
+
'fromPath',
|
|
943
|
+
/* 524 */ ['mi',525],
|
|
944
|
+
/* 525 */ { '(': [526,530], '[': '(', '': 526 },
|
|
945
|
+
/* 526 */ { '.': ['c',527], '': 0 },
|
|
946
|
+
/* 527 */ ['miA',528],
|
|
947
|
+
/* 528 */ { '(': [526,530], '[': '(', '': 526 },
|
|
948
|
+
'fromArgumentsAndFilter',
|
|
949
|
+
/* 530 */ { '(': ['c',531], '': 535 },
|
|
950
|
+
/* 531 */ { Id: 532 },
|
|
951
|
+
/* 532 */ { Id: [533,537], '': 534 },
|
|
952
|
+
/* 533 */ {
|
|
953
|
+
',': ['c',532],
|
|
954
|
+
')': 534,
|
|
955
|
+
},
|
|
956
|
+
/* 534 */ ['m',535,')'],
|
|
957
|
+
/* 535 */ { '[': [0,541], '': 0 },
|
|
958
|
+
'fromNamedArgument',
|
|
959
|
+
/* 537 */ ['mi',538],
|
|
960
|
+
/* 538 */ ['m',539,':'],
|
|
961
|
+
/* 539 */ [0,642],
|
|
962
|
+
'cardinalityAndFilter',
|
|
963
|
+
/* 541 */ ['m',542,'['],
|
|
964
|
+
/* 542 */ { Number: ['c',543], '': 544 },
|
|
965
|
+
/* 543 */ ['m',544,':'],
|
|
966
|
+
/* 544 */ [545,547],
|
|
967
|
+
/* 545 */ ['m',0,']'],
|
|
968
|
+
'filterClauses',
|
|
969
|
+
/* 547 */ {
|
|
970
|
+
where: ['ck',548],
|
|
971
|
+
Id: 548, '#': 548, '(': 548, '+': 548, '-': 548, ':': 548, '?': 548, not: 548, case: 548, cast: 548, null: 548, true: 548, false: 548, Number: 548, String: 548, exists: 548, QuotedLiteral: 548,
|
|
972
|
+
group: ['g',549,1], limit: 'group', order: 'group', having: 'group',
|
|
973
|
+
'': 549
|
|
974
|
+
},
|
|
975
|
+
/* 548 */ [549,634],
|
|
976
|
+
/* 549 */ { group: 550, '': 551 },
|
|
977
|
+
/* 550 */ [551,608],
|
|
978
|
+
/* 551 */ { having: ['ck',552], '': 553 },
|
|
979
|
+
/* 552 */ [553,634],
|
|
980
|
+
/* 553 */ { limit: 554, order: 554, '': 0 },
|
|
981
|
+
/* 554 */ [0,614],
|
|
982
|
+
'excludingClause',
|
|
983
|
+
/* 556 */ ['mk',557,'excluding'],
|
|
984
|
+
/* 557 */ ['m',558,'{'],
|
|
985
|
+
/* 558 */ { Id: 559 },
|
|
986
|
+
/* 559 */ { Id: ['ciA',560], '': 561 },
|
|
987
|
+
/* 560 */ {
|
|
988
|
+
',': ['c',559],
|
|
989
|
+
'}': 561,
|
|
990
|
+
},
|
|
991
|
+
/* 561 */ ['m',0,'}'],
|
|
992
|
+
'selectItemsList',
|
|
993
|
+
/* 563 */ ['m',564,'{'],
|
|
994
|
+
/* 564 */ {
|
|
995
|
+
'*': ['c',565],
|
|
996
|
+
Id: [565,568], '#': 'Id', '(': 'Id', '+': 'Id', '-': 'Id', ':': 'Id', '?': 'Id', '@': 'Id', '{': 'Id', Number: 'Id', String: 'Id', QuotedLiteral: 'Id',
|
|
997
|
+
'': 566
|
|
998
|
+
},
|
|
999
|
+
/* 565 */ {
|
|
1000
|
+
',': ['c',564],
|
|
1001
|
+
'}': 566,
|
|
1002
|
+
},
|
|
1003
|
+
/* 566 */ ['m',0,'}'],
|
|
1004
|
+
'selectItemDef',
|
|
1005
|
+
/* 568 */ { '@': [568,772], '': 569 },
|
|
1006
|
+
/* 569 */ { virtual: ['ck',570,1], '': 570 },
|
|
1007
|
+
/* 570 */ { key: ['ck',571], '': 571 },
|
|
1008
|
+
/* 571 */ {
|
|
1009
|
+
Id: [572,642], '#': 'Id', '(': 'Id', '+': 'Id', '-': 'Id', ':': 'Id', '?': 'Id', Number: 'Id', String: 'Id', QuotedLiteral: 'Id',
|
|
1010
|
+
'{': [579,563],
|
|
1011
|
+
},
|
|
1012
|
+
/* 572 */ {
|
|
1013
|
+
as: ['ck',573],
|
|
1014
|
+
Id: ['ci',574],
|
|
1015
|
+
'': 574
|
|
1016
|
+
},
|
|
1017
|
+
/* 573 */ ['mi',574],
|
|
1018
|
+
/* 574 */ {
|
|
1019
|
+
'{': 575,
|
|
1020
|
+
'.': ['c',577],
|
|
1021
|
+
'': 582
|
|
1022
|
+
},
|
|
1023
|
+
/* 575 */ [576,563],
|
|
1024
|
+
/* 576 */ { excluding: [582,556], '': 582 },
|
|
1025
|
+
/* 577 */ {
|
|
1026
|
+
'{': [578,563],
|
|
1027
|
+
'*': ['c',582],
|
|
1028
|
+
},
|
|
1029
|
+
/* 578 */ { excluding: [582,556], '': 582 },
|
|
1030
|
+
/* 579 */ { excluding: [580,556], '': 580 },
|
|
1031
|
+
/* 580 */ ['mk',581,'as'],
|
|
1032
|
+
/* 581 */ ['mi',582],
|
|
1033
|
+
/* 582 */ 583,
|
|
1034
|
+
/* 583 */ { '@': [583,775], '': 584 },
|
|
1035
|
+
/* 584 */ { ':': ['c',585], '': 0 },
|
|
1036
|
+
/* 585 */ {
|
|
1037
|
+
type: [599,399,1],
|
|
1038
|
+
localized: ['ck',586,1],
|
|
1039
|
+
Id: 586,
|
|
1040
|
+
redirected: ['ck',587,1],
|
|
1041
|
+
association: ['ck',591,1],
|
|
1042
|
+
composition: ['ck',593,1],
|
|
1043
|
+
},
|
|
1044
|
+
/* 586 */ [599,407],
|
|
1045
|
+
/* 587 */ ['mk',588,'to'],
|
|
1046
|
+
/* 588 */ [589,40],
|
|
1047
|
+
/* 589 */ {
|
|
1048
|
+
on: ['ck',590],
|
|
1049
|
+
'{': [599,197],
|
|
1050
|
+
'': 599
|
|
1051
|
+
},
|
|
1052
|
+
/* 590 */ [599,634],
|
|
1053
|
+
/* 591 */ { '[': [592,428], '': 592 },
|
|
1054
|
+
/* 592 */ ['mk',595,'to'],
|
|
1055
|
+
/* 593 */ { '[': [594,428], '': 594 },
|
|
1056
|
+
/* 594 */ ['mk',595,'of'],
|
|
1057
|
+
/* 595 */ { one: ['ck',596,1], many: 'one', '': 596 },
|
|
1058
|
+
/* 596 */ [597,40],
|
|
1059
|
+
/* 597 */ ['mk',598,'on'],
|
|
1060
|
+
/* 598 */ [599,634],
|
|
1061
|
+
/* 599 */ 600,
|
|
1062
|
+
/* 600 */ { '@': [600,769], '': 0 },
|
|
1063
|
+
'whereGroupByHaving',
|
|
1064
|
+
/* 602 */ { where: ['ck',603], '': 604 },
|
|
1065
|
+
/* 603 */ [604,634],
|
|
1066
|
+
/* 604 */ { group: [605,608], '': 605 },
|
|
1067
|
+
/* 605 */ { having: ['ck',606], '': 0 },
|
|
1068
|
+
/* 606 */ [0,634],
|
|
1069
|
+
'groupByClause',
|
|
1070
|
+
/* 608 */ ['mk',609,'group'],
|
|
1071
|
+
/* 609 */ ['mk',610,'by'],
|
|
1072
|
+
/* 610 */ [611,642],
|
|
1073
|
+
/* 611 */ { ',': ['c',612], '': 0 },
|
|
1074
|
+
/* 612 */ [611,642],
|
|
1075
|
+
'orderByLimitOffset',
|
|
1076
|
+
/* 614 */ { order: [615,620], '': 615 },
|
|
1077
|
+
/* 615 */ { limit: ['ck',616], '': 0 },
|
|
1078
|
+
/* 616 */ [617,642],
|
|
1079
|
+
/* 617 */ { offset: ['ck',618], '': 0 },
|
|
1080
|
+
/* 618 */ [0,642],
|
|
1081
|
+
'orderByClause',
|
|
1082
|
+
/* 620 */ ['mk',621,'order'],
|
|
1083
|
+
/* 621 */ ['mk',622,'by'],
|
|
1084
|
+
/* 622 */ [623,626],
|
|
1085
|
+
/* 623 */ { ',': ['c',624], '': 0 },
|
|
1086
|
+
/* 624 */ [623,626],
|
|
1087
|
+
'orderByExpression',
|
|
1088
|
+
/* 626 */ [627,642],
|
|
1089
|
+
/* 627 */ { asc: ['ck',628], desc: 'asc', '': 628 },
|
|
1090
|
+
/* 628 */ { nulls: ['ck',629], '': 0 },
|
|
1091
|
+
/* 629 */ { last: ['ck',0], first: 'last' },
|
|
1092
|
+
'conditionEOF',
|
|
1093
|
+
/* 631 */ [632,642],
|
|
1094
|
+
/* 632 */ ['m',0,'EOF'],
|
|
1095
|
+
'condition',
|
|
1096
|
+
/* 634 */ [0,642],
|
|
1097
|
+
'valuePath',
|
|
1098
|
+
/* 636 */ ['mi',637],
|
|
1099
|
+
/* 637 */ { '(': [638,703], '[': '(', '': 638 },
|
|
1100
|
+
/* 638 */ { '.': ['c',639], '': 0 },
|
|
1101
|
+
/* 639 */ ['miA',640],
|
|
1102
|
+
/* 640 */ { '(': [638,703], '[': '(', '': 638 },
|
|
1103
|
+
'expression',
|
|
1104
|
+
/* 642 */ {
|
|
1105
|
+
'(': [643,670],
|
|
1106
|
+
'#': [653,766], null: '#', true: '#', false: '#', Number: '#', String: '#', QuotedLiteral: '#',
|
|
1107
|
+
':': ['c',644],
|
|
1108
|
+
'?': ['c',653],
|
|
1109
|
+
Id: [646,636],
|
|
1110
|
+
new: [653,682,1],
|
|
1111
|
+
exists: ['ck',649],
|
|
1112
|
+
case: [653,685],
|
|
1113
|
+
cast: [653,696],
|
|
1114
|
+
'+': ['c',652], '-': '+',
|
|
1115
|
+
not: ['ck',652],
|
|
1116
|
+
},
|
|
1117
|
+
/* 643 */ 653,
|
|
1118
|
+
/* 644 */ {
|
|
1119
|
+
Id: ['ciA',645],
|
|
1120
|
+
Number: ['c',653],
|
|
1121
|
+
},
|
|
1122
|
+
/* 645 */ { '.': [653,638], '': 653 },
|
|
1123
|
+
/* 646 */ { over: ['ck',647,1], '': 648 },
|
|
1124
|
+
/* 647 */ [648,730],
|
|
1125
|
+
/* 648 */ 653,
|
|
1126
|
+
/* 649 */ {
|
|
1127
|
+
'(': ['c',650],
|
|
1128
|
+
Id: [653,636],
|
|
1129
|
+
'?': ['c',653],
|
|
1130
|
+
},
|
|
1131
|
+
/* 650 */ [651,459],
|
|
1132
|
+
/* 651 */ ['m',653,')'],
|
|
1133
|
+
/* 652 */ [653,642],
|
|
1134
|
+
/* 653 */ {
|
|
1135
|
+
'*': ['c',657], '/': '*',
|
|
1136
|
+
'+': ['c',657], '-': '+',
|
|
1137
|
+
'||': ['c',657],
|
|
1138
|
+
and: ['ck',657,1],
|
|
1139
|
+
or: ['ck',657,1],
|
|
1140
|
+
'?': ['c',654],
|
|
1141
|
+
'<': ['c',656], '=': '<', '>': '<', '!=': '<', '<=': '<', '<>': '<', '>=': '<',
|
|
1142
|
+
is: ['ck',658,1],
|
|
1143
|
+
not: ['ck',660],
|
|
1144
|
+
in: ['g',660,1], like: 'in', between: 'in',
|
|
1145
|
+
'': 0
|
|
1146
|
+
},
|
|
1147
|
+
/* 654 */ [655,642],
|
|
1148
|
+
/* 655 */ ['m',657,':'],
|
|
1149
|
+
/* 656 */ { all: ['ck',657], any: 'all', some: 'all', '': 657 },
|
|
1150
|
+
/* 657 */ [668,642],
|
|
1151
|
+
/* 658 */ { not: ['ck',659], '': 659 },
|
|
1152
|
+
/* 659 */ ['mk',668,'null'],
|
|
1153
|
+
/* 660 */ {
|
|
1154
|
+
between: ['ck',661],
|
|
1155
|
+
in: ['ck',664],
|
|
1156
|
+
like: ['ck',665],
|
|
1157
|
+
},
|
|
1158
|
+
/* 661 */ [662,642],
|
|
1159
|
+
/* 662 */ ['mk',663,'and'],
|
|
1160
|
+
/* 663 */ [668,642],
|
|
1161
|
+
/* 664 */ [668,642],
|
|
1162
|
+
/* 665 */ [666,642],
|
|
1163
|
+
/* 666 */ { escape: ['ck',667,1], '': 668 },
|
|
1164
|
+
/* 667 */ [668,642],
|
|
1165
|
+
/* 668 */ 653,
|
|
1166
|
+
'expressionOrQueryParens',
|
|
1167
|
+
/* 670 */ ['m',671,'('],
|
|
1168
|
+
/* 671 */ {
|
|
1169
|
+
'(': [672,670],
|
|
1170
|
+
Id: [674,642], '#': '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',
|
|
1171
|
+
select: [675,459],
|
|
1172
|
+
},
|
|
1173
|
+
/* 672 */ {
|
|
1174
|
+
'*': [673,643], '+': '*', '-': '*', '/': '*', '<': '*', '=': '*', '>': '*', '?': '*', '!=': '*', '<=': '*', '<>': '*', '>=': '*', in: '*', is: '*', or: '*', '||': '*', and: '*', not: '*', like: '*', between: '*',
|
|
1175
|
+
',': [675,677],
|
|
1176
|
+
limit: [675,462], minus: 'limit', order: 'limit', union: 'limit', except: 'limit', intersect: 'limit',
|
|
1177
|
+
'': 675
|
|
1178
|
+
},
|
|
1179
|
+
/* 673 */ { ',': [675,677], '': 675 },
|
|
1180
|
+
/* 674 */ { ',': [675,677], '': 675 },
|
|
1181
|
+
/* 675 */ ['m',0,')'],
|
|
1182
|
+
'continueExpressionslist',
|
|
1183
|
+
/* 677 */ ['m',678,','],
|
|
1184
|
+
/* 678 */ { Id: 679, '#': 679, '(': 679, '+': 679, '-': 679, ':': 679, '?': 679, not: 679, case: 679, cast: 679, null: 679, true: 679, false: 679, Number: 679, String: 679, exists: 679, QuotedLiteral: 679 },
|
|
1185
|
+
/* 679 */ { Id: [680,642], '#': 'Id', '(': 'Id', '+': 'Id', '-': 'Id', ':': 'Id', '?': 'Id', not: 'Id', case: 'Id', cast: 'Id', null: 'Id', true: 'Id', false: 'Id', Number: 'Id', String: 'Id', exists: 'Id', QuotedLiteral: 'Id', '': 0 },
|
|
1186
|
+
/* 680 */ { ',': ['c',679], '': 0 },
|
|
1187
|
+
'newAndValuePath',
|
|
1188
|
+
/* 682 */ ['mk',683,'new'],
|
|
1189
|
+
/* 683 */ [0,636],
|
|
1190
|
+
'caseExpression',
|
|
1191
|
+
/* 685 */ ['mk',686,'case'],
|
|
1192
|
+
/* 686 */ {
|
|
1193
|
+
Id: [687,642], '#': 'Id', '(': 'Id', '+': 'Id', '-': 'Id', ':': 'Id', '?': 'Id', not: 'Id', case: 'Id', cast: 'Id', null: 'Id', true: 'Id', false: 'Id', Number: 'Id', String: 'Id', exists: 'Id', QuotedLiteral: 'Id',
|
|
1194
|
+
when: ['g',687,1],
|
|
1195
|
+
'': 687
|
|
1196
|
+
},
|
|
1197
|
+
/* 687 */ { when: 688 },
|
|
1198
|
+
/* 688 */ { when: ['ck',689], '': 692 },
|
|
1199
|
+
/* 689 */ [690,642],
|
|
1200
|
+
/* 690 */ ['mk',691,'then'],
|
|
1201
|
+
/* 691 */ [688,642],
|
|
1202
|
+
/* 692 */ { else: ['ck',693], '': 694 },
|
|
1203
|
+
/* 693 */ [694,642],
|
|
1204
|
+
/* 694 */ ['mk',0,'end'],
|
|
1205
|
+
'castFunction',
|
|
1206
|
+
/* 696 */ ['mk',697,'cast'],
|
|
1207
|
+
/* 697 */ ['m',698,'('],
|
|
1208
|
+
/* 698 */ [699,642],
|
|
1209
|
+
/* 699 */ ['mk',700,'as'],
|
|
1210
|
+
/* 700 */ [701,407],
|
|
1211
|
+
/* 701 */ ['m',0,')'],
|
|
1212
|
+
'argumentsAndFilter',
|
|
1213
|
+
/* 703 */ { '(': ['c',704], '': 723 },
|
|
1214
|
+
/* 704 */ { Id: ['ciA',711], '': 705 },
|
|
1215
|
+
/* 705 */ { Id: [706,725], '#': 'Id', '(': 'Id', '*': 'Id', '+': 'Id', '-': 'Id', ':': 'Id', '?': 'Id', Id_all: 'Id', Number: 'Id', String: 'Id', QuotedLiteral: 'Id', '': 722 },
|
|
1216
|
+
/* 706 */ { ',': ['c',707], '': 708 },
|
|
1217
|
+
/* 707 */ {
|
|
1218
|
+
Id: [706,725], '#': 'Id', '(': 'Id', '*': 'Id', '+': 'Id', '-': 'Id', ':': 'Id', '?': 'Id', not: 'Id', case: 'Id', cast: 'Id', null: 'Id', true: 'Id', false: 'Id', Id_all: 'Id', Number: 'Id', String: 'Id', exists: 'Id', QuotedLiteral: 'Id',
|
|
1219
|
+
')': ['g',708,1], order: ')',
|
|
1220
|
+
},
|
|
1221
|
+
/* 708 */ { order: ['ck',709], '': 722 },
|
|
1222
|
+
/* 709 */ ['mk',710,'by'],
|
|
1223
|
+
/* 710 */ [722,745],
|
|
1224
|
+
/* 711 */ {
|
|
1225
|
+
':': ['c',712],
|
|
1226
|
+
'=>': ['c',717],
|
|
1227
|
+
},
|
|
1228
|
+
/* 712 */ [713,642],
|
|
1229
|
+
/* 713 */ { ',': ['c',714], '': 722 },
|
|
1230
|
+
/* 714 */ {
|
|
1231
|
+
Id: ['ciA',715],
|
|
1232
|
+
')': 722,
|
|
1233
|
+
},
|
|
1234
|
+
/* 715 */ ['m',716,':'],
|
|
1235
|
+
/* 716 */ [713,642],
|
|
1236
|
+
/* 717 */ [718,642],
|
|
1237
|
+
/* 718 */ { ',': ['c',719], '': 722 },
|
|
1238
|
+
/* 719 */ {
|
|
1239
|
+
Id: ['ciA',720],
|
|
1240
|
+
')': 722,
|
|
1241
|
+
},
|
|
1242
|
+
/* 720 */ ['m',721,'=>'],
|
|
1243
|
+
/* 721 */ [718,642],
|
|
1244
|
+
/* 722 */ ['m',723,')'],
|
|
1245
|
+
/* 723 */ { '[': [0,541], '': 0 },
|
|
1246
|
+
'funcExpression',
|
|
1247
|
+
/* 725 */ {
|
|
1248
|
+
Id: [727,642], '#': 'Id', '(': 'Id', '+': 'Id', '-': 'Id', ':': 'Id', '?': 'Id', Number: 'Id', String: 'Id', QuotedLiteral: 'Id',
|
|
1249
|
+
GenericExpr: ['ckA',727],
|
|
1250
|
+
GenericIntro: ['ckA',726],
|
|
1251
|
+
},
|
|
1252
|
+
/* 726 */ [727,642],
|
|
1253
|
+
/* 727 */ { GenericSeparator: ['ckA',728], '': 0 },
|
|
1254
|
+
/* 728 */ {
|
|
1255
|
+
Id: [727,642], '#': 'Id', '(': 'Id', '+': 'Id', '-': 'Id', ':': 'Id', '?': 'Id', Number: 'Id', String: 'Id', QuotedLiteral: 'Id',
|
|
1256
|
+
GenericExpr: ['ckA',727],
|
|
1257
|
+
},
|
|
1258
|
+
'overClause',
|
|
1259
|
+
/* 730 */ ['m',731,'('],
|
|
1260
|
+
/* 731 */ { partition: ['ck',732], '': 734 },
|
|
1261
|
+
/* 732 */ ['mk',733,'by'],
|
|
1262
|
+
/* 733 */ [734,741],
|
|
1263
|
+
/* 734 */ { order: ['ck',735], '': 737 },
|
|
1264
|
+
/* 735 */ ['mk',736,'by'],
|
|
1265
|
+
/* 736 */ [737,745],
|
|
1266
|
+
/* 737 */ { rows: ['ck',738], '': 739 },
|
|
1267
|
+
/* 738 */ [739,754],
|
|
1268
|
+
/* 739 */ ['m',0,')'],
|
|
1269
|
+
'expressionsAsXpr',
|
|
1270
|
+
/* 741 */ [742,642],
|
|
1271
|
+
/* 742 */ { ',': ['c',743], '': 0 },
|
|
1272
|
+
/* 743 */ [742,642],
|
|
1273
|
+
'orderByClauseAsXpr',
|
|
1274
|
+
/* 745 */ [746,749],
|
|
1275
|
+
/* 746 */ { ',': ['c',747], '': 0 },
|
|
1276
|
+
/* 747 */ [746,749],
|
|
1277
|
+
'orderBySpecAsXpr',
|
|
1278
|
+
/* 749 */ [750,642],
|
|
1279
|
+
/* 750 */ { asc: ['ck',751], desc: 'asc', '': 751 },
|
|
1280
|
+
/* 751 */ { nulls: ['ck',752], '': 0 },
|
|
1281
|
+
/* 752 */ { last: ['ck',0], first: 'last' },
|
|
1282
|
+
'windowFrameClause',
|
|
1283
|
+
/* 754 */ {
|
|
1284
|
+
unbounded: ['ck',755],
|
|
1285
|
+
Number: ['c',755],
|
|
1286
|
+
current: ['ck',756],
|
|
1287
|
+
between: ['ck',757],
|
|
1288
|
+
},
|
|
1289
|
+
/* 755 */ ['mk',0,'preceding'],
|
|
1290
|
+
/* 756 */ ['mk',0,'row'],
|
|
1291
|
+
/* 757 */ [758,761],
|
|
1292
|
+
/* 758 */ ['mk',759,'and'],
|
|
1293
|
+
/* 759 */ [0,761],
|
|
1294
|
+
'windowFrameBoundSpec',
|
|
1295
|
+
/* 761 */ {
|
|
1296
|
+
unbounded: ['ck',762],
|
|
1297
|
+
Number: ['c',762],
|
|
1298
|
+
current: ['ck',764],
|
|
1299
|
+
},
|
|
1300
|
+
/* 762 */ {
|
|
1301
|
+
following: ['ck',763],
|
|
1302
|
+
preceding: ['ck',763],
|
|
1303
|
+
},
|
|
1304
|
+
/* 763 */ 0,
|
|
1305
|
+
/* 764 */ ['mk',0,'row'],
|
|
1306
|
+
'literalValue',
|
|
1307
|
+
/* 766 */ {
|
|
1308
|
+
'#': ['c',767],
|
|
1309
|
+
null: ['ck',0],
|
|
1310
|
+
true: ['ck',0], false: 'true',
|
|
1311
|
+
Number: ['c',0],
|
|
1312
|
+
String: ['c',0],
|
|
1313
|
+
QuotedLiteral: ['c',0],
|
|
1314
|
+
},
|
|
1315
|
+
/* 767 */ ['mi',0],
|
|
1316
|
+
'annoAssignStd',
|
|
1317
|
+
/* 769 */ ['m',770,'@'],
|
|
1318
|
+
/* 770 */ {
|
|
1319
|
+
'(': [0,778],
|
|
1320
|
+
Id: [0,783],
|
|
1321
|
+
},
|
|
1322
|
+
'annoAssignCol',
|
|
1323
|
+
/* 772 */ ['m',773,'@'],
|
|
1324
|
+
/* 773 */ {
|
|
1325
|
+
'(': [0,778],
|
|
1326
|
+
Id: [0,783],
|
|
1327
|
+
},
|
|
1328
|
+
'annoAssignMid',
|
|
1329
|
+
/* 775 */ ['m',776,'@'],
|
|
1330
|
+
/* 776 */ {
|
|
1331
|
+
'(': [0,778],
|
|
1332
|
+
Id: [0,787],
|
|
1333
|
+
},
|
|
1334
|
+
'annoAssignParen',
|
|
1335
|
+
/* 778 */ ['m',779,'('],
|
|
1336
|
+
/* 779 */ { Id: [780,783], '': 781 },
|
|
1337
|
+
/* 780 */ {
|
|
1338
|
+
',': ['c',779],
|
|
1339
|
+
')': 781,
|
|
1340
|
+
},
|
|
1341
|
+
/* 781 */ ['m',0,')'],
|
|
1342
|
+
'annoAssignBase',
|
|
1343
|
+
/* 783 */ [784,787],
|
|
1344
|
+
/* 784 */ { ':': ['c',785], '': 0 },
|
|
1345
|
+
/* 785 */ [0,809],
|
|
1346
|
+
'annoNamePath',
|
|
1347
|
+
/* 787 */ ['miA',788],
|
|
1348
|
+
/* 788 */ { '.': ['c',789], '': 791 },
|
|
1349
|
+
/* 789 */ {
|
|
1350
|
+
Id: ['ciA',788],
|
|
1351
|
+
'@': ['c',790],
|
|
1352
|
+
},
|
|
1353
|
+
/* 790 */ ['miA',788],
|
|
1354
|
+
/* 791 */ { '#': [0,800], '': 0 },
|
|
1355
|
+
'annoPath',
|
|
1356
|
+
/* 793 */ {
|
|
1357
|
+
Id: ['ciA',795],
|
|
1358
|
+
'@': ['c',794],
|
|
1359
|
+
},
|
|
1360
|
+
/* 794 */ ['miA',795],
|
|
1361
|
+
/* 795 */ { '.': ['c',796], '': 798 },
|
|
1362
|
+
/* 796 */ {
|
|
1363
|
+
Id: ['ciA',795],
|
|
1364
|
+
'@': ['c',797],
|
|
1365
|
+
},
|
|
1366
|
+
/* 797 */ ['miA',795],
|
|
1367
|
+
/* 798 */ { '#': [0,800], '': 0 },
|
|
1368
|
+
'annoPathVariant',
|
|
1369
|
+
/* 800 */ ['m',801,'#'],
|
|
1370
|
+
/* 801 */ ['miA',802],
|
|
1371
|
+
/* 802 */ { '.': ['c',803], '': 0 },
|
|
1372
|
+
/* 803 */ ['miA',802],
|
|
1373
|
+
'annoStructValue',
|
|
1374
|
+
/* 805 */ [806,793],
|
|
1375
|
+
/* 806 */ { ':': ['c',807], '': 0 },
|
|
1376
|
+
/* 807 */ [0,809],
|
|
1377
|
+
'annoValue',
|
|
1378
|
+
/* 809 */ {
|
|
1379
|
+
'#': [0,766], null: '#', true: '#', false: '#', Number: '#', String: '#', QuotedLiteral: '#',
|
|
1380
|
+
'+': ['c',810], '-': '+',
|
|
1381
|
+
Id: [0,793], '@': 'Id',
|
|
1382
|
+
'{': ['c',811],
|
|
1383
|
+
'[': ['c',814],
|
|
1384
|
+
'(': ['c',821],
|
|
1385
|
+
},
|
|
1386
|
+
/* 810 */ ['m',0,'Number'],
|
|
1387
|
+
/* 811 */ { Id: [812,805], '@': 'Id', '': 813 },
|
|
1388
|
+
/* 812 */ {
|
|
1389
|
+
',': ['c',811],
|
|
1390
|
+
'}': 813,
|
|
1391
|
+
},
|
|
1392
|
+
/* 813 */ ['m',0,'}'],
|
|
1393
|
+
/* 814 */ {
|
|
1394
|
+
Id: [819,809], '#': 'Id', '(': 'Id', '+': 'Id', '-': 'Id', '@': 'Id', '[': 'Id', '{': 'Id', Number: 'Id', String: 'Id', QuotedLiteral: 'Id',
|
|
1395
|
+
'...': ['c',815],
|
|
1396
|
+
'': 820
|
|
1397
|
+
},
|
|
1398
|
+
/* 815 */ { up: ['ck',816], '': 818 },
|
|
1399
|
+
/* 816 */ ['mk',817,'to'],
|
|
1400
|
+
/* 817 */ [818,809],
|
|
1401
|
+
/* 818 */ 819,
|
|
1402
|
+
/* 819 */ {
|
|
1403
|
+
',': ['c',814],
|
|
1404
|
+
']': 820,
|
|
1405
|
+
},
|
|
1406
|
+
/* 820 */ ['m',0,']'],
|
|
1407
|
+
/* 821 */ [822,634],
|
|
1408
|
+
/* 822 */ ['m',0,')'],
|
|
1409
|
+
];
|
|
1410
|
+
class CdlParser extends AstBuildingParser {
|
|
1411
|
+
constructor(lexer,...args) { super(lexer,keywords,table,...args) }
|
|
1412
|
+
start($,$next) {
|
|
1413
|
+
$.source??=new XsnSource( 'cdl' );
|
|
1414
|
+
this.rule_(1,$next);
|
|
1415
|
+
for(;;) switch(this.s) {
|
|
1416
|
+
case 1: switch(this.lk()) {
|
|
1417
|
+
case 'namespace': this.gc(3,'fileSection') && this.namespaceDeclaration({source:$.source},2); continue;
|
|
1418
|
+
case 'using': this.usingDeclaration({source:$.source},2); continue;
|
|
1419
|
+
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.fileSection();} continue;
|
|
1420
|
+
default: this.s=3; continue;
|
|
1421
|
+
}
|
|
1422
|
+
case 2: switch(this.l()) {
|
|
1423
|
+
case ';': this.c(1); continue;
|
|
1424
|
+
case 'EOF': this.s=3; continue;
|
|
1425
|
+
case 'Id': case '@': this.ec('afterBrace') && this.g(1); continue;
|
|
1426
|
+
default: this.e(); continue;
|
|
1427
|
+
}
|
|
1428
|
+
case 3: if(this.m(0,'EOF')) { this.docComment( null ); } continue;
|
|
1429
|
+
default: return this.exit_();
|
|
1430
|
+
}
|
|
1431
|
+
}
|
|
1432
|
+
artifactsBlock($,$next) {
|
|
1433
|
+
this.rule_(5,$next);
|
|
1434
|
+
for(;;) switch(this.s) {
|
|
1435
|
+
case 5: if(this.m(6,'{')) { $.art.artifacts = this.createDict( $.start ); $.art.extensions = []; } continue;
|
|
1436
|
+
case 6: switch(this.l()) {
|
|
1437
|
+
case 'Id': case '@': this.artifactDefOrExtend({outer:$.art},7); continue;
|
|
1438
|
+
default: this.s=8; continue;
|
|
1439
|
+
}
|
|
1440
|
+
case 7: switch(this.l()) {
|
|
1441
|
+
case ';': this.c(6); continue;
|
|
1442
|
+
case '}': this.s=8; continue;
|
|
1443
|
+
case 'Id': case '@': this.ec('afterBrace') && this.g(6); continue;
|
|
1444
|
+
default: this.e(); continue;
|
|
1445
|
+
}
|
|
1446
|
+
case 8: if(this.m(0,'}')) {this.afterBrace(); this.finalizeDictOrArray( $.art.artifacts ); } continue;
|
|
1447
|
+
default: return this.exit_();
|
|
1448
|
+
}
|
|
1449
|
+
}
|
|
1450
|
+
artifactDefOrExtend($,$next) {
|
|
1451
|
+
this.rule_(10,$next);
|
|
1452
|
+
let art=new XsnArtifact();
|
|
1453
|
+
{ art.location = this.startLocation();
|
|
1454
|
+
this.docComment( art ); }
|
|
1455
|
+
for(;;) switch(this.s) {
|
|
1456
|
+
case 10: switch(this.l()) {
|
|
1457
|
+
case '@': this.annoAssignStd({art},10); continue;
|
|
1458
|
+
default: this.s=11; continue;
|
|
1459
|
+
}
|
|
1460
|
+
case 11: switch(this.lk()) {
|
|
1461
|
+
case 'define': this.ck(12); continue;
|
|
1462
|
+
case 'type': case 'view': case 'event': case 'action': case 'aspect': case 'entity': case 'context': case 'service': case 'abstract': case 'function': case 'annotation': this.s=12; continue;
|
|
1463
|
+
case 'extend': if(this.ck(13)) { art.kind = 'extend'; } continue;
|
|
1464
|
+
case 'annotate': this.ck(14); continue;
|
|
1465
|
+
default: this.e(); continue;
|
|
1466
|
+
}
|
|
1467
|
+
case 12: switch(this.lk()) {
|
|
1468
|
+
case 'service': this.serviceDef({art,outer:$.outer},0); continue;
|
|
1469
|
+
case 'context': this.contextDef({art,outer:$.outer},0); continue;
|
|
1470
|
+
case 'annotation': this.annotationDef({art,outer:$.outer},0); continue;
|
|
1471
|
+
case 'type': this.typeDef({art,outer:$.outer},0); continue;
|
|
1472
|
+
case 'aspect': case 'abstract': this.aspectDef({art,outer:$.outer},0); continue;
|
|
1473
|
+
case 'entity': this.entityDef({art,outer:$.outer},0); continue;
|
|
1474
|
+
case 'view': this.viewDef({art,outer:$.outer},0); continue;
|
|
1475
|
+
case 'event': this.eventDef({art,outer:$.outer},0); continue;
|
|
1476
|
+
case 'action': this.actionMainDef({art,outer:$.outer},0); continue;
|
|
1477
|
+
case 'function': this.functionMainDef({art,outer:$.outer},0); continue;
|
|
1478
|
+
default: this.e(); continue;
|
|
1479
|
+
}
|
|
1480
|
+
case 13: switch(this.lk()) {
|
|
1481
|
+
case 'Id': this.extendArtifact({art,outer:$.outer},0); continue;
|
|
1482
|
+
case 'service': this.lP() && this.extendService({art,outer:$.outer},0); continue;
|
|
1483
|
+
case 'context': this.lP() && this.extendContext({art,outer:$.outer},0); continue;
|
|
1484
|
+
case 'type': this.lP() && this.extendType({art,outer:$.outer},0); continue;
|
|
1485
|
+
case 'aspect': case 'entity': this.lP() && this.extendEntityOrAspect({art,outer:$.outer},0); continue;
|
|
1486
|
+
case 'projection': this.lP() && this.extendProjection({art,outer:$.outer},0); continue;
|
|
1487
|
+
default: this.ei(); continue;
|
|
1488
|
+
}
|
|
1489
|
+
case 14: this.annotateArtifact({art,outer:$.outer},0); continue;
|
|
1490
|
+
default: return this.exit_();
|
|
1491
|
+
}
|
|
1492
|
+
}
|
|
1493
|
+
namespaceDeclaration($,$next) {
|
|
1494
|
+
this.rule_(16,$next);
|
|
1495
|
+
let name; let _;
|
|
1496
|
+
for(;;) switch(this.s) {
|
|
1497
|
+
case 16: this.mk(17,'namespace'); continue;
|
|
1498
|
+
case 17: if(this.namePath(_={category:'Namespace'},0)) {name=_.name; $.source.namespace ??= { kind: 'namespace', name: name }; } continue;
|
|
1499
|
+
default:
|
|
1500
|
+
this.attachLocation( $.source.namespace );
|
|
1501
|
+
return this.exit_();
|
|
1502
|
+
}
|
|
1503
|
+
}
|
|
1504
|
+
usingDeclaration($,$next) {
|
|
1505
|
+
this.rule_(19,$next);
|
|
1506
|
+
let decl={ kind: 'using' };
|
|
1507
|
+
for(;;) switch(this.s) {
|
|
1508
|
+
case 19: this.mk(20,'using'); continue;
|
|
1509
|
+
case 20: switch(this.lk()) {
|
|
1510
|
+
case 'from': this.ck(21); continue;
|
|
1511
|
+
case 'Id': this.usingProxy({outer:$.source,proxy:decl},22); continue;
|
|
1512
|
+
case '{': this.s=24;{ $.source.usings.push( decl ); } continue;
|
|
1513
|
+
default: this.ei(); continue;
|
|
1514
|
+
}
|
|
1515
|
+
case 21: if(this.m(0,'String')) { $.source.dependencies.push( this.quotedLiteral() ); } continue;
|
|
1516
|
+
case 22: switch(this.lk()) {
|
|
1517
|
+
case 'from': this.ck(23); continue;
|
|
1518
|
+
default: this.gr([';']); continue;
|
|
1519
|
+
}
|
|
1520
|
+
case 23: if(this.m(0,'String')) { $.source.dependencies.push( decl.fileDep = this.quotedLiteral() ); } continue;
|
|
1521
|
+
case 24: if(this.m(25,'{')) { decl.usings = this.createArray(); } continue;
|
|
1522
|
+
case 25: switch(this.lk()) {
|
|
1523
|
+
case 'Id': this.s=26; continue;
|
|
1524
|
+
default: this.ei(); continue;
|
|
1525
|
+
}
|
|
1526
|
+
case 26: switch(this.l()) {
|
|
1527
|
+
case 'Id': this.usingProxy({outer:decl,proxy:{ kind: 'using' }},27); continue;
|
|
1528
|
+
default: this.s=28; continue;
|
|
1529
|
+
}
|
|
1530
|
+
case 27: switch(this.l()) {
|
|
1531
|
+
case ',': this.c(26); continue;
|
|
1532
|
+
case '}': this.s=28; continue;
|
|
1533
|
+
default: this.e(); continue;
|
|
1534
|
+
}
|
|
1535
|
+
case 28: if(this.m(29,'}')) {this.afterBrace(); this.finalizeDictOrArray( decl.usings ); } continue;
|
|
1536
|
+
case 29: switch(this.lk()) {
|
|
1537
|
+
case 'from': this.ck(30); continue;
|
|
1538
|
+
default: this.gr([';']); continue;
|
|
1539
|
+
}
|
|
1540
|
+
case 30: if(this.m(0,'String')) { $.source.dependencies.push( decl.fileDep = this.quotedLiteral() ); } continue;
|
|
1541
|
+
default:
|
|
1542
|
+
this.attachLocation( decl );
|
|
1543
|
+
return this.exit_();
|
|
1544
|
+
}
|
|
1545
|
+
}
|
|
1546
|
+
usingProxy($,$next) {
|
|
1547
|
+
this.rule_(32,$next);
|
|
1548
|
+
let extern; let _;
|
|
1549
|
+
for(;;) switch(this.s) {
|
|
1550
|
+
case 32: if(this.simplePath(_={category:'global'},33)) {extern=_.ref; $.proxy.extern = extern; $.outer.usings.push( $.proxy ); } continue;
|
|
1551
|
+
case 33: switch(this.lk()) {
|
|
1552
|
+
case 'as': this.ck(34); continue;
|
|
1553
|
+
default: if(this.gr([])) { this.classifyImplicitName( 'Using' ); } continue;
|
|
1554
|
+
}
|
|
1555
|
+
case 34: if(this.mi(0,'UsingAlias')) { $.proxy.name = this.identAst(); } continue;
|
|
1556
|
+
default:
|
|
1557
|
+
this.attachLocation( $.proxy );
|
|
1558
|
+
return this.exit_();
|
|
1559
|
+
}
|
|
1560
|
+
}
|
|
1561
|
+
namePath($,$next) {
|
|
1562
|
+
$.name??=new XsnName();
|
|
1563
|
+
this.rule_(36,$next);
|
|
1564
|
+
for(;;) switch(this.s) {
|
|
1565
|
+
case 36: if(this.mi(37,$.category)) { $.name.path = [ this.identAst() ]; } continue;
|
|
1566
|
+
case 37: switch(this.l()) {
|
|
1567
|
+
case '.': this.c(38); continue;
|
|
1568
|
+
default: this.gr(['@']); continue;
|
|
1569
|
+
}
|
|
1570
|
+
case 38: if(this.miA(37,$.category)) { $.name.path.push( this.identAst() ); } continue;
|
|
1571
|
+
default:
|
|
1572
|
+
this.attachLocation( $.name );
|
|
1573
|
+
return this.exit_();
|
|
1574
|
+
}
|
|
1575
|
+
}
|
|
1576
|
+
simplePath($,$next) {
|
|
1577
|
+
$.ref??={};
|
|
1578
|
+
this.rule_(40,$next);
|
|
1579
|
+
for(;;) switch(this.s) {
|
|
1580
|
+
case 40: if(this.mi(41,$.category)) { $.ref.path = [ this.identAst() ]; } continue;
|
|
1581
|
+
case 41: switch(this.l()) {
|
|
1582
|
+
case '.': this.c(42); continue;
|
|
1583
|
+
default: this.gr([]); continue;
|
|
1584
|
+
}
|
|
1585
|
+
case 42: if(this.miA(41,$.category)) { $.ref.path.push( this.identAst() ); } continue;
|
|
1586
|
+
default:
|
|
1587
|
+
this.attachLocation( $.ref );
|
|
1588
|
+
return this.exit_();
|
|
1589
|
+
}
|
|
1590
|
+
}
|
|
1591
|
+
serviceDef($,$next) {
|
|
1592
|
+
this.rule_(44,$next);
|
|
1593
|
+
let name; let _;
|
|
1594
|
+
for(;;) switch(this.s) {
|
|
1595
|
+
case 44: this.mk(45,'service'); continue;
|
|
1596
|
+
case 45: if(this.namePath(_={category:'Service'},46)) {name=_.name; this.addDef( $.art, $.outer, 'artifacts', 'service', name );
|
|
1597
|
+
this.docComment( $.art ); } continue;
|
|
1598
|
+
case 46: switch(this.l()) {
|
|
1599
|
+
case '@': this.annoAssignMid({art:$.art},46); continue;
|
|
1600
|
+
default: this.s=47; continue;
|
|
1601
|
+
}
|
|
1602
|
+
case 47: switch(this.l()) {
|
|
1603
|
+
case '{': this.artifactsBlock({art:$.art,start:undefined},0); continue;
|
|
1604
|
+
default: this.gr([';']); continue;
|
|
1605
|
+
}
|
|
1606
|
+
default:
|
|
1607
|
+
this.attachLocation( $.art );
|
|
1608
|
+
return this.exit_();
|
|
1609
|
+
}
|
|
1610
|
+
}
|
|
1611
|
+
contextDef($,$next) {
|
|
1612
|
+
this.rule_(49,$next);
|
|
1613
|
+
let name; let _;
|
|
1614
|
+
for(;;) switch(this.s) {
|
|
1615
|
+
case 49: this.mk(50,'context'); continue;
|
|
1616
|
+
case 50: if(this.namePath(_={category:'Context'},51)) {name=_.name; this.addDef( $.art, $.outer, 'artifacts', 'context', name );
|
|
1617
|
+
this.docComment( $.art ); } continue;
|
|
1618
|
+
case 51: switch(this.l()) {
|
|
1619
|
+
case '@': this.annoAssignMid({art:$.art},51); continue;
|
|
1620
|
+
default: this.s=52; continue;
|
|
1621
|
+
}
|
|
1622
|
+
case 52: switch(this.l()) {
|
|
1623
|
+
case '{': this.artifactsBlock({art:$.art,start:undefined},0); continue;
|
|
1624
|
+
default: this.gr([';']); continue;
|
|
1625
|
+
}
|
|
1626
|
+
default:
|
|
1627
|
+
this.attachLocation( $.art );
|
|
1628
|
+
return this.exit_();
|
|
1629
|
+
}
|
|
1630
|
+
}
|
|
1631
|
+
annotationDef($,$next) {
|
|
1632
|
+
this.rule_(54,$next);
|
|
1633
|
+
let name; let _;
|
|
1634
|
+
for(;;) switch(this.s) {
|
|
1635
|
+
case 54: this.mk(55,'annotation'); continue;
|
|
1636
|
+
case 55: if(this.namePath(_={category:'AnnoDef'},56)) {name=_.name; this.addDef( $.art, $.outer, 'vocabularies', 'annotation', name );
|
|
1637
|
+
this.docComment( $.art ); } continue;
|
|
1638
|
+
case 56: switch(this.l()) {
|
|
1639
|
+
case '@': this.annoAssignMid({art:$.art},56); continue;
|
|
1640
|
+
default: this.s=57; continue;
|
|
1641
|
+
}
|
|
1642
|
+
case 57: this.typeOrIncludesSpec({art:$.art},0); continue;
|
|
1643
|
+
default:
|
|
1644
|
+
this.attachLocation( $.art );
|
|
1645
|
+
return this.exit_();
|
|
1646
|
+
}
|
|
1647
|
+
}
|
|
1648
|
+
typeDef($,$next) {
|
|
1649
|
+
this.rule_(59,$next);
|
|
1650
|
+
let name; let _;
|
|
1651
|
+
for(;;) switch(this.s) {
|
|
1652
|
+
case 59: this.mk(60,'type'); continue;
|
|
1653
|
+
case 60: if(this.namePath(_={category:'Type'},61)) {name=_.name; this.addDef( $.art, $.outer, 'artifacts', 'type', name );
|
|
1654
|
+
this.docComment( $.art ); } continue;
|
|
1655
|
+
case 61: switch(this.l()) {
|
|
1656
|
+
case '@': this.annoAssignMid({art:$.art},61); continue;
|
|
1657
|
+
default: this.s=62; continue;
|
|
1658
|
+
}
|
|
1659
|
+
case 62: this.typeOrIncludesSpec({art:$.art},0); continue;
|
|
1660
|
+
default:
|
|
1661
|
+
this.attachLocation( $.art );
|
|
1662
|
+
return this.exit_();
|
|
1663
|
+
}
|
|
1664
|
+
}
|
|
1665
|
+
aspectDef($,$next) {
|
|
1666
|
+
this.rule_(64,$next);
|
|
1667
|
+
let name; let _;
|
|
1668
|
+
for(;;) switch(this.s) {
|
|
1669
|
+
case 64: switch(this.lk()) {
|
|
1670
|
+
case 'aspect': this.ck(66); continue;
|
|
1671
|
+
case 'abstract': if(this.ck(65)) { this.warning( 'syntax-deprecated-abstract', this.lb().location ); } continue;
|
|
1672
|
+
default: this.e(); continue;
|
|
1673
|
+
}
|
|
1674
|
+
case 65: this.mk(66,'entity'); continue;
|
|
1675
|
+
case 66: if(this.namePath(_={category:'Type'},67)) {name=_.name; this.addDef( $.art, $.outer, 'artifacts', 'aspect', name );
|
|
1676
|
+
this.docComment( $.art ); } continue;
|
|
1677
|
+
case 67: switch(this.l()) {
|
|
1678
|
+
case '@': this.annoAssignMid({art:$.art},67); continue;
|
|
1679
|
+
default: this.s=68; continue;
|
|
1680
|
+
}
|
|
1681
|
+
case 68: switch(this.l()) {
|
|
1682
|
+
case '{': this.elementsBlock({art:$.art},69); continue;
|
|
1683
|
+
case ':': this.c(70); continue;
|
|
1684
|
+
default: this.gr([';']); continue;
|
|
1685
|
+
}
|
|
1686
|
+
case 69: switch(this.lk()) {
|
|
1687
|
+
case 'actions': this.actionsBlock({art:$.art},0); continue;
|
|
1688
|
+
default: this.gr([';']); continue;
|
|
1689
|
+
}
|
|
1690
|
+
case 70: this.aspectColonSpec({art:$.art},0); continue;
|
|
1691
|
+
default:
|
|
1692
|
+
this.attachLocation( $.art );
|
|
1693
|
+
return this.exit_();
|
|
1694
|
+
}
|
|
1695
|
+
}
|
|
1696
|
+
aspectColonSpec($,$next) {
|
|
1697
|
+
this.rule_(72,$next);
|
|
1698
|
+
let incl; let _;
|
|
1699
|
+
for(;;) switch(this.s) {
|
|
1700
|
+
case 72: switch(this.l()) {
|
|
1701
|
+
case 'Id': if(this.simplePath(_={category:'artref'},73)) {incl=_.ref; $.art.includes ??= []; $.art.includes.push( incl ); } continue;
|
|
1702
|
+
default: this.s=74; continue;
|
|
1703
|
+
}
|
|
1704
|
+
case 73: switch(this.l()) {
|
|
1705
|
+
case ',': this.c(72); continue;
|
|
1706
|
+
default: this.s=74; continue;
|
|
1707
|
+
}
|
|
1708
|
+
case 74: switch(this.l()) {
|
|
1709
|
+
case '{': this.elementsBlock({art:$.art},75); continue;
|
|
1710
|
+
default: this.gr([';']); continue;
|
|
1711
|
+
}
|
|
1712
|
+
case 75: switch(this.lk()) {
|
|
1713
|
+
case 'actions': this.actionsBlock({art:$.art},0); continue;
|
|
1714
|
+
default: this.gr([';']); continue;
|
|
1715
|
+
}
|
|
1716
|
+
default: return this.exit_();
|
|
1717
|
+
}
|
|
1718
|
+
}
|
|
1719
|
+
entityDef($,$next) {
|
|
1720
|
+
this.rule_(77,$next);
|
|
1721
|
+
let name; let incl; let query; let _;
|
|
1722
|
+
for(;;) switch(this.s) {
|
|
1723
|
+
case 77: this.mk(78,'entity'); continue;
|
|
1724
|
+
case 78: if(this.namePath(_={category:'Entity'},79)) {name=_.name; this.addDef( $.art, $.outer, 'artifacts', 'entity', name );
|
|
1725
|
+
this.docComment( $.art ); } continue;
|
|
1726
|
+
case 79: switch(this.l()) {
|
|
1727
|
+
case '@': this.annoAssignMid({art:$.art},79); continue;
|
|
1728
|
+
default: this.s=80; continue;
|
|
1729
|
+
}
|
|
1730
|
+
case 80: switch(this.l()) {
|
|
1731
|
+
case '(': this.paramsList({art:$.art},81); continue;
|
|
1732
|
+
default: this.s=81; continue;
|
|
1733
|
+
}
|
|
1734
|
+
case 81: switch(this.lk()) {
|
|
1735
|
+
case ':': if(this.c(82)) { $.art.includes ??= []; } continue;
|
|
1736
|
+
case '{': this.s=85; continue;
|
|
1737
|
+
case 'as': this.ck(86); continue;
|
|
1738
|
+
default: this.e(); continue;
|
|
1739
|
+
}
|
|
1740
|
+
case 82: switch(this.lk()) {
|
|
1741
|
+
case 'Id': this.s=83; continue;
|
|
1742
|
+
default: this.ei(); continue;
|
|
1743
|
+
}
|
|
1744
|
+
case 83: switch(this.l()) {
|
|
1745
|
+
case 'Id': if(this.simplePath(_={category:'artref'},84)) {incl=_.ref; $.art.includes.push( incl ); } continue;
|
|
1746
|
+
default: this.s=85; continue;
|
|
1747
|
+
}
|
|
1748
|
+
case 84: switch(this.l()) {
|
|
1749
|
+
case ',': this.c(83); continue;
|
|
1750
|
+
case '{': this.s=85; continue;
|
|
1751
|
+
default: this.e(); continue;
|
|
1752
|
+
}
|
|
1753
|
+
case 85: this.elementsBlock({art:$.art},89); continue;
|
|
1754
|
+
case 86: switch(this.lk()) {
|
|
1755
|
+
case '(': case 'select': if(this.queryExpression(_={},89)) {query=_.expr; $.art.query = query; $.art.$syntax = 'entity'; } continue;
|
|
1756
|
+
case 'projection': if(this.projectionSpec(_={},87)) {query=_.query; $.art.query = query; $.art.$syntax = 'projection'; } continue;
|
|
1757
|
+
default: this.e(); continue;
|
|
1758
|
+
}
|
|
1759
|
+
case 87: switch(this.lk()) {
|
|
1760
|
+
case 'group': case 'where': case 'having': this.whereGroupByHaving({query},88); continue;
|
|
1761
|
+
default: this.s=88; continue;
|
|
1762
|
+
}
|
|
1763
|
+
case 88: switch(this.lk()) {
|
|
1764
|
+
case 'limit': case 'order': this.orderByLimitOffset({query},89); continue;
|
|
1765
|
+
default: this.s=89; continue;
|
|
1766
|
+
}
|
|
1767
|
+
case 89: switch(this.lk()) {
|
|
1768
|
+
case 'actions': this.actionsBlock({art:$.art},0); continue;
|
|
1769
|
+
default: this.gr([';']); continue;
|
|
1770
|
+
}
|
|
1771
|
+
default:
|
|
1772
|
+
this.attachLocation( $.art );
|
|
1773
|
+
return this.exit_();
|
|
1774
|
+
}
|
|
1775
|
+
}
|
|
1776
|
+
viewDef($,$next) {
|
|
1777
|
+
this.rule_(91,$next);
|
|
1778
|
+
let name; let query; let _;
|
|
1779
|
+
for(;;) switch(this.s) {
|
|
1780
|
+
case 91: this.mk(92,'view'); continue;
|
|
1781
|
+
case 92: if(this.namePath(_={category:'Entity'},93)) {name=_.name; this.addDef( $.art, $.outer, 'artifacts', 'entity', name );
|
|
1782
|
+
this.docComment( $.art ); } continue;
|
|
1783
|
+
case 93: switch(this.l()) {
|
|
1784
|
+
case '@': this.annoAssignMid({art:$.art},93); continue;
|
|
1785
|
+
default: this.s=94; continue;
|
|
1786
|
+
}
|
|
1787
|
+
case 94: switch(this.lk()) {
|
|
1788
|
+
case '(': this.paramsList({art:$.art},100); continue;
|
|
1789
|
+
case 'with': this.ck(95); continue;
|
|
1790
|
+
default: this.s=100; continue;
|
|
1791
|
+
}
|
|
1792
|
+
case 95: if(this.mk(96,'parameters')) { $.art.params = this.createDict(); } continue;
|
|
1793
|
+
case 96: this.paramDef({outer:$.art},97); continue;
|
|
1794
|
+
case 97: switch(this.l()) {
|
|
1795
|
+
case ',': this.c(98); continue;
|
|
1796
|
+
default: this.s=99; continue;
|
|
1797
|
+
}
|
|
1798
|
+
case 98: this.paramDef({outer:$.art},97); continue;
|
|
1799
|
+
case 99: this.s=100;{ this.finalizeDictOrArray( $.art.params ); } continue;
|
|
1800
|
+
case 100: this.mk(101,'as'); continue;
|
|
1801
|
+
case 101: if(this.queryExpression(_={},0)) {query=_.expr; $.art.query = query; $.art.$syntax = 'view'; } continue;
|
|
1802
|
+
default:
|
|
1803
|
+
this.attachLocation( $.art );
|
|
1804
|
+
return this.exit_();
|
|
1805
|
+
}
|
|
1806
|
+
}
|
|
1807
|
+
eventDef($,$next) {
|
|
1808
|
+
this.rule_(103,$next);
|
|
1809
|
+
let name; let incl; let query; let _;
|
|
1810
|
+
for(;;) switch(this.s) {
|
|
1811
|
+
case 103: this.mk(104,'event'); continue;
|
|
1812
|
+
case 104: if(this.namePath(_={category:'Event'},105)) {name=_.name; this.addDef( $.art, $.outer, 'artifacts', 'event', name );
|
|
1813
|
+
this.docComment( $.art ); } continue;
|
|
1814
|
+
case 105: switch(this.l()) {
|
|
1815
|
+
case '@': this.annoAssignMid({art:$.art},105); continue;
|
|
1816
|
+
default: this.s=106; continue;
|
|
1817
|
+
}
|
|
1818
|
+
case 106: switch(this.l()) {
|
|
1819
|
+
case '{': this.elementsBlock({art:$.art},0); continue;
|
|
1820
|
+
case ':': this.c(107); continue;
|
|
1821
|
+
default: this.e(); continue;
|
|
1822
|
+
}
|
|
1823
|
+
case 107: switch(this.lk()) {
|
|
1824
|
+
case '{': this.elementsBlock({art:$.art},0); continue;
|
|
1825
|
+
case 'Id': if(this.simplePath(_={category:'artref'},108)) {incl=_.ref; $.art.type = incl; } continue;
|
|
1826
|
+
case 'projection': if(this.lP() && this.projectionSpec(_={},0)) {query=_.query; $.art.query = query; $.art.$syntax = 'projection'; } continue;
|
|
1827
|
+
default: this.ei(); continue;
|
|
1828
|
+
}
|
|
1829
|
+
case 108: switch(this.l()) {
|
|
1830
|
+
case ',': case '{': this.s=109;{ $.art.includes = [ $.art.type ]; delete $.art.type; } continue;
|
|
1831
|
+
default: this.s=113;{ this.docComment( $.art ); } continue;
|
|
1832
|
+
}
|
|
1833
|
+
case 109: switch(this.l()) {
|
|
1834
|
+
case ',': this.c(110); continue;
|
|
1835
|
+
default: this.s=112; continue;
|
|
1836
|
+
}
|
|
1837
|
+
case 110: switch(this.l()) {
|
|
1838
|
+
case 'Id': if(this.simplePath(_={category:'artref'},111)) {incl=_.ref; $.art.includes.push( incl ); } continue;
|
|
1839
|
+
default: this.s=112; continue;
|
|
1840
|
+
}
|
|
1841
|
+
case 111: switch(this.l()) {
|
|
1842
|
+
case ',': this.c(110); continue;
|
|
1843
|
+
case '{': this.s=112; continue;
|
|
1844
|
+
default: this.e(); continue;
|
|
1845
|
+
}
|
|
1846
|
+
case 112: this.elementsBlock({art:$.art},0); continue;
|
|
1847
|
+
case 113: switch(this.l()) {
|
|
1848
|
+
case '@': this.annoAssignStd({art:$.art},113); continue;
|
|
1849
|
+
default: this.gr([';']); continue;
|
|
1850
|
+
}
|
|
1851
|
+
default:
|
|
1852
|
+
this.attachLocation( $.art );
|
|
1853
|
+
return this.exit_();
|
|
1854
|
+
}
|
|
1855
|
+
}
|
|
1856
|
+
actionMainDef($,$next) {
|
|
1857
|
+
this.rule_(115,$next);
|
|
1858
|
+
let name; let _;
|
|
1859
|
+
for(;;) switch(this.s) {
|
|
1860
|
+
case 115: this.mk(116,'action'); continue;
|
|
1861
|
+
case 116: if(this.namePath(_={category:'Action'},117)) {name=_.name; this.addDef( $.art, $.outer, 'artifacts', 'action', name );
|
|
1862
|
+
this.docComment( $.art ); } continue;
|
|
1863
|
+
case 117: switch(this.l()) {
|
|
1864
|
+
case '@': this.annoAssignMid({art:$.art},117); continue;
|
|
1865
|
+
default: this.s=118; continue;
|
|
1866
|
+
}
|
|
1867
|
+
case 118: this.paramsList({art:$.art},119); continue;
|
|
1868
|
+
case 119: switch(this.lk()) {
|
|
1869
|
+
case 'returns': this.returnsSpec({outer:$.art},0); continue;
|
|
1870
|
+
default: this.gr([';']); continue;
|
|
1871
|
+
}
|
|
1872
|
+
default:
|
|
1873
|
+
this.attachLocation( $.art );
|
|
1874
|
+
return this.exit_();
|
|
1875
|
+
}
|
|
1876
|
+
}
|
|
1877
|
+
functionMainDef($,$next) {
|
|
1878
|
+
this.rule_(121,$next);
|
|
1879
|
+
let name; let _;
|
|
1880
|
+
for(;;) switch(this.s) {
|
|
1881
|
+
case 121: this.mk(122,'function'); continue;
|
|
1882
|
+
case 122: if(this.namePath(_={category:'Action'},123)) {name=_.name; this.addDef( $.art, $.outer, 'artifacts', 'function', name );
|
|
1883
|
+
this.docComment( $.art ); } continue;
|
|
1884
|
+
case 123: switch(this.l()) {
|
|
1885
|
+
case '@': this.annoAssignMid({art:$.art},123); continue;
|
|
1886
|
+
default: this.s=124; continue;
|
|
1887
|
+
}
|
|
1888
|
+
case 124: this.paramsList({art:$.art},125); continue;
|
|
1889
|
+
case 125: this.returnsSpec({outer:$.art},0); continue;
|
|
1890
|
+
default:
|
|
1891
|
+
this.attachLocation( $.art );
|
|
1892
|
+
return this.exit_();
|
|
1893
|
+
}
|
|
1894
|
+
}
|
|
1895
|
+
actionsBlock($,$next) {
|
|
1896
|
+
this.rule_(127,$next);
|
|
1897
|
+
for(;;) switch(this.s) {
|
|
1898
|
+
case 127: if(this.mk(128,'actions')) { $.art.actions = this.createDict(); } continue;
|
|
1899
|
+
case 128: this.m(129,'{'); continue;
|
|
1900
|
+
case 129: switch(this.l()) {
|
|
1901
|
+
case 'Id': case '@': this.boundActionFunctionDef({outer:$.art},130); continue;
|
|
1902
|
+
default: this.s=131; continue;
|
|
1903
|
+
}
|
|
1904
|
+
case 130: switch(this.l()) {
|
|
1905
|
+
case ';': this.c(129); continue;
|
|
1906
|
+
case '}': this.s=131; continue;
|
|
1907
|
+
case 'Id': case '@': this.ec('afterBrace') && this.g(129); continue;
|
|
1908
|
+
default: this.e(); continue;
|
|
1909
|
+
}
|
|
1910
|
+
case 131: if(this.m(0,'}')) {this.afterBrace(); this.finalizeDictOrArray( $.art.actions ); } continue;
|
|
1911
|
+
default: return this.exit_();
|
|
1912
|
+
}
|
|
1913
|
+
}
|
|
1914
|
+
boundActionFunctionDef($,$next) {
|
|
1915
|
+
this.rule_(133,$next);
|
|
1916
|
+
let art=new XsnArtifact();
|
|
1917
|
+
{ this.docComment( art ); }
|
|
1918
|
+
for(;;) switch(this.s) {
|
|
1919
|
+
case 133: switch(this.l()) {
|
|
1920
|
+
case '@': this.annoAssignStd({art},133); continue;
|
|
1921
|
+
default: this.s=134; continue;
|
|
1922
|
+
}
|
|
1923
|
+
case 134: switch(this.lk()) {
|
|
1924
|
+
case 'action': this.ck(135); continue;
|
|
1925
|
+
case 'function': this.ck(139); continue;
|
|
1926
|
+
default: this.e(); continue;
|
|
1927
|
+
}
|
|
1928
|
+
case 135: if(this.mi(136,'BoundAction')) { this.addDef( art, $.outer, 'actions', 'action', this.identAst() );
|
|
1929
|
+
this.docComment( art ); } continue;
|
|
1930
|
+
case 136: switch(this.l()) {
|
|
1931
|
+
case '@': this.annoAssignMid({art},136); continue;
|
|
1932
|
+
default: this.s=137; continue;
|
|
1933
|
+
}
|
|
1934
|
+
case 137: this.paramsList({art},138); continue;
|
|
1935
|
+
case 138: switch(this.lk()) {
|
|
1936
|
+
case 'returns': this.returnsSpec({outer:art},0); continue;
|
|
1937
|
+
default: this.gr([';','@','}','action','function']); continue;
|
|
1938
|
+
}
|
|
1939
|
+
case 139: if(this.mi(140,'BoundAction')) { this.addDef( art, $.outer, 'actions', 'function', this.identAst() );
|
|
1940
|
+
this.docComment( art ); } continue;
|
|
1941
|
+
case 140: switch(this.l()) {
|
|
1942
|
+
case '@': this.annoAssignMid({art},140); continue;
|
|
1943
|
+
default: this.s=141; continue;
|
|
1944
|
+
}
|
|
1945
|
+
case 141: this.paramsList({art},142); continue;
|
|
1946
|
+
case 142: this.returnsSpec({outer:art},0); continue;
|
|
1947
|
+
default:
|
|
1948
|
+
this.attachLocation( art );
|
|
1949
|
+
return this.exit_();
|
|
1950
|
+
}
|
|
1951
|
+
}
|
|
1952
|
+
paramsList($,$next) {
|
|
1953
|
+
this.rule_(144,$next);
|
|
1954
|
+
for(;;) switch(this.s) {
|
|
1955
|
+
case 144: if(this.m(145,'(')) { $.art.params = this.createDict(); } continue;
|
|
1956
|
+
case 145: switch(this.l()) {
|
|
1957
|
+
case 'Id': case '@': this.paramDef({outer:$.art},146); continue;
|
|
1958
|
+
default: this.s=147; continue;
|
|
1959
|
+
}
|
|
1960
|
+
case 146: switch(this.l()) {
|
|
1961
|
+
case ',': this.c(145); continue;
|
|
1962
|
+
case ')': this.s=147; continue;
|
|
1963
|
+
default: this.e(); continue;
|
|
1964
|
+
}
|
|
1965
|
+
case 147: if(this.m(0,')')) { this.finalizeDictOrArray( $.art.params ); } continue;
|
|
1966
|
+
default: return this.exit_();
|
|
1967
|
+
}
|
|
1968
|
+
}
|
|
1969
|
+
paramDef($,$next) {
|
|
1970
|
+
this.rule_(149,$next);
|
|
1971
|
+
let art=new XsnArtifact();
|
|
1972
|
+
{ this.docComment( art ); }
|
|
1973
|
+
for(;;) switch(this.s) {
|
|
1974
|
+
case 149: switch(this.l()) {
|
|
1975
|
+
case '@': this.annoAssignStd({art},149); continue;
|
|
1976
|
+
default: this.s=150; continue;
|
|
1977
|
+
}
|
|
1978
|
+
case 150: if(this.miA(151,'Param')) { this.addDef( art, $.outer, 'params', 'param', this.identAst() );
|
|
1979
|
+
this.docComment( art ); } continue;
|
|
1980
|
+
case 151: switch(this.l()) {
|
|
1981
|
+
case '@': this.annoAssignMid({art},151); continue;
|
|
1982
|
+
default: this.s=152; continue;
|
|
1983
|
+
}
|
|
1984
|
+
case 152: switch(this.l()) {
|
|
1985
|
+
case '{': this.elementsBlock({art},153); continue;
|
|
1986
|
+
case ':': this.c(154); continue;
|
|
1987
|
+
default: this.e(); continue;
|
|
1988
|
+
}
|
|
1989
|
+
case 153: switch(this.lk()) {
|
|
1990
|
+
case 'not': case 'null': this.nullability({art},0); continue;
|
|
1991
|
+
default: this.gr([',']); continue;
|
|
1992
|
+
}
|
|
1993
|
+
case 154: if(this.typeExpression({art},155)) { this.docComment( art ); } continue;
|
|
1994
|
+
case 155: switch(this.l()) {
|
|
1995
|
+
case '@': this.annoAssignStd({art},155); continue;
|
|
1996
|
+
default: this.gr([',']); continue;
|
|
1997
|
+
}
|
|
1998
|
+
default:
|
|
1999
|
+
this.attachLocation( art );
|
|
2000
|
+
return this.exit_();
|
|
2001
|
+
}
|
|
2002
|
+
}
|
|
2003
|
+
returnsSpec($,$next) {
|
|
2004
|
+
this.rule_(157,$next);
|
|
2005
|
+
let art=new XsnArtifact();
|
|
2006
|
+
for(;;) switch(this.s) {
|
|
2007
|
+
case 157: if(this.mk(158,'returns')) { art.kind = 'param'; $.outer.returns = art;
|
|
2008
|
+
this.docComment( art ); } continue;
|
|
2009
|
+
case 158: switch(this.l()) {
|
|
2010
|
+
case '@': this.annoAssignStd({art},158); continue;
|
|
2011
|
+
default: this.s=159; continue;
|
|
2012
|
+
}
|
|
2013
|
+
case 159: this.typeExpression({art},0); continue;
|
|
2014
|
+
default:
|
|
2015
|
+
this.attachLocation( art );
|
|
2016
|
+
return this.exit_();
|
|
2017
|
+
}
|
|
2018
|
+
}
|
|
2019
|
+
elementsBlock($,$next) {
|
|
2020
|
+
this.rule_(161,$next);
|
|
2021
|
+
for(;;) switch(this.s) {
|
|
2022
|
+
case 161: if(this.m(162,'{')) { $.art.elements = this.createDict(); } continue;
|
|
2023
|
+
case 162: switch(this.l()) {
|
|
2024
|
+
case 'Id': case '@': this.elementDef({outer:$.art,art:undefined},163); continue;
|
|
2025
|
+
default: this.s=164; continue;
|
|
2026
|
+
}
|
|
2027
|
+
case 163: switch(this.l()) {
|
|
2028
|
+
case ';': this.c(162); continue;
|
|
2029
|
+
case '}': this.s=164; continue;
|
|
2030
|
+
case 'Id': case '@': this.ec('afterBrace') && this.g(162); continue;
|
|
2031
|
+
default: this.e(); continue;
|
|
2032
|
+
}
|
|
2033
|
+
case 164: if(this.m(0,'}')) {this.afterBrace(); this.finalizeDictOrArray( $.art.elements ); } continue;
|
|
2034
|
+
default: return this.exit_();
|
|
2035
|
+
}
|
|
2036
|
+
}
|
|
2037
|
+
elementDef($,$next) {
|
|
2038
|
+
this.rule_(166,$next);
|
|
2039
|
+
let expr; let _;
|
|
2040
|
+
{ $.art ??= new XsnArtifact();
|
|
2041
|
+
this.docComment( $.art ); }
|
|
2042
|
+
for(;;) switch(this.s) {
|
|
2043
|
+
case 166: switch(this.l()) {
|
|
2044
|
+
case '@': this.annoAssignStd({art:$.art},166); continue;
|
|
2045
|
+
default: this.s=167; continue;
|
|
2046
|
+
}
|
|
2047
|
+
case 167: switch(this.lk()) {
|
|
2048
|
+
case 'virtual': if(this.ckP(168,['Id','key'])) { $.art.virtual = this.valueWithLocation( true ); } continue;
|
|
2049
|
+
default: this.s=168; continue;
|
|
2050
|
+
}
|
|
2051
|
+
case 168: switch(this.lk()) {
|
|
2052
|
+
case 'key': if(this.ck(169)) { $.art.key = this.valueWithLocation( true ); } continue;
|
|
2053
|
+
default: this.s=169; continue;
|
|
2054
|
+
}
|
|
2055
|
+
case 169: switch(this.lk()) {
|
|
2056
|
+
case 'masked': if(this.ckP(170,['Id'])) { $.art.masked = this.valueWithLocation( true );
|
|
2057
|
+
this.message( 'syntax-unsupported-masked', this.lb(), { keyword: 'masked' } ); } continue;
|
|
2058
|
+
default: this.s=170; continue;
|
|
2059
|
+
}
|
|
2060
|
+
case 170: switch(this.lk()) {
|
|
2061
|
+
case 'element': if(this.ckP(171,['Id'])) { $.art.$syntax = 'element'; } continue;
|
|
2062
|
+
default: this.s=171; continue;
|
|
2063
|
+
}
|
|
2064
|
+
case 171: if(this.mi(172,'Element')) { this.addDef( $.art, $.outer, 'elements', 'element', this.identAst() );
|
|
2065
|
+
this.docComment( $.art ); } continue;
|
|
2066
|
+
case 172: switch(this.l()) {
|
|
2067
|
+
case '@': this.annoAssignMid({art:$.art},172); continue;
|
|
2068
|
+
default: this.s=173; continue;
|
|
2069
|
+
}
|
|
2070
|
+
case 173: switch(this.l()) {
|
|
2071
|
+
case '{': this.elementsBlock({art:$.art},174); continue;
|
|
2072
|
+
case ':': this.c(175); continue;
|
|
2073
|
+
default: this.s=176; continue;
|
|
2074
|
+
}
|
|
2075
|
+
case 174: switch(this.lk()) {
|
|
2076
|
+
case 'not': case 'null': this.nullability({art:$.art},176); continue;
|
|
2077
|
+
default: this.s=176; continue;
|
|
2078
|
+
}
|
|
2079
|
+
case 175: this.typeExpression({art:$.art},176); continue;
|
|
2080
|
+
case 176: switch(this.l()) {
|
|
2081
|
+
case '=': this.c(177); continue;
|
|
2082
|
+
default: this.s=179; continue;
|
|
2083
|
+
}
|
|
2084
|
+
case 177: if(this.expression(_={},178)) {expr=_.expr; $.art.value = expr; } continue;
|
|
2085
|
+
case 178: switch(this.lk()) {
|
|
2086
|
+
case 'stored': if(this.ck(179)) { $.art.value.stored = this.valueWithLocation( true ); } continue;
|
|
2087
|
+
default: this.s=179; continue;
|
|
2088
|
+
}
|
|
2089
|
+
case 179: this.s=180;{ this.docComment( $.art ); } continue;
|
|
2090
|
+
case 180: switch(this.l()) {
|
|
2091
|
+
case '@': this.gc(0,'allowFinalAnnoAssign') && this.annoAssignStd({art:$.art},180); continue;
|
|
2092
|
+
default: this.gr(['Id',';','@','}','key']); continue;
|
|
2093
|
+
}
|
|
2094
|
+
default:
|
|
2095
|
+
this.attachLocation( $.art );
|
|
2096
|
+
return this.exit_();
|
|
2097
|
+
}
|
|
2098
|
+
}
|
|
2099
|
+
enumSymbolsBlock($,$next) {
|
|
2100
|
+
this.rule_(182,$next);
|
|
2101
|
+
for(;;) switch(this.s) {
|
|
2102
|
+
case 182: if(this.mk(183,'enum')) { $.art.enum = this.createDict(); } continue;
|
|
2103
|
+
case 183: this.m(184,'{'); continue;
|
|
2104
|
+
case 184: switch(this.l()) {
|
|
2105
|
+
case 'Id': case '@': this.enumSymbolDef({outer:$.art},185); continue;
|
|
2106
|
+
default: this.s=186; continue;
|
|
2107
|
+
}
|
|
2108
|
+
case 185: switch(this.l()) {
|
|
2109
|
+
case ';': this.c(184); continue;
|
|
2110
|
+
case '}': this.s=186; continue;
|
|
2111
|
+
default: this.e(); continue;
|
|
2112
|
+
}
|
|
2113
|
+
case 186: if(this.m(0,'}')) {this.afterBrace(); this.finalizeDictOrArray( $.art.enum ); } continue;
|
|
2114
|
+
default: return this.exit_();
|
|
2115
|
+
}
|
|
2116
|
+
}
|
|
2117
|
+
enumSymbolDef($,$next) {
|
|
2118
|
+
this.rule_(188,$next);
|
|
2119
|
+
let art=new XsnArtifact();
|
|
2120
|
+
let sign; let value; let _;
|
|
2121
|
+
{ this.docComment( art ); }
|
|
2122
|
+
for(;;) switch(this.s) {
|
|
2123
|
+
case 188: switch(this.l()) {
|
|
2124
|
+
case '@': this.annoAssignStd({art},188); continue;
|
|
2125
|
+
default: this.s=189; continue;
|
|
2126
|
+
}
|
|
2127
|
+
case 189: if(this.mi(190,'Enum')) { this.addDef( art, $.outer, 'enum', 'enum', this.identAst() );
|
|
2128
|
+
this.docComment( art ); } continue;
|
|
2129
|
+
case 190: switch(this.l()) {
|
|
2130
|
+
case '@': this.annoAssignStd({art},190); continue;
|
|
2131
|
+
default: this.s=191; continue;
|
|
2132
|
+
}
|
|
2133
|
+
case 191: switch(this.l()) {
|
|
2134
|
+
case '=': this.c(192); continue;
|
|
2135
|
+
default: this.gr([';','}']); continue;
|
|
2136
|
+
}
|
|
2137
|
+
case 192: switch(this.l()) {
|
|
2138
|
+
case 'String': if(this.c(194)) { art.value = this.quotedLiteral(); } continue;
|
|
2139
|
+
case 'Number': if(this.c(194)) { art.value = this.numberLiteral(); } continue;
|
|
2140
|
+
case '+': case '-': if(this.c(193)) sign=this.lb(); continue;
|
|
2141
|
+
case 'Id': case '#': case 'QuotedLiteral': if(this.literalValue(_={},194)) {value=_.expr; art.value = value; } continue;
|
|
2142
|
+
default: this.e(); continue;
|
|
2143
|
+
}
|
|
2144
|
+
case 193: if(this.m(194,'Number')) { art.value = this.numberLiteral( sign ); } continue;
|
|
2145
|
+
case 194: this.s=195;{ this.docComment( art ); } continue;
|
|
2146
|
+
case 195: switch(this.l()) {
|
|
2147
|
+
case '@': this.annoAssignStd({art},195); continue;
|
|
2148
|
+
default: this.gr([';','}']); continue;
|
|
2149
|
+
}
|
|
2150
|
+
default:
|
|
2151
|
+
this.attachLocation( art );
|
|
2152
|
+
return this.exit_();
|
|
2153
|
+
}
|
|
2154
|
+
}
|
|
2155
|
+
foreignKeysBlock($,$next) {
|
|
2156
|
+
this.rule_(197,$next);
|
|
2157
|
+
for(;;) switch(this.s) {
|
|
2158
|
+
case 197: if(this.m(198,'{')) { $.art.foreignKeys = this.createDict(); } continue;
|
|
2159
|
+
case 198: switch(this.l()) {
|
|
2160
|
+
case 'Id': case '@': this.foreignKeyDef({outer:$.art},199); continue;
|
|
2161
|
+
default: this.s=200; continue;
|
|
2162
|
+
}
|
|
2163
|
+
case 199: switch(this.l()) {
|
|
2164
|
+
case ',': this.c(198); continue;
|
|
2165
|
+
case '}': this.s=200; continue;
|
|
2166
|
+
default: this.e(); continue;
|
|
2167
|
+
}
|
|
2168
|
+
case 200: if(this.m(0,'}')) { this.finalizeDictOrArray( $.art.foreignKeys ); } continue;
|
|
2169
|
+
default: return this.exit_();
|
|
2170
|
+
}
|
|
2171
|
+
}
|
|
2172
|
+
foreignKeyDef($,$next) {
|
|
2173
|
+
this.rule_(202,$next);
|
|
2174
|
+
let art=new XsnArtifact(); let name;
|
|
2175
|
+
let ref; let _;
|
|
2176
|
+
{ this.docComment( art ); }
|
|
2177
|
+
for(;;) switch(this.s) {
|
|
2178
|
+
case 202: switch(this.l()) {
|
|
2179
|
+
case '@': this.annoAssignStd({art},202); continue;
|
|
2180
|
+
default: this.s=203; continue;
|
|
2181
|
+
}
|
|
2182
|
+
case 203: if(this.simplePath(_={category:'ref'},204)) {ref=_.ref; art.targetElement = ref; } continue;
|
|
2183
|
+
case 204: switch(this.lk()) {
|
|
2184
|
+
case 'as': this.ck(205); continue;
|
|
2185
|
+
default: if(this.gr([',','}'])) { this.classifyImplicitName( 'KeyImplicit', ref ); name = ref.path; } continue;
|
|
2186
|
+
}
|
|
2187
|
+
case 205: if(this.mi(0,'Key')) {name=this.lb(); name = this.identAst(); } continue;
|
|
2188
|
+
case 0: { this.addDef( art, $.outer, 'foreignKeys', 'key', name ); }
|
|
2189
|
+
default:
|
|
2190
|
+
this.attachLocation(art);
|
|
2191
|
+
return this.exit_();
|
|
2192
|
+
}
|
|
2193
|
+
}
|
|
2194
|
+
mixinElementDef($,$next) {
|
|
2195
|
+
this.rule_(207,$next);
|
|
2196
|
+
let art=new XsnArtifact();
|
|
2197
|
+
let assoc; let card; let target; let expr; let _;
|
|
2198
|
+
for(;;) switch(this.s) {
|
|
2199
|
+
case 207: if(this.mi(208,'Mixin')) { this.addDef( art, $.outer, 'mixin', 'mixin', this.identAst() ); } continue;
|
|
2200
|
+
case 208: this.m(209,':'); continue;
|
|
2201
|
+
case 209: switch(this.lk()) {
|
|
2202
|
+
case 'association': if(this.ck(210)) assoc=this.lb(); continue;
|
|
2203
|
+
case 'composition': if(this.ck(212)) assoc=this.lb(); continue;
|
|
2204
|
+
default: this.e(); continue;
|
|
2205
|
+
}
|
|
2206
|
+
case 210: switch(this.l()) {
|
|
2207
|
+
case '[': this.cardinality({art},211); continue;
|
|
2208
|
+
default: this.s=211; continue;
|
|
2209
|
+
}
|
|
2210
|
+
case 211: this.mk(214,'to'); continue;
|
|
2211
|
+
case 212: switch(this.l()) {
|
|
2212
|
+
case '[': this.cardinality({art},213); continue;
|
|
2213
|
+
default: this.s=213; continue;
|
|
2214
|
+
}
|
|
2215
|
+
case 213: this.mk(214,'of'); continue;
|
|
2216
|
+
case 214: switch(this.lk()) {
|
|
2217
|
+
case 'one': case 'many': if(this.ckP(215,['Id'])) card=this.lb(); continue;
|
|
2218
|
+
default: this.s=215; continue;
|
|
2219
|
+
}
|
|
2220
|
+
case 215: if(this.simplePath(_={category:'artref'},216)) {target=_.ref; this.setAssocAndComposition( art, assoc, card, target ); } continue;
|
|
2221
|
+
case 216: this.mk(217,'on'); continue;
|
|
2222
|
+
case 217: if(this.condition(_={},0)) {expr=_.expr; art.on = expr; } continue;
|
|
2223
|
+
default:
|
|
2224
|
+
this.attachLocation(art);
|
|
2225
|
+
return this.exit_();
|
|
2226
|
+
}
|
|
2227
|
+
}
|
|
2228
|
+
annotateArtifact($,$next) {
|
|
2229
|
+
this.rule_(219,$next);
|
|
2230
|
+
let name; let elemName; let _;
|
|
2231
|
+
for(;;) switch(this.s) {
|
|
2232
|
+
case 219: if(this.namePath(_={category:'Ext'},220)) name=_.name; continue;
|
|
2233
|
+
case 220: switch(this.lk()) {
|
|
2234
|
+
case ':': this.c(221); continue;
|
|
2235
|
+
case 'with': this.ck(226); continue;
|
|
2236
|
+
default: this.s=226; continue;
|
|
2237
|
+
}
|
|
2238
|
+
case 221: if(this.namePath(_={category:'ExtElement'},222)) {elemName=_.name; this.addExtension( $.art, $.outer, 'annotate', name, elemName.path ); } continue;
|
|
2239
|
+
case 222: switch(this.lk()) {
|
|
2240
|
+
case 'with': this.ck(223); continue;
|
|
2241
|
+
default: this.s=223; continue;
|
|
2242
|
+
}
|
|
2243
|
+
case 223: this.s=224;{ this.docComment( $.art ); } continue;
|
|
2244
|
+
case 224: switch(this.l()) {
|
|
2245
|
+
case '@': this.annoAssignStd({art:$.art},224); continue;
|
|
2246
|
+
default: this.s=225; continue;
|
|
2247
|
+
}
|
|
2248
|
+
case 225: switch(this.l()) {
|
|
2249
|
+
case '{': this.annotateElementsBlock({art:$.art},0); continue;
|
|
2250
|
+
default: this.gr([';']); continue;
|
|
2251
|
+
}
|
|
2252
|
+
case 226: this.s=227;{ this.addExtension( $.art, $.outer, 'annotate', name );
|
|
2253
|
+
this.docComment( $.art ); } continue;
|
|
2254
|
+
case 227: switch(this.l()) {
|
|
2255
|
+
case '@': this.annoAssignStd({art:$.art},227); continue;
|
|
2256
|
+
default: this.s=228; continue;
|
|
2257
|
+
}
|
|
2258
|
+
case 228: switch(this.l()) {
|
|
2259
|
+
case '(': this.annotateParamsBlock({art:$.art},229); continue;
|
|
2260
|
+
default: this.s=229; continue;
|
|
2261
|
+
}
|
|
2262
|
+
case 229: switch(this.lk()) {
|
|
2263
|
+
case 'returns': this.annotateReturns({outer:$.art},0); continue;
|
|
2264
|
+
case '{': this.annotateElementsBlock({art:$.art},230); continue;
|
|
2265
|
+
default: this.s=230; continue;
|
|
2266
|
+
}
|
|
2267
|
+
case 230: switch(this.lk()) {
|
|
2268
|
+
case 'actions': this.annotateActionsBlock({art:$.art},0); continue;
|
|
2269
|
+
default: this.gr([';']); continue;
|
|
2270
|
+
}
|
|
2271
|
+
default:
|
|
2272
|
+
this.attachLocation( $.art );
|
|
2273
|
+
return this.exit_();
|
|
2274
|
+
}
|
|
2275
|
+
}
|
|
2276
|
+
extendArtifact($,$next) {
|
|
2277
|
+
this.rule_(232,$next);
|
|
2278
|
+
let name; let elemName; let elements; let incl; let _;
|
|
2279
|
+
for(;;) switch(this.s) {
|
|
2280
|
+
case 232: if(this.namePath(_={category:'Ext'},233)) name=_.name; continue;
|
|
2281
|
+
case 233: switch(this.lk()) {
|
|
2282
|
+
case ':': this.c(234); continue;
|
|
2283
|
+
case 'with': if(this.ck(243)) { this.addExtension( $.art, $.outer, 'extend', name );
|
|
2284
|
+
this.docComment( $.art ); } continue;
|
|
2285
|
+
default: this.s=240;{ this.addExtension( $.art, $.outer, 'extend', name );
|
|
2286
|
+
this.docComment( $.art ); } continue;
|
|
2287
|
+
}
|
|
2288
|
+
case 234: if(this.namePath(_={category:'ExtElement'},235)) {elemName=_.name; this.addExtension( $.art, $.outer, 'extend', name, elemName.path ); } continue;
|
|
2289
|
+
case 235: switch(this.lk()) {
|
|
2290
|
+
case 'with': this.ck(236); continue;
|
|
2291
|
+
default: this.s=236; continue;
|
|
2292
|
+
}
|
|
2293
|
+
case 236: this.s=237;{ this.docComment( $.art ); } continue;
|
|
2294
|
+
case 237: switch(this.l()) {
|
|
2295
|
+
case '@': this.annoAssignStd({art:$.art},237); continue;
|
|
2296
|
+
default: this.s=238; continue;
|
|
2297
|
+
}
|
|
2298
|
+
case 238: switch(this.lk()) {
|
|
2299
|
+
case 'elements': if(this.ck(239)) elements=this.lb(); continue;
|
|
2300
|
+
case '{': this.s=239; continue;
|
|
2301
|
+
case 'enum': this.enumSymbolsBlock({art:$.art},0); continue;
|
|
2302
|
+
case '(': this.typeNamedArgsList({art:$.art},0); continue;
|
|
2303
|
+
default: this.gr([';']); continue;
|
|
2304
|
+
}
|
|
2305
|
+
case 239: this.extendElementsBlock({art:$.art,start:elements},0); continue;
|
|
2306
|
+
case 240: switch(this.l()) {
|
|
2307
|
+
case '@': this.annoAssignStd({art:$.art},240); continue;
|
|
2308
|
+
default: this.s=241; continue;
|
|
2309
|
+
}
|
|
2310
|
+
case 241: switch(this.l()) {
|
|
2311
|
+
case '{': this.extendElementsBlock({art:$.art,start:undefined},242); continue;
|
|
2312
|
+
default: this.gr([';']); continue;
|
|
2313
|
+
}
|
|
2314
|
+
case 242: switch(this.lk()) {
|
|
2315
|
+
case 'actions': this.actionsBlock({art:$.art},0); continue;
|
|
2316
|
+
default: this.gr([';']); continue;
|
|
2317
|
+
}
|
|
2318
|
+
case 243: switch(this.l()) {
|
|
2319
|
+
case '@': this.annoAssignStd({art:$.art},243); continue;
|
|
2320
|
+
default: this.s=244; continue;
|
|
2321
|
+
}
|
|
2322
|
+
case 244: switch(this.lk()) {
|
|
2323
|
+
case 'Id': if(this.simplePath(_={category:'artref'},245)) {incl=_.ref; $.art.includes = [ incl ]; } continue;
|
|
2324
|
+
case 'elements': if(this.ckP(249,['{'])) elements=this.lb(); continue;
|
|
2325
|
+
case '{': this.s=249; continue;
|
|
2326
|
+
case 'actions': this.lP() && this.actionsBlock({art:$.art},0); continue;
|
|
2327
|
+
case 'enum': this.lP() && this.enumSymbolsBlock({art:$.art},0); continue;
|
|
2328
|
+
case '(': this.typeNamedArgsList({art:$.art},0); continue;
|
|
2329
|
+
case 'columns': this.ckP(251,['{']); continue;
|
|
2330
|
+
case 'definitions': this.ckP(252,['{']); continue;
|
|
2331
|
+
default: this.gi(0,[';']); continue;
|
|
2332
|
+
}
|
|
2333
|
+
case 245: switch(this.l()) {
|
|
2334
|
+
case ',': this.c(246); continue;
|
|
2335
|
+
default: this.s=247; continue;
|
|
2336
|
+
}
|
|
2337
|
+
case 246: if(this.simplePath(_={category:'artref'},245)) {incl=_.ref; $.art.includes.push( incl ); } continue;
|
|
2338
|
+
case 247: switch(this.l()) {
|
|
2339
|
+
case '{': this.extendElementsBlock({art:$.art,start:undefined},248); continue;
|
|
2340
|
+
default: this.s=248; continue;
|
|
2341
|
+
}
|
|
2342
|
+
case 248: switch(this.lk()) {
|
|
2343
|
+
case 'actions': this.actionsBlock({art:$.art},0); continue;
|
|
2344
|
+
default: this.gr([';']); continue;
|
|
2345
|
+
}
|
|
2346
|
+
case 249: this.extendElementsBlock({art:$.art,start:elements},250); continue;
|
|
2347
|
+
case 250: switch(this.lk()) {
|
|
2348
|
+
case 'actions': this.actionsBlock({art:$.art},0); continue;
|
|
2349
|
+
default: this.gr([';']); continue;
|
|
2350
|
+
}
|
|
2351
|
+
case 251: this.selectItemsList({query:$.art,clause:'columns',start:this.lb()},0); continue;
|
|
2352
|
+
case 252: this.artifactsBlock({art:$.art,start:this.lb()},0); continue;
|
|
2353
|
+
default:
|
|
2354
|
+
this.attachLocation( $.art );
|
|
2355
|
+
return this.exit_();
|
|
2356
|
+
}
|
|
2357
|
+
}
|
|
2358
|
+
extendService($,$next) {
|
|
2359
|
+
this.rule_(254,$next);
|
|
2360
|
+
let name; let _;
|
|
2361
|
+
for(;;) switch(this.s) {
|
|
2362
|
+
case 254: if(this.mk(255,'service')) { $.art.expectedKind = this.valueWithLocation(); } continue;
|
|
2363
|
+
case 255: if(this.namePath(_={category:'ExtService'},256)) {name=_.name; $.art.name = name; $.outer.extensions.push( $.art ); } continue;
|
|
2364
|
+
case 256: switch(this.lk()) {
|
|
2365
|
+
case 'with': this.ck(257); continue;
|
|
2366
|
+
default: this.s=257; continue;
|
|
2367
|
+
}
|
|
2368
|
+
case 257: this.s=258;{ this.docComment( $.art ); } continue;
|
|
2369
|
+
case 258: switch(this.l()) {
|
|
2370
|
+
case '@': this.annoAssignStd({art:$.art},258); continue;
|
|
2371
|
+
default: this.s=259; continue;
|
|
2372
|
+
}
|
|
2373
|
+
case 259: switch(this.l()) {
|
|
2374
|
+
case '{': this.artifactsBlock({art:$.art,start:undefined},0); continue;
|
|
2375
|
+
default: this.gr([';']); continue;
|
|
2376
|
+
}
|
|
2377
|
+
default:
|
|
2378
|
+
this.attachLocation( $.art );
|
|
2379
|
+
return this.exit_();
|
|
2380
|
+
}
|
|
2381
|
+
}
|
|
2382
|
+
extendContext($,$next) {
|
|
2383
|
+
this.rule_(261,$next);
|
|
2384
|
+
let name; let _;
|
|
2385
|
+
for(;;) switch(this.s) {
|
|
2386
|
+
case 261: if(this.mk(262,'context')) { $.art.expectedKind = this.valueWithLocation(); } continue;
|
|
2387
|
+
case 262: if(this.namePath(_={category:'ExtContext'},263)) {name=_.name; $.art.name = name; $.outer.extensions.push( $.art ); } continue;
|
|
2388
|
+
case 263: switch(this.lk()) {
|
|
2389
|
+
case 'with': this.ck(264); continue;
|
|
2390
|
+
default: this.s=264; continue;
|
|
2391
|
+
}
|
|
2392
|
+
case 264: this.s=265;{ this.docComment( $.art ); } continue;
|
|
2393
|
+
case 265: switch(this.l()) {
|
|
2394
|
+
case '@': this.annoAssignStd({art:$.art},265); continue;
|
|
2395
|
+
default: this.s=266; continue;
|
|
2396
|
+
}
|
|
2397
|
+
case 266: switch(this.l()) {
|
|
2398
|
+
case '{': this.artifactsBlock({art:$.art,start:undefined},0); continue;
|
|
2399
|
+
default: this.gr([';']); continue;
|
|
2400
|
+
}
|
|
2401
|
+
default:
|
|
2402
|
+
this.attachLocation( $.art );
|
|
2403
|
+
return this.exit_();
|
|
2404
|
+
}
|
|
2405
|
+
}
|
|
2406
|
+
extendType($,$next) {
|
|
2407
|
+
this.rule_(268,$next);
|
|
2408
|
+
let name; let incl; let elements; let _;
|
|
2409
|
+
for(;;) switch(this.s) {
|
|
2410
|
+
case 268: if(this.mk(269,'type')) { $.art.expectedKind = this.valueWithLocation(); } continue;
|
|
2411
|
+
case 269: if(this.namePath(_={category:'Ext'},270)) {name=_.name; $.art.name = name; $.outer.extensions.push( $.art ); } continue;
|
|
2412
|
+
case 270: switch(this.lk()) {
|
|
2413
|
+
case 'with': if(this.ck(273)) { this.docComment( $.art ); } continue;
|
|
2414
|
+
default: this.s=271;{ this.docComment( $.art ); } continue;
|
|
2415
|
+
}
|
|
2416
|
+
case 271: switch(this.l()) {
|
|
2417
|
+
case '@': this.annoAssignStd({art:$.art},271); continue;
|
|
2418
|
+
default: this.s=272; continue;
|
|
2419
|
+
}
|
|
2420
|
+
case 272: switch(this.l()) {
|
|
2421
|
+
case '{': this.extendElementsBlock({art:$.art,start:undefined},0); continue;
|
|
2422
|
+
default: this.gr([';']); continue;
|
|
2423
|
+
}
|
|
2424
|
+
case 273: switch(this.l()) {
|
|
2425
|
+
case '@': this.annoAssignStd({art:$.art},273); continue;
|
|
2426
|
+
default: this.s=274; continue;
|
|
2427
|
+
}
|
|
2428
|
+
case 274: switch(this.lk()) {
|
|
2429
|
+
case 'Id': if(this.simplePath(_={category:'artref'},275)) {incl=_.ref; $.art.includes = [ incl ]; } continue;
|
|
2430
|
+
case 'elements': if(this.ckP(278,['{'])) elements=this.lb(); continue;
|
|
2431
|
+
case '{': this.s=278; continue;
|
|
2432
|
+
case 'enum': this.lP() && this.enumSymbolsBlock({art:$.art},0); continue;
|
|
2433
|
+
case '(': this.typeNamedArgsList({art:$.art},0); continue;
|
|
2434
|
+
default: this.gi(0,[';']); continue;
|
|
2435
|
+
}
|
|
2436
|
+
case 275: switch(this.l()) {
|
|
2437
|
+
case ',': this.c(276); continue;
|
|
2438
|
+
default: this.s=277; continue;
|
|
2439
|
+
}
|
|
2440
|
+
case 276: if(this.simplePath(_={category:'artref'},275)) {incl=_.ref; $.art.includes.push( incl ); } continue;
|
|
2441
|
+
case 277: switch(this.l()) {
|
|
2442
|
+
case '{': this.extendElementsBlock({art:$.art,start:undefined},0); continue;
|
|
2443
|
+
default: this.gr([';']); continue;
|
|
2444
|
+
}
|
|
2445
|
+
case 278: this.extendElementsBlock({art:$.art,start:elements},0); continue;
|
|
2446
|
+
default:
|
|
2447
|
+
this.attachLocation( $.art );
|
|
2448
|
+
return this.exit_();
|
|
2449
|
+
}
|
|
2450
|
+
}
|
|
2451
|
+
extendEntityOrAspect($,$next) {
|
|
2452
|
+
this.rule_(280,$next);
|
|
2453
|
+
let name; let incl; let _;
|
|
2454
|
+
for(;;) switch(this.s) {
|
|
2455
|
+
case 280: switch(this.lk()) {
|
|
2456
|
+
case 'aspect': case 'entity': if(this.ck(281)) { $.art.expectedKind = this.valueWithLocation(); } continue;
|
|
2457
|
+
default: this.e(); continue;
|
|
2458
|
+
}
|
|
2459
|
+
case 281: if(this.namePath(_={category:'Ext'},282)) {name=_.name; $.art.name = name; $.outer.extensions.push( $.art ); } continue;
|
|
2460
|
+
case 282: switch(this.lk()) {
|
|
2461
|
+
case 'with': if(this.ck(284)) { this.docComment( $.art ); } continue;
|
|
2462
|
+
default: this.s=283;{ this.docComment( $.art ); } continue;
|
|
2463
|
+
}
|
|
2464
|
+
case 283: switch(this.l()) {
|
|
2465
|
+
case '@': this.annoAssignStd({art:$.art},283); continue;
|
|
2466
|
+
default: this.s=288; continue;
|
|
2467
|
+
}
|
|
2468
|
+
case 284: switch(this.l()) {
|
|
2469
|
+
case '@': this.annoAssignStd({art:$.art},284); continue;
|
|
2470
|
+
default: this.s=285; continue;
|
|
2471
|
+
}
|
|
2472
|
+
case 285: switch(this.lk()) {
|
|
2473
|
+
case 'Id': if(this.simplePath(_={category:'artref'},286)) {incl=_.ref; $.art.includes = [ incl ]; } continue;
|
|
2474
|
+
case 'actions': this.gP(288); continue;
|
|
2475
|
+
default: this.gi(288); continue;
|
|
2476
|
+
}
|
|
2477
|
+
case 286: switch(this.l()) {
|
|
2478
|
+
case ',': this.c(287); continue;
|
|
2479
|
+
default: this.s=288; continue;
|
|
2480
|
+
}
|
|
2481
|
+
case 287: if(this.simplePath(_={category:'artref'},286)) {incl=_.ref; $.art.includes.push( incl ); } continue;
|
|
2482
|
+
case 288: switch(this.l()) {
|
|
2483
|
+
case '{': this.extendElementsBlock({art:$.art,start:undefined},289); continue;
|
|
2484
|
+
default: this.s=289; continue;
|
|
2485
|
+
}
|
|
2486
|
+
case 289: switch(this.lk()) {
|
|
2487
|
+
case 'actions': this.actionsBlock({art:$.art},0); continue;
|
|
2488
|
+
default: this.gr([';']); continue;
|
|
2489
|
+
}
|
|
2490
|
+
default:
|
|
2491
|
+
this.attachLocation( $.art );
|
|
2492
|
+
return this.exit_();
|
|
2493
|
+
}
|
|
2494
|
+
}
|
|
2495
|
+
extendProjection($,$next) {
|
|
2496
|
+
this.rule_(291,$next);
|
|
2497
|
+
let name; let _;
|
|
2498
|
+
for(;;) switch(this.s) {
|
|
2499
|
+
case 291: if(this.mk(292,'projection')) { $.art.expectedKind = this.valueWithLocation(); } continue;
|
|
2500
|
+
case 292: if(this.namePath(_={category:'Ext'},293)) {name=_.name; $.art.name = name; $.outer.extensions.push( $.art ); } continue;
|
|
2501
|
+
case 293: switch(this.lk()) {
|
|
2502
|
+
case 'with': this.ck(294); continue;
|
|
2503
|
+
default: this.s=294; continue;
|
|
2504
|
+
}
|
|
2505
|
+
case 294: this.s=295;{ this.docComment( $.art ); } continue;
|
|
2506
|
+
case 295: switch(this.l()) {
|
|
2507
|
+
case '@': this.annoAssignStd({art:$.art},295); continue;
|
|
2508
|
+
default: this.s=296; continue;
|
|
2509
|
+
}
|
|
2510
|
+
case 296: switch(this.l()) {
|
|
2511
|
+
case '{': this.selectItemsList({query:$.art,clause:'columns',start:undefined},297); continue;
|
|
2512
|
+
default: this.s=297; continue;
|
|
2513
|
+
}
|
|
2514
|
+
case 297: switch(this.lk()) {
|
|
2515
|
+
case 'actions': this.actionsBlock({art:$.art},0); continue;
|
|
2516
|
+
default: this.gr([';']); continue;
|
|
2517
|
+
}
|
|
2518
|
+
default:
|
|
2519
|
+
this.attachLocation( $.art );
|
|
2520
|
+
return this.exit_();
|
|
2521
|
+
}
|
|
2522
|
+
}
|
|
2523
|
+
annotateActionsBlock($,$next) {
|
|
2524
|
+
this.rule_(299,$next);
|
|
2525
|
+
for(;;) switch(this.s) {
|
|
2526
|
+
case 299: if(this.mk(300,'actions')) { $.art.actions = this.createDict(); } continue;
|
|
2527
|
+
case 300: this.m(301,'{'); continue;
|
|
2528
|
+
case 301: switch(this.l()) {
|
|
2529
|
+
case 'Id': case '@': this.annotateBoundAction({outer:$.art},302); continue;
|
|
2530
|
+
default: this.s=303; continue;
|
|
2531
|
+
}
|
|
2532
|
+
case 302: switch(this.l()) {
|
|
2533
|
+
case ';': this.c(301); continue;
|
|
2534
|
+
case '}': this.s=303; continue;
|
|
2535
|
+
case 'Id': case '@': this.ec('afterBrace') && this.g(301); continue;
|
|
2536
|
+
default: this.e(); continue;
|
|
2537
|
+
}
|
|
2538
|
+
case 303: if(this.m(0,'}')) {this.afterBrace(); this.finalizeExtensionsDict( $.art.actions ); } continue;
|
|
2539
|
+
default: return this.exit_();
|
|
2540
|
+
}
|
|
2541
|
+
}
|
|
2542
|
+
annotateBoundAction($,$next) {
|
|
2543
|
+
this.rule_(305,$next);
|
|
2544
|
+
let art=new XsnArtifact();
|
|
2545
|
+
{ this.docComment( art ); }
|
|
2546
|
+
for(;;) switch(this.s) {
|
|
2547
|
+
case 305: switch(this.l()) {
|
|
2548
|
+
case '@': this.annoAssignStd({art},305); continue;
|
|
2549
|
+
default: this.s=306; continue;
|
|
2550
|
+
}
|
|
2551
|
+
case 306: if(this.mi(307,'ExtBoundAction')) { this.addDef( art, $.outer, 'actions', 'annotate', this.identAst() );
|
|
2552
|
+
this.docComment( art ); } continue;
|
|
2553
|
+
case 307: switch(this.l()) {
|
|
2554
|
+
case '@': this.annoAssignStd({art},307); continue;
|
|
2555
|
+
default: this.s=308; continue;
|
|
2556
|
+
}
|
|
2557
|
+
case 308: switch(this.l()) {
|
|
2558
|
+
case '(': this.annotateParamsBlock({art},309); continue;
|
|
2559
|
+
default: this.s=309; continue;
|
|
2560
|
+
}
|
|
2561
|
+
case 309: switch(this.lk()) {
|
|
2562
|
+
case 'returns': this.lP() && this.annotateReturns({outer:art},0); continue;
|
|
2563
|
+
default: this.gr(['Id',';','@','}']); continue;
|
|
2564
|
+
}
|
|
2565
|
+
default:
|
|
2566
|
+
this.attachLocation( art );
|
|
2567
|
+
return this.exit_();
|
|
2568
|
+
}
|
|
2569
|
+
}
|
|
2570
|
+
annotateParamsBlock($,$next) {
|
|
2571
|
+
this.rule_(311,$next);
|
|
2572
|
+
for(;;) switch(this.s) {
|
|
2573
|
+
case 311: if(this.m(312,'(')) { $.art.params = this.createDict(); } continue;
|
|
2574
|
+
case 312: switch(this.l()) {
|
|
2575
|
+
case 'Id': case '@': this.annotateParam({outer:$.art},313); continue;
|
|
2576
|
+
default: this.s=314; continue;
|
|
2577
|
+
}
|
|
2578
|
+
case 313: switch(this.l()) {
|
|
2579
|
+
case ',': this.c(312); continue;
|
|
2580
|
+
case ')': this.s=314; continue;
|
|
2581
|
+
default: this.e(); continue;
|
|
2582
|
+
}
|
|
2583
|
+
case 314: if(this.m(0,')')) { this.finalizeExtensionsDict( $.art.params ); } continue;
|
|
2584
|
+
default: return this.exit_();
|
|
2585
|
+
}
|
|
2586
|
+
}
|
|
2587
|
+
annotateParam($,$next) {
|
|
2588
|
+
this.rule_(316,$next);
|
|
2589
|
+
let art=new XsnArtifact();
|
|
2590
|
+
{ this.docComment( art ); }
|
|
2591
|
+
for(;;) switch(this.s) {
|
|
2592
|
+
case 316: switch(this.l()) {
|
|
2593
|
+
case '@': this.annoAssignStd({art},316); continue;
|
|
2594
|
+
default: this.s=317; continue;
|
|
2595
|
+
}
|
|
2596
|
+
case 317: if(this.mi(318,'ExtParam')) { this.addDef( art, $.outer, 'params', 'annotate', this.identAst() );
|
|
2597
|
+
this.docComment( art ); } continue;
|
|
2598
|
+
case 318: switch(this.l()) {
|
|
2599
|
+
case '@': this.annoAssignStd({art},318); continue;
|
|
2600
|
+
default: this.gr([')',',']); continue;
|
|
2601
|
+
}
|
|
2602
|
+
default:
|
|
2603
|
+
this.attachLocation( art );
|
|
2604
|
+
return this.exit_();
|
|
2605
|
+
}
|
|
2606
|
+
}
|
|
2607
|
+
annotateReturns($,$next) {
|
|
2608
|
+
this.rule_(320,$next);
|
|
2609
|
+
let art=new XsnArtifact();
|
|
2610
|
+
for(;;) switch(this.s) {
|
|
2611
|
+
case 320: if(this.mk(321,'returns')) { $.outer.returns = art; art.kind = 'annotate';
|
|
2612
|
+
this.docComment( art ); } continue;
|
|
2613
|
+
case 321: switch(this.l()) {
|
|
2614
|
+
case '@': this.annoAssignStd({art},321); continue;
|
|
2615
|
+
default: this.s=322; continue;
|
|
2616
|
+
}
|
|
2617
|
+
case 322: switch(this.l()) {
|
|
2618
|
+
case '{': this.annotateElementsBlock({art},0); continue;
|
|
2619
|
+
default: this.gr([';']); continue;
|
|
2620
|
+
}
|
|
2621
|
+
default:
|
|
2622
|
+
this.attachLocation( art );
|
|
2623
|
+
return this.exit_();
|
|
2624
|
+
}
|
|
2625
|
+
}
|
|
2626
|
+
annotateElementsBlock($,$next) {
|
|
2627
|
+
this.rule_(324,$next);
|
|
2628
|
+
for(;;) switch(this.s) {
|
|
2629
|
+
case 324: if(this.m(325,'{')) { $.art.elements = this.createDict(); } continue;
|
|
2630
|
+
case 325: switch(this.l()) {
|
|
2631
|
+
case 'Id': case '@': this.annotateElement({outer:$.art},326); continue;
|
|
2632
|
+
default: this.s=327; continue;
|
|
2633
|
+
}
|
|
2634
|
+
case 326: switch(this.l()) {
|
|
2635
|
+
case ';': this.c(325); continue;
|
|
2636
|
+
case '}': this.s=327; continue;
|
|
2637
|
+
case 'Id': case '@': this.ec('afterBrace') && this.g(325); continue;
|
|
2638
|
+
default: this.e(); continue;
|
|
2639
|
+
}
|
|
2640
|
+
case 327: if(this.m(0,'}')) {this.afterBrace(); this.finalizeExtensionsDict( $.art.elements ); } continue;
|
|
2641
|
+
default: return this.exit_();
|
|
2642
|
+
}
|
|
2643
|
+
}
|
|
2644
|
+
annotateElement($,$next) {
|
|
2645
|
+
this.rule_(329,$next);
|
|
2646
|
+
let art=new XsnArtifact();
|
|
2647
|
+
{ this.docComment( art ); }
|
|
2648
|
+
for(;;) switch(this.s) {
|
|
2649
|
+
case 329: switch(this.l()) {
|
|
2650
|
+
case '@': this.annoAssignStd({art},329); continue;
|
|
2651
|
+
default: this.s=330; continue;
|
|
2652
|
+
}
|
|
2653
|
+
case 330: if(this.mi(331,'ExtElement')) { this.addDef( art, $.outer, 'elements', 'annotate', this.identAst() );
|
|
2654
|
+
this.docComment( art ); } continue;
|
|
2655
|
+
case 331: switch(this.l()) {
|
|
2656
|
+
case '@': this.annoAssignStd({art},331); continue;
|
|
2657
|
+
default: this.s=332; continue;
|
|
2658
|
+
}
|
|
2659
|
+
case 332: switch(this.l()) {
|
|
2660
|
+
case '{': this.annotateElementsBlock({art},0); continue;
|
|
2661
|
+
default: this.gr(['Id',';','@','}']); continue;
|
|
2662
|
+
}
|
|
2663
|
+
default:
|
|
2664
|
+
this.attachLocation( art );
|
|
2665
|
+
return this.exit_();
|
|
2666
|
+
}
|
|
2667
|
+
}
|
|
2668
|
+
extendElementsBlock($,$next) {
|
|
2669
|
+
this.rule_(334,$next);
|
|
2670
|
+
for(;;) switch(this.s) {
|
|
2671
|
+
case 334: if(this.m(335,'{')) { $.art.elements = this.createDict( $.start ); } continue;
|
|
2672
|
+
case 335: switch(this.l()) {
|
|
2673
|
+
case 'Id': case '@': this.elementDefOrExtend({outer:$.art},336); continue;
|
|
2674
|
+
default: this.s=337; continue;
|
|
2675
|
+
}
|
|
2676
|
+
case 336: switch(this.l()) {
|
|
2677
|
+
case ';': this.c(335); continue;
|
|
2678
|
+
case '}': this.s=337; continue;
|
|
2679
|
+
case 'Id': case '@': this.ec('afterBrace') && this.g(335); continue;
|
|
2680
|
+
default: this.e(); continue;
|
|
2681
|
+
}
|
|
2682
|
+
case 337: if(this.m(0,'}')) {this.afterBrace(); this.finalizeExtensionsDict( $.art.elements ); } continue;
|
|
2683
|
+
default: return this.exit_();
|
|
2684
|
+
}
|
|
2685
|
+
}
|
|
2686
|
+
elementDefOrExtend($,$next) {
|
|
2687
|
+
this.rule_(339,$next);
|
|
2688
|
+
let art=new XsnArtifact();
|
|
2689
|
+
let elements;
|
|
2690
|
+
{ this.docComment( art ); }
|
|
2691
|
+
for(;;) switch(this.s) {
|
|
2692
|
+
case 339: switch(this.l()) {
|
|
2693
|
+
case '@': this.annoAssignStd({art},339); continue;
|
|
2694
|
+
default: this.s=340; continue;
|
|
2695
|
+
}
|
|
2696
|
+
case 340: switch(this.lk()) {
|
|
2697
|
+
case 'Id': case '@': case 'key': this.elementDef({outer:$.outer,art},0); continue;
|
|
2698
|
+
case 'extend': this.ckP(341,['Id']); continue;
|
|
2699
|
+
default: this.ei(); continue;
|
|
2700
|
+
}
|
|
2701
|
+
case 341: switch(this.lk()) {
|
|
2702
|
+
case 'element': if(this.ckP(342,['Id'])) { art.expectedKind = this.valueWithLocation(); } continue;
|
|
2703
|
+
default: this.s=342; continue;
|
|
2704
|
+
}
|
|
2705
|
+
case 342: if(this.mi(343,'ExtElement')) { this.addDef( art, $.outer, 'elements', 'extend', this.identAst() ); } continue;
|
|
2706
|
+
case 343: switch(this.lk()) {
|
|
2707
|
+
case 'with': if(this.ck(346)) { this.docComment( art ); } continue;
|
|
2708
|
+
default: this.s=344;{ this.docComment( art ); } continue;
|
|
2709
|
+
}
|
|
2710
|
+
case 344: switch(this.l()) {
|
|
2711
|
+
case '@': this.annoAssignStd({art},344); continue;
|
|
2712
|
+
default: this.s=345; continue;
|
|
2713
|
+
}
|
|
2714
|
+
case 345: switch(this.l()) {
|
|
2715
|
+
case '{': this.extendElementsBlock({art,start:undefined},0); continue;
|
|
2716
|
+
default: this.gr(['Id',';','@','}','key']); continue;
|
|
2717
|
+
}
|
|
2718
|
+
case 346: switch(this.l()) {
|
|
2719
|
+
case '@': this.annoAssignStd({art},346); continue;
|
|
2720
|
+
default: this.s=347; continue;
|
|
2721
|
+
}
|
|
2722
|
+
case 347: switch(this.lk()) {
|
|
2723
|
+
case 'elements': if(this.ck(348)) elements=this.lb(); continue;
|
|
2724
|
+
case '{': this.s=348; continue;
|
|
2725
|
+
case 'enum': this.enumSymbolsBlock({art},0); continue;
|
|
2726
|
+
case '(': this.typeNamedArgsList({art},0); continue;
|
|
2727
|
+
default: this.gr(['Id',';','@','}','key']); continue;
|
|
2728
|
+
}
|
|
2729
|
+
case 348: this.extendElementsBlock({art,start:elements},0); continue;
|
|
2730
|
+
default: return this.exit_();
|
|
2731
|
+
}
|
|
2732
|
+
}
|
|
2733
|
+
typeOrIncludesSpec($,$next) {
|
|
2734
|
+
this.rule_(350,$next);
|
|
2735
|
+
let ref; let _;
|
|
2736
|
+
for(;;) switch(this.s) {
|
|
2737
|
+
case 350: switch(this.l()) {
|
|
2738
|
+
case '{': this.elementsBlock({art:$.art},351); continue;
|
|
2739
|
+
case ':': this.c(352); continue;
|
|
2740
|
+
default: this.e(); continue;
|
|
2741
|
+
}
|
|
2742
|
+
case 351: switch(this.lk()) {
|
|
2743
|
+
case 'not': case 'null': this.nullability({art:$.art},0); continue;
|
|
2744
|
+
default: this.gr([';']); continue;
|
|
2745
|
+
}
|
|
2746
|
+
case 352: switch(this.lk()) {
|
|
2747
|
+
case '{': case 'many': case 'type': case 'array': case 'localized': case 'association': case 'composition': this.lP() && this.typeExpression({art:$.art},0); continue;
|
|
2748
|
+
case 'Id': if(this.simplePath(_={category:'artref'},353)) {ref=_.ref; $.art.type = ref; } continue;
|
|
2749
|
+
default: this.ei(); continue;
|
|
2750
|
+
}
|
|
2751
|
+
case 353: switch(this.l()) {
|
|
2752
|
+
case '(': case ':': this.typeRefOptArgs({art:$.art},354,408); continue;
|
|
2753
|
+
case ',': case '{': this.s=359;{ $.art.includes = [ $.art.type ]; delete $.art.type; } continue;
|
|
2754
|
+
default: this.s=354; continue;
|
|
2755
|
+
}
|
|
2756
|
+
case 354: switch(this.lk()) {
|
|
2757
|
+
case 'not': case 'null': this.nullability({art:$.art},355); continue;
|
|
2758
|
+
default: this.s=355; continue;
|
|
2759
|
+
}
|
|
2760
|
+
case 355: this.s=356;{ this.docComment( $.art ); } continue;
|
|
2761
|
+
case 356: switch(this.l()) {
|
|
2762
|
+
case '@': this.annoAssignStd({art:$.art},356); continue;
|
|
2763
|
+
default: this.s=357; continue;
|
|
2764
|
+
}
|
|
2765
|
+
case 357: switch(this.lk()) {
|
|
2766
|
+
case 'enum': this.enumSymbolsBlock({art:$.art},358); continue;
|
|
2767
|
+
default: this.s=358; continue;
|
|
2768
|
+
}
|
|
2769
|
+
case 358: switch(this.lk()) {
|
|
2770
|
+
case 'not': case 'null': case 'default': this.nullabilityAndDefault({art:$.art},0); continue;
|
|
2771
|
+
default: this.gr([';']); continue;
|
|
2772
|
+
}
|
|
2773
|
+
case 359: switch(this.l()) {
|
|
2774
|
+
case ',': this.c(360); continue;
|
|
2775
|
+
default: this.s=362; continue;
|
|
2776
|
+
}
|
|
2777
|
+
case 360: switch(this.l()) {
|
|
2778
|
+
case 'Id': if(this.simplePath(_={category:'artref'},361)) {ref=_.ref; $.art.includes.push( ref ); } continue;
|
|
2779
|
+
default: this.s=362; continue;
|
|
2780
|
+
}
|
|
2781
|
+
case 361: switch(this.l()) {
|
|
2782
|
+
case ',': this.c(360); continue;
|
|
2783
|
+
case '{': this.s=362; continue;
|
|
2784
|
+
default: this.e(); continue;
|
|
2785
|
+
}
|
|
2786
|
+
case 362: this.elementsBlock({art:$.art},363); continue;
|
|
2787
|
+
case 363: switch(this.lk()) {
|
|
2788
|
+
case 'not': case 'null': this.nullability({art:$.art},0); continue;
|
|
2789
|
+
default: this.gr([';']); continue;
|
|
2790
|
+
}
|
|
2791
|
+
default: return this.exit_();
|
|
2792
|
+
}
|
|
2793
|
+
}
|
|
2794
|
+
typeExpression($,$next) {
|
|
2795
|
+
this.rule_(365,$next);
|
|
2796
|
+
let assoc; let card; let target; let cond; let _;
|
|
2797
|
+
for(;;) switch(this.s) {
|
|
2798
|
+
case 365: switch(this.lk()) {
|
|
2799
|
+
case '{': this.elementsBlock({art:$.art},366); continue;
|
|
2800
|
+
case 'Id': this.typeRefOptArgs({art:$.art},367); continue;
|
|
2801
|
+
case 'type': this.lP() && this.typeTypeOf({art:$.art},367); continue;
|
|
2802
|
+
case 'localized': if(this.ckP(372,['Id'])) { $.art.localized = this.valueWithLocation( true ); } continue;
|
|
2803
|
+
case 'association': if(this.ckP(375,['[','to'])) assoc=this.lb(); continue;
|
|
2804
|
+
case 'composition': if(this.ckP(382,['[','of'])) assoc=this.lb(); continue;
|
|
2805
|
+
case 'array': this.ckP(390,['of']); continue;
|
|
2806
|
+
case 'many': if(this.ckP(391,['Id','{'])) { $.art.items = { location: this.lb().location }; } continue;
|
|
2807
|
+
default: this.ei(); continue;
|
|
2808
|
+
}
|
|
2809
|
+
case 366: switch(this.lk()) {
|
|
2810
|
+
case 'not': case 'null': this.nullability({art:$.art},0); continue;
|
|
2811
|
+
default: this.gr([]); continue;
|
|
2812
|
+
}
|
|
2813
|
+
case 367: switch(this.lk()) {
|
|
2814
|
+
case 'not': case 'null': this.nullability({art:$.art},368); continue;
|
|
2815
|
+
default: this.s=368; continue;
|
|
2816
|
+
}
|
|
2817
|
+
case 368: this.s=369;{ this.docComment( $.art ); } continue;
|
|
2818
|
+
case 369: switch(this.l()) {
|
|
2819
|
+
case '@': this.annoAssignStd({art:$.art},369); continue;
|
|
2820
|
+
default: this.s=370; continue;
|
|
2821
|
+
}
|
|
2822
|
+
case 370: switch(this.lk()) {
|
|
2823
|
+
case 'enum': this.enumSymbolsBlock({art:$.art},371); continue;
|
|
2824
|
+
default: this.s=371; continue;
|
|
2825
|
+
}
|
|
2826
|
+
case 371: switch(this.lk()) {
|
|
2827
|
+
case 'not': case 'null': case 'default': this.nullabilityAndDefault({art:$.art},0); continue;
|
|
2828
|
+
default: this.gr([]); continue;
|
|
2829
|
+
}
|
|
2830
|
+
case 372: if(this.typeRefOptArgs({art:$.art},373)) { this.docComment( $.art ); } continue;
|
|
2831
|
+
case 373: switch(this.l()) {
|
|
2832
|
+
case '@': this.annoAssignStd({art:$.art},373); continue;
|
|
2833
|
+
default: this.s=374; continue;
|
|
2834
|
+
}
|
|
2835
|
+
case 374: switch(this.lk()) {
|
|
2836
|
+
case 'not': case 'null': case 'default': this.nullabilityAndDefault({art:$.art},0); continue;
|
|
2837
|
+
default: this.gr([]); continue;
|
|
2838
|
+
}
|
|
2839
|
+
case 375: switch(this.l()) {
|
|
2840
|
+
case '[': this.cardinality({art:$.art},376); continue;
|
|
2841
|
+
default: this.s=376; continue;
|
|
2842
|
+
}
|
|
2843
|
+
case 376: this.mk(377,'to'); continue;
|
|
2844
|
+
case 377: switch(this.lk()) {
|
|
2845
|
+
case 'one': case 'many': if(this.ckP(378,['Id'])) card=this.lb(); continue;
|
|
2846
|
+
default: this.s=378; continue;
|
|
2847
|
+
}
|
|
2848
|
+
case 378: if(this.simplePath(_={category:'artref'},379)) {target=_.ref; this.setAssocAndComposition( $.art, assoc, card, target ); } continue;
|
|
2849
|
+
case 379: switch(this.lk()) {
|
|
2850
|
+
case 'on': this.ck(380); continue;
|
|
2851
|
+
case '{': this.foreignKeysBlock({art:$.art},381); continue;
|
|
2852
|
+
default: this.s=381; continue;
|
|
2853
|
+
}
|
|
2854
|
+
case 380: if(this.condition(_={},0)) {cond=_.expr; $.art.on = cond; } continue;
|
|
2855
|
+
case 381: switch(this.lk()) {
|
|
2856
|
+
case 'not': case 'null': case 'default': this.nullabilityAndDefault({art:$.art},0); continue;
|
|
2857
|
+
default: this.gr([]); continue;
|
|
2858
|
+
}
|
|
2859
|
+
case 382: switch(this.l()) {
|
|
2860
|
+
case '[': this.cardinality({art:$.art},383); continue;
|
|
2861
|
+
default: this.s=383; continue;
|
|
2862
|
+
}
|
|
2863
|
+
case 383: this.mk(384,'of'); continue;
|
|
2864
|
+
case 384: switch(this.lk()) {
|
|
2865
|
+
case 'one': case 'many': if(this.ckP(385,['Id','{'])) card=this.lb(); continue;
|
|
2866
|
+
default: this.s=385; continue;
|
|
2867
|
+
}
|
|
2868
|
+
case 385: switch(this.l()) {
|
|
2869
|
+
case 'Id': if(this.simplePath(_={category:'artref'},386)) {target=_.ref; this.setAssocAndComposition( $.art, assoc, card, target ); } continue;
|
|
2870
|
+
case '{': this.s=389;{ target = {}; this.setAssocAndComposition( $.art, assoc, card, target ); } continue;
|
|
2871
|
+
default: this.e(); continue;
|
|
2872
|
+
}
|
|
2873
|
+
case 386: switch(this.lk()) {
|
|
2874
|
+
case 'on': this.ck(387); continue;
|
|
2875
|
+
case '{': this.foreignKeysBlock({art:$.art},388); continue;
|
|
2876
|
+
default: this.s=388; continue;
|
|
2877
|
+
}
|
|
2878
|
+
case 387: if(this.condition(_={},0)) {cond=_.expr; $.art.on = cond; } continue;
|
|
2879
|
+
case 388: switch(this.lk()) {
|
|
2880
|
+
case 'not': case 'null': case 'default': this.nullabilityAndDefault({art:$.art},0); continue;
|
|
2881
|
+
default: this.gr([]); continue;
|
|
2882
|
+
}
|
|
2883
|
+
case 389: if(this.elementsBlock({art:target},0)) { target.location = target.elements[Symbol.for('cds.$location')]; } continue;
|
|
2884
|
+
case 390: if(this.mk(391,'of')) { $.art.items = { location: this.locationOfPrevTokens( 2 ) }; } continue;
|
|
2885
|
+
case 391: switch(this.lk()) {
|
|
2886
|
+
case '{': this.elementsBlock({art:$.art.items},392); continue;
|
|
2887
|
+
case 'Id': this.typeRefOptArgs({art:$.art.items},393); continue;
|
|
2888
|
+
case 'type': this.lP() && this.typeTypeOf({art:$.art.items},393); continue;
|
|
2889
|
+
default: this.ei(); continue;
|
|
2890
|
+
}
|
|
2891
|
+
case 392: switch(this.lk()) {
|
|
2892
|
+
case 'not': case 'null': this.nullability({art:$.art.items},0); continue;
|
|
2893
|
+
default: this.gr([]); continue;
|
|
2894
|
+
}
|
|
2895
|
+
case 393: switch(this.lk()) {
|
|
2896
|
+
case 'not': case 'null': this.nullability({art:$.art.items},394); continue;
|
|
2897
|
+
default: this.s=394; continue;
|
|
2898
|
+
}
|
|
2899
|
+
case 394: this.s=395;{ this.docComment( $.art.items ); } continue;
|
|
2900
|
+
case 395: switch(this.l()) {
|
|
2901
|
+
case '@': this.annoAssignStd({art:$.art.items},395); continue;
|
|
2902
|
+
default: this.s=396; continue;
|
|
2903
|
+
}
|
|
2904
|
+
case 396: switch(this.lk()) {
|
|
2905
|
+
case 'enum': this.enumSymbolsBlock({art:$.art.items},397); continue;
|
|
2906
|
+
default: this.s=397; continue;
|
|
2907
|
+
}
|
|
2908
|
+
case 397: switch(this.lk()) {
|
|
2909
|
+
case 'not': case 'null': this.nullability({art:$.art.items},0); continue;
|
|
2910
|
+
default: this.gr([]); continue;
|
|
2911
|
+
}
|
|
2912
|
+
default: return this.exit_();
|
|
2913
|
+
}
|
|
2914
|
+
}
|
|
2915
|
+
typeTypeOf($,$next) {
|
|
2916
|
+
this.rule_(399,$next);
|
|
2917
|
+
let location;
|
|
2918
|
+
let type; let _;
|
|
2919
|
+
for(;;) switch(this.s) {
|
|
2920
|
+
case 399: this.mk(400,'type'); continue;
|
|
2921
|
+
case 400: if(this.mk(401,'of')) { location = this.locationOfPrevTokens( 2 ); } continue;
|
|
2922
|
+
case 401: if(this.simplePath(_={category:'ref'},402)) {type=_.ref; $.art.type = type; } continue;
|
|
2923
|
+
case 402: switch(this.l()) {
|
|
2924
|
+
case ':': if(this.c(403)) { type.scope = type.path.length; } continue;
|
|
2925
|
+
default: if(this.gr(['@'])) { type.scope = 'typeOf'; type.path.unshift( { id: 'type of', location } ); } continue;
|
|
2926
|
+
}
|
|
2927
|
+
case 403: if(this.miA(404,'ref')) { type.path.push( this.identAst() ); } continue;
|
|
2928
|
+
case 404: switch(this.l()) {
|
|
2929
|
+
case '.': this.c(405); continue;
|
|
2930
|
+
default: this.gr(['@']); continue;
|
|
2931
|
+
}
|
|
2932
|
+
case 405: if(this.miA(404,'ref')) { type.path.push( this.identAst() ); } continue;
|
|
2933
|
+
default: return this.exit_();
|
|
2934
|
+
}
|
|
2935
|
+
}
|
|
2936
|
+
typeRefOptArgs($,$next,$startState) {
|
|
2937
|
+
this.rule_($startState??407,$next);
|
|
2938
|
+
let type=$.art.type;
|
|
2939
|
+
let open; let tok; let _;
|
|
2940
|
+
for(;;) switch(this.s) {
|
|
2941
|
+
case 407: if(this.simplePath(_={category:'artref'},408)) {type=_.ref; $.art.type = type; } continue;
|
|
2942
|
+
case 408: switch(this.l()) {
|
|
2943
|
+
case ':': if(this.c(409)) { type.scope = type.path.length; } continue;
|
|
2944
|
+
case '(': if(this.c(412)) open=this.lb(); continue;
|
|
2945
|
+
default: this.gr([]); continue;
|
|
2946
|
+
}
|
|
2947
|
+
case 409: if(this.miA(410,'ref')) { type.path.push( this.identAst() ); } continue;
|
|
2948
|
+
case 410: switch(this.l()) {
|
|
2949
|
+
case '.': this.c(411); continue;
|
|
2950
|
+
default: this.gr([]); continue;
|
|
2951
|
+
}
|
|
2952
|
+
case 411: if(this.miA(410,'ref')) { type.path.push( this.identAst() ); } continue;
|
|
2953
|
+
case 412: switch(this.lk()) {
|
|
2954
|
+
case 'Number': if(this.c(413)) { $.art.$typeArgs = this.createArray( open );
|
|
2955
|
+
$.art.$typeArgs.push( this.unsignedIntegerLiteral() ); } continue;
|
|
2956
|
+
case 'Id': this.s=415;{ $.art.$typeArgs = this.createDict( open ); } continue;
|
|
2957
|
+
default: this.ei(); continue;
|
|
2958
|
+
}
|
|
2959
|
+
case 413: switch(this.l()) {
|
|
2960
|
+
case ',': this.c(414); continue;
|
|
2961
|
+
default: this.s=417; continue;
|
|
2962
|
+
}
|
|
2963
|
+
case 414: switch(this.lk()) {
|
|
2964
|
+
case 'Number': if(this.c(413)) { $.art.$typeArgs.push( this.unsignedIntegerLiteral() ); } continue;
|
|
2965
|
+
case 'floating': case 'variable': if(this.ck(413)) {tok=this.lb(); $.art.$typeArgs.push( { literal: 'string', val: tok.keyword, location: tok.location } ); } continue;
|
|
2966
|
+
case ')': this.s=417; continue;
|
|
2967
|
+
default: this.e(); continue;
|
|
2968
|
+
}
|
|
2969
|
+
case 415: switch(this.l()) {
|
|
2970
|
+
case 'Id': this.typeNamedArg({art:$.art},416); continue;
|
|
2971
|
+
default: this.s=417; continue;
|
|
2972
|
+
}
|
|
2973
|
+
case 416: switch(this.l()) {
|
|
2974
|
+
case ',': this.c(415); continue;
|
|
2975
|
+
case ')': this.s=417; continue;
|
|
2976
|
+
default: this.e(); continue;
|
|
2977
|
+
}
|
|
2978
|
+
case 417: if(this.m(0,')')) { this.finalizeDictOrArray( $.art.$typeArgs ); } continue;
|
|
2979
|
+
default: return this.exit_();
|
|
2980
|
+
}
|
|
2981
|
+
}
|
|
2982
|
+
typeNamedArgsList($,$next) {
|
|
2983
|
+
this.rule_(419,$next);
|
|
2984
|
+
for(;;) switch(this.s) {
|
|
2985
|
+
case 419: if(this.m(420,'(')) { $.art.$typeArgs = this.createDict(); } continue;
|
|
2986
|
+
case 420: switch(this.l()) {
|
|
2987
|
+
case 'Id': this.typeNamedArg({art:$.art},421); continue;
|
|
2988
|
+
default: this.s=422; continue;
|
|
2989
|
+
}
|
|
2990
|
+
case 421: switch(this.l()) {
|
|
2991
|
+
case ',': this.c(420); continue;
|
|
2992
|
+
case ')': this.s=422; continue;
|
|
2993
|
+
default: this.e(); continue;
|
|
2994
|
+
}
|
|
2995
|
+
case 422: if(this.m(0,')')) { this.finalizeDictOrArray( $.art.$typeArgs ); } continue;
|
|
2996
|
+
default: return this.exit_();
|
|
2997
|
+
}
|
|
2998
|
+
}
|
|
2999
|
+
typeNamedArg($,$next) {
|
|
3000
|
+
this.rule_(424,$next);
|
|
3001
|
+
let name; let tok;
|
|
3002
|
+
for(;;) switch(this.s) {
|
|
3003
|
+
case 424: if(this.mi(425,'typeparamname')) name=this.lb(); continue;
|
|
3004
|
+
case 425: this.m(426,':'); continue;
|
|
3005
|
+
case 426: switch(this.lk()) {
|
|
3006
|
+
case 'Number': if(this.c(0)) { this.setTypeFacet( $.art, name, this.unsignedIntegerLiteral() ); } continue;
|
|
3007
|
+
case 'floating': case 'variable': if(this.ck(0)) {tok=this.lb(); this.setTypeFacet( $.art, name, { literal: 'string', val: tok.keyword, location: tok.location } ); } continue;
|
|
3008
|
+
default: this.e(); continue;
|
|
3009
|
+
}
|
|
3010
|
+
default: return this.exit_();
|
|
3011
|
+
}
|
|
3012
|
+
}
|
|
3013
|
+
cardinality($,$next) {
|
|
3014
|
+
this.rule_(428,$next);
|
|
3015
|
+
let card={};
|
|
3016
|
+
for(;;) switch(this.s) {
|
|
3017
|
+
case 428: this.m(429,'['); continue;
|
|
3018
|
+
case 429: switch(this.l()) {
|
|
3019
|
+
case '*': if(this.c(430)) { card.targetMax = this.valueWithLocation(); } continue;
|
|
3020
|
+
case 'Number': if(this.c(432)) { card.targetMax = this.unsignedIntegerLiteral(); } continue;
|
|
3021
|
+
default: this.s=434;{ card.targetMax = this.valueWithLocation( '*' ); } continue;
|
|
3022
|
+
}
|
|
3023
|
+
case 430: switch(this.l()) {
|
|
3024
|
+
case ',': this.c(431); continue;
|
|
3025
|
+
default: this.s=434; continue;
|
|
3026
|
+
}
|
|
3027
|
+
case 431: this.targetCardinality({card,atAlt:false},434); continue;
|
|
3028
|
+
case 432: switch(this.l()) {
|
|
3029
|
+
case ',': this.c(433); continue;
|
|
3030
|
+
case '..': this.targetCardinality({card,atAlt:true},434,437); continue;
|
|
3031
|
+
default: this.s=434; continue;
|
|
3032
|
+
}
|
|
3033
|
+
case 433: this.targetCardinality({card,atAlt:false},434); continue;
|
|
3034
|
+
case 434: this.m(0,']'); continue;
|
|
3035
|
+
default:
|
|
3036
|
+
$.art.cardinality = this.attachLocation(card);
|
|
3037
|
+
return this.exit_();
|
|
3038
|
+
}
|
|
3039
|
+
}
|
|
3040
|
+
targetCardinality($,$next,$startState) {
|
|
3041
|
+
this.rule_($startState??436,$next);
|
|
3042
|
+
{ if (!$.atAlt) $.card.sourceMax = $.card.targetMax; }
|
|
3043
|
+
for(;;) switch(this.s) {
|
|
3044
|
+
case 436: switch(this.l()) {
|
|
3045
|
+
case '*': if(this.c(0)) { $.card.targetMax = this.valueWithLocation(); } continue;
|
|
3046
|
+
case 'Number': if(this.c(437)) { $.card.targetMax = this.unsignedIntegerLiteral(); } continue;
|
|
3047
|
+
default: this.e(); continue;
|
|
3048
|
+
}
|
|
3049
|
+
case 437: switch(this.l()) {
|
|
3050
|
+
case '..': if(this.c(438)) { $.card.targetMin = $.card.targetMax; } continue;
|
|
3051
|
+
default: this.gr([']']); continue;
|
|
3052
|
+
}
|
|
3053
|
+
case 438: switch(this.l()) {
|
|
3054
|
+
case '*': if(this.c(0)) { $.card.targetMax = this.valueWithLocation(); } continue;
|
|
3055
|
+
case 'Number': if(this.c(0)) { $.card.targetMax = this.unsignedIntegerLiteral(); } continue;
|
|
3056
|
+
default: this.e(); continue;
|
|
3057
|
+
}
|
|
3058
|
+
default: return this.exit_();
|
|
3059
|
+
}
|
|
3060
|
+
}
|
|
3061
|
+
nullabilityAndDefault($,$next) {
|
|
3062
|
+
this.rule_(440,$next);
|
|
3063
|
+
let expr; let _;
|
|
3064
|
+
for(;;) switch(this.s) {
|
|
3065
|
+
case 440: switch(this.lk()) {
|
|
3066
|
+
case 'not': case 'null': this.nullability({art:$.art},441); continue;
|
|
3067
|
+
case 'default': this.ck(443); continue;
|
|
3068
|
+
default: this.e(); continue;
|
|
3069
|
+
}
|
|
3070
|
+
case 441: switch(this.lk()) {
|
|
3071
|
+
case 'default': this.ck(442); continue;
|
|
3072
|
+
default: this.gr([]); continue;
|
|
3073
|
+
}
|
|
3074
|
+
case 442: if(this.expression(_={},0)) {expr=_.expr; $.art.default = expr; } continue;
|
|
3075
|
+
case 443: if(this.expression(_={},444)) {expr=_.expr; $.art.default = expr; } continue;
|
|
3076
|
+
case 444: switch(this.lk()) {
|
|
3077
|
+
case 'not': case 'null': this.nullability({art:$.art},0); continue;
|
|
3078
|
+
default: this.gr([]); continue;
|
|
3079
|
+
}
|
|
3080
|
+
default: return this.exit_();
|
|
3081
|
+
}
|
|
3082
|
+
}
|
|
3083
|
+
nullability($,$next) {
|
|
3084
|
+
this.rule_(446,$next);
|
|
3085
|
+
for(;;) switch(this.s) {
|
|
3086
|
+
case 446: switch(this.lk()) {
|
|
3087
|
+
case 'null': if(this.ck(0)) { this.setNullability( $.art, false ); } continue;
|
|
3088
|
+
case 'not': this.ck(447); continue;
|
|
3089
|
+
default: this.e(); continue;
|
|
3090
|
+
}
|
|
3091
|
+
case 447: if(this.mk(0,'null')) { this.setNullability( $.art, true, this.locationOfPrevTokens( 2 ) ); } continue;
|
|
3092
|
+
default: return this.exit_();
|
|
3093
|
+
}
|
|
3094
|
+
}
|
|
3095
|
+
queryEOF($,$next) {
|
|
3096
|
+
$.query??=undefined;
|
|
3097
|
+
this.rule_(449,$next);
|
|
3098
|
+
let _;
|
|
3099
|
+
for(;;) switch(this.s) {
|
|
3100
|
+
case 449: if(this.queryExpression(_={},450)) $.query=_.expr; continue;
|
|
3101
|
+
case 450: switch(this.l()) {
|
|
3102
|
+
case ';': this.c(451); continue;
|
|
3103
|
+
default: this.s=451; continue;
|
|
3104
|
+
}
|
|
3105
|
+
case 451: this.m(0,'EOF'); continue;
|
|
3106
|
+
default: return this.exit_();
|
|
3107
|
+
}
|
|
3108
|
+
}
|
|
3109
|
+
projectionSpec($,$next) {
|
|
3110
|
+
$.query??={};
|
|
3111
|
+
this.rule_(453,$next);
|
|
3112
|
+
let tab; let _;
|
|
3113
|
+
for(;;) switch(this.s) {
|
|
3114
|
+
case 453: if(this.mk(454,'projection')) { $.query = { op: this.valueWithLocation( 'SELECT' ) }; } continue;
|
|
3115
|
+
case 454: this.mk(455,'on'); continue;
|
|
3116
|
+
case 455: if(this.fromRefWithOptAlias(_={},456)) {tab=_.expr; this.afterBrace();
|
|
3117
|
+
$.query.from = tab; } continue;
|
|
3118
|
+
case 456: switch(this.l()) {
|
|
3119
|
+
case '{': this.selectItemsList({query:$.query,clause:'columns',start:undefined},457); continue;
|
|
3120
|
+
default: this.s=457; continue;
|
|
3121
|
+
}
|
|
3122
|
+
case 457: switch(this.lk()) {
|
|
3123
|
+
case 'excluding': this.excludingClause({query:$.query},0); continue;
|
|
3124
|
+
default: this.gr([';']); continue;
|
|
3125
|
+
}
|
|
3126
|
+
default:
|
|
3127
|
+
this.attachLocation($.query);
|
|
3128
|
+
return this.exit_();
|
|
3129
|
+
}
|
|
3130
|
+
}
|
|
3131
|
+
queryExpression($,$next,$startState) {
|
|
3132
|
+
$.expr??={};
|
|
3133
|
+
this.rule_($startState??459,$next);
|
|
3134
|
+
let op; let quantifier;
|
|
3135
|
+
let query; let _;
|
|
3136
|
+
for(;;) switch(this.s) {
|
|
3137
|
+
case 459: switch(this.l()) {
|
|
3138
|
+
case '(': this.c(460); continue;
|
|
3139
|
+
case 'Id': if(this.selectQuery(_={},462)) $.expr=_.query; continue;
|
|
3140
|
+
default: this.e(); continue;
|
|
3141
|
+
}
|
|
3142
|
+
case 460: this.queryExpression($,461); continue;
|
|
3143
|
+
case 461: if(this.m(462,')')) { this.surroundByParens( $.expr ); } continue;
|
|
3144
|
+
case 462: switch(this.lk()) {
|
|
3145
|
+
case 'intersect': if(this.gp(466,4) && this.ck(463)) { op = this.valueWithLocation(); } continue;
|
|
3146
|
+
case 'minus': case 'except': if(this.gp(466,2) && this.ck(463)) { op = this.valueWithLocation(); } continue;
|
|
3147
|
+
case 'union': if(this.gp(466,2) && this.ck(464)) { op = this.valueWithLocation(); } continue;
|
|
3148
|
+
default: this.s=466; continue;
|
|
3149
|
+
}
|
|
3150
|
+
case 463: switch(this.lk()) {
|
|
3151
|
+
case 'distinct': if(this.ck(465)) { quantifier = this.valueWithLocation(); } continue;
|
|
3152
|
+
default: this.s=465; continue;
|
|
3153
|
+
}
|
|
3154
|
+
case 464: switch(this.lk()) {
|
|
3155
|
+
case 'all': case 'distinct': if(this.ck(465)) { quantifier = this.valueWithLocation(); } continue;
|
|
3156
|
+
default: this.s=465; continue;
|
|
3157
|
+
}
|
|
3158
|
+
case 465: if(this.queryExpression(_={},462)) {query=_.expr; if ($.expr.$parens || op.val !== $.expr.op.val || quantifier?.val !== $.expr.quantifier?.val) $.expr = { op, args: [$.expr], quantifier };
|
|
3159
|
+
quantifier = undefined;
|
|
3160
|
+
$.expr.args.push( query ); this.attachLocation( $.expr ); } continue;
|
|
3161
|
+
case 466: switch(this.lk()) {
|
|
3162
|
+
case 'limit': case 'order': if(this.gp(0,0,'post') && this.g(467)) { if ($.expr.$parens) { this.attachLocation( $.expr ); $.expr = { op: this.valueWithLocation( '$query', this.la() ), args: [ $.expr ] }; } } continue;
|
|
3163
|
+
default: this.gr([]); continue;
|
|
3164
|
+
}
|
|
3165
|
+
case 467: this.orderByLimitOffset({query:$.expr},0); continue;
|
|
3166
|
+
default:
|
|
3167
|
+
this.attachLocation( $.expr );
|
|
3168
|
+
return this.exit_();
|
|
3169
|
+
}
|
|
3170
|
+
}
|
|
3171
|
+
selectQuery($,$next) {
|
|
3172
|
+
$.query??={};
|
|
3173
|
+
this.rule_(469,$next);
|
|
3174
|
+
for(;;) switch(this.s) {
|
|
3175
|
+
case 469: if(this.mk(470,'select')) { $.query = { op: this.valueWithLocation( 'SELECT' ) }; } continue;
|
|
3176
|
+
case 470: switch(this.lk()) {
|
|
3177
|
+
case 'from': this.ck(471); continue;
|
|
3178
|
+
case 'all': case 'distinct': if(this.ckP(481,['Id','#','(','*','+','-',':','?','@','{','key','not','case','cast','null','true','false','Number','String','exists','QuotedLiteral'])) { $.query.quantifier = this.valueWithLocation(); } continue;
|
|
3179
|
+
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=481; continue;
|
|
3180
|
+
default: this.ei(); continue;
|
|
3181
|
+
}
|
|
3182
|
+
case 471: this.querySource({query:$.query},472); continue;
|
|
3183
|
+
case 472: switch(this.lk()) {
|
|
3184
|
+
case 'mixin': this.ck(473); continue;
|
|
3185
|
+
default: this.s=478; continue;
|
|
3186
|
+
}
|
|
3187
|
+
case 473: if(this.m(474,'{')) { $.query.mixin = this.createDict(); } continue;
|
|
3188
|
+
case 474: switch(this.l()) {
|
|
3189
|
+
case 'Id': this.mixinElementDef({outer:$.query},475); continue;
|
|
3190
|
+
default: this.s=476; continue;
|
|
3191
|
+
}
|
|
3192
|
+
case 475: switch(this.l()) {
|
|
3193
|
+
case ';': this.c(474); continue;
|
|
3194
|
+
case '}': this.s=476; continue;
|
|
3195
|
+
default: this.e(); continue;
|
|
3196
|
+
}
|
|
3197
|
+
case 476: if(this.m(477,'}')) { this.finalizeDictOrArray( $.query.mixin ); } continue;
|
|
3198
|
+
case 477: this.mk(478,'into'); continue;
|
|
3199
|
+
case 478: switch(this.lk()) {
|
|
3200
|
+
case 'all': case 'distinct': if(this.ck(479)) { $.query.quantifier = this.valueWithLocation(); } continue;
|
|
3201
|
+
default: this.s=479; continue;
|
|
3202
|
+
}
|
|
3203
|
+
case 479: switch(this.l()) {
|
|
3204
|
+
case '{': this.selectItemsList({query:$.query,clause:'columns',start:undefined},480); continue;
|
|
3205
|
+
default: this.s=480; continue;
|
|
3206
|
+
}
|
|
3207
|
+
case 480: switch(this.lk()) {
|
|
3208
|
+
case 'excluding': this.excludingClause({query:$.query},486); continue;
|
|
3209
|
+
default: this.s=486; continue;
|
|
3210
|
+
}
|
|
3211
|
+
case 481: switch(this.l()) {
|
|
3212
|
+
case '*': if(this.c(482)) { $.query.columns = [ this.valueWithLocation() ]; } continue;
|
|
3213
|
+
case 'Id': case '#': case '(': case '+': case '-': case ':': case '?': case '@': case '{': case 'Number': case 'String': case 'QuotedLiteral': this.selectItemDef({columns:($.query.columns = [])},482); continue;
|
|
3214
|
+
default: this.e(); continue;
|
|
3215
|
+
}
|
|
3216
|
+
case 482: switch(this.l()) {
|
|
3217
|
+
case ',': this.c(483); continue;
|
|
3218
|
+
default: this.s=484; continue;
|
|
3219
|
+
}
|
|
3220
|
+
case 483: switch(this.l()) {
|
|
3221
|
+
case '*': if(this.c(482)) { $.query.columns.push( this.valueWithLocation() ); } continue;
|
|
3222
|
+
case 'Id': case '#': case '(': case '+': case '-': case ':': case '?': case '@': case '{': case 'Number': case 'String': case 'QuotedLiteral': this.selectItemDef({columns:$.query.columns},482); continue;
|
|
3223
|
+
default: this.e(); continue;
|
|
3224
|
+
}
|
|
3225
|
+
case 484: this.mk(485,'from'); continue;
|
|
3226
|
+
case 485: this.querySource({query:$.query},486); continue;
|
|
3227
|
+
case 486: switch(this.lk()) {
|
|
3228
|
+
case 'group': case 'where': case 'having': this.whereGroupByHaving({query:$.query},0); continue;
|
|
3229
|
+
default: this.gr(['limit','minus','order','union','except','intersect']); continue;
|
|
3230
|
+
}
|
|
3231
|
+
default:
|
|
3232
|
+
this.attachLocation($.query);
|
|
3233
|
+
return this.exit_();
|
|
3234
|
+
}
|
|
3235
|
+
}
|
|
3236
|
+
querySource($,$next) {
|
|
3237
|
+
this.rule_(488,$next);
|
|
3238
|
+
let tab; let _;
|
|
3239
|
+
for(;;) switch(this.s) {
|
|
3240
|
+
case 488: if(this.tableExpression(_={},489)) {tab=_.expr; $.query.from = tab; } continue;
|
|
3241
|
+
case 489: switch(this.l()) {
|
|
3242
|
+
case ',': this.s=490;{ const { location } = this.la();
|
|
3243
|
+
$.query.from = { op: { val: 'join', location }, join: { val: 'cross', location }, args: [tab] }; } continue;
|
|
3244
|
+
default: this.gr(['group','limit','minus','order','union','where','except','having','intersect']); continue;
|
|
3245
|
+
}
|
|
3246
|
+
case 490: switch(this.l()) {
|
|
3247
|
+
case ',': this.c(491); continue;
|
|
3248
|
+
default: this.gr(['group','limit','minus','order','union','where','except','having','intersect']); continue;
|
|
3249
|
+
}
|
|
3250
|
+
case 491: if(this.tableExpression(_={},490)) {tab=_.expr; $.query.from.args.push( tab ); } continue;
|
|
3251
|
+
case 0:
|
|
3252
|
+
this.attachLocation($.query.from);
|
|
3253
|
+
default: return this.exit_();
|
|
3254
|
+
}
|
|
3255
|
+
}
|
|
3256
|
+
tableExpression($,$next,$startState) {
|
|
3257
|
+
$.expr??=undefined;
|
|
3258
|
+
this.rule_($startState??493,$next);
|
|
3259
|
+
let join; let tab; let card; let cond; let _;
|
|
3260
|
+
for(;;) switch(this.s) {
|
|
3261
|
+
case 493: switch(this.l()) {
|
|
3262
|
+
case '(': this.tableOrQueryParens($,494); continue;
|
|
3263
|
+
case 'Id': this.fromRefWithOptAlias($,495); continue;
|
|
3264
|
+
default: this.e(); continue;
|
|
3265
|
+
}
|
|
3266
|
+
case 494: this.s=495;{ $.expr = this.taggedIfQuery( $.expr ); } continue;
|
|
3267
|
+
case 495: switch(this.lk()) {
|
|
3268
|
+
case 'cross': if(this.ck(496)) join=this.lb(); continue;
|
|
3269
|
+
case 'inner': if(this.ck(499)) join=this.lb(); continue;
|
|
3270
|
+
case 'full': case 'left': case 'right': if(this.ck(498)) join=this.lb(); continue;
|
|
3271
|
+
case 'join': this.s=500; continue;
|
|
3272
|
+
default: if(this.gr([])) { join = undefined; } continue;
|
|
3273
|
+
}
|
|
3274
|
+
case 496: if(this.mk(497,'join')) { if ($.expr?.join?.val !== 'cross' || $.expr.$parens) $.expr = { op: this.valueWithLocation(), join: this.valueWithLocation( undefined, join ), args: [ $.expr ] }; } continue;
|
|
3275
|
+
case 497: switch(this.l()) {
|
|
3276
|
+
case '(': if(this.tableOrQueryParens(_={},495)) {tab=_.expr; $.expr.args.push( this.taggedIfQuery( tab ) );
|
|
3277
|
+
this.attachLocation( $.expr ); } continue;
|
|
3278
|
+
case 'Id': if(this.fromRefWithOptAlias(_={},495)) {tab=_.expr; $.expr.args.push( tab );
|
|
3279
|
+
this.attachLocation( $.expr ); } continue;
|
|
3280
|
+
default: this.e(); continue;
|
|
3281
|
+
}
|
|
3282
|
+
case 498: switch(this.lk()) {
|
|
3283
|
+
case 'outer': this.ck(499); continue;
|
|
3284
|
+
default: this.s=499; continue;
|
|
3285
|
+
}
|
|
3286
|
+
case 499: switch(this.lk()) {
|
|
3287
|
+
case 'one': case 'many': case 'exact': this.joinCardinality(card={},500); continue;
|
|
3288
|
+
default: this.s=500; continue;
|
|
3289
|
+
}
|
|
3290
|
+
case 500: if(this.mk(501,'join')) { $.expr = { op: this.valueWithLocation(), join: this.valueWithLocation( join?.keyword || 'inner', join ), args: [ $.expr ] }; if (card) $.expr.cardinality = card; card = undefined;
|
|
3291
|
+
join = undefined; } continue;
|
|
3292
|
+
case 501: if(this.tableExpression(_={},502)) {tab=_.expr; $.expr.args.push( tab ); this.attachLocation( $.expr ); } continue;
|
|
3293
|
+
case 502: this.mk(503,'on'); continue;
|
|
3294
|
+
case 503: if(this.condition(_={},495)) {cond=_.expr; $.expr.on = cond;
|
|
3295
|
+
this.attachLocation( $.expr ); } continue;
|
|
3296
|
+
default: return this.exit_();
|
|
3297
|
+
}
|
|
3298
|
+
}
|
|
3299
|
+
tableOrQueryParens($,$next) {
|
|
3300
|
+
$.expr??=undefined;
|
|
3301
|
+
this.rule_(505,$next);
|
|
3302
|
+
for(;;) switch(this.s) {
|
|
3303
|
+
case 505: this.m(506,'('); continue;
|
|
3304
|
+
case 506: switch(this.lk()) {
|
|
3305
|
+
case '(': this.tableOrQueryParens($,507); continue;
|
|
3306
|
+
case 'Id': this.ep(-2) && this.tableExpression($,508); continue;
|
|
3307
|
+
case 'select': this.ep(-1) && this.queryExpression($,508); continue;
|
|
3308
|
+
default: this.ei(); continue;
|
|
3309
|
+
}
|
|
3310
|
+
case 507: switch(this.lk()) {
|
|
3311
|
+
case 'full': case 'join': case 'left': case 'cross': case 'inner': case 'right': this.gp(508,-2,'post') && this.tableExpression($,508,494); continue;
|
|
3312
|
+
case 'limit': case 'minus': case 'order': case 'union': case 'except': case 'intersect': this.gp(508,-1,'post') && this.queryExpression($,508,462); continue;
|
|
3313
|
+
default: this.s=508; continue;
|
|
3314
|
+
}
|
|
3315
|
+
case 508: if(this.m(509,')')) { this.surroundByParens( $.expr ); } continue;
|
|
3316
|
+
case 509: switch(this.lk()) {
|
|
3317
|
+
case 'as': this.gp(0,-2,'none') && this.ck(510); continue;
|
|
3318
|
+
case 'Id': if(this.gc(0,'tableAlias') && this.ci(0,'FromAlias')) {this.setPrecInCallingRule(); $.expr = this.taggedIfQuery( $.expr ); $.expr.name = this.fragileAlias(); } continue;
|
|
3319
|
+
default: if(this.gi(0,['full','join','left','cross','inner','right'])) { this.setPrecInCallingRule(); } continue;
|
|
3320
|
+
}
|
|
3321
|
+
case 510: if(this.mi(0,'FromAlias')) {this.setPrecInCallingRule(); $.expr = this.taggedIfQuery( $.expr ); $.expr.name = this.identAst(); } continue;
|
|
3322
|
+
default: return this.exit_();
|
|
3323
|
+
}
|
|
3324
|
+
}
|
|
3325
|
+
joinCardinality($,$next) {
|
|
3326
|
+
$.sourceMax??=undefined; $.targetMax??=undefined;
|
|
3327
|
+
this.rule_(512,$next);
|
|
3328
|
+
for(;;) switch(this.s) {
|
|
3329
|
+
case 512: switch(this.lk()) {
|
|
3330
|
+
case 'exact': if(this.ck(513)) { $.sourceMin = this.valueWithLocation( 1 ); } continue;
|
|
3331
|
+
case 'one': this.s=513; continue;
|
|
3332
|
+
case 'many': if(this.ck(514)) { $.sourceMax = this.valueWithLocation( '*' ); } continue;
|
|
3333
|
+
default: this.e(); continue;
|
|
3334
|
+
}
|
|
3335
|
+
case 513: if(this.mk(514,'one')) { $.sourceMax = this.valueWithLocation( 1 ); } continue;
|
|
3336
|
+
case 514: this.mk(515,'to'); continue;
|
|
3337
|
+
case 515: switch(this.lk()) {
|
|
3338
|
+
case 'exact': if(this.ck(516)) { $.targetMin = this.valueWithLocation( 1 ); } continue;
|
|
3339
|
+
case 'one': this.s=516; continue;
|
|
3340
|
+
case 'many': if(this.ck(0)) { $.targetMax = this.valueWithLocation( '*' ); } continue;
|
|
3341
|
+
default: this.e(); continue;
|
|
3342
|
+
}
|
|
3343
|
+
case 516: if(this.mk(0,'one')) { $.targetMax = this.valueWithLocation( 1 ); } continue;
|
|
3344
|
+
default:
|
|
3345
|
+
this.attachLocation( $ );
|
|
3346
|
+
return this.exit_();
|
|
3347
|
+
}
|
|
3348
|
+
}
|
|
3349
|
+
fromRefWithOptAlias($,$next) {
|
|
3350
|
+
$.expr??={ path: [] };
|
|
3351
|
+
this.rule_(518,$next);
|
|
3352
|
+
for(;;) switch(this.s) {
|
|
3353
|
+
case 518: this.fromPath({table:$.expr,category:'artref'},519); continue;
|
|
3354
|
+
case 519: switch(this.l()) {
|
|
3355
|
+
case ':': if(this.c(520)) { if (!$.expr.scope) $.expr.scope = $.expr.path.length; else {
|
|
3356
|
+
this.warning( 'syntax-invalid-path-separator', this.lb(),
|
|
3357
|
+
{ '#': 'colon', code: ':', newcode: '.' } );
|
|
3358
|
+
} } continue;
|
|
3359
|
+
default: this.s=521; continue;
|
|
3360
|
+
}
|
|
3361
|
+
case 520: this.fromPath({table:$.expr,category:'ref'},521); continue;
|
|
3362
|
+
case 521: switch(this.lk()) {
|
|
3363
|
+
case 'as': this.ck(522); continue;
|
|
3364
|
+
case 'Id': if(this.gc(0,'tableAlias') && this.ci(0,'FromAlias')) { $.expr.name = this.fragileAlias(); } continue;
|
|
3365
|
+
default: if(this.gi(0,[])) { this.classifyImplicitName( $.expr.scope ? 'FromElemImplicit' : 'FromImplicit', $.expr ); } continue;
|
|
3366
|
+
}
|
|
3367
|
+
case 522: if(this.mi(0,'FromAlias')) { $.expr.name = this.identAst(); } continue;
|
|
3368
|
+
default:
|
|
3369
|
+
this.attachLocation( $.expr );
|
|
3370
|
+
return this.exit_();
|
|
3371
|
+
}
|
|
3372
|
+
}
|
|
3373
|
+
fromPath($,$next) {
|
|
3374
|
+
this.rule_(524,$next);
|
|
3375
|
+
let pathItem;
|
|
3376
|
+
for(;;) switch(this.s) {
|
|
3377
|
+
case 524: if(this.mi(525,$.category)) { $.table.path.push( pathItem = this.identAst() ); } continue;
|
|
3378
|
+
case 525: switch(this.l()) {
|
|
3379
|
+
case '(': case '[': if(this.fromArgumentsAndFilter({pathStep:pathItem},526)) { pathItem = null; } continue;
|
|
3380
|
+
default: this.s=526; continue;
|
|
3381
|
+
}
|
|
3382
|
+
case 526: switch(this.l()) {
|
|
3383
|
+
case '.': if(this.c(527)) { if (!pathItem && !$.table.scope) {
|
|
3384
|
+
$.table.scope = $.table.path.length; $.category = 'ref';
|
|
3385
|
+
this.warning( 'syntax-invalid-path-separator', this.lb(),
|
|
3386
|
+
{ '#': 'dot', code: '.', newcode: ':' } );
|
|
3387
|
+
} } continue;
|
|
3388
|
+
default: this.gr(['Id','as']); continue;
|
|
3389
|
+
}
|
|
3390
|
+
case 527: if(this.miA(528,$.category)) { $.table.path.push( pathItem = this.identAst() ); } continue;
|
|
3391
|
+
case 528: switch(this.l()) {
|
|
3392
|
+
case '(': case '[': if(this.fromArgumentsAndFilter({pathStep:pathItem},526)) { pathItem = null; } continue;
|
|
3393
|
+
default: this.s=526; continue;
|
|
3394
|
+
}
|
|
3395
|
+
default:
|
|
3396
|
+
this.attachLocation( $.table.path );
|
|
3397
|
+
return this.exit_();
|
|
3398
|
+
}
|
|
3399
|
+
}
|
|
3400
|
+
fromArgumentsAndFilter($,$next) {
|
|
3401
|
+
this.rule_(530,$next);
|
|
3402
|
+
for(;;) switch(this.s) {
|
|
3403
|
+
case 530: switch(this.l()) {
|
|
3404
|
+
case '(': if(this.c(531)) { $.pathStep.args = this.createDict(); $.pathStep.$syntax = ':'; } continue;
|
|
3405
|
+
default: this.s=535; continue;
|
|
3406
|
+
}
|
|
3407
|
+
case 531: switch(this.lk()) {
|
|
3408
|
+
case 'Id': this.s=532; continue;
|
|
3409
|
+
default: this.ei(); continue;
|
|
3410
|
+
}
|
|
3411
|
+
case 532: switch(this.l()) {
|
|
3412
|
+
case 'Id': this.fromNamedArgument($,533); continue;
|
|
3413
|
+
default: this.s=534; continue;
|
|
3414
|
+
}
|
|
3415
|
+
case 533: switch(this.l()) {
|
|
3416
|
+
case ',': this.c(532); continue;
|
|
3417
|
+
case ')': this.s=534; continue;
|
|
3418
|
+
default: this.e(); continue;
|
|
3419
|
+
}
|
|
3420
|
+
case 534: this.m(535,')'); continue;
|
|
3421
|
+
case 535: switch(this.l()) {
|
|
3422
|
+
case '[': this.cardinalityAndFilter($,0); continue;
|
|
3423
|
+
default: this.gr(['Id','.','as']); continue;
|
|
3424
|
+
}
|
|
3425
|
+
default: return this.exit_();
|
|
3426
|
+
}
|
|
3427
|
+
}
|
|
3428
|
+
fromNamedArgument($,$next) {
|
|
3429
|
+
this.rule_(537,$next);
|
|
3430
|
+
let name; let expr; let _;
|
|
3431
|
+
for(;;) switch(this.s) {
|
|
3432
|
+
case 537: if(this.mi(538,'paramname')) name=this.lb(); continue;
|
|
3433
|
+
case 538: this.m(539,':'); continue;
|
|
3434
|
+
case 539: if(this.expression(_={},0)) {expr=_.expr; this.addDef( expr, $.pathStep, 'args', 0, this.identAst( name ) ); } continue;
|
|
3435
|
+
default: return this.exit_();
|
|
3436
|
+
}
|
|
3437
|
+
}
|
|
3438
|
+
cardinalityAndFilter($,$next) {
|
|
3439
|
+
this.rule_(541,$next);
|
|
3440
|
+
for(;;) switch(this.s) {
|
|
3441
|
+
case 541: this.m(542,'['); continue;
|
|
3442
|
+
case 542: switch(this.l()) {
|
|
3443
|
+
case 'Number': if(this.gc(544,'beforeColon') && this.c(543)) { $.pathStep.cardinality = { targetMax: this.unsignedIntegerLiteral(), location: this.lb().location }; } continue;
|
|
3444
|
+
default: this.s=544; continue;
|
|
3445
|
+
}
|
|
3446
|
+
case 543: this.m(544,':'); continue;
|
|
3447
|
+
case 544: this.filterClauses({pathStep:$.pathStep},545); continue;
|
|
3448
|
+
case 545: this.m(0,']'); continue;
|
|
3449
|
+
default: return this.exit_();
|
|
3450
|
+
}
|
|
3451
|
+
}
|
|
3452
|
+
filterClauses($,$next) {
|
|
3453
|
+
this.rule_(547,$next);
|
|
3454
|
+
let cond; let _;
|
|
3455
|
+
for(;;) switch(this.s) {
|
|
3456
|
+
case 547: switch(this.lk()) {
|
|
3457
|
+
case 'where': this.ck(548); continue;
|
|
3458
|
+
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=548; continue;
|
|
3459
|
+
case 'group': case 'limit': case 'order': case 'having': this.gP(549); continue;
|
|
3460
|
+
default: this.gi(549); continue;
|
|
3461
|
+
}
|
|
3462
|
+
case 548: if(this.condition(_={},549)) {cond=_.expr; $.pathStep.where = cond; } continue;
|
|
3463
|
+
case 549: switch(this.lk()) {
|
|
3464
|
+
case 'group': this.s=550;{ this.csnParseOnly('syntax-unexpected-sql-clause', 1, { keyword: 'group by' }); } continue;
|
|
3465
|
+
default: this.s=551; continue;
|
|
3466
|
+
}
|
|
3467
|
+
case 550: this.groupByClause({query:$.pathStep},551); continue;
|
|
3468
|
+
case 551: switch(this.lk()) {
|
|
3469
|
+
case 'having': if(this.ck(552)) { this.csnParseOnly('syntax-unexpected-sql-clause', -1, { keyword: 'having' }); } continue;
|
|
3470
|
+
default: this.s=553; continue;
|
|
3471
|
+
}
|
|
3472
|
+
case 552: if(this.condition(_={},553)) {cond=_.expr; $.pathStep.having = cond; } continue;
|
|
3473
|
+
case 553: switch(this.lk()) {
|
|
3474
|
+
case 'limit': case 'order': this.s=554;{ 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;
|
|
3475
|
+
default: this.gr([']']); continue;
|
|
3476
|
+
}
|
|
3477
|
+
case 554: this.orderByLimitOffset({query:$.pathStep},0); continue;
|
|
3478
|
+
default: return this.exit_();
|
|
3479
|
+
}
|
|
3480
|
+
}
|
|
3481
|
+
excludingClause($,$next) {
|
|
3482
|
+
this.rule_(556,$next);
|
|
3483
|
+
for(;;) switch(this.s) {
|
|
3484
|
+
case 556: this.mk(557,'excluding'); continue;
|
|
3485
|
+
case 557: if(this.m(558,'{')) { $.query.excludingDict = this.createDict(); } continue;
|
|
3486
|
+
case 558: switch(this.l()) {
|
|
3487
|
+
case 'Id': this.s=559; continue;
|
|
3488
|
+
default: this.e(); continue;
|
|
3489
|
+
}
|
|
3490
|
+
case 559: switch(this.l()) {
|
|
3491
|
+
case 'Id': if(this.ciA(560,'ref')) { this.addDef( { location: this.lb().location }, $.query, 'excludingDict', '', this.identAst() ); } continue;
|
|
3492
|
+
default: this.s=561; continue;
|
|
3493
|
+
}
|
|
3494
|
+
case 560: switch(this.l()) {
|
|
3495
|
+
case ',': this.c(559); continue;
|
|
3496
|
+
case '}': this.s=561; continue;
|
|
3497
|
+
default: this.e(); continue;
|
|
3498
|
+
}
|
|
3499
|
+
case 561: if(this.m(0,'}')) {this.afterBrace(); this.finalizeDictOrArray( $.query.excludingDict ); } continue;
|
|
3500
|
+
default: return this.exit_();
|
|
3501
|
+
}
|
|
3502
|
+
}
|
|
3503
|
+
selectItemsList($,$next) {
|
|
3504
|
+
this.rule_(563,$next);
|
|
3505
|
+
for(;;) switch(this.s) {
|
|
3506
|
+
case 563: if(this.m(564,'{')) { $.query[$.clause] = this.createArray( $.start ); } continue;
|
|
3507
|
+
case 564: switch(this.l()) {
|
|
3508
|
+
case '*': if(this.c(565)) { $.query[$.clause].push( this.valueWithLocation() ); } continue;
|
|
3509
|
+
case 'Id': case '#': case '(': case '+': case '-': case ':': case '?': case '@': case '{': case 'Number': case 'String': case 'QuotedLiteral': this.selectItemDef({columns:$.query[$.clause]},565); continue;
|
|
3510
|
+
default: this.s=566; continue;
|
|
3511
|
+
}
|
|
3512
|
+
case 565: switch(this.l()) {
|
|
3513
|
+
case ',': this.c(564); continue;
|
|
3514
|
+
case '}': this.s=566; continue;
|
|
3515
|
+
default: this.e(); continue;
|
|
3516
|
+
}
|
|
3517
|
+
case 566: if(this.m(0,'}')) {this.afterBrace(); this.finalizeDictOrArray( $.query[$.clause] ); } continue;
|
|
3518
|
+
default: return this.exit_();
|
|
3519
|
+
}
|
|
3520
|
+
}
|
|
3521
|
+
selectItemDef($,$next) {
|
|
3522
|
+
this.rule_(568,$next);
|
|
3523
|
+
let art=new XsnArtifact(); let alias;
|
|
3524
|
+
let expr; let as; let target; let cond; let assoc; let card; let _;
|
|
3525
|
+
{ $.columns.push( art );
|
|
3526
|
+
this.docComment( art ); }
|
|
3527
|
+
for(;;) switch(this.s) {
|
|
3528
|
+
case 568: switch(this.l()) {
|
|
3529
|
+
case '@': this.annoAssignCol({art},568); continue;
|
|
3530
|
+
default: this.s=569; continue;
|
|
3531
|
+
}
|
|
3532
|
+
case 569: switch(this.lk()) {
|
|
3533
|
+
case 'virtual': if(this.ckP(570,['Id','#','(','+','-',':','?','{','key','not','case','cast','null','true','false','Number','String','exists','QuotedLiteral'])) { art.virtual = this.valueWithLocation( true ); } continue;
|
|
3534
|
+
default: this.s=570; continue;
|
|
3535
|
+
}
|
|
3536
|
+
case 570: switch(this.lk()) {
|
|
3537
|
+
case 'key': if(this.ck(571)) { art.key = this.valueWithLocation( true ); } continue;
|
|
3538
|
+
default: this.s=571; continue;
|
|
3539
|
+
}
|
|
3540
|
+
case 571: switch(this.l()) {
|
|
3541
|
+
case 'Id': case '#': case '(': case '+': case '-': case ':': case '?': case 'Number': case 'String': case 'QuotedLiteral': if(this.expression(_={},572)) {expr=_.expr; art.value = expr; } continue;
|
|
3542
|
+
case '{': this.selectItemsList({query:art,clause:'expand',start:undefined},579); continue;
|
|
3543
|
+
default: this.e(); continue;
|
|
3544
|
+
}
|
|
3545
|
+
case 572: switch(this.lk()) {
|
|
3546
|
+
case 'as': if(this.ck(573)) as=this.lb(); continue;
|
|
3547
|
+
case 'Id': if(this.ci(574,'ItemAlias')) { art.name = this.fragileAlias( true ); } continue;
|
|
3548
|
+
default: if(this.gi(574)) { alias = this.classifyImplicitName( 'ItemImplicit', expr ); } continue;
|
|
3549
|
+
}
|
|
3550
|
+
case 573: if(this.mi(574,'ItemAlias')) { art.name = this.identAst(); } continue;
|
|
3551
|
+
case 574: switch(this.l()) {
|
|
3552
|
+
case '{': this.s=575;{ this.reportExpandInline( art, false ); } continue;
|
|
3553
|
+
case '.': if(this.c(577)) { this.reportExpandInline( art, as || true );
|
|
3554
|
+
if (alias) alias.token.parsed = alias.parsed; } continue;
|
|
3555
|
+
default: this.s=582; continue;
|
|
3556
|
+
}
|
|
3557
|
+
case 575: this.selectItemsList({query:art,clause:'expand',start:undefined},576); continue;
|
|
3558
|
+
case 576: switch(this.lk()) {
|
|
3559
|
+
case 'excluding': this.excludingClause({query:art},582); continue;
|
|
3560
|
+
default: this.s=582; continue;
|
|
3561
|
+
}
|
|
3562
|
+
case 577: switch(this.l()) {
|
|
3563
|
+
case '{': this.selectItemsList({query:art,clause:'inline',start:undefined},578); continue;
|
|
3564
|
+
case '*': if(this.c(582)) { art.inline = [ this.valueWithLocation() ]; } continue;
|
|
3565
|
+
default: this.e(); continue;
|
|
3566
|
+
}
|
|
3567
|
+
case 578: switch(this.lk()) {
|
|
3568
|
+
case 'excluding': this.excludingClause({query:art},582); continue;
|
|
3569
|
+
default: this.s=582; continue;
|
|
3570
|
+
}
|
|
3571
|
+
case 579: switch(this.lk()) {
|
|
3572
|
+
case 'excluding': this.excludingClause({query:art},580); continue;
|
|
3573
|
+
default: this.s=580; continue;
|
|
3574
|
+
}
|
|
3575
|
+
case 580: this.mk(581,'as'); continue;
|
|
3576
|
+
case 581: if(this.mi(582,'ItemAlias')) { art.name = this.identAst(); } continue;
|
|
3577
|
+
case 582: this.s=583;{ this.docComment( art ); } continue;
|
|
3578
|
+
case 583: switch(this.l()) {
|
|
3579
|
+
case '@': this.annoAssignMid({art},583); continue;
|
|
3580
|
+
default: this.s=584; continue;
|
|
3581
|
+
}
|
|
3582
|
+
case 584: switch(this.l()) {
|
|
3583
|
+
case ':': this.c(585); continue;
|
|
3584
|
+
default: this.gr([',']); continue;
|
|
3585
|
+
}
|
|
3586
|
+
case 585: switch(this.lk()) {
|
|
3587
|
+
case 'type': this.lP() && this.typeTypeOf({art},599); continue;
|
|
3588
|
+
case 'localized': if(this.ckP(586,['Id'])) { art.localized = this.valueWithLocation( true ); } continue;
|
|
3589
|
+
case 'Id': this.s=586; continue;
|
|
3590
|
+
case 'redirected': this.ckP(587,['to']); continue;
|
|
3591
|
+
case 'association': if(this.ckP(591,['[','to'])) {assoc=this.lb(); this.associationInSelectItem( art ); } continue;
|
|
3592
|
+
case 'composition': if(this.ckP(593,['[','of'])) {assoc=this.lb(); this.associationInSelectItem( art ); } continue;
|
|
3593
|
+
default: this.ei(); continue;
|
|
3594
|
+
}
|
|
3595
|
+
case 586: this.typeRefOptArgs({art},599); continue;
|
|
3596
|
+
case 587: this.mk(588,'to'); continue;
|
|
3597
|
+
case 588: if(this.simplePath(_={category:'artref'},589)) {target=_.ref; art.target = target; } continue;
|
|
3598
|
+
case 589: switch(this.lk()) {
|
|
3599
|
+
case 'on': this.ck(590); continue;
|
|
3600
|
+
case '{': this.foreignKeysBlock({art},599); continue;
|
|
3601
|
+
default: this.s=599; continue;
|
|
3602
|
+
}
|
|
3603
|
+
case 590: if(this.condition(_={},599)) {cond=_.expr; art.on = cond; } continue;
|
|
3604
|
+
case 591: switch(this.l()) {
|
|
3605
|
+
case '[': this.cardinality({art},592); continue;
|
|
3606
|
+
default: this.s=592; continue;
|
|
3607
|
+
}
|
|
3608
|
+
case 592: this.mk(595,'to'); continue;
|
|
3609
|
+
case 593: switch(this.l()) {
|
|
3610
|
+
case '[': this.cardinality({art},594); continue;
|
|
3611
|
+
default: this.s=594; continue;
|
|
3612
|
+
}
|
|
3613
|
+
case 594: this.mk(595,'of'); continue;
|
|
3614
|
+
case 595: switch(this.lk()) {
|
|
3615
|
+
case 'one': case 'many': if(this.ckP(596,['Id'])) card=this.lb(); continue;
|
|
3616
|
+
default: this.s=596; continue;
|
|
3617
|
+
}
|
|
3618
|
+
case 596: if(this.simplePath(_={category:'artref'},597)) {target=_.ref; this.setAssocAndComposition( art, assoc, card, target ); } continue;
|
|
3619
|
+
case 597: this.mk(598,'on'); continue;
|
|
3620
|
+
case 598: if(this.condition(_={},599)) {expr=_.expr; art.on = expr; } continue;
|
|
3621
|
+
case 599: this.s=600;{ this.docComment( art ); } continue;
|
|
3622
|
+
case 600: switch(this.l()) {
|
|
3623
|
+
case '@': this.annoAssignStd({art},600); continue;
|
|
3624
|
+
default: this.gr([',']); continue;
|
|
3625
|
+
}
|
|
3626
|
+
default:
|
|
3627
|
+
this.attachLocation( art );
|
|
3628
|
+
return this.exit_();
|
|
3629
|
+
}
|
|
3630
|
+
}
|
|
3631
|
+
whereGroupByHaving($,$next) {
|
|
3632
|
+
this.rule_(602,$next);
|
|
3633
|
+
let cond; let _;
|
|
3634
|
+
for(;;) switch(this.s) {
|
|
3635
|
+
case 602: switch(this.lk()) {
|
|
3636
|
+
case 'where': this.ck(603); continue;
|
|
3637
|
+
default: this.s=604; continue;
|
|
3638
|
+
}
|
|
3639
|
+
case 603: if(this.condition(_={},604)) {cond=_.expr; $.query.where = cond; } continue;
|
|
3640
|
+
case 604: switch(this.lk()) {
|
|
3641
|
+
case 'group': this.groupByClause($,605); continue;
|
|
3642
|
+
default: this.s=605; continue;
|
|
3643
|
+
}
|
|
3644
|
+
case 605: switch(this.lk()) {
|
|
3645
|
+
case 'having': this.ck(606); continue;
|
|
3646
|
+
default: this.gr(['limit','order']); continue;
|
|
3647
|
+
}
|
|
3648
|
+
case 606: if(this.condition(_={},0)) {cond=_.expr; $.query.having = cond; } continue;
|
|
3649
|
+
default: return this.exit_();
|
|
3650
|
+
}
|
|
3651
|
+
}
|
|
3652
|
+
groupByClause($,$next) {
|
|
3653
|
+
this.rule_(608,$next);
|
|
3654
|
+
let expr; let _;
|
|
3655
|
+
for(;;) switch(this.s) {
|
|
3656
|
+
case 608: this.mk(609,'group'); continue;
|
|
3657
|
+
case 609: this.mk(610,'by'); continue;
|
|
3658
|
+
case 610: if(this.expression(_={},611)) {expr=_.expr; $.query.groupBy = [ expr ]; } continue;
|
|
3659
|
+
case 611: switch(this.l()) {
|
|
3660
|
+
case ',': this.c(612); continue;
|
|
3661
|
+
default: this.gr(['limit','order','having']); continue;
|
|
3662
|
+
}
|
|
3663
|
+
case 612: if(this.expression(_={},611)) {expr=_.expr; $.query.groupBy.push( expr ); } continue;
|
|
3664
|
+
default: return this.exit_();
|
|
3665
|
+
}
|
|
3666
|
+
}
|
|
3667
|
+
orderByLimitOffset($,$next) {
|
|
3668
|
+
this.rule_(614,$next);
|
|
3669
|
+
let expr; let _;
|
|
3670
|
+
for(;;) switch(this.s) {
|
|
3671
|
+
case 614: switch(this.lk()) {
|
|
3672
|
+
case 'order': this.orderByClause($,615); continue;
|
|
3673
|
+
default: this.s=615; continue;
|
|
3674
|
+
}
|
|
3675
|
+
case 615: switch(this.lk()) {
|
|
3676
|
+
case 'limit': this.ck(616); continue;
|
|
3677
|
+
default: this.gr([]); continue;
|
|
3678
|
+
}
|
|
3679
|
+
case 616: if(this.expression(_={},617)) {expr=_.expr; $.query.limit = { rows: expr }; } continue;
|
|
3680
|
+
case 617: switch(this.lk()) {
|
|
3681
|
+
case 'offset': this.ck(618); continue;
|
|
3682
|
+
default: this.gr([]); continue;
|
|
3683
|
+
}
|
|
3684
|
+
case 618: if(this.expression(_={},0)) {expr=_.expr; $.query.limit.offset = expr; } continue;
|
|
3685
|
+
default: return this.exit_();
|
|
3686
|
+
}
|
|
3687
|
+
}
|
|
3688
|
+
orderByClause($,$next) {
|
|
3689
|
+
this.rule_(620,$next);
|
|
3690
|
+
let expr; let _;
|
|
3691
|
+
for(;;) switch(this.s) {
|
|
3692
|
+
case 620: this.mk(621,'order'); continue;
|
|
3693
|
+
case 621: this.mk(622,'by'); continue;
|
|
3694
|
+
case 622: if(this.orderByExpression(_={},623)) {expr=_.expr; $.query.orderBy = [ expr ]; } continue;
|
|
3695
|
+
case 623: switch(this.l()) {
|
|
3696
|
+
case ',': this.c(624); continue;
|
|
3697
|
+
default: this.gr(['limit']); continue;
|
|
3698
|
+
}
|
|
3699
|
+
case 624: if(this.orderByExpression(_={},623)) {expr=_.expr; $.query.orderBy.push( expr ); } continue;
|
|
3700
|
+
default: return this.exit_();
|
|
3701
|
+
}
|
|
3702
|
+
}
|
|
3703
|
+
orderByExpression($,$next) {
|
|
3704
|
+
$.expr??=undefined;
|
|
3705
|
+
this.rule_(626,$next);
|
|
3706
|
+
for(;;) switch(this.s) {
|
|
3707
|
+
case 626: this.expression($,627); continue;
|
|
3708
|
+
case 627: switch(this.lk()) {
|
|
3709
|
+
case 'asc': case 'desc': if(this.ck(628)) { $.expr.sort = this.valueWithLocation(); } continue;
|
|
3710
|
+
default: this.s=628; continue;
|
|
3711
|
+
}
|
|
3712
|
+
case 628: switch(this.lk()) {
|
|
3713
|
+
case 'nulls': this.ck(629); continue;
|
|
3714
|
+
default: this.gr([',','limit']); continue;
|
|
3715
|
+
}
|
|
3716
|
+
case 629: switch(this.lk()) {
|
|
3717
|
+
case 'last': case 'first': if(this.ck(0)) { $.expr.nulls = this.valueWithLocation(); } continue;
|
|
3718
|
+
default: this.e(); continue;
|
|
3719
|
+
}
|
|
3720
|
+
default: return this.exit_();
|
|
3721
|
+
}
|
|
3722
|
+
}
|
|
3723
|
+
conditionEOF($,$next) {
|
|
3724
|
+
$.cond??=undefined;
|
|
3725
|
+
this.rule_(631,$next);
|
|
3726
|
+
let _;
|
|
3727
|
+
for(;;) switch(this.s) {
|
|
3728
|
+
case 631: if(this.expression(_={},632)) $.cond=_.expr; continue;
|
|
3729
|
+
case 632: this.m(0,'EOF'); continue;
|
|
3730
|
+
default: return this.exit_();
|
|
3731
|
+
}
|
|
3732
|
+
}
|
|
3733
|
+
condition($,$next) {
|
|
3734
|
+
$.expr??=undefined;
|
|
3735
|
+
this.rule_(634,$next);
|
|
3736
|
+
for(;;) switch(this.s) {
|
|
3737
|
+
case 634: this.expression($,0); continue;
|
|
3738
|
+
default: return this.exit_();
|
|
3739
|
+
}
|
|
3740
|
+
}
|
|
3741
|
+
valuePath($,$next,$startState) {
|
|
3742
|
+
$.expr??={ path: [] };
|
|
3743
|
+
this.rule_($startState??636,$next);
|
|
3744
|
+
let pathItem;
|
|
3745
|
+
for(;;) switch(this.s) {
|
|
3746
|
+
case 636: if(this.mi(637,'ref')) { $.expr.path.push( pathItem = this.identAst() ); } continue;
|
|
3747
|
+
case 637: switch(this.l()) {
|
|
3748
|
+
case '(': case '[': this.argumentsAndFilter({pathStep:pathItem},638); continue;
|
|
3749
|
+
default: this.s=638; continue;
|
|
3750
|
+
}
|
|
3751
|
+
case 638: switch(this.l()) {
|
|
3752
|
+
case '.': this.gc(0,'isDotForPath') && this.c(639); continue;
|
|
3753
|
+
default: this.gr(['*','+','-','/','<','=','>','?','!=','<=','<>','>=','in','is','or','||','and','not','like','between']); continue;
|
|
3754
|
+
}
|
|
3755
|
+
case 639: if(this.miA(640,'ref')) { $.expr.path.push( pathItem = this.identAst() ); } continue;
|
|
3756
|
+
case 640: switch(this.l()) {
|
|
3757
|
+
case '(': case '[': if(this.argumentsAndFilter({pathStep:pathItem},638)) { pathItem = null; } continue;
|
|
3758
|
+
default: this.s=638; continue;
|
|
3759
|
+
}
|
|
3760
|
+
default:
|
|
3761
|
+
this.attachLocation( $.expr );
|
|
3762
|
+
return this.exit_();
|
|
3763
|
+
}
|
|
3764
|
+
}
|
|
3765
|
+
expression($,$next,$startState) {
|
|
3766
|
+
$.expr??=undefined;
|
|
3767
|
+
this.rule_($startState??642,$next);
|
|
3768
|
+
let e; let open; let _;
|
|
3769
|
+
for(;;) switch(this.s) {
|
|
3770
|
+
case 642: switch(this.lk()) {
|
|
3771
|
+
case '(': this.expressionOrQueryParens($,643); continue;
|
|
3772
|
+
case '#': case 'null': case 'true': case 'false': case 'Number': case 'String': case 'QuotedLiteral': this.literalValue($,653); continue;
|
|
3773
|
+
case ':': if(this.c(644)) { this.reportUnexpectedSpace(); } continue;
|
|
3774
|
+
case '?': if(this.c(653)) { this.csnParseOnly( 'syntax-unsupported-param', -1, { '#': 'dynamic', code: '?' } );
|
|
3775
|
+
$.expr = this.attachLocation({ param: this.valueWithLocation(), scope: 'param' }); } continue;
|
|
3776
|
+
case 'Id': if(this.valuePath(_={},646)) {e=_.expr; $.expr = this.valuePathAst( e ); } continue;
|
|
3777
|
+
case 'new': this.lP() && this.newAndValuePath($,653); continue;
|
|
3778
|
+
case 'exists': if(this.ck(649)) { $.expr = this.applyOpToken(); } continue;
|
|
3779
|
+
case 'case': this.caseExpression($,653); continue;
|
|
3780
|
+
case 'cast': this.castFunction($,653); continue;
|
|
3781
|
+
case '+': case '-': if(this.ep(30,'right') && this.c(652)) { $.expr = this.applyOpToken(); } continue;
|
|
3782
|
+
case 'not': if(this.ep(8,'right') && this.ck(652)) { $.expr = this.applyOpToken(); } continue;
|
|
3783
|
+
default: this.ei(); continue;
|
|
3784
|
+
}
|
|
3785
|
+
case 643: this.s=653;{ $.expr = this.taggedIfQuery( $.expr ); } continue;
|
|
3786
|
+
case 644: switch(this.l()) {
|
|
3787
|
+
case 'Id': if(this.ciA(645,'paramref')) { $.expr = { path: [ this.identAst() ], location: this.startLocation(), scope: 'param' }; } continue;
|
|
3788
|
+
case 'Number': if(this.c(653)) { this.csnParseOnly( 'syntax-unsupported-param', -1, { '#': 'positional', code: ':' + this.lb().text } );
|
|
3789
|
+
$.expr = this.attachLocation({ param: this.unsignedIntegerLiteral(), scope: 'param' }); } continue;
|
|
3790
|
+
default: this.e(); continue;
|
|
3791
|
+
}
|
|
3792
|
+
case 645: switch(this.l()) {
|
|
3793
|
+
case '.': if(this.gc(653,'isDotForPath') && this.valuePath($,653,638)) { $.expr = this.valuePathAst( $.expr ); } continue;
|
|
3794
|
+
default: this.s=653;{ this.attachLocation( $.expr ); } continue;
|
|
3795
|
+
}
|
|
3796
|
+
case 646: switch(this.lk()) {
|
|
3797
|
+
case 'over': if(this.ckP(647,['('])) { this.pushXprToken( $.expr.suffix = [] ); } continue;
|
|
3798
|
+
default: this.s=648; continue;
|
|
3799
|
+
}
|
|
3800
|
+
case 647: this.overClause(e={outer:$.expr.suffix},648); continue;
|
|
3801
|
+
case 648: this.s=653;{ this.attachLocation( $.expr ); } continue;
|
|
3802
|
+
case 649: switch(this.l()) {
|
|
3803
|
+
case '(': if(this.c(650)) open=this.lb(); continue;
|
|
3804
|
+
case 'Id': if(this.valuePath(_={},653)) {e=_.expr; e = this.valuePathAst( e ); e.$expected = 'exists';
|
|
3805
|
+
$.expr.args.push( e ); this.attachLocation( $.expr ); } continue;
|
|
3806
|
+
case '?': if(this.c(653)) { this.csnParseOnly( 'syntax-unsupported-param', -1, { '#': 'dynamic', code: '?' } );
|
|
3807
|
+
$.expr.args.push( { param: this.valueWithLocation(), scope: 'param' } ); this.attachLocation( $.expr ); } continue;
|
|
3808
|
+
default: this.e(); continue;
|
|
3809
|
+
}
|
|
3810
|
+
case 650: if(this.queryExpression(_={},651)) e=_.expr; continue;
|
|
3811
|
+
case 651: if(this.m(653,')')) { $.expr.args.push( this.taggedIfQuery( this.surroundByParens( e, open ) ) );
|
|
3812
|
+
this.attachLocation( $.expr ); } continue;
|
|
3813
|
+
case 652: if(this.expression(_={},653)) {e=_.expr; $.expr = this.signedExpression( $.expr, e ); } continue;
|
|
3814
|
+
case 653: switch(this.lk()) {
|
|
3815
|
+
case '*': case '/': if(this.gp(0,24) && this.c(657)) { $.expr = this.applyOpToken( $.expr, 'nary' ); } continue;
|
|
3816
|
+
case '+': case '-': if(this.gp(0,22) && this.c(657)) { $.expr = this.applyOpToken( $.expr, 'nary' ); } continue;
|
|
3817
|
+
case '||': if(this.gp(0,20) && this.c(657)) { $.expr = this.applyOpToken( $.expr, 'nary' ); } continue;
|
|
3818
|
+
case 'and': if(this.lP(['Id','#','(','+','-',':','?','not','case','cast','null','true','false','Number','String','exists','QuotedLiteral']) && this.gp(0,4) && this.ck(657)) { $.expr = this.applyOpToken( $.expr, 'nary' ); } continue;
|
|
3819
|
+
case 'or': if(this.lP(['Id','#','(','+','-',':','?','not','case','cast','null','true','false','Number','String','exists','QuotedLiteral']) && this.gp(0,2) && this.ck(657)) { $.expr = this.applyOpToken( $.expr, 'nary' ); } continue;
|
|
3820
|
+
case '?': if(this.gp(0,0) && this.c(654)) { $.expr = this.applyOpToken( $.expr, '?:' ); } continue;
|
|
3821
|
+
case '<': case '=': case '>': case '!=': case '<=': case '<>': case '>=': if(this.gp(0,10,'none') && this.c(656)) { $.expr = this.applyOpToken( $.expr ); } continue;
|
|
3822
|
+
case 'is': if(this.lP(['not','null']) && this.gp(0,10,'none') && this.ck(658)) { $.expr = this.applyOpToken( $.expr ); } continue;
|
|
3823
|
+
case 'not': if(this.gc(0,'isNegatedRelation') && this.ck(660)) { $.expr = this.applyOpToken( $.expr ); } continue;
|
|
3824
|
+
case 'in': case 'like': case 'between': if(this.lP() && this.gp(0,10,'none') && this.g(660)) { $.expr = { op: { val: 'ixpr', location: this.la().location }, args: [ $.expr ] }; } continue;
|
|
3825
|
+
default: this.gr([]); continue;
|
|
3826
|
+
}
|
|
3827
|
+
case 654: if(this.expression(_={},655)) {e=_.expr; $.expr.args.push( e ); } continue;
|
|
3828
|
+
case 655: if(this.m(657,':')) { this.pushXprToken( $.expr ); } continue;
|
|
3829
|
+
case 656: switch(this.lk()) {
|
|
3830
|
+
case 'all': case 'any': case 'some': if(this.ck(657)) { this.pushXprToken( $.expr ); } continue;
|
|
3831
|
+
default: this.s=657; continue;
|
|
3832
|
+
}
|
|
3833
|
+
case 657: if(this.expression(_={},668)) {e=_.expr; $.expr.args.push( e ); } continue;
|
|
3834
|
+
case 658: switch(this.lk()) {
|
|
3835
|
+
case 'not': if(this.ck(659)) { this.pushXprToken( $.expr ); } continue;
|
|
3836
|
+
default: this.s=659; continue;
|
|
3837
|
+
}
|
|
3838
|
+
case 659: if(this.mk(668,'null')) { this.pushXprToken( $.expr ); } continue;
|
|
3839
|
+
case 660: switch(this.lk()) {
|
|
3840
|
+
case 'between': if(this.ck(661)) { this.pushXprToken( $.expr ); } continue;
|
|
3841
|
+
case 'in': if(this.ck(664)) { this.pushXprToken( $.expr ); } continue;
|
|
3842
|
+
case 'like': if(this.ck(665)) { this.pushXprToken( $.expr ); } continue;
|
|
3843
|
+
default: this.e(); continue;
|
|
3844
|
+
}
|
|
3845
|
+
case 661: if(this.expression(_={},662)) {e=_.expr; $.expr.args?.push( e ); } continue;
|
|
3846
|
+
case 662: if(this.mk(663,'and')) { this.pushXprToken( $.expr ); } continue;
|
|
3847
|
+
case 663: if(this.expression(_={},668)) {e=_.expr; $.expr.args?.push( e ); } continue;
|
|
3848
|
+
case 664: if(this.expression(_={},668)) {e=_.expr; $.expr.args?.push( this.secureParens( e ) ); } continue;
|
|
3849
|
+
case 665: if(this.expression(_={},666)) {e=_.expr; $.expr.args?.push( e ); } continue;
|
|
3850
|
+
case 666: switch(this.lk()) {
|
|
3851
|
+
case 'escape': if(this.ckP(667,['Id','#','(','+','-',':','?','not','case','cast','null','true','false','Number','String','exists','QuotedLiteral'])) { this.pushXprToken( $.expr ); } continue;
|
|
3852
|
+
default: this.s=668; continue;
|
|
3853
|
+
}
|
|
3854
|
+
case 667: if(this.expression(_={},668)) {e=_.expr; $.expr.args?.push( e ); } continue;
|
|
3855
|
+
case 668: this.s=653;{ this.attachLocation( $.expr ); } continue;
|
|
3856
|
+
default: return this.exit_();
|
|
3857
|
+
}
|
|
3858
|
+
}
|
|
3859
|
+
expressionOrQueryParens($,$next) {
|
|
3860
|
+
$.expr??=undefined;
|
|
3861
|
+
this.rule_(670,$next);
|
|
3862
|
+
for(;;) switch(this.s) {
|
|
3863
|
+
case 670: this.m(671,'('); continue;
|
|
3864
|
+
case 671: switch(this.lk()) {
|
|
3865
|
+
case '(': this.expressionOrQueryParens($,672); continue;
|
|
3866
|
+
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': this.ep(-2) && this.expression($,674); continue;
|
|
3867
|
+
case 'select': this.ep(-1) && this.queryExpression($,675); continue;
|
|
3868
|
+
default: this.ei(); continue;
|
|
3869
|
+
}
|
|
3870
|
+
case 672: switch(this.lk()) {
|
|
3871
|
+
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': this.gp(675,-2,'post') && this.expression($,673,643); continue;
|
|
3872
|
+
case ',': this.gp(675,-2,'post') && this.continueExpressionslist($,675); continue;
|
|
3873
|
+
case 'limit': case 'minus': case 'order': case 'union': case 'except': case 'intersect': this.gp(675,-1,'post') && this.queryExpression($,675,462); continue;
|
|
3874
|
+
default: this.s=675; continue;
|
|
3875
|
+
}
|
|
3876
|
+
case 673: switch(this.l()) {
|
|
3877
|
+
case ',': this.continueExpressionslist($,675); continue;
|
|
3878
|
+
default: this.s=675; continue;
|
|
3879
|
+
}
|
|
3880
|
+
case 674: switch(this.l()) {
|
|
3881
|
+
case ',': this.continueExpressionslist($,675); continue;
|
|
3882
|
+
default: this.s=675; continue;
|
|
3883
|
+
}
|
|
3884
|
+
case 675: if(this.m(0,')')) {this.setPrecInCallingRule(); this.surroundByParens( $.expr ); } continue;
|
|
3885
|
+
default: return this.exit_();
|
|
3886
|
+
}
|
|
3887
|
+
}
|
|
3888
|
+
continueExpressionslist($,$next) {
|
|
3889
|
+
this.rule_(677,$next);
|
|
3890
|
+
let e; let _;
|
|
3891
|
+
for(;;) switch(this.s) {
|
|
3892
|
+
case 677: if(this.m(678,',')) { $.expr = { op: this.valueWithLocation( 'list' ), args: [ $.expr ], location: { ... $.expr.$parens?.at( -1 ) ?? $.expr.location } }; } continue;
|
|
3893
|
+
case 678: switch(this.lk()) {
|
|
3894
|
+
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=679; continue;
|
|
3895
|
+
default: this.ei(); continue;
|
|
3896
|
+
}
|
|
3897
|
+
case 679: switch(this.lk()) {
|
|
3898
|
+
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(_={},680)) {e=_.expr; $.expr.args.push( e ); } continue;
|
|
3899
|
+
default: this.gi(0,[')']); continue;
|
|
3900
|
+
}
|
|
3901
|
+
case 680: switch(this.l()) {
|
|
3902
|
+
case ',': this.c(679); continue;
|
|
3903
|
+
default: this.gr([')']); continue;
|
|
3904
|
+
}
|
|
3905
|
+
case 0: { this.attachLocation( $.expr ); }
|
|
3906
|
+
default:
|
|
3907
|
+
this.attachLocation( $.expr );
|
|
3908
|
+
return this.exit_();
|
|
3909
|
+
}
|
|
3910
|
+
}
|
|
3911
|
+
newAndValuePath($,$next) {
|
|
3912
|
+
$.expr??=undefined;
|
|
3913
|
+
this.rule_(682,$next);
|
|
3914
|
+
let e; let _;
|
|
3915
|
+
for(;;) switch(this.s) {
|
|
3916
|
+
case 682: if(this.mk(683,'new')) { $.expr = this.applyOpToken(); } continue;
|
|
3917
|
+
case 683: if(this.valuePath(_={},0)) {e=_.expr; e = this.valuePathAst( e );
|
|
3918
|
+
if (e.op?.val !== 'ixpr') $.expr.args.push( e ); else $.expr.args.push( ...e.args ); } continue;
|
|
3919
|
+
default:
|
|
3920
|
+
this.attachLocation( $.expr );
|
|
3921
|
+
return this.exit_();
|
|
3922
|
+
}
|
|
3923
|
+
}
|
|
3924
|
+
caseExpression($,$next) {
|
|
3925
|
+
$.expr??={ op: { val: 'ixpr' }, args: [] };
|
|
3926
|
+
this.rule_(685,$next);
|
|
3927
|
+
let e; let _;
|
|
3928
|
+
for(;;) switch(this.s) {
|
|
3929
|
+
case 685: if(this.mk(686,'case')) { this.pushXprToken( $.expr ); $.expr.op.location = $.expr.args[0].location; } continue;
|
|
3930
|
+
case 686: switch(this.lk()) {
|
|
3931
|
+
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(_={},687)) {e=_.expr; $.expr.args.push( e ); } continue;
|
|
3932
|
+
case 'when': this.gP(687); continue;
|
|
3933
|
+
default: this.gi(687); continue;
|
|
3934
|
+
}
|
|
3935
|
+
case 687: switch(this.lk()) {
|
|
3936
|
+
case 'when': this.s=688; continue;
|
|
3937
|
+
default: this.e(); continue;
|
|
3938
|
+
}
|
|
3939
|
+
case 688: switch(this.lk()) {
|
|
3940
|
+
case 'when': if(this.ck(689)) { this.pushXprToken( $.expr ); } continue;
|
|
3941
|
+
default: this.s=692; continue;
|
|
3942
|
+
}
|
|
3943
|
+
case 689: if(this.expression(_={},690)) {e=_.expr; $.expr.args.push( e ); } continue;
|
|
3944
|
+
case 690: if(this.mk(691,'then')) { this.pushXprToken( $.expr ); } continue;
|
|
3945
|
+
case 691: if(this.expression(_={},688)) {e=_.expr; $.expr.args.push( e ); } continue;
|
|
3946
|
+
case 692: switch(this.lk()) {
|
|
3947
|
+
case 'else': if(this.ck(693)) { this.pushXprToken( $.expr ); } continue;
|
|
3948
|
+
default: this.s=694; continue;
|
|
3949
|
+
}
|
|
3950
|
+
case 693: if(this.expression(_={},694)) {e=_.expr; $.expr.args.push( e ); } continue;
|
|
3951
|
+
case 694: if(this.mk(0,'end')) { this.pushXprToken( $.expr ); } continue;
|
|
3952
|
+
default:
|
|
3953
|
+
this.attachLocation( $.expr );
|
|
3954
|
+
return this.exit_();
|
|
3955
|
+
}
|
|
3956
|
+
}
|
|
3957
|
+
castFunction($,$next) {
|
|
3958
|
+
$.expr??={};
|
|
3959
|
+
this.rule_(696,$next);
|
|
3960
|
+
let arg; let _;
|
|
3961
|
+
for(;;) switch(this.s) {
|
|
3962
|
+
case 696: if(this.mk(697,'cast')) { $.expr.op = this.valueWithLocation(); } continue;
|
|
3963
|
+
case 697: if(this.m(698,'(')) { $.expr.args = this.createArray(); } continue;
|
|
3964
|
+
case 698: if(this.expression(_={},699)) {arg=_.expr; $.expr.args?.push( arg ); } continue;
|
|
3965
|
+
case 699: this.mk(700,'as'); continue;
|
|
3966
|
+
case 700: this.typeRefOptArgs({art:$.expr},701); continue;
|
|
3967
|
+
case 701: if(this.m(0,')')) { this.finalizeDictOrArray( $.expr.args ); } continue;
|
|
3968
|
+
default:
|
|
3969
|
+
this.attachLocation( $.expr );
|
|
3970
|
+
return this.exit_();
|
|
3971
|
+
}
|
|
3972
|
+
}
|
|
3973
|
+
argumentsAndFilter($,$next) {
|
|
3974
|
+
this.rule_(703,$next);
|
|
3975
|
+
let open; let expr; let id; let _;
|
|
3976
|
+
for(;;) switch(this.s) {
|
|
3977
|
+
case 703: switch(this.l()) {
|
|
3978
|
+
case '(': if(this.c(704)) {open=this.lb();this.prepareSpecialFunction(); $.pathStep.args = this.createArray(); } continue;
|
|
3979
|
+
default: this.s=723; continue;
|
|
3980
|
+
}
|
|
3981
|
+
case 704: switch(this.l()) {
|
|
3982
|
+
case 'Id': if(this.gc(705,'isNamedArg') && this.ciA(711,'paramname')) id=this.lb(); continue;
|
|
3983
|
+
default: this.s=705;{ ; } continue;
|
|
3984
|
+
}
|
|
3985
|
+
case 705: switch(this.l()) {
|
|
3986
|
+
case 'Id': case '#': case '(': case '*': case '+': case '-': case ':': case '?': case 'Id_all': case 'Number': case 'String': case 'QuotedLiteral': if(this.funcExpression(_={},706)) {expr=_.expr; $.pathStep.args.push( expr ); } continue;
|
|
3987
|
+
default: this.s=722; continue;
|
|
3988
|
+
}
|
|
3989
|
+
case 706: switch(this.l()) {
|
|
3990
|
+
case ',': if(this.c(707)) {this.nextFunctionArgument();} continue;
|
|
3991
|
+
default: this.s=708; continue;
|
|
3992
|
+
}
|
|
3993
|
+
case 707: switch(this.lk()) {
|
|
3994
|
+
case 'Id': case '#': case '(': case '*': case '+': case '-': case ':': case '?': case 'not': case 'case': case 'cast': case 'null': case 'true': case 'false': case 'Id_all': case 'Number': case 'String': case 'exists': case 'QuotedLiteral': if(this.funcExpression(_={},706)) {expr=_.expr; $.pathStep.args.push( expr ); } continue;
|
|
3995
|
+
case ')': case 'order': this.gP(708); continue;
|
|
3996
|
+
default: this.ei(); continue;
|
|
3997
|
+
}
|
|
3998
|
+
case 708: switch(this.lk()) {
|
|
3999
|
+
case 'order': if(this.ck(709)) { expr = $.pathStep.args[$.pathStep.args.length - 1] = this.applyOpToken( expr ); } continue;
|
|
4000
|
+
default: this.s=722; continue;
|
|
4001
|
+
}
|
|
4002
|
+
case 709: if(this.mk(710,'by')) { this.pushXprToken( expr ); } continue;
|
|
4003
|
+
case 710: if(this.orderByClauseAsXpr({outer:expr.args},722)) { this.attachLocation( expr ); } continue;
|
|
4004
|
+
case 711: switch(this.l()) {
|
|
4005
|
+
case ':': if(this.c(712)) { $.pathStep.args = this.createDict( open ); $.pathStep.$syntax = ':'; } continue;
|
|
4006
|
+
case '=>': if(this.c(717)) { $.pathStep.args = this.createDict(); } continue;
|
|
4007
|
+
default: this.e(); continue;
|
|
4008
|
+
}
|
|
4009
|
+
case 712: if(this.expression(_={},713)) {expr=_.expr; this.addNamedArg( $.pathStep, id, expr ); } continue;
|
|
4010
|
+
case 713: switch(this.l()) {
|
|
4011
|
+
case ',': this.c(714); continue;
|
|
4012
|
+
default: this.s=722; continue;
|
|
4013
|
+
}
|
|
4014
|
+
case 714: switch(this.l()) {
|
|
4015
|
+
case 'Id': if(this.ciA(715,'paramname')) id=this.lb(); continue;
|
|
4016
|
+
case ')': this.s=722; continue;
|
|
4017
|
+
default: this.e(); continue;
|
|
4018
|
+
}
|
|
4019
|
+
case 715: this.m(716,':'); continue;
|
|
4020
|
+
case 716: if(this.expression(_={},713)) {expr=_.expr; this.addNamedArg( $.pathStep, id, expr ); } continue;
|
|
4021
|
+
case 717: if(this.expression(_={},718)) {expr=_.expr; this.addNamedArg( $.pathStep, id, expr ); } continue;
|
|
4022
|
+
case 718: switch(this.l()) {
|
|
4023
|
+
case ',': this.c(719); continue;
|
|
4024
|
+
default: this.s=722; continue;
|
|
4025
|
+
}
|
|
4026
|
+
case 719: switch(this.l()) {
|
|
4027
|
+
case 'Id': if(this.ciA(720,'paramname')) id=this.lb(); continue;
|
|
4028
|
+
case ')': this.s=722; continue;
|
|
4029
|
+
default: this.e(); continue;
|
|
4030
|
+
}
|
|
4031
|
+
case 720: this.m(721,'=>'); continue;
|
|
4032
|
+
case 721: if(this.expression(_={},718)) {expr=_.expr; this.addNamedArg( $.pathStep, id, expr ); } continue;
|
|
4033
|
+
case 722: this.m(723,')'); continue;
|
|
4034
|
+
case 723: switch(this.l()) {
|
|
4035
|
+
case '[': this.cardinalityAndFilter($,0); continue;
|
|
4036
|
+
default: this.gr(['*','+','-','.','/','<','=','>','?','!=','<=','<>','>=','in','is','or','||','and','not','like','between']); continue;
|
|
4037
|
+
}
|
|
4038
|
+
default: return this.exit_();
|
|
4039
|
+
}
|
|
4040
|
+
}
|
|
4041
|
+
funcExpression($,$next) {
|
|
4042
|
+
$.expr??=undefined;
|
|
4043
|
+
this.rule_(725,$next);
|
|
4044
|
+
let args;
|
|
4045
|
+
let tok; let e; let _;
|
|
4046
|
+
for(;;) switch(this.s) {
|
|
4047
|
+
case 725: switch(this.lGenericIntroOrExpr()) {
|
|
4048
|
+
case 'Id': case '#': case '(': case '+': case '-': case ':': case '?': case 'Number': case 'String': case 'QuotedLiteral': if(this.expression(_={},727)) $.expr=_.expr; continue;
|
|
4049
|
+
case 'GenericExpr': if(this.ckA(727)) {tok=this.lb(); $.expr = { val: tok.keyword ?? tok.type, location: tok.location, literal: 'token' }; } continue;
|
|
4050
|
+
case 'GenericIntro': if(this.ckA(726)) { $.expr = this.applyOpToken(); args = $.expr.args; } continue;
|
|
4051
|
+
default: this.e(); continue;
|
|
4052
|
+
}
|
|
4053
|
+
case 726: if(this.expression(_={},727)) {e=_.expr; $.expr.args.push( e ); } continue;
|
|
4054
|
+
case 727: switch(this.lGenericSeparator()) {
|
|
4055
|
+
case 'GenericSeparator': if(this.ckA(728)) { if (args) this.pushXprToken( args ); else { $.expr= this.applyOpToken( $.expr ); args = $.expr.args; } } continue;
|
|
4056
|
+
default: this.gr([')',',','order']); continue;
|
|
4057
|
+
}
|
|
4058
|
+
case 728: switch(this.lGenericExpr()) {
|
|
4059
|
+
case 'Id': case '#': case '(': case '+': case '-': case ':': case '?': case 'Number': case 'String': case 'QuotedLiteral': if(this.expression(_={},727)) {e=_.expr; args.push( e ); } continue;
|
|
4060
|
+
case 'GenericExpr': if(this.ckA(727)) { this.pushXprToken( args ); } continue;
|
|
4061
|
+
default: this.e(); continue;
|
|
4062
|
+
}
|
|
4063
|
+
default:
|
|
4064
|
+
this.attachLocation( $.expr );
|
|
4065
|
+
return this.exit_();
|
|
4066
|
+
}
|
|
4067
|
+
}
|
|
4068
|
+
overClause($,$next) {
|
|
4069
|
+
this.rule_(730,$next);
|
|
4070
|
+
let over=[];
|
|
4071
|
+
for(;;) switch(this.s) {
|
|
4072
|
+
case 730: this.m(731,'('); continue;
|
|
4073
|
+
case 731: switch(this.lk()) {
|
|
4074
|
+
case 'partition': if(this.ck(732)) { this.pushXprToken( over ); } continue;
|
|
4075
|
+
default: this.s=734; continue;
|
|
4076
|
+
}
|
|
4077
|
+
case 732: if(this.mk(733,'by')) { this.pushXprToken( over ); } continue;
|
|
4078
|
+
case 733: this.expressionsAsXpr({outer:over},734); continue;
|
|
4079
|
+
case 734: switch(this.lk()) {
|
|
4080
|
+
case 'order': if(this.ck(735)) { this.pushXprToken( over ); } continue;
|
|
4081
|
+
default: this.s=737; continue;
|
|
4082
|
+
}
|
|
4083
|
+
case 735: if(this.mk(736,'by')) { this.pushXprToken( over ); } continue;
|
|
4084
|
+
case 736: this.orderByClauseAsXpr({outer:over},737); continue;
|
|
4085
|
+
case 737: switch(this.lk()) {
|
|
4086
|
+
case 'rows': if(this.ck(738)) { this.pushXprToken( over ); } continue;
|
|
4087
|
+
default: this.s=739; continue;
|
|
4088
|
+
}
|
|
4089
|
+
case 738: this.windowFrameClause({outer:over},739); continue;
|
|
4090
|
+
case 739: this.m(0,')'); continue;
|
|
4091
|
+
default:
|
|
4092
|
+
$.outer.push( this.surroundByParens( this.ixprAst( over ) ) );
|
|
4093
|
+
return this.exit_();
|
|
4094
|
+
}
|
|
4095
|
+
}
|
|
4096
|
+
expressionsAsXpr($,$next) {
|
|
4097
|
+
this.rule_(741,$next);
|
|
4098
|
+
let args=[];
|
|
4099
|
+
let expr; let _;
|
|
4100
|
+
for(;;) switch(this.s) {
|
|
4101
|
+
case 741: if(this.expression(_={},742)) {expr=_.expr; args.push( expr ); } continue;
|
|
4102
|
+
case 742: switch(this.l()) {
|
|
4103
|
+
case ',': if(this.c(743)) { this.pushXprToken( args ); } continue;
|
|
4104
|
+
default: this.gr([')','rows','order']); continue;
|
|
4105
|
+
}
|
|
4106
|
+
case 743: if(this.expression(_={},742)) {expr=_.expr; args.push( expr ); } continue;
|
|
4107
|
+
default:
|
|
4108
|
+
$.outer.push( this.ixprAst( args ) );
|
|
4109
|
+
return this.exit_();
|
|
4110
|
+
}
|
|
4111
|
+
}
|
|
4112
|
+
orderByClauseAsXpr($,$next) {
|
|
4113
|
+
this.rule_(745,$next);
|
|
4114
|
+
let args=[];
|
|
4115
|
+
for(;;) switch(this.s) {
|
|
4116
|
+
case 745: this.orderBySpecAsXpr({args},746); continue;
|
|
4117
|
+
case 746: switch(this.l()) {
|
|
4118
|
+
case ',': if(this.c(747)) { this.pushXprToken( args ); } continue;
|
|
4119
|
+
default: this.gr([')']); continue;
|
|
4120
|
+
}
|
|
4121
|
+
case 747: this.orderBySpecAsXpr({args},746); continue;
|
|
4122
|
+
default:
|
|
4123
|
+
$.outer.push( this.ixprAst( args ) );
|
|
4124
|
+
return this.exit_();
|
|
4125
|
+
}
|
|
4126
|
+
}
|
|
4127
|
+
orderBySpecAsXpr($,$next) {
|
|
4128
|
+
this.rule_(749,$next);
|
|
4129
|
+
let expr; let _;
|
|
4130
|
+
for(;;) switch(this.s) {
|
|
4131
|
+
case 749: if(this.expression(_={},750)) {expr=_.expr; $.args.push( expr ); } continue;
|
|
4132
|
+
case 750: switch(this.lk()) {
|
|
4133
|
+
case 'asc': case 'desc': if(this.ck(751)) { this.pushXprToken( $.args ); } continue;
|
|
4134
|
+
default: this.s=751; continue;
|
|
4135
|
+
}
|
|
4136
|
+
case 751: switch(this.lk()) {
|
|
4137
|
+
case 'nulls': if(this.ck(752)) { this.pushXprToken( $.args ); } continue;
|
|
4138
|
+
default: this.gr([')',',']); continue;
|
|
4139
|
+
}
|
|
4140
|
+
case 752: switch(this.lk()) {
|
|
4141
|
+
case 'last': case 'first': if(this.ck(0)) { this.pushXprToken( $.args ); } continue;
|
|
4142
|
+
default: this.e(); continue;
|
|
4143
|
+
}
|
|
4144
|
+
default: return this.exit_();
|
|
4145
|
+
}
|
|
4146
|
+
}
|
|
4147
|
+
windowFrameClause($,$next) {
|
|
4148
|
+
this.rule_(754,$next);
|
|
4149
|
+
let args=[];
|
|
4150
|
+
for(;;) switch(this.s) {
|
|
4151
|
+
case 754: switch(this.lk()) {
|
|
4152
|
+
case 'unbounded': if(this.ck(755)) { this.pushXprToken( args ); } continue;
|
|
4153
|
+
case 'Number': if(this.c(755)) { args.push( this.unsignedIntegerLiteral() ); } continue;
|
|
4154
|
+
case 'current': if(this.ck(756)) { this.pushXprToken( args ); } continue;
|
|
4155
|
+
case 'between': if(this.ck(757)) { this.pushXprToken( args ); } continue;
|
|
4156
|
+
default: this.e(); continue;
|
|
4157
|
+
}
|
|
4158
|
+
case 755: if(this.mk(0,'preceding')) { this.pushXprToken( args ); } continue;
|
|
4159
|
+
case 756: if(this.mk(0,'row')) { this.pushXprToken( args ); } continue;
|
|
4160
|
+
case 757: this.windowFrameBoundSpec({args},758); continue;
|
|
4161
|
+
case 758: if(this.mk(759,'and')) { this.pushXprToken( args ); } continue;
|
|
4162
|
+
case 759: this.windowFrameBoundSpec({args},0); continue;
|
|
4163
|
+
default:
|
|
4164
|
+
$.outer.push( this.ixprAst( args ) );
|
|
4165
|
+
return this.exit_();
|
|
4166
|
+
}
|
|
4167
|
+
}
|
|
4168
|
+
windowFrameBoundSpec($,$next) {
|
|
4169
|
+
this.rule_(761,$next);
|
|
4170
|
+
for(;;) switch(this.s) {
|
|
4171
|
+
case 761: switch(this.lk()) {
|
|
4172
|
+
case 'unbounded': if(this.ck(762)) { this.pushXprToken( $.args ); } continue;
|
|
4173
|
+
case 'Number': if(this.c(762)) { $.args.push( this.unsignedIntegerLiteral() ); } continue;
|
|
4174
|
+
case 'current': if(this.ck(764)) { this.pushXprToken( $.args ); } continue;
|
|
4175
|
+
default: this.e(); continue;
|
|
4176
|
+
}
|
|
4177
|
+
case 762: switch(this.lk()) {
|
|
4178
|
+
case 'following': this.ck(763); continue;
|
|
4179
|
+
case 'preceding': this.ck(763); continue;
|
|
4180
|
+
default: this.e(); continue;
|
|
4181
|
+
}
|
|
4182
|
+
case 763: if(this.gr([])) { this.pushXprToken( $.args ); } continue;
|
|
4183
|
+
case 764: if(this.mk(0,'row')) { this.pushXprToken( $.args ); } continue;
|
|
4184
|
+
default: return this.exit_();
|
|
4185
|
+
}
|
|
4186
|
+
}
|
|
4187
|
+
literalValue($,$next) {
|
|
4188
|
+
$.expr??={};
|
|
4189
|
+
this.rule_(766,$next);
|
|
4190
|
+
for(;;) switch(this.s) {
|
|
4191
|
+
case 766: switch(this.lk()) {
|
|
4192
|
+
case '#': if(this.c(767)) { this.reportUnexpectedSpace(); } continue;
|
|
4193
|
+
case 'null': if(this.ck(0)) { $.expr = { literal: 'null', val: null }; } continue;
|
|
4194
|
+
case 'true': case 'false': if(this.ck(0)) { $.expr = { literal: 'boolean', val: this.lb().keyword === 'true' }; } continue;
|
|
4195
|
+
case 'Number': if(this.c(0)) { $.expr = this.numberLiteral(); } continue;
|
|
4196
|
+
case 'String': if(this.c(0)) { $.expr = this.quotedLiteral(); } continue;
|
|
4197
|
+
case 'QuotedLiteral': if(this.c(0)) { $.expr = this.quotedLiteral(); } continue;
|
|
4198
|
+
default: this.e(); continue;
|
|
4199
|
+
}
|
|
4200
|
+
case 767: if(this.mi(0,'enumref')) { $.expr = { literal: 'enum', sym: this.identAst() } } continue;
|
|
4201
|
+
default:
|
|
4202
|
+
this.attachLocation( $.expr );
|
|
4203
|
+
return this.exit_();
|
|
4204
|
+
}
|
|
4205
|
+
}
|
|
4206
|
+
annoAssignStd($,$next) {
|
|
4207
|
+
this.rule_(769,$next);
|
|
4208
|
+
for(;;) switch(this.s) {
|
|
4209
|
+
case 769: if(this.m(770,'@')) {this.inSameLine(); this.reportUnexpectedSpace(); } continue;
|
|
4210
|
+
case 770: switch(this.l()) {
|
|
4211
|
+
case '(': this.annoAssignParen($,0); continue;
|
|
4212
|
+
case 'Id': this.annoAssignBase($,0); continue;
|
|
4213
|
+
default: this.e(); continue;
|
|
4214
|
+
}
|
|
4215
|
+
default:
|
|
4216
|
+
this.docComment( $.art );
|
|
4217
|
+
return this.exit_();
|
|
4218
|
+
}
|
|
4219
|
+
}
|
|
4220
|
+
annoAssignCol($,$next) {
|
|
4221
|
+
this.rule_(772,$next);
|
|
4222
|
+
for(;;) switch(this.s) {
|
|
4223
|
+
case 772: if(this.m(773,'@')) { this.reportUnexpectedSpace(); } continue;
|
|
4224
|
+
case 773: switch(this.l()) {
|
|
4225
|
+
case '(': this.annoAssignParen($,0); continue;
|
|
4226
|
+
case 'Id': this.annoAssignBase($,0); continue;
|
|
4227
|
+
default: this.e(); continue;
|
|
4228
|
+
}
|
|
4229
|
+
default:
|
|
4230
|
+
this.docComment( $.art );
|
|
4231
|
+
return this.exit_();
|
|
4232
|
+
}
|
|
4233
|
+
}
|
|
4234
|
+
annoAssignMid($,$next) {
|
|
4235
|
+
this.rule_(775,$next);
|
|
4236
|
+
let name; let _;
|
|
4237
|
+
for(;;) switch(this.s) {
|
|
4238
|
+
case 775: if(this.m(776,'@')) {this.inSameLine(); this.reportUnexpectedSpace(); } continue;
|
|
4239
|
+
case 776: switch(this.l()) {
|
|
4240
|
+
case '(': this.annoAssignParen($,0); continue;
|
|
4241
|
+
case 'Id': if(this.annoNamePath(_={category:'anno'},0)) {name=_.name; this.assignAnnotation( $.art, {}, name ); this.warnIfColonFollows( name ); } continue;
|
|
4242
|
+
default: this.e(); continue;
|
|
4243
|
+
}
|
|
4244
|
+
default:
|
|
4245
|
+
this.docComment( $.art );
|
|
4246
|
+
return this.exit_();
|
|
4247
|
+
}
|
|
4248
|
+
}
|
|
4249
|
+
annoAssignParen($,$next) {
|
|
4250
|
+
this.rule_(778,$next);
|
|
4251
|
+
for(;;) switch(this.s) {
|
|
4252
|
+
case 778: if(this.m(779,'(')) {this.inSameLine();} continue;
|
|
4253
|
+
case 779: switch(this.l()) {
|
|
4254
|
+
case 'Id': this.annoAssignBase({art:$.art},780); continue;
|
|
4255
|
+
default: this.s=781; continue;
|
|
4256
|
+
}
|
|
4257
|
+
case 780: switch(this.l()) {
|
|
4258
|
+
case ',': this.c(779); continue;
|
|
4259
|
+
case ')': this.s=781; continue;
|
|
4260
|
+
default: this.e(); continue;
|
|
4261
|
+
}
|
|
4262
|
+
case 781: this.m(0,')'); continue;
|
|
4263
|
+
default: return this.exit_();
|
|
4264
|
+
}
|
|
4265
|
+
}
|
|
4266
|
+
annoAssignBase($,$next) {
|
|
4267
|
+
this.rule_(783,$next);
|
|
4268
|
+
let value={};
|
|
4269
|
+
let name; let _;
|
|
4270
|
+
for(;;) switch(this.s) {
|
|
4271
|
+
case 783: if(this.annoNamePath(_={category:'anno'},784)) name=_.name; continue;
|
|
4272
|
+
case 784: switch(this.l()) {
|
|
4273
|
+
case ':': this.gc(0,'inSameLine') && this.c(785); continue;
|
|
4274
|
+
default: this.gr([]); continue;
|
|
4275
|
+
}
|
|
4276
|
+
case 785: if(this.annoValue(_={},0)) value=_.value; continue;
|
|
4277
|
+
default:
|
|
4278
|
+
this.assignAnnotation( $.art, value, name || {} );
|
|
4279
|
+
return this.exit_();
|
|
4280
|
+
}
|
|
4281
|
+
}
|
|
4282
|
+
annoNamePath($,$next) {
|
|
4283
|
+
$.name??=new XsnName();
|
|
4284
|
+
this.rule_(787,$next);
|
|
4285
|
+
let at;
|
|
4286
|
+
for(;;) switch(this.s) {
|
|
4287
|
+
case 787: if(this.miA(788,$.category)) { $.name.path = [ this.identAst() ]; } continue;
|
|
4288
|
+
case 788: switch(this.l()) {
|
|
4289
|
+
case '.': this.c(789); continue;
|
|
4290
|
+
default: this.s=791; continue;
|
|
4291
|
+
}
|
|
4292
|
+
case 789: switch(this.l()) {
|
|
4293
|
+
case 'Id': if(this.ciA(788,$.category)) { $.name.path.push( this.identAst() ); } continue;
|
|
4294
|
+
case '@': if(this.c(790)) at=this.lb(); continue;
|
|
4295
|
+
default: this.e(); continue;
|
|
4296
|
+
}
|
|
4297
|
+
case 790: if(this.miA(788,$.category)) { $.name.path.push( this.identAstWithPrefix( at ) ); } continue;
|
|
4298
|
+
case 791: switch(this.l()) {
|
|
4299
|
+
case '#': this.gc(0,'inSameLine') && this.annoPathVariant({nameOrRef:$.name},0); continue;
|
|
4300
|
+
default: this.gr([]); continue;
|
|
4301
|
+
}
|
|
4302
|
+
default:
|
|
4303
|
+
this.attachLocation( $.name );
|
|
4304
|
+
return this.exit_();
|
|
4305
|
+
}
|
|
4306
|
+
}
|
|
4307
|
+
annoPath($,$next) {
|
|
4308
|
+
this.rule_(793,$next);
|
|
4309
|
+
let at;
|
|
4310
|
+
for(;;) switch(this.s) {
|
|
4311
|
+
case 793: switch(this.l()) {
|
|
4312
|
+
case 'Id': if(this.ciA(795,$.category)) { $.nameOrRef.path = [ this.identAst() ]; } continue;
|
|
4313
|
+
case '@': if(this.c(794)) at=this.lb(); continue;
|
|
4314
|
+
default: this.e(); continue;
|
|
4315
|
+
}
|
|
4316
|
+
case 794: if(this.miA(795,$.category)) { $.nameOrRef.path = [ this.identAstWithPrefix( at ) ]; } continue;
|
|
4317
|
+
case 795: switch(this.l()) {
|
|
4318
|
+
case '.': this.c(796); continue;
|
|
4319
|
+
default: this.s=798; continue;
|
|
4320
|
+
}
|
|
4321
|
+
case 796: switch(this.l()) {
|
|
4322
|
+
case 'Id': if(this.ciA(795,$.category)) { $.nameOrRef.path.push( this.identAst() ); } continue;
|
|
4323
|
+
case '@': if(this.c(797)) at=this.lb(); continue;
|
|
4324
|
+
default: this.e(); continue;
|
|
4325
|
+
}
|
|
4326
|
+
case 797: if(this.miA(795,$.category)) { $.nameOrRef.path.push( this.identAstWithPrefix( at ) ); } continue;
|
|
4327
|
+
case 798: switch(this.l()) {
|
|
4328
|
+
case '#': this.annoPathVariant({nameOrRef:$.nameOrRef},0); continue;
|
|
4329
|
+
default: this.gr([]); continue;
|
|
4330
|
+
}
|
|
4331
|
+
default:
|
|
4332
|
+
this.attachLocation( $.nameOrRef );
|
|
4333
|
+
return this.exit_();
|
|
4334
|
+
}
|
|
4335
|
+
}
|
|
4336
|
+
annoPathVariant($,$next) {
|
|
4337
|
+
this.rule_(800,$next);
|
|
4338
|
+
for(;;) switch(this.s) {
|
|
4339
|
+
case 800: if(this.m(801,'#')) { this.reportUnexpectedSpace(); } continue;
|
|
4340
|
+
case 801: if(this.miA(802,'variant')) { $.nameOrRef.variant = { path: [ this.identAst() ] }; } continue;
|
|
4341
|
+
case 802: switch(this.l()) {
|
|
4342
|
+
case '.': this.c(803); continue;
|
|
4343
|
+
default: this.gr([]); continue;
|
|
4344
|
+
}
|
|
4345
|
+
case 803: if(this.miA(802,'variant')) { $.nameOrRef.variant.path.push( this.identAst() ); } continue;
|
|
4346
|
+
default:
|
|
4347
|
+
this.attachLocation( $.nameOrRef.variant );
|
|
4348
|
+
return this.exit_();
|
|
4349
|
+
}
|
|
4350
|
+
}
|
|
4351
|
+
annoStructValue($,$next) {
|
|
4352
|
+
$.value??={};
|
|
4353
|
+
this.rule_(805,$next);
|
|
4354
|
+
let name=new XsnName();
|
|
4355
|
+
let _;
|
|
4356
|
+
for(;;) switch(this.s) {
|
|
4357
|
+
case 805: if(this.annoPath({nameOrRef:name,category:'name'},806)) { this.attachLocation( name ); } continue;
|
|
4358
|
+
case 806: switch(this.l()) {
|
|
4359
|
+
case ':': if(this.c(807)) {this.annoTopValue();} continue;
|
|
4360
|
+
default: if(this.gr([',','}'])) { this.attachLocation( $.value ); } continue;
|
|
4361
|
+
}
|
|
4362
|
+
case 807: if(this.annoValue(_={},0)) $.value=_.value; continue;
|
|
4363
|
+
default:
|
|
4364
|
+
$.value.name = name;
|
|
4365
|
+
return this.exit_();
|
|
4366
|
+
}
|
|
4367
|
+
}
|
|
4368
|
+
annoValue($,$next) {
|
|
4369
|
+
$.value??={};
|
|
4370
|
+
this.rule_(809,$next);
|
|
4371
|
+
let sign; let sub; let ellipsis; let upTo; let _;
|
|
4372
|
+
for(;;) switch(this.s) {
|
|
4373
|
+
case 809: switch(this.lk()) {
|
|
4374
|
+
case '#': case 'null': case 'true': case 'false': case 'Number': case 'String': case 'QuotedLiteral': if(this.literalValue(_={},0)) {$.value=_.expr; this.adjustAnnoNumber( $.value ); } continue;
|
|
4375
|
+
case '+': case '-': if(this.c(810)) sign=this.lb(); continue;
|
|
4376
|
+
case 'Id': case '@': this.annoPath({nameOrRef:$.value,category:'annoref'},0); continue;
|
|
4377
|
+
case '{': if(this.c(811)) {this.annoTopValue(); if (this.annoTopValue(true)) $.value.$flatten = [];
|
|
4378
|
+
else { $.value.struct = Object.create(null); $.value.literal = 'struct'; } } continue;
|
|
4379
|
+
case '[': if(this.c(814)) {this.annoTopValue(); $.value.val = []; $.value.literal = 'array' } continue;
|
|
4380
|
+
case '(': this.c(821); continue;
|
|
4381
|
+
default: this.ei(); continue;
|
|
4382
|
+
}
|
|
4383
|
+
case 810: if(this.m(0,'Number')) { this.adjustAnnoNumber( $.value = this.numberLiteral( sign ) ); } continue;
|
|
4384
|
+
case 811: switch(this.l()) {
|
|
4385
|
+
case 'Id': case '@': if(this.annoStructValue(_={},812)) {sub=_.value; if ($.value.$flatten) $.value.$flatten.push( sub );
|
|
4386
|
+
else this.addDef( sub, $.value, 'struct', null, sub.name ); } continue;
|
|
4387
|
+
default: this.s=813; continue;
|
|
4388
|
+
}
|
|
4389
|
+
case 812: switch(this.l()) {
|
|
4390
|
+
case ',': this.c(811); continue;
|
|
4391
|
+
case '}': this.s=813; continue;
|
|
4392
|
+
default: this.e(); continue;
|
|
4393
|
+
}
|
|
4394
|
+
case 813: this.m(0,'}'); continue;
|
|
4395
|
+
case 814: switch(this.l()) {
|
|
4396
|
+
case 'Id': case '#': case '(': case '+': case '-': case '@': case '[': case '{': case 'Number': case 'String': case 'QuotedLiteral': if(this.annoValue(_={},819)) {sub=_.value; $.value.val.push( sub ) } continue;
|
|
4397
|
+
case '...': if(this.c(815)) ellipsis=this.lb(); continue;
|
|
4398
|
+
default: this.s=820; continue;
|
|
4399
|
+
}
|
|
4400
|
+
case 815: switch(this.lk()) {
|
|
4401
|
+
case 'up': this.ck(816); continue;
|
|
4402
|
+
default: this.s=818;{ upTo = undefined; } continue;
|
|
4403
|
+
}
|
|
4404
|
+
case 816: this.mk(817,'to'); continue;
|
|
4405
|
+
case 817: if(this.annoValue(_={},818)) upTo=_.value; continue;
|
|
4406
|
+
case 818: this.s=819;{ $.value.val.push( { literal: 'token', val: '...', location: ellipsis.location, upTo: upTo } ); } continue;
|
|
4407
|
+
case 819: switch(this.l()) {
|
|
4408
|
+
case ',': this.c(814); continue;
|
|
4409
|
+
case ']': this.s=820; continue;
|
|
4410
|
+
default: this.e(); continue;
|
|
4411
|
+
}
|
|
4412
|
+
case 820: this.m(0,']'); continue;
|
|
4413
|
+
case 821: if(this.condition(_={},822)) $.value=_.expr; continue;
|
|
4414
|
+
case 822: if(this.m(0,')')) { $.value.$tokenTexts = this.ruleTokensText(); } continue;
|
|
4415
|
+
default:
|
|
4416
|
+
this.attachLocation( $.value );
|
|
4417
|
+
return this.exit_();
|
|
4418
|
+
}
|
|
4419
|
+
}
|
|
4420
|
+
}
|
|
4421
|
+
module.exports = CdlParser;
|