-
Notifications
You must be signed in to change notification settings - Fork 124
Expand file tree
/
Copy pathcompiled_parser.js
More file actions
478 lines (465 loc) · 24.5 KB
/
compiled_parser.js
File metadata and controls
478 lines (465 loc) · 24.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
/* parser generated by jison 0.4.15 */
/*
Returns a Parser object of the following structure:
Parser: {
yy: {}
}
Parser.prototype: {
yy: {},
trace: function(),
symbols_: {associative list: name ==> number},
terminals_: {associative list: number ==> name},
productions_: [...],
performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),
table: [...],
defaultActions: {...},
parseError: function(str, hash),
parse: function(input),
lexer: {
EOF: 1,
parseError: function(str, hash),
setInput: function(input),
input: function(),
unput: function(str),
more: function(),
less: function(n),
pastInput: function(),
upcomingInput: function(),
showPosition: function(),
test_match: function(regex_match_array, rule_index),
next: function(),
lex: function(),
begin: function(condition),
popState: function(),
_currentRules: function(),
topState: function(),
pushState: function(condition),
options: {
ranges: boolean (optional: true ==> token location info will include a .range[] member)
flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)
backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)
},
performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),
rules: [...],
conditions: {associative list: name ==> set},
}
}
token location info (@$, _$, etc.): {
first_line: n,
last_line: n,
first_column: n,
last_column: n,
range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)
}
the parseError function receives a 'hash' object with these members for lexer and parser errors: {
text: (matched text)
token: (the produced terminal token, if any)
line: (yylineno)
}
while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {
loc: (yylloc)
expected: (string describing the set of expected tokens)
recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)
}
*/
var parser = (function(){
var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,8],$V1=[5,26],$V2=[1,14],$V3=[1,13],$V4=[5,26,31,42],$V5=[1,17],$V6=[5,26,31,42,45,62],$V7=[1,27],$V8=[1,29],$V9=[1,40],$Va=[1,44],$Vb=[1,45],$Vc=[1,41],$Vd=[1,42],$Ve=[1,39],$Vf=[1,46],$Vg=[1,43],$Vh=[1,25],$Vi=[5,26,31],$Vj=[5,26,31,42,45],$Vk=[1,58],$Vl=[18,43],$Vm=[1,61],$Vn=[1,62],$Vo=[1,63],$Vp=[1,64],$Vq=[1,65],$Vr=[5,18,23,26,31,34,37,38,41,42,43,45,62,64,65,66,67,68,70],$Vs=[5,18,23,26,31,34,37,38,41,42,43,44,45,51,62,64,65,66,67,68,70,71],$Vt=[1,71],$Vu=[2,84],$Vv=[1,85],$Vw=[1,86],$Vx=[1,104],$Vy=[5,26,31,42,43,44],$Vz=[1,112],$VA=[5,26,31,42,43,45,64],$VB=[5,26,31,41,42,45,62],$VC=[1,115],$VD=[1,116],$VE=[1,117],$VF=[5,26,31,34,35,37,38,41,42,45,62],$VG=[5,18,23,26,31,34,37,38,41,42,43,45,62,64,70],$VH=[5,26,31,34,37,38,41,42,45,62],$VI=[5,26,31,42,56,58];
var parser = {trace: function trace () { },
yy: {},
symbols_: {"error":2,"Root":3,"Query":4,"EOF":5,"SelectQuery":6,"Unions":7,"SelectWithLimitQuery":8,"BasicSelectQuery":9,"Select":10,"OrderClause":11,"GroupClause":12,"LimitClause":13,"SelectClause":14,"WhereClause":15,"SELECT":16,"Fields":17,"FROM":18,"Table":19,"DISTINCT":20,"Joins":21,"Literal":22,"AS":23,"LEFT_PAREN":24,"List":25,"RIGHT_PAREN":26,"WINDOW":27,"WINDOW_FUNCTION":28,"Number":29,"Union":30,"UNION":31,"ALL":32,"Join":33,"JOIN":34,"ON":35,"Expression":36,"LEFT":37,"RIGHT":38,"INNER":39,"OUTER":40,"WHERE":41,"LIMIT":42,"SEPARATOR":43,"OFFSET":44,"ORDER":45,"BY":46,"OrderArgs":47,"OffsetClause":48,"OrderArg":49,"Value":50,"DIRECTION":51,"OffsetRows":52,"FetchClause":53,"ROW":54,"ROWS":55,"FETCH":56,"FIRST":57,"ONLY":58,"NEXT":59,"GroupBasicClause":60,"HavingClause":61,"GROUP":62,"ArgumentList":63,"HAVING":64,"MATH":65,"MATH_MULTI":66,"OPERATOR":67,"BETWEEN":68,"BetweenExpression":69,"CONDITIONAL":70,"SUB_SELECT_OP":71,"SubSelectExpression":72,"SUB_SELECT_UNARY_OP":73,"String":74,"Function":75,"UserFunction":76,"Boolean":77,"Parameter":78,"Variable":79,"NUMBER":80,"BOOLEAN":81,"PARAMETER":82,"STRING":83,"DBLSTRING":84,"LITERAL":85,"DOT":86,"VARIABLE":87,"FUNCTION":88,"AggregateArgumentList":89,"Field":90,"STAR":91,"$accept":0,"$end":1},
terminals_: {2:"error",5:"EOF",16:"SELECT",18:"FROM",20:"DISTINCT",23:"AS",24:"LEFT_PAREN",26:"RIGHT_PAREN",27:"WINDOW",28:"WINDOW_FUNCTION",31:"UNION",32:"ALL",34:"JOIN",35:"ON",37:"LEFT",38:"RIGHT",39:"INNER",40:"OUTER",41:"WHERE",42:"LIMIT",43:"SEPARATOR",44:"OFFSET",45:"ORDER",46:"BY",51:"DIRECTION",54:"ROW",55:"ROWS",56:"FETCH",57:"FIRST",58:"ONLY",59:"NEXT",62:"GROUP",64:"HAVING",65:"MATH",66:"MATH_MULTI",67:"OPERATOR",68:"BETWEEN",70:"CONDITIONAL",71:"SUB_SELECT_OP",73:"SUB_SELECT_UNARY_OP",80:"NUMBER",81:"BOOLEAN",82:"PARAMETER",83:"STRING",84:"DBLSTRING",85:"LITERAL",86:"DOT",87:"VARIABLE",88:"FUNCTION",91:"STAR"},
productions_: [0,[3,2],[4,1],[4,2],[6,1],[6,1],[9,1],[9,2],[9,2],[9,3],[8,2],[10,1],[10,2],[14,4],[14,5],[14,5],[14,6],[19,1],[19,2],[19,3],[19,3],[19,3],[19,4],[19,6],[7,1],[7,2],[30,2],[30,3],[21,1],[21,2],[33,4],[33,5],[33,5],[33,6],[33,6],[33,6],[33,6],[15,2],[13,2],[13,4],[13,4],[11,3],[11,4],[47,1],[47,3],[49,1],[49,2],[48,2],[48,3],[52,2],[52,2],[53,4],[53,4],[12,1],[12,2],[60,3],[61,2],[36,3],[36,3],[36,3],[36,3],[36,3],[36,3],[36,5],[36,3],[36,2],[36,1],[36,1],[69,3],[72,3],[50,1],[50,1],[50,1],[50,1],[50,1],[50,1],[50,1],[50,1],[25,1],[29,1],[77,1],[78,1],[74,1],[74,1],[22,1],[22,3],[79,1],[75,4],[76,3],[76,4],[89,1],[89,2],[63,1],[63,3],[17,1],[17,3],[90,1],[90,1],[90,3]],
performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {
/* this == yyval */
var $0 = $$.length - 1;
switch (yystate) {
case 1:
return this.$ = $$[$0-1];
break;
case 2: case 4: case 5: case 6: case 11: case 53: case 66: case 67: case 70: case 71: case 72: case 73: case 74: case 75: case 76: case 77:
this.$ = $$[$0];
break;
case 3:
this.$ = (function() {
$$[$0-1].unions = $$[$0];
return $$[$0-1];
}());
break;
case 7:
this.$ = (function() {
$$[$0-1].order = $$[$0];
return $$[$0-1];
}());
break;
case 8:
this.$ = (function() {
$$[$0-1].group = $$[$0];
return $$[$0-1];
}());
break;
case 9:
this.$ = (function() {
$$[$0-2].group = $$[$0-1];
$$[$0-2].order = $$[$0];
return $$[$0-2];
}());
break;
case 10:
this.$ = (function() {
$$[$0-1].limit = $$[$0];
return $$[$0-1];
}());
break;
case 12:
this.$ = (function() {
$$[$0-1].where = $$[$0];
return $$[$0-1];
}());
break;
case 13:
this.$ = new yy.Select($$[$0-2], $$[$0], false);
break;
case 14:
this.$ = new yy.Select($$[$0-2], $$[$0], true);
break;
case 15:
this.$ = new yy.Select($$[$0-3], $$[$0-1], false, $$[$0]);
break;
case 16:
this.$ = new yy.Select($$[$0-3], $$[$0-1], true, $$[$0]);
break;
case 17:
this.$ = new yy.Table($$[$0]);
break;
case 18:
this.$ = new yy.Table($$[$0-1], $$[$0]);
break;
case 19:
this.$ = new yy.Table($$[$0-2], $$[$0]);
break;
case 20: case 49: case 50: case 51: case 52: case 57:
this.$ = $$[$0-1];
break;
case 21: case 69:
this.$ = new yy.SubSelect($$[$0-1]);
break;
case 22:
this.$ = new yy.SubSelect($$[$0-2], $$[$0]);
break;
case 23:
this.$ = new yy.Table($$[$0-5], null, $$[$0-4], $$[$0-3], $$[$0-1]);
break;
case 24: case 28: case 43: case 92: case 94:
this.$ = [$$[$0]];
break;
case 25:
this.$ = $$[$0-1].concat($$[$01]);
break;
case 26:
this.$ = new yy.Union($$[$0]);
break;
case 27:
this.$ = new yy.Union($$[$0], true);
break;
case 29:
this.$ = $$[$0-1].concat($$[$0]);
break;
case 30:
this.$ = new yy.Join($$[$0-2], $$[$0]);
break;
case 31:
this.$ = new yy.Join($$[$0-2], $$[$0], 'LEFT');
break;
case 32:
this.$ = new yy.Join($$[$0-2], $$[$0], 'RIGHT');
break;
case 33:
this.$ = new yy.Join($$[$0-2], $$[$0], 'LEFT', 'INNER');
break;
case 34:
this.$ = new yy.Join($$[$0-2], $$[$0], 'RIGHT', 'INNER');
break;
case 35:
this.$ = new yy.Join($$[$0-2], $$[$0], 'LEFT', 'OUTER');
break;
case 36:
this.$ = new yy.Join($$[$0-2], $$[$0], 'RIGHT', 'OUTER');
break;
case 37:
this.$ = new yy.Where($$[$0]);
break;
case 38:
this.$ = new yy.Limit($$[$0]);
break;
case 39:
this.$ = new yy.Limit($$[$0], $$[$0-2]);
break;
case 40:
this.$ = new yy.Limit($$[$0-2], $$[$0]);
break;
case 41:
this.$ = new yy.Order($$[$0]);
break;
case 42:
this.$ = new yy.Order($$[$0-1], $$[$0]);
break;
case 44: case 93: case 95:
this.$ = $$[$0-2].concat($$[$0]);
break;
case 45:
this.$ = new yy.OrderArgument($$[$0], 'ASC');
break;
case 46:
this.$ = new yy.OrderArgument($$[$0-1], $$[$0]);
break;
case 47:
this.$ = new yy.Offset($$[$0]);
break;
case 48:
this.$ = new yy.Offset($$[$0-1], $$[$0]);
break;
case 54:
this.$ = (function() {
$$[$0-1].having = $$[$0];
return $$[$0-1];
}());
break;
case 55:
this.$ = new yy.Group($$[$0]);
break;
case 56:
this.$ = new yy.Having($$[$0]);
break;
case 58: case 59: case 60: case 61: case 62: case 64:
this.$ = new yy.Op($$[$0-1], $$[$0-2], $$[$0]);
break;
case 63:
this.$ = new yy.Op($$[$0-3], $$[$0-4], $$[$0-1]);
break;
case 65:
this.$ = new yy.UnaryOp($$[$0-1], $$[$0]);
break;
case 68:
this.$ = new yy.BetweenOp([$$[$0-2], $$[$0]]);
break;
case 78:
this.$ = new yy.ListValue($$[$0]);
break;
case 79:
this.$ = new yy.NumberValue($$[$0]);
break;
case 80:
this.$ = new yy.BooleanValue($$[$0]);
break;
case 81:
this.$ = new yy.ParameterValue($$[$0]);
break;
case 82:
this.$ = new yy.StringValue($$[$0], "'");
break;
case 83:
this.$ = new yy.StringValue($$[$0], '"');
break;
case 84:
this.$ = new yy.LiteralValue($$[$0]);
break;
case 85:
this.$ = new yy.LiteralValue($$[$0-2], $$[$0]);
break;
case 86:
this.$ = new yy.VariableValue($$[$0], "{", "}");
break;
case 87:
this.$ = new yy.FunctionValue($$[$0-3], $$[$0-1]);
break;
case 88:
this.$ = new yy.FunctionValue($$[$0-2], null, true);
break;
case 89:
this.$ = new yy.FunctionValue($$[$0-3], $$[$0-1], true);
break;
case 90:
this.$ = new yy.ArgumentListValue($$[$0]);
break;
case 91:
this.$ = new yy.ArgumentListValue($$[$0], true);
break;
case 96:
this.$ = new yy.Star();
break;
case 97:
this.$ = new yy.Field($$[$0]);
break;
case 98:
this.$ = new yy.Field($$[$0-2], $$[$0]);
break;
}
},
table: [{3:1,4:2,6:3,8:4,9:5,10:6,14:7,16:$V0},{1:[3]},{5:[1,9]},o($V1,[2,2],{7:10,13:11,30:12,31:$V2,42:$V3}),o($V4,[2,4]),o($V4,[2,5]),o($V4,[2,6],{11:15,12:16,60:18,45:$V5,62:[1,19]}),o($V6,[2,11],{15:20,41:[1,21]}),{17:22,20:[1,23],22:31,24:$V7,29:32,36:26,50:28,72:30,73:$V8,74:33,75:34,76:35,77:36,78:37,79:38,80:$V9,81:$Va,82:$Vb,83:$Vc,84:$Vd,85:$Ve,87:$Vf,88:$Vg,90:24,91:$Vh},{1:[2,1]},o($V1,[2,3],{30:47,31:$V2}),o($V4,[2,10]),o($Vi,[2,24]),{29:48,80:$V9},{6:49,8:4,9:5,10:6,14:7,16:$V0,32:[1,50]},o($V4,[2,7]),o($V4,[2,8],{11:51,45:$V5}),{46:[1,52]},o($Vj,[2,53],{61:53,64:[1,54]}),{46:[1,55]},o($V6,[2,12]),{22:31,24:$V7,29:32,36:56,50:28,72:30,73:$V8,74:33,75:34,76:35,77:36,78:37,79:38,80:$V9,81:$Va,82:$Vb,83:$Vc,84:$Vd,85:$Ve,87:$Vf,88:$Vg},{18:[1,57],43:$Vk},{17:59,22:31,24:$V7,29:32,36:26,50:28,72:30,73:$V8,74:33,75:34,76:35,77:36,78:37,79:38,80:$V9,81:$Va,82:$Vb,83:$Vc,84:$Vd,85:$Ve,87:$Vf,88:$Vg,90:24,91:$Vh},o($Vl,[2,94]),o($Vl,[2,96]),o($Vl,[2,97],{23:[1,60],65:$Vm,66:$Vn,67:$Vo,68:$Vp,70:$Vq}),{4:67,6:3,8:4,9:5,10:6,14:7,16:$V0,22:31,24:$V7,29:32,36:66,50:28,72:30,73:$V8,74:33,75:34,76:35,77:36,78:37,79:38,80:$V9,81:$Va,82:$Vb,83:$Vc,84:$Vd,85:$Ve,87:$Vf,88:$Vg},o($Vr,[2,67],{71:[1,68]}),{24:[1,70],72:69},o($Vr,[2,66]),o($Vs,[2,70],{86:$Vt}),o($Vs,[2,71]),o($Vs,[2,72]),o($Vs,[2,73]),o($Vs,[2,74]),o($Vs,[2,75]),o($Vs,[2,76]),o($Vs,[2,77]),o([5,18,23,26,31,34,37,38,41,42,43,44,45,51,62,64,65,66,67,68,70,71,86],$Vu,{24:[1,72]}),o([5,18,23,26,31,34,37,38,41,42,43,44,45,51,54,55,62,64,65,66,67,68,70,71],[2,79]),o($Vs,[2,82]),o($Vs,[2,83]),{24:[1,73]},o($Vs,[2,80]),o($Vs,[2,81]),o($Vs,[2,86]),o($Vi,[2,25]),o($V4,[2,38],{43:[1,74],44:[1,75]}),o($Vi,[2,26],{13:11,42:$V3}),{6:76,8:4,9:5,10:6,14:7,16:$V0},o($V4,[2,9]),{22:31,29:32,47:77,49:78,50:79,74:33,75:34,76:35,77:36,78:37,79:38,80:$V9,81:$Va,82:$Vb,83:$Vc,84:$Vd,85:$Ve,87:$Vf,88:$Vg},o($Vj,[2,54]),{22:31,24:$V7,29:32,36:80,50:28,72:30,73:$V8,74:33,75:34,76:35,77:36,78:37,79:38,80:$V9,81:$Va,82:$Vb,83:$Vc,84:$Vd,85:$Ve,87:$Vf,88:$Vg},{22:31,24:$V7,29:32,36:82,50:28,63:81,72:30,73:$V8,74:33,75:34,76:35,77:36,78:37,79:38,80:$V9,81:$Va,82:$Vb,83:$Vc,84:$Vd,85:$Ve,87:$Vf,88:$Vg},o($V6,[2,37],{65:$Vm,66:$Vn,67:$Vo,68:$Vp,70:$Vq}),{19:83,22:84,24:$Vv,85:$Vw},{22:31,24:$V7,29:32,36:26,50:28,72:30,73:$V8,74:33,75:34,76:35,77:36,78:37,79:38,80:$V9,81:$Va,82:$Vb,83:$Vc,84:$Vd,85:$Ve,87:$Vf,88:$Vg,90:87,91:$Vh},{18:[1,88],43:$Vk},{22:89,85:$Vw},{22:31,24:$V7,29:32,36:90,50:28,72:30,73:$V8,74:33,75:34,76:35,77:36,78:37,79:38,80:$V9,81:$Va,82:$Vb,83:$Vc,84:$Vd,85:$Ve,87:$Vf,88:$Vg},{22:31,24:$V7,29:32,36:91,50:28,72:30,73:$V8,74:33,75:34,76:35,77:36,78:37,79:38,80:$V9,81:$Va,82:$Vb,83:$Vc,84:$Vd,85:$Ve,87:$Vf,88:$Vg},{22:31,24:$V7,29:32,36:92,50:28,72:30,73:$V8,74:33,75:34,76:35,77:36,78:37,79:38,80:$V9,81:$Va,82:$Vb,83:$Vc,84:$Vd,85:$Ve,87:$Vf,88:$Vg},{22:31,24:$V7,29:32,36:94,50:28,69:93,72:30,73:$V8,74:33,75:34,76:35,77:36,78:37,79:38,80:$V9,81:$Va,82:$Vb,83:$Vc,84:$Vd,85:$Ve,87:$Vf,88:$Vg},{22:31,24:$V7,29:32,36:95,50:28,72:30,73:$V8,74:33,75:34,76:35,77:36,78:37,79:38,80:$V9,81:$Va,82:$Vb,83:$Vc,84:$Vd,85:$Ve,87:$Vf,88:$Vg},{26:[1,96],65:$Vm,66:$Vn,67:$Vo,68:$Vp,70:$Vq},{26:[1,97]},{24:[1,98],72:99},o($Vr,[2,65]),{4:67,6:3,8:4,9:5,10:6,14:7,16:$V0},{85:[1,100]},{20:$Vx,22:31,24:$V7,26:[1,101],29:32,36:82,50:28,63:103,72:30,73:$V8,74:33,75:34,76:35,77:36,78:37,79:38,80:$V9,81:$Va,82:$Vb,83:$Vc,84:$Vd,85:$Ve,87:$Vf,88:$Vg,89:102},{20:$Vx,22:31,24:$V7,29:32,36:82,50:28,63:103,72:30,73:$V8,74:33,75:34,76:35,77:36,78:37,79:38,80:$V9,81:$Va,82:$Vb,83:$Vc,84:$Vd,85:$Ve,87:$Vf,88:$Vg,89:105},{29:106,80:$V9},{29:107,80:$V9},o($Vi,[2,27],{13:11,42:$V3}),o($V4,[2,41],{48:108,43:[1,109],44:[1,110]}),o($Vy,[2,43]),o($Vy,[2,45],{51:[1,111]}),o($Vj,[2,56],{65:$Vm,66:$Vn,67:$Vo,68:$Vp,70:$Vq}),o([5,26,31,42,45,64],[2,55],{43:$Vz}),o($VA,[2,92],{65:$Vm,66:$Vn,67:$Vo,68:$Vp,70:$Vq}),o($VB,[2,13],{21:113,33:114,34:$VC,37:$VD,38:$VE}),o($VF,[2,17],{22:118,23:[1,119],27:[1,120],85:$Vw,86:$Vt}),{4:122,6:3,8:4,9:5,10:6,14:7,16:$V0,22:31,24:$V7,25:121,29:32,36:82,50:28,63:123,72:30,73:$V8,74:33,75:34,76:35,77:36,78:37,79:38,80:$V9,81:$Va,82:$Vb,83:$Vc,84:$Vd,85:$Ve,87:$Vf,88:$Vg},o([5,18,23,26,27,31,34,35,37,38,41,42,43,45,62,85,86],$Vu),o($Vl,[2,95]),{19:124,22:84,24:$Vv,85:$Vw},o($Vl,[2,98],{86:$Vt}),o([5,18,23,26,31,34,37,38,41,42,43,45,62,64,65,67,70],[2,58],{66:$Vn,68:$Vp}),o([5,18,23,26,31,34,37,38,41,42,43,45,62,64,65,66,67,70],[2,59],{68:$Vp}),o([5,18,23,26,31,34,37,38,41,42,43,45,62,64,67,70],[2,60],{65:$Vm,66:$Vn,68:$Vp}),o($Vr,[2,61]),{65:$Vm,66:$Vn,67:$Vo,68:$Vp,70:[1,125]},o($VG,[2,62],{65:$Vm,66:$Vn,67:$Vo,68:$Vp}),o($Vr,[2,57]),o($Vr,[2,69]),{4:67,6:3,8:4,9:5,10:6,14:7,16:$V0,22:31,24:$V7,25:126,29:32,36:82,50:28,63:123,72:30,73:$V8,74:33,75:34,76:35,77:36,78:37,79:38,80:$V9,81:$Va,82:$Vb,83:$Vc,84:$Vd,85:$Ve,87:$Vf,88:$Vg},o($Vr,[2,64]),o([5,18,23,26,27,31,34,35,37,38,41,42,43,44,45,51,62,64,65,66,67,68,70,71,85,86],[2,85]),o($Vs,[2,88]),{26:[1,127]},{26:[2,90],43:$Vz},{22:31,24:$V7,29:32,36:82,50:28,63:128,72:30,73:$V8,74:33,75:34,76:35,77:36,78:37,79:38,80:$V9,81:$Va,82:$Vb,83:$Vc,84:$Vd,85:$Ve,87:$Vf,88:$Vg},{26:[1,129]},o($V4,[2,39]),o($V4,[2,40]),o($V4,[2,42]),{22:31,29:32,49:130,50:79,74:33,75:34,76:35,77:36,78:37,79:38,80:$V9,81:$Va,82:$Vb,83:$Vc,84:$Vd,85:$Ve,87:$Vf,88:$Vg},{29:132,52:131,80:$V9},o($Vy,[2,46]),{22:31,29:32,50:133,74:33,75:34,76:35,77:36,78:37,79:38,80:$V9,81:$Va,82:$Vb,83:$Vc,84:$Vd,85:$Ve,87:$Vf,88:$Vg},o($VB,[2,15],{33:134,34:$VC,37:$VD,38:$VE}),o($VH,[2,28]),{19:135,22:84,24:$Vv,85:$Vw},{34:[1,136],39:[1,137],40:[1,138]},{34:[1,139],39:[1,140],40:[1,141]},o($VF,[2,18],{86:$Vt}),{22:142,85:$Vw},{28:[1,143]},{26:[1,144]},{26:[1,145]},{26:[2,78],43:$Vz},o($VB,[2,14],{33:114,21:146,34:$VC,37:$VD,38:$VE}),{22:31,24:$V7,29:32,36:147,50:28,72:30,73:$V8,74:33,75:34,76:35,77:36,78:37,79:38,80:$V9,81:$Va,82:$Vb,83:$Vc,84:$Vd,85:$Ve,87:$Vf,88:$Vg},{26:[1,148]},o($Vs,[2,89]),{26:[2,91],43:$Vz},o($Vs,[2,87]),o($Vy,[2,44]),o($V4,[2,47],{53:149,56:[1,150]}),{54:[1,151],55:[1,152]},o($VA,[2,93]),o($VH,[2,29]),{35:[1,153]},{19:154,22:84,24:$Vv,85:$Vw},{34:[1,155]},{34:[1,156]},{19:157,22:84,24:$Vv,85:$Vw},{34:[1,158]},{34:[1,159]},o($VF,[2,19],{86:$Vt}),{24:[1,160]},o($VF,[2,20]),o($VF,[2,21],{22:161,85:$Vw}),o($VB,[2,16],{33:134,34:$VC,37:$VD,38:$VE}),o($VG,[2,68],{65:$Vm,66:$Vn,67:$Vo,68:$Vp}),o($Vr,[2,63]),o($V4,[2,48]),{57:[1,162],59:[1,163]},o($VI,[2,49]),o($VI,[2,50]),{22:31,24:$V7,29:32,36:164,50:28,72:30,73:$V8,74:33,75:34,76:35,77:36,78:37,79:38,80:$V9,81:$Va,82:$Vb,83:$Vc,84:$Vd,85:$Ve,87:$Vf,88:$Vg},{35:[1,165]},{19:166,22:84,24:$Vv,85:$Vw},{19:167,22:84,24:$Vv,85:$Vw},{35:[1,168]},{19:169,22:84,24:$Vv,85:$Vw},{19:170,22:84,24:$Vv,85:$Vw},{29:171,80:$V9},o($VF,[2,22],{86:$Vt}),{29:132,52:172,80:$V9},{29:132,52:173,80:$V9},o($VH,[2,30],{65:$Vm,66:$Vn,67:$Vo,68:$Vp,70:$Vq}),{22:31,24:$V7,29:32,36:174,50:28,72:30,73:$V8,74:33,75:34,76:35,77:36,78:37,79:38,80:$V9,81:$Va,82:$Vb,83:$Vc,84:$Vd,85:$Ve,87:$Vf,88:$Vg},{35:[1,175]},{35:[1,176]},{22:31,24:$V7,29:32,36:177,50:28,72:30,73:$V8,74:33,75:34,76:35,77:36,78:37,79:38,80:$V9,81:$Va,82:$Vb,83:$Vc,84:$Vd,85:$Ve,87:$Vf,88:$Vg},{35:[1,178]},{35:[1,179]},{26:[1,180]},{58:[1,181]},{58:[1,182]},o($VH,[2,31],{65:$Vm,66:$Vn,67:$Vo,68:$Vp,70:$Vq}),{22:31,24:$V7,29:32,36:183,50:28,72:30,73:$V8,74:33,75:34,76:35,77:36,78:37,79:38,80:$V9,81:$Va,82:$Vb,83:$Vc,84:$Vd,85:$Ve,87:$Vf,88:$Vg},{22:31,24:$V7,29:32,36:184,50:28,72:30,73:$V8,74:33,75:34,76:35,77:36,78:37,79:38,80:$V9,81:$Va,82:$Vb,83:$Vc,84:$Vd,85:$Ve,87:$Vf,88:$Vg},o($VH,[2,32],{65:$Vm,66:$Vn,67:$Vo,68:$Vp,70:$Vq}),{22:31,24:$V7,29:32,36:185,50:28,72:30,73:$V8,74:33,75:34,76:35,77:36,78:37,79:38,80:$V9,81:$Va,82:$Vb,83:$Vc,84:$Vd,85:$Ve,87:$Vf,88:$Vg},{22:31,24:$V7,29:32,36:186,50:28,72:30,73:$V8,74:33,75:34,76:35,77:36,78:37,79:38,80:$V9,81:$Va,82:$Vb,83:$Vc,84:$Vd,85:$Ve,87:$Vf,88:$Vg},o($VF,[2,23]),o($V4,[2,51]),o($V4,[2,52]),o($VH,[2,33],{65:$Vm,66:$Vn,67:$Vo,68:$Vp,70:$Vq}),o($VH,[2,35],{65:$Vm,66:$Vn,67:$Vo,68:$Vp,70:$Vq}),o($VH,[2,34],{65:$Vm,66:$Vn,67:$Vo,68:$Vp,70:$Vq}),o($VH,[2,36],{65:$Vm,66:$Vn,67:$Vo,68:$Vp,70:$Vq})],
defaultActions: {9:[2,1]},
parseError: function parseError (str, hash) {
if (hash.recoverable) {
this.trace(str);
} else {
throw new Error(str);
}
},
parse: function parse(input) {
var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
var args = lstack.slice.call(arguments, 1);
var lexer = Object.create(this.lexer);
var sharedState = { yy: {} };
for (var k in this.yy) {
if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
sharedState.yy[k] = this.yy[k];
}
}
lexer.setInput(input, sharedState.yy);
sharedState.yy.lexer = lexer;
sharedState.yy.parser = this;
if (typeof lexer.yylloc == 'undefined') {
lexer.yylloc = {};
}
var yyloc = lexer.yylloc;
lstack.push(yyloc);
var ranges = lexer.options && lexer.options.ranges;
if (typeof sharedState.yy.parseError === 'function') {
this.parseError = sharedState.yy.parseError;
} else {
this.parseError = Object.getPrototypeOf(this).parseError;
}
function popStack(n) {
stack.length = stack.length - 2 * n;
vstack.length = vstack.length - n;
lstack.length = lstack.length - n;
}
_token_stack:
function lex() {
var token;
token = lexer.lex() || EOF;
if (typeof token !== 'number') {
token = self.symbols_[token] || token;
}
return token;
}
var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
while (true) {
state = stack[stack.length - 1];
if (this.defaultActions[state]) {
action = this.defaultActions[state];
} else {
if (symbol === null || typeof symbol == 'undefined') {
symbol = lex();
}
action = table[state] && table[state][symbol];
}
if (typeof action === 'undefined' || !action.length || !action[0]) {
var errStr = '';
expected = [];
for (p in table[state]) {
if (this.terminals_[p] && p > TERROR) {
expected.push('\'' + this.terminals_[p] + '\'');
}
}
if (lexer.showPosition) {
errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\'';
} else {
errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\'');
}
this.parseError(errStr, {
text: lexer.match,
token: this.terminals_[symbol] || symbol,
line: lexer.yylineno,
loc: yyloc,
expected: expected
});
}
if (action[0] instanceof Array && action.length > 1) {
throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
}
switch (action[0]) {
case 1:
stack.push(symbol);
vstack.push(lexer.yytext);
lstack.push(lexer.yylloc);
stack.push(action[1]);
symbol = null;
if (!preErrorSymbol) {
yyleng = lexer.yyleng;
yytext = lexer.yytext;
yylineno = lexer.yylineno;
yyloc = lexer.yylloc;
if (recovering > 0) {
recovering--;
}
} else {
symbol = preErrorSymbol;
preErrorSymbol = null;
}
break;
case 2:
len = this.productions_[action[1]][1];
yyval.$ = vstack[vstack.length - len];
yyval._$ = {
first_line: lstack[lstack.length - (len || 1)].first_line,
last_line: lstack[lstack.length - 1].last_line,
first_column: lstack[lstack.length - (len || 1)].first_column,
last_column: lstack[lstack.length - 1].last_column
};
if (ranges) {
yyval._$.range = [
lstack[lstack.length - (len || 1)].range[0],
lstack[lstack.length - 1].range[1]
];
}
r = this.performAction.apply(yyval, [
yytext,
yyleng,
yylineno,
sharedState.yy,
action[1],
vstack,
lstack
].concat(args));
if (typeof r !== 'undefined') {
return r;
}
if (len) {
stack = stack.slice(0, -1 * len * 2);
vstack = vstack.slice(0, -1 * len);
lstack = lstack.slice(0, -1 * len);
}
stack.push(this.productions_[action[1]][0]);
vstack.push(yyval.$);
lstack.push(yyval._$);
newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
stack.push(newState);
break;
case 3:
return true;
}
}
return true;
}};
function Parser () {
this.yy = {};
}
Parser.prototype = parser;parser.Parser = Parser;
return new Parser;
})();
if (typeof require !== 'undefined' && typeof exports !== 'undefined') {
exports.parser = parser;
exports.Parser = parser.Parser;
exports.parse = function () { return parser.parse.apply(parser, arguments); };
exports.main = function commonjsMain (args) {
if (!args[1]) {
console.log('Usage: '+args[0]+' FILE');
process.exit(1);
}
var source = require('fs').readFileSync(require('path').normalize(args[1]), "utf8");
return exports.parser.parse(source);
};
if (typeof module !== 'undefined' && require.main === module) {
exports.main(process.argv.slice(1));
}
}