|
|
/* 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 jaz = (function(){ var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,15],$V1=[1,33],$V2=[1,61],$V3=[1,16],$V4=[1,17],$V5=[1,18],$V6=[1,19],$V7=[1,20],$V8=[1,21],$V9=[1,22],$Va=[1,25],$Vb=[1,23],$Vc=[1,52],$Vd=[1,53],$Ve=[1,50],$Vf=[1,51],$Vg=[1,54],$Vh=[1,55],$Vi=[1,59],$Vj=[1,60],$Vk=[1,34],$Vl=[1,35],$Vm=[1,36],$Vn=[1,39],$Vo=[5,18,19,20,23,25,28,30,31,32,33,34,36,37,82,84,92,93,94,95,99,100,104,105,109,112],$Vp=[5,18,19,20,23,25,27,28,30,31,32,33,34,36,37,82,84,92,93,94,95,99,100,104,105,109,112],$Vq=[1,75],$Vr=[1,76],$Vs=[1,77],$Vt=[5,18,19,20,22,23,24,25,27,28,29,30,31,32,33,34,36,37,52,54,56,57,58,61,63,65,67,69,71,73,74,76,77,78,79,81,82,84,85,87,88,89,90,94,95,99,100,104,105,109,112,113],$Vu=[2,97],$Vv=[1,91],$Vw=[1,92],$Vx=[5,18,19,20,22,23,24,25,27,28,29,30,31,32,33,34,36,37,52,54,57,58,82,84,92,93,94,95,99,100,104,105,109,112,113],$Vy=[5,18,19,20,22,23,24,25,27,28,29,30,31,32,33,34,36,37,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,56,57,58,61,63,65,67,69,71,73,74,76,77,78,79,81,82,84,85,87,88,89,90,92,93,94,95,99,100,104,105,109,113],$Vz=[5,18,19,20,22,23,24,25,27,28,29,30,31,32,33,34,36,37,52,54,56,57,58,82,84,92,93,94,95,99,100,104,105,109,112,113],$VA=[2,111],$VB=[1,99],$VC=[5,18,19,20,22,23,24,25,27,28,29,30,31,32,33,34,36,37,52,54,56,57,58,61,82,84,92,93,94,95,99,100,104,105,109,112,113],$VD=[1,105],$VE=[5,18,19,20,22,23,24,25,27,28,29,30,31,32,33,34,36,37,52,54,56,57,58,61,63,82,84,92,93,94,95,99,100,104,105,109,112,113],$VF=[1,108],$VG=[5,18,19,20,22,23,24,25,27,28,29,30,31,32,33,34,36,37,52,54,56,57,58,61,63,65,82,84,92,93,94,95,99,100,104,105,109,112,113],$VH=[1,109],$VI=[5,18,19,20,22,23,24,25,27,28,29,30,31,32,33,34,36,37,52,54,56,57,58,61,63,65,67,82,84,92,93,94,95,99,100,104,105,109,112,113],$VJ=[1,110],$VK=[5,18,19,20,22,23,24,25,27,28,29,30,31,32,33,34,36,37,52,54,56,57,58,61,63,65,67,69,82,84,92,93,94,95,99,100,104,105,109,112,113],$VL=[1,111],$VM=[1,112],$VN=[5,18,19,20,22,23,24,25,27,28,29,30,31,32,33,34,36,37,52,54,56,57,58,61,63,65,67,69,71,73,82,84,92,93,94,95,99,100,104,105,109,112,113],$VO=[1,113],$VP=[1,114],$VQ=[1,115],$VR=[1,116],$VS=[5,18,19,20,22,23,24,25,27,28,29,30,31,32,33,34,36,37,52,54,56,57,58,61,63,65,67,69,71,73,74,76,77,78,82,84,92,93,94,95,99,100,104,105,109,112,113],$VT=[1,117],$VU=[1,118],$VV=[5,18,19,20,22,23,24,25,27,28,29,30,31,32,33,34,36,37,52,54,56,57,58,61,63,65,67,69,71,73,74,76,77,78,79,81,92,93,94,95,99,100,104,105,109,112,113],$VW=[1,119],$VX=[1,120],$VY=[5,18,19,20,22,23,24,25,27,28,29,30,31,32,33,34,36,37,52,54,56,57,58,61,63,65,67,69,71,73,74,76,77,78,79,81,82,84,92,93,94,95,99,100,104,105,109,112,113],$VZ=[1,121],$V_=[1,122],$V$=[1,123],$V01=[1,124],$V11=[5,18,19,20,22,23,24,25,27,28,29,30,31,32,33,34,36,37,52,54,56,57,58,61,63,65,67,69,71,73,74,76,77,78,79,81,82,84,85,87,88,89,92,93,94,95,99,100,104,105,109,112,113],$V21=[1,125],$V31=[5,18,19,20,22,23,24,25,27,28,29,30,31,32,33,34,36,37,52,54,56,57,58,61,63,65,67,69,71,73,74,76,77,78,79,81,82,84,85,87,88,89,90,92,93,94,95,99,100,104,105,109,112,113],$V41=[5,18,19,20,22,23,24,25,27,28,29,30,31,32,33,34,36,37,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,56,57,58,61,63,65,67,69,71,73,74,76,77,78,79,81,82,84,85,87,88,89,90,92,93,94,95,99,100,102,104,105,109,112,113],$V51=[1,169],$V61=[22,24,113],$V71=[1,191],$V81=[5,18,19,20,22,23,24,25,27,28,29,30,31,32,33,34,36,37,58,82,84,92,93,94,95,99,100,104,105,109,112,113],$V91=[1,203],$Va1=[22,24]; var parser = {trace: function trace () { }, yy: {}, symbols_: {"error":2,"allStatments":3,"statmentList":4,"EOF":5,"statment":6,"functionDefinitionStatment":7,"templateDefinitionStatment":8,"ifStatment":9,"forStatment":10,"whileStatment":11,"doWhileStatment":12,"computeStatment":13,"returnStatment":14,"block":15,"expressionStatment":16,"includeStatment":17,"function":18,"IDENTIFIER":19,"(":20,"identifierList":21,")":22,"template":23,",":24,"if":25,"expression":26,"else":27,"for":28,";":29,"while":30,"do":31,"compute":32,"return":33,"include":34,"STRING":35,"{":36,"}":37,"e17":38,"leftHandExpression":39,"=":40,"+=":41,"-=":42,"*=":43,"/=":44,"%=":45,"<<=":46,">>=":47,"&=":48,"|=":49,"^=":50,"<==":51,"==>":52,"<--":53,"-->":54,"e16":55,"===":56,"?":57,":":58,"rightArray":59,"e15":60,"||":61,"e14":62,"&&":63,"e13":64,"|":65,"e12":66,"^":67,"e11":68,"&":69,"e10":70,"==":71,"e9":72,"!=":73,"<=":74,"e7":75,">=":76,"<":77,">":78,"<<":79,"e6":80,">>":81,"+":82,"e5":83,"-":84,"*":85,"e4":86,"/":87,"\\\\":88,"%":89,"**":90,"e3":91,"++":92,"--":93,"!":94,"~":95,"e2":96,"functionCall":97,"e0":98,"DECNUMBER":99,"HEXNUMBER":100,"simpleLeftHandExpression":101,".":102,"declaration":103,"var":104,"signal":105,"input":106,"private":107,"output":108,"component":109,"array":110,"expressionList":111,"[":112,"]":113,"$accept":0,"$end":1}, terminals_: {2:"error",5:"EOF",18:"function",19:"IDENTIFIER",20:"(",22:")",23:"template",24:",",25:"if",27:"else",28:"for",29:";",30:"while",31:"do",32:"compute",33:"return",34:"include",35:"STRING",36:"{",37:"}",40:"=",41:"+=",42:"-=",43:"*=",44:"/=",45:"%=",46:"<<=",47:">>=",48:"&=",49:"|=",50:"^=",51:"<==",52:"==>",53:"<--",54:"-->",56:"===",57:"?",58:":",61:"||",63:"&&",65:"|",67:"^",69:"&",71:"==",73:"!=",74:"<=",76:">=",77:"<",78:">",79:"<<",81:">>",82:"+",84:"-",85:"*",87:"/",88:"\\\\",89:"%",90:"**",92:"++",93:"--",94:"!",95:"~",99:"DECNUMBER",100:"HEXNUMBER",102:".",104:"var",105:"signal",106:"input",107:"private",108:"output",109:"component",112:"[",113:"]"}, productions_: [0,[3,2],[4,2],[4,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[7,6],[7,5],[8,6],[8,5],[21,3],[21,1],[9,7],[9,5],[10,9],[11,5],[12,6],[13,2],[14,3],[14,2],[17,3],[17,2],[15,3],[16,2],[16,1],[26,1],[38,3],[38,3],[38,3],[38,3],[38,3],[38,3],[38,3],[38,3],[38,3],[38,3],[38,3],[38,3],[38,3],[38,3],[38,3],[38,3],[38,5],[38,1],[55,1],[55,1],[60,3],[60,1],[62,3],[62,1],[64,3],[64,1],[66,3],[66,1],[68,3],[68,1],[70,3],[70,3],[70,1],[72,3],[72,3],[72,3],[72,3],[72,1],[75,3],[75,3],[75,1],[80,3],[80,3],[80,1],[83,3],[83,3],[83,3],[83,3],[83,1],[86,3],[86,1],[91,2],[91,2],[91,2],[91,2],[91,2],[91,2],[91,1],[96,2],[96,2],[96,1],[96,1],[98,1],[98,1],[98,1],[98,3],[39,3],[39,1],[39,1],[103,2],[103,2],[103,3],[103,4],[103,3],[103,2],[101,2],[101,1],[97,4],[97,3],[111,3],[111,1],[59,1],[110,3]], performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) { /* this == yyval */
var $0 = $$.length - 1; switch (yystate) { case 1:
// console.log(JSON.stringify($$[$0-1], null, 1));
this.$ = { type: "BLOCK", statements: $$[$0-1].statments }; setLines(this.$, _$[$0-1]); return this.$ break; case 2:
$$[$0-1].statments.push($$[$0]); setLines($$[$0-1], _$[$0-1], _$[$0]); break; case 3:
this.$ = { type: "STATMENTLIST", statments: [$$[$0]] }; setLines(this.$, _$[$0]); break; case 4: case 5: case 6: case 7: case 8: case 9: case 10: case 11: case 12: case 13: case 14: case 33: case 34: case 62: case 64: case 78: case 83: case 85: case 92: case 95: case 96: case 116:
this.$ = $$[$0]; break; case 15:
this.$ = { type: "FUNCTIONDEF", name: $$[$0-4], params: $$[$0-2].identifiers, block: $$[$0]}; setLines(this.$, _$[$0-5], _$[$0]); break; case 16:
this.$ = { type: "FUNCTIONDEF", name: $$[$0-3], params: [], block: $$[$0] }; setLines(this.$, _$[$0-4], _$[$0]); break; case 17:
this.$ = { type: "TEMPLATEDEF", name: $$[$0-4], params: $$[$0-2].identifiers, block: $$[$0] }; setLines(this.$, _$[$0-5], _$[$0]); break; case 18:
this.$ = { type: "TEMPLATEDEF", name: $$[$0-3], params: [], block: $$[$0] }; setLines(this.$, _$[$0-4], _$[$0]); break; case 19:
$$[$0-2].identifiers.push($$[$0]); setLines($$[$0-2], _$[$0-2], _$[$0]); break; case 20:
this.$ = { type: "IDENTIFIERLIST", identifiers: [$$[$0]] }; setLines(this.$, _$[$0]); break; case 21:
if ($$[$0-4].type == "NUMBER") { this.$ = !$$[$0-4].value.eq(0) ? $$[$0-2] : $$[$0]; } else { this.$ = { type: "IF", condition: $$[$0-4], then: $$[$0-2], else: $$[$0] }; } setLines(this.$, _$[$0-6], _$[$0]); break; case 22:
if ($$[$0-2].type == "NUMBER") { this.$ = !$$[$0-2].value.eq(0) ? $$[$0] : { type: "NUMBER", value: bigInt(0) }; } else { this.$ = { type: "IF", condition: $$[$0-2], then: $$[$0] }; } setLines(this.$, _$[$0-4], _$[$0]); break; case 23:
this.$ = { type: "FOR", init: $$[$0-6], condition: $$[$0-4], step: $$[$0-2], body: $$[$0] }; setLines(this.$, _$[$0-8], _$[$0]); break; case 24:
this.$ = { type: "WHILE", condition: $$[$0-2], body: $$[$0] }; setLines(this.$, _$[$0-4], _$[$0]); break; case 25:
this.$ = { type: "DOWHILE", condition: $$[$0-1], body: $$[$0-4] }; setLines(this.$, _$[$0-5], _$[$0]); break; case 26:
this.$ = { type: "COMPUTE", body: $$[$0] }; setLines(this.$, _$[$0-1], _$[$0]); break; case 27:
this.$ = { type: "RETURN", value: $$[$0-1] }; setLines(this.$, _$[$0-2], _$[$0]); break; case 28:
this.$ = { type: "RETURN", value: $$[$0] } setLines(this.$, _$[$0-1], _$[$0]); break; case 29:
this.$ = { type: "INCLUDE", file: $$[$0-1] }; setLines(this.$, _$[$0-2], _$[$0]); break; case 30:
this.$ = { type: "INCLUDE", file: $$[$0] } setLines(this.$, _$[$0-1], _$[$0]); break; case 31:
this.$ = { type: "BLOCK", statements: $$[$0-1].statments }; setLines(this.$, _$[$0-2], _$[$0]); break; case 32:
this.$ = $$[$0-1]; break; case 35:
this.$ = { type: "OP", op: "=", values: [$$[$0-2], $$[$0]] }; setLines(this.$, _$[$0-2], _$[$0]); break; case 36:
this.$ = { type: "OP", op: "+=", values: [$$[$0-2], $$[$0]] }; setLines(this.$, _$[$0-2], _$[$0]); break; case 37:
this.$ = { type: "OP", op: "-=", values: [$$[$0-2], $$[$0]] }; setLines(this.$, _$[$0-2], _$[$0]); break; case 38:
this.$ = { type: "OP", op: "*=", values: [$$[$0-2], $$[$0]] }; setLines(this.$, _$[$0-2], _$[$0]); break; case 39:
this.$ = { type: "OP", op: "/=", values: [$$[$0-2], $$[$0]] }; setLines(this.$, _$[$0-2], _$[$0]); break; case 40:
this.$ = { type: "OP", op: "%=", values: [$$[$0-2], $$[$0]] }; setLines(this.$, _$[$0-2], _$[$0]); break; case 41:
this.$ = { type: "OP", op: "<<=", values: [$$[$0-2], $$[$0]] }; setLines(this.$, _$[$0-2], _$[$0]); break; case 42:
this.$ = { type: "OP", op: ">>=", values: [$$[$0-2], $$[$0]] }; setLines(this.$, _$[$0-2], _$[$0]); break; case 43:
this.$ = { type: "OP", op: "&=", values: [$$[$0-2], $$[$0]] }; setLines(this.$, _$[$0-2], _$[$0]); break; case 44:
this.$ = { type: "OP", op: "|=", values: [$$[$0-2], $$[$0]] }; setLines(this.$, _$[$0-2], _$[$0]); break; case 45:
this.$ = { type: "OP", op: "^=", values: [$$[$0-2], $$[$0]] }; setLines(this.$, _$[$0-2], _$[$0]); break; case 46:
this.$ = { type: "OP", op: "<==", values: [$$[$0-2], $$[$0]] }; setLines(this.$, _$[$0-2], _$[$0]); break; case 47:
this.$ = { type: "OP", op: "<==", values: [$$[$0], $$[$0-2]] }; setLines(this.$, _$[$0-2], _$[$0]); break; case 48:
this.$ = { type: "OP", op: "<--", values: [$$[$0-2], $$[$0]] }; setLines(this.$, _$[$0-2], _$[$0]); break; case 49:
this.$ = { type: "OP", op: "<--", values: [$$[$0], $$[$0-2]] }; setLines(this.$, _$[$0-2], _$[$0]); break; case 50:
this.$ = { type: "OP", op: "===", values: [$$[$0-2], $$[$0]] }; setLines(this.$, _$[$0-2], _$[$0]); break; case 51:
if ($$[$0-4].type == "NUMBER") { this.$ = !$$[$0-4].value.eq(0) ? $$[$0-2] : $$[$0]; } else { this.$ = { type: "OP", op: "?", values: [$$[$0-4], $$[$0-2], $$[$0]] }; } setLines(this.$, _$[$0-4], _$[$0]); break; case 52: case 53: case 54: case 56: case 58: case 60:
this.$ = $$[$0]; break; case 55:
if (($$[$0-2].type == "NUMBER") && ($$[$0].type == "NUMBER")) { this.$ = { type: "NUMBER", value: !$$[$0-2].value.eq(0) || !$$[$0].value.eq(0) ? bigInt(1) : bigInt(0) }; } else { this.$ = { type: "OP", op: "||", values: [$$[$0-2], $$[$0]] }; } setLines(this.$, _$[$0-2], _$[$0]); break; case 57:
if (($$[$0-2].type == "NUMBER") && ($$[$0].type == "NUMBER")) { this.$ = { type: "NUMBER", value: !$$[$0-2].value.eq(0) && !$$[$0].value.eq(0) ? bigInt(1) : bigInt(0) }; } else { this.$ = { type: "OP", op: "&&", values: [$$[$0-2], $$[$0]] }; } setLines(this.$, _$[$0-2], _$[$0]); break; case 59:
if (($$[$0-2].type == "NUMBER") && ($$[$0].type == "NUMBER")) { this.$ = { type: "NUMBER", value: $$[$0-2].value.or($$[$0].value).and(__MASK__) }; } else { this.$ = { type: "OP", op: "|", values: [$$[$0-2], $$[$0]] }; } setLines(this.$, _$[$0-2], _$[$0]); break; case 61:
if (($$[$0-2].type == "NUMBER") && ($$[$0].type == "NUMBER")) { this.$ = { type: "NUMBER", value: $$[$0-2].value.xor($$[$0].value).and(__MASK__) }; } else { this.$ = { type: "OP", op: "^", values: [$$[$0-2], $$[$0]] }; } setLines(this.$, _$[$0-2], _$[$0]); break; case 63:
if (($$[$0-2].type == "NUMBER") && ($$[$0].type == "NUMBER")) { this.$ = { type: "NUMBER", value: $$[$0-2].value.and($$[$0].value).and(__MASK__) }; } else { this.$ = { type: "OP", op: "&", values: [$$[$0-2], $$[$0]] }; } setLines(this.$, _$[$0-2], _$[$0]); break; case 65:
if (($$[$0-2].type == "NUMBER") && ($$[$0].type == "NUMBER")) { this.$ = { type: "NUMBER", value: $$[$0-2].value.equals($$[$0].value) ? bigInt(1) : bigInt(0) }; } else { this.$ = { type: "OP", op: "==", values: [$$[$0-2], $$[$0]] }; } setLines(this.$, _$[$0-2], _$[$0]); break; case 66:
if (($$[$0-2].type == "NUMBER") && ($$[$0].type == "NUMBER")) { this.$ = { type: "NUMBER", value: $$[$0-2].value.eq($$[$0].value) ? bigInt(0) : bigInt(1) }; } else { this.$ = { type: "OP", op: "!=", values: [$$[$0-2], $$[$0]] }; } setLines(this.$, _$[$0-2], _$[$0]); break; case 67: case 72:
this.$ = $$[$0] break; case 68:
if (($$[$0-2].type == "NUMBER") && ($$[$0].type == "NUMBER")) { this.$ = { type: "NUMBER", value: $$[$0-2].value.lesserOrEquals($$[$0].value) ? bigInt(1) : bigInt(0) }; } else { this.$ = { type: "OP", op: "<=", values: [$$[$0-2], $$[$0]] }; } setLines(this.$, _$[$0-2], _$[$0]); break; case 69:
if (($$[$0-2].type == "NUMBER") && ($$[$0].type == "NUMBER")) { this.$ = { type: "NUMBER", value: $$[$0-2].value.greaterOrEquals($$[$0].value) ? bigInt(1) : bigInt(0) }; } else { this.$ = { type: "OP", op: ">=", values: [$$[$0-2], $$[$0]] }; } setLines(this.$, _$[$0-2], _$[$0]); break; case 70:
if (($$[$0-2].type == "NUMBER") && ($$[$0].type == "NUMBER")) { this.$ = { type: "NUMBER", value: $$[$0-2].value.lesser($$[$0].value) ? bigInt(1) : bigInt(0) }; } else { this.$ = { type: "OP", op: "<", values: [$$[$0-2], $$[$0]] }; } setLines(this.$, _$[$0-2], _$[$0]); break; case 71:
if (($$[$0-2].type == "NUMBER") && ($$[$0].type == "NUMBER")) { this.$ = { type: "NUMBER", value: $$[$0-2].value.greater($$[$0].value) ? bigInt(1) : bigInt(0) }; } else { this.$ = { type: "OP", op: ">", values: [$$[$0-2], $$[$0]] }; } setLines(this.$, _$[$0-2], _$[$0]); break; case 73:
if (($$[$0-2].type == "NUMBER") && ($$[$0].type == "NUMBER")) { let v = $$[$0].value.greater(256) ? 256 : $$[$0].value.value; this.$ = { type: "NUMBER", value: $$[$0-2].value.shiftLeft(v).and(__MASK__) }; } else { this.$ = { type: "OP", op: "<<", values: [$$[$0-2], $$[$0]] }; } setLines(this.$, _$[$0-2], _$[$0]); break; case 74:
if (($$[$0-2].type == "NUMBER") && ($$[$0].type == "NUMBER")) { let v = $$[$0].value.greater(256) ? 256 : $$[$0].value.value; this.$ = {type: "NUMBER", value: $$[$0-2].value.shiftRight(v).and(__MASK__) }; } else { this.$ = { type: "OP", op: ">>", values: [$$[$0-2], $$[$0]] }; } setLines(this.$, _$[$0-2], _$[$0]); break; case 75:
this.$ = $$[$0]; break; case 76:
if (($$[$0-2].type == "NUMBER") && ($$[$0].type == "NUMBER")) { this.$ = { type: "NUMBER", value: ($$[$0-2].value.plus($$[$0].value)).mod(__P__) }; } else { this.$ = { type: "OP", op: "+", values: [$$[$0-2], $$[$0]] }; } setLines(this.$, _$[$0-2], _$[$0]); break; case 77:
if (($$[$0-2].type == "NUMBER") && ($$[$0].type == "NUMBER")) { this.$ = { type: "NUMBER", value: ($$[$0-2].value.plus(__P__).minus($$[$0].value)).mod(__P__) }; } else { this.$ = { type: "OP", op: "-", values: [$$[$0-2], $$[$0]] }; } setLines(this.$, _$[$0-2], _$[$0]); break; case 79:
if (($$[$0-2].type == "NUMBER") && ($$[$0].type == "NUMBER")) { this.$ = { type: "NUMBER", value: ($$[$0-2].value.times($$[$0].value)).mod(__P__) }; } else { this.$ = { type: "OP", op: "*", values: [$$[$0-2], $$[$0]] }; } setLines(this.$, _$[$0-2], _$[$0]); break; case 80:
if (($$[$0-2].type == "NUMBER") && ($$[$0].type == "NUMBER")) { this.$ = { type: "NUMBER", value: ($$[$0-2].value.times($$[$0].value.modInv(__P__))).mod(__P__) }; } else { this.$ = { type: "OP", op: "/", values: [$$[$0-2], $$[$0]] }; } setLines(this.$, _$[$0-2], _$[$0]); break; case 81:
if (($$[$0-2].type == "NUMBER") && ($$[$0].type == "NUMBER")) { this.$ = { type: "NUMBER", value: ($$[$0-2].value.divide($$[$0].value)) }; } else { this.$ = { type: "OP", op: "\\", values: [$$[$0-2], $$[$0]] }; } setLines(this.$, _$[$0-2], _$[$0]); break; case 82:
if (($$[$0-2].type == "NUMBER") && ($$[$0].type == "NUMBER")) { this.$ = { type: "NUMBER", value: $$[$0-2].value.mod($$[$0].value) }; } else { this.$ = { type: "OP", op: "%", values: [$$[$0-2], $$[$0]] }; } setLines(this.$, _$[$0-2], _$[$0]); break; case 84:
if (($$[$0-2].type == "NUMBER") && ($$[$0].type == "NUMBER")) { this.$ = { type: "NUMBER", value: $$[$0-2].value.modPow($$[$0].value, __P__) }; } else { this.$ = { type: "OP", op: "**", values: [$$[$0-2], $$[$0]] }; } setLines(this.$, _$[$0-2], _$[$0]); break; case 86:
this.$ = { type: "OP", op: "PLUSPLUSLEFT", values: [$$[$0]] }; setLines(this.$, _$[$0-1], _$[$0]); break; case 87:
this.$ = { type: "OP", op: "MINUSMINUSLEFT", values: [$$[$0]] }; setLines(this.$, _$[$0-1], _$[$0]); break; case 88:
this.$ = $$[$0]; setLines(this.$, _$[$0-1], _$[$0]); break; case 89:
if ($$[$0].type == "NUMBER") { this.$ = { type: "NUMBER", value: __P__.minus($$[$0].value).mod(__P__) }; } else { this.$ = { type: "OP", op: "UMINUS", values: [$$[$0]] }; } setLines(this.$, _$[$0-1], _$[$0]); break; case 90:
if ($$[$0].type == "NUMBER") { this.$ = { type: "NUMBER", value: $$[$0].value.eq(0) ? bigInt(1) : bigInt(0) }; } else { this.$ = { type: "OP", op: "!", values: [$$[$0]] }; } setLines(this.$, _$[$0-1], _$[$0]); break; case 91:
if ($$[$0].type == "NUMBER") { this.$ = { type: "NUMBER", value: $$[$0].value.xor(__MASK__) }; } else { this.$ = { type: "OP", op: "~", values: [$$[$0]] }; } setLines(this.$, _$[$0-1], _$[$0]); break; case 93:
this.$ = {type: "OP", op: "PLUSPLUSRIGHT", values: [$$[$0-1]] }; setLines(this.$, _$[$0-1], _$[$0]); break; case 94:
this.$ = {type: "OP", op: "MINUSMINUSRIGHT", values: [$$[$0-1]] }; setLines(this.$, _$[$0-1], _$[$0]); break; case 97: case 102: case 103:
this.$ = $$[$0] break; case 98:
this.$ = {type: "NUMBER", value: bigInt($$[$0]).mod(__P__) } setLines(this.$, _$[$0]); break; case 99:
this.$ = {type: "NUMBER", value: bigInt($$[$0].substr(2).toUpperCase(), 16).mod(__P__) } setLines(this.$, _$[$0]); break; case 100:
this.$ = $$[$0-1]; setLines(this.$, _$[$0-2], _$[$0]); break; case 101:
this.$ = {type: "PIN", component: $$[$0-2], pin: $$[$0] }; setLines(this.$, _$[$0-2], _$[$0]); break; case 104:
this.$ = {type: "DECLARE", declareType: "VARIABLE", name: $$[$0]} setLines(this.$, _$[$0-1], _$[$0]); break; case 105:
this.$ = {type: "DECLARE", declareType: "SIGNAL", name: $$[$0]} setLines(this.$, _$[$0-1], _$[$0]); break; case 106:
this.$ = {type: "DECLARE", declareType: "SIGNALIN", name: $$[$0]}; setLines(this.$, _$[$0-2], _$[$0]); break; case 107:
this.$ = {type: "DECLARE", declareType: "SIGNALIN", private: true, name: $$[$0]}; setLines(this.$, _$[$0-3], _$[$0]); break; case 108:
this.$ = {type: "DECLARE", declareType: "SIGNALOUT", name: $$[$0]}; setLines(this.$, _$[$0-2], _$[$0]); break; case 109:
this.$ = {type: "DECLARE", declareType: "COMPONENT", name: $$[$0]} setLines(this.$, _$[$0-1], _$[$0]); break; case 110:
for (let i=0; i< $$[$0].values.length; i++) { $$[$0-1].selectors.push($$[$0].values[i]); } setLines($$[$0-1], _$[$0-1], _$[$0]); break; case 111:
this.$ = {type: "VARIABLE", name: $$[$0] , selectors: []}; setLines(this.$, _$[$0]); break; case 112:
this.$ = {type: "FUNCTIONCALL", name: $$[$0-3], params: $$[$0-1].expressions} setLines(this.$, _$[$0-3], _$[$0]); break; case 113:
this.$ = {type: "FUNCTIONCALL", name: $$[$0-2], params: []} setLines(this.$, _$[$0-2], _$[$0]); break; case 114:
$$[$0-2].expressions.push($$[$0]); setLines(this.$, _$[$0-2], _$[$0]); break; case 115:
this.$ = {type: "EXPRESSIONLST", expressions: [$$[$0]]}; setLines(this.$, _$[$0]); break; case 117:
this.$ = { type: "ARRAY", values: $$[$0-1].expressions}; setLines(this.$, _$[$0-2], _$[$0]); break; } }, table: [{3:1,4:2,6:3,7:4,8:5,9:6,10:7,11:8,12:9,13:10,14:11,15:12,16:13,17:14,18:$V0,19:$V1,20:$V2,23:$V3,25:$V4,26:24,28:$V5,30:$V6,31:$V7,32:$V8,33:$V9,34:$Va,36:$Vb,38:26,39:27,55:28,59:31,60:32,62:38,64:40,66:41,68:42,70:43,72:44,75:45,80:46,82:$Vc,83:47,84:$Vd,86:48,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm,110:37,112:$Vn},{1:[3]},{5:[1,62],6:63,7:4,8:5,9:6,10:7,11:8,12:9,13:10,14:11,15:12,16:13,17:14,18:$V0,19:$V1,20:$V2,23:$V3,25:$V4,26:24,28:$V5,30:$V6,31:$V7,32:$V8,33:$V9,34:$Va,36:$Vb,38:26,39:27,55:28,59:31,60:32,62:38,64:40,66:41,68:42,70:43,72:44,75:45,80:46,82:$Vc,83:47,84:$Vd,86:48,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm,110:37,112:$Vn},o($Vo,[2,3]),o($Vp,[2,4]),o($Vp,[2,5]),o($Vp,[2,6]),o($Vp,[2,7]),o($Vp,[2,8]),o($Vp,[2,9]),o($Vp,[2,10]),o($Vp,[2,11]),o($Vp,[2,12]),o($Vp,[2,13]),o($Vp,[2,14]),{19:[1,64]},{19:[1,65]},{20:[1,66]},{20:[1,67]},{20:[1,68]},{6:69,7:4,8:5,9:6,10:7,11:8,12:9,13:10,14:11,15:12,16:13,17:14,18:$V0,19:$V1,20:$V2,23:$V3,25:$V4,26:24,28:$V5,30:$V6,31:$V7,32:$V8,33:$V9,34:$Va,36:$Vb,38:26,39:27,55:28,59:31,60:32,62:38,64:40,66:41,68:42,70:43,72:44,75:45,80:46,82:$Vc,83:47,84:$Vd,86:48,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm,110:37,112:$Vn},{6:70,7:4,8:5,9:6,10:7,11:8,12:9,13:10,14:11,15:12,16:13,17:14,18:$V0,19:$V1,20:$V2,23:$V3,25:$V4,26:24,28:$V5,30:$V6,31:$V7,32:$V8,33:$V9,34:$Va,36:$Vb,38:26,39:27,55:28,59:31,60:32,62:38,64:40,66:41,68:42,70:43,72:44,75:45,80:46,82:$Vc,83:47,84:$Vd,86:48,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm,110:37,112:$Vn},{19:$V1,20:$V2,26:71,38:26,39:27,55:28,59:31,60:32,62:38,64:40,66:41,68:42,70:43,72:44,75:45,80:46,82:$Vc,83:47,84:$Vd,86:48,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm,110:37,112:$Vn},{4:72,6:3,7:4,8:5,9:6,10:7,11:8,12:9,13:10,14:11,15:12,16:13,17:14,18:$V0,19:$V1,20:$V2,23:$V3,25:$V4,26:24,28:$V5,30:$V6,31:$V7,32:$V8,33:$V9,34:$Va,36:$Vb,38:26,39:27,55:28,59:31,60:32,62:38,64:40,66:41,68:42,70:43,72:44,75:45,80:46,82:$Vc,83:47,84:$Vd,86:48,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm,110:37,112:$Vn},o($Vp,[2,33],{29:[1,73]}),{35:[1,74]},o([5,18,19,20,22,23,24,25,27,28,29,30,31,32,33,34,36,37,82,84,92,93,94,95,99,100,104,105,109,112,113],[2,34],{52:$Vq,54:$Vr,57:$Vs}),o($Vt,$Vu,{40:[1,78],41:[1,79],42:[1,80],43:[1,81],44:[1,82],45:[1,83],46:[1,84],47:[1,85],48:[1,86],49:[1,87],50:[1,88],51:[1,89],53:[1,90],92:$Vv,93:$Vw}),o($Vx,[2,52],{56:[1,93]}),o($Vy,[2,103],{110:95,102:[1,94],112:$Vn}),o([5,18,19,20,22,23,24,25,27,28,29,30,31,32,33,34,36,37,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,56,57,58,61,63,65,67,69,71,73,74,76,77,78,79,81,82,84,85,87,88,89,90,92,93,94,95,99,100,104,105,109,112,113],[2,102]),o($Vz,[2,53]),o($Vz,[2,54],{61:[1,96]}),o([5,18,19,22,23,24,25,27,28,29,30,31,32,33,34,36,37,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,56,57,58,61,63,65,67,69,71,73,74,76,77,78,79,81,82,84,85,87,88,89,90,92,93,94,95,99,100,102,104,105,109,112,113],$VA,{20:[1,97]}),{19:$VB,101:98},{19:$VB,101:100,106:[1,101],107:[1,102],108:[1,103]},{19:$VB,101:104},o($Vz,[2,116]),o($VC,[2,56],{63:$VD}),{19:$V1,20:$V2,26:107,38:26,39:27,55:28,59:31,60:32,62:38,64:40,66:41,68:42,70:43,72:44,75:45,80:46,82:$Vc,83:47,84:$Vd,86:48,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm,110:37,111:106,112:$Vn},o($VE,[2,58],{65:$VF}),o($VG,[2,60],{67:$VH}),o($VI,[2,62],{69:$VJ}),o($VK,[2,64],{71:$VL,73:$VM}),o($VN,[2,67],{74:$VO,76:$VP,77:$VQ,78:$VR}),o($VS,[2,72],{79:$VT,81:$VU}),o($VV,[2,75],{82:$VW,84:$VX}),o($VY,[2,78],{85:$VZ,87:$V_,88:$V$,89:$V01}),o($V11,[2,83],{90:$V21}),o($V31,[2,85]),{19:$VB,39:126,101:29,103:30,104:$Vk,105:$Vl,109:$Vm},{19:$VB,39:127,101:29,103:30,104:$Vk,105:$Vl,109:$Vm},{19:$V1,20:$V2,39:129,82:$Vc,84:$Vd,91:128,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm},{19:$V1,20:$V2,39:129,82:$Vc,84:$Vd,91:130,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm},{19:$V1,20:$V2,39:129,82:$Vc,84:$Vd,91:131,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm},{19:$V1,20:$V2,39:129,82:$Vc,84:$Vd,91:132,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm},o($V31,[2,92]),o($V31,[2,95]),o($V31,[2,96]),o($V31,[2,98]),o($V31,[2,99]),{19:$V1,20:$V2,26:133,38:26,39:27,55:28,59:31,60:32,62:38,64:40,66:41,68:42,70:43,72:44,75:45,80:46,82:$Vc,83:47,84:$Vd,86:48,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm,110:37,112:$Vn},{1:[2,1]},o($Vo,[2,2]),{20:[1,134]},{20:[1,135]},{19:$V1,20:$V2,26:136,38:26,39:27,55:28,59:31,60:32,62:38,64:40,66:41,68:42,70:43,72:44,75:45,80:46,82:$Vc,83:47,84:$Vd,86:48,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm,110:37,112:$Vn},{19:$V1,20:$V2,26:137,38:26,39:27,55:28,59:31,60:32,62:38,64:40,66:41,68:42,70:43,72:44,75:45,80:46,82:$Vc,83:47,84:$Vd,86:48,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm,110:37,112:$Vn},{19:$V1,20:$V2,26:138,38:26,39:27,55:28,59:31,60:32,62:38,64:40,66:41,68:42,70:43,72:44,75:45,80:46,82:$Vc,83:47,84:$Vd,86:48,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm,110:37,112:$Vn},{30:[1,139]},o($Vp,[2,26]),o($Vp,[2,28],{29:[1,140]}),{6:63,7:4,8:5,9:6,10:7,11:8,12:9,13:10,14:11,15:12,16:13,17:14,18:$V0,19:$V1,20:$V2,23:$V3,25:$V4,26:24,28:$V5,30:$V6,31:$V7,32:$V8,33:$V9,34:$Va,36:$Vb,37:[1,141],38:26,39:27,55:28,59:31,60:32,62:38,64:40,66:41,68:42,70:43,72:44,75:45,80:46,82:$Vc,83:47,84:$Vd,86:48,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm,110:37,112:$Vn},o($Vp,[2,32]),o($Vp,[2,30],{29:[1,142]}),{19:$VB,39:143,101:29,103:30,104:$Vk,105:$Vl,109:$Vm},{19:$VB,39:144,101:29,103:30,104:$Vk,105:$Vl,109:$Vm},{19:$V1,20:$V2,38:145,39:27,55:28,59:31,60:32,62:38,64:40,66:41,68:42,70:43,72:44,75:45,80:46,82:$Vc,83:47,84:$Vd,86:48,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm,110:37,112:$Vn},{19:$V1,20:$V2,38:146,39:27,55:28,59:31,60:32,62:38,64:40,66:41,68:42,70:43,72:44,75:45,80:46,82:$Vc,83:47,84:$Vd,86:48,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm,110:37,112:$Vn},{19:$V1,20:$V2,38:147,39:27,55:28,59:31,60:32,62:38,64:40,66:41,68:42,70:43,72:44,75:45,80:46,82:$Vc,83:47,84:$Vd,86:48,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm,110:37,112:$Vn},{19:$V1,20:$V2,38:148,39:27,55:28,59:31,60:32,62:38,64:40,66:41,68:42,70:43,72:44,75:45,80:46,82:$Vc,83:47,84:$Vd,86:48,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm,110:37,112:$Vn},{19:$V1,20:$V2,38:149,39:27,55:28,59:31,60:32,62:38,64:40,66:41,68:42,70:43,72:44,75:45,80:46,82:$Vc,83:47,84:$Vd,86:48,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm,110:37,112:$Vn},{19:$V1,20:$V2,38:150,39:27,55:28,59:31,60:32,62:38,64:40,66:41,68:42,70:43,72:44,75:45,80:46,82:$Vc,83:47,84:$Vd,86:48,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm,110:37,112:$Vn},{19:$V1,20:$V2,38:151,39:27,55:28,59:31,60:32,62:38,64:40,66:41,68:42,70:43,72:44,75:45,80:46,82:$Vc,83:47,84:$Vd,86:48,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm,110:37,112:$Vn},{19:$V1,20:$V2,38:152,39:27,55:28,59:31,60:32,62:38,64:40,66:41,68:42,70:43,72:44,75:45,80:46,82:$Vc,83:47,84:$Vd,86:48,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm,110:37,112:$Vn},{19:$V1,20:$V2,38:153,39:27,55:28,59:31,60:32,62:38,64:40,66:41,68:42,70:43,72:44,75:45,80:46,82:$Vc,83:47,84:$Vd,86:48,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm,110:37,112:$Vn},{19:$V1,20:$V2,38:154,39:27,55:28,59:31,60:32,62:38,64:40,66:41,68:42,70:43,72:44,75:45,80:46,82:$Vc,83:47,84:$Vd,86:48,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm,110:37,112:$Vn},{19:$V1,20:$V2,38:155,39:27,55:28,59:31,60:32,62:38,64:40,66:41,68:42,70:43,72:44,75:45,80:46,82:$Vc,83:47,84:$Vd,86:48,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm,110:37,112:$Vn},{19:$V1,20:$V2,38:156,39:27,55:28,59:31,60:32,62:38,64:40,66:41,68:42,70:43,72:44,75:45,80:46,82:$Vc,83:47,84:$Vd,86:48,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm,110:37,112:$Vn},{19:$V1,20:$V2,38:157,39:27,55:28,59:31,60:32,62:38,64:40,66:41,68:42,70:43,72:44,75:45,80:46,82:$Vc,83:47,84:$Vd,86:48,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm,110:37,112:$Vn},{19:$V1,20:$V2,38:158,39:27,55:28,59:31,60:32,62:38,64:40,66:41,68:42,70:43,72:44,75:45,80:46,82:$Vc,83:47,84:$Vd,86:48,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm,110:37,112:$Vn},o($V31,[2,93]),o($V31,[2,94]),{19:$V1,20:$V2,38:159,39:27,55:28,59:31,60:32,62:38,64:40,66:41,68:42,70:43,72:44,75:45,80:46,82:$Vc,83:47,84:$Vd,86:48,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm,110:37,112:$Vn},{19:$VB,101:160},o($V41,[2,110]),{19:$V1,20:$V2,39:129,62:161,64:40,66:41,68:42,70:43,72:44,75:45,80:46,82:$Vc,83:47,84:$Vd,86:48,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm},{19:$V1,20:$V2,22:[1,163],26:107,38:26,39:27,55:28,59:31,60:32,62:38,64:40,66:41,68:42,70:43,72:44,75:45,80:46,82:$Vc,83:47,84:$Vd,86:48,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm,110:37,111:162,112:$Vn},o($Vy,[2,104],{110:95,112:$Vn}),o($V41,$VA),o($Vy,[2,105],{110:95,112:$Vn}),{19:$VB,101:164},{106:[1,165]},{19:$VB,101:166},o($Vy,[2,109],{110:95,112:$Vn}),{19:$V1,20:$V2,39:129,64:167,66:41,68:42,70:43,72:44,75:45,80:46,82:$Vc,83:47,84:$Vd,86:48,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm},{24:$V51,113:[1,168]},o($V61,[2,115]),{19:$V1,20:$V2,39:129,66:170,68:42,70:43,72:44,75:45,80:46,82:$Vc,83:47,84:$Vd,86:48,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm},{19:$V1,20:$V2,39:129,68:171,70:43,72:44,75:45,80:46,82:$Vc,83:47,84:$Vd,86:48,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm},{19:$V1,20:$V2,39:129,70:172,72:44,75:45,80:46,82:$Vc,83:47,84:$Vd,86:48,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm},{19:$V1,20:$V2,39:129,72:173,75:45,80:46,82:$Vc,83:47,84:$Vd,86:48,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm},{19:$V1,20:$V2,39:129,72:174,75:45,80:46,82:$Vc,83:47,84:$Vd,86:48,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm},{19:$V1,20:$V2,39:129,75:175,80:46,82:$Vc,83:47,84:$Vd,86:48,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm},{19:$V1,20:$V2,39:129,75:176,80:46,82:$Vc,83:47,84:$Vd,86:48,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm},{19:$V1,20:$V2,39:129,75:177,80:46,82:$Vc,83:47,84:$Vd,86:48,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm},{19:$V1,20:$V2,39:129,75:178,80:46,82:$Vc,83:47,84:$Vd,86:48,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm},{19:$V1,20:$V2,39:129,80:179,82:$Vc,83:47,84:$Vd,86:48,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm},{19:$V1,20:$V2,39:129,80:180,82:$Vc,83:47,84:$Vd,86:48,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm},{19:$V1,20:$V2,39:129,82:$Vc,83:181,84:$Vd,86:48,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm},{19:$V1,20:$V2,39:129,82:$Vc,83:182,84:$Vd,86:48,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm},{19:$V1,20:$V2,39:129,82:$Vc,84:$Vd,86:183,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm},{19:$V1,20:$V2,39:129,82:$Vc,84:$Vd,86:184,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm},{19:$V1,20:$V2,39:129,82:$Vc,84:$Vd,86:185,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm},{19:$V1,20:$V2,39:129,82:$Vc,84:$Vd,86:186,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm},{19:$V1,20:$V2,39:129,82:$Vc,84:$Vd,91:187,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm},o($V31,[2,86]),o($V31,[2,87]),o($V31,[2,88]),o($Vt,$Vu,{92:$Vv,93:$Vw}),o($V31,[2,89]),o($V31,[2,90]),o($V31,[2,91]),{22:[1,188]},{19:$V71,21:189,22:[1,190]},{19:$V71,21:192,22:[1,193]},{22:[1,194]},{29:[1,195]},{22:[1,196]},{20:[1,197]},o($Vp,[2,27]),o($Vp,[2,31]),o($Vp,[2,29]),o($Vx,[2,47]),o($Vx,[2,49]),{52:$Vq,54:$Vr,57:$Vs,58:[1,198]},o($V81,[2,35],{52:$Vq,54:$Vr,57:$Vs}),o($V81,[2,36],{52:$Vq,54:$Vr,57:$Vs}),o($V81,[2,37],{52:$Vq,54:$Vr,57:$Vs}),o($V81,[2,38],{52:$Vq,54:$Vr,57:$Vs}),o($V81,[2,39],{52:$Vq,54:$Vr,57:$Vs}),o($V81,[2,40],{52:$Vq,54:$Vr,57:$Vs}),o($V81,[2,41],{52:$Vq,54:$Vr,57:$Vs}),o($V81,[2,42],{52:$Vq,54:$Vr,57:$Vs}),o($V81,[2,43],{52:$Vq,54:$Vr,57:$Vs}),o($V81,[2,44],{52:$Vq,54:$Vr,57:$Vs}),o($V81,[2,45],{52:$Vq,54:$Vr,57:$Vs}),o($V81,[2,46],{52:$Vq,54:$Vr,57:$Vs}),o($V81,[2,48],{52:$Vq,54:$Vr,57:$Vs}),o($V81,[2,50],{52:$Vq,54:$Vr,57:$Vs}),o($Vy,[2,101],{110:95,112:$Vn}),o($VC,[2,55],{63:$VD}),{22:[1,199],24:$V51},o($V31,[2,113]),o($Vy,[2,106],{110:95,112:$Vn}),{19:$VB,101:200},o($Vy,[2,108],{110:95,112:$Vn}),o($VE,[2,57],{65:$VF}),o($V41,[2,117]),{19:$V1,20:$V2,26:201,38:26,39:27,55:28,59:31,60:32,62:38,64:40,66:41,68:42,70:43,72:44,75:45,80:46,82:$Vc,83:47,84:$Vd,86:48,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm,110:37,112:$Vn},o($VG,[2,59],{67:$VH}),o($VI,[2,61],{69:$VJ}),o($VK,[2,63],{71:$VL,73:$VM}),o($VN,[2,65],{74:$VO,76:$VP,77:$VQ,78:$VR}),o($VN,[2,66],{74:$VO,76:$VP,77:$VQ,78:$VR}),o($VS,[2,68],{79:$VT,81:$VU}),o($VS,[2,69],{79:$VT,81:$VU}),o($VS,[2,70],{79:$VT,81:$VU}),o($VS,[2,71],{79:$VT,81:$VU}),o($VV,[2,73],{82:$VW,84:$VX}),o($VV,[2,74],{82:$VW,84:$VX}),o($VY,[2,76],{85:$VZ,87:$V_,88:$V$,89:$V01}),o($VY,[2,77],{85:$VZ,87:$V_,88:$V$,89:$V01}),o($V11,[2,79],{90:$V21}),o($V11,[2,80],{90:$V21}),o($V11,[2,81],{90:$V21}),o($V11,[2,82],{90:$V21}),o($V31,[2,84]),o($V31,[2,100]),{22:[1,202],24:$V91},{15:204,36:$Vb},o($Va1,[2,20]),{22:[1,205],24:$V91},{15:206,36:$Vb},{6:207,7:4,8:5,9:6,10:7,11:8,12:9,13:10,14:11,15:12,16:13,17:14,18:$V0,19:$V1,20:$V2,23:$V3,25:$V4,26:24,28:$V5,30:$V6,31:$V7,32:$V8,33:$V9,34:$Va,36:$Vb,38:26,39:27,55:28,59:31,60:32,62:38,64:40,66:41,68:42,70:43,72:44,75:45,80:46,82:$Vc,83:47,84:$Vd,86:48,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm,110:37,112:$Vn},{19:$V1,20:$V2,26:208,38:26,39:27,55:28,59:31,60:32,62:38,64:40,66:41,68:42,70:43,72:44,75:45,80:46,82:$Vc,83:47,84:$Vd,86:48,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm,110:37,112:$Vn},{6:209,7:4,8:5,9:6,10:7,11:8,12:9,13:10,14:11,15:12,16:13,17:14,18:$V0,19:$V1,20:$V2,23:$V3,25:$V4,26:24,28:$V5,30:$V6,31:$V7,32:$V8,33:$V9,34:$Va,36:$Vb,38:26,39:27,55:28,59:31,60:32,62:38,64:40,66:41,68:42,70:43,72:44,75:45,80:46,82:$Vc,83:47,84:$Vd,86:48,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm,110:37,112:$Vn},{19:$V1,20:$V2,26:210,38:26,39:27,55:28,59:31,60:32,62:38,64:40,66:41,68:42,70:43,72:44,75:45,80:46,82:$Vc,83:47,84:$Vd,86:48,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm,110:37,112:$Vn},{19:$V1,20:$V2,38:211,39:27,55:28,59:31,60:32,62:38,64:40,66:41,68:42,70:43,72:44,75:45,80:46,82:$Vc,83:47,84:$Vd,86:48,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm,110:37,112:$Vn},o($V31,[2,112]),o($Vy,[2,107],{110:95,112:$Vn}),o($V61,[2,114]),{15:212,36:$Vb},{19:[1,213]},o($Vp,[2,16]),{15:214,36:$Vb},o($Vp,[2,18]),o($Vo,[2,22],{27:[1,215]}),{29:[1,216]},o($Vp,[2,24]),{22:[1,217]},o($V81,[2,51],{52:$Vq,54:$Vr,57:$Vs}),o($Vp,[2,15]),o($Va1,[2,19]),o($Vp,[2,17]),{6:218,7:4,8:5,9:6,10:7,11:8,12:9,13:10,14:11,15:12,16:13,17:14,18:$V0,19:$V1,20:$V2,23:$V3,25:$V4,26:24,28:$V5,30:$V6,31:$V7,32:$V8,33:$V9,34:$Va,36:$Vb,38:26,39:27,55:28,59:31,60:32,62:38,64:40,66:41,68:42,70:43,72:44,75:45,80:46,82:$Vc,83:47,84:$Vd,86:48,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm,110:37,112:$Vn},{19:$V1,20:$V2,26:219,38:26,39:27,55:28,59:31,60:32,62:38,64:40,66:41,68:42,70:43,72:44,75:45,80:46,82:$Vc,83:47,84:$Vd,86:48,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm,110:37,112:$Vn},o($Vp,[2,25]),o($Vp,[2,21]),{22:[1,220]},{6:221,7:4,8:5,9:6,10:7,11:8,12:9,13:10,14:11,15:12,16:13,17:14,18:$V0,19:$V1,20:$V2,23:$V3,25:$V4,26:24,28:$V5,30:$V6,31:$V7,32:$V8,33:$V9,34:$Va,36:$Vb,38:26,39:27,55:28,59:31,60:32,62:38,64:40,66:41,68:42,70:43,72:44,75:45,80:46,82:$Vc,83:47,84:$Vd,86:48,91:49,92:$Ve,93:$Vf,94:$Vg,95:$Vh,96:56,97:57,98:58,99:$Vi,100:$Vj,101:29,103:30,104:$Vk,105:$Vl,109:$Vm,110:37,112:$Vn},o($Vp,[2,23])], defaultActions: {62:[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; }};
const bigInt = require('big-integer'); const util = require('util'); const __P__ = new bigInt("21888242871839275222246405745257275088548364400416034343698204186575808495617"); const __MASK__ = new bigInt(2).pow(253).minus(1);
function setLines(dst, first, last) { last = last || first; dst.first_line = first.first_line; dst.first_column = first.first_column; dst.last_line = last.last_line; dst.last_column = last.last_column; }
/* 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: /* console.log("MULTILINE COMMENT: "+yy_.yytext); */ break; case 2: /* console.log("SINGLE LINE COMMENT: "+yy_.yytext); */ break; case 3: return 104; break; case 4: return 105; break; case 5: return 107; break; case 6: return 106; break; case 7: return 108; break; case 8: return 'linearCombination'; break; case 9: return 109; break; case 10: return 23; break; case 11: return 18; break; case 12: return 25; break; case 13: return 27; break; case 14: return 28; break; case 15: return 30; break; case 16: return 32; break; case 17: return 31; break; case 18: return 33; break; case 19: return 34; break; case 20: return 100; break; case 21: return 99; break; case 22: return 19; break; case 23: yy_.yytext = yy_.yytext.slice(1,-1); return 35; break; case 24: return 52; break; case 25: return 51; break; case 26: return 54; break; case 27: return 53; break; case 28: return 56; break; case 29: return 47; break; case 30: return 46; break; case 31: return 63; break; case 32: return 61; break; case 33: return 71; break; case 34: return 74; break; case 35: return 76; break; case 36: return 73; break; case 37: return 81; break; case 38: return 79; break; case 39: return 90; break; case 40: return 92; break; case 41: return 93; break; case 42: return 41; break; case 43: return 42; break; case 44: return 43; break; case 45: return 44; break; case 46: return 45; break; case 47: return 49; break; case 48: return 48; break; case 49: return 50; break; case 50: return 40; break; case 51: return 82; break; case 52: return 84; break; case 53: return 85; break; case 54: return 87; break; case 55: return 88; break; case 56: return 89; break; case 57: return 67; break; case 58: return 69; break; case 59: return 65; break; case 60: return 94; break; case 61: return 95; break; case 62: return 77; break; case 63: return 78; break; case 64: return 94; break; case 65: return 57; break; case 66: return 58; break; case 67: return 20; break; case 68: return 22; break; case 69: return 112; break; case 70: return 113; break; case 71: return 36; break; case 72: return 37; break; case 73: return 29; break; case 74: return 24; break; case 75: return 102; break; case 76: return 5; break; case 77: console.log("INVALID: " + yy_.yytext); return 'INVALID' break; } }, rules: [/^(?:\s+)/,/^(?:\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*+\/)/,/^(?:\/\/.*)/,/^(?:var\b)/,/^(?:signal\b)/,/^(?:private\b)/,/^(?:input\b)/,/^(?:output\b)/,/^(?:linearCombination\b)/,/^(?:component\b)/,/^(?:template\b)/,/^(?:function\b)/,/^(?:if\b)/,/^(?:else\b)/,/^(?:for\b)/,/^(?:while\b)/,/^(?:compute\b)/,/^(?:do\b)/,/^(?:return\b)/,/^(?:include\b)/,/^(?:0x[0-9A-Fa-f]*)/,/^(?:[0-9]+)/,/^(?:[a-zA-Z][a-zA-Z$_0-9]*)/,/^(?:"[^"]+")/,/^(?:==>)/,/^(?:<==)/,/^(?:-->)/,/^(?:<--)/,/^(?:===)/,/^(?:>>=)/,/^(?:<<=)/,/^(?:&&)/,/^(?:\|\|)/,/^(?:==)/,/^(?:<=)/,/^(?:>=)/,/^(?:!=)/,/^(?:>>)/,/^(?:<<)/,/^(?:\*\*)/,/^(?:\+\+)/,/^(?:--)/,/^(?:\+=)/,/^(?:-=)/,/^(?:\*=)/,/^(?:\/=)/,/^(?:%=)/,/^(?:\|=)/,/^(?:&=)/,/^(?:\^=)/,/^(?:=)/,/^(?:\+)/,/^(?:-)/,/^(?:\*)/,/^(?:\/)/,/^(?:\\)/,/^(?:%)/,/^(?:\^)/,/^(?:&)/,/^(?:\|)/,/^(?:!)/,/^(?:~)/,/^(?:<)/,/^(?:>)/,/^(?:!)/,/^(?:\?)/,/^(?::)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{)/,/^(?:\})/,/^(?:;)/,/^(?:,)/,/^(?:\.)/,/^(?:$)/,/^(?:.)/], 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],"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 = jaz; exports.Parser = jaz.Parser; exports.parse = function () { return jaz.parse.apply(jaz, 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)); } }
|