yyc
Version:
中文编程解释器, YY language complier
944 lines (902 loc) • 42 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)
}
*/
var yy = (function(){
var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,23],$V1=[1,24],$V2=[1,25],$V3=[1,11],$V4=[1,13],$V5=[1,14],$V6=[1,15],$V7=[1,16],$V8=[1,17],$V9=[1,18],$Va=[1,19],$Vb=[1,20],$Vc=[1,22],$Vd=[1,21],$Ve=[21,28,29,34,48,49,50,51,56,57,58,59,62,69,79],$Vf=[1,30],$Vg=[1,31],$Vh=[5,6,7,8,9,10,11,12,13,14,15,16,17,21,24,26,28,29,31,34,36,37,39,42,43,48,49,50,51,53,56,57,58,59,62,69,79],$Vi=[2,24],$Vj=[1,47],$Vk=[1,45],$Vl=[1,46],$Vm=[1,58],$Vn=[1,60],$Vo=[1,61],$Vp=[1,62],$Vq=[1,52],$Vr=[1,53],$Vs=[1,54],$Vt=[1,55],$Vu=[1,81],$Vv=[1,82],$Vw=[1,87],$Vx=[16,31],$Vy=[1,88],$Vz=[1,89],$VA=[1,90],$VB=[1,91],$VC=[1,92],$VD=[1,94],$VE=[1,93],$VF=[1,95],$VG=[1,96],$VH=[1,97],$VI=[1,98],$VJ=[5,6,7,8,9,10,11,12,13,14,16,17,21,28,29,31,34,36,37,39,42,43,48,49,50,51,53,56,57,58,59,62,69,79],$VK=[5,6,7,8,9,10,11,12,13,14,16,17,21,24,28,29,31,34,36,37,39,42,43,48,49,50,51,53,56,57,58,59,62,69,79],$VL=[2,82],$VM=[1,112],$VN=[1,111],$VO=[21,28,29,34,36,39,42,43,48,49,50,51,53,56,57,58,59,62,69,79],$VP=[34,36,39,42,43,48,49,50,51,53,56,57,58,59],$VQ=[1,129],$VR=[5,6,7,8,9,10,11,12,13,16,21,28,29,31,34,36,37,39,42,43,48,49,50,51,53,56,57,58,59,62,69,79],$VS=[5,6,9,10,11,12,13,16,21,28,29,31,34,36,37,39,42,43,48,49,50,51,53,56,57,58,59,62,69,79],$VT=[24,31],$VU=[31,53],$VV=[21,53],$VW=[9,10,11,12,13,16,21,28,29,31,34,36,37,39,42,43,48,49,50,51,53,56,57,58,59,62,69,79],$VX=[1,174],$VY=[1,178],$VZ=[1,179],$V_=[1,184],$V$=[36,39,53];
var parser = {trace: function trace () { },
yy: {},
symbols_: {"error":2,"expression":3,"JSON":4,"+":5,"-":6,"/":7,"*":8,">":9,"=":10,"<":11,"|":12,"&":13,"!":14,"(":15,")":16,"%":17,"array_value":18,"fn_value":19,"call_function":20,"NAME":21,"[":22,"number_value":23,"]":24,"NUMBER":25,".":26,"name":27,"THIS":28,"ASSERT":29,"args":30,",":31,"parameters":32,"print_expression":33,"PRINT":34,"case_expression":35,"CASE":36,":":37,"common_block":38,"DEFAULT":39,"match_block":40,"return_value":41,"RETURN":42,"BREAK":43,"cover":44,"cover_assign":45,"literal_statement":46,"control_flow":47,"LET":48,"CONST":49,"DEF":50,"FN":51,"{":52,"}":53,"array":54,"JSONArray":55,"IF":56,"MATCH":57,"LOOP":58,"EACH":59,"FROM":60,"module":61,"IMPORT":62,"STRING":63,"AS":64,"line":65,"CLASSParser":66,"program":67,"start_scan":68,"EOF":69,"ERROR":70,"TRUE":71,"FALSE":72,"NULL":73,"JSONObject":74,"JSONObjectMembers":75,"JSONObjectPair":76,"CLASSFn":77,"CLASSBlock":78,"CLASS":79,"JSONArrayElements":80,"$accept":0,"$end":1},
terminals_: {5:"+",6:"-",7:"/",8:"*",9:">",10:"=",11:"<",12:"|",13:"&",14:"!",15:"(",16:")",17:"%",21:"NAME",22:"[",24:"]",25:"NUMBER",26:".",28:"THIS",29:"ASSERT",31:",",34:"PRINT",36:"CASE",37:":",39:"DEFAULT",42:"RETURN",43:"BREAK",48:"LET",49:"CONST",50:"DEF",51:"FN",52:"{",53:"}",56:"IF",57:"MATCH",58:"LOOP",59:"EACH",60:"FROM",62:"IMPORT",63:"STRING",64:"AS",69:"EOF",70:"ERROR",71:"TRUE",72:"FALSE",73:"NULL",79:"CLASS"},
productions_: [0,[3,1],[3,3],[3,3],[3,3],[3,3],[3,3],[3,4],[3,3],[3,4],[3,4],[3,4],[3,4],[3,4],[3,2],[3,3],[3,2],[3,2],[3,1],[3,1],[19,1],[18,4],[23,1],[23,3],[27,1],[27,1],[27,1],[27,3],[20,3],[20,4],[30,1],[30,3],[32,1],[32,3],[33,4],[35,4],[35,3],[40,1],[40,2],[41,1],[41,1],[41,2],[44,3],[45,1],[38,1],[38,1],[38,1],[38,1],[38,1],[38,1],[38,2],[38,2],[38,2],[38,2],[46,4],[46,4],[46,4],[46,10],[54,1],[54,1],[47,7],[47,7],[47,4],[47,9],[61,4],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[67,1],[67,2],[68,2],[2,1],[4,1],[4,1],[4,1],[4,1],[4,1],[4,1],[4,1],[4,1],[74,2],[74,3],[75,1],[75,3],[76,3],[76,3],[77,6],[77,7],[78,1],[78,2],[66,5],[55,2],[55,3],[80,1],[80,3]],
performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {
/* this == yyval */
var $0 = $$.length - 1;
switch (yystate) {
case 1: case 18: case 43:
this.$ = $$[$0];
break;
case 2:
this.$ = VM.operators.add($$[$0-2], $$[$0]);
break;
case 3:
this.$ = VM.operators.subtract($$[$0-2], $$[$0]);
break;
case 4:
this.$ = VM.operators.divide($$[$0-2], $$[$0]) ;
break;
case 5:
this.$ = VM.operators.multiply($$[$0-2], $$[$0]);
break;
case 6:
this.$ = VM.operators.gt($$[$0-2], $$[$0]);
break;
case 7:
this.$ = VM.operators.gte($$[$0-3], $$[$0]);
break;
case 8:
this.$ = VM.operators.lt($$[$0-2], $$[$0]);
break;
case 9:
this.$ = VM.operators.lte($$[$0-3], $$[$0]);
break;
case 10:
this.$ = VM.operators.eq($$[$0-3], $$[$0]);
break;
case 11:
this.$ = VM.operators.or($$[$0-3], $$[$0]);
break;
case 12:
this.$ = VM.operators.and($$[$0-3], $$[$0]);
break;
case 13:
this.$ = VM.operators.ne($$[$0-3], $$[$0]);
break;
case 14:
this.$ = VM.operators.not($$[$0]);
break;
case 15:
this.$ = $$[$0-1];
break;
case 16:
this.$ = $$[$0-1]/100;
break;
case 17:
this.$ = -$$[$0];
break;
case 19: case 37: case 44: case 45: case 46: case 47: case 48: case 49: case 65: case 66: case 67: case 68: case 69: case 70: case 71: case 92:
this.$ = VM.parse($$[$0]);
break;
case 21:
this.$ = $$[$0-3][$$[$0-1]]
break;
case 22: case 24: case 58: case 59: case 72: case 76: case 78: case 82: case 83:
this.$ = $$[$0]
break;
case 23:
this.$ = `${$$[$0-2]}.${$$[$0]}`
break;
case 25:
this.$ = "this"
break;
case 26:
this.$ = "assert"
break;
case 27:
this.$ = $$[$0-2] + $$[$0-1] + $$[$0]
break;
case 28:
this.$ = { type: 'callFunction', name: $$[$0-2], args: [] }
break;
case 29:
this.$ = { type: 'callFunction', name: $$[$0-3], args: $$[$0-1] }
break;
case 30:
this.$ = [VM.parse($$[$0])];
break;
case 31:
$$[$0-2].push(VM.parse($$[$0])); this.$ = $$[$0-2];
break;
case 32:
this.$ = [$$[$0]];
break;
case 33:
$$[$0-2].push($$[$0]); this.$ = $$[$0-2];
break;
case 34:
this.$ = { type: 'callFunction', name: 'print', args: $$[$0-1] }
break;
case 35:
this.$ = { type: 'case', when: $$[$0-2], fact: $$[$0] }
break;
case 36:
this.$ = { type: 'default', fact: $$[$0] }
break;
case 38: case 50: case 51: case 52: case 53: case 93:
this.$ = VM.parse($$[$0-1]) + VM.parse($$[$0]);
break;
case 39:
this.$ = { type: 'return' };
break;
case 40:
this.$ = { type: 'break' };
break;
case 41:
this.$ = { type: 'return', fact: $$[$0] };
break;
case 42:
this.$ = { type: 'cover', name: $$[$0-2], fact: $$[$0] };
break;
case 54:
this.$ = { type: 'let', name: $$[$0-2], fact: $$[$0] }
break;
case 55:
this.$ = { type: 'const', name: $$[$0-2], fact: $$[$0] }
break;
case 56:
this.$ = { type: 'def', name: $$[$0-2], fact: $$[$0] }
break;
case 57:
this.$ = { type: 'fn', name: $$[$0-8], args: [$$[$0-4]], fact: $$[$0-1] }
break;
case 60:
this.$ = { type: 'if', when: $$[$0-4], fact: $$[$0-1] }
break;
case 61:
this.$ = { type: 'match', when: $$[$0-4], fact: $$[$0-1] }
break;
case 62:
this.$ = { type: 'loop', fact: $$[$0-1] }
break;
case 63:
this.$ = { type: 'each', name: $$[$0-6], args: $$[$0-4], fact: $$[$0-1] }
break;
case 64:
this.$ = { type: 'import', name: $$[$0], args: $$[$0-2] }
break;
case 73:
this.$ = $$[$0-1] + $$[$0];
break;
case 74:
return $$[$0-1];
break;
case 75:
this.$ = VM.throwError($$[$0]);
break;
case 77:
this.$ = VM.helper.toNumber($$[$0])
break;
case 79:
this.$ = true
break;
case 80:
this.$ = false
break;
case 81:
this.$ = null
break;
case 84:
this.$ = {}
break;
case 85: case 96:
this.$ = $$[$0-1]
break;
case 86:
temp = {}; temp[$$[$0][0]] = $$[$0][1]; this.$ = temp
break;
case 87:
$$[$0-2][$$[$0][0]] = $$[$0][1]; this.$ = $$[$0-2]
break;
case 88: case 89:
this.$ = [$$[$0-2], VM.helper.trimEdges($$[$0])];
break;
case 90:
this.$ = { type: 'classFunction', name: $$[$0-5], args: [], fact: $$[$0-1] }
break;
case 91:
this.$ = { type: 'classFunction', name: $$[$0-6], args: [$$[$0-4]], fact: $$[$0-1] }
break;
case 94:
this.$ = { type: 'class', name: $$[$0-3], fact: $$[$0-1] }
break;
case 95:
this.$ = []
break;
case 97:
this.$ = [$$[$0]]
break;
case 98:
this.$ = $$[$0-2]; $$[$0-2].push($$[$0])
break;
}
},
table: [{20:8,21:$V0,27:12,28:$V1,29:$V2,33:4,34:$V3,44:5,46:6,47:7,48:$V4,49:$V5,50:$V6,51:$V7,56:$V8,57:$V9,58:$Va,59:$Vb,61:10,62:$Vc,65:3,66:9,67:2,68:1,79:$Vd},{1:[3]},{20:8,21:$V0,27:12,28:$V1,29:$V2,33:4,34:$V3,44:5,46:6,47:7,48:$V4,49:$V5,50:$V6,51:$V7,56:$V8,57:$V9,58:$Va,59:$Vb,61:10,62:$Vc,65:27,66:9,69:[1,26],79:$Vd},o($Ve,[2,72]),o($Ve,[2,65]),o($Ve,[2,66]),o($Ve,[2,67]),o($Ve,[2,68]),o($Ve,[2,69]),o($Ve,[2,70]),o($Ve,[2,71]),{15:[1,28]},{10:[1,29],15:$Vf,26:$Vg},{21:[1,32]},{21:[1,33]},{21:[1,34]},{21:[1,35]},{15:[1,36]},{15:[1,37]},{52:[1,38]},{15:[1,39]},{21:[1,40]},{63:[1,41]},o($Vh,$Vi),o($Vh,[2,25]),o($Vh,[2,26]),{1:[2,74]},o($Ve,[2,73]),{3:43,4:44,6:$Vj,14:$Vk,15:$Vl,18:48,19:49,20:59,21:$Vm,22:$Vn,23:51,25:$Vo,27:56,28:$V1,29:$V2,30:42,52:$Vp,55:50,63:$Vq,71:$Vr,72:$Vs,73:$Vt,74:57},{3:63,4:44,6:$Vj,14:$Vk,15:$Vl,18:48,19:49,20:59,21:$Vm,22:$Vn,23:51,25:$Vo,27:56,28:$V1,29:$V2,52:$Vp,55:50,63:$Vq,71:$Vr,72:$Vs,73:$Vt,74:57},{3:43,4:44,6:$Vj,14:$Vk,15:$Vl,16:[1,64],18:48,19:49,20:59,21:$Vm,22:$Vn,23:51,25:$Vo,27:56,28:$V1,29:$V2,30:65,52:$Vp,55:50,63:$Vq,71:$Vr,72:$Vs,73:$Vt,74:57},{21:$V0,27:66,28:$V1,29:$V2},{10:[1,67]},{10:[1,68]},{10:[1,69]},{10:[1,70]},{3:71,4:44,6:$Vj,14:$Vk,15:$Vl,18:48,19:49,20:59,21:$Vm,22:$Vn,23:51,25:$Vo,27:56,28:$V1,29:$V2,52:$Vp,55:50,63:$Vq,71:$Vr,72:$Vs,73:$Vt,74:57},{3:72,4:44,6:$Vj,14:$Vk,15:$Vl,18:48,19:49,20:59,21:$Vm,22:$Vn,23:51,25:$Vo,27:56,28:$V1,29:$V2,52:$Vp,55:50,63:$Vq,71:$Vr,72:$Vs,73:$Vt,74:57},{20:77,21:$V0,27:12,28:$V1,29:$V2,33:75,34:$V3,38:73,41:78,42:$Vu,43:$Vv,44:80,45:74,46:76,47:79,48:$V4,49:$V5,50:$V6,51:$V7,56:$V8,57:$V9,58:$Va,59:$Vb},{21:[1,83]},{52:[1,84]},{64:[1,85]},{16:[1,86],31:$Vw},o($Vx,[2,30],{5:$Vy,6:$Vz,7:$VA,8:$VB,9:$VC,10:$VD,11:$VE,12:$VF,13:$VG,14:$VH,17:$VI}),o($VJ,[2,1]),{3:99,4:44,6:$Vj,14:$Vk,15:$Vl,18:48,19:49,20:59,21:$Vm,22:$Vn,23:51,25:$Vo,27:56,28:$V1,29:$V2,52:$Vp,55:50,63:$Vq,71:$Vr,72:$Vs,73:$Vt,74:57},{3:100,4:44,6:$Vj,14:$Vk,15:$Vl,18:48,19:49,20:59,21:$Vm,22:$Vn,23:51,25:$Vo,27:56,28:$V1,29:$V2,52:$Vp,55:50,63:$Vq,71:$Vr,72:$Vs,73:$Vt,74:57},{3:101,4:44,6:$Vj,14:$Vk,15:$Vl,18:48,19:49,20:59,21:$Vm,22:$Vn,23:51,25:$Vo,27:56,28:$V1,29:$V2,52:$Vp,55:50,63:$Vq,71:$Vr,72:$Vs,73:$Vt,74:57},o($VJ,[2,18]),o($VJ,[2,19]),o($VK,[2,76]),o($VK,[2,77]),o($VK,[2,78]),o($VK,[2,79]),o($VK,[2,80]),o($VK,[2,81]),o($VJ,$VL,{15:$Vf,26:$Vg}),o($VK,[2,83]),o([5,6,7,8,9,10,11,12,13,14,15,16,17,21,26,28,29,31,34,36,37,39,42,43,48,49,50,51,53,56,57,58,59,62,69,79],$Vi,{22:[1,102]}),o($VJ,[2,20]),{4:105,21:$V0,22:$Vn,23:51,24:[1,103],25:$Vo,27:106,28:$V1,29:$V2,52:$Vp,55:50,63:$Vq,71:$Vr,72:$Vs,73:$Vt,74:57,80:104},o($VK,[2,22],{26:[1,107]}),{21:$VM,53:[1,108],63:$VN,75:109,76:110},o($VO,[2,42],{5:$Vy,6:$Vz,7:$VA,8:$VB,9:$VC,10:$VD,11:$VE,12:$VF,13:$VG,14:$VH,17:$VI}),o($VJ,[2,28]),{16:[1,113],31:$Vw},o([5,6,7,8,9,10,11,12,13,14,15,16,17,21,24,28,29,31,34,36,37,39,42,43,48,49,50,51,53,56,57,58,59,62,69,79],[2,27],{26:$Vg}),{3:114,4:44,6:$Vj,14:$Vk,15:$Vl,18:48,19:49,20:59,21:$Vm,22:$Vn,23:51,25:$Vo,27:56,28:$V1,29:$V2,52:$Vp,55:50,63:$Vq,71:$Vr,72:$Vs,73:$Vt,74:57},{3:115,4:44,6:$Vj,14:$Vk,15:$Vl,18:48,19:49,20:59,21:$Vm,22:$Vn,23:51,25:$Vo,27:56,28:$V1,29:$V2,52:$Vp,55:50,63:$Vq,71:$Vr,72:$Vs,73:$Vt,74:57},{3:116,4:44,6:$Vj,14:$Vk,15:$Vl,18:48,19:49,20:59,21:$Vm,22:$Vn,23:51,25:$Vo,27:56,28:$V1,29:$V2,52:$Vp,55:50,63:$Vq,71:$Vr,72:$Vs,73:$Vt,74:57},{9:[1,117]},{5:$Vy,6:$Vz,7:$VA,8:$VB,9:$VC,10:$VD,11:$VE,12:$VF,13:$VG,14:$VH,16:[1,118],17:$VI},{5:$Vy,6:$Vz,7:$VA,8:$VB,9:$VC,10:$VD,11:$VE,12:$VF,13:$VG,14:$VH,16:[1,119],17:$VI},{33:121,34:$V3,41:123,42:$Vu,43:$Vv,46:122,47:124,48:$V4,49:$V5,50:$V6,51:$V7,53:[1,120],56:$V8,57:$V9,58:$Va,59:$Vb},o($VP,[2,44]),o($VP,[2,45]),o($VP,[2,46]),o($VP,[2,47]),o($VP,[2,48]),o($VP,[2,49]),o($VP,[2,43]),o($VP,[2,39],{4:44,18:48,19:49,55:50,23:51,27:56,74:57,20:59,3:125,6:$Vj,14:$Vk,15:$Vl,21:$Vm,22:$Vn,25:$Vo,28:$V1,29:$V2,52:$Vp,63:$Vq,71:$Vr,72:$Vs,73:$Vt}),o($VP,[2,40]),{60:[1,126]},{21:$VQ,77:128,78:127},{21:[1,130]},o($VO,[2,34]),{3:131,4:44,6:$Vj,14:$Vk,15:$Vl,18:48,19:49,20:59,21:$Vm,22:$Vn,23:51,25:$Vo,27:56,28:$V1,29:$V2,52:$Vp,55:50,63:$Vq,71:$Vr,72:$Vs,73:$Vt,74:57},{3:132,4:44,6:$Vj,14:$Vk,15:$Vl,18:48,19:49,20:59,21:$Vm,22:$Vn,23:51,25:$Vo,27:56,28:$V1,29:$V2,52:$Vp,55:50,63:$Vq,71:$Vr,72:$Vs,73:$Vt,74:57},{3:133,4:44,6:$Vj,14:$Vk,15:$Vl,18:48,19:49,20:59,21:$Vm,22:$Vn,23:51,25:$Vo,27:56,28:$V1,29:$V2,52:$Vp,55:50,63:$Vq,71:$Vr,72:$Vs,73:$Vt,74:57},{3:134,4:44,6:$Vj,14:$Vk,15:$Vl,18:48,19:49,20:59,21:$Vm,22:$Vn,23:51,25:$Vo,27:56,28:$V1,29:$V2,52:$Vp,55:50,63:$Vq,71:$Vr,72:$Vs,73:$Vt,74:57},{3:135,4:44,6:$Vj,14:$Vk,15:$Vl,18:48,19:49,20:59,21:$Vm,22:$Vn,23:51,25:$Vo,27:56,28:$V1,29:$V2,52:$Vp,55:50,63:$Vq,71:$Vr,72:$Vs,73:$Vt,74:57},{3:136,4:44,6:$Vj,10:[1,137],14:$Vk,15:$Vl,18:48,19:49,20:59,21:$Vm,22:$Vn,23:51,25:$Vo,27:56,28:$V1,29:$V2,52:$Vp,55:50,63:$Vq,71:$Vr,72:$Vs,73:$Vt,74:57},{3:138,4:44,6:$Vj,10:[1,139],14:$Vk,15:$Vl,18:48,19:49,20:59,21:$Vm,22:$Vn,23:51,25:$Vo,27:56,28:$V1,29:$V2,52:$Vp,55:50,63:$Vq,71:$Vr,72:$Vs,73:$Vt,74:57},{10:[1,140]},{12:[1,141]},{13:[1,142]},{10:[1,143]},o($VJ,[2,16]),o($VR,[2,14],{14:$VH,17:$VI}),{5:$Vy,6:$Vz,7:$VA,8:$VB,9:$VC,10:$VD,11:$VE,12:$VF,13:$VG,14:$VH,16:[1,144],17:$VI},o($VS,[2,17],{7:$VA,8:$VB,14:$VH,17:$VI}),{23:145,25:$Vo},o($VK,[2,95]),{24:[1,146],31:[1,147]},o($VT,[2,97]),o([24,31,53],$VL,{26:$Vg}),{25:[1,148]},o($VK,[2,84]),{31:[1,150],53:[1,149]},o($VU,[2,86]),{37:[1,151]},{37:[1,152]},o($VJ,[2,29]),o($VO,[2,54],{5:$Vy,6:$Vz,7:$VA,8:$VB,9:$VC,10:$VD,11:$VE,12:$VF,13:$VG,14:$VH,17:$VI}),o($VO,[2,55],{5:$Vy,6:$Vz,7:$VA,8:$VB,9:$VC,10:$VD,11:$VE,12:$VF,13:$VG,14:$VH,17:$VI}),o($VO,[2,56],{5:$Vy,6:$Vz,7:$VA,8:$VB,9:$VC,10:$VD,11:$VE,12:$VF,13:$VG,14:$VH,17:$VI}),{15:[1,153]},{52:[1,154]},{52:[1,155]},o($VO,[2,62]),o($VP,[2,50]),o($VP,[2,51]),o($VP,[2,52]),o($VP,[2,53]),o($VP,[2,41],{5:$Vy,6:$Vz,7:$VA,8:$VB,9:$VC,10:$VD,11:$VE,12:$VF,13:$VG,14:$VH,17:$VI}),{21:[1,157],22:$Vn,54:156,55:158},{21:$VQ,53:[1,159],77:160},o($VV,[2,92]),{15:[1,161]},o($Ve,[2,64]),o($Vx,[2,31],{5:$Vy,6:$Vz,7:$VA,8:$VB,9:$VC,10:$VD,11:$VE,12:$VF,13:$VG,14:$VH,17:$VI}),o($VS,[2,2],{7:$VA,8:$VB,14:$VH,17:$VI}),o($VS,[2,3],{7:$VA,8:$VB,14:$VH,17:$VI}),o($VR,[2,4],{14:$VH,17:$VI}),o($VR,[2,5],{14:$VH,17:$VI}),o($VW,[2,6],{5:$Vy,6:$Vz,7:$VA,8:$VB,14:$VH,17:$VI}),{3:162,4:44,6:$Vj,14:$Vk,15:$Vl,18:48,19:49,20:59,21:$Vm,22:$Vn,23:51,25:$Vo,27:56,28:$V1,29:$V2,52:$Vp,55:50,63:$Vq,71:$Vr,72:$Vs,73:$Vt,74:57},o($VW,[2,8],{5:$Vy,6:$Vz,7:$VA,8:$VB,14:$VH,17:$VI}),{3:163,4:44,6:$Vj,14:$Vk,15:$Vl,18:48,19:49,20:59,21:$Vm,22:$Vn,23:51,25:$Vo,27:56,28:$V1,29:$V2,52:$Vp,55:50,63:$Vq,71:$Vr,72:$Vs,73:$Vt,74:57},{3:164,4:44,6:$Vj,14:$Vk,15:$Vl,18:48,19:49,20:59,21:$Vm,22:$Vn,23:51,25:$Vo,27:56,28:$V1,29:$V2,52:$Vp,55:50,63:$Vq,71:$Vr,72:$Vs,73:$Vt,74:57},{3:165,4:44,6:$Vj,14:$Vk,15:$Vl,18:48,19:49,20:59,21:$Vm,22:$Vn,23:51,25:$Vo,27:56,28:$V1,29:$V2,52:$Vp,55:50,63:$Vq,71:$Vr,72:$Vs,73:$Vt,74:57},{3:166,4:44,6:$Vj,14:$Vk,15:$Vl,18:48,19:49,20:59,21:$Vm,22:$Vn,23:51,25:$Vo,27:56,28:$V1,29:$V2,52:$Vp,55:50,63:$Vq,71:$Vr,72:$Vs,73:$Vt,74:57},{3:167,4:44,6:$Vj,14:$Vk,15:$Vl,18:48,19:49,20:59,21:$Vm,22:$Vn,23:51,25:$Vo,27:56,28:$V1,29:$V2,52:$Vp,55:50,63:$Vq,71:$Vr,72:$Vs,73:$Vt,74:57},o($VJ,[2,15]),{24:[1,168]},o($VK,[2,96]),{4:169,21:$V0,22:$Vn,23:51,25:$Vo,27:106,28:$V1,29:$V2,52:$Vp,55:50,63:$Vq,71:$Vr,72:$Vs,73:$Vt,74:57},o($VK,[2,23]),o($VK,[2,85]),{21:$VM,63:$VN,76:170},{4:171,21:$V0,22:$Vn,23:51,25:$Vo,27:106,28:$V1,29:$V2,52:$Vp,55:50,63:$Vq,71:$Vr,72:$Vs,73:$Vt,74:57},{4:172,21:$V0,22:$Vn,23:51,25:$Vo,27:106,28:$V1,29:$V2,52:$Vp,55:50,63:$Vq,71:$Vr,72:$Vs,73:$Vt,74:57},{21:$VX,32:173},{20:77,21:$V0,27:12,28:$V1,29:$V2,33:75,34:$V3,38:175,41:78,42:$Vu,43:$Vv,44:80,45:74,46:76,47:79,48:$V4,49:$V5,50:$V6,51:$V7,56:$V8,57:$V9,58:$Va,59:$Vb},{35:177,36:$VY,39:$VZ,40:176},{16:[1,180]},{16:[2,58]},{16:[2,59]},o($Ve,[2,94]),o($VV,[2,93]),{16:[1,181],21:$VX,32:182},o($VW,[2,7],{5:$Vy,6:$Vz,7:$VA,8:$VB,14:$VH,17:$VI}),o($VW,[2,9],{5:$Vy,6:$Vz,7:$VA,8:$VB,14:$VH,17:$VI}),o([16,21,28,29,31,34,36,37,39,42,43,48,49,50,51,53,56,57,58,59,62,69,79],[2,10],{5:$Vy,6:$Vz,7:$VA,8:$VB,9:$VC,10:$VD,11:$VE,12:$VF,13:$VG,14:$VH,17:$VI}),o([10,12,13,16,21,28,29,31,34,36,37,39,42,43,48,49,50,51,53,56,57,58,59,62,69,79],[2,11],{5:$Vy,6:$Vz,7:$VA,8:$VB,9:$VC,11:$VE,14:$VH,17:$VI}),o([10,13,16,21,28,29,31,34,36,37,39,42,43,48,49,50,51,53,56,57,58,59,62,69,79],[2,12],{5:$Vy,6:$Vz,7:$VA,8:$VB,9:$VC,11:$VE,12:$VF,14:$VH,17:$VI}),o($VR,[2,13],{14:$VH,17:$VI}),o($VJ,[2,21]),o($VT,[2,98]),o($VU,[2,87]),o($VU,[2,88]),o($VU,[2,89]),{16:[1,183],31:$V_},o($Vx,[2,32]),{33:121,34:$V3,41:123,42:$Vu,43:$Vv,46:122,47:124,48:$V4,49:$V5,50:$V6,51:$V7,53:[1,185],56:$V8,57:$V9,58:$Va,59:$Vb},{35:187,36:$VY,39:$VZ,53:[1,186]},o($V$,[2,37]),{3:188,4:44,6:$Vj,14:$Vk,15:$Vl,18:48,19:49,20:59,21:$Vm,22:$Vn,23:51,25:$Vo,27:56,28:$V1,29:$V2,52:$Vp,55:50,63:$Vq,71:$Vr,72:$Vs,73:$Vt,74:57},{37:[1,189]},{52:[1,190]},{52:[1,191]},{16:[1,192],31:$V_},{52:[1,193]},{21:[1,194]},o($VO,[2,60]),o($VO,[2,61]),o($V$,[2,38]),{5:$Vy,6:$Vz,7:$VA,8:$VB,9:$VC,10:$VD,11:$VE,12:$VF,13:$VG,14:$VH,17:$VI,37:[1,195]},{20:77,21:$V0,27:12,28:$V1,29:$V2,33:75,34:$V3,38:196,41:78,42:$Vu,43:$Vv,44:80,45:74,46:76,47:79,48:$V4,49:$V5,50:$V6,51:$V7,56:$V8,57:$V9,58:$Va,59:$Vb},{20:77,21:$V0,27:12,28:$V1,29:$V2,33:75,34:$V3,38:197,41:78,42:$Vu,43:$Vv,44:80,45:74,46:76,47:79,48:$V4,49:$V5,50:$V6,51:$V7,56:$V8,57:$V9,58:$Va,59:$Vb},{20:77,21:$V0,27:12,28:$V1,29:$V2,33:75,34:$V3,38:198,41:78,42:$Vu,43:$Vv,44:80,45:74,46:76,47:79,48:$V4,49:$V5,50:$V6,51:$V7,56:$V8,57:$V9,58:$Va,59:$Vb},{52:[1,199]},{20:77,21:$V0,27:12,28:$V1,29:$V2,33:75,34:$V3,38:200,41:78,42:$Vu,43:$Vv,44:80,45:74,46:76,47:79,48:$V4,49:$V5,50:$V6,51:$V7,56:$V8,57:$V9,58:$Va,59:$Vb},o($Vx,[2,33]),{20:77,21:$V0,27:12,28:$V1,29:$V2,33:75,34:$V3,38:201,41:78,42:$Vu,43:$Vv,44:80,45:74,46:76,47:79,48:$V4,49:$V5,50:$V6,51:$V7,56:$V8,57:$V9,58:$Va,59:$Vb},o($V$,[2,36],{33:121,46:122,41:123,47:124,34:$V3,42:$Vu,43:$Vv,48:$V4,49:$V5,50:$V6,51:$V7,56:$V8,57:$V9,58:$Va,59:$Vb}),{33:121,34:$V3,41:123,42:$Vu,43:$Vv,46:122,47:124,48:$V4,49:$V5,50:$V6,51:$V7,53:[1,202],56:$V8,57:$V9,58:$Va,59:$Vb},{33:121,34:$V3,41:123,42:$Vu,43:$Vv,46:122,47:124,48:$V4,49:$V5,50:$V6,51:$V7,53:[1,203],56:$V8,57:$V9,58:$Va,59:$Vb},{20:77,21:$V0,27:12,28:$V1,29:$V2,33:75,34:$V3,38:204,41:78,42:$Vu,43:$Vv,44:80,45:74,46:76,47:79,48:$V4,49:$V5,50:$V6,51:$V7,56:$V8,57:$V9,58:$Va,59:$Vb},{33:121,34:$V3,41:123,42:$Vu,43:$Vv,46:122,47:124,48:$V4,49:$V5,50:$V6,51:$V7,53:[1,205],56:$V8,57:$V9,58:$Va,59:$Vb},o($V$,[2,35],{33:121,46:122,41:123,47:124,34:$V3,42:$Vu,43:$Vv,48:$V4,49:$V5,50:$V6,51:$V7,56:$V8,57:$V9,58:$Va,59:$Vb}),o($VO,[2,63]),o($VV,[2,90]),{33:121,34:$V3,41:123,42:$Vu,43:$Vv,46:122,47:124,48:$V4,49:$V5,50:$V6,51:$V7,53:[1,206],56:$V8,57:$V9,58:$Va,59:$Vb},o($VO,[2,57]),o($VV,[2,91])],
defaultActions: {26:[2,74],157:[2,58],158:[2,59]},
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;
}};
const VM = require('../lib/vm.js');
/* 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: {},
performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {
var YYSTATE=YY_START;
switch($avoiding_name_collisions) {
case 0:/* skip whitespace */
break;
case 1:/* skip whitespace */
break;
case 2:return 50;
break;
case 3:return 48;
break;
case 4:return 49;
break;
case 5:return 51;
break;
case 6:return 62;
break;
case 7:return 64;
break;
case 8:return 34;
break;
case 9:return 56;
break;
case 10:return 57;
break;
case 11:return 36;
break;
case 12:return 43;
break;
case 13:return 42;
break;
case 14:return 39;
break;
case 15:return 58;
break;
case 16:return 59;
break;
case 17:return 60;
break;
case 18:return 79;
break;
case 19:return 28;
break;
case 20:return 29;
break;
case 21:return 50;
break;
case 22:return 48;
break;
case 23:return 49;
break;
case 24:return 51;
break;
case 25:return 62;
break;
case 26:return 64;
break;
case 27:return 34;
break;
case 28:return 56;
break;
case 29:return 57;
break;
case 30:return 36;
break;
case 31:return 43;
break;
case 32:return 42;
break;
case 33:return 39;
break;
case 34:return 58;
break;
case 35:return 59;
break;
case 36:return 60;
break;
case 37:return 79;
break;
case 38:return 28;
break;
case 39:return 29;
break;
case 40:return 63;
break;
case 41:return 63;
break;
case 42:return 63;
break;
case 43:return 70;
break;
case 44:return 21;
break;
case 45:return 21;
break;
case 46:return 25;
break;
case 47:return 13;
break;
case 48:return ' ';
break;
case 49:return 31;
break;
case 50:return 8;
break;
case 51:return 7;
break;
case 52:return 6;
break;
case 53:return 5;
break;
case 54:return '^';
break;
case 55:return 12;
break;
case 56:return 15;
break;
case 57:return 16;
break;
case 58:return 52;
break;
case 59:return 53;
break;
case 60:return 22;
break;
case 61:return 24;
break;
case 62:return 11;
break;
case 63:return 9;
break;
case 64:return '`';
break;
case 65:return '"';
break;
case 66:return "'";
break;
case 67:return 14;
break;
case 68:return 17
break;
case 69:return 10
break;
case 70:return 37
break;
case 71:return 26
break;
case 72:return 72;
break;
case 73:return 71;
break;
case 74:return 73;
break;
case 75:return 69;
break;
}
},
rules: [/^(?:\s+)/,/^(?:[##^\n].*)/,/^(?:定义)/,/^(?:变量)/,/^(?:常量)/,/^(?:函数)/,/^(?:引入)/,/^(?:作为)/,/^(?:打印)/,/^(?:如果)/,/^(?:匹配)/,/^(?:场景)/,/^(?:终止)/,/^(?:返回)/,/^(?:默认)/,/^(?:循环)/,/^(?:遍历)/,/^(?:来自)/,/^(?:特征)/,/^(?:此)/,/^(?:断言)/,/^(?:def\b)/,/^(?:let\b)/,/^(?:const\b)/,/^(?:fn\b)/,/^(?:import\b)/,/^(?:as\b)/,/^(?:print\b)/,/^(?:if\b)/,/^(?:match\b)/,/^(?:case\b)/,/^(?:break\b)/,/^(?:return\b)/,/^(?:default\b)/,/^(?:while\b)/,/^(?:each\b)/,/^(?:from\b)/,/^(?:class\b)/,/^(?:this\b)/,/^(?:assert\b)/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:`(\\[`]|[^`])*`)/,/^(?:ERROR\b)/,/^(?:[a-zA-Z][a-zA-Z0-9?]*)/,/^(?:[\u4e00-\u9fa5]+[0-9]*)/,/^(?:[0-9]+(\.[0-9]+)??\b)/,/^(?:&)/,/^(?: )/,/^(?:,)/,/^(?:\*)/,/^(?:\/)/,/^(?:-)/,/^(?:\+)/,/^(?:\^)/,/^(?:\|)/,/^(?:\()/,/^(?:\))/,/^(?:\{)/,/^(?:\})/,/^(?:\[)/,/^(?:\])/,/^(?:<)/,/^(?:>)/,/^(?:`)/,/^(?:")/,/^(?:')/,/^(?:!)/,/^(?:%)/,/^(?:=)/,/^(?::)/,/^(?:\.)/,/^(?:false\b)/,/^(?:true\b)/,/^(?:null\b)/,/^(?:$)/],
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],"inclusive":true}}
});
return lexer;
})();
parser.lexer = lexer;
function Parser () {
this.yy = {};
}
Parser.prototype = parser;parser.Parser = Parser;
return new Parser;
})();
if (typeof require !== 'undefined' && typeof exports !== 'undefined') {
exports.parser = yy;
exports.Parser = yy.Parser;
exports.parse = function () { return yy.parse.apply(yy, 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));
}
}