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.

1366 lines
64 KiB

6 years ago
  1. /* parser generated by jison 0.4.18 */
  2. /*
  3. Returns a Parser object of the following structure:
  4. Parser: {
  5. yy: {}
  6. }
  7. Parser.prototype: {
  8. yy: {},
  9. trace: function(),
  10. symbols_: {associative list: name ==> number},
  11. terminals_: {associative list: number ==> name},
  12. productions_: [...],
  13. performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),
  14. table: [...],
  15. defaultActions: {...},
  16. parseError: function(str, hash),
  17. parse: function(input),
  18. lexer: {
  19. EOF: 1,
  20. parseError: function(str, hash),
  21. setInput: function(input),
  22. input: function(),
  23. unput: function(str),
  24. more: function(),
  25. less: function(n),
  26. pastInput: function(),
  27. upcomingInput: function(),
  28. showPosition: function(),
  29. test_match: function(regex_match_array, rule_index),
  30. next: function(),
  31. lex: function(),
  32. begin: function(condition),
  33. popState: function(),
  34. _currentRules: function(),
  35. topState: function(),
  36. pushState: function(condition),
  37. options: {
  38. ranges: boolean (optional: true ==> token location info will include a .range[] member)
  39. flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)
  40. 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)
  41. },
  42. performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),
  43. rules: [...],
  44. conditions: {associative list: name ==> set},
  45. }
  46. }
  47. token location info (@$, _$, etc.): {
  48. first_line: n,
  49. last_line: n,
  50. first_column: n,
  51. last_column: n,
  52. range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)
  53. }
  54. the parseError function receives a 'hash' object with these members for lexer and parser errors: {
  55. text: (matched text)
  56. token: (the produced terminal token, if any)
  57. line: (yylineno)
  58. }
  59. while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {
  60. loc: (yylloc)
  61. expected: (string describing the set of expected tokens)
  62. recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)
  63. }
  64. */
  65. var jaz = (function(){
  66. 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,105,108],$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,105,108],$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,105,108,109],$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,105,108,109],$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,105,109],$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,105,108,109],$Vz=[2,107],$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,105,108,109],$VC=[1,101],$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,105,108,109],$VE=[1,104],$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,105,108,109],$VG=[1,105],$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,105,108,109],$VI=[1,106],$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,105,108,109],$VK=[1,107],$VL=[1,108],$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,105,108,109],$VN=[1,109],$VO=[1,110],$VP=[1,111],$VQ=[1,112],$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,105,108,109],$VS=[1,113],$VT=[1,114],$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,105,108,109],$VV=[1,115],$VW=[1,116],$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,105,108,109],$VY=[1,117],$VZ=[1,118],$V_=[1,119],$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,105,108,109],$V01=[1,120],$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,105,108,109],$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,105,108,109],$V31=[1,163],$V41=[21,23,109],$V51=[1,184],$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,105,108,109],$V71=[1,195],$V81=[21,23];
  67. var parser = {trace: function trace() { },
  68. yy: {},
  69. 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,"output":104,"component":105,"array":106,"expressionList":107,"[":108,"]":109,"$accept":0,"$end":1},
  70. 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:"output",105:"component",108:"[",109:"]"},
  71. 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,3],[100,2],[98,2],[98,1],[94,4],[94,3],[107,3],[107,1],[57,1],[106,3]],
  72. performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {
  73. /* this == yyval */
  74. var $0 = $$.length - 1;
  75. switch (yystate) {
  76. case 1:
  77. // console.log(JSON.stringify($$[$0-1], null, 1));
  78. this.$ = { type: "BLOCK", statements: $$[$0-1].statments };
  79. setLines(this.$, _$[$0-1]);
  80. return this.$
  81. break;
  82. case 2:
  83. $$[$0-1].statments.push($$[$0]);
  84. setLines($$[$0-1], _$[$0-1], _$[$0]);
  85. break;
  86. case 3:
  87. this.$ = { type: "STATMENTLIST", statments: [$$[$0]] };
  88. setLines(this.$, _$[$0]);
  89. break;
  90. 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 112:
  91. this.$ = $$[$0];
  92. break;
  93. case 14:
  94. this.$ = { type: "FUNCTIONDEF", name: $$[$0-4], params: $$[$0-2].identifiers, block: $$[$0]};
  95. setLines(this.$, _$[$0-5], _$[$0]);
  96. break;
  97. case 15:
  98. this.$ = { type: "FUNCTIONDEF", name: $$[$0-3], params: [], block: $$[$0] };
  99. setLines(this.$, _$[$0-4], _$[$0]);
  100. break;
  101. case 16:
  102. this.$ = { type: "TEMPLATEDEF", name: $$[$0-4], params: $$[$0-2].identifiers, block: $$[$0] };
  103. setLines(this.$, _$[$0-5], _$[$0]);
  104. break;
  105. case 17:
  106. this.$ = { type: "TEMPLATEDEF", name: $$[$0-3], params: [], block: $$[$0] };
  107. setLines(this.$, _$[$0-4], _$[$0]);
  108. break;
  109. case 18:
  110. $$[$0-2].identifiers.push($$[$0]);
  111. setLines($$[$0-2], _$[$0-2], _$[$0]);
  112. break;
  113. case 19:
  114. this.$ = { type: "IDENTIFIERLIST", identifiers: [$$[$0]] };
  115. setLines(this.$, _$[$0]);
  116. break;
  117. case 20:
  118. if ($$[$0-4].type == "NUMBER") {
  119. this.$ = !$$[$0-4].value.eq(0) ? $$[$0-2] : $$[$0];
  120. } else {
  121. this.$ = { type: "IF", condition: $$[$0-4], then: $$[$0-2], else: $$[$0] };
  122. }
  123. setLines(this.$, _$[$0-6], _$[$0]);
  124. break;
  125. case 21:
  126. if ($$[$0-2].type == "NUMBER") {
  127. this.$ = !$$[$0-2].value.eq(0) ? $$[$0] : { type: "NUMBER", value: bigInt(0) };
  128. } else {
  129. this.$ = { type: "IF", condition: $$[$0-2], then: $$[$0] };
  130. }
  131. setLines(this.$, _$[$0-4], _$[$0]);
  132. break;
  133. case 22:
  134. this.$ = { type: "FOR", init: $$[$0-6], condition: $$[$0-4], step: $$[$0-2], body: $$[$0] };
  135. setLines(this.$, _$[$0-8], _$[$0]);
  136. break;
  137. case 23:
  138. this.$ = { type: "WHILE", condition: $$[$0-2], body: $$[$0] };
  139. setLines(this.$, _$[$0-4], _$[$0]);
  140. break;
  141. case 24:
  142. this.$ = { type: "DOWHILE", condition: $$[$0-1], body: $$[$0-4] };
  143. setLines(this.$, _$[$0-5], _$[$0]);
  144. break;
  145. case 25:
  146. this.$ = { type: "RETURN", value: $$[$0-1] };
  147. setLines(this.$, _$[$0-2], _$[$0]);
  148. break;
  149. case 26:
  150. this.$ = { type: "RETURN", value: $$[$0] }
  151. setLines(this.$, _$[$0-1], _$[$0]);
  152. break;
  153. case 27:
  154. this.$ = { type: "INCLUDE", file: $$[$0-1] };
  155. setLines(this.$, _$[$0-2], _$[$0]);
  156. break;
  157. case 28:
  158. this.$ = { type: "INCLUDE", file: $$[$0] }
  159. setLines(this.$, _$[$0-1], _$[$0]);
  160. break;
  161. case 29:
  162. this.$ = { type: "BLOCK", statements: $$[$0-1].statments };
  163. setLines(this.$, _$[$0-2], _$[$0]);
  164. break;
  165. case 30:
  166. this.$ = $$[$0-1];
  167. break;
  168. case 33:
  169. this.$ = { type: "OP", op: "=", values: [$$[$0-2], $$[$0]] };
  170. setLines(this.$, _$[$0-2], _$[$0]);
  171. break;
  172. case 34:
  173. this.$ = { type: "OP", op: "+=", values: [$$[$0-2], $$[$0]] };
  174. setLines(this.$, _$[$0-2], _$[$0]);
  175. break;
  176. case 35:
  177. this.$ = { type: "OP", op: "-=", values: [$$[$0-2], $$[$0]] };
  178. setLines(this.$, _$[$0-2], _$[$0]);
  179. break;
  180. case 36:
  181. this.$ = { type: "OP", op: "*=", values: [$$[$0-2], $$[$0]] };
  182. setLines(this.$, _$[$0-2], _$[$0]);
  183. break;
  184. case 37:
  185. this.$ = { type: "OP", op: "/=", values: [$$[$0-2], $$[$0]] };
  186. setLines(this.$, _$[$0-2], _$[$0]);
  187. break;
  188. case 38:
  189. this.$ = { type: "OP", op: "%=", values: [$$[$0-2], $$[$0]] };
  190. setLines(this.$, _$[$0-2], _$[$0]);
  191. break;
  192. case 39:
  193. this.$ = { type: "OP", op: "<<=", values: [$$[$0-2], $$[$0]] };
  194. setLines(this.$, _$[$0-2], _$[$0]);
  195. break;
  196. case 40:
  197. this.$ = { type: "OP", op: ">>=", values: [$$[$0-2], $$[$0]] };
  198. setLines(this.$, _$[$0-2], _$[$0]);
  199. break;
  200. case 41:
  201. this.$ = { type: "OP", op: "&=", values: [$$[$0-2], $$[$0]] };
  202. setLines(this.$, _$[$0-2], _$[$0]);
  203. break;
  204. case 42:
  205. this.$ = { type: "OP", op: "|=", values: [$$[$0-2], $$[$0]] };
  206. setLines(this.$, _$[$0-2], _$[$0]);
  207. break;
  208. case 43:
  209. this.$ = { type: "OP", op: "^=", values: [$$[$0-2], $$[$0]] };
  210. setLines(this.$, _$[$0-2], _$[$0]);
  211. break;
  212. case 44:
  213. this.$ = { type: "OP", op: "<==", values: [$$[$0-2], $$[$0]] };
  214. setLines(this.$, _$[$0-2], _$[$0]);
  215. break;
  216. case 45:
  217. this.$ = { type: "OP", op: "<==", values: [$$[$0], $$[$0-2]] };
  218. setLines(this.$, _$[$0-2], _$[$0]);
  219. break;
  220. case 46:
  221. this.$ = { type: "OP", op: "<--", values: [$$[$0-2], $$[$0]] };
  222. setLines(this.$, _$[$0-2], _$[$0]);
  223. break;
  224. case 47:
  225. this.$ = { type: "OP", op: "<--", values: [$$[$0], $$[$0-2]] };
  226. setLines(this.$, _$[$0-2], _$[$0]);
  227. break;
  228. case 48:
  229. this.$ = { type: "OP", op: "===", values: [$$[$0-2], $$[$0]] };
  230. setLines(this.$, _$[$0-2], _$[$0]);
  231. break;
  232. case 49:
  233. if ($$[$0-4].type == "NUMBER") {
  234. this.$ = !$$[$0-4].value.eq(0) ? $$[$0-2] : $$[$0];
  235. } else {
  236. this.$ = { type: "OP", op: "?", values: [$$[$0-4], $$[$0-2], $$[$0]] };
  237. }
  238. setLines(this.$, _$[$0-4], _$[$0]);
  239. break;
  240. case 50: case 51: case 52: case 54: case 56: case 58:
  241. this.$ = $$[$0];
  242. break;
  243. case 53:
  244. if (($$[$0-2].type == "NUMBER") && ($$[$0].type == "NUMBER")) {
  245. this.$ = { type: "NUMBER", value: !$$[$0-2].value.eq(0) || !$$[$0].value.eq(0) ? bigInt(1) : bigInt(0) };
  246. } else {
  247. this.$ = { type: "OP", op: "||", values: [$$[$0-2], $$[$0]] };
  248. }
  249. setLines(this.$, _$[$0-2], _$[$0]);
  250. break;
  251. case 55:
  252. if (($$[$0-2].type == "NUMBER") && ($$[$0].type == "NUMBER")) {
  253. this.$ = { type: "NUMBER", value: !$$[$0-2].value.eq(0) && !$$[$0].value.eq(0) ? bigInt(1) : bigInt(0) };
  254. } else {
  255. this.$ = { type: "OP", op: "&&", values: [$$[$0-2], $$[$0]] };
  256. }
  257. setLines(this.$, _$[$0-2], _$[$0]);
  258. break;
  259. case 57:
  260. if (($$[$0-2].type == "NUMBER") && ($$[$0].type == "NUMBER")) {
  261. this.$ = { type: "NUMBER", value: $$[$0-2].value.or($$[$0].value).and(__MASK__) };
  262. } else {
  263. this.$ = { type: "OP", op: "|", values: [$$[$0-2], $$[$0]] };
  264. }
  265. setLines(this.$, _$[$0-2], _$[$0]);
  266. break;
  267. case 59:
  268. if (($$[$0-2].type == "NUMBER") && ($$[$0].type == "NUMBER")) {
  269. this.$ = { type: "NUMBER", value: $$[$0-2].value.or($$[$0].value).and(__MASK__) };
  270. } else {
  271. this.$ = { type: "OP", op: "^", values: [$$[$0-2], $$[$0]] };
  272. }
  273. setLines(this.$, _$[$0-2], _$[$0]);
  274. break;
  275. case 61:
  276. if (($$[$0-2].type == "NUMBER") && ($$[$0].type == "NUMBER")) {
  277. this.$ = { type: "NUMBER", value: $$[$0-2].value.and($$[$0].value).and(__MASK__) };
  278. } else {
  279. this.$ = { type: "OP", op: "&", values: [$$[$0-2], $$[$0]] };
  280. }
  281. setLines(this.$, _$[$0-2], _$[$0]);
  282. break;
  283. case 63:
  284. if (($$[$0-2].type == "NUMBER") && ($$[$0].type == "NUMBER")) {
  285. this.$ = { type: "NUMBER", value: $$[$0-2].value.equals($$[$0].value) ? bigInt(1) : bigInt(0) };
  286. } else {
  287. this.$ = { type: "OP", op: "==", values: [$$[$0-2], $$[$0]] };
  288. }
  289. setLines(this.$, _$[$0-2], _$[$0]);
  290. break;
  291. case 64:
  292. if (($$[$0-2].type == "NUMBER") && ($$[$0].type == "NUMBER")) {
  293. this.$ = { type: "NUMBER", value: $$[$0-2].value.eq($$[$0].value) ? bigInt(0) : bigInt(1) };
  294. } else {
  295. this.$ = { type: "OP", op: "!=", values: [$$[$0-2], $$[$0]] };
  296. }
  297. setLines(this.$, _$[$0-2], _$[$0]);
  298. break;
  299. case 65: case 70:
  300. this.$ = $$[$0]
  301. break;
  302. case 66:
  303. if (($$[$0-2].type == "NUMBER") && ($$[$0].type == "NUMBER")) {
  304. this.$ = { type: "NUMBER", value: $$[$0-2].value.lesserOrEquals($$[$0].value) ? bigInt(1) : bigInt(0) };
  305. } else {
  306. this.$ = { type: "OP", op: "<=", values: [$$[$0-2], $$[$0]] };
  307. }
  308. setLines(this.$, _$[$0-2], _$[$0]);
  309. break;
  310. case 67:
  311. if (($$[$0-2].type == "NUMBER") && ($$[$0].type == "NUMBER")) {
  312. this.$ = { type: "NUMBER", value: $$[$0-2].value.greaterOrEquals($$[$0].value) ? bigInt(1) : bigInt(0) };
  313. } else {
  314. this.$ = { type: "OP", op: ">=", values: [$$[$0-2], $$[$0]] };
  315. }
  316. setLines(this.$, _$[$0-2], _$[$0]);
  317. break;
  318. case 68:
  319. if (($$[$0-2].type == "NUMBER") && ($$[$0].type == "NUMBER")) {
  320. this.$ = { type: "NUMBER", value: $$[$0-2].value.lesser($$[$0].value) ? bigInt(1) : bigInt(0) };
  321. } else {
  322. this.$ = { type: "OP", op: "<", values: [$$[$0-2], $$[$0]] };
  323. }
  324. setLines(this.$, _$[$0-2], _$[$0]);
  325. break;
  326. case 69:
  327. if (($$[$0-2].type == "NUMBER") && ($$[$0].type == "NUMBER")) {
  328. this.$ = { type: "NUMBER", value: $$[$0-2].value.greater($$[$0].value) ? bigInt(1) : bigInt(0) };
  329. } else {
  330. this.$ = { type: "OP", op: ">", values: [$$[$0-2], $$[$0]] };
  331. }
  332. setLines(this.$, _$[$0-2], _$[$0]);
  333. break;
  334. case 71:
  335. if (($$[$0-2].type == "NUMBER") && ($$[$0].type == "NUMBER")) {
  336. let v = $$[$0].value.greater(256) ? 256 : $$[$0].value.value;
  337. this.$ = { type: "NUMBER", value: $$[$0-2].value.shiftLeft(v).and(__MASK__) };
  338. } else {
  339. this.$ = { type: "OP", op: "<<", values: [$$[$0-2], $$[$0]] };
  340. }
  341. setLines(this.$, _$[$0-2], _$[$0]);
  342. break;
  343. case 72:
  344. if (($$[$0-2].type == "NUMBER") && ($$[$0].type == "NUMBER")) {
  345. let v = $$[$0].value.greater(256) ? 256 : $$[$0].value.value;
  346. this.$ = {t1ype: "NUMBER", value: $$[$0-2].value.shiftRight(v).and(__MASK__) };
  347. } else {
  348. this.$ = { type: "OP", op: ">>", values: [$$[$0-2], $$[$0]] };
  349. }
  350. setLines(this.$, _$[$0-2], _$[$0]);
  351. break;
  352. case 73:
  353. this.$ = $$[$0];
  354. break;
  355. case 74:
  356. if (($$[$0-2].type == "NUMBER") && ($$[$0].type == "NUMBER")) {
  357. this.$ = { type: "NUMBER", value: ($$[$0-2].value.plus($$[$0].value)).mod(__P__) };
  358. } else {
  359. this.$ = { type: "OP", op: "+", values: [$$[$0-2], $$[$0]] };
  360. }
  361. setLines(this.$, _$[$0-2], _$[$0]);
  362. break;
  363. case 75:
  364. if (($$[$0-2].type == "NUMBER") && ($$[$0].type == "NUMBER")) {
  365. this.$ = { type: "NUMBER", value: ($$[$0-2].value.plus(__P__).minus($$[$0].value)).mod(__P__) };
  366. } else {
  367. this.$ = { type: "OP", op: "-", values: [$$[$0-2], $$[$0]] };
  368. }
  369. setLines(this.$, _$[$0-2], _$[$0]);
  370. break;
  371. case 77:
  372. if (($$[$0-2].type == "NUMBER") && ($$[$0].type == "NUMBER")) {
  373. this.$ = { type: "NUMBER", value: ($$[$0-2].value.times($$[$0].value)).mod(__P__) };
  374. } else {
  375. this.$ = { type: "OP", op: "*", values: [$$[$0-2], $$[$0]] };
  376. }
  377. setLines(this.$, _$[$0-2], _$[$0]);
  378. break;
  379. case 78:
  380. if (($$[$0-2].type == "NUMBER") && ($$[$0].type == "NUMBER")) {
  381. this.$ = { type: "NUMBER", value: ($$[$0-2].value.times($$[$0].value.modInv(__P__))).mod(__P__) };
  382. } else {
  383. this.$ = { type: "OP", op: "/", values: [$$[$0-2], $$[$0]] };
  384. }
  385. setLines(this.$, _$[$0-2], _$[$0]);
  386. break;
  387. case 79:
  388. if (($$[$0-2].type == "NUMBER") && ($$[$0].type == "NUMBER")) {
  389. this.$ = { type: "NUMBER", value: $$[$0-2].value.mod($$[$0].value) };
  390. } else {
  391. this.$ = { type: "OP", op: "%", values: [$$[$0-2], $$[$0]] };
  392. }
  393. setLines(this.$, _$[$0-2], _$[$0]);
  394. break;
  395. case 81:
  396. if (($$[$0-2].type == "NUMBER") && ($$[$0].type == "NUMBER")) {
  397. this.$ = { type: "NUMBER", value: $$[$0-2].value.modPow($$[$0].value, __P__) };
  398. } else {
  399. this.$ = { type: "OP", op: "**", values: [$$[$0-2], $$[$0]] };
  400. }
  401. setLines(this.$, _$[$0-2], _$[$0]);
  402. break;
  403. case 83:
  404. this.$ = { type: "OP", op: "PLUSPLUSLEFT", values: [$$[$0]] };
  405. setLines(this.$, _$[$0-1], _$[$0]);
  406. break;
  407. case 84:
  408. this.$ = { type: "OP", op: "MINUSMINUSLEFT", values: [$$[$0]] };
  409. setLines(this.$, _$[$0-1], _$[$0]);
  410. break;
  411. case 85:
  412. this.$ = $$[$0];
  413. setLines(this.$, _$[$0-1], _$[$0]);
  414. break;
  415. case 86:
  416. if ($$[$0].type == "NUMBER") {
  417. this.$ = { type: "NUMBER", value: __P__.minus($$[$0].value).mod(__P__) };
  418. } else {
  419. this.$ = { type: "OP", op: "UMINUS", values: [$$[$0]] };
  420. }
  421. setLines(this.$, _$[$0-1], _$[$0]);
  422. break;
  423. case 87:
  424. if ($$[$0].type == "NUMBER") {
  425. this.$ = { type: "NUMBER", value: $$[$0].value.eq(0) ? bigInt(1) : bigInt(0) };
  426. } else {
  427. this.$ = { type: "OP", op: "!", values: [$$[$0]] };
  428. }
  429. setLines(this.$, _$[$0-1], _$[$0]);
  430. break;
  431. case 88:
  432. if ($$[$0].type == "NUMBER") {
  433. this.$ = { type: "NUMBER", value: $$[$0].value.xor(__MASK__) };
  434. } else {
  435. this.$ = { type: "OP", op: "~", values: [$$[$0]] };
  436. }
  437. setLines(this.$, _$[$0-1], _$[$0]);
  438. break;
  439. case 90:
  440. this.$ = {type: "OP", op: "PLUSPLUSRIGHT", values: [$$[$0-1]] };
  441. setLines(this.$, _$[$0-1], _$[$0]);
  442. break;
  443. case 91:
  444. this.$ = {type: "OP", op: "MINUSMINUSRIGHT", values: [$$[$0-1]] };
  445. setLines(this.$, _$[$0-1], _$[$0]);
  446. break;
  447. case 94: case 99: case 100:
  448. this.$ = $$[$0]
  449. break;
  450. case 95:
  451. this.$ = {type: "NUMBER", value: bigInt($$[$0]).mod(__P__) }
  452. setLines(this.$, _$[$0]);
  453. break;
  454. case 96:
  455. this.$ = {type: "NUMBER", value: bigInt($$[$0].substr(2).toUpperCase(), 16).mod(__P__) }
  456. setLines(this.$, _$[$0]);
  457. break;
  458. case 97:
  459. this.$ = $$[$0-1];
  460. setLines(this.$, _$[$0-2], _$[$0]);
  461. break;
  462. case 98:
  463. this.$ = {type: "PIN", component: $$[$0-2], pin: $$[$0] };
  464. setLines(this.$, _$[$0-2], _$[$0]);
  465. break;
  466. case 101:
  467. this.$ = {type: "DECLARE", declareType: "VARIABLE", name: $$[$0]}
  468. setLines(this.$, _$[$0-1], _$[$0]);
  469. break;
  470. case 102:
  471. this.$ = {type: "DECLARE", declareType: "SIGNAL", name: $$[$0]}
  472. setLines(this.$, _$[$0-1], _$[$0]);
  473. break;
  474. case 103:
  475. this.$ = {type: "DECLARE", declareType: "SIGNALIN", name: $$[$0]};
  476. setLines(this.$, _$[$0-2], _$[$0]);
  477. break;
  478. case 104:
  479. this.$ = {type: "DECLARE", declareType: "SIGNALOUT", name: $$[$0]};
  480. setLines(this.$, _$[$0-2], _$[$0]);
  481. break;
  482. case 105:
  483. this.$ = {type: "DECLARE", declareType: "COMPONENT", name: $$[$0]}
  484. setLines(this.$, _$[$0-1], _$[$0]);
  485. break;
  486. case 106:
  487. for (let i=0; i< $$[$0].values.length; i++) {
  488. $$[$0-1].selectors.push($$[$0].values[i]);
  489. }
  490. setLines($$[$0-1], _$[$0-1], _$[$0]);
  491. break;
  492. case 107:
  493. this.$ = {type: "VARIABLE", name: $$[$0] , selectors: []};
  494. setLines(this.$, _$[$0]);
  495. break;
  496. case 108:
  497. this.$ = {type: "FUNCTIONCALL", name: $$[$0-3], params: $$[$0-1].expressions}
  498. setLines(this.$, _$[$0-3], _$[$0]);
  499. break;
  500. case 109:
  501. this.$ = {type: "FUNCTIONCALL", name: $$[$0-2], params: []}
  502. setLines(this.$, _$[$0-2], _$[$0]);
  503. break;
  504. case 110:
  505. $$[$0-2].expressions.push($$[$0]);
  506. setLines(this.$, _$[$0-2], _$[$0]);
  507. break;
  508. case 111:
  509. this.$ = {type: "EXPRESSIONLST", expressions: [$$[$0]]};
  510. setLines(this.$, _$[$0]);
  511. break;
  512. case 113:
  513. this.$ = { type: "ARRAY", values: $$[$0-1].expressions};
  514. setLines(this.$, _$[$0-2], _$[$0]);
  515. break;
  516. }
  517. },
  518. 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,105:$Vl,106:35,108:$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,105:$Vl,106:35,108:$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,105:$Vl,106:35,108:$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,105:$Vl,106:35,108:$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,105:$Vl,106:35,108:$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,105,108,109],[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],{106:92,99:[1,91],108:$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,105,108,109],[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,105,108,109],$Vz,{19:[1,94]}),{18:$VA,98:95},{18:$VA,98:97,103:[1,98],104:[1,99]},{18:$VA,98:100},o($Vy,[2,112]),o($VB,[2,54],{61:$VC}),{18:$V1,19:$V2,25:103,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,105:$Vl,106:35,107:102,108:$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:121,98:27,100:28,101:$Vj,102:$Vk,105:$Vl},{18:$VA,37:122,98:27,100:28,101:$Vj,102:$Vk,105:$Vl},{18:$V1,19:$V2,37:124,80:$Vb,82:$Vc,88:123,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,105:$Vl},{18:$V1,19:$V2,37:124,80:$Vb,82:$Vc,88:125,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,105:$Vl},{18:$V1,19:$V2,37:124,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,105:$Vl},{18:$V1,19:$V2,37:124,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,105:$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:128,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,105:$Vl,106:35,108:$Vm},{1:[2,1]},o($Vn,[2,2]),{19:[1,129]},{19:[1,130]},{18:$V1,19:$V2,25:131,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,105:$Vl,106:35,108:$Vm},{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,105:$Vl,106:35,108:$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,105:$Vl,106:35,108:$Vm},{29:[1,134]},o($Vo,[2,26],{28:[1,135]}),{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,136],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,105:$Vl,106:35,108:$Vm},o($Vo,[2,30]),o($Vo,[2,28],{28:[1,137]}),{18:$VA,37:138,98:27,100:28,101:$Vj,102:$Vk,105:$Vl},{18:$VA,37:139,98:27,100:28,101:$Vj,102:$Vk,105:$Vl},{18:$V1,19:$V2,36:140,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,105:$Vl,106:35,108:$Vm},{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,105:$Vl,106:35,108:$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,105:$Vl,106:35,108:$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,105:$Vl,106:35,108:$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,105:$Vl,106:35,108:$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,105:$Vl,106:35,108:$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,105:$Vl,106:35,108:$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,105:$Vl,106:35,108:$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,105:$Vl,106:35,108:$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,105:$Vl,106:35,108:$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,105:$Vl,106:35,108:$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,105:$Vl,106:35,108:$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,105:$Vl,106:35,108:$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,105:$Vl,106:35,108:$Vm},o($V11,[2,90]),o($V11,[2,91]),{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,105:$Vl,106:35,108:$Vm},{18:$VA,98:155},o($V21,[2,106]),{18:$V1,19:$V2,37:124,60:156,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,105:$Vl},{18:$V1,19:$V2,21:[1,158],25:103,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,105:$Vl,106:35,107:157,108:$Vm},o($Vx,[2,101],{106:92,108:$Vm}),o($V21,$Vz),o($Vx,[2,102],{106:92,108:$Vm}),{18:$VA,98:159},{18:$VA,98:160},o($Vx,[2,105],{106:92,108:$Vm}),{18:$V1,19:$V2,37:124,62:161,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,105:$Vl},{23:$V31,109:[1,162]},o($V41,[2,111]),{18:$V1,19:$V2,37:124,64:164,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,105:$Vl},{18:$V1,19:$V2,37:124,66:165,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,105:$Vl},{18:$V1,19:$V2,37:124,68:166,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,105:$Vl},{18:$V1,19:$V2,37:124,70:167,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,105:$Vl},{18:$V1,19:$V2,37:124,70:168,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,105:$Vl},{18:$V1,19:$V2,37:124,73:169,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,105:$Vl},{18:$V1,19:$V2,37:124,73:170,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,105:$Vl},{18:$V1,19:$V2,37:124,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,105:$Vl},{18:$V1,19:$V2,37:124,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,105:$Vl},{18:$V1,19:$V2,37:124,78:173,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,105:$Vl},{18:$V1,19:$V2,37:124,78:174,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,105:$Vl},{18:$V1,19:$V2,37:124,80:$Vb,81:175,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,105:$Vl},{18:$V1,19:$V2,37:124,80:$Vb,81:176,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,105:$Vl},{18:$V1,19:$V2,37:124,80:$Vb,82:$Vc,84:177,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,105:$Vl},{18:$V1,19:$V2,37:124,80:$Vb,82:$Vc,84:178,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,105:$Vl},{18:$V1,19:$V2,37:124,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,105:$Vl},{18:$V1,19:$V2,37:124,80:$Vb,82:$Vc,88:180,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,105:$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,181]},{18:$V51,20:182,21:[1,183]},{18:$V51,20:185,21:[1,186]},{21:[1,187]},{28:[1,188]},{21:[1,189]},{19:[1,190]},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,191]},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],{106:92,108:$Vm}),o($VB,[2,53],{61:$VC}),{21:[1,192],23:$V31},o($V11,[2,109]),o($Vx,[2,103],{106:92,108:$Vm}),o($Vx,[2,104],{106:92,108:$Vm}),o($VD,[2,55],{63:$VE}),o($V21,[2,113]),{18:$V1,19:$V2,25:193,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,105:$Vl,106:35,108:$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,194],23:$V71},{14:196,34:$Va},o($V81,[2,19]),{21:[1,197],23:$V71},{14:198,34:$Va},{6:199,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,105:$Vl,106:35,108:$Vm},{18:$V1,19:$V2,25:200,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,105:$Vl,106:35,108:$Vm},{6:201,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,105:$Vl,106:35,108:$Vm},{18:$V1,19:$V2,25:202,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,105:$Vl,106:35,108:$Vm},{18:$V1,19:$V2,36:203,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,105:$Vl,106:35,108:$Vm},o($V11,[2,108]),o($V41,[2,110]),{14:204,34:$Va},{18:[1,205]},o($Vo,[2,15]),{14:206,34:$Va},o($Vo,[2,17]),o($Vn,[2,21],{26:[1,207]}),{28:[1,208]},o($Vo,[2,23]),{21:[1,209]},o($V61,[2,49],{50:$Vp,52:$Vq,55:$Vr}),o($Vo,[2,14]),o($V81,[2,18]),o($Vo,[2,16]),{6:210,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,105:$Vl,106:35,108:$Vm},{18:$V1,19:$V2,25:211,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,105:$Vl,106:35,108:$Vm},o($Vo,[2,24]),o($Vo,[2,20]),{21:[1,212]},{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,105:$Vl,106:35,108:$Vm},o($Vo,[2,22])],
  519. defaultActions: {60:[2,1]},
  520. parseError: function parseError(str, hash) {
  521. if (hash.recoverable) {
  522. this.trace(str);
  523. } else {
  524. var error = new Error(str);
  525. error.hash = hash;
  526. throw error;
  527. }
  528. },
  529. parse: function parse(input) {
  530. var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
  531. var args = lstack.slice.call(arguments, 1);
  532. var lexer = Object.create(this.lexer);
  533. var sharedState = { yy: {} };
  534. for (var k in this.yy) {
  535. if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
  536. sharedState.yy[k] = this.yy[k];
  537. }
  538. }
  539. lexer.setInput(input, sharedState.yy);
  540. sharedState.yy.lexer = lexer;
  541. sharedState.yy.parser = this;
  542. if (typeof lexer.yylloc == 'undefined') {
  543. lexer.yylloc = {};
  544. }
  545. var yyloc = lexer.yylloc;
  546. lstack.push(yyloc);
  547. var ranges = lexer.options && lexer.options.ranges;
  548. if (typeof sharedState.yy.parseError === 'function') {
  549. this.parseError = sharedState.yy.parseError;
  550. } else {
  551. this.parseError = Object.getPrototypeOf(this).parseError;
  552. }
  553. function popStack(n) {
  554. stack.length = stack.length - 2 * n;
  555. vstack.length = vstack.length - n;
  556. lstack.length = lstack.length - n;
  557. }
  558. _token_stack:
  559. var lex = function () {
  560. var token;
  561. token = lexer.lex() || EOF;
  562. if (typeof token !== 'number') {
  563. token = self.symbols_[token] || token;
  564. }
  565. return token;
  566. };
  567. var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
  568. while (true) {
  569. state = stack[stack.length - 1];
  570. if (this.defaultActions[state]) {
  571. action = this.defaultActions[state];
  572. } else {
  573. if (symbol === null || typeof symbol == 'undefined') {
  574. symbol = lex();
  575. }
  576. action = table[state] && table[state][symbol];
  577. }
  578. if (typeof action === 'undefined' || !action.length || !action[0]) {
  579. var errStr = '';
  580. expected = [];
  581. for (p in table[state]) {
  582. if (this.terminals_[p] && p > TERROR) {
  583. expected.push('\'' + this.terminals_[p] + '\'');
  584. }
  585. }
  586. if (lexer.showPosition) {
  587. errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\'';
  588. } else {
  589. errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\'');
  590. }
  591. this.parseError(errStr, {
  592. text: lexer.match,
  593. token: this.terminals_[symbol] || symbol,
  594. line: lexer.yylineno,
  595. loc: yyloc,
  596. expected: expected
  597. });
  598. }
  599. if (action[0] instanceof Array && action.length > 1) {
  600. throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
  601. }
  602. switch (action[0]) {
  603. case 1:
  604. stack.push(symbol);
  605. vstack.push(lexer.yytext);
  606. lstack.push(lexer.yylloc);
  607. stack.push(action[1]);
  608. symbol = null;
  609. if (!preErrorSymbol) {
  610. yyleng = lexer.yyleng;
  611. yytext = lexer.yytext;
  612. yylineno = lexer.yylineno;
  613. yyloc = lexer.yylloc;
  614. if (recovering > 0) {
  615. recovering--;
  616. }
  617. } else {
  618. symbol = preErrorSymbol;
  619. preErrorSymbol = null;
  620. }
  621. break;
  622. case 2:
  623. len = this.productions_[action[1]][1];
  624. yyval.$ = vstack[vstack.length - len];
  625. yyval._$ = {
  626. first_line: lstack[lstack.length - (len || 1)].first_line,
  627. last_line: lstack[lstack.length - 1].last_line,
  628. first_column: lstack[lstack.length - (len || 1)].first_column,
  629. last_column: lstack[lstack.length - 1].last_column
  630. };
  631. if (ranges) {
  632. yyval._$.range = [
  633. lstack[lstack.length - (len || 1)].range[0],
  634. lstack[lstack.length - 1].range[1]
  635. ];
  636. }
  637. r = this.performAction.apply(yyval, [
  638. yytext,
  639. yyleng,
  640. yylineno,
  641. sharedState.yy,
  642. action[1],
  643. vstack,
  644. lstack
  645. ].concat(args));
  646. if (typeof r !== 'undefined') {
  647. return r;
  648. }
  649. if (len) {
  650. stack = stack.slice(0, -1 * len * 2);
  651. vstack = vstack.slice(0, -1 * len);
  652. lstack = lstack.slice(0, -1 * len);
  653. }
  654. stack.push(this.productions_[action[1]][0]);
  655. vstack.push(yyval.$);
  656. lstack.push(yyval._$);
  657. newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
  658. stack.push(newState);
  659. break;
  660. case 3:
  661. return true;
  662. }
  663. }
  664. return true;
  665. }};
  666. const bigInt = require('big-integer');
  667. const util = require('util');
  668. const __P__ = new bigInt("21888242871839275222246405745257275088696311157297823662689037894645226208583");
  669. const __MASK__ = new bigInt(2).pow(253).minus(1);
  670. function setLines(dst, first, last) {
  671. last = last || first;
  672. dst.first_line = first.first_line;
  673. dst.first_column = first.first_column;
  674. dst.last_line = last.last_line;
  675. dst.last_column = last.last_column;
  676. }
  677. /* generated by jison-lex 0.3.4 */
  678. var lexer = (function(){
  679. var lexer = ({
  680. EOF:1,
  681. parseError:function parseError(str, hash) {
  682. if (this.yy.parser) {
  683. this.yy.parser.parseError(str, hash);
  684. } else {
  685. throw new Error(str);
  686. }
  687. },
  688. // resets the lexer, sets new input
  689. setInput:function (input, yy) {
  690. this.yy = yy || this.yy || {};
  691. this._input = input;
  692. this._more = this._backtrack = this.done = false;
  693. this.yylineno = this.yyleng = 0;
  694. this.yytext = this.matched = this.match = '';
  695. this.conditionStack = ['INITIAL'];
  696. this.yylloc = {
  697. first_line: 1,
  698. first_column: 0,
  699. last_line: 1,
  700. last_column: 0
  701. };
  702. if (this.options.ranges) {
  703. this.yylloc.range = [0,0];
  704. }
  705. this.offset = 0;
  706. return this;
  707. },
  708. // consumes and returns one char from the input
  709. input:function () {
  710. var ch = this._input[0];
  711. this.yytext += ch;
  712. this.yyleng++;
  713. this.offset++;
  714. this.match += ch;
  715. this.matched += ch;
  716. var lines = ch.match(/(?:\r\n?|\n).*/g);
  717. if (lines) {
  718. this.yylineno++;
  719. this.yylloc.last_line++;
  720. } else {
  721. this.yylloc.last_column++;
  722. }
  723. if (this.options.ranges) {
  724. this.yylloc.range[1]++;
  725. }
  726. this._input = this._input.slice(1);
  727. return ch;
  728. },
  729. // unshifts one char (or a string) into the input
  730. unput:function (ch) {
  731. var len = ch.length;
  732. var lines = ch.split(/(?:\r\n?|\n)/g);
  733. this._input = ch + this._input;
  734. this.yytext = this.yytext.substr(0, this.yytext.length - len);
  735. //this.yyleng -= len;
  736. this.offset -= len;
  737. var oldLines = this.match.split(/(?:\r\n?|\n)/g);
  738. this.match = this.match.substr(0, this.match.length - 1);
  739. this.matched = this.matched.substr(0, this.matched.length - 1);
  740. if (lines.length - 1) {
  741. this.yylineno -= lines.length - 1;
  742. }
  743. var r = this.yylloc.range;
  744. this.yylloc = {
  745. first_line: this.yylloc.first_line,
  746. last_line: this.yylineno + 1,
  747. first_column: this.yylloc.first_column,
  748. last_column: lines ?
  749. (lines.length === oldLines.length ? this.yylloc.first_column : 0)
  750. + oldLines[oldLines.length - lines.length].length - lines[0].length :
  751. this.yylloc.first_column - len
  752. };
  753. if (this.options.ranges) {
  754. this.yylloc.range = [r[0], r[0] + this.yyleng - len];
  755. }
  756. this.yyleng = this.yytext.length;
  757. return this;
  758. },
  759. // When called from action, caches matched text and appends it on next action
  760. more:function () {
  761. this._more = true;
  762. return this;
  763. },
  764. // 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.
  765. reject:function () {
  766. if (this.options.backtrack_lexer) {
  767. this._backtrack = true;
  768. } else {
  769. 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(), {
  770. text: "",
  771. token: null,
  772. line: this.yylineno
  773. });
  774. }
  775. return this;
  776. },
  777. // retain first n characters of the match
  778. less:function (n) {
  779. this.unput(this.match.slice(n));
  780. },
  781. // displays already matched input, i.e. for error messages
  782. pastInput:function () {
  783. var past = this.matched.substr(0, this.matched.length - this.match.length);
  784. return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, "");
  785. },
  786. // displays upcoming input, i.e. for error messages
  787. upcomingInput:function () {
  788. var next = this.match;
  789. if (next.length < 20) {
  790. next += this._input.substr(0, 20-next.length);
  791. }
  792. return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
  793. },
  794. // displays the character position where the lexing error occurred, i.e. for error messages
  795. showPosition:function () {
  796. var pre = this.pastInput();
  797. var c = new Array(pre.length + 1).join("-");
  798. return pre + this.upcomingInput() + "\n" + c + "^";
  799. },
  800. // test the lexed token: return FALSE when not a match, otherwise return token
  801. test_match:function (match, indexed_rule) {
  802. var token,
  803. lines,
  804. backup;
  805. if (this.options.backtrack_lexer) {
  806. // save context
  807. backup = {
  808. yylineno: this.yylineno,
  809. yylloc: {
  810. first_line: this.yylloc.first_line,
  811. last_line: this.last_line,
  812. first_column: this.yylloc.first_column,
  813. last_column: this.yylloc.last_column
  814. },
  815. yytext: this.yytext,
  816. match: this.match,
  817. matches: this.matches,
  818. matched: this.matched,
  819. yyleng: this.yyleng,
  820. offset: this.offset,
  821. _more: this._more,
  822. _input: this._input,
  823. yy: this.yy,
  824. conditionStack: this.conditionStack.slice(0),
  825. done: this.done
  826. };
  827. if (this.options.ranges) {
  828. backup.yylloc.range = this.yylloc.range.slice(0);
  829. }
  830. }
  831. lines = match[0].match(/(?:\r\n?|\n).*/g);
  832. if (lines) {
  833. this.yylineno += lines.length;
  834. }
  835. this.yylloc = {
  836. first_line: this.yylloc.last_line,
  837. last_line: this.yylineno + 1,
  838. first_column: this.yylloc.last_column,
  839. last_column: lines ?
  840. lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length :
  841. this.yylloc.last_column + match[0].length
  842. };
  843. this.yytext += match[0];
  844. this.match += match[0];
  845. this.matches = match;
  846. this.yyleng = this.yytext.length;
  847. if (this.options.ranges) {
  848. this.yylloc.range = [this.offset, this.offset += this.yyleng];
  849. }
  850. this._more = false;
  851. this._backtrack = false;
  852. this._input = this._input.slice(match[0].length);
  853. this.matched += match[0];
  854. token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
  855. if (this.done && this._input) {
  856. this.done = false;
  857. }
  858. if (token) {
  859. return token;
  860. } else if (this._backtrack) {
  861. // recover context
  862. for (var k in backup) {
  863. this[k] = backup[k];
  864. }
  865. return false; // rule action called reject() implying the next rule should be tested instead.
  866. }
  867. return false;
  868. },
  869. // return next match in input
  870. next:function () {
  871. if (this.done) {
  872. return this.EOF;
  873. }
  874. if (!this._input) {
  875. this.done = true;
  876. }
  877. var token,
  878. match,
  879. tempMatch,
  880. index;
  881. if (!this._more) {
  882. this.yytext = '';
  883. this.match = '';
  884. }
  885. var rules = this._currentRules();
  886. for (var i = 0; i < rules.length; i++) {
  887. tempMatch = this._input.match(this.rules[rules[i]]);
  888. if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
  889. match = tempMatch;
  890. index = i;
  891. if (this.options.backtrack_lexer) {
  892. token = this.test_match(tempMatch, rules[i]);
  893. if (token !== false) {
  894. return token;
  895. } else if (this._backtrack) {
  896. match = false;
  897. continue; // rule action called reject() implying a rule MISmatch.
  898. } else {
  899. // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
  900. return false;
  901. }
  902. } else if (!this.options.flex) {
  903. break;
  904. }
  905. }
  906. }
  907. if (match) {
  908. token = this.test_match(match, rules[index]);
  909. if (token !== false) {
  910. return token;
  911. }
  912. // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
  913. return false;
  914. }
  915. if (this._input === "") {
  916. return this.EOF;
  917. } else {
  918. return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), {
  919. text: "",
  920. token: null,
  921. line: this.yylineno
  922. });
  923. }
  924. },
  925. // return next match that has a token
  926. lex:function lex() {
  927. var r = this.next();
  928. if (r) {
  929. return r;
  930. } else {
  931. return this.lex();
  932. }
  933. },
  934. // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
  935. begin:function begin(condition) {
  936. this.conditionStack.push(condition);
  937. },
  938. // pop the previously active lexer condition state off the condition stack
  939. popState:function popState() {
  940. var n = this.conditionStack.length - 1;
  941. if (n > 0) {
  942. return this.conditionStack.pop();
  943. } else {
  944. return this.conditionStack[0];
  945. }
  946. },
  947. // produce the lexer rule set which is active for the currently active lexer condition state
  948. _currentRules:function _currentRules() {
  949. if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
  950. return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
  951. } else {
  952. return this.conditions["INITIAL"].rules;
  953. }
  954. },
  955. // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
  956. topState:function topState(n) {
  957. n = this.conditionStack.length - 1 - Math.abs(n || 0);
  958. if (n >= 0) {
  959. return this.conditionStack[n];
  960. } else {
  961. return "INITIAL";
  962. }
  963. },
  964. // alias for begin(condition)
  965. pushState:function pushState(condition) {
  966. this.begin(condition);
  967. },
  968. // return the number of states currently on the stack
  969. stateStackSize:function stateStackSize() {
  970. return this.conditionStack.length;
  971. },
  972. options: {},
  973. performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {
  974. var YYSTATE=YY_START;
  975. switch($avoiding_name_collisions) {
  976. case 0: /* skip whitespace */
  977. break;
  978. case 1: /* console.log("MULTILINE COMMENT: "+yy_.yytext); */
  979. break;
  980. case 2: /* console.log("SINGLE LINE COMMENT: "+yy_.yytext); */
  981. break;
  982. case 3: return 101;
  983. break;
  984. case 4: return 102;
  985. break;
  986. case 5: return 103;
  987. break;
  988. case 6: return 104;
  989. break;
  990. case 7: return 'linearCombination';
  991. break;
  992. case 8: return 105;
  993. break;
  994. case 9: return 22;
  995. break;
  996. case 10: return 17;
  997. break;
  998. case 11: return 24;
  999. break;
  1000. case 12: return 26;
  1001. break;
  1002. case 13: return 27;
  1003. break;
  1004. case 14: return 29;
  1005. break;
  1006. case 15: return 30;
  1007. break;
  1008. case 16: return 31;
  1009. break;
  1010. case 17: return 32;
  1011. break;
  1012. case 18: return 97;
  1013. break;
  1014. case 19: return 96;
  1015. break;
  1016. case 20: return 18;
  1017. break;
  1018. case 21: yy_.yytext = yy_.yytext.slice(1,-1); return 33;
  1019. break;
  1020. case 22: return 50;
  1021. break;
  1022. case 23: return 49;
  1023. break;
  1024. case 24: return 52;
  1025. break;
  1026. case 25: return 51;
  1027. break;
  1028. case 26: return 54;
  1029. break;
  1030. case 27: return 45;
  1031. break;
  1032. case 28: return 44;
  1033. break;
  1034. case 29: return 61;
  1035. break;
  1036. case 30: return 59;
  1037. break;
  1038. case 31: return 69;
  1039. break;
  1040. case 32: return 72;
  1041. break;
  1042. case 33: return 74;
  1043. break;
  1044. case 34: return 71;
  1045. break;
  1046. case 35: return 79;
  1047. break;
  1048. case 36: return 77;
  1049. break;
  1050. case 37: return 87;
  1051. break;
  1052. case 38: return 89;
  1053. break;
  1054. case 39: return 90;
  1055. break;
  1056. case 40: return 39;
  1057. break;
  1058. case 41: return 40;
  1059. break;
  1060. case 42: return 41;
  1061. break;
  1062. case 43: return 42;
  1063. break;
  1064. case 44: return 43;
  1065. break;
  1066. case 45: return 47;
  1067. break;
  1068. case 46: return 46;
  1069. break;
  1070. case 47: return 48;
  1071. break;
  1072. case 48: return 38;
  1073. break;
  1074. case 49: return 80;
  1075. break;
  1076. case 50: return 82;
  1077. break;
  1078. case 51: return 83;
  1079. break;
  1080. case 52: return 85;
  1081. break;
  1082. case 53: return 86;
  1083. break;
  1084. case 54: return 65;
  1085. break;
  1086. case 55: return 67;
  1087. break;
  1088. case 56: return 63;
  1089. break;
  1090. case 57: return 91;
  1091. break;
  1092. case 58: return 75;
  1093. break;
  1094. case 59: return 76;
  1095. break;
  1096. case 60: return 91;
  1097. break;
  1098. case 61: return 55;
  1099. break;
  1100. case 62: return 56;
  1101. break;
  1102. case 63: return 19;
  1103. break;
  1104. case 64: return 21;
  1105. break;
  1106. case 65: return 108;
  1107. break;
  1108. case 66: return 109;
  1109. break;
  1110. case 67: return 34;
  1111. break;
  1112. case 68: return 35;
  1113. break;
  1114. case 69: return 28;
  1115. break;
  1116. case 70: return 23;
  1117. break;
  1118. case 71: return 99;
  1119. break;
  1120. case 72: return 5;
  1121. break;
  1122. case 73: console.log("INVALID: " + yy_.yytext); return 'INVALID'
  1123. break;
  1124. }
  1125. },
  1126. rules: [/^(?:\s+)/,/^(?:\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*+\/)/,/^(?:\/\/.*)/,/^(?:var\b)/,/^(?:signal\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]*)/,/^(?:"[^"]+")/,/^(?:==>)/,/^(?:<==)/,/^(?:-->)/,/^(?:<--)/,/^(?:===)/,/^(?:>>=)/,/^(?:<<=)/,/^(?:&&)/,/^(?:\|\|)/,/^(?:==)/,/^(?:<=)/,/^(?:>=)/,/^(?:!=)/,/^(?:>>)/,/^(?:<<)/,/^(?:\*\*)/,/^(?:\+\+)/,/^(?:--)/,/^(?:\+=)/,/^(?:-=)/,/^(?:\*=)/,/^(?:\/=)/,/^(?:%=)/,/^(?:\|=)/,/^(?:&=)/,/^(?:\^=)/,/^(?:=)/,/^(?:\+)/,/^(?:-)/,/^(?:\*)/,/^(?:\/)/,/^(?:%)/,/^(?:\^)/,/^(?:&)/,/^(?:\|)/,/^(?:!)/,/^(?:<)/,/^(?:>)/,/^(?:!)/,/^(?:\?)/,/^(?::)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{)/,/^(?:\})/,/^(?:;)/,/^(?:,)/,/^(?:\.)/,/^(?:$)/,/^(?:.)/],
  1127. 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],"inclusive":true}}
  1128. });
  1129. return lexer;
  1130. })();
  1131. parser.lexer = lexer;
  1132. function Parser () {
  1133. this.yy = {};
  1134. }
  1135. Parser.prototype = parser;parser.Parser = Parser;
  1136. return new Parser;
  1137. })();
  1138. if (typeof require !== 'undefined' && typeof exports !== 'undefined') {
  1139. exports.parser = jaz;
  1140. exports.Parser = jaz.Parser;
  1141. exports.parse = function () { return jaz.parse.apply(jaz, arguments); };
  1142. exports.main = function commonjsMain(args) {
  1143. if (!args[1]) {
  1144. console.log('Usage: '+args[0]+' FILE');
  1145. process.exit(1);
  1146. }
  1147. var source = require('fs').readFileSync(require('path').normalize(args[1]), "utf8");
  1148. return exports.parser.parse(source);
  1149. };
  1150. if (typeof module !== 'undefined' && require.main === module) {
  1151. exports.main(process.argv.slice(1));
  1152. }
  1153. }