You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

1375 lines
64 KiB

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