geostyler-cql-parser
Version:
Translates CQL Filters and Geostyler Style Filters
1,016 lines (975 loc) • 47.3 kB
JavaScript
/* parser generated by jison 0.4.18 */
/*
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)
}
*/
(typeof window !== 'undefined' ? window : global).cqlParser = (function(){
var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,29],$V1=[1,30],$V2=[1,31],$V3=[1,32],$V4=[1,33],$V5=[1,34],$V6=[1,21],$V7=[1,22],$V8=[1,13],$V9=[1,28],$Va=[1,23],$Vb=[1,24],$Vc=[1,25],$Vd=[1,26],$Ve=[1,27],$Vf=[1,14],$Vg=[1,15],$Vh=[1,5],$Vi=[1,39],$Vj=[1,36],$Vk=[1,37],$Vl=[1,38],$Vm=[5,24,25,33,34,36,39,50,70,86,87,88],$Vn=[5,24,25,33,34,36,39,50,70,75,76,77,78,79,80,81,83,86,87,88],$Vo=[1,56],$Vp=[1,57],$Vq=[1,52],$Vr=[1,53],$Vs=[1,54],$Vt=[1,55],$Vu=[1,58],$Vv=[1,59],$Vw=[1,60],$Vx=[1,61],$Vy=[1,62],$Vz=[1,63],$VA=[1,64],$VB=[2,57],$VC=[5,24,25,33,34,36,39,41,43,50,52,53,54,55,56,57,58,59,60,61,63,67,69,70,71,72,73,75,76,77,78,79,80,81,83,86,87,88],$VD=[5,24,25,33,34,36,39,41,43,50,52,53,54,55,56,57,58,59,60,61,63,65,67,69,70,71,72,73,75,76,77,78,79,80,81,83,86,87,88],$VE=[1,65],$VF=[2,20],$VG=[9,11,12,14,15,17,19,21,22,38,41,43,44,45,46,48,49],$VH=[1,104],$VI=[24,25],$VJ=[2,18],$VK=[5,24,25,33,34,36,39,50,87,88],$VL=[5,24,25,33,34,36,39,50,52,53,54,55,61,63,67,69,70,71,72,73,75,76,77,78,79,80,81,83,86,87,88],$VM=[5,24,25,33,34,36,39,41,43,50,52,53,54,55,61,63,67,69,70,71,72,73,75,76,77,78,79,80,81,83,86,87,88],$VN=[33,36,39];
var parser = {trace: function trace () { },
yy: {},
symbols_: {"error":2,"main":3,"where_opt":4,"EOF":5,"semicolonOpt":6,";":7,"string":8,"STRING":9,"number":10,"NUMERIC":11,"EXPONENT_NUMERIC":12,"boolean":13,"TRUE":14,"FALSE":15,"null":16,"NULL":17,"literal":18,"place_holder":19,"function_call":20,"IDENTIFIER":21,"(":22,"function_call_param_list":23,")":24,",":25,"function_call_param":26,"expr":27,"identifier":28,"DOT":29,"identifier_list":30,"case_expr_opt":31,"when_then_list":32,"WHEN":33,"THEN":34,"case_when_else":35,"ELSE":36,"case_when":37,"CASE":38,"END":39,"simple_expr_prefix":40,"+":41,"simple_expr":42,"-":43,"~":44,"!":45,"BINARY":46,"expr_list":47,"ROW":48,"{":49,"}":50,"bit_expr":51,"|":52,"&":53,"<<":54,">>":55,"*":56,"/":57,"DIV":58,"MOD":59,"%":60,"^":61,"not_opt":62,"NOT":63,"escape_opt":64,"ESCAPE":65,"predicate":66,"IN":67,"selectClause":68,"BETWEEN":69,"AND":70,"SOUNDS":71,"LIKE":72,"REGEXP":73,"comparison_operator":74,"=":75,">=":76,">":77,"<=":78,"<":79,"<>":80,"!=":81,"boolean_primary":82,"IS":83,"boolean_extra":84,"UNKNOWN":85,"&&":86,"||":87,"OR":88,"group_by_opt":89,"group_by":90,"roll_up_opt":91,"WITH":92,"ROLLUP":93,"order_by_opt":94,"order_by":95,"ORDER_BY":96,"group_by_order_by_item_list":97,"group_by_order_by_item":98,"sort_opt":99,"ASC":100,"DESC":101,"limit":102,"LIMIT":103,"OFFSET":104,"limit_opt":105,"procedure_opt":106,"procedure":107,"PROCEDURE":108,"for_update_lock_in_share_mode_opt":109,"FOR":110,"UPDATE":111,"LOCK":112,"SHARE":113,"MODE":114,"left_right":115,"LEFT":116,"RIGHT":117,"out_opt":118,"OUTER":119,"left_right_out_opt":120,"table_reference":121,"table_factor":122,"join_table":123,"identifier_list_opt":124,"$accept":0,"$end":1},
terminals_: {2:"error",5:"EOF",7:";",9:"STRING",11:"NUMERIC",12:"EXPONENT_NUMERIC",14:"TRUE",15:"FALSE",17:"NULL",19:"place_holder",21:"IDENTIFIER",22:"(",24:")",25:",",29:"DOT",33:"WHEN",34:"THEN",36:"ELSE",38:"CASE",39:"END",41:"+",43:"-",44:"~",45:"!",46:"BINARY",48:"ROW",49:"{",50:"}",52:"|",53:"&",54:"<<",55:">>",56:"*",57:"/",58:"DIV",59:"MOD",60:"%",61:"^",63:"NOT",65:"ESCAPE",67:"IN",68:"selectClause",69:"BETWEEN",70:"AND",71:"SOUNDS",72:"LIKE",73:"REGEXP",75:"=",76:">=",77:">",78:"<=",79:"<",80:"<>",81:"!=",83:"IS",85:"UNKNOWN",86:"&&",87:"||",88:"OR",90:"group_by",92:"WITH",93:"ROLLUP",96:"ORDER_BY",98:"group_by_order_by_item",100:"ASC",101:"DESC",103:"LIMIT",104:"OFFSET",108:"PROCEDURE",110:"FOR",111:"UPDATE",112:"LOCK",113:"SHARE",114:"MODE",116:"LEFT",117:"RIGHT",119:"OUTER",122:"table_factor",123:"join_table"},
productions_: [0,[3,2],[6,1],[6,0],[8,1],[10,1],[10,1],[13,1],[13,1],[16,1],[18,1],[18,1],[18,1],[18,1],[18,1],[20,4],[23,3],[23,1],[26,0],[26,1],[28,1],[28,3],[30,1],[30,3],[31,0],[31,1],[32,4],[32,5],[35,0],[35,2],[37,5],[40,2],[40,2],[40,2],[40,2],[40,2],[42,1],[42,1],[42,1],[42,1],[42,3],[42,4],[42,4],[42,1],[51,1],[51,3],[51,3],[51,3],[51,3],[51,3],[51,3],[51,3],[51,3],[51,3],[51,3],[51,3],[51,3],[62,0],[62,1],[64,0],[64,2],[66,1],[66,6],[66,6],[66,6],[66,4],[66,5],[66,4],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[82,1],[82,4],[82,3],[84,1],[84,1],[27,1],[27,2],[27,3],[27,3],[27,3],[27,3],[47,1],[47,3],[4,1],[89,0],[89,1],[91,0],[91,2],[94,0],[94,1],[95,3],[97,1],[97,3],[99,0],[99,1],[99,1],[102,2],[102,4],[102,4],[105,0],[105,1],[106,0],[106,1],[107,2],[109,0],[109,2],[109,4],[115,1],[115,1],[118,0],[118,1],[120,0],[120,2],[121,1],[121,1],[124,0],[124,1]],
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 7: case 92:
this.$ = true
break;
case 3: case 8:
this.$ = false
break;
case 4:
if ($$[$0].startsWith('\'') || $$[$0].startsWith('"')) {
this.$ = $$[$0].substring(1, $$[$0].length - 1)
} else {
this.$ = $$[$0]
}
break;
case 5: case 6:
this.$ = Number($$[$0])
break;
case 9: case 18: case 24: case 28: case 57: case 59: case 89: case 91: case 93: case 98: case 104: case 106: case 109: case 114: case 120:
this.$ = null
break;
case 10: case 11: case 12: case 13: case 14: case 19: case 20: case 25: case 29: case 36: case 37: case 38: case 39: case 43: case 44: case 58: case 60: case 61: case 69: case 70: case 71: case 72: case 73: case 74: case 75: case 78: case 80: case 88: case 90: case 94: case 99: case 100: case 105: case 107: case 108: case 112: case 113: case 115: case 118: case 119: case 121:
this.$ = $$[$0]
break;
case 15:
this.$ = { name: $$[$0-3], args: $$[$0-1]}
break;
case 16:
$$[$0-2].push($$[$0]); this.$ = $$[$0-2];
break;
case 17:
this.$ = [$$[$0]];
break;
case 21:
this.$ = $$[$0-2]; $$[$0-2].value += '.' + $$[$0]
break;
case 22:
this.$ = { type: 'IdentifierList', value: [ $$[$0] ] }
break;
case 23:
this.$ = $$[$0-2]; $$[$0-2].value.push($$[$0]);
break;
case 26:
this.$ = { type: 'WhenThenList', value: [ { when: $$[$0-2], then: $$[$0] } ] };
break;
case 27:
this.$ = $$[$0-4]; this.$.value.push({ when: $$[$0-2], then: $$[$0] });
break;
case 30:
this.$ = { type: 'CaseWhen', caseExprOpt: $$[$0-3], whenThenList: $$[$0-2], else: $$[$0-1] }
break;
case 31: case 32: case 33: case 34: case 35:
this.$ = { type: 'Prefix', prefix: $$[$0-1], value: $$[$0] }
break;
case 40:
if ($$[$0-1].length === 1) this.$ = $$[$0-1][0]; else this.$ = $$[$0-1]
break;
case 41:
this.$ = $$[$0-2]
break;
case 42:
this.$ = { type: 'IdentifierExpr', identifier: $$[$0-2], value: $$[$0-1] }
break;
case 45:
this.$ = { type: 'BitExpression', operator: '|', left: $$[$0-2], right: $$[$0] }
break;
case 46:
this.$ = { type: 'BitExpression', operator: '&', left: $$[$0-2], right: $$[$0] }
break;
case 47:
this.$ = { type: 'BitExpression', operator: '<<', left: $$[$0-2], right: $$[$0] }
break;
case 48:
this.$ = { type: 'BitExpression', operator: '>>', left: $$[$0-2], right: $$[$0] }
break;
case 49:
this.$ = { type: 'BitExpression', operator: '+', left: $$[$0-2], right: $$[$0] }
break;
case 50:
this.$ = { type: 'BitExpression', operator: '-', left: $$[$0-2], right: $$[$0] }
break;
case 51:
this.$ = { type: 'BitExpression', operator: '*', left: $$[$0-2], right: $$[$0] }
break;
case 52:
this.$ = { type: 'BitExpression', operator: '/', left: $$[$0-2], right: $$[$0] }
break;
case 53:
this.$ = { type: 'BitExpression', operator: 'DIV', left: $$[$0-2], right: $$[$0] }
break;
case 54:
this.$ = { type: 'BitExpression', operator: 'MOD', left: $$[$0-2], right: $$[$0] }
break;
case 55:
this.$ = { type: 'BitExpression', operator: '%', left: $$[$0-2], right: $$[$0] }
break;
case 56:
this.$ = { type: 'BitExpression', operator: '^', left: $$[$0-2], right: $$[$0] }
break;
case 62:
this.$ = { type: 'InSubQueryPredicate', hasNot: $$[$0-4], left: $$[$0-5] ,right: $$[$0-1] }
break;
case 63:
this.$ = { type: 'InExpressionListPredicate', hasNot: $$[$0-4], left: $$[$0-5], right: $$[$0-1] }
break;
case 64:
this.$ = ['<=x<=', $$[$0-5], $$[$0-2], $$[$0]]
break;
case 65:
this.$ = { type: 'SoundsLikePredicate', hasNot: false, left: $$[$0-3], right: $$[$0] }
break;
case 66:
this.$ = { type: 'LikePredicate', hasNot: $$[$0-3], left: $$[$0-4], right: $$[$0-1], escape: $$[$0] }
break;
case 67:
this.$ = { type: 'RegexpPredicate', hasNot: $$[$0-2], left: $$[$0-3], right: $$[$0] }
break;
case 68:
this.$ = '=='
break;
case 76:
this.$ = ['==', $$[$0-3], null]
break;
case 77:
this.$ = [$$[$0-1], $$[$0-2], $$[$0]]
break;
case 79:
this.$ = { type: 'BooleanExtra', value: $$[$0] }
break;
case 81:
this.$ = ['!', $$[$0]]
break;
case 82: case 85:
this.$ = ['&&', $$[$0-2], $$[$0]]
break;
case 83: case 84:
this.$ = ['||', $$[$0-2], $$[$0]]
break;
case 86:
this.$ = [$$[$0]]
break;
case 87:
this.$ = $$[$0-2]; this.$.push($$[$0]);
break;
case 95:
this.$ = { type: 'OrderBy', value: $$[$0-1], rollUp: $$[$0] }
break;
case 96:
this.$ = [ $$[$0] ]
break;
case 97:
this.$ = $$[$0-2]; $$[$0-2].push($$[$0]);
break;
case 101:
this.$ = { type: 'Limit', value: [ $$[$0] ] }
break;
case 102:
this.$ = { type: 'Limit', value: [ $$[$0-2], $$[$0] ] }
break;
case 103:
this.$ = { type: 'Limit', value: [ $$[$0], $$[$0-2] ], offsetMode: true }
break;
case 110:
this.$ = $$[$0-1] + ' ' + $$[$0]
break;
case 111:
this.$ = $$[$0-3] + ' ' + $$[$0-2] + ' ' + $$[$0-1] + ' ' + $$[$0]
break;
case 116:
this.$ = { leftRight: null, outOpt: null }
break;
case 117:
this.$ = { leftRight: $$[$0-1], outOpt: $$[$0] }
break;
}
},
table: [{3:1,4:2,8:17,9:$V0,10:18,11:$V1,12:$V2,13:19,14:$V3,15:$V4,16:20,17:$V5,18:9,19:$V6,20:11,21:$V7,22:$V8,27:3,28:10,37:16,38:$V9,40:12,41:$Va,42:8,43:$Vb,44:$Vc,45:$Vd,46:$Ve,48:$Vf,49:$Vg,51:7,63:$Vh,66:6,82:4},{1:[3]},{5:[1,35]},{5:[2,88],70:$Vi,86:$Vj,87:$Vk,88:$Vl},o($Vm,[2,80],{74:41,75:[1,42],76:[1,43],77:[1,44],78:[1,45],79:[1,46],80:[1,47],81:[1,48],83:[1,40]}),{8:17,9:$V0,10:18,11:$V1,12:$V2,13:19,14:$V3,15:$V4,16:20,17:$V5,18:9,19:$V6,20:11,21:$V7,22:$V8,27:49,28:10,37:16,38:$V9,40:12,41:$Va,42:8,43:$Vb,44:$Vc,45:$Vd,46:$Ve,48:$Vf,49:$Vg,51:7,63:$Vh,66:6,82:4},o($Vn,[2,75]),o($Vn,[2,61],{62:50,41:$Vo,43:$Vp,52:$Vq,53:$Vr,54:$Vs,55:$Vt,56:$Vu,57:$Vv,58:$Vw,59:$Vx,60:$Vy,61:$Vz,63:$VA,67:$VB,69:$VB,72:$VB,73:$VB,71:[1,51]}),o($VC,[2,44]),o($VD,[2,36]),o($VD,[2,37],{29:$VE}),o($VD,[2,38]),o($VD,[2,39]),{8:17,9:$V0,10:18,11:$V1,12:$V2,13:19,14:$V3,15:$V4,16:20,17:$V5,18:9,19:$V6,20:11,21:$V7,22:$V8,27:67,28:10,37:16,38:$V9,40:12,41:$Va,42:8,43:$Vb,44:$Vc,45:$Vd,46:$Ve,47:66,48:$Vf,49:$Vg,51:7,63:$Vh,66:6,82:4},{22:[1,68]},{21:[1,70],28:69},o($VD,[2,43]),o($VD,[2,10]),o($VD,[2,11]),o($VD,[2,12]),o($VD,[2,13]),o($VD,[2,14]),o([5,24,25,29,33,34,36,39,41,43,50,52,53,54,55,56,57,58,59,60,61,63,65,67,69,70,71,72,73,75,76,77,78,79,80,81,83,86,87,88],$VF,{22:[1,71]}),{8:17,9:$V0,10:18,11:$V1,12:$V2,13:19,14:$V3,15:$V4,16:20,17:$V5,18:9,19:$V6,20:11,21:$V7,22:$V8,28:10,37:16,38:$V9,40:12,41:$Va,42:72,43:$Vb,44:$Vc,45:$Vd,46:$Ve,48:$Vf,49:$Vg},{8:17,9:$V0,10:18,11:$V1,12:$V2,13:19,14:$V3,15:$V4,16:20,17:$V5,18:9,19:$V6,20:11,21:$V7,22:$V8,28:10,37:16,38:$V9,40:12,41:$Va,42:73,43:$Vb,44:$Vc,45:$Vd,46:$Ve,48:$Vf,49:$Vg},{8:17,9:$V0,10:18,11:$V1,12:$V2,13:19,14:$V3,15:$V4,16:20,17:$V5,18:9,19:$V6,20:11,21:$V7,22:$V8,28:10,37:16,38:$V9,40:12,41:$Va,42:74,43:$Vb,44:$Vc,45:$Vd,46:$Ve,48:$Vf,49:$Vg},{8:17,9:$V0,10:18,11:$V1,12:$V2,13:19,14:$V3,15:$V4,16:20,17:$V5,18:9,19:$V6,20:11,21:$V7,22:$V8,28:10,37:16,38:$V9,40:12,41:$Va,42:75,43:$Vb,44:$Vc,45:$Vd,46:$Ve,48:$Vf,49:$Vg},{8:17,9:$V0,10:18,11:$V1,12:$V2,13:19,14:$V3,15:$V4,16:20,17:$V5,18:9,19:$V6,20:11,21:$V7,22:$V8,28:10,37:16,38:$V9,40:12,41:$Va,42:76,43:$Vb,44:$Vc,45:$Vd,46:$Ve,48:$Vf,49:$Vg},{8:17,9:$V0,10:18,11:$V1,12:$V2,13:19,14:$V3,15:$V4,16:20,17:$V5,18:9,19:$V6,20:11,21:$V7,22:$V8,27:78,28:10,31:77,33:[2,24],37:16,38:$V9,40:12,41:$Va,42:8,43:$Vb,44:$Vc,45:$Vd,46:$Ve,48:$Vf,49:$Vg,51:7,63:$Vh,66:6,82:4},o($VD,[2,4]),o($VD,[2,5]),o($VD,[2,6]),o($VD,[2,7]),o($VD,[2,8]),o($VD,[2,9]),{1:[2,1]},{8:17,9:$V0,10:18,11:$V1,12:$V2,13:19,14:$V3,15:$V4,16:20,17:$V5,18:9,19:$V6,20:11,21:$V7,22:$V8,27:79,28:10,37:16,38:$V9,40:12,41:$Va,42:8,43:$Vb,44:$Vc,45:$Vd,46:$Ve,48:$Vf,49:$Vg,51:7,63:$Vh,66:6,82:4},{8:17,9:$V0,10:18,11:$V1,12:$V2,13:19,14:$V3,15:$V4,16:20,17:$V5,18:9,19:$V6,20:11,21:$V7,22:$V8,27:80,28:10,37:16,38:$V9,40:12,41:$Va,42:8,43:$Vb,44:$Vc,45:$Vd,46:$Ve,48:$Vf,49:$Vg,51:7,63:$Vh,66:6,82:4},{8:17,9:$V0,10:18,11:$V1,12:$V2,13:19,14:$V3,15:$V4,16:20,17:$V5,18:9,19:$V6,20:11,21:$V7,22:$V8,27:81,28:10,37:16,38:$V9,40:12,41:$Va,42:8,43:$Vb,44:$Vc,45:$Vd,46:$Ve,48:$Vf,49:$Vg,51:7,63:$Vh,66:6,82:4},{8:17,9:$V0,10:18,11:$V1,12:$V2,13:19,14:$V3,15:$V4,16:20,17:$V5,18:9,19:$V6,20:11,21:$V7,22:$V8,27:82,28:10,37:16,38:$V9,40:12,41:$Va,42:8,43:$Vb,44:$Vc,45:$Vd,46:$Ve,48:$Vf,49:$Vg,51:7,63:$Vh,66:6,82:4},{17:$VB,62:83,63:$VA},{8:17,9:$V0,10:18,11:$V1,12:$V2,13:19,14:$V3,15:$V4,16:20,17:$V5,18:9,19:$V6,20:11,21:$V7,22:$V8,28:10,37:16,38:$V9,40:12,41:$Va,42:8,43:$Vb,44:$Vc,45:$Vd,46:$Ve,48:$Vf,49:$Vg,51:7,66:84},o($VG,[2,68]),o($VG,[2,69]),o($VG,[2,70]),o($VG,[2,71]),o($VG,[2,72]),o($VG,[2,73]),o($VG,[2,74]),o($Vm,[2,81]),{67:[1,85],69:[1,86],72:[1,87],73:[1,88]},{72:[1,89]},{8:17,9:$V0,10:18,11:$V1,12:$V2,13:19,14:$V3,15:$V4,16:20,17:$V5,18:9,19:$V6,20:11,21:$V7,22:$V8,28:10,37:16,38:$V9,40:12,41:$Va,42:8,43:$Vb,44:$Vc,45:$Vd,46:$Ve,48:$Vf,49:$Vg,51:90},{8:17,9:$V0,10:18,11:$V1,12:$V2,13:19,14:$V3,15:$V4,16:20,17:$V5,18:9,19:$V6,20:11,21:$V7,22:$V8,28:10,37:16,38:$V9,40:12,41:$Va,42:8,43:$Vb,44:$Vc,45:$Vd,46:$Ve,48:$Vf,49:$Vg,51:91},{8:17,9:$V0,10:18,11:$V1,12:$V2,13:19,14:$V3,15:$V4,16:20,17:$V5,18:9,19:$V6,20:11,21:$V7,22:$V8,28:10,37:16,38:$V9,40:12,41:$Va,42:8,43:$Vb,44:$Vc,45:$Vd,46:$Ve,48:$Vf,49:$Vg,51:92},{8:17,9:$V0,10:18,11:$V1,12:$V2,13:19,14:$V3,15:$V4,16:20,17:$V5,18:9,19:$V6,20:11,21:$V7,22:$V8,28:10,37:16,38:$V9,40:12,41:$Va,42:8,43:$Vb,44:$Vc,45:$Vd,46:$Ve,48:$Vf,49:$Vg,51:93},{8:17,9:$V0,10:18,11:$V1,12:$V2,13:19,14:$V3,15:$V4,16:20,17:$V5,18:9,19:$V6,20:11,21:$V7,22:$V8,28:10,37:16,38:$V9,40:12,41:$Va,42:8,43:$Vb,44:$Vc,45:$Vd,46:$Ve,48:$Vf,49:$Vg,51:94},{8:17,9:$V0,10:18,11:$V1,12:$V2,13:19,14:$V3,15:$V4,16:20,17:$V5,18:9,19:$V6,20:11,21:$V7,22:$V8,28:10,37:16,38:$V9,40:12,41:$Va,42:8,43:$Vb,44:$Vc,45:$Vd,46:$Ve,48:$Vf,49:$Vg,51:95},{8:17,9:$V0,10:18,11:$V1,12:$V2,13:19,14:$V3,15:$V4,16:20,17:$V5,18:9,19:$V6,20:11,21:$V7,22:$V8,28:10,37:16,38:$V9,40:12,41:$Va,42:8,43:$Vb,44:$Vc,45:$Vd,46:$Ve,48:$Vf,49:$Vg,51:96},{8:17,9:$V0,10:18,11:$V1,12:$V2,13:19,14:$V3,15:$V4,16:20,17:$V5,18:9,19:$V6,20:11,21:$V7,22:$V8,28:10,37:16,38:$V9,40:12,41:$Va,42:8,43:$Vb,44:$Vc,45:$Vd,46:$Ve,48:$Vf,49:$Vg,51:97},{8:17,9:$V0,10:18,11:$V1,12:$V2,13:19,14:$V3,15:$V4,16:20,17:$V5,18:9,19:$V6,20:11,21:$V7,22:$V8,28:10,37:16,38:$V9,40:12,41:$Va,42:8,43:$Vb,44:$Vc,45:$Vd,46:$Ve,48:$Vf,49:$Vg,51:98},{8:17,9:$V0,10:18,11:$V1,12:$V2,13:19,14:$V3,15:$V4,16:20,17:$V5,18:9,19:$V6,20:11,21:$V7,22:$V8,28:10,37:16,38:$V9,40:12,41:$Va,42:8,43:$Vb,44:$Vc,45:$Vd,46:$Ve,48:$Vf,49:$Vg,51:99},{8:17,9:$V0,10:18,11:$V1,12:$V2,13:19,14:$V3,15:$V4,16:20,17:$V5,18:9,19:$V6,20:11,21:$V7,22:$V8,28:10,37:16,38:$V9,40:12,41:$Va,42:8,43:$Vb,44:$Vc,45:$Vd,46:$Ve,48:$Vf,49:$Vg,51:100},{8:17,9:$V0,10:18,11:$V1,12:$V2,13:19,14:$V3,15:$V4,16:20,17:$V5,18:9,19:$V6,20:11,21:$V7,22:$V8,28:10,37:16,38:$V9,40:12,41:$Va,42:8,43:$Vb,44:$Vc,45:$Vd,46:$Ve,48:$Vf,49:$Vg,51:101},o([17,67,69,72,73],[2,58]),{21:[1,102]},{24:[1,103],25:$VH},o($VI,[2,86],{70:$Vi,86:$Vj,87:$Vk,88:$Vl}),{8:17,9:$V0,10:18,11:$V1,12:$V2,13:19,14:$V3,15:$V4,16:20,17:$V5,18:9,19:$V6,20:11,21:$V7,22:$V8,27:67,28:10,37:16,38:$V9,40:12,41:$Va,42:8,43:$Vb,44:$Vc,45:$Vd,46:$Ve,47:105,48:$Vf,49:$Vg,51:7,63:$Vh,66:6,82:4},{8:17,9:$V0,10:18,11:$V1,12:$V2,13:19,14:$V3,15:$V4,16:20,17:$V5,18:9,19:$V6,20:11,21:$V7,22:$V8,27:106,28:10,29:$VE,37:16,38:$V9,40:12,41:$Va,42:8,43:$Vb,44:$Vc,45:$Vd,46:$Ve,48:$Vf,49:$Vg,51:7,63:$Vh,66:6,82:4},o([9,11,12,14,15,17,19,21,22,29,38,41,43,44,45,46,48,49,63],$VF),o($VI,$VJ,{82:4,66:6,51:7,42:8,18:9,28:10,20:11,40:12,37:16,8:17,10:18,13:19,16:20,23:107,26:108,27:109,9:$V0,11:$V1,12:$V2,14:$V3,15:$V4,17:$V5,19:$V6,21:$V7,22:$V8,38:$V9,41:$Va,43:$Vb,44:$Vc,45:$Vd,46:$Ve,48:$Vf,49:$Vg,63:$Vh}),o($VD,[2,31]),o($VD,[2,32]),o($VD,[2,33]),o($VD,[2,34]),o($VD,[2,35]),{32:110,33:[1,111]},{33:[2,25],70:$Vi,86:$Vj,87:$Vk,88:$Vl},o($Vm,[2,82]),o($VK,[2,83],{70:$Vi,86:$Vj}),o($VK,[2,84],{70:$Vi,86:$Vj}),o($Vm,[2,85]),{17:[1,112]},o($Vn,[2,77]),{22:[1,113]},{8:17,9:$V0,10:18,11:$V1,12:$V2,13:19,14:$V3,15:$V4,16:20,17:$V5,18:9,19:$V6,20:11,21:$V7,22:$V8,28:10,37:16,38:$V9,40:12,41:$Va,42:8,43:$Vb,44:$Vc,45:$Vd,46:$Ve,48:$Vf,49:$Vg,51:114},{8:17,9:$V0,10:18,11:$V1,12:$V2,13:19,14:$V3,15:$V4,16:20,17:$V5,18:9,19:$V6,20:11,21:$V7,22:$V8,28:10,37:16,38:$V9,40:12,41:$Va,42:115,43:$Vb,44:$Vc,45:$Vd,46:$Ve,48:$Vf,49:$Vg},{8:17,9:$V0,10:18,11:$V1,12:$V2,13:19,14:$V3,15:$V4,16:20,17:$V5,18:9,19:$V6,20:11,21:$V7,22:$V8,28:10,37:16,38:$V9,40:12,41:$Va,42:8,43:$Vb,44:$Vc,45:$Vd,46:$Ve,48:$Vf,49:$Vg,51:116},{8:17,9:$V0,10:18,11:$V1,12:$V2,13:19,14:$V3,15:$V4,16:20,17:$V5,18:9,19:$V6,20:11,21:$V7,22:$V8,28:10,37:16,38:$V9,40:12,41:$Va,42:8,43:$Vb,44:$Vc,45:$Vd,46:$Ve,48:$Vf,49:$Vg,51:117},o([5,24,25,33,34,36,39,50,52,63,67,69,70,71,72,73,75,76,77,78,79,80,81,83,86,87,88],[2,45],{41:$Vo,43:$Vp,53:$Vr,54:$Vs,55:$Vt,56:$Vu,57:$Vv,58:$Vw,59:$Vx,60:$Vy,61:$Vz}),o([5,24,25,33,34,36,39,50,52,53,61,63,67,69,70,71,72,73,75,76,77,78,79,80,81,83,86,87,88],[2,46],{41:$Vo,43:$Vp,54:$Vs,55:$Vt,56:$Vu,57:$Vv,58:$Vw,59:$Vx,60:$Vy}),o($VL,[2,47],{41:$Vo,43:$Vp,56:$Vu,57:$Vv,58:$Vw,59:$Vx,60:$Vy}),o($VL,[2,48],{41:$Vo,43:$Vp,56:$Vu,57:$Vv,58:$Vw,59:$Vx,60:$Vy}),o($VM,[2,49],{56:$Vu,57:$Vv,58:$Vw,59:$Vx,60:$Vy}),o($VM,[2,50],{56:$Vu,57:$Vv,58:$Vw,59:$Vx,60:$Vy}),o($VC,[2,51]),o($VC,[2,52]),o($VC,[2,53]),o($VC,[2,54]),o($VC,[2,55]),o([5,24,25,33,34,36,39,50,52,61,63,67,69,70,71,72,73,75,76,77,78,79,80,81,83,86,87,88],[2,56],{41:$Vo,43:$Vp,53:$Vr,54:$Vs,55:$Vt,56:$Vu,57:$Vv,58:$Vw,59:$Vx,60:$Vy}),o([5,9,11,12,14,15,17,19,21,22,24,25,29,33,34,36,38,39,41,43,44,45,46,48,49,50,52,53,54,55,56,57,58,59,60,61,63,65,67,69,70,71,72,73,75,76,77,78,79,80,81,83,86,87,88],[2,21]),o($VD,[2,40]),{8:17,9:$V0,10:18,11:$V1,12:$V2,13:19,14:$V3,15:$V4,16:20,17:$V5,18:9,19:$V6,20:11,21:$V7,22:$V8,27:118,28:10,37:16,38:$V9,40:12,41:$Va,42:8,43:$Vb,44:$Vc,45:$Vd,46:$Ve,48:$Vf,49:$Vg,51:7,63:$Vh,66:6,82:4},{24:[1,119],25:$VH},{50:[1,120],70:$Vi,86:$Vj,87:$Vk,88:$Vl},{24:[1,121],25:[1,122]},o($VI,[2,17]),o($VI,[2,19],{70:$Vi,86:$Vj,87:$Vk,88:$Vl}),{33:[1,124],35:123,36:[1,125],39:[2,28]},{8:17,9:$V0,10:18,11:$V1,12:$V2,13:19,14:$V3,15:$V4,16:20,17:$V5,18:9,19:$V6,20:11,21:$V7,22:$V8,27:126,28:10,37:16,38:$V9,40:12,41:$Va,42:8,43:$Vb,44:$Vc,45:$Vd,46:$Ve,48:$Vf,49:$Vg,51:7,63:$Vh,66:6,82:4},o($Vn,[2,76]),{8:17,9:$V0,10:18,11:$V1,12:$V2,13:19,14:$V3,15:$V4,16:20,17:$V5,18:9,19:$V6,20:11,21:$V7,22:$V8,27:67,28:10,37:16,38:$V9,40:12,41:$Va,42:8,43:$Vb,44:$Vc,45:$Vd,46:$Ve,47:128,48:$Vf,49:$Vg,51:7,63:$Vh,66:6,68:[1,127],82:4},{41:$Vo,43:$Vp,52:$Vq,53:$Vr,54:$Vs,55:$Vt,56:$Vu,57:$Vv,58:$Vw,59:$Vx,60:$Vy,61:$Vz,70:[1,129]},o($Vn,[2,59],{64:130,65:[1,131]}),o($Vn,[2,67],{41:$Vo,43:$Vp,52:$Vq,53:$Vr,54:$Vs,55:$Vt,56:$Vu,57:$Vv,58:$Vw,59:$Vx,60:$Vy,61:$Vz}),o($Vn,[2,65],{41:$Vo,43:$Vp,52:$Vq,53:$Vr,54:$Vs,55:$Vt,56:$Vu,57:$Vv,58:$Vw,59:$Vx,60:$Vy,61:$Vz}),o($VI,[2,87],{70:$Vi,86:$Vj,87:$Vk,88:$Vl}),o($VD,[2,41]),o($VD,[2,42]),o($VD,[2,15]),o($VI,$VJ,{82:4,66:6,51:7,42:8,18:9,28:10,20:11,40:12,37:16,8:17,10:18,13:19,16:20,27:109,26:132,9:$V0,11:$V1,12:$V2,14:$V3,15:$V4,17:$V5,19:$V6,21:$V7,22:$V8,38:$V9,41:$Va,43:$Vb,44:$Vc,45:$Vd,46:$Ve,48:$Vf,49:$Vg,63:$Vh}),{39:[1,133]},{8:17,9:$V0,10:18,11:$V1,12:$V2,13:19,14:$V3,15:$V4,16:20,17:$V5,18:9,19:$V6,20:11,21:$V7,22:$V8,27:134,28:10,37:16,38:$V9,40:12,41:$Va,42:8,43:$Vb,44:$Vc,45:$Vd,46:$Ve,48:$Vf,49:$Vg,51:7,63:$Vh,66:6,82:4},{8:17,9:$V0,10:18,11:$V1,12:$V2,13:19,14:$V3,15:$V4,16:20,17:$V5,18:9,19:$V6,20:11,21:$V7,22:$V8,27:135,28:10,37:16,38:$V9,40:12,41:$Va,42:8,43:$Vb,44:$Vc,45:$Vd,46:$Ve,48:$Vf,49:$Vg,51:7,63:$Vh,66:6,82:4},{34:[1,136],70:$Vi,86:$Vj,87:$Vk,88:$Vl},{24:[1,137]},{24:[1,138],25:$VH},{8:17,9:$V0,10:18,11:$V1,12:$V2,13:19,14:$V3,15:$V4,16:20,17:$V5,18:9,19:$V6,20:11,21:$V7,22:$V8,28:10,37:16,38:$V9,40:12,41:$Va,42:8,43:$Vb,44:$Vc,45:$Vd,46:$Ve,48:$Vf,49:$Vg,51:7,66:139},o($Vn,[2,66]),{8:17,9:$V0,10:18,11:$V1,12:$V2,13:19,14:$V3,15:$V4,16:20,17:$V5,18:9,19:$V6,20:11,21:$V7,22:$V8,28:10,37:16,38:$V9,40:12,41:$Va,42:140,43:$Vb,44:$Vc,45:$Vd,46:$Ve,48:$Vf,49:$Vg},o($VI,[2,16]),o($VD,[2,30]),{34:[1,141],70:$Vi,86:$Vj,87:$Vk,88:$Vl},{39:[2,29],70:$Vi,86:$Vj,87:$Vk,88:$Vl},{8:17,9:$V0,10:18,11:$V1,12:$V2,13:19,14:$V3,15:$V4,16:20,17:$V5,18:9,19:$V6,20:11,21:$V7,22:$V8,27:142,28:10,37:16,38:$V9,40:12,41:$Va,42:8,43:$Vb,44:$Vc,45:$Vd,46:$Ve,48:$Vf,49:$Vg,51:7,63:$Vh,66:6,82:4},o($Vn,[2,62]),o($Vn,[2,63]),o($Vn,[2,64]),o($Vn,[2,60]),{8:17,9:$V0,10:18,11:$V1,12:$V2,13:19,14:$V3,15:$V4,16:20,17:$V5,18:9,19:$V6,20:11,21:$V7,22:$V8,27:143,28:10,37:16,38:$V9,40:12,41:$Va,42:8,43:$Vb,44:$Vc,45:$Vd,46:$Ve,48:$Vf,49:$Vg,51:7,63:$Vh,66:6,82:4},o($VN,[2,26],{70:$Vi,86:$Vj,87:$Vk,88:$Vl}),o($VN,[2,27],{70:$Vi,86:$Vj,87:$Vk,88:$Vl})],
defaultActions: {35:[2,1]},
parseError: function parseError (str, hash) {
if (hash.recoverable) {
this.trace(str);
} else {
var error = new Error(str);
error.hash = hash;
throw error;
}
},
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:
var lex = function () {
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;
}};
/* generated by jison-lex 0.3.4 */
var lexer = (function(){
var lexer = ({
EOF:1,
parseError:function parseError(str, hash) {
if (this.yy.parser) {
this.yy.parser.parseError(str, hash);
} else {
throw new Error(str);
}
},
// resets the lexer, sets new input
setInput:function (input, yy) {
this.yy = yy || this.yy || {};
this._input = input;
this._more = this._backtrack = this.done = false;
this.yylineno = this.yyleng = 0;
this.yytext = this.matched = this.match = '';
this.conditionStack = ['INITIAL'];
this.yylloc = {
first_line: 1,
first_column: 0,
last_line: 1,
last_column: 0
};
if (this.options.ranges) {
this.yylloc.range = [0,0];
}
this.offset = 0;
return this;
},
// consumes and returns one char from the input
input:function () {
var ch = this._input[0];
this.yytext += ch;
this.yyleng++;
this.offset++;
this.match += ch;
this.matched += ch;
var lines = ch.match(/(?:\r\n?|\n).*/g);
if (lines) {
this.yylineno++;
this.yylloc.last_line++;
} else {
this.yylloc.last_column++;
}
if (this.options.ranges) {
this.yylloc.range[1]++;
}
this._input = this._input.slice(1);
return ch;
},
// unshifts one char (or a string) into the input
unput:function (ch) {
var len = ch.length;
var lines = ch.split(/(?:\r\n?|\n)/g);
this._input = ch + this._input;
this.yytext = this.yytext.substr(0, this.yytext.length - len);
//this.yyleng -= len;
this.offset -= len;
var oldLines = this.match.split(/(?:\r\n?|\n)/g);
this.match = this.match.substr(0, this.match.length - 1);
this.matched = this.matched.substr(0, this.matched.length - 1);
if (lines.length - 1) {
this.yylineno -= lines.length - 1;
}
var r = this.yylloc.range;
this.yylloc = {
first_line: this.yylloc.first_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.first_column,
last_column: lines ?
(lines.length === oldLines.length ? this.yylloc.first_column : 0)
+ oldLines[oldLines.length - lines.length].length - lines[0].length :
this.yylloc.first_column - len
};
if (this.options.ranges) {
this.yylloc.range = [r[0], r[0] + this.yyleng - len];
}
this.yyleng = this.yytext.length;
return this;
},
// When called from action, caches matched text and appends it on next action
more:function () {
this._more = true;
return this;
},
// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
reject:function () {
if (this.options.backtrack_lexer) {
this._backtrack = true;
} else {
return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n' + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
}
return this;
},
// retain first n characters of the match
less:function (n) {
this.unput(this.match.slice(n));
},
// displays already matched input, i.e. for error messages
pastInput:function () {
var past = this.matched.substr(0, this.matched.length - this.match.length);
return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, "");
},
// displays upcoming input, i.e. for error messages
upcomingInput:function () {
var next = this.match;
if (next.length < 20) {
next += this._input.substr(0, 20-next.length);
}
return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
},
// displays the character position where the lexing error occurred, i.e. for error messages
showPosition:function () {
var pre = this.pastInput();
var c = new Array(pre.length + 1).join("-");
return pre + this.upcomingInput() + "\n" + c + "^";
},
// test the lexed token: return FALSE when not a match, otherwise return token
test_match:function(match, indexed_rule) {
var token,
lines,
backup;
if (this.options.backtrack_lexer) {
// save context
backup = {
yylineno: this.yylineno,
yylloc: {
first_line: this.yylloc.first_line,
last_line: this.last_line,
first_column: this.yylloc.first_column,
last_column: this.yylloc.last_column
},
yytext: this.yytext,
match: this.match,
matches: this.matches,
matched: this.matched,
yyleng: this.yyleng,
offset: this.offset,
_more: this._more,
_input: this._input,
yy: this.yy,
conditionStack: this.conditionStack.slice(0),
done: this.done
};
if (this.options.ranges) {
backup.yylloc.range = this.yylloc.range.slice(0);
}
}
lines = match[0].match(/(?:\r\n?|\n).*/g);
if (lines) {
this.yylineno += lines.length;
}
this.yylloc = {
first_line: this.yylloc.last_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.last_column,
last_column: lines ?
lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length :
this.yylloc.last_column + match[0].length
};
this.yytext += match[0];
this.match += match[0];
this.matches = match;
this.yyleng = this.yytext.length;
if (this.options.ranges) {
this.yylloc.range = [this.offset, this.offset += this.yyleng];
}
this._more = false;
this._backtrack = false;
this._input = this._input.slice(match[0].length);
this.matched += match[0];
token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
if (this.done && this._input) {
this.done = false;
}
if (token) {
return token;
} else if (this._backtrack) {
// recover context
for (var k in backup) {
this[k] = backup[k];
}
return false; // rule action called reject() implying the next rule should be tested instead.
}
return false;
},
// return next match in input
next:function () {
if (this.done) {
return this.EOF;
}
if (!this._input) {
this.done = true;
}
var token,
match,
tempMatch,
index;
if (!this._more) {
this.yytext = '';
this.match = '';
}
var rules = this._currentRules();
for (var i = 0; i < rules.length; i++) {
tempMatch = this._input.match(this.rules[rules[i]]);
if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
match = tempMatch;
index = i;
if (this.options.backtrack_lexer) {
token = this.test_match(tempMatch, rules[i]);
if (token !== false) {
return token;
} else if (this._backtrack) {
match = false;
continue; // rule action called reject() implying a rule MISmatch.
} else {
// else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
return false;
}
} else if (!this.options.flex) {
break;
}
}
}
if (match) {
token = this.test_match(match, rules[index]);
if (token !== false) {
return token;
}
// else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
return false;
}
if (this._input === "") {
return this.EOF;
} else {
return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
}
},
// return next match that has a token
lex:function lex () {
var r = this.next();
if (r) {
return r;
} else {
return this.lex();
}
},
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
begin:function begin (condition) {
this.conditionStack.push(condition);
},
// pop the previously active lexer condition state off the condition stack
popState:function popState () {
var n = this.conditionStack.length - 1;
if (n > 0) {
return this.conditionStack.pop();
} else {
return this.conditionStack[0];
}
},
// produce the lexer rule set which is active for the currently active lexer condition state
_currentRules:function _currentRules () {
if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
} else {
return this.conditions["INITIAL"].rules;
}
},
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
topState:function topState (n) {
n = this.conditionStack.length - 1 - Math.abs(n || 0);
if (n >= 0) {
return this.conditionStack[n];
} else {
return "INITIAL";
}
},
// alias for begin(condition)
pushState:function pushState (condition) {
this.begin(condition);
},
// return the number of states currently on the stack
stateStackSize:function stateStackSize() {
return this.conditionStack.length;
},
options: {"case-insensitive":true},
performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {
var YYSTATE=YY_START;
switch($avoiding_name_collisions) {
case 0:/* skip comments */
break;
case 1:/* skip sql comments */
break;
case 2:/* skip sql comments */
break;
case 3:/* skip whitespace */
break;
case 4:return 21
break;
case 5:return 21
break;
case 6:return 14
break;
case 7:return 15
break;
case 8:return 17
break;
case 9:return 38
break;
case 10:return 33
break;
case 11:return 34
break;
case 12:return 36
break;
case 13:return 39
break;
case 14:return 58
break;
case 15:return 59
break;
case 16:return 63
break;
case 17:return 69
break;
case 18:return 67
break;
case 19:return 71
break;
case 20:return 72
break;
case 21:return 65
break;
case 22:return 73
break;
case 23:return 83
break;
case 24:return 85
break;
case 25:return 70
break;
case 26:return 88
break;
case 27:return 'XOR'
break;
case 28:return 'FROM'
break;
case 29:return 'PARTITION'
break;
case 30:return 'USE'
break;
case 31:return 'INDEX'
break;
case 32:return 'KEY'
break;
case 33:return 110
break;
case 34:return 'JOIN'
break;
case 35:return 96
break;
case 36:return 'GROUP_BY'
break;
case 37:return 'IGNORE'
break;
case 38:return 'FORCE'
break;
case 39:return 'CROSS'
break;
case 40:return 'ON'
break;
case 41:return 'USING'
break;
case 42:return 116
break;
case 43:return 117
break;
case 44:return 119
break;
case 45:return 'NATURAL'
break;
case 46:return 'WHERE'
break;
case 47:return 100
break;
case 48:return 101
break;
case 49:return 92
break;
case 50:return 93
break;
case 51:return 'HAVING'
break;
case 52:return 104
break;
case 53:return 108
break;
case 54:return 111
break;
case 55:return 112
break;
case 56:return 113
break;
case 57:return 114
break;
case 58:return 'OJ'
break;
case 59:return 103
break;
case 60:return 'UNION'
break;
case 61:return 63
break;
case 62:return 70
break;
case 63:return 88
break;
case 64:return 72
break;
case 65:return 83
break;
case 66:return 17
break;
case 67:return 'EXISTS'
break;
case 68:return 'DOES-NOT-EXIST'
break;
case 69:return 'DURING'
break;
case 70:return 'AFTER'
break;
case 71:return 'BEFORE'
break;
case 72:return 67
break;
case 73:return 'INCLUDE'
break;
case 74:return 'EXCLUDE'
break;
case 75:return 'EQUALS'
break;
case 76:return 'DISJOINT'
break;
case 77:return 'INTERSECTS'
break;
case 78:return 'TOUCHES'
break;
case 79:return 'CROSSES'
break;
case 80:return 'WITHIN'
break;
case 81:return 'CONTAINS'
break;
case 82:return 'OVERLAPS'
break;
case 83:return 'RELATE'
break;
case 84:return 'DWITHIN'
break;
case 85:return 'BEYOND'
break;
case 86:return 'POINT'
break;
case 87:return 'LINESTRING'
break;
case 88:return 'POLYGON'
break;
case 89:return 'MULTIPOINT'
break;
case 90:return 'MULTILINESTRING'
break;
case 91:return 'MULTIPOLYGON'
break;
case 92:return 'GEOMETRYCOLLECTION'
break;
case 93:return 25
break;
case 94:return 75
break;
case 95:return 22
break;
case 96:return 24
break;
case 97:return 44
break;
case 98:return 81
break;
case 99:return 45
break;
case 100:return 52
break;
case 101:return 53
break;
case 102:return 41
break;
case 103:return 43
break;
case 104:return 56
break;
case 105:return 57
break;
case 106:return 60
break;
case 107:return 61
break;
case 108:return 55
break;
case 109:return 76
break;
case 110:return 77
break;
case 111:return 54
break;
case 112:return '<=>'
break;
case 113:return 78
break;
case 114:return 80
break;
case 115:return 79
break;
case 116:return 49
break;
case 117:return 50
break;
case 118:return 7
break;
case 119:return 9
break;
case 120:return 9
break;
case 121:return 'HEX_NUMERIC'
break;
case 122:return 11
break;
case 123:return 12
break;
case 124:return 21
break;
case 125:return 29
break;
case 126:return 9
break;
case 127:return 9
break;
case 128:return 21
break;
case 129:return 5
break;
case 130:return 'INVALID'
break;
}
},
rules: [/^(?:[/][*](.|\n)*?[*][/])/i,/^(?:[-][-]\s.*\n)/i,/^(?:[#]\s.*\n)/i,/^(?:\s+)/i,/^(?:[\w]+[\u4e00-\u9fa5]+[0-9a-zA-Z_\u4e00-\u9fa5]*)/i,/^(?:[\u4e00-\u9fa5][0-9a-zA-Z_\u4e00-\u9fa5]*)/i,/^(?:TRUE\b)/i,/^(?:FALSE\b)/i,/^(?:NULL\b)/i,/^(?:CASE\b)/i,/^(?:WHEN\b)/i,/^(?:THEN\b)/i,/^(?:ELSE\b)/i,/^(?:END\b)/i,/^(?:DIV\b)/i,/^(?:MOD\b)/i,/^(?:NOT\b)/i,/^(?:BETWEEN\b)/i,/^(?:IN\b)/i,/^(?:SOUNDS\b)/i,/^(?:LIKE\b)/i,/^(?:ESCAPE\b)/i,/^(?:REGEXP\b)/i,/^(?:IS\b)/i,/^(?:UNKNOWN\b)/i,/^(?:AND\b)/i,/^(?:OR\b)/i,/^(?:XOR\b)/i,/^(?:FROM\b)/i,/^(?:PARTITION\b)/i,/^(?:USE\b)/i,/^(?:INDEX\b)/i,/^(?:KEY\b)/i,/^(?:FOR\b)/i,/^(?:JOIN\b)/i,/^(?:ORDER\s+BY\b)/i,/^(?:GROUP\s+BY\b)/i,/^(?:IGNORE\b)/i,/^(?:FORCE\b)/i,/^(?:CROSS\b)/i,/^(?:ON\b)/i,/^(?:USING\b)/i,/^(?:LEFT\b)/i,/^(?:RIGHT\b)/i,/^(?:OUTER\b)/i,/^(?:NATURAL\b)/i,/^(?:WHERE\b)/i,/^(?:ASC\b)/i,/^(?:DESC\b)/i,/^(?:WITH\b)/i,/^(?:ROLLUP\b)/i,/^(?:HAVING\b)/i,/^(?:OFFSET\b)/i,/^(?:PROCEDURE\b)/i,/^(?:UPDATE\b)/i,/^(?:LOCK\b)/i,/^(?:SHARE\b)/i,/^(?:MODE\b)/i,/^(?:OJ\b)/i,/^(?:LIMIT\b)/i,/^(?:UNION\b)/i,/^(?:NOT\b)/i,/^(?:AND\b)/i,/^(?:OR\b)/i,/^(?:LIKE\b)/i,/^(?:IS\b)/i,/^(?:NULL\b)/i,/^(?:EXISTS\b)/i,/^(?:DOESNOTEXIST\b)/i,/^(?:DURING\b)/i,/^(?:AFTER\b)/i,/^(?:BEFORE\b)/i,/^(?:IN\b)/i,/^(?:INCLUDE\b)/i,/^(?:EXCLUDE\b)/i,/^(?:EQUALS\b)/i,/^(?:DISJOINT\b)/i,/^(?:INTERSECTS\b)/i,/^(?:TOUCHES\b)/i,/^(?:CROSSES\b)/i,/^(?:WITHIN\b)/i,/^(?:CONTAINS\b)/i,/^(?:OVERLAPS\b)/i,/^(?:RELATE\b)/i,/^(?:DWITHIN\b)/i,/^(?:BEYOND\b)/i,/^(?:POINT\b)/i,/^(?:LINESTRING\b)/i,/^(?:POLYGON\b)/i,/^(?:MULTIPOINT\b)/i,/^(?:MULTILINESTRING\b)/i,/^(?:MULTIPOLYGON\b)/i,/^(?:GEOMETRYCOLLECTION\b)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\()/i,/^(?:\))/i,/^(?:~)/i,/^(?:!=)/i,/^(?:!)/i,/^(?:\|)/i,/^(?:&)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:\*)/i,/^(?:\/)/i,/^(?:%)/i,/^(?:\^)/i,/^(?:>>)/i,/^(?:>=)/i,/^(?:>)/i,/^(?:<<)/i,/^(?:<=>)/i,/^(?:<=)/i,/^(?:<>)/i,/^(?:<)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:;)/i,/^(?:['](\\.|[^'])*['])/i,/^(?:["](\\.|[^"])*["])/i,/^(?:[0][x][0-9a-fA-F]+)/i,/^(?:[-]?[0-9]+(\.[0-9]+)?)/i,/^(?:[-]?[0-9]+(\.[0-9]+)?[eE][-][0-9]+(\.[0-9]+)?)/i,/^(?:[a-zA-Z_\u4e00-\u9fa5][a-zA-Z0-9_\u4e00-\u9fa5]*)/i,/^(?:\.)/i,/^(?:["]([a-zA-Z_\u4e00-\u9fa5][a-zA-Z0-9_\u4e00-\u9fa5]*)["])/i,/^(?:[']([a-zA-Z_\u4e00-\u9fa5][a-zA-Z0-9_\u4e00-\u9fa5]*)['])/i,/^(?:([`])(?:(?=(\\?))\2.)*?\1)/i,/^(?:$)/i,/^(?:.)/i],
conditions: {"INITIAL":{"rules":[0,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],"inclusive":true}}
});
return lexer;
})();
parser.lexer = lexer;
function Parser () {
this.yy = {};
}
Parser.prototype = parser;parser.Parser = Parser;
return new Parser;
})();