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,89,90,91,92,96,97,101,102,106,109],$Vo=[5,17,18,19,22,24,26,27,29,30,31,32,34,35,80,82,89,90,91,92,96,97,101,102,106,109],$Vp=[1,72],$Vq=[1,73],$Vr=[1,74],$Vs=[5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,50,52,54,55,56,59,61,63,65,67,69,71,72,74,75,76,77,79,80,82,83,85,86,87,91,92,96,97,101,102,106,109,110],$Vt=[2,94],$Vu=[1,88],$Vv=[1,89],$Vw=[5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,50,52,55,56,80,82,89,90,91,92,96,97,101,102,106,109,110],$Vx=[5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,54,55,56,59,61,63,65,67,69,71,72,74,75,76,77,79,80,82,83,85,86,87,89,90,91,92,96,97,101,102,106,110],$Vy=[5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,50,52,54,55,56,80,82,89,90,91,92,96,97,101,102,106,109,110],$Vz=[2,108],$VA=[1,96],$VB=[5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,50,52,54,55,56,59,80,82,89,90,91,92,96,97,101,102,106,109,110],$VC=[1,102],$VD=[5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,50,52,54,55,56,59,61,80,82,89,90,91,92,96,97,101,102,106,109,110],$VE=[1,105],$VF=[5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,50,52,54,55,56,59,61,63,80,82,89,90,91,92,96,97,101,102,106,109,110],$VG=[1,106],$VH=[5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,50,52,54,55,56,59,61,63,65,80,82,89,90,91,92,96,97,101,102,106,109,110],$VI=[1,107],$VJ=[5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,50,52,54,55,56,59,61,63,65,67,80,82,89,90,91,92,96,97,101,102,106,109,110],$VK=[1,108],$VL=[1,109],$VM=[5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,50,52,54,55,56,59,61,63,65,67,69,71,80,82,89,90,91,92,96,97,101,102,106,109,110],$VN=[1,110],$VO=[1,111],$VP=[1,112],$VQ=[1,113],$VR=[5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,50,52,54,55,56,59,61,63,65,67,69,71,72,74,75,76,80,82,89,90,91,92,96,97,101,102,106,109,110],$VS=[1,114],$VT=[1,115],$VU=[5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,50,52,54,55,56,59,61,63,65,67,69,71,72,74,75,76,77,79,89,90,91,92,96,97,101,102,106,109,110],$VV=[1,116],$VW=[1,117],$VX=[5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,50,52,54,55,56,59,61,63,65,67,69,71,72,74,75,76,77,79,80,82,89,90,91,92,96,97,101,102,106,109,110],$VY=[1,118],$VZ=[1,119],$V_=[1,120],$V$=[5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,50,52,54,55,56,59,61,63,65,67,69,71,72,74,75,76,77,79,80,82,83,85,86,89,90,91,92,96,97,101,102,106,109,110],$V01=[1,121],$V11=[5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,50,52,54,55,56,59,61,63,65,67,69,71,72,74,75,76,77,79,80,82,83,85,86,87,89,90,91,92,96,97,101,102,106,109,110],$V21=[5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,54,55,56,59,61,63,65,67,69,71,72,74,75,76,77,79,80,82,83,85,86,87,89,90,91,92,96,97,99,101,102,106,109,110],$V31=[1,165],$V41=[21,23,110],$V51=[1,186],$V61=[5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,56,80,82,89,90,91,92,96,97,101,102,106,109,110],$V71=[1,198],$V81=[21,23];
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,"e3":88,"++":89,"--":90,"!":91,"~":92,"e2":93,"functionCall":94,"e0":95,"DECNUMBER":96,"HEXNUMBER":97,"simpleLeftHandExpression":98,".":99,"declaration":100,"var":101,"signal":102,"input":103,"private":104,"output":105,"component":106,"array":107,"expressionList":108,"[":109,"]":110,"$accept":0,"$end":1},
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:"**",89:"++",90:"--",91:"!",92:"~",96:"DECNUMBER",97:"HEXNUMBER",99:".",101:"var",102:"signal",103:"input",104:"private",105:"output",106:"component",109:"[",110:"]"},
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,1],[84,3],[84,1],[88,2],[88,2],[88,2],[88,2],[88,2],[88,2],[88,1],[93,2],[93,2],[93,1],[93,1],[95,1],[95,1],[95,1],[95,3],[37,3],[37,1],[37,1],[100,2],[100,2],[100,3],[100,4],[100,3],[100,2],[98,2],[98,1],[94,4],[94,3],[108,3],[108,1],[57,1],[107,3]],
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 80: case 82: case 89: case 92: case 93: case 113:
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.$ = {t1ype: "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.mod($$[$0].value) };
517 } else {
518 this.$ = { type: "OP", op: "%", values: [$$[$0-2], $$[$0]] };
519 }
520 setLines(this.$, _$[$0-2], _$[$0]);
521
522break;
523case 81:
524
525 if (($$[$0-2].type == "NUMBER") && ($$[$0].type == "NUMBER")) {
526 this.$ = { type: "NUMBER", value: $$[$0-2].value.modPow($$[$0].value, __P__) };
527 } else {
528 this.$ = { type: "OP", op: "**", values: [$$[$0-2], $$[$0]] };
529 }
530 setLines(this.$, _$[$0-2], _$[$0]);
531
532break;
533case 83:
534
535 this.$ = { type: "OP", op: "PLUSPLUSLEFT", values: [$$[$0]] };
536 setLines(this.$, _$[$0-1], _$[$0]);
537
538break;
539case 84:
540
541 this.$ = { type: "OP", op: "MINUSMINUSLEFT", values: [$$[$0]] };
542 setLines(this.$, _$[$0-1], _$[$0]);
543
544break;
545case 85:
546
547 this.$ = $$[$0];
548 setLines(this.$, _$[$0-1], _$[$0]);
549
550break;
551case 86:
552
553 if ($$[$0].type == "NUMBER") {
554 this.$ = { type: "NUMBER", value: __P__.minus($$[$0].value).mod(__P__) };
555 } else {
556 this.$ = { type: "OP", op: "UMINUS", values: [$$[$0]] };
557 }
558 setLines(this.$, _$[$0-1], _$[$0]);
559
560break;
561case 87:
562
563 if ($$[$0].type == "NUMBER") {
564 this.$ = { type: "NUMBER", value: $$[$0].value.eq(0) ? bigInt(1) : bigInt(0) };
565 } else {
566 this.$ = { type: "OP", op: "!", 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.xor(__MASK__) };
575 } else {
576 this.$ = { type: "OP", op: "~", values: [$$[$0]] };
577 }
578 setLines(this.$, _$[$0-1], _$[$0]);
579
580break;
581case 90:
582
583 this.$ = {type: "OP", op: "PLUSPLUSRIGHT", values: [$$[$0-1]] };
584 setLines(this.$, _$[$0-1], _$[$0]);
585
586break;
587case 91:
588
589 this.$ = {type: "OP", op: "MINUSMINUSRIGHT", values: [$$[$0-1]] };
590 setLines(this.$, _$[$0-1], _$[$0]);
591
592break;
593case 94: case 99: case 100:
594
595 this.$ = $$[$0]
596
597break;
598case 95:
599
600 this.$ = {type: "NUMBER", value: bigInt($$[$0]).mod(__P__) }
601 setLines(this.$, _$[$0]);
602
603break;
604case 96:
605
606 this.$ = {type: "NUMBER", value: bigInt($$[$0].substr(2).toUpperCase(), 16).mod(__P__) }
607 setLines(this.$, _$[$0]);
608
609break;
610case 97:
611
612 this.$ = $$[$0-1];
613 setLines(this.$, _$[$0-2], _$[$0]);
614
615break;
616case 98:
617
618 this.$ = {type: "PIN", component: $$[$0-2], pin: $$[$0] };
619 setLines(this.$, _$[$0-2], _$[$0]);
620
621break;
622case 101:
623
624 this.$ = {type: "DECLARE", declareType: "VARIABLE", name: $$[$0]}
625 setLines(this.$, _$[$0-1], _$[$0]);
626
627break;
628case 102:
629
630 this.$ = {type: "DECLARE", declareType: "SIGNAL", name: $$[$0]}
631 setLines(this.$, _$[$0-1], _$[$0]);
632
633break;
634case 103:
635
636 this.$ = {type: "DECLARE", declareType: "SIGNALIN", name: $$[$0]};
637 setLines(this.$, _$[$0-2], _$[$0]);
638
639break;
640case 104:
641
642 this.$ = {type: "DECLARE", declareType: "SIGNALIN", private: true, name: $$[$0]};
643 setLines(this.$, _$[$0-3], _$[$0]);
644
645break;
646case 105:
647
648 this.$ = {type: "DECLARE", declareType: "SIGNALOUT", name: $$[$0]};
649 setLines(this.$, _$[$0-2], _$[$0]);
650
651break;
652case 106:
653
654 this.$ = {type: "DECLARE", declareType: "COMPONENT", name: $$[$0]}
655 setLines(this.$, _$[$0-1], _$[$0]);
656
657break;
658case 107:
659
660 for (let i=0; i< $$[$0].values.length; i++) {
661 $$[$0-1].selectors.push($$[$0].values[i]);
662 }
663 setLines($$[$0-1], _$[$0-1], _$[$0]);
664
665break;
666case 108:
667
668 this.$ = {type: "VARIABLE", name: $$[$0] , selectors: []};
669 setLines(this.$, _$[$0]);
670
671break;
672case 109:
673
674 this.$ = {type: "FUNCTIONCALL", name: $$[$0-3], params: $$[$0-1].expressions}
675 setLines(this.$, _$[$0-3], _$[$0]);
676
677break;
678case 110:
679
680 this.$ = {type: "FUNCTIONCALL", name: $$[$0-2], params: []}
681 setLines(this.$, _$[$0-2], _$[$0]);
682
683break;
684case 111:
685
686 $$[$0-2].expressions.push($$[$0]);
687 setLines(this.$, _$[$0-2], _$[$0]);
688
689break;
690case 112:
691
692 this.$ = {type: "EXPRESSIONLST", expressions: [$$[$0]]};
693 setLines(this.$, _$[$0]);
694
695break;
696case 114:
697
698 this.$ = { type: "ARRAY", values: $$[$0-1].expressions};
699 setLines(this.$, _$[$0-2], _$[$0]);
700
701break;
702}
703},
704table: [{3:1,4:2,6:3,7:4,8:5,9:6,10:7,11:8,12:9,13:10,14:11,15:12,16:13,17:$V0,18:$V1,19:$V2,22:$V3,24:$V4,25:22,27:$V5,29:$V6,30:$V7,31:$V8,32:$V9,34:$Va,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},{1:[3]},{5:[1,60],6:61,7:4,8:5,9:6,10:7,11:8,12:9,13:10,14:11,15:12,16:13,17:$V0,18:$V1,19:$V2,22:$V3,24:$V4,25:22,27:$V5,29:$V6,30:$V7,31:$V8,32:$V9,34:$Va,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},o($Vn,[2,3]),o($Vo,[2,4]),o($Vo,[2,5]),o($Vo,[2,6]),o($Vo,[2,7]),o($Vo,[2,8]),o($Vo,[2,9]),o($Vo,[2,10]),o($Vo,[2,11]),o($Vo,[2,12]),o($Vo,[2,13]),{18:[1,62]},{18:[1,63]},{19:[1,64]},{19:[1,65]},{19:[1,66]},{6:67,7:4,8:5,9:6,10:7,11:8,12:9,13:10,14:11,15:12,16:13,17:$V0,18:$V1,19:$V2,22:$V3,24:$V4,25:22,27:$V5,29:$V6,30:$V7,31:$V8,32:$V9,34:$Va,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},{18:$V1,19:$V2,25:68,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},{4:69,6:3,7:4,8:5,9:6,10:7,11:8,12:9,13:10,14:11,15:12,16:13,17:$V0,18:$V1,19:$V2,22:$V3,24:$V4,25:22,27:$V5,29:$V6,30:$V7,31:$V8,32:$V9,34:$Va,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},o($Vo,[2,31],{28:[1,70]}),{33:[1,71]},o([5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,80,82,89,90,91,92,96,97,101,102,106,109,110],[2,32],{50:$Vp,52:$Vq,55:$Vr}),o($Vs,$Vt,{38:[1,75],39:[1,76],40:[1,77],41:[1,78],42:[1,79],43:[1,80],44:[1,81],45:[1,82],46:[1,83],47:[1,84],48:[1,85],49:[1,86],51:[1,87],89:$Vu,90:$Vv}),o($Vw,[2,50],{54:[1,90]}),o($Vx,[2,100],{107:92,99:[1,91],109:$Vm}),o([5,17,18,19,21,22,23,24,26,27,28,29,30,31,32,34,35,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,54,55,56,59,61,63,65,67,69,71,72,74,75,76,77,79,80,82,83,85,86,87,89,90,91,92,96,97,101,102,106,109,110],[2,99]),o($Vy,[2,51]),o($Vy,[2,52],{59:[1,93]}),o([5,17,18,21,22,23,24,26,27,28,29,30,31,32,34,35,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,54,55,56,59,61,63,65,67,69,71,72,74,75,76,77,79,80,82,83,85,86,87,89,90,91,92,96,97,99,101,102,106,109,110],$Vz,{19:[1,94]}),{18:$VA,98:95},{18:$VA,98:97,103:[1,98],104:[1,99],105:[1,100]},{18:$VA,98:101},o($Vy,[2,113]),o($VB,[2,54],{61:$VC}),{18:$V1,19:$V2,25:104,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,108:103,109:$Vm},o($VD,[2,56],{63:$VE}),o($VF,[2,58],{65:$VG}),o($VH,[2,60],{67:$VI}),o($VJ,[2,62],{69:$VK,71:$VL}),o($VM,[2,65],{72:$VN,74:$VO,75:$VP,76:$VQ}),o($VR,[2,70],{77:$VS,79:$VT}),o($VU,[2,73],{80:$VV,82:$VW}),o($VX,[2,76],{83:$VY,85:$VZ,86:$V_}),o($V$,[2,80],{87:$V01}),o($V11,[2,82]),{18:$VA,37:122,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},{18:$VA,37:123,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},{18:$V1,19:$V2,37:125,80:$Vb,82:$Vc,88:124,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},{18:$V1,19:$V2,37:125,80:$Vb,82:$Vc,88:126,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},{18:$V1,19:$V2,37:125,80:$Vb,82:$Vc,88:127,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},{18:$V1,19:$V2,37:125,80:$Vb,82:$Vc,88:128,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},o($V11,[2,89]),o($V11,[2,92]),o($V11,[2,93]),o($V11,[2,95]),o($V11,[2,96]),{18:$V1,19:$V2,25:129,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},{1:[2,1]},o($Vn,[2,2]),{19:[1,130]},{19:[1,131]},{18:$V1,19:$V2,25:132,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},{18:$V1,19:$V2,25:133,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},{18:$V1,19:$V2,25:134,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},{29:[1,135]},o($Vo,[2,26],{28:[1,136]}),{6:61,7:4,8:5,9:6,10:7,11:8,12:9,13:10,14:11,15:12,16:13,17:$V0,18:$V1,19:$V2,22:$V3,24:$V4,25:22,27:$V5,29:$V6,30:$V7,31:$V8,32:$V9,34:$Va,35:[1,137],36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},o($Vo,[2,30]),o($Vo,[2,28],{28:[1,138]}),{18:$VA,37:139,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},{18:$VA,37:140,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},{18:$V1,19:$V2,36:141,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},{18:$V1,19:$V2,36:142,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},{18:$V1,19:$V2,36:143,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},{18:$V1,19:$V2,36:144,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},{18:$V1,19:$V2,36:145,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},{18:$V1,19:$V2,36:146,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},{18:$V1,19:$V2,36:147,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},{18:$V1,19:$V2,36:148,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},{18:$V1,19:$V2,36:149,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},{18:$V1,19:$V2,36:150,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},{18:$V1,19:$V2,36:151,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},{18:$V1,19:$V2,36:152,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},{18:$V1,19:$V2,36:153,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},{18:$V1,19:$V2,36:154,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},o($V11,[2,90]),o($V11,[2,91]),{18:$V1,19:$V2,36:155,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},{18:$VA,98:156},o($V21,[2,107]),{18:$V1,19:$V2,37:125,60:157,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},{18:$V1,19:$V2,21:[1,159],25:104,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,108:158,109:$Vm},o($Vx,[2,101],{107:92,109:$Vm}),o($V21,$Vz),o($Vx,[2,102],{107:92,109:$Vm}),{18:$VA,98:160},{103:[1,161]},{18:$VA,98:162},o($Vx,[2,106],{107:92,109:$Vm}),{18:$V1,19:$V2,37:125,62:163,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},{23:$V31,110:[1,164]},o($V41,[2,112]),{18:$V1,19:$V2,37:125,64:166,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},{18:$V1,19:$V2,37:125,66:167,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},{18:$V1,19:$V2,37:125,68:168,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},{18:$V1,19:$V2,37:125,70:169,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},{18:$V1,19:$V2,37:125,70:170,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},{18:$V1,19:$V2,37:125,73:171,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},{18:$V1,19:$V2,37:125,73:172,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},{18:$V1,19:$V2,37:125,73:173,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},{18:$V1,19:$V2,37:125,73:174,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},{18:$V1,19:$V2,37:125,78:175,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},{18:$V1,19:$V2,37:125,78:176,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},{18:$V1,19:$V2,37:125,80:$Vb,81:177,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},{18:$V1,19:$V2,37:125,80:$Vb,81:178,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},{18:$V1,19:$V2,37:125,80:$Vb,82:$Vc,84:179,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},{18:$V1,19:$V2,37:125,80:$Vb,82:$Vc,84:180,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},{18:$V1,19:$V2,37:125,80:$Vb,82:$Vc,84:181,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},{18:$V1,19:$V2,37:125,80:$Vb,82:$Vc,88:182,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl},o($V11,[2,83]),o($V11,[2,84]),o($V11,[2,85]),o($Vs,$Vt,{89:$Vu,90:$Vv}),o($V11,[2,86]),o($V11,[2,87]),o($V11,[2,88]),{21:[1,183]},{18:$V51,20:184,21:[1,185]},{18:$V51,20:187,21:[1,188]},{21:[1,189]},{28:[1,190]},{21:[1,191]},{19:[1,192]},o($Vo,[2,25]),o($Vo,[2,29]),o($Vo,[2,27]),o($Vw,[2,45]),o($Vw,[2,47]),{50:$Vp,52:$Vq,55:$Vr,56:[1,193]},o($V61,[2,33],{50:$Vp,52:$Vq,55:$Vr}),o($V61,[2,34],{50:$Vp,52:$Vq,55:$Vr}),o($V61,[2,35],{50:$Vp,52:$Vq,55:$Vr}),o($V61,[2,36],{50:$Vp,52:$Vq,55:$Vr}),o($V61,[2,37],{50:$Vp,52:$Vq,55:$Vr}),o($V61,[2,38],{50:$Vp,52:$Vq,55:$Vr}),o($V61,[2,39],{50:$Vp,52:$Vq,55:$Vr}),o($V61,[2,40],{50:$Vp,52:$Vq,55:$Vr}),o($V61,[2,41],{50:$Vp,52:$Vq,55:$Vr}),o($V61,[2,42],{50:$Vp,52:$Vq,55:$Vr}),o($V61,[2,43],{50:$Vp,52:$Vq,55:$Vr}),o($V61,[2,44],{50:$Vp,52:$Vq,55:$Vr}),o($V61,[2,46],{50:$Vp,52:$Vq,55:$Vr}),o($V61,[2,48],{50:$Vp,52:$Vq,55:$Vr}),o($Vx,[2,98],{107:92,109:$Vm}),o($VB,[2,53],{61:$VC}),{21:[1,194],23:$V31},o($V11,[2,110]),o($Vx,[2,103],{107:92,109:$Vm}),{18:$VA,98:195},o($Vx,[2,105],{107:92,109:$Vm}),o($VD,[2,55],{63:$VE}),o($V21,[2,114]),{18:$V1,19:$V2,25:196,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},o($VF,[2,57],{65:$VG}),o($VH,[2,59],{67:$VI}),o($VJ,[2,61],{69:$VK,71:$VL}),o($VM,[2,63],{72:$VN,74:$VO,75:$VP,76:$VQ}),o($VM,[2,64],{72:$VN,74:$VO,75:$VP,76:$VQ}),o($VR,[2,66],{77:$VS,79:$VT}),o($VR,[2,67],{77:$VS,79:$VT}),o($VR,[2,68],{77:$VS,79:$VT}),o($VR,[2,69],{77:$VS,79:$VT}),o($VU,[2,71],{80:$VV,82:$VW}),o($VU,[2,72],{80:$VV,82:$VW}),o($VX,[2,74],{83:$VY,85:$VZ,86:$V_}),o($VX,[2,75],{83:$VY,85:$VZ,86:$V_}),o($V$,[2,77],{87:$V01}),o($V$,[2,78],{87:$V01}),o($V$,[2,79],{87:$V01}),o($V11,[2,81]),o($V11,[2,97]),{21:[1,197],23:$V71},{14:199,34:$Va},o($V81,[2,19]),{21:[1,200],23:$V71},{14:201,34:$Va},{6:202,7:4,8:5,9:6,10:7,11:8,12:9,13:10,14:11,15:12,16:13,17:$V0,18:$V1,19:$V2,22:$V3,24:$V4,25:22,27:$V5,29:$V6,30:$V7,31:$V8,32:$V9,34:$Va,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},{18:$V1,19:$V2,25:203,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},{6:204,7:4,8:5,9:6,10:7,11:8,12:9,13:10,14:11,15:12,16:13,17:$V0,18:$V1,19:$V2,22:$V3,24:$V4,25:22,27:$V5,29:$V6,30:$V7,31:$V8,32:$V9,34:$Va,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},{18:$V1,19:$V2,25:205,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},{18:$V1,19:$V2,36:206,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},o($V11,[2,109]),o($Vx,[2,104],{107:92,109:$Vm}),o($V41,[2,111]),{14:207,34:$Va},{18:[1,208]},o($Vo,[2,15]),{14:209,34:$Va},o($Vo,[2,17]),o($Vn,[2,21],{26:[1,210]}),{28:[1,211]},o($Vo,[2,23]),{21:[1,212]},o($V61,[2,49],{50:$Vp,52:$Vq,55:$Vr}),o($Vo,[2,14]),o($V81,[2,18]),o($Vo,[2,16]),{6:213,7:4,8:5,9:6,10:7,11:8,12:9,13:10,14:11,15:12,16:13,17:$V0,18:$V1,19:$V2,22:$V3,24:$V4,25:22,27:$V5,29:$V6,30:$V7,31:$V8,32:$V9,34:$Va,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},{18:$V1,19:$V2,25:214,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},o($Vo,[2,24]),o($Vo,[2,20]),{21:[1,215]},{6:216,7:4,8:5,9:6,10:7,11:8,12:9,13:10,14:11,15:12,16:13,17:$V0,18:$V1,19:$V2,22:$V3,24:$V4,25:22,27:$V5,29:$V6,30:$V7,31:$V8,32:$V9,34:$Va,36:24,37:25,53:26,57:29,58:30,60:36,62:38,64:39,66:40,68:41,70:42,73:43,78:44,80:$Vb,81:45,82:$Vc,84:46,88:47,89:$Vd,90:$Ve,91:$Vf,92:$Vg,93:54,94:55,95:56,96:$Vh,97:$Vi,98:27,100:28,101:$Vj,102:$Vk,106:$Vl,107:35,109:$Vm},o($Vo,[2,22])],
705defaultActions: {60:[2,1]},
706parseError: function parseError (str, hash) {
707 if (hash.recoverable) {
708 this.trace(str);
709 } else {
710 var error = new Error(str);
711 error.hash = hash;
712 throw error;
713 }
714},
715parse: function parse(input) {
716 var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
717 var args = lstack.slice.call(arguments, 1);
718 var lexer = Object.create(this.lexer);
719 var sharedState = { yy: {} };
720 for (var k in this.yy) {
721 if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
722 sharedState.yy[k] = this.yy[k];
723 }
724 }
725 lexer.setInput(input, sharedState.yy);
726 sharedState.yy.lexer = lexer;
727 sharedState.yy.parser = this;
728 if (typeof lexer.yylloc == 'undefined') {
729 lexer.yylloc = {};
730 }
731 var yyloc = lexer.yylloc;
732 lstack.push(yyloc);
733 var ranges = lexer.options && lexer.options.ranges;
734 if (typeof sharedState.yy.parseError === 'function') {
735 this.parseError = sharedState.yy.parseError;
736 } else {
737 this.parseError = Object.getPrototypeOf(this).parseError;
738 }
739 function popStack(n) {
740 stack.length = stack.length - 2 * n;
741 vstack.length = vstack.length - n;
742 lstack.length = lstack.length - n;
743 }
744 _token_stack:
745 var lex = function () {
746 var token;
747 token = lexer.lex() || EOF;
748 if (typeof token !== 'number') {
749 token = self.symbols_[token] || token;
750 }
751 return token;
752 };
753 var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
754 while (true) {
755 state = stack[stack.length - 1];
756 if (this.defaultActions[state]) {
757 action = this.defaultActions[state];
758 } else {
759 if (symbol === null || typeof symbol == 'undefined') {
760 symbol = lex();
761 }
762 action = table[state] && table[state][symbol];
763 }
764 if (typeof action === 'undefined' || !action.length || !action[0]) {
765 var errStr = '';
766 expected = [];
767 for (p in table[state]) {
768 if (this.terminals_[p] && p > TERROR) {
769 expected.push('\'' + this.terminals_[p] + '\'');
770 }
771 }
772 if (lexer.showPosition) {
773 errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\'';
774 } else {
775 errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\'');
776 }
777 this.parseError(errStr, {
778 text: lexer.match,
779 token: this.terminals_[symbol] || symbol,
780 line: lexer.yylineno,
781 loc: yyloc,
782 expected: expected
783 });
784 }
785 if (action[0] instanceof Array && action.length > 1) {
786 throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
787 }
788 switch (action[0]) {
789 case 1:
790 stack.push(symbol);
791 vstack.push(lexer.yytext);
792 lstack.push(lexer.yylloc);
793 stack.push(action[1]);
794 symbol = null;
795 if (!preErrorSymbol) {
796 yyleng = lexer.yyleng;
797 yytext = lexer.yytext;
798 yylineno = lexer.yylineno;
799 yyloc = lexer.yylloc;
800 if (recovering > 0) {
801 recovering--;
802 }
803 } else {
804 symbol = preErrorSymbol;
805 preErrorSymbol = null;
806 }
807 break;
808 case 2:
809 len = this.productions_[action[1]][1];
810 yyval.$ = vstack[vstack.length - len];
811 yyval._$ = {
812 first_line: lstack[lstack.length - (len || 1)].first_line,
813 last_line: lstack[lstack.length - 1].last_line,
814 first_column: lstack[lstack.length - (len || 1)].first_column,
815 last_column: lstack[lstack.length - 1].last_column
816 };
817 if (ranges) {
818 yyval._$.range = [
819 lstack[lstack.length - (len || 1)].range[0],
820 lstack[lstack.length - 1].range[1]
821 ];
822 }
823 r = this.performAction.apply(yyval, [
824 yytext,
825 yyleng,
826 yylineno,
827 sharedState.yy,
828 action[1],
829 vstack,
830 lstack
831 ].concat(args));
832 if (typeof r !== 'undefined') {
833 return r;
834 }
835 if (len) {
836 stack = stack.slice(0, -1 * len * 2);
837 vstack = vstack.slice(0, -1 * len);
838 lstack = lstack.slice(0, -1 * len);
839 }
840 stack.push(this.productions_[action[1]][0]);
841 vstack.push(yyval.$);
842 lstack.push(yyval._$);
843 newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
844 stack.push(newState);
845 break;
846 case 3:
847 return true;
848 }
849 }
850 return true;
851}};
852
853const bigInt = require('big-integer');
854const util = require('util');
855const __P__ = new bigInt("21888242871839275222246405745257275088548364400416034343698204186575808495617");
856const __MASK__ = new bigInt(2).pow(253).minus(1);
857
858function setLines(dst, first, last) {
859 last = last || first;
860 dst.first_line = first.first_line;
861 dst.first_column = first.first_column;
862 dst.last_line = last.last_line;
863 dst.last_column = last.last_column;
864}
865
866/* generated by jison-lex 0.3.4 */
867var lexer = (function(){
868var lexer = ({
869
870EOF:1,
871
872parseError:function parseError(str, hash) {
873 if (this.yy.parser) {
874 this.yy.parser.parseError(str, hash);
875 } else {
876 throw new Error(str);
877 }
878 },
879
880// resets the lexer, sets new input
881setInput:function (input, yy) {
882 this.yy = yy || this.yy || {};
883 this._input = input;
884 this._more = this._backtrack = this.done = false;
885 this.yylineno = this.yyleng = 0;
886 this.yytext = this.matched = this.match = '';
887 this.conditionStack = ['INITIAL'];
888 this.yylloc = {
889 first_line: 1,
890 first_column: 0,
891 last_line: 1,
892 last_column: 0
893 };
894 if (this.options.ranges) {
895 this.yylloc.range = [0,0];
896 }
897 this.offset = 0;
898 return this;
899 },
900
901// consumes and returns one char from the input
902input:function () {
903 var ch = this._input[0];
904 this.yytext += ch;
905 this.yyleng++;
906 this.offset++;
907 this.match += ch;
908 this.matched += ch;
909 var lines = ch.match(/(?:\r\n?|\n).*/g);
910 if (lines) {
911 this.yylineno++;
912 this.yylloc.last_line++;
913 } else {
914 this.yylloc.last_column++;
915 }
916 if (this.options.ranges) {
917 this.yylloc.range[1]++;
918 }
919
920 this._input = this._input.slice(1);
921 return ch;
922 },
923
924// unshifts one char (or a string) into the input
925unput:function (ch) {
926 var len = ch.length;
927 var lines = ch.split(/(?:\r\n?|\n)/g);
928
929 this._input = ch + this._input;
930 this.yytext = this.yytext.substr(0, this.yytext.length - len);
931 //this.yyleng -= len;
932 this.offset -= len;
933 var oldLines = this.match.split(/(?:\r\n?|\n)/g);
934 this.match = this.match.substr(0, this.match.length - 1);
935 this.matched = this.matched.substr(0, this.matched.length - 1);
936
937 if (lines.length - 1) {
938 this.yylineno -= lines.length - 1;
939 }
940 var r = this.yylloc.range;
941
942 this.yylloc = {
943 first_line: this.yylloc.first_line,
944 last_line: this.yylineno + 1,
945 first_column: this.yylloc.first_column,
946 last_column: lines ?
947 (lines.length === oldLines.length ? this.yylloc.first_column : 0)
948 + oldLines[oldLines.length - lines.length].length - lines[0].length :
949 this.yylloc.first_column - len
950 };
951
952 if (this.options.ranges) {
953 this.yylloc.range = [r[0], r[0] + this.yyleng - len];
954 }
955 this.yyleng = this.yytext.length;
956 return this;
957 },
958
959// When called from action, caches matched text and appends it on next action
960more:function () {
961 this._more = true;
962 return this;
963 },
964
965// 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.
966reject:function () {
967 if (this.options.backtrack_lexer) {
968 this._backtrack = true;
969 } else {
970 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(), {
971 text: "",
972 token: null,
973 line: this.yylineno
974 });
975
976 }
977 return this;
978 },
979
980// retain first n characters of the match
981less:function (n) {
982 this.unput(this.match.slice(n));
983 },
984
985// displays already matched input, i.e. for error messages
986pastInput:function () {
987 var past = this.matched.substr(0, this.matched.length - this.match.length);
988 return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, "");
989 },
990
991// displays upcoming input, i.e. for error messages
992upcomingInput:function () {
993 var next = this.match;
994 if (next.length < 20) {
995 next += this._input.substr(0, 20-next.length);
996 }
997 return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
998 },
999
1000// displays the character position where the lexing error occurred, i.e. for error messages
1001showPosition:function () {
1002 var pre = this.pastInput();
1003 var c = new Array(pre.length + 1).join("-");
1004 return pre + this.upcomingInput() + "\n" + c + "^";
1005 },
1006
1007// test the lexed token: return FALSE when not a match, otherwise return token
1008test_match:function(match, indexed_rule) {
1009 var token,
1010 lines,
1011 backup;
1012
1013 if (this.options.backtrack_lexer) {
1014 // save context
1015 backup = {
1016 yylineno: this.yylineno,
1017 yylloc: {
1018 first_line: this.yylloc.first_line,
1019 last_line: this.last_line,
1020 first_column: this.yylloc.first_column,
1021 last_column: this.yylloc.last_column
1022 },
1023 yytext: this.yytext,
1024 match: this.match,
1025 matches: this.matches,
1026 matched: this.matched,
1027 yyleng: this.yyleng,
1028 offset: this.offset,
1029 _more: this._more,
1030 _input: this._input,
1031 yy: this.yy,
1032 conditionStack: this.conditionStack.slice(0),
1033 done: this.done
1034 };
1035 if (this.options.ranges) {
1036 backup.yylloc.range = this.yylloc.range.slice(0);
1037 }
1038 }
1039
1040 lines = match[0].match(/(?:\r\n?|\n).*/g);
1041 if (lines) {
1042 this.yylineno += lines.length;
1043 }
1044 this.yylloc = {
1045 first_line: this.yylloc.last_line,
1046 last_line: this.yylineno + 1,
1047 first_column: this.yylloc.last_column,
1048 last_column: lines ?
1049 lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length :
1050 this.yylloc.last_column + match[0].length
1051 };
1052 this.yytext += match[0];
1053 this.match += match[0];
1054 this.matches = match;
1055 this.yyleng = this.yytext.length;
1056 if (this.options.ranges) {
1057 this.yylloc.range = [this.offset, this.offset += this.yyleng];
1058 }
1059 this._more = false;
1060 this._backtrack = false;
1061 this._input = this._input.slice(match[0].length);
1062 this.matched += match[0];
1063 token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
1064 if (this.done && this._input) {
1065 this.done = false;
1066 }
1067 if (token) {
1068 return token;
1069 } else if (this._backtrack) {
1070 // recover context
1071 for (var k in backup) {
1072 this[k] = backup[k];
1073 }
1074 return false; // rule action called reject() implying the next rule should be tested instead.
1075 }
1076 return false;
1077 },
1078
1079// return next match in input
1080next:function () {
1081 if (this.done) {
1082 return this.EOF;
1083 }
1084 if (!this._input) {
1085 this.done = true;
1086 }
1087
1088 var token,
1089 match,
1090 tempMatch,
1091 index;
1092 if (!this._more) {
1093 this.yytext = '';
1094 this.match = '';
1095 }
1096 var rules = this._currentRules();
1097 for (var i = 0; i < rules.length; i++) {
1098 tempMatch = this._input.match(this.rules[rules[i]]);
1099 if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
1100 match = tempMatch;
1101 index = i;
1102 if (this.options.backtrack_lexer) {
1103 token = this.test_match(tempMatch, rules[i]);
1104 if (token !== false) {
1105 return token;
1106 } else if (this._backtrack) {
1107 match = false;
1108 continue; // rule action called reject() implying a rule MISmatch.
1109 } else {
1110 // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
1111 return false;
1112 }
1113 } else if (!this.options.flex) {
1114 break;
1115 }
1116 }
1117 }
1118 if (match) {
1119 token = this.test_match(match, rules[index]);
1120 if (token !== false) {
1121 return token;
1122 }
1123 // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
1124 return false;
1125 }
1126 if (this._input === "") {
1127 return this.EOF;
1128 } else {
1129 return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), {
1130 text: "",
1131 token: null,
1132 line: this.yylineno
1133 });
1134 }
1135 },
1136
1137// return next match that has a token
1138lex:function lex () {
1139 var r = this.next();
1140 if (r) {
1141 return r;
1142 } else {
1143 return this.lex();
1144 }
1145 },
1146
1147// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
1148begin:function begin (condition) {
1149 this.conditionStack.push(condition);
1150 },
1151
1152// pop the previously active lexer condition state off the condition stack
1153popState:function popState () {
1154 var n = this.conditionStack.length - 1;
1155 if (n > 0) {
1156 return this.conditionStack.pop();
1157 } else {
1158 return this.conditionStack[0];
1159 }
1160 },
1161
1162// produce the lexer rule set which is active for the currently active lexer condition state
1163_currentRules:function _currentRules () {
1164 if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
1165 return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
1166 } else {
1167 return this.conditions["INITIAL"].rules;
1168 }
1169 },
1170
1171// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
1172topState:function topState (n) {
1173 n = this.conditionStack.length - 1 - Math.abs(n || 0);
1174 if (n >= 0) {
1175 return this.conditionStack[n];
1176 } else {
1177 return "INITIAL";
1178 }
1179 },
1180
1181// alias for begin(condition)
1182pushState:function pushState (condition) {
1183 this.begin(condition);
1184 },
1185
1186// return the number of states currently on the stack
1187stateStackSize:function stateStackSize() {
1188 return this.conditionStack.length;
1189 },
1190options: {},
1191performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {
1192var YYSTATE=YY_START;
1193switch($avoiding_name_collisions) {
1194case 0: /* skip whitespace */
1195break;
1196case 1: /* console.log("MULTILINE COMMENT: "+yy_.yytext); */
1197break;
1198case 2: /* console.log("SINGLE LINE COMMENT: "+yy_.yytext); */
1199break;
1200case 3: return 101;
1201break;
1202case 4: return 102;
1203break;
1204case 5: return 104;
1205break;
1206case 6: return 103;
1207break;
1208case 7: return 105;
1209break;
1210case 8: return 'linearCombination';
1211break;
1212case 9: return 106;
1213break;
1214case 10: return 22;
1215break;
1216case 11: return 17;
1217break;
1218case 12: return 24;
1219break;
1220case 13: return 26;
1221break;
1222case 14: return 27;
1223break;
1224case 15: return 29;
1225break;
1226case 16: return 30;
1227break;
1228case 17: return 31;
1229break;
1230case 18: return 32;
1231break;
1232case 19: return 97;
1233break;
1234case 20: return 96;
1235break;
1236case 21: return 18;
1237break;
1238case 22: yy_.yytext = yy_.yytext.slice(1,-1); return 33;
1239break;
1240case 23: return 50;
1241break;
1242case 24: return 49;
1243break;
1244case 25: return 52;
1245break;
1246case 26: return 51;
1247break;
1248case 27: return 54;
1249break;
1250case 28: return 45;
1251break;
1252case 29: return 44;
1253break;
1254case 30: return 61;
1255break;
1256case 31: return 59;
1257break;
1258case 32: return 69;
1259break;
1260case 33: return 72;
1261break;
1262case 34: return 74;
1263break;
1264case 35: return 71;
1265break;
1266case 36: return 79;
1267break;
1268case 37: return 77;
1269break;
1270case 38: return 87;
1271break;
1272case 39: return 89;
1273break;
1274case 40: return 90;
1275break;
1276case 41: return 39;
1277break;
1278case 42: return 40;
1279break;
1280case 43: return 41;
1281break;
1282case 44: return 42;
1283break;
1284case 45: return 43;
1285break;
1286case 46: return 47;
1287break;
1288case 47: return 46;
1289break;
1290case 48: return 48;
1291break;
1292case 49: return 38;
1293break;
1294case 50: return 80;
1295break;
1296case 51: return 82;
1297break;
1298case 52: return 83;
1299break;
1300case 53: return 85;
1301break;
1302case 54: return 86;
1303break;
1304case 55: return 65;
1305break;
1306case 56: return 67;
1307break;
1308case 57: return 63;
1309break;
1310case 58: return 91;
1311break;
1312case 59: return 75;
1313break;
1314case 60: return 76;
1315break;
1316case 61: return 91;
1317break;
1318case 62: return 55;
1319break;
1320case 63: return 56;
1321break;
1322case 64: return 19;
1323break;
1324case 65: return 21;
1325break;
1326case 66: return 109;
1327break;
1328case 67: return 110;
1329break;
1330case 68: return 34;
1331break;
1332case 69: return 35;
1333break;
1334case 70: return 28;
1335break;
1336case 71: return 23;
1337break;
1338case 72: return 99;
1339break;
1340case 73: return 5;
1341break;
1342case 74: console.log("INVALID: " + yy_.yytext); return 'INVALID'
1343break;
1344}
1345},
1346rules: [/^(?:\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]*)/,/^(?:"[^"]+")/,/^(?:==>)/,/^(?:<==)/,/^(?:-->)/,/^(?:<--)/,/^(?:===)/,/^(?:>>=)/,/^(?:<<=)/,/^(?:&&)/,/^(?:\|\|)/,/^(?:==)/,/^(?:<=)/,/^(?:>=)/,/^(?:!=)/,/^(?:>>)/,/^(?:<<)/,/^(?:\*\*)/,/^(?:\+\+)/,/^(?:--)/,/^(?:\+=)/,/^(?:-=)/,/^(?:\*=)/,/^(?:\/=)/,/^(?:%=)/,/^(?:\|=)/,/^(?:&=)/,/^(?:\^=)/,/^(?:=)/,/^(?:\+)/,/^(?:-)/,/^(?:\*)/,/^(?:\/)/,/^(?:%)/,/^(?:\^)/,/^(?:&)/,/^(?:\|)/,/^(?:!)/,/^(?:<)/,/^(?:>)/,/^(?:!)/,/^(?:\?)/,/^(?::)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{)/,/^(?:\})/,/^(?:;)/,/^(?:,)/,/^(?:\.)/,/^(?:$)/,/^(?:.)/],
1347conditions: {"INITIAL":{"rules":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],"inclusive":true}}
1348});
1349return lexer;
1350})();
1351parser.lexer = lexer;
1352function Parser () {
1353 this.yy = {};
1354}
1355Parser.prototype = parser;parser.Parser = Parser;
1356return new Parser;
1357})();
1358
1359
1360if (typeof require !== 'undefined' && typeof exports !== 'undefined') {
1361exports.parser = jaz;
1362exports.Parser = jaz.Parser;
1363exports.parse = function () { return jaz.parse.apply(jaz, arguments); };
1364exports.main = function commonjsMain (args) {
1365 if (!args[1]) {
1366 console.log('Usage: '+args[0]+' FILE');
1367 process.exit(1);
1368 }
1369 var source = require('fs').readFileSync(require('path').normalize(args[1]), "utf8");
1370 return exports.parser.parse(source);
1371};
1372if (typeof module !== 'undefined' && require.main === module) {
1373 exports.main(process.argv.slice(1));
1374}
1375}