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.

1288 lines
60 KiB

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