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