From 36e77393a933959a1ae1a6cec0cf71787dfa644b Mon Sep 17 00:00:00 2001 From: zkronos73 Date: Thu, 25 Jan 2024 12:21:31 +0100 Subject: [PATCH 1/7] WIP - update jison --- build/zkasm_parser.js | 330 +++++++++++++++++++---------------------- src/zkasm_parser.jison | 249 ++++++++++++++++--------------- 2 files changed, 284 insertions(+), 295 deletions(-) diff --git a/build/zkasm_parser.js b/build/zkasm_parser.js index 004798e..1758e37 100644 --- a/build/zkasm_parser.js +++ b/build/zkasm_parser.js @@ -231,7 +231,7 @@ case 55: this.$ = {type: 'neg', values: [$$[$0]]} break; -case 56: case 58: +case 56: case 58: case 172: this.$ = $$[$0] @@ -390,364 +390,322 @@ case 86: break; case 87: - this.$ = { [$$[$0-3]]: 1, useJmpAddr: 1, jmpAddr: $$[$0-1] } + this.$ = { ...$$[$0-3], useJmpAddrRel: $$[$0-1].useAddrRel, ...$$[$0-1].indirections, jmpAddr: $$[$0-1].addr } break; case 88: - this.$ = { [$$[$0-3]]: 1, useJmpAddr: 1, jmpAddr: $$[$0-1], useElseAddr: 1, elseAddr: 'next' } + this.$ = { ...$$[$0-3], useElseAddrRel: $$[$0-1].useAddrRel, ...$$[$0-1].indirections, elseAddr: $$[$0-1].addr, useJmpAddrRel: 0, jmpAddr: 'next' } break; case 89: - this.$ = { [$$[$0-5]]: 1, useJmpAddr: 1, jmpAddr: $$[$0-3], useElseAddr: 1, elseAddr: $$[$0-1] } + // TODO: validate $$[$0-3].useAddrRel !== $$[$0-1].useAddrRel || $$[$0-3].indirections === $$[$0-1].indirections + this.$ = { ...$$[$0-5], useElseAddrRel: $$[$0-3].useAddrRel, ...$$[$0-3].indirections, elseAddr: $$[$0-3].addr, useJmpAddrRel: $$[$0-1].useAddrRel, jmpAddr: $$[$0-1], ...$$[$0-1].indirections } break; case 90: - this.$ = { [$$[$0-3]]: 1, useJmpAddr: 1, jmpAddr: 'next', useElseAddr: 1, elseAddr: $$[$0-1] } + this.$ = { ...$$[$0-3], useJmpAddrRel: $$[$0-1].useAddrRel, ...$$[$0-1].indirections, jmpAddr: $$[$0-1].addr, useElseAddrRel: 0, elseAddr: 'next' } break; case 91: - this.$ = { [$$[$0-5]]: 1, useJmpAddr: 1, jmpAddr: $$[$0-1], useElseAddr: 1, elseAddr: $$[$0-3] } + // TODO: validate $$[$0-3].useAddrRel !== $$[$0-1].useAddrRel || $$[$0-3].indirections === $$[$0-1].indirections + this.$ = { ...$$[$0-5], useJmpAddrRel: $$[$0-3].useAddrRel, ...$$[$0-3].indirections, jmpAddr: $$[$0-3].addr, useElseAddrRel: $$[$0-1].useAddrRel, elseAddr: $$[$0-1].addr, ...$$[$0-1].indirections } break; case 92: - this.$ = { [$$[$0-3]]: 1, useJmpAddr: 0, ind: 0, indRR: 1, offset: 0 } + this.$ = {JMP: 0, JMPC: 0, JMPN: 0, useJmpAddrRel: $$[$0-1].useAddrRel, jmpAddr: $$[$0-1].addr, ...$$[$0-1].indirections, call: 1 } break; case 93: - this.$ = { [$$[$0-3]]: 1, useJmpAddr: 0, ind: 1, indRR: 0, offset: 0 } + this.$ = {JMP: 0, JMPC: 0, JMPN: 0, call: 0, return: 1} break; case 94: - this.$ = { [$$[$0-5]]: 1, useJmpAddr: 0, ind: 0, indRR: 1, offset: $$[$0-3] } + this.$ = {assert: 1} break; case 95: - this.$ = { [$$[$0-5]]: 1, useJmpAddr: 0, ind: 1, indRR: 0, offset: $$[$0-3] } + this.$ = {sRD: 1} break; case 96: - this.$ = { [$$[$0-3]]: 1, useJmpAddr: 0, ind: 0, indRR: 1, offset: 0, useElseAddr: 1, elseAddr: 'next' } + this.$ = {sWR: 1} break; case 97: - this.$ = { [$$[$0-3]]: 1, useJmpAddr: 0, ind: 1, indRR: 0, offset: 0, useElseAddr: 1, elseAddr: 'next' } + this.$ = { arithEq0: 1, arithEq1: 0, arithEq2: 0, arithEq3: 0, arithEq4: 0, arithEq5: 0 } break; case 98: - this.$ = { [$$[$0-5]]: 1, useJmpAddr: 0, ind: 0, indRR: 1, offset: $$[$0-3], useElseAddr: 1, elseAddr: 'next' } + this.$ = { arithEq0: 0, arithEq1: 1, arithEq2: 0, arithEq3: 0, arithEq4: 0, arithEq5: 0 } break; case 99: - this.$ = { [$$[$0-5]]: 1, useJmpAddr: 0, ind: 1, indRR: 0, offset: $$[$0-3], useElseAddr: 1, elseAddr: 'next' } + this.$ = { arithEq0: 0, arithEq1: 0, arithEq2: 0, arithEq3: 0, arithEq4: 0, arithEq5: 0 } break; case 100: - this.$ = { [$$[$0-5]]: 1, useJmpAddr: 0, ind: 0, indRR: 1, offset: 0, useElseAddr: 1, elseAddr: $$[$0-1] } + this.$ = { arithEq0: 0, arithEq1: 0, arithEq2: 0, arithEq3: 1, arithEq4: 0, arithEq5: 0 } break; case 101: - this.$ = { [$$[$0-5]]: 1, useJmpAddr: 0, ind: 1, indRR: 0, offset: 0, useElseAddr: 1, elseAddr: $$[$0-1] } + this.$ = { arithEq0: 0, arithEq1: 0, arithEq2: 0, arithEq3: 0, arithEq4: 1, arithEq5: 0 } break; case 102: - this.$ = { [$$[$0-7]]: 1, useJmpAddr: 0, ind: 0, indRR: 1, offset: $$[$0-5], useElseAddr: 1, elseAddr: $$[$0-1] } + this.$ = { arithEq0: 0, arithEq1: 0, arithEq2: 0, arithEq3: 0, arithEq4: 0, arithEq5: 1 } break; case 103: - this.$ = { [$$[$0-7]]: 1, useJmpAddr: 0, ind: 1, indRR: 0, offset: $$[$0-5], useElseAddr: 1, elseAddr: $$[$0-1] } + this.$ = { bin: 1, binOpcode: 0} break; case 104: - this.$ = {JMP: 0, JMPC: 0, JMPN: 0, useJmpAddr:1, jmpAddr: $$[$0-1], call: 1} + this.$ = { bin: 1, binOpcode: 1} break; case 105: - this.$ = {JMP: 0, JMPC: 0, JMPN: 0, offset: $$[$0-3], ind: 0, indRR: 1, return: 0, call: 1} + this.$ = { bin: 1, binOpcode: 2} break; case 106: - this.$ = {JMP: 0, JMPC: 0, JMPN: 0, offset: $$[$0-3], ind: 1, indRR: 0, return: 0, call: 1} + this.$ = { bin: 1, binOpcode: 3} break; case 107: - this.$ = {JMP: 0, JMPC: 0, JMPN: 0, call: 0, return: 1} + this.$ = { bin: 1, binOpcode: 4} break; case 108: - this.$ = {assert: 1} + this.$ = { bin: 1, binOpcode: 5} break; case 109: - this.$ = {sRD: 1} + this.$ = { bin: 1, binOpcode: 6} break; case 110: - this.$ = {sWR: 1} + this.$ = { bin: 1, binOpcode: 7} break; case 111: - this.$ = { arithEq0: 1, arithEq1: 0, arithEq2: 0, arithEq3: 0, arithEq4: 0, arithEq5: 0 } + this.$ = { bin: 1, binOpcode: 8} break; case 112: - this.$ = { arithEq0: 0, arithEq1: 1, arithEq2: 0, arithEq3: 0, arithEq4: 0, arithEq5: 0 } + this.$ = { memAlignRD: 1, memAlignWR: 0, memAlignWR8: 0} break; case 113: - this.$ = { arithEq0: 0, arithEq1: 0, arithEq2: 0, arithEq3: 0, arithEq4: 0, arithEq5: 0 } + this.$ = { memAlignRD: 0, memAlignWR: 1, memAlignWR8: 0} break; case 114: - this.$ = { arithEq0: 0, arithEq1: 0, arithEq2: 0, arithEq3: 1, arithEq4: 0, arithEq5: 0 } + this.$ = { memAlignRD: 0, memAlignWR: 0, memAlignWR8: 1} break; case 115: - this.$ = { arithEq0: 0, arithEq1: 0, arithEq2: 0, arithEq3: 0, arithEq4: 1, arithEq5: 0 } + this.$ = { repeat: 1 } break; case 116: - this.$ = { arithEq0: 0, arithEq1: 0, arithEq2: 0, arithEq3: 0, arithEq4: 0, arithEq5: 1 } + this.$ = { useAddrRel: 0, ind: 0, indRR: 1, addr: $$[$02] } break; -case 117: +case 117: case 118: - this.$ = { bin: 1, binOpcode: 0} - -break; -case 118: - - this.$ = { bin: 1, binOpcode: 1} - -break; -case 119: - - this.$ = { bin: 1, binOpcode: 2} - -break; -case 120: - - this.$ = { bin: 1, binOpcode: 3} - -break; -case 121: - - this.$ = { bin: 1, binOpcode: 4} + this.$ = { useAddrRel: 1, ind: 0, indRR: 1, addr: $$[$0] } break; case 122: - - this.$ = { bin: 1, binOpcode: 5} - + this.$ = 'JMPC' break; case 123: - - this.$ = { bin: 1, binOpcode: 6} - + this.$ = 'JMPZ' break; case 124: - - this.$ = { bin: 1, binOpcode: 7} - + this.$ = 'cntArith' break; case 125: - - this.$ = { bin: 1, binOpcode: 8} - + this.$ = 'cntBinary' break; case 126: - - this.$ = { memAlignRD: 1, memAlignWR: 0, memAlignWR8: 0} - + this.$ = 'cntKeccakF' break; case 127: - - this.$ = { memAlignRD: 0, memAlignWR: 1, memAlignWR8: 0} - + this.$ = 'cntSha256F' break; case 128: - - this.$ = { memAlignRD: 0, memAlignWR: 0, memAlignWR8: 1} - + this.$ = 'cntMemAlign' break; case 129: - - this.$ = { repeat: 1 } - -break; -case 133: - this.$ = 'JMPC' + this.$ = 'cntPaddingPG' break; -case 134: - this.$ = 'JMPZ' +case 130: + this.$ = 'cntPoseidonG' break; -case 135: - this.$ = 'cntArith' +case 147: case 148: + + this.$ = $$[$0] + break; -case 136: - this.$ = 'cntBinary' +case 149: + + this.$ = { reg: 'ind' } + break; -case 137: - this.$ = 'cntKeccakF' +case 150: + + this.$ = { reg: 'indRR' } + break; -case 138: - this.$ = 'cntSha256F' +case 151: + + this.$ = { ...$$[$0], indReg: 1 } + break; -case 139: - this.$ = 'cntMemAlign' +case 152: case 153: + + this.$ = { ...$$[$0], indReg: $$[$0-2] } + break; -case 140: - this.$ = 'cntPaddingPG' +case 154: case 155: case 156: + + this.$ = $$[$0] + break; -case 141: - this.$ = 'cntPoseidonG' +case 157: + + this.$ = $$[$0] + break; case 158: - - this.$ = { isStack: 1, isMem:0, ind:0, indRR: 0, incStack:0, offset: 0, useCTX: 1} + + this.$ = $$[$0-2] break; case 159: - - this.$ = { isStack: 1, isMem:0, ind:0, indRR: 0, incStack: 0, offset: $$[$0], useCTX: 1} + + this.$ = $$[$0-2] break; case 160: - this.$ = { isStack: 1, isMem:0, ind:0, indRR: 0, incStack: 0, offset: -$$[$0], useCTX: 1} + this.$ = { [$$[$0].reg]: $$[$0].indReg } break; case 161: - this.$ = { isStack: 1, isMem:0, ind:0, indRR: 0, incStack: 1, offset: 0, useCTX: 1} + this.$ = { [$$[$0-2].reg]: $$[$0-2].indReg, extraOffset: applySign($$[$0-1], $$[$0])}; break; case 162: - this.$ = { isStack: 1, isMem:0, ind:0, indRR: 0, incStack: -1, offset: 0, useCTX: 1} + this.$ = { [$$[$0-4].reg]: $$[$0-4].indReg, [$$[$0-2].reg] = applySign($$[$0-3], $$[$0-2].indReg), extraOffset: applySign($$[$0-1], $$[$0]) } + checkAddrRel(this.$); break; case 163: - this.$ = { isStack: 0, isMem:0, ind:1, indRR: 0, incStack: 0, offset: $$[$0]} + this.$ = { [$$[$0-2].reg]: $$[$0-2].indReg, [$$[$0].reg] = applySign($$[$0-1], $$[$0].indReg) } break; case 164: - this.$ = { isStack: 0, isMem:0, ind:1, indRR: 0, incStack: 0, offset: -$$[$0]} + this.$ = { isStack: 1, isMem:0, ind:0, indRR: 0, incStack:0, offset: 0, useCTX: 1} break; case 165: - this.$ = { isStack: 0, isMem:0, ind:1, indRR: 0, incStack: 0, offset: 0} + this.$ = { isStack: 1, isMem:0, ind:0, indRR: 0, incStack: 0, offset: $$[$0], useCTX: 1} break; case 166: - this.$ = { isStack: 0, isMem: 1, ind:1, indRR: 0, incStack: 0, offset: $$[$0], useCTX: 1} + this.$ = { isStack: 1, isMem:0, ind:0, indRR: 0, incStack: 0, offset: -$$[$0], useCTX: 1} break; case 167: - this.$ = { isStack: 0, isMem: 1, ind:1, indRR: 0, incStack: 0, offset: -$$[$0], useCTX: 1} + this.$ = { isStack: 1, isMem:0, ind:0, indRR: 0, incStack: 1, offset: 0, useCTX: 1} break; case 168: - this.$ = { isStack: 0, isMem: 1, ind:1, indRR: 0, incStack: 0, offset: 0, useCTX: 1} + this.$ = { isStack: 1, isMem:0, ind:0, indRR: 0, incStack: -1, offset: 0, useCTX: 1} break; case 169: - this.$ = { isStack: 1, ind:1, indRR: 0, incStack: 0, offset: $$[$0], useCTX: 1} + this.$ = { isStack: 0, isMem:0, ind:1, indRR: 0, incStack: 0, offset: $$[$02]} break; case 170: - this.$ = { isStack: 1, ind:1, indRR: 0, incStack: 0, offset: -$$[$0], useCTX: 1} + this.$ = { isStack: 0, isMem: 1, ind:1, indRR: 0, incStack: 0, offset: $$[$02], useCTX: 1} break; case 171: - this.$ = { isStack: 1, ind:1, indRR: 0, incStack: 0, offset: 0, useCTX: 1} - -break; -case 172: - - this.$ = { offset: $$[$0] } + this.$ = { isStack: 1, ind:1, indRR: 0, incStack: 0, offset: $$[$02], useCTX: 1} break; case 173: - this.$ = { offset: $$[$0-2], ind: 0, indRR: 1 } + this.$ = { offset: $$[$0] } break; case 174: - this.$ = { offset: $$[$0-2], ind: 1, indRR: 0 } + this.$ = { ...$$[$0], offset: $$[$0-2] } break; case 175: - this.$ = { offset: $$[$0-3], ind: 1, indRR: 0 } - -break; -case 176: - - this.$ = { offset: $$[$0-5], extraOffset: -$$[$0-1], ind: 1, indRR: 0 } + this.$ = { ...$$[$0-1], offset: $$[$0-3] } break; -case 177: +case 176: case 177: - this.$ = { offset: $$[$0-5], extraOffset: $$[$0-1], ind: 1, indRR: 0 } + this.$ = { offset: $$[$0-2], extraOffset: $$[$0] } break; case 178: - this.$ = { offset: $$[$0-2], extraOffset: $$[$0] } + this.$ = { ind: 0, indRR: 0, offset:$$[$0] } break; case 179: - this.$ = { offset: $$[$0-3], extraOffset: $$[$0-1] } - -break; -case 180: - - this.$ = {ind: 0, indRR: 0, offset:$$[$0]} - -break; -case 181: - - this.$ = {ind: 1, indRR: 0, offset:0} + this.$ = { ind: 1, indRR: 0, offset:0 } break; case 182: @@ -919,6 +877,20 @@ parse: function parse(input) { function setLine(dst, first) { dst.line = first.first_line; } +function negate(value) { + if (typeof value === 'number' | typeof value === 'bigint') { + return -value; + } + if (typeof value === 'string') { + return value.startsWith('-') ? value.substring(1) : '-'+value; + } + throw new Error(`ERROR: couldn't negate value ${value} (${typeof value})`); +} +function applySign(sign, value) { + if (sign === '+') return value; + if (sign === '-') return negate(value); + throw new Error(`ERROR: invalid sign ${sign} with value ${value} (${typeof value})`); +} /* generated by jison-lex 0.3.4 */ var lexer = (function(){ var lexer = ({ @@ -1273,29 +1245,29 @@ case 11: return 130; break; case 12: return 131; break; -case 13: return 90; +case 13: return 132; break; -case 14: return 115; +case 14: return 114; break; -case 15: return 132; +case 15: return 133; break; case 16: return 30; break; -case 17: return 133; +case 17: return 134; break; -case 18: return 134; +case 18: return 135; break; -case 19: return 135; +case 19: return 136; break; -case 20: return 136; +case 20: return 138; break; -case 21: return 89; +case 21: return 137; break; -case 22: return 137; +case 22: return 139; break; -case 23: return 139; +case 23: return 141; break; -case 24: return 138; +case 24: return 140; break; case 25: return 70 break; @@ -1337,45 +1309,45 @@ case 43: return 119 break; case 44: return 116 break; -case 45: return 91 +case 45: return 90 break; -case 46: return 92 +case 46: return 91 break; -case 47: return 93 +case 47: return 92 break; -case 48: return 94 +case 48: return 93 break; -case 49: return 95 +case 49: return 94 break; -case 50: return 96 +case 50: return 95 break; -case 51: return 97 +case 51: return 96 break; -case 52: return 98 +case 52: return 97 break; -case 53: return 100 +case 53: return 99 break; -case 54: return 101 +case 54: return 100 break; -case 55: return 99 +case 55: return 98 break; -case 56: return 102 +case 56: return 101 break; -case 57: return 103 +case 57: return 102 break; -case 58: return 104 +case 58: return 103 break; -case 59: return 105 +case 59: return 104 break; -case 60: return 106 +case 60: return 105 break; -case 61: return 107 +case 61: return 106 break; -case 62: return 108 +case 62: return 107 break; -case 63: return 109 +case 63: return 108 break; -case 64: return 110 +case 64: return 109 break; case 65: return 121 break; @@ -1391,17 +1363,17 @@ case 70: return 126 break; case 71: return 127 break; -case 72: return 113 +case 72: return 112 break; -case 73: return 111 +case 73: return 110 break; -case 74: return 112 +case 74: return 111 break; -case 75: return 142 +case 75: return 149 break; -case 76: return 143 +case 76: return 150 break; -case 77: return 144 +case 77: return 151 break; case 78: return 31 break; @@ -1415,7 +1387,7 @@ case 82: return 24 break; case 83: return 27 break; -case 84: return 114 +case 84: return 113 break; case 85: yy_.yytext = yy_.yytext.slice(1,-1); return 32; break; @@ -1433,9 +1405,9 @@ case 91: return 56 break; case 92: return 57 break; -case 93: return 140 +case 93: return 147 break; -case 94: return 141 +case 94: return 148 break; case 95: return 35 break; diff --git a/src/zkasm_parser.jison b/src/zkasm_parser.jison index f625279..2418849 100644 --- a/src/zkasm_parser.jison +++ b/src/zkasm_parser.jison @@ -145,6 +145,20 @@ REPEAT { return 'REPEAT' } function setLine(dst, first) { dst.line = first.first_line; } +function negate(value) { + if (typeof value === 'number' | typeof value === 'bigint') { + return -value; + } + if (typeof value === 'string') { + return value.startsWith('-') ? value.substring(1) : '-'+value; + } + throw new Error(`ERROR: couldn't negate value ${value} (${typeof value})`); +} +function applySign(sign, value) { + if (sign === '+') return value; + if (sign === '-') return negate(value); + throw new Error(`ERROR: invalid sign ${sign} with value ${value} (${typeof value})`); +} %} %start allStatments @@ -572,85 +586,31 @@ op $$ = $3; $$.hashPDigest = 1; } - | JMP '(' IDENTIFIER ')' - { - $$ = { [$1]: 1, useJmpAddr: 1, jmpAddr: $3 } - } - | jmpCond '(' IDENTIFIER ')' + | JMP '(' jmpDestination ')' { - $$ = { [$1]: 1, useJmpAddr: 1, jmpAddr: $3, useElseAddr: 1, elseAddr: 'next' } + $$ = { ...$1, useJmpAddrRel: $3.useAddrRel, ...$3.indirections, jmpAddr: $3.addr } } - | jmpCond '(' IDENTIFIER ',' IDENTIFIER ')' + | jmpNotCond '(' jmpDestination ')' { - $$ = { [$1]: 1, useJmpAddr: 1, jmpAddr: $3, useElseAddr: 1, elseAddr: $5 } + $$ = { ...$1, useElseAddrRel: $3.useAddrRel, ...$3.indirections, elseAddr: $3.addr, useJmpAddrRel: 0, jmpAddr: 'next' } } - | jmpNotCond '(' IDENTIFIER ')' + | jmpNotCond '(' jmpDestination ',' jmpDestination ')' { - $$ = { [$1]: 1, useJmpAddr: 1, jmpAddr: 'next', useElseAddr: 1, elseAddr: $3 } + // TODO: validate $3.useAddrRel !== $5.useAddrRel || $3.indirections === $5.indirections + $$ = { ...$1, useElseAddrRel: $3.useAddrRel, ...$3.indirections, elseAddr: $3.addr, useJmpAddrRel: $5.useAddrRel, jmpAddr: $5, ...$5.indirections } } - | jmpNotCond '(' IDENTIFIER ',' IDENTIFIER ')' + | jmpCond '(' jmpDestination ')' { - $$ = { [$1]: 1, useJmpAddr: 1, jmpAddr: $5, useElseAddr: 1, elseAddr: $3 } + $$ = { ...$1, useJmpAddrRel: $3.useAddrRel, ...$3.indirections, jmpAddr: $3.addr, useElseAddrRel: 0, elseAddr: 'next' } } - | JMP '(' RR ')' + | jmpCond '(' jmpDestination ',' jmpDestination')' { - $$ = { [$1]: 1, useJmpAddr: 0, ind: 0, indRR: 1, offset: 0 } + // TODO: validate $3.useAddrRel !== $5.useAddrRel || $3.indirections === $5.indirections + $$ = { ...$1, useJmpAddrRel: $3.useAddrRel, ...$3.indirections, jmpAddr: $3.addr, useElseAddrRel: $5.useAddrRel, elseAddr: $5.addr, ...$5.indirections } } - | JMP '(' E ')' + | CALL '(' jmpDestination ')' { - $$ = { [$1]: 1, useJmpAddr: 0, ind: 1, indRR: 0, offset: 0 } - } - | JMP '(' REFERENCE '+' RR ')' - { - $$ = { [$1]: 1, useJmpAddr: 0, ind: 0, indRR: 1, offset: $3 } - } - | JMP '(' REFERENCE '+' E ')' - { - $$ = { [$1]: 1, useJmpAddr: 0, ind: 1, indRR: 0, offset: $3 } - } - | jmpCond '(' RR ')' - { - $$ = { [$1]: 1, useJmpAddr: 0, ind: 0, indRR: 1, offset: 0, useElseAddr: 1, elseAddr: 'next' } - } - | jmpCond '(' E ')' - { - $$ = { [$1]: 1, useJmpAddr: 0, ind: 1, indRR: 0, offset: 0, useElseAddr: 1, elseAddr: 'next' } - } - | jmpCond '(' REFERENCE '+' RR ')' - { - $$ = { [$1]: 1, useJmpAddr: 0, ind: 0, indRR: 1, offset: $3, useElseAddr: 1, elseAddr: 'next' } - } - | jmpCond '(' REFERENCE '+' E ')' - { - $$ = { [$1]: 1, useJmpAddr: 0, ind: 1, indRR: 0, offset: $3, useElseAddr: 1, elseAddr: 'next' } - } - | jmpCond '(' RR ',' IDENTIFIER ')' - { - $$ = { [$1]: 1, useJmpAddr: 0, ind: 0, indRR: 1, offset: 0, useElseAddr: 1, elseAddr: $5 } - } - | jmpCond '(' E ',' IDENTIFIER ')' - { - $$ = { [$1]: 1, useJmpAddr: 0, ind: 1, indRR: 0, offset: 0, useElseAddr: 1, elseAddr: $5 } - } - | jmpCond '(' REFERENCE '+' RR ',' IDENTIFIER ')' - { - $$ = { [$1]: 1, useJmpAddr: 0, ind: 0, indRR: 1, offset: $3, useElseAddr: 1, elseAddr: $7 } - } - | jmpCond '(' REFERENCE '+' E ',' IDENTIFIER')' - { - $$ = { [$1]: 1, useJmpAddr: 0, ind: 1, indRR: 0, offset: $3, useElseAddr: 1, elseAddr: $7 } - } - | CALL '(' IDENTIFIER ')' - { - $$ = {JMP: 0, JMPC: 0, JMPN: 0, useJmpAddr:1, jmpAddr: $3, call: 1} - } - | CALL '(' REFERENCE '+' RR ')' - { - $$ = {JMP: 0, JMPC: 0, JMPN: 0, offset: $3, ind: 0, indRR: 1, return: 0, call: 1} - } - | CALL '(' REFERENCE '+' E ')' - { - $$ = {JMP: 0, JMPC: 0, JMPN: 0, offset: $3, ind: 1, indRR: 0, return: 0, call: 1} + $$ = {JMP: 0, JMPC: 0, JMPN: 0, useJmpAddrRel: $3.useAddrRel, jmpAddr: $3.addr, ...$3.indirections, call: 1 } } | RETURN { @@ -746,6 +706,21 @@ op } ; +jmpDestination + : IDENTIFIER + { + $$ = { useAddrRel: 0, jmpAddr: $3 } + } + | REFERENCE '+' addrRel + { + $$ = { useAddrRel: $1, ind: 0, indRR: 1, addr: $3 } + } + | REFERENCE '-' addrRel + { + $$ = { useAddrRel: 1, ind: 0, indRR: 1, addr: $3 } + } + ; + jmpCond : JMPN | JMPC @@ -787,6 +762,84 @@ reg | RCX ; +indRegMul + : NUMBER + { + $$ = $1 + } + | CONSTID + { + $$ = $1 + } + ; + +indReg + : E + { + $$ = { reg: 'ind' } + } + | RR + { + $$ = { reg: 'indRR' } + } + ; + +indReg2 + : indReg + { + $$ = { ...$1, indReg: 1 } + } + | NUMBER '*' indReg + { + $$ = { ...$3, indReg: $1 } + } + | CONSTID '*' indReg + { + $$ = { ...$3, indReg: $1 } + } + ; + +addrRelOp + : '+' + { + $$ = $1 + } + | '-' + { + $$ = $1 + } + ; + +addrOffset + : NUMBER + { + $$ = $1 + } + | CONSTID + { + $$ = $1 + } + ; + +addrRel + : indReg2 + { + $$ = { [$1.reg]: $1.indReg } + } + | indReg2 addrRelOp addrOffset + { + $$ = { [$1.reg]: $1.indReg, extraOffset: applySign($2, $3)}; + } + | indReg2 addrRelOp indReg2 addrRelOp addrOffset + { + $$ = { [$1.reg]: $1.indReg, [$3.reg] = applySign($2, $3.indReg), extraOffset: applySign($4, $5) } + checkAddrRel($$); + } + | indReg2 addrRelOp indReg2 + { + $$ = { [$1.reg]: $1.indReg, [$3.reg] = applySign($2, $3.indReg) } + } + ; addr : SP @@ -809,71 +862,35 @@ addr { $$ = { isStack: 1, isMem:0, ind:0, indRR: 0, incStack: -1, offset: 0, useCTX: 1} } - | SYS ':' E '+' NUMBER + | SYS ':' addrRel { $$ = { isStack: 0, isMem:0, ind:1, indRR: 0, incStack: 0, offset: $5} } - | SYS ':' E '-' NUMBER - { - $$ = { isStack: 0, isMem:0, ind:1, indRR: 0, incStack: 0, offset: -$5} - } - | SYS ':' E - { - $$ = { isStack: 0, isMem:0, ind:1, indRR: 0, incStack: 0, offset: 0} - } - | MEM ':' E '+' NUMBER + | MEM ':' addrRel { $$ = { isStack: 0, isMem: 1, ind:1, indRR: 0, incStack: 0, offset: $5, useCTX: 1} } - | MEM ':' E '-' NUMBER - { - $$ = { isStack: 0, isMem: 1, ind:1, indRR: 0, incStack: 0, offset: -$5, useCTX: 1} - } - | MEM ':' E - { - $$ = { isStack: 0, isMem: 1, ind:1, indRR: 0, incStack: 0, offset: 0, useCTX: 1} - } - | STACK ':' E '+' NUMBER + | STACK ':' addrRel { $$ = { isStack: 1, ind:1, indRR: 0, incStack: 0, offset: $5, useCTX: 1} } - | STACK ':' E '-' NUMBER + | addrRel { - $$ = { isStack: 1, ind:1, indRR: 0, incStack: 0, offset: -$5, useCTX: 1} - } - | STACK ':' E - { - $$ = { isStack: 1, ind:1, indRR: 0, incStack: 0, offset: 0, useCTX: 1} + $$ = $1 } | IDENTIFIER { $$ = { offset: $1 } } - | IDENTIFIER '+' RR - { - $$ = { offset: $1, ind: 0, indRR: 1 } - } - | IDENTIFIER '+' E - { - $$ = { offset: $1, ind: 1, indRR: 0 } - } - | IDENTIFIER '[' E ']' - { - $$ = { offset: $1, ind: 1, indRR: 0 } - } - | IDENTIFIER '[' E '-' NUMBER ']' + | IDENTIFIER '+' addrRel { - $$ = { offset: $1, extraOffset: -$5, ind: 1, indRR: 0 } + $$ = { ...$3, offset: $1 } } - | IDENTIFIER '[' E '+' NUMBER ']' + | IDENTIFIER '[' addrRel ']' { - $$ = { offset: $1, extraOffset: $5, ind: 1, indRR: 0 } - } - | IDENTIFIER '+' NUMBER - { - $$ = { offset: $1, extraOffset: $3 } + $$ = { ...$3, offset: $1 } } - | IDENTIFIER '[' NUMBER ']' + | IDENTIFIER '+' addrOffset { $$ = { offset: $1, extraOffset: $3 } } @@ -882,11 +899,11 @@ addr hashId : NUMBER { - $$ = {ind: 0, indRR: 0, offset:$1} + $$ = { ind: 0, indRR: 0, offset:$1 } } | E { - $$ = {ind: 1, indRR: 0, offset:0} + $$ = { ind: 1, indRR: 0, offset:0 } } | RR { From 37c0e9559d079eaa3f60fa983cd5e24fab1401a4 Mon Sep 17 00:00:00 2001 From: zkronos73 Date: Thu, 25 Jan 2024 12:23:04 +0100 Subject: [PATCH 2/7] WIP - update parser.js --- build/zkasm_parser.js | 77 ++++++++++++++++++++---------------------- src/zkasm_parser.jison | 4 +-- 2 files changed, 38 insertions(+), 43 deletions(-) diff --git a/build/zkasm_parser.js b/build/zkasm_parser.js index 1758e37..c425cd1 100644 --- a/build/zkasm_parser.js +++ b/build/zkasm_parser.js @@ -72,12 +72,12 @@ } */ var zkasm_parser = (function(){ -var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,10],$V1=[1,12],$V2=[1,13],$V3=[1,14],$V4=[1,27],$V5=[1,29],$V6=[1,15],$V7=[1,16],$V8=[1,18],$V9=[1,37],$Va=[1,17],$Vb=[1,28],$Vc=[1,20],$Vd=[1,23],$Ve=[1,24],$Vf=[1,30],$Vg=[1,41],$Vh=[1,35],$Vi=[1,46],$Vj=[1,47],$Vk=[1,48],$Vl=[1,49],$Vm=[1,50],$Vn=[1,51],$Vo=[1,52],$Vp=[1,53],$Vq=[1,31],$Vr=[1,32],$Vs=[1,33],$Vt=[1,34],$Vu=[1,36],$Vv=[1,38],$Vw=[1,39],$Vx=[1,40],$Vy=[1,42],$Vz=[1,43],$VA=[1,44],$VB=[1,45],$VC=[5,13,15,17,18,21,23,24,27,28,30,31,33,36,63,64,67,89,90,115,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139],$VD=[1,60],$VE=[1,61],$VF=[1,62],$VG=[1,63],$VH=[1,64],$VI=[1,65],$VJ=[1,66],$VK=[1,67],$VL=[1,68],$VM=[1,69],$VN=[1,70],$VO=[1,71],$VP=[1,72],$VQ=[1,73],$VR=[1,74],$VS=[1,77],$VT=[1,78],$VU=[1,79],$VV=[1,80],$VW=[1,81],$VX=[1,82],$VY=[1,83],$VZ=[1,84],$V_=[1,85],$V$=[1,86],$V01=[1,87],$V11=[1,88],$V21=[1,89],$V31=[1,90],$V41=[1,91],$V51=[1,92],$V61=[1,93],$V71=[1,94],$V81=[1,95],$V91=[1,96],$Va1=[1,97],$Vb1=[1,98],$Vc1=[1,99],$Vd1=[1,100],$Ve1=[1,101],$Vf1=[1,102],$Vg1=[1,103],$Vh1=[1,104],$Vi1=[1,105],$Vj1=[13,15],$Vk1=[13,15,35,36,59],$Vl1=[1,117],$Vm1=[13,15,35,36,37,59],$Vn1=[13,15,35,36,37,59,68],$Vo1=[1,122],$Vp1=[13,68],$Vq1=[1,159],$Vr1=[1,155],$Vs1=[1,156],$Vt1=[1,157],$Vu1=[1,158],$Vv1=[1,162],$Vw1=[1,164],$Vx1=[1,163],$Vy1=[1,190],$Vz1=[1,192],$VA1=[1,191],$VB1=[1,193],$VC1=[1,194],$VD1=[1,195],$VE1=[13,15,68],$VF1=[5,13,15,17,18,21,23,24,27,28,30,31,33,63,64,67,89,90,115,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139],$VG1=[1,241],$VH1=[1,242],$VI1=[1,243],$VJ1=[1,244],$VK1=[1,245],$VL1=[1,246],$VM1=[1,247],$VN1=[1,248],$VO1=[1,249],$VP1=[1,250],$VQ1=[1,251],$VR1=[1,252],$VS1=[1,253],$VT1=[1,254],$VU1=[1,255],$VV1=[1,256],$VW1=[1,257],$VX1=[1,258],$VY1=[1,259],$VZ1=[1,260],$V_1=[5,13,15,17,18,21,23,24,27,28,30,31,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,55,57,63,64,67,89,90,115,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139],$V$1=[5,13,15,17,18,21,23,24,27,28,30,31,33,35,36,41,42,43,44,45,46,47,48,49,50,51,52,53,55,57,63,64,67,89,90,115,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139],$V02=[5,13,15,17,18,21,23,24,27,28,30,31,33,41,42,43,44,45,46,47,48,49,50,51,52,53,55,57,63,64,67,89,90,115,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139],$V12=[5,13,15,17,18,21,23,24,27,28,30,31,33,43,44,45,46,47,48,49,50,51,52,53,55,57,63,64,67,89,90,115,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139],$V22=[5,13,15,17,18,21,23,24,27,28,30,31,33,43,44,45,50,51,52,53,55,57,63,64,67,89,90,115,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139]; +var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,10],$V1=[1,12],$V2=[1,13],$V3=[1,14],$V4=[1,27],$V5=[1,29],$V6=[1,15],$V7=[1,16],$V8=[1,18],$V9=[1,37],$Va=[1,17],$Vb=[1,28],$Vc=[1,20],$Vd=[1,23],$Ve=[1,24],$Vf=[1,30],$Vg=[1,46],$Vh=[1,47],$Vi=[1,48],$Vj=[1,49],$Vk=[1,50],$Vl=[1,51],$Vm=[1,52],$Vn=[1,53],$Vo=[1,31],$Vp=[1,32],$Vq=[1,33],$Vr=[1,34],$Vs=[1,35],$Vt=[1,36],$Vu=[1,38],$Vv=[1,39],$Vw=[1,40],$Vx=[1,41],$Vy=[1,42],$Vz=[1,43],$VA=[1,44],$VB=[1,45],$VC=[5,13,15,17,18,21,23,24,27,28,30,31,33,36,63,64,67,114,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141],$VD=[1,60],$VE=[1,61],$VF=[1,62],$VG=[1,63],$VH=[1,64],$VI=[1,65],$VJ=[1,66],$VK=[1,67],$VL=[1,68],$VM=[1,69],$VN=[1,70],$VO=[1,71],$VP=[1,72],$VQ=[1,73],$VR=[1,74],$VS=[1,77],$VT=[1,78],$VU=[1,79],$VV=[1,80],$VW=[1,81],$VX=[1,82],$VY=[1,83],$VZ=[1,84],$V_=[1,85],$V$=[1,86],$V01=[1,87],$V11=[1,88],$V21=[1,89],$V31=[1,90],$V41=[1,91],$V51=[1,92],$V61=[1,93],$V71=[1,94],$V81=[1,95],$V91=[1,96],$Va1=[1,97],$Vb1=[1,98],$Vc1=[1,99],$Vd1=[1,100],$Ve1=[1,103],$Vf1=[1,104],$Vg1=[1,105],$Vh1=[1,101],$Vi1=[1,102],$Vj1=[13,15],$Vk1=[13,15,35,36,59],$Vl1=[1,117],$Vm1=[13,15,35,36,37,59],$Vn1=[13,15,35,36,37,59,68],$Vo1=[1,122],$Vp1=[13,68],$Vq1=[1,160],$Vr1=[1,163],$Vs1=[1,164],$Vt1=[1,165],$Vu1=[1,155],$Vv1=[1,166],$Vw1=[1,156],$Vx1=[1,157],$Vy1=[1,158],$Vz1=[1,169],$VA1=[1,170],$VB1=[1,171],$VC1=[1,184],$VD1=[1,185],$VE1=[1,192],$VF1=[1,194],$VG1=[1,193],$VH1=[1,195],$VI1=[1,196],$VJ1=[1,197],$VK1=[13,15,68],$VL1=[22,57,68],$VM1=[1,211],$VN1=[1,212],$VO1=[22,35,36,57,68],$VP1=[1,213],$VQ1=[1,214],$VR1=[57,68],$VS1=[5,13,15,17,18,21,23,24,27,28,30,31,33,63,64,67,114,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141],$VT1=[1,241],$VU1=[1,242],$VV1=[1,243],$VW1=[1,244],$VX1=[1,245],$VY1=[1,246],$VZ1=[1,247],$V_1=[1,248],$V$1=[1,249],$V02=[1,250],$V12=[1,251],$V22=[1,252],$V32=[1,253],$V42=[1,254],$V52=[1,255],$V62=[1,256],$V72=[1,257],$V82=[1,258],$V92=[1,259],$Va2=[1,260],$Vb2=[5,13,15,17,18,21,23,24,27,28,30,31,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,55,57,63,64,67,114,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141],$Vc2=[1,273],$Vd2=[1,274],$Ve2=[21,23,132,137],$Vf2=[5,13,15,17,18,21,23,24,27,28,30,31,33,35,36,41,42,43,44,45,46,47,48,49,50,51,52,53,55,57,63,64,67,114,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141],$Vg2=[2,156],$Vh2=[2,157],$Vi2=[5,13,15,17,18,21,23,24,27,28,30,31,33,41,42,43,44,45,46,47,48,49,50,51,52,53,55,57,63,64,67,114,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141],$Vj2=[5,13,15,17,18,21,23,24,27,28,30,31,33,43,44,45,46,47,48,49,50,51,52,53,55,57,63,64,67,114,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141],$Vk2=[5,13,15,17,18,21,23,24,27,28,30,31,33,43,44,45,50,51,52,53,55,57,63,64,67,114,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141]; var parser = {trace: function trace () { }, yy: {}, -symbols_: {"error":2,"allStatments":3,"statmentList":4,"EOF":5,"statment":6,"step":7,"label":8,"varDef":9,"constDef":10,"include":11,"command":12,"LF":13,"assignment":14,":":15,"opList":16,"IDENTIFIER":17,"VAR":18,"scope":19,"[":20,"NUMBER":21,"]":22,"CONSTID":23,"CONST":24,"=":25,"nexpr":26,"CONSTL":27,"COMMAND":28,"GLOBAL":29,"CTX":30,"INCLUDE":31,"STRING":32,"NUMBERL":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,"inRegsSum":58,"=>":59,"regsList":60,"inRegP":61,"inReg":62,"TAG":63,"TAG_0":64,"reg":65,"counter":66,"REFERENCE":67,",":68,"op":69,"MLOAD":70,"addr":71,"MSTORE":72,"HASHK":73,"hashId":74,"HASHK1":75,"HASHKLEN":76,"HASHKDIGEST":77,"HASHS":78,"HASHS1":79,"HASHSLEN":80,"HASHSDIGEST":81,"HASHP":82,"HASHP1":83,"HASHPLEN":84,"HASHPDIGEST":85,"JMP":86,"jmpCond":87,"jmpNotCond":88,"RR":89,"E":90,"CALL":91,"RETURN":92,"ASSERT":93,"SLOAD":94,"SSTORE":95,"ARITH":96,"ARITH_ECADD_DIFFERENT":97,"ARITH_ECADD_SAME":98,"ARITH_BN254_MULFP2":99,"ARITH_BN254_ADDFP2":100,"ARITH_BN254_SUBFP2":101,"ADD":102,"SUB":103,"LT":104,"SLT":105,"EQ":106,"AND":107,"OR":108,"XOR":109,"LT4":110,"MEM_ALIGN_RD":111,"MEM_ALIGN_WR":112,"MEM_ALIGN_WR8":113,"REPEAT":114,"RCX":115,"JMPN":116,"JMPC":117,"JMPZ":118,"JMPNC":119,"JMPNZ":120,"CNT_ARITH":121,"CNT_BINARY":122,"CNT_KECCAK_F":123,"CNT_SHA256_F":124,"CNT_MEM_ALIGN":125,"CNT_PADDING_PG":126,"CNT_POSEIDON_G":127,"A":128,"B":129,"C":130,"D":131,"SR":132,"SP":133,"PC":134,"GAS":135,"zkPC":136,"STEP":137,"HASHPOS":138,"ROTL_C":139,"++":140,"--":141,"SYS":142,"MEM":143,"STACK":144,"$accept":0,"$end":1}, -terminals_: {2:"error",5:"EOF",13:"LF",15:":",17:"IDENTIFIER",18:"VAR",20:"[",21:"NUMBER",22:"]",23:"CONSTID",24:"CONST",25:"=",27:"CONSTL",28:"COMMAND",29:"GLOBAL",30:"CTX",31:"INCLUDE",32:"STRING",33:"NUMBERL",34:"??",35:"+",36:"-",37:"*",38:"**",39:"%",40:"/",41:"<<",42:">>",43:"|",44:"&",45:"^",46:"<",47:">",48:"<=",49:">=",50:"==",51:"!=",52:"&&",53:"||",54:"!",55:"?",56:"(",57:")",59:"=>",63:"TAG",64:"TAG_0",67:"REFERENCE",68:",",70:"MLOAD",72:"MSTORE",73:"HASHK",75:"HASHK1",76:"HASHKLEN",77:"HASHKDIGEST",78:"HASHS",79:"HASHS1",80:"HASHSLEN",81:"HASHSDIGEST",82:"HASHP",83:"HASHP1",84:"HASHPLEN",85:"HASHPDIGEST",86:"JMP",89:"RR",90:"E",91:"CALL",92:"RETURN",93:"ASSERT",94:"SLOAD",95:"SSTORE",96:"ARITH",97:"ARITH_ECADD_DIFFERENT",98:"ARITH_ECADD_SAME",99:"ARITH_BN254_MULFP2",100:"ARITH_BN254_ADDFP2",101:"ARITH_BN254_SUBFP2",102:"ADD",103:"SUB",104:"LT",105:"SLT",106:"EQ",107:"AND",108:"OR",109:"XOR",110:"LT4",111:"MEM_ALIGN_RD",112:"MEM_ALIGN_WR",113:"MEM_ALIGN_WR8",114:"REPEAT",115:"RCX",116:"JMPN",117:"JMPC",118:"JMPZ",119:"JMPNC",120:"JMPNZ",121:"CNT_ARITH",122:"CNT_BINARY",123:"CNT_KECCAK_F",124:"CNT_SHA256_F",125:"CNT_MEM_ALIGN",126:"CNT_PADDING_PG",127:"CNT_POSEIDON_G",128:"A",129:"B",130:"C",131:"D",132:"SR",133:"SP",134:"PC",135:"GAS",136:"zkPC",137:"STEP",138:"HASHPOS",139:"ROTL_C",140:"++",141:"--",142:"SYS",143:"MEM",144:"STACK"}, -productions_: [0,[3,2],[4,2],[4,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[7,4],[7,2],[7,3],[8,2],[9,3],[9,6],[9,6],[10,4],[10,4],[12,1],[19,1],[19,1],[11,2],[26,1],[26,1],[26,1],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,2],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,2],[26,5],[26,3],[14,3],[14,1],[58,3],[58,3],[58,2],[58,1],[61,3],[61,1],[62,1],[62,1],[62,1],[62,1],[62,3],[62,3],[62,1],[62,1],[62,1],[62,1],[60,3],[60,1],[16,3],[16,1],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,6],[69,4],[69,6],[69,4],[69,4],[69,6],[69,6],[69,4],[69,4],[69,6],[69,6],[69,6],[69,6],[69,8],[69,8],[69,4],[69,6],[69,6],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,4],[87,1],[87,1],[87,1],[88,1],[88,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[71,1],[71,3],[71,3],[71,2],[71,2],[71,5],[71,5],[71,3],[71,5],[71,5],[71,3],[71,5],[71,5],[71,3],[71,1],[71,3],[71,3],[71,4],[71,6],[71,6],[71,3],[71,4],[74,1],[74,1],[74,1],[74,3],[74,3]], +symbols_: {"error":2,"allStatments":3,"statmentList":4,"EOF":5,"statment":6,"step":7,"label":8,"varDef":9,"constDef":10,"include":11,"command":12,"LF":13,"assignment":14,":":15,"opList":16,"IDENTIFIER":17,"VAR":18,"scope":19,"[":20,"NUMBER":21,"]":22,"CONSTID":23,"CONST":24,"=":25,"nexpr":26,"CONSTL":27,"COMMAND":28,"GLOBAL":29,"CTX":30,"INCLUDE":31,"STRING":32,"NUMBERL":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,"inRegsSum":58,"=>":59,"regsList":60,"inRegP":61,"inReg":62,"TAG":63,"TAG_0":64,"reg":65,"counter":66,"REFERENCE":67,",":68,"op":69,"MLOAD":70,"addr":71,"MSTORE":72,"HASHK":73,"hashId":74,"HASHK1":75,"HASHKLEN":76,"HASHKDIGEST":77,"HASHS":78,"HASHS1":79,"HASHSLEN":80,"HASHSDIGEST":81,"HASHP":82,"HASHP1":83,"HASHPLEN":84,"HASHPDIGEST":85,"JMP":86,"jmpDestination":87,"jmpNotCond":88,"jmpCond":89,"CALL":90,"RETURN":91,"ASSERT":92,"SLOAD":93,"SSTORE":94,"ARITH":95,"ARITH_ECADD_DIFFERENT":96,"ARITH_ECADD_SAME":97,"ARITH_BN254_MULFP2":98,"ARITH_BN254_ADDFP2":99,"ARITH_BN254_SUBFP2":100,"ADD":101,"SUB":102,"LT":103,"SLT":104,"EQ":105,"AND":106,"OR":107,"XOR":108,"LT4":109,"MEM_ALIGN_RD":110,"MEM_ALIGN_WR":111,"MEM_ALIGN_WR8":112,"REPEAT":113,"RCX":114,"addrRel":115,"JMPN":116,"JMPC":117,"JMPZ":118,"JMPNC":119,"JMPNZ":120,"CNT_ARITH":121,"CNT_BINARY":122,"CNT_KECCAK_F":123,"CNT_SHA256_F":124,"CNT_MEM_ALIGN":125,"CNT_PADDING_PG":126,"CNT_POSEIDON_G":127,"A":128,"B":129,"C":130,"D":131,"E":132,"SR":133,"SP":134,"PC":135,"GAS":136,"RR":137,"zkPC":138,"STEP":139,"HASHPOS":140,"ROTL_C":141,"indRegMul":142,"indReg":143,"indReg2":144,"addrRelOp":145,"addrOffset":146,"++":147,"--":148,"SYS":149,"MEM":150,"STACK":151,"$accept":0,"$end":1}, +terminals_: {2:"error",5:"EOF",13:"LF",15:":",17:"IDENTIFIER",18:"VAR",20:"[",21:"NUMBER",22:"]",23:"CONSTID",24:"CONST",25:"=",27:"CONSTL",28:"COMMAND",29:"GLOBAL",30:"CTX",31:"INCLUDE",32:"STRING",33:"NUMBERL",34:"??",35:"+",36:"-",37:"*",38:"**",39:"%",40:"/",41:"<<",42:">>",43:"|",44:"&",45:"^",46:"<",47:">",48:"<=",49:">=",50:"==",51:"!=",52:"&&",53:"||",54:"!",55:"?",56:"(",57:")",59:"=>",63:"TAG",64:"TAG_0",67:"REFERENCE",68:",",70:"MLOAD",72:"MSTORE",73:"HASHK",75:"HASHK1",76:"HASHKLEN",77:"HASHKDIGEST",78:"HASHS",79:"HASHS1",80:"HASHSLEN",81:"HASHSDIGEST",82:"HASHP",83:"HASHP1",84:"HASHPLEN",85:"HASHPDIGEST",86:"JMP",90:"CALL",91:"RETURN",92:"ASSERT",93:"SLOAD",94:"SSTORE",95:"ARITH",96:"ARITH_ECADD_DIFFERENT",97:"ARITH_ECADD_SAME",98:"ARITH_BN254_MULFP2",99:"ARITH_BN254_ADDFP2",100:"ARITH_BN254_SUBFP2",101:"ADD",102:"SUB",103:"LT",104:"SLT",105:"EQ",106:"AND",107:"OR",108:"XOR",109:"LT4",110:"MEM_ALIGN_RD",111:"MEM_ALIGN_WR",112:"MEM_ALIGN_WR8",113:"REPEAT",114:"RCX",116:"JMPN",117:"JMPC",118:"JMPZ",119:"JMPNC",120:"JMPNZ",121:"CNT_ARITH",122:"CNT_BINARY",123:"CNT_KECCAK_F",124:"CNT_SHA256_F",125:"CNT_MEM_ALIGN",126:"CNT_PADDING_PG",127:"CNT_POSEIDON_G",128:"A",129:"B",130:"C",131:"D",132:"E",133:"SR",134:"SP",135:"PC",136:"GAS",137:"RR",138:"zkPC",139:"STEP",140:"HASHPOS",141:"ROTL_C",147:"++",148:"--",149:"SYS",150:"MEM",151:"STACK"}, +productions_: [0,[3,2],[4,2],[4,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[7,4],[7,2],[7,3],[8,2],[9,3],[9,6],[9,6],[10,4],[10,4],[12,1],[19,1],[19,1],[11,2],[26,1],[26,1],[26,1],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,2],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,2],[26,5],[26,3],[14,3],[14,1],[58,3],[58,3],[58,2],[58,1],[61,3],[61,1],[62,1],[62,1],[62,1],[62,1],[62,3],[62,3],[62,1],[62,1],[62,1],[62,1],[60,3],[60,1],[16,3],[16,1],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,6],[69,4],[69,6],[69,4],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,4],[87,1],[87,3],[87,3],[89,1],[89,1],[89,1],[88,1],[88,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[142,1],[142,1],[143,1],[143,1],[144,1],[144,3],[144,3],[145,1],[145,1],[146,1],[146,1],[115,1],[115,3],[115,5],[115,3],[71,1],[71,3],[71,3],[71,2],[71,2],[71,3],[71,3],[71,3],[71,1],[71,1],[71,3],[71,4],[71,3],[74,1],[74,1],[74,1],[74,3],[74,3]], performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) { /* this == yyval */ @@ -231,7 +231,7 @@ case 55: this.$ = {type: 'neg', values: [$$[$0]]} break; -case 56: case 58: case 172: +case 56: case 58: case 170: this.$ = $$[$0] @@ -537,10 +537,15 @@ case 115: break; case 116: - this.$ = { useAddrRel: 0, ind: 0, indRR: 1, addr: $$[$02] } + this.$ = { useAddrRel: 0, jmpAddr: $$[$02] } break; -case 117: case 118: +case 117: + + this.$ = { useAddrRel: $$[$0-2], ind: 0, indRR: 1, addr: $$[$0] } + +break; +case 118: this.$ = { useAddrRel: 1, ind: 0, indRR: 1, addr: $$[$0] } @@ -608,125 +613,115 @@ case 157: break; case 158: - - this.$ = $$[$0-2] - -break; -case 159: - - this.$ = $$[$0-2] - -break; -case 160: this.$ = { [$$[$0].reg]: $$[$0].indReg } break; -case 161: +case 159: this.$ = { [$$[$0-2].reg]: $$[$0-2].indReg, extraOffset: applySign($$[$0-1], $$[$0])}; break; -case 162: +case 160: - this.$ = { [$$[$0-4].reg]: $$[$0-4].indReg, [$$[$0-2].reg] = applySign($$[$0-3], $$[$0-2].indReg), extraOffset: applySign($$[$0-1], $$[$0]) } + this.$ = { [$$[$0-4].reg]: $$[$0-4].indReg, [$$[$0-2].reg]: applySign($$[$0-3], $$[$0-2].indReg), extraOffset: applySign($$[$0-1], $$[$0]) } checkAddrRel(this.$); break; -case 163: +case 161: - this.$ = { [$$[$0-2].reg]: $$[$0-2].indReg, [$$[$0].reg] = applySign($$[$0-1], $$[$0].indReg) } + this.$ = { [$$[$0-2].reg]: $$[$0-2].indReg, [$$[$0].reg]: applySign($$[$0-1], $$[$0].indReg) } break; -case 164: +case 162: this.$ = { isStack: 1, isMem:0, ind:0, indRR: 0, incStack:0, offset: 0, useCTX: 1} break; -case 165: +case 163: this.$ = { isStack: 1, isMem:0, ind:0, indRR: 0, incStack: 0, offset: $$[$0], useCTX: 1} break; -case 166: +case 164: this.$ = { isStack: 1, isMem:0, ind:0, indRR: 0, incStack: 0, offset: -$$[$0], useCTX: 1} break; -case 167: +case 165: this.$ = { isStack: 1, isMem:0, ind:0, indRR: 0, incStack: 1, offset: 0, useCTX: 1} break; -case 168: +case 166: this.$ = { isStack: 1, isMem:0, ind:0, indRR: 0, incStack: -1, offset: 0, useCTX: 1} break; -case 169: +case 167: this.$ = { isStack: 0, isMem:0, ind:1, indRR: 0, incStack: 0, offset: $$[$02]} break; -case 170: +case 168: this.$ = { isStack: 0, isMem: 1, ind:1, indRR: 0, incStack: 0, offset: $$[$02], useCTX: 1} break; -case 171: +case 169: this.$ = { isStack: 1, ind:1, indRR: 0, incStack: 0, offset: $$[$02], useCTX: 1} break; -case 173: +case 171: this.$ = { offset: $$[$0] } break; -case 174: +case 172: this.$ = { ...$$[$0], offset: $$[$0-2] } break; -case 175: +case 173: this.$ = { ...$$[$0-1], offset: $$[$0-3] } break; -case 176: case 177: +case 174: this.$ = { offset: $$[$0-2], extraOffset: $$[$0] } break; -case 178: +case 175: this.$ = { ind: 0, indRR: 0, offset:$$[$0] } break; -case 179: +case 176: this.$ = { ind: 1, indRR: 0, offset:0 } break; -case 182: +case 177: this.$ = {ind: 0, indRR: 1, offset:0} break; -case 183: +case 178: this.$ = {ind: 1, indRR: 0, offset:$$[$0]} break; -case 184: +case 179: this.$ = {ind: 0, indRR: 1, offset:$$[$0]} break; } }, -table: [{3:1,4:2,6:3,7:4,8:5,9:6,10:7,11:8,12:9,13:$V0,14:11,15:$V1,17:$V2,18:$V3,21:$V4,23:$V5,24:$V6,27:$V7,28:$V8,30:$V9,31:$Va,33:$Vb,36:$Vc,58:19,61:21,62:22,63:$Vd,64:$Ve,65:25,66:26,67:$Vf,89:$Vg,90:$Vh,115:$Vi,121:$Vj,122:$Vk,123:$Vl,124:$Vm,125:$Vn,126:$Vo,127:$Vp,128:$Vq,129:$Vr,130:$Vs,131:$Vt,132:$Vu,133:$Vv,134:$Vw,135:$Vx,136:$Vy,137:$Vz,138:$VA,139:$VB},{1:[3]},{5:[1,54],6:55,7:4,8:5,9:6,10:7,11:8,12:9,13:$V0,14:11,15:$V1,17:$V2,18:$V3,21:$V4,23:$V5,24:$V6,27:$V7,28:$V8,30:$V9,31:$Va,33:$Vb,36:$Vc,58:19,61:21,62:22,63:$Vd,64:$Ve,65:25,66:26,67:$Vf,89:$Vg,90:$Vh,115:$Vi,121:$Vj,122:$Vk,123:$Vl,124:$Vm,125:$Vn,126:$Vo,127:$Vp,128:$Vq,129:$Vr,130:$Vs,131:$Vt,132:$Vu,133:$Vv,134:$Vw,135:$Vx,136:$Vy,137:$Vz,138:$VA,139:$VB},o($VC,[2,3]),o($VC,[2,4]),o($VC,[2,5]),o($VC,[2,6]),o($VC,[2,7]),o($VC,[2,8]),o($VC,[2,9]),o($VC,[2,10]),{13:[1,57],15:[1,56]},{16:58,69:59,70:$VD,72:$VE,73:$VF,75:$VG,76:$VH,77:$VI,78:$VJ,79:$VK,80:$VL,81:$VM,82:$VN,83:$VO,84:$VP,85:$VQ,86:$VR,87:75,88:76,91:$VS,92:$VT,93:$VU,94:$VV,95:$VW,96:$VX,97:$VY,98:$VZ,99:$V_,100:$V$,101:$V01,102:$V11,103:$V21,104:$V31,105:$V41,106:$V51,107:$V61,108:$V71,109:$V81,110:$V91,111:$Va1,112:$Vb1,113:$Vc1,114:$Vd1,116:$Ve1,117:$Vf1,118:$Vg1,119:$Vh1,120:$Vi1},{15:[1,106]},{19:107,29:[1,108],30:[1,109]},{23:[1,110]},{23:[1,111]},{32:[1,112]},o($VC,[2,20]),o($Vj1,[2,52],{35:[1,114],36:[1,115],59:[1,113]}),{21:$V4,23:$V5,30:$V9,33:$Vb,61:116,62:22,63:$Vd,64:$Ve,65:25,66:26,67:$Vf,89:$Vg,90:$Vh,115:$Vi,121:$Vj,122:$Vk,123:$Vl,124:$Vm,125:$Vn,126:$Vo,127:$Vp,128:$Vq,129:$Vr,130:$Vs,131:$Vt,132:$Vu,133:$Vv,134:$Vw,135:$Vx,136:$Vy,137:$Vz,138:$VA,139:$VB},o($Vk1,[2,56],{37:$Vl1}),o($Vm1,[2,58]),o($Vm1,[2,59]),o($Vm1,[2,60]),o($Vm1,[2,61]),o($Vm1,[2,62]),o($Vm1,[2,65],{38:[1,118]}),o($Vm1,[2,66],{38:[1,119]}),o($Vm1,[2,67]),o($Vm1,[2,68]),o($Vn1,[2,142]),o($Vn1,[2,143]),o($Vn1,[2,144]),o($Vn1,[2,145]),o($Vn1,[2,146]),o($Vn1,[2,147]),o($Vn1,[2,148]),o($Vn1,[2,149]),o($Vn1,[2,150]),o($Vn1,[2,151]),o($Vn1,[2,152]),o($Vn1,[2,153]),o($Vn1,[2,154]),o($Vn1,[2,155]),o($Vn1,[2,156]),o($Vn1,[2,157]),o($Vm1,[2,135]),o($Vm1,[2,136]),o($Vm1,[2,137]),o($Vm1,[2,138]),o($Vm1,[2,139]),o($Vm1,[2,140]),o($Vm1,[2,141]),{1:[2,1]},o($VC,[2,2]),{16:120,69:59,70:$VD,72:$VE,73:$VF,75:$VG,76:$VH,77:$VI,78:$VJ,79:$VK,80:$VL,81:$VM,82:$VN,83:$VO,84:$VP,85:$VQ,86:$VR,87:75,88:76,91:$VS,92:$VT,93:$VU,94:$VV,95:$VW,96:$VX,97:$VY,98:$VZ,99:$V_,100:$V$,101:$V01,102:$V11,103:$V21,104:$V31,105:$V41,106:$V51,107:$V61,108:$V71,109:$V81,110:$V91,111:$Va1,112:$Vb1,113:$Vc1,114:$Vd1,116:$Ve1,117:$Vf1,118:$Vg1,119:$Vh1,120:$Vi1},o($VC,[2,12]),{13:[1,121],68:$Vo1},o($Vp1,[2,72]),{56:[1,123]},{56:[1,124]},{56:[1,125]},{56:[1,126]},{56:[1,127]},{56:[1,128]},{56:[1,129]},{56:[1,130]},{56:[1,131]},{56:[1,132]},{56:[1,133]},{56:[1,134]},{56:[1,135]},{56:[1,136]},{56:[1,137]},{56:[1,138]},{56:[1,139]},{56:[1,140]},o($Vp1,[2,107]),o($Vp1,[2,108]),o($Vp1,[2,109]),o($Vp1,[2,110]),o($Vp1,[2,111]),o($Vp1,[2,112]),o($Vp1,[2,113]),o($Vp1,[2,114]),o($Vp1,[2,115]),o($Vp1,[2,116]),o($Vp1,[2,117]),o($Vp1,[2,118]),o($Vp1,[2,119]),o($Vp1,[2,120]),o($Vp1,[2,121]),o($Vp1,[2,122]),o($Vp1,[2,123]),o($Vp1,[2,124]),o($Vp1,[2,125]),o($Vp1,[2,126]),o($Vp1,[2,127]),o($Vp1,[2,128]),{56:[1,141]},{56:[2,130]},{56:[2,131]},{56:[2,132]},{56:[2,133]},{56:[2,134]},o($VC,[2,14]),{17:[1,142]},{17:[2,21]},{17:[2,22]},{25:[1,143]},{25:[1,144]},o($VC,[2,23]),{30:$V9,60:145,65:146,89:$Vg,90:$Vh,115:$Vi,128:$Vq,129:$Vr,130:$Vs,131:$Vt,132:$Vu,133:$Vv,134:$Vw,135:$Vx,136:$Vy,137:$Vz,138:$VA,139:$VB},{21:$V4,23:$V5,30:$V9,33:$Vb,61:147,62:22,63:$Vd,64:$Ve,65:25,66:26,67:$Vf,89:$Vg,90:$Vh,115:$Vi,121:$Vj,122:$Vk,123:$Vl,124:$Vm,125:$Vn,126:$Vo,127:$Vp,128:$Vq,129:$Vr,130:$Vs,131:$Vt,132:$Vu,133:$Vv,134:$Vw,135:$Vx,136:$Vy,137:$Vz,138:$VA,139:$VB},{21:$V4,23:$V5,30:$V9,33:$Vb,61:148,62:22,63:$Vd,64:$Ve,65:25,66:26,67:$Vf,89:$Vg,90:$Vh,115:$Vi,121:$Vj,122:$Vk,123:$Vl,124:$Vm,125:$Vn,126:$Vo,127:$Vp,128:$Vq,129:$Vr,130:$Vs,131:$Vt,132:$Vu,133:$Vv,134:$Vw,135:$Vx,136:$Vy,137:$Vz,138:$VA,139:$VB},o($Vk1,[2,55],{37:$Vl1}),{21:$V4,23:$V5,30:$V9,33:$Vb,62:149,63:$Vd,64:$Ve,65:25,66:26,67:$Vf,89:$Vg,90:$Vh,115:$Vi,121:$Vj,122:$Vk,123:$Vl,124:$Vm,125:$Vn,126:$Vo,127:$Vp,128:$Vq,129:$Vr,130:$Vs,131:$Vt,132:$Vu,133:$Vv,134:$Vw,135:$Vx,136:$Vy,137:$Vz,138:$VA,139:$VB},{21:[1,150]},{33:[1,151]},{13:[1,152],68:$Vo1},o($VC,[2,13]),{69:153,70:$VD,72:$VE,73:$VF,75:$VG,76:$VH,77:$VI,78:$VJ,79:$VK,80:$VL,81:$VM,82:$VN,83:$VO,84:$VP,85:$VQ,86:$VR,87:75,88:76,91:$VS,92:$VT,93:$VU,94:$VV,95:$VW,96:$VX,97:$VY,98:$VZ,99:$V_,100:$V$,101:$V01,102:$V11,103:$V21,104:$V31,105:$V41,106:$V51,107:$V61,108:$V71,109:$V81,110:$V91,111:$Va1,112:$Vb1,113:$Vc1,114:$Vd1,116:$Ve1,117:$Vf1,118:$Vg1,119:$Vh1,120:$Vi1},{17:$Vq1,71:154,133:$Vr1,142:$Vs1,143:$Vt1,144:$Vu1},{17:$Vq1,71:160,133:$Vr1,142:$Vs1,143:$Vt1,144:$Vu1},{21:$Vv1,74:161,89:$Vw1,90:$Vx1},{21:$Vv1,74:165,89:$Vw1,90:$Vx1},{21:$Vv1,74:166,89:$Vw1,90:$Vx1},{21:$Vv1,74:167,89:$Vw1,90:$Vx1},{21:$Vv1,74:168,89:$Vw1,90:$Vx1},{21:$Vv1,74:169,89:$Vw1,90:$Vx1},{21:$Vv1,74:170,89:$Vw1,90:$Vx1},{21:$Vv1,74:171,89:$Vw1,90:$Vx1},{21:$Vv1,74:172,89:$Vw1,90:$Vx1},{21:$Vv1,74:173,89:$Vw1,90:$Vx1},{21:$Vv1,74:174,89:$Vw1,90:$Vx1},{21:$Vv1,74:175,89:$Vw1,90:$Vx1},{17:[1,176],67:[1,179],89:[1,177],90:[1,178]},{17:[1,180],67:[1,183],89:[1,181],90:[1,182]},{17:[1,184]},{17:[1,185],67:[1,186]},{115:[1,187]},o($VC,[2,15],{20:[1,188]}),{21:$Vy1,23:$Vz1,26:189,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:196,33:$VA1,36:$VB1,54:$VC1,56:$VD1},o($Vj1,[2,51],{68:[1,197]}),o($VE1,[2,70]),o($Vk1,[2,53],{37:$Vl1}),o($Vk1,[2,54],{37:$Vl1}),o($Vm1,[2,57]),o($Vm1,[2,63]),o($Vm1,[2,64]),o($VC,[2,11]),o($Vp1,[2,71]),{57:[1,198]},{35:[1,199],36:[1,200],57:[2,158],140:[1,201],141:[1,202]},{15:[1,203]},{15:[1,204]},{15:[1,205]},{20:[1,207],35:[1,206],57:[2,172]},{57:[1,208]},{57:[1,209]},{57:[2,180]},{35:[1,210],57:[2,181]},{35:[1,211],57:[2,182]},{57:[1,212]},{57:[1,213]},{57:[1,214]},{57:[1,215]},{57:[1,216]},{57:[1,217]},{57:[1,218]},{57:[1,219]},{57:[1,220]},{57:[1,221]},{57:[1,222]},{57:[1,223]},{57:[1,224]},{57:[1,225]},{35:[1,226]},{57:[1,227],68:[1,228]},{57:[1,229],68:[1,230]},{57:[1,231],68:[1,232]},{35:[1,233]},{57:[1,234],68:[1,235]},{57:[1,236]},{35:[1,237]},{57:[1,238]},{21:[1,239],23:[1,240]},o($VF1,[2,18],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1,43:$VO1,44:$VP1,45:$VQ1,46:$VR1,47:$VS1,48:$VT1,49:$VU1,50:$VV1,51:$VW1,52:$VX1,53:$VY1,55:$VZ1}),o($V_1,[2,24]),o($V_1,[2,25]),o($V_1,[2,26],{34:[1,261]}),{21:$Vy1,23:$Vz1,26:262,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:263,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:264,33:$VA1,36:$VB1,54:$VC1,56:$VD1},o($VF1,[2,19],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1,43:$VO1,44:$VP1,45:$VQ1,46:$VR1,47:$VS1,48:$VT1,49:$VU1,50:$VV1,51:$VW1,52:$VX1,53:$VY1,55:$VZ1}),{30:$V9,65:265,89:$Vg,90:$Vh,115:$Vi,128:$Vq,129:$Vr,130:$Vs,131:$Vt,132:$Vu,133:$Vv,134:$Vw,135:$Vx,136:$Vy,137:$Vz,138:$VA,139:$VB},o($Vp1,[2,73]),{21:[1,266]},{21:[1,267]},{57:[2,161]},{57:[2,162]},{90:[1,268]},{90:[1,269]},{90:[1,270]},{21:[1,273],89:[1,271],90:[1,272]},{21:[1,275],90:[1,274]},o($Vp1,[2,74]),o($Vp1,[2,75]),{21:[1,276]},{21:[1,277]},o($Vp1,[2,76]),o($Vp1,[2,77]),o($Vp1,[2,78]),o($Vp1,[2,79]),o($Vp1,[2,80]),o($Vp1,[2,81]),o($Vp1,[2,82]),o($Vp1,[2,83]),o($Vp1,[2,84]),o($Vp1,[2,85]),o($Vp1,[2,86]),o($Vp1,[2,87]),o($Vp1,[2,92]),o($Vp1,[2,93]),{89:[1,278],90:[1,279]},o($Vp1,[2,88]),{17:[1,280]},o($Vp1,[2,96]),{17:[1,281]},o($Vp1,[2,97]),{17:[1,282]},{89:[1,283],90:[1,284]},o($Vp1,[2,90]),{17:[1,285]},o($Vp1,[2,104]),{89:[1,286],90:[1,287]},o($Vp1,[2,129]),{22:[1,288]},{22:[1,289]},{21:$Vy1,23:$Vz1,26:290,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:291,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:292,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:293,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:294,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:295,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:296,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:297,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:298,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:299,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:300,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:301,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:302,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:303,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:304,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:305,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:306,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:307,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:308,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:309,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:310,33:$VA1,36:$VB1,54:$VC1,56:$VD1},o($V$1,[2,34],{37:$VI1,38:$VJ1,39:$VK1,40:$VL1}),o($V_1,[2,48]),{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1,43:$VO1,44:$VP1,45:$VQ1,46:$VR1,47:$VS1,48:$VT1,49:$VU1,50:$VV1,51:$VW1,52:$VX1,53:$VY1,55:$VZ1,57:[1,311]},o($VE1,[2,69]),{57:[2,159]},{57:[2,160]},{35:[1,312],36:[1,313],57:[2,165]},{35:[1,314],36:[1,315],57:[2,168]},{35:[1,316],36:[1,317],57:[2,171]},{57:[2,173]},{57:[2,174]},{57:[2,178]},{22:[1,318],35:[1,320],36:[1,319]},{22:[1,321]},{57:[2,183]},{57:[2,184]},{57:[1,322]},{57:[1,323]},{57:[1,324]},{57:[1,325]},{57:[1,326]},{57:[1,327],68:[1,328]},{57:[1,329],68:[1,330]},{57:[1,331]},{57:[1,332]},{57:[1,333]},o($VC,[2,16]),o($VC,[2,17]),o($V$1,[2,28],{37:$VI1,38:$VJ1,39:$VK1,40:$VL1}),o($V$1,[2,29],{37:$VI1,38:$VJ1,39:$VK1,40:$VL1}),o($V_1,[2,30]),o($V_1,[2,31]),o($V_1,[2,32]),o($V_1,[2,33]),o($V02,[2,35],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1}),o($V02,[2,36],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1}),o([5,13,15,17,18,21,23,24,27,28,30,31,33,43,52,53,55,57,63,64,67,89,90,115,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139],[2,37],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1,44:$VP1,45:$VQ1,46:$VR1,47:$VS1,48:$VT1,49:$VU1,50:$VV1,51:$VW1}),o([5,13,15,17,18,21,23,24,27,28,30,31,33,43,44,45,52,53,55,57,63,64,67,89,90,115,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139],[2,38],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1,46:$VR1,47:$VS1,48:$VT1,49:$VU1,50:$VV1,51:$VW1}),o([5,13,15,17,18,21,23,24,27,28,30,31,33,43,45,52,53,55,57,63,64,67,89,90,115,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139],[2,39],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1,44:$VP1,46:$VR1,47:$VS1,48:$VT1,49:$VU1,50:$VV1,51:$VW1}),o($V12,[2,40],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1}),o($V12,[2,41],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1}),o($V12,[2,42],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1}),o($V12,[2,43],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1}),o($V22,[2,44],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1,46:$VR1,47:$VS1,48:$VT1,49:$VU1}),o($V22,[2,45],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1,46:$VR1,47:$VS1,48:$VT1,49:$VU1}),o([5,13,15,17,18,21,23,24,27,28,30,31,33,52,53,55,57,63,64,67,89,90,115,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139],[2,46],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1,43:$VO1,44:$VP1,45:$VQ1,46:$VR1,47:$VS1,48:$VT1,49:$VU1,50:$VV1,51:$VW1}),o([5,13,15,17,18,21,23,24,27,28,30,31,33,53,55,57,63,64,67,89,90,115,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139],[2,47],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1,43:$VO1,44:$VP1,45:$VQ1,46:$VR1,47:$VS1,48:$VT1,49:$VU1,50:$VV1,51:$VW1,52:$VX1}),{15:[1,334],35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1,43:$VO1,44:$VP1,45:$VQ1,46:$VR1,47:$VS1,48:$VT1,49:$VU1,50:$VV1,51:$VW1,52:$VX1,53:$VY1,55:$VZ1},o([5,13,15,17,18,21,23,24,27,28,30,31,33,55,57,63,64,67,89,90,115,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139],[2,27],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1,43:$VO1,44:$VP1,45:$VQ1,46:$VR1,47:$VS1,48:$VT1,49:$VU1,50:$VV1,51:$VW1,52:$VX1,53:$VY1}),o($V_1,[2,50]),{21:[1,335]},{21:[1,336]},{21:[1,337]},{21:[1,338]},{21:[1,339]},{21:[1,340]},{57:[2,175]},{21:[1,341]},{21:[1,342]},{57:[2,179]},o($Vp1,[2,94]),o($Vp1,[2,95]),o($Vp1,[2,89]),o($Vp1,[2,100]),o($Vp1,[2,101]),o($Vp1,[2,98]),{17:[1,343]},o($Vp1,[2,99]),{17:[1,344]},o($Vp1,[2,91]),o($Vp1,[2,105]),o($Vp1,[2,106]),{21:$Vy1,23:$Vz1,26:345,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{57:[2,163]},{57:[2,164]},{57:[2,166]},{57:[2,167]},{57:[2,169]},{57:[2,170]},{22:[1,346]},{22:[1,347]},{57:[1,348]},{57:[1,349]},o([5,13,15,17,18,21,23,24,27,28,30,31,33,57,63,64,67,89,90,115,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139],[2,49],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1,43:$VO1,44:$VP1,45:$VQ1,46:$VR1,47:$VS1,48:$VT1,49:$VU1,50:$VV1,51:$VW1,52:$VX1,53:$VY1,55:$VZ1}),{57:[2,176]},{57:[2,177]},o($Vp1,[2,102]),o($Vp1,[2,103])], -defaultActions: {54:[2,1],101:[2,130],102:[2,131],103:[2,132],104:[2,133],105:[2,134],108:[2,21],109:[2,22],162:[2,180],201:[2,161],202:[2,162],266:[2,159],267:[2,160],271:[2,173],272:[2,174],273:[2,178],276:[2,183],277:[2,184],318:[2,175],321:[2,179],335:[2,163],336:[2,164],337:[2,166],338:[2,167],339:[2,169],340:[2,170],346:[2,176],347:[2,177]}, +table: [{3:1,4:2,6:3,7:4,8:5,9:6,10:7,11:8,12:9,13:$V0,14:11,15:$V1,17:$V2,18:$V3,21:$V4,23:$V5,24:$V6,27:$V7,28:$V8,30:$V9,31:$Va,33:$Vb,36:$Vc,58:19,61:21,62:22,63:$Vd,64:$Ve,65:25,66:26,67:$Vf,114:$Vg,121:$Vh,122:$Vi,123:$Vj,124:$Vk,125:$Vl,126:$Vm,127:$Vn,128:$Vo,129:$Vp,130:$Vq,131:$Vr,132:$Vs,133:$Vt,134:$Vu,135:$Vv,136:$Vw,137:$Vx,138:$Vy,139:$Vz,140:$VA,141:$VB},{1:[3]},{5:[1,54],6:55,7:4,8:5,9:6,10:7,11:8,12:9,13:$V0,14:11,15:$V1,17:$V2,18:$V3,21:$V4,23:$V5,24:$V6,27:$V7,28:$V8,30:$V9,31:$Va,33:$Vb,36:$Vc,58:19,61:21,62:22,63:$Vd,64:$Ve,65:25,66:26,67:$Vf,114:$Vg,121:$Vh,122:$Vi,123:$Vj,124:$Vk,125:$Vl,126:$Vm,127:$Vn,128:$Vo,129:$Vp,130:$Vq,131:$Vr,132:$Vs,133:$Vt,134:$Vu,135:$Vv,136:$Vw,137:$Vx,138:$Vy,139:$Vz,140:$VA,141:$VB},o($VC,[2,3]),o($VC,[2,4]),o($VC,[2,5]),o($VC,[2,6]),o($VC,[2,7]),o($VC,[2,8]),o($VC,[2,9]),o($VC,[2,10]),{13:[1,57],15:[1,56]},{16:58,69:59,70:$VD,72:$VE,73:$VF,75:$VG,76:$VH,77:$VI,78:$VJ,79:$VK,80:$VL,81:$VM,82:$VN,83:$VO,84:$VP,85:$VQ,86:$VR,88:75,89:76,90:$VS,91:$VT,92:$VU,93:$VV,94:$VW,95:$VX,96:$VY,97:$VZ,98:$V_,99:$V$,100:$V01,101:$V11,102:$V21,103:$V31,104:$V41,105:$V51,106:$V61,107:$V71,108:$V81,109:$V91,110:$Va1,111:$Vb1,112:$Vc1,113:$Vd1,116:$Ve1,117:$Vf1,118:$Vg1,119:$Vh1,120:$Vi1},{15:[1,106]},{19:107,29:[1,108],30:[1,109]},{23:[1,110]},{23:[1,111]},{32:[1,112]},o($VC,[2,20]),o($Vj1,[2,52],{35:[1,114],36:[1,115],59:[1,113]}),{21:$V4,23:$V5,30:$V9,33:$Vb,61:116,62:22,63:$Vd,64:$Ve,65:25,66:26,67:$Vf,114:$Vg,121:$Vh,122:$Vi,123:$Vj,124:$Vk,125:$Vl,126:$Vm,127:$Vn,128:$Vo,129:$Vp,130:$Vq,131:$Vr,132:$Vs,133:$Vt,134:$Vu,135:$Vv,136:$Vw,137:$Vx,138:$Vy,139:$Vz,140:$VA,141:$VB},o($Vk1,[2,56],{37:$Vl1}),o($Vm1,[2,58]),o($Vm1,[2,59]),o($Vm1,[2,60]),o($Vm1,[2,61]),o($Vm1,[2,62]),o($Vm1,[2,65],{38:[1,118]}),o($Vm1,[2,66],{38:[1,119]}),o($Vm1,[2,67]),o($Vm1,[2,68]),o($Vn1,[2,131]),o($Vn1,[2,132]),o($Vn1,[2,133]),o($Vn1,[2,134]),o($Vn1,[2,135]),o($Vn1,[2,136]),o($Vn1,[2,137]),o($Vn1,[2,138]),o($Vn1,[2,139]),o($Vn1,[2,140]),o($Vn1,[2,141]),o($Vn1,[2,142]),o($Vn1,[2,143]),o($Vn1,[2,144]),o($Vn1,[2,145]),o($Vn1,[2,146]),o($Vm1,[2,124]),o($Vm1,[2,125]),o($Vm1,[2,126]),o($Vm1,[2,127]),o($Vm1,[2,128]),o($Vm1,[2,129]),o($Vm1,[2,130]),{1:[2,1]},o($VC,[2,2]),{16:120,69:59,70:$VD,72:$VE,73:$VF,75:$VG,76:$VH,77:$VI,78:$VJ,79:$VK,80:$VL,81:$VM,82:$VN,83:$VO,84:$VP,85:$VQ,86:$VR,88:75,89:76,90:$VS,91:$VT,92:$VU,93:$VV,94:$VW,95:$VX,96:$VY,97:$VZ,98:$V_,99:$V$,100:$V01,101:$V11,102:$V21,103:$V31,104:$V41,105:$V51,106:$V61,107:$V71,108:$V81,109:$V91,110:$Va1,111:$Vb1,112:$Vc1,113:$Vd1,116:$Ve1,117:$Vf1,118:$Vg1,119:$Vh1,120:$Vi1},o($VC,[2,12]),{13:[1,121],68:$Vo1},o($Vp1,[2,72]),{56:[1,123]},{56:[1,124]},{56:[1,125]},{56:[1,126]},{56:[1,127]},{56:[1,128]},{56:[1,129]},{56:[1,130]},{56:[1,131]},{56:[1,132]},{56:[1,133]},{56:[1,134]},{56:[1,135]},{56:[1,136]},{56:[1,137]},{56:[1,138]},{56:[1,139]},{56:[1,140]},o($Vp1,[2,93]),o($Vp1,[2,94]),o($Vp1,[2,95]),o($Vp1,[2,96]),o($Vp1,[2,97]),o($Vp1,[2,98]),o($Vp1,[2,99]),o($Vp1,[2,100]),o($Vp1,[2,101]),o($Vp1,[2,102]),o($Vp1,[2,103]),o($Vp1,[2,104]),o($Vp1,[2,105]),o($Vp1,[2,106]),o($Vp1,[2,107]),o($Vp1,[2,108]),o($Vp1,[2,109]),o($Vp1,[2,110]),o($Vp1,[2,111]),o($Vp1,[2,112]),o($Vp1,[2,113]),o($Vp1,[2,114]),{56:[1,141]},{56:[2,122]},{56:[2,123]},{56:[2,119]},{56:[2,120]},{56:[2,121]},o($VC,[2,14]),{17:[1,142]},{17:[2,21]},{17:[2,22]},{25:[1,143]},{25:[1,144]},o($VC,[2,23]),{30:$V9,60:145,65:146,114:$Vg,128:$Vo,129:$Vp,130:$Vq,131:$Vr,132:$Vs,133:$Vt,134:$Vu,135:$Vv,136:$Vw,137:$Vx,138:$Vy,139:$Vz,140:$VA,141:$VB},{21:$V4,23:$V5,30:$V9,33:$Vb,61:147,62:22,63:$Vd,64:$Ve,65:25,66:26,67:$Vf,114:$Vg,121:$Vh,122:$Vi,123:$Vj,124:$Vk,125:$Vl,126:$Vm,127:$Vn,128:$Vo,129:$Vp,130:$Vq,131:$Vr,132:$Vs,133:$Vt,134:$Vu,135:$Vv,136:$Vw,137:$Vx,138:$Vy,139:$Vz,140:$VA,141:$VB},{21:$V4,23:$V5,30:$V9,33:$Vb,61:148,62:22,63:$Vd,64:$Ve,65:25,66:26,67:$Vf,114:$Vg,121:$Vh,122:$Vi,123:$Vj,124:$Vk,125:$Vl,126:$Vm,127:$Vn,128:$Vo,129:$Vp,130:$Vq,131:$Vr,132:$Vs,133:$Vt,134:$Vu,135:$Vv,136:$Vw,137:$Vx,138:$Vy,139:$Vz,140:$VA,141:$VB},o($Vk1,[2,55],{37:$Vl1}),{21:$V4,23:$V5,30:$V9,33:$Vb,62:149,63:$Vd,64:$Ve,65:25,66:26,67:$Vf,114:$Vg,121:$Vh,122:$Vi,123:$Vj,124:$Vk,125:$Vl,126:$Vm,127:$Vn,128:$Vo,129:$Vp,130:$Vq,131:$Vr,132:$Vs,133:$Vt,134:$Vu,135:$Vv,136:$Vw,137:$Vx,138:$Vy,139:$Vz,140:$VA,141:$VB},{21:[1,150]},{33:[1,151]},{13:[1,152],68:$Vo1},o($VC,[2,13]),{69:153,70:$VD,72:$VE,73:$VF,75:$VG,76:$VH,77:$VI,78:$VJ,79:$VK,80:$VL,81:$VM,82:$VN,83:$VO,84:$VP,85:$VQ,86:$VR,88:75,89:76,90:$VS,91:$VT,92:$VU,93:$VV,94:$VW,95:$VX,96:$VY,97:$VZ,98:$V_,99:$V$,100:$V01,101:$V11,102:$V21,103:$V31,104:$V41,105:$V51,106:$V61,107:$V71,108:$V81,109:$V91,110:$Va1,111:$Vb1,112:$Vc1,113:$Vd1,116:$Ve1,117:$Vf1,118:$Vg1,119:$Vh1,120:$Vi1},{17:$Vq1,21:$Vr1,23:$Vs1,71:154,115:159,132:$Vt1,134:$Vu1,137:$Vv1,143:162,144:161,149:$Vw1,150:$Vx1,151:$Vy1},{17:$Vq1,21:$Vr1,23:$Vs1,71:167,115:159,132:$Vt1,134:$Vu1,137:$Vv1,143:162,144:161,149:$Vw1,150:$Vx1,151:$Vy1},{21:$Vz1,74:168,132:$VA1,137:$VB1},{21:$Vz1,74:172,132:$VA1,137:$VB1},{21:$Vz1,74:173,132:$VA1,137:$VB1},{21:$Vz1,74:174,132:$VA1,137:$VB1},{21:$Vz1,74:175,132:$VA1,137:$VB1},{21:$Vz1,74:176,132:$VA1,137:$VB1},{21:$Vz1,74:177,132:$VA1,137:$VB1},{21:$Vz1,74:178,132:$VA1,137:$VB1},{21:$Vz1,74:179,132:$VA1,137:$VB1},{21:$Vz1,74:180,132:$VA1,137:$VB1},{21:$Vz1,74:181,132:$VA1,137:$VB1},{21:$Vz1,74:182,132:$VA1,137:$VB1},{17:$VC1,67:$VD1,87:183},{17:$VC1,67:$VD1,87:186},{17:$VC1,67:$VD1,87:187},{17:$VC1,67:$VD1,87:188},{114:[1,189]},o($VC,[2,15],{20:[1,190]}),{21:$VE1,23:$VF1,26:191,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},{21:$VE1,23:$VF1,26:198,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},o($Vj1,[2,51],{68:[1,199]}),o($VK1,[2,70]),o($Vk1,[2,53],{37:$Vl1}),o($Vk1,[2,54],{37:$Vl1}),o($Vm1,[2,57]),o($Vm1,[2,63]),o($Vm1,[2,64]),o($VC,[2,11]),o($Vp1,[2,71]),{57:[1,200]},{35:[1,201],36:[1,202],57:[2,162],147:[1,203],148:[1,204]},{15:[1,205]},{15:[1,206]},{15:[1,207]},{57:[2,170]},{20:[1,209],35:[1,208],57:[2,171]},o($VL1,[2,158],{145:210,35:$VM1,36:$VN1}),o($VO1,[2,151]),{37:$VP1},{37:$VQ1},o($VO1,[2,149]),o($VO1,[2,150]),{57:[1,215]},{57:[1,216]},{57:[2,175]},{35:[1,217],57:[2,176]},{35:[1,218],57:[2,177]},{57:[1,219]},{57:[1,220]},{57:[1,221]},{57:[1,222]},{57:[1,223]},{57:[1,224]},{57:[1,225]},{57:[1,226]},{57:[1,227]},{57:[1,228]},{57:[1,229]},{57:[1,230]},o($VR1,[2,116]),{35:[1,231],36:[1,232]},{57:[1,233],68:[1,234]},{57:[1,235],68:[1,236]},{57:[1,237]},{57:[1,238]},{21:[1,239],23:[1,240]},o($VS1,[2,18],{35:$VT1,36:$VU1,37:$VV1,38:$VW1,39:$VX1,40:$VY1,41:$VZ1,42:$V_1,43:$V$1,44:$V02,45:$V12,46:$V22,47:$V32,48:$V42,49:$V52,50:$V62,51:$V72,52:$V82,53:$V92,55:$Va2}),o($Vb2,[2,24]),o($Vb2,[2,25]),o($Vb2,[2,26],{34:[1,261]}),{21:$VE1,23:$VF1,26:262,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},{21:$VE1,23:$VF1,26:263,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},{21:$VE1,23:$VF1,26:264,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},o($VS1,[2,19],{35:$VT1,36:$VU1,37:$VV1,38:$VW1,39:$VX1,40:$VY1,41:$VZ1,42:$V_1,43:$V$1,44:$V02,45:$V12,46:$V22,47:$V32,48:$V42,49:$V52,50:$V62,51:$V72,52:$V82,53:$V92,55:$Va2}),{30:$V9,65:265,114:$Vg,128:$Vo,129:$Vp,130:$Vq,131:$Vr,132:$Vs,133:$Vt,134:$Vu,135:$Vv,136:$Vw,137:$Vx,138:$Vy,139:$Vz,140:$VA,141:$VB},o($Vp1,[2,73]),{21:[1,266]},{21:[1,267]},{57:[2,165]},{57:[2,166]},{21:$Vr1,23:$Vs1,115:268,132:$Vt1,137:$Vv1,143:162,144:161},{21:$Vr1,23:$Vs1,115:269,132:$Vt1,137:$Vv1,143:162,144:161},{21:$Vr1,23:$Vs1,115:270,132:$Vt1,137:$Vv1,143:162,144:161},{21:$Vc2,23:$Vd2,115:271,132:$Vt1,137:$Vv1,143:162,144:161,146:272},{21:$Vr1,23:$Vs1,115:275,132:$Vt1,137:$Vv1,143:162,144:161},{21:$Vc2,23:$Vd2,132:$Vt1,137:$Vv1,143:162,144:277,146:276},o($Ve2,[2,154]),o($Ve2,[2,155]),{132:$Vt1,137:$Vv1,143:278},{132:$Vt1,137:$Vv1,143:279},o($Vp1,[2,74]),o($Vp1,[2,75]),{21:[1,280]},{21:[1,281]},o($Vp1,[2,76]),o($Vp1,[2,77]),o($Vp1,[2,78]),o($Vp1,[2,79]),o($Vp1,[2,80]),o($Vp1,[2,81]),o($Vp1,[2,82]),o($Vp1,[2,83]),o($Vp1,[2,84]),o($Vp1,[2,85]),o($Vp1,[2,86]),o($Vp1,[2,87]),{21:$Vr1,23:$Vs1,115:282,132:$Vt1,137:$Vv1,143:162,144:161},{21:$Vr1,23:$Vs1,115:283,132:$Vt1,137:$Vv1,143:162,144:161},o($Vp1,[2,88]),{17:$VC1,67:$VD1,87:284},o($Vp1,[2,90]),{17:$VC1,67:$VD1,87:285},o($Vp1,[2,92]),o($Vp1,[2,115]),{22:[1,286]},{22:[1,287]},{21:$VE1,23:$VF1,26:288,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},{21:$VE1,23:$VF1,26:289,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},{21:$VE1,23:$VF1,26:290,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},{21:$VE1,23:$VF1,26:291,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},{21:$VE1,23:$VF1,26:292,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},{21:$VE1,23:$VF1,26:293,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},{21:$VE1,23:$VF1,26:294,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},{21:$VE1,23:$VF1,26:295,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},{21:$VE1,23:$VF1,26:296,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},{21:$VE1,23:$VF1,26:297,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},{21:$VE1,23:$VF1,26:298,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},{21:$VE1,23:$VF1,26:299,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},{21:$VE1,23:$VF1,26:300,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},{21:$VE1,23:$VF1,26:301,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},{21:$VE1,23:$VF1,26:302,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},{21:$VE1,23:$VF1,26:303,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},{21:$VE1,23:$VF1,26:304,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},{21:$VE1,23:$VF1,26:305,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},{21:$VE1,23:$VF1,26:306,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},{21:$VE1,23:$VF1,26:307,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},{21:$VE1,23:$VF1,26:308,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},o($Vf2,[2,34],{37:$VV1,38:$VW1,39:$VX1,40:$VY1}),o($Vb2,[2,48]),{35:$VT1,36:$VU1,37:$VV1,38:$VW1,39:$VX1,40:$VY1,41:$VZ1,42:$V_1,43:$V$1,44:$V02,45:$V12,46:$V22,47:$V32,48:$V42,49:$V52,50:$V62,51:$V72,52:$V82,53:$V92,55:$Va2,57:[1,309]},o($VK1,[2,69]),{57:[2,163]},{57:[2,164]},{57:[2,167]},{57:[2,168]},{57:[2,169]},{57:[2,172]},{57:[2,174]},o($VL1,$Vg2,{37:$VP1}),o($VL1,$Vh2,{37:$VQ1}),{22:[1,310]},o($VL1,[2,159]),o($VL1,[2,161],{145:311,35:$VM1,36:$VN1}),o($VO1,[2,152]),o($VO1,[2,153]),{57:[2,178]},{57:[2,179]},o($VR1,[2,117]),o($VR1,[2,118]),{57:[1,312]},{57:[1,313]},o($VC,[2,16]),o($VC,[2,17]),o($Vf2,[2,28],{37:$VV1,38:$VW1,39:$VX1,40:$VY1}),o($Vf2,[2,29],{37:$VV1,38:$VW1,39:$VX1,40:$VY1}),o($Vb2,[2,30]),o($Vb2,[2,31]),o($Vb2,[2,32]),o($Vb2,[2,33]),o($Vi2,[2,35],{35:$VT1,36:$VU1,37:$VV1,38:$VW1,39:$VX1,40:$VY1}),o($Vi2,[2,36],{35:$VT1,36:$VU1,37:$VV1,38:$VW1,39:$VX1,40:$VY1}),o([5,13,15,17,18,21,23,24,27,28,30,31,33,43,52,53,55,57,63,64,67,114,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141],[2,37],{35:$VT1,36:$VU1,37:$VV1,38:$VW1,39:$VX1,40:$VY1,41:$VZ1,42:$V_1,44:$V02,45:$V12,46:$V22,47:$V32,48:$V42,49:$V52,50:$V62,51:$V72}),o([5,13,15,17,18,21,23,24,27,28,30,31,33,43,44,45,52,53,55,57,63,64,67,114,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141],[2,38],{35:$VT1,36:$VU1,37:$VV1,38:$VW1,39:$VX1,40:$VY1,41:$VZ1,42:$V_1,46:$V22,47:$V32,48:$V42,49:$V52,50:$V62,51:$V72}),o([5,13,15,17,18,21,23,24,27,28,30,31,33,43,45,52,53,55,57,63,64,67,114,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141],[2,39],{35:$VT1,36:$VU1,37:$VV1,38:$VW1,39:$VX1,40:$VY1,41:$VZ1,42:$V_1,44:$V02,46:$V22,47:$V32,48:$V42,49:$V52,50:$V62,51:$V72}),o($Vj2,[2,40],{35:$VT1,36:$VU1,37:$VV1,38:$VW1,39:$VX1,40:$VY1,41:$VZ1,42:$V_1}),o($Vj2,[2,41],{35:$VT1,36:$VU1,37:$VV1,38:$VW1,39:$VX1,40:$VY1,41:$VZ1,42:$V_1}),o($Vj2,[2,42],{35:$VT1,36:$VU1,37:$VV1,38:$VW1,39:$VX1,40:$VY1,41:$VZ1,42:$V_1}),o($Vj2,[2,43],{35:$VT1,36:$VU1,37:$VV1,38:$VW1,39:$VX1,40:$VY1,41:$VZ1,42:$V_1}),o($Vk2,[2,44],{35:$VT1,36:$VU1,37:$VV1,38:$VW1,39:$VX1,40:$VY1,41:$VZ1,42:$V_1,46:$V22,47:$V32,48:$V42,49:$V52}),o($Vk2,[2,45],{35:$VT1,36:$VU1,37:$VV1,38:$VW1,39:$VX1,40:$VY1,41:$VZ1,42:$V_1,46:$V22,47:$V32,48:$V42,49:$V52}),o([5,13,15,17,18,21,23,24,27,28,30,31,33,52,53,55,57,63,64,67,114,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141],[2,46],{35:$VT1,36:$VU1,37:$VV1,38:$VW1,39:$VX1,40:$VY1,41:$VZ1,42:$V_1,43:$V$1,44:$V02,45:$V12,46:$V22,47:$V32,48:$V42,49:$V52,50:$V62,51:$V72}),o([5,13,15,17,18,21,23,24,27,28,30,31,33,53,55,57,63,64,67,114,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141],[2,47],{35:$VT1,36:$VU1,37:$VV1,38:$VW1,39:$VX1,40:$VY1,41:$VZ1,42:$V_1,43:$V$1,44:$V02,45:$V12,46:$V22,47:$V32,48:$V42,49:$V52,50:$V62,51:$V72,52:$V82}),{15:[1,314],35:$VT1,36:$VU1,37:$VV1,38:$VW1,39:$VX1,40:$VY1,41:$VZ1,42:$V_1,43:$V$1,44:$V02,45:$V12,46:$V22,47:$V32,48:$V42,49:$V52,50:$V62,51:$V72,52:$V82,53:$V92,55:$Va2},o([5,13,15,17,18,21,23,24,27,28,30,31,33,55,57,63,64,67,114,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141],[2,27],{35:$VT1,36:$VU1,37:$VV1,38:$VW1,39:$VX1,40:$VY1,41:$VZ1,42:$V_1,43:$V$1,44:$V02,45:$V12,46:$V22,47:$V32,48:$V42,49:$V52,50:$V62,51:$V72,52:$V82,53:$V92}),o($Vb2,[2,50]),{57:[2,173]},{21:[1,316],23:[1,317],146:315},o($Vp1,[2,89]),o($Vp1,[2,91]),{21:$VE1,23:$VF1,26:318,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},o($VL1,[2,160]),o($VL1,$Vg2),o($VL1,$Vh2),o([5,13,15,17,18,21,23,24,27,28,30,31,33,57,63,64,67,114,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141],[2,49],{35:$VT1,36:$VU1,37:$VV1,38:$VW1,39:$VX1,40:$VY1,41:$VZ1,42:$V_1,43:$V$1,44:$V02,45:$V12,46:$V22,47:$V32,48:$V42,49:$V52,50:$V62,51:$V72,52:$V82,53:$V92,55:$Va2})], +defaultActions: {54:[2,1],101:[2,122],102:[2,123],103:[2,119],104:[2,120],105:[2,121],108:[2,21],109:[2,22],159:[2,170],169:[2,175],203:[2,165],204:[2,166],266:[2,163],267:[2,164],268:[2,167],269:[2,168],270:[2,169],271:[2,172],272:[2,174],280:[2,178],281:[2,179],310:[2,173]}, parseError: function parseError (str, hash) { if (hash.recoverable) { this.trace(str); diff --git a/src/zkasm_parser.jison b/src/zkasm_parser.jison index 2418849..afcf91b 100644 --- a/src/zkasm_parser.jison +++ b/src/zkasm_parser.jison @@ -832,12 +832,12 @@ addrRel } | indReg2 addrRelOp indReg2 addrRelOp addrOffset { - $$ = { [$1.reg]: $1.indReg, [$3.reg] = applySign($2, $3.indReg), extraOffset: applySign($4, $5) } + $$ = { [$1.reg]: $1.indReg, [$3.reg]: applySign($2, $3.indReg), extraOffset: applySign($4, $5) } checkAddrRel($$); } | indReg2 addrRelOp indReg2 { - $$ = { [$1.reg]: $1.indReg, [$3.reg] = applySign($2, $3.indReg) } + $$ = { [$1.reg]: $1.indReg, [$3.reg]: applySign($2, $3.indReg) } } ; From 627c0617e11ea2bc587f3606928f7c41a4f9239b Mon Sep 17 00:00:00 2001 From: zkronos73 Date: Tue, 6 Feb 2024 11:22:18 +0100 Subject: [PATCH 3/7] fix typo on jison file --- build/zkasm_parser.js | 2 +- src/zkasm_parser.jison | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/zkasm_parser.js b/build/zkasm_parser.js index 004798e..1e0e0d5 100644 --- a/build/zkasm_parser.js +++ b/build/zkasm_parser.js @@ -520,7 +520,7 @@ case 112: break; case 113: - this.$ = { arithEq0: 0, arithEq1: 0, arithEq2: 0, arithEq3: 0, arithEq4: 0, arithEq5: 0 } + this.$ = { arithEq0: 0, arithEq1: 0, arithEq2: 1, arithEq3: 0, arithEq4: 0, arithEq5: 0 } break; case 114: diff --git a/src/zkasm_parser.jison b/src/zkasm_parser.jison index f625279..ecdc5f9 100644 --- a/src/zkasm_parser.jison +++ b/src/zkasm_parser.jison @@ -678,7 +678,7 @@ op } | ARITH_ECADD_SAME { - $$ = { arithEq0: 0, arithEq1: 0, arithEq2: 0, arithEq3: 0, arithEq4: 0, arithEq5: 0 } + $$ = { arithEq0: 0, arithEq1: 0, arithEq2: 1, arithEq3: 0, arithEq4: 0, arithEq5: 0 } } | ARITH_BN254_MULFP2 { From 5f91555b949b6dca6905842bfec975842e82d282 Mon Sep 17 00:00:00 2001 From: zkronos73 Date: Sat, 10 Feb 2024 01:23:24 +0100 Subject: [PATCH 4/7] add indirections of memory already supported by pil/executor. --- build/zkasm_parser.js | 87 ++++++++++++++++++++++++++++++++---------- src/zkasm_parser.jison | 36 +++++++++++++++++ 2 files changed, 102 insertions(+), 21 deletions(-) diff --git a/build/zkasm_parser.js b/build/zkasm_parser.js index 1e0e0d5..9015e97 100644 --- a/build/zkasm_parser.js +++ b/build/zkasm_parser.js @@ -77,7 +77,7 @@ var parser = {trace: function trace () { }, yy: {}, symbols_: {"error":2,"allStatments":3,"statmentList":4,"EOF":5,"statment":6,"step":7,"label":8,"varDef":9,"constDef":10,"include":11,"command":12,"LF":13,"assignment":14,":":15,"opList":16,"IDENTIFIER":17,"VAR":18,"scope":19,"[":20,"NUMBER":21,"]":22,"CONSTID":23,"CONST":24,"=":25,"nexpr":26,"CONSTL":27,"COMMAND":28,"GLOBAL":29,"CTX":30,"INCLUDE":31,"STRING":32,"NUMBERL":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,"inRegsSum":58,"=>":59,"regsList":60,"inRegP":61,"inReg":62,"TAG":63,"TAG_0":64,"reg":65,"counter":66,"REFERENCE":67,",":68,"op":69,"MLOAD":70,"addr":71,"MSTORE":72,"HASHK":73,"hashId":74,"HASHK1":75,"HASHKLEN":76,"HASHKDIGEST":77,"HASHS":78,"HASHS1":79,"HASHSLEN":80,"HASHSDIGEST":81,"HASHP":82,"HASHP1":83,"HASHPLEN":84,"HASHPDIGEST":85,"JMP":86,"jmpCond":87,"jmpNotCond":88,"RR":89,"E":90,"CALL":91,"RETURN":92,"ASSERT":93,"SLOAD":94,"SSTORE":95,"ARITH":96,"ARITH_ECADD_DIFFERENT":97,"ARITH_ECADD_SAME":98,"ARITH_BN254_MULFP2":99,"ARITH_BN254_ADDFP2":100,"ARITH_BN254_SUBFP2":101,"ADD":102,"SUB":103,"LT":104,"SLT":105,"EQ":106,"AND":107,"OR":108,"XOR":109,"LT4":110,"MEM_ALIGN_RD":111,"MEM_ALIGN_WR":112,"MEM_ALIGN_WR8":113,"REPEAT":114,"RCX":115,"JMPN":116,"JMPC":117,"JMPZ":118,"JMPNC":119,"JMPNZ":120,"CNT_ARITH":121,"CNT_BINARY":122,"CNT_KECCAK_F":123,"CNT_SHA256_F":124,"CNT_MEM_ALIGN":125,"CNT_PADDING_PG":126,"CNT_POSEIDON_G":127,"A":128,"B":129,"C":130,"D":131,"SR":132,"SP":133,"PC":134,"GAS":135,"zkPC":136,"STEP":137,"HASHPOS":138,"ROTL_C":139,"++":140,"--":141,"SYS":142,"MEM":143,"STACK":144,"$accept":0,"$end":1}, terminals_: {2:"error",5:"EOF",13:"LF",15:":",17:"IDENTIFIER",18:"VAR",20:"[",21:"NUMBER",22:"]",23:"CONSTID",24:"CONST",25:"=",27:"CONSTL",28:"COMMAND",29:"GLOBAL",30:"CTX",31:"INCLUDE",32:"STRING",33:"NUMBERL",34:"??",35:"+",36:"-",37:"*",38:"**",39:"%",40:"/",41:"<<",42:">>",43:"|",44:"&",45:"^",46:"<",47:">",48:"<=",49:">=",50:"==",51:"!=",52:"&&",53:"||",54:"!",55:"?",56:"(",57:")",59:"=>",63:"TAG",64:"TAG_0",67:"REFERENCE",68:",",70:"MLOAD",72:"MSTORE",73:"HASHK",75:"HASHK1",76:"HASHKLEN",77:"HASHKDIGEST",78:"HASHS",79:"HASHS1",80:"HASHSLEN",81:"HASHSDIGEST",82:"HASHP",83:"HASHP1",84:"HASHPLEN",85:"HASHPDIGEST",86:"JMP",89:"RR",90:"E",91:"CALL",92:"RETURN",93:"ASSERT",94:"SLOAD",95:"SSTORE",96:"ARITH",97:"ARITH_ECADD_DIFFERENT",98:"ARITH_ECADD_SAME",99:"ARITH_BN254_MULFP2",100:"ARITH_BN254_ADDFP2",101:"ARITH_BN254_SUBFP2",102:"ADD",103:"SUB",104:"LT",105:"SLT",106:"EQ",107:"AND",108:"OR",109:"XOR",110:"LT4",111:"MEM_ALIGN_RD",112:"MEM_ALIGN_WR",113:"MEM_ALIGN_WR8",114:"REPEAT",115:"RCX",116:"JMPN",117:"JMPC",118:"JMPZ",119:"JMPNC",120:"JMPNZ",121:"CNT_ARITH",122:"CNT_BINARY",123:"CNT_KECCAK_F",124:"CNT_SHA256_F",125:"CNT_MEM_ALIGN",126:"CNT_PADDING_PG",127:"CNT_POSEIDON_G",128:"A",129:"B",130:"C",131:"D",132:"SR",133:"SP",134:"PC",135:"GAS",136:"zkPC",137:"STEP",138:"HASHPOS",139:"ROTL_C",140:"++",141:"--",142:"SYS",143:"MEM",144:"STACK"}, -productions_: [0,[3,2],[4,2],[4,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[7,4],[7,2],[7,3],[8,2],[9,3],[9,6],[9,6],[10,4],[10,4],[12,1],[19,1],[19,1],[11,2],[26,1],[26,1],[26,1],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,2],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,2],[26,5],[26,3],[14,3],[14,1],[58,3],[58,3],[58,2],[58,1],[61,3],[61,1],[62,1],[62,1],[62,1],[62,1],[62,3],[62,3],[62,1],[62,1],[62,1],[62,1],[60,3],[60,1],[16,3],[16,1],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,6],[69,4],[69,6],[69,4],[69,4],[69,6],[69,6],[69,4],[69,4],[69,6],[69,6],[69,6],[69,6],[69,8],[69,8],[69,4],[69,6],[69,6],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,4],[87,1],[87,1],[87,1],[88,1],[88,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[71,1],[71,3],[71,3],[71,2],[71,2],[71,5],[71,5],[71,3],[71,5],[71,5],[71,3],[71,5],[71,5],[71,3],[71,1],[71,3],[71,3],[71,4],[71,6],[71,6],[71,3],[71,4],[74,1],[74,1],[74,1],[74,3],[74,3]], +productions_: [0,[3,2],[4,2],[4,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[7,4],[7,2],[7,3],[8,2],[9,3],[9,6],[9,6],[10,4],[10,4],[12,1],[19,1],[19,1],[11,2],[26,1],[26,1],[26,1],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,2],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,2],[26,5],[26,3],[14,3],[14,1],[58,3],[58,3],[58,2],[58,1],[61,3],[61,1],[62,1],[62,1],[62,1],[62,1],[62,3],[62,3],[62,1],[62,1],[62,1],[62,1],[60,3],[60,1],[16,3],[16,1],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,6],[69,4],[69,6],[69,4],[69,4],[69,6],[69,6],[69,4],[69,4],[69,6],[69,6],[69,6],[69,6],[69,8],[69,8],[69,4],[69,6],[69,6],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,4],[87,1],[87,1],[87,1],[88,1],[88,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[71,1],[71,3],[71,3],[71,2],[71,2],[71,5],[71,5],[71,3],[71,5],[71,5],[71,3],[71,5],[71,5],[71,3],[71,5],[71,5],[71,3],[71,5],[71,5],[71,3],[71,5],[71,5],[71,3],[71,1],[71,3],[71,3],[71,4],[71,6],[71,6],[71,3],[71,4],[74,1],[74,1],[74,1],[74,3],[74,3]], performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) { /* this == yyval */ @@ -672,103 +672,148 @@ case 165: break; case 166: - this.$ = { isStack: 0, isMem: 1, ind:1, indRR: 0, incStack: 0, offset: $$[$0], useCTX: 1} + this.$ = { isStack: 0, isMem:0, ind:0, indRR: 1, incStack: 0, offset: $$[$0]} break; case 167: - this.$ = { isStack: 0, isMem: 1, ind:1, indRR: 0, incStack: 0, offset: -$$[$0], useCTX: 1} + this.$ = { isStack: 0, isMem:0, ind:0, indRR: 1, incStack: 0, offset: -$$[$0]} break; case 168: - this.$ = { isStack: 0, isMem: 1, ind:1, indRR: 0, incStack: 0, offset: 0, useCTX: 1} + this.$ = { isStack: 0, isMem:0, ind:0, indRR: 1, incStack: 0, offset: 0} break; case 169: - this.$ = { isStack: 1, ind:1, indRR: 0, incStack: 0, offset: $$[$0], useCTX: 1} + this.$ = { isStack: 0, isMem: 1, ind:1, indRR: 0, incStack: 0, offset: $$[$0], useCTX: 1} break; case 170: - this.$ = { isStack: 1, ind:1, indRR: 0, incStack: 0, offset: -$$[$0], useCTX: 1} + this.$ = { isStack: 0, isMem: 1, ind:1, indRR: 0, incStack: 0, offset: -$$[$0], useCTX: 1} break; case 171: - this.$ = { isStack: 1, ind:1, indRR: 0, incStack: 0, offset: 0, useCTX: 1} + this.$ = { isStack: 0, isMem: 1, ind:1, indRR: 0, incStack: 0, offset: 0, useCTX: 1} break; case 172: - this.$ = { offset: $$[$0] } + this.$ = { isStack: 0, isMem: 1, ind:0, indRR: 1, incStack: 0, offset: $$[$0], useCTX: 1} break; case 173: - this.$ = { offset: $$[$0-2], ind: 0, indRR: 1 } + this.$ = { isStack: 0, isMem: 1, ind:0, indRR: 1, incStack: 0, offset: -$$[$0], useCTX: 1} break; case 174: - this.$ = { offset: $$[$0-2], ind: 1, indRR: 0 } + this.$ = { isStack: 0, isMem: 1, ind:0, indRR: 1, incStack: 0, offset: 0, useCTX: 1} break; case 175: - this.$ = { offset: $$[$0-3], ind: 1, indRR: 0 } + this.$ = { isStack: 1, ind:1, indRR: 0, incStack: 0, offset: $$[$0], useCTX: 1} break; case 176: - this.$ = { offset: $$[$0-5], extraOffset: -$$[$0-1], ind: 1, indRR: 0 } + this.$ = { isStack: 1, ind:1, indRR: 0, incStack: 0, offset: -$$[$0], useCTX: 1} break; case 177: - this.$ = { offset: $$[$0-5], extraOffset: $$[$0-1], ind: 1, indRR: 0 } + this.$ = { isStack: 1, ind:1, indRR: 0, incStack: 0, offset: 0, useCTX: 1} break; case 178: - this.$ = { offset: $$[$0-2], extraOffset: $$[$0] } + this.$ = { isStack: 1, ind:0, indRR: 1, incStack: 0, offset: $$[$0], useCTX: 1} break; case 179: - this.$ = { offset: $$[$0-3], extraOffset: $$[$0-1] } + this.$ = { isStack: 1, ind:0, indRR: 1, incStack: 0, offset: -$$[$0], useCTX: 1} break; case 180: - this.$ = {ind: 0, indRR: 0, offset:$$[$0]} + this.$ = { isStack: 1, ind:0, indRR: 1, incStack: 0, offset: 0, useCTX: 1} break; case 181: - this.$ = {ind: 1, indRR: 0, offset:0} + this.$ = { offset: $$[$0] } break; case 182: - this.$ = {ind: 0, indRR: 1, offset:0} + this.$ = { offset: $$[$0-2], ind: 0, indRR: 1 } break; case 183: - this.$ = {ind: 1, indRR: 0, offset:$$[$0]} + this.$ = { offset: $$[$0-2], ind: 1, indRR: 0 } break; case 184: + this.$ = { offset: $$[$0-3], ind: 1, indRR: 0 } + +break; +case 185: + + this.$ = { offset: $$[$0-5], extraOffset: -$$[$0-1], ind: 1, indRR: 0 } + +break; +case 186: + + this.$ = { offset: $$[$0-5], extraOffset: $$[$0-1], ind: 1, indRR: 0 } + +break; +case 187: + + this.$ = { offset: $$[$0-2], extraOffset: $$[$0] } + +break; +case 188: + + this.$ = { offset: $$[$0-3], extraOffset: $$[$0-1] } + +break; +case 189: + + this.$ = {ind: 0, indRR: 0, offset:$$[$0]} + +break; +case 190: + + this.$ = {ind: 1, indRR: 0, offset:0} + +break; +case 191: + + this.$ = {ind: 0, indRR: 1, offset:0} + +break; +case 192: + + this.$ = {ind: 1, indRR: 0, offset:$$[$0]} + +break; +case 193: + this.$ = {ind: 0, indRR: 1, offset:$$[$0]} break; } }, -table: [{3:1,4:2,6:3,7:4,8:5,9:6,10:7,11:8,12:9,13:$V0,14:11,15:$V1,17:$V2,18:$V3,21:$V4,23:$V5,24:$V6,27:$V7,28:$V8,30:$V9,31:$Va,33:$Vb,36:$Vc,58:19,61:21,62:22,63:$Vd,64:$Ve,65:25,66:26,67:$Vf,89:$Vg,90:$Vh,115:$Vi,121:$Vj,122:$Vk,123:$Vl,124:$Vm,125:$Vn,126:$Vo,127:$Vp,128:$Vq,129:$Vr,130:$Vs,131:$Vt,132:$Vu,133:$Vv,134:$Vw,135:$Vx,136:$Vy,137:$Vz,138:$VA,139:$VB},{1:[3]},{5:[1,54],6:55,7:4,8:5,9:6,10:7,11:8,12:9,13:$V0,14:11,15:$V1,17:$V2,18:$V3,21:$V4,23:$V5,24:$V6,27:$V7,28:$V8,30:$V9,31:$Va,33:$Vb,36:$Vc,58:19,61:21,62:22,63:$Vd,64:$Ve,65:25,66:26,67:$Vf,89:$Vg,90:$Vh,115:$Vi,121:$Vj,122:$Vk,123:$Vl,124:$Vm,125:$Vn,126:$Vo,127:$Vp,128:$Vq,129:$Vr,130:$Vs,131:$Vt,132:$Vu,133:$Vv,134:$Vw,135:$Vx,136:$Vy,137:$Vz,138:$VA,139:$VB},o($VC,[2,3]),o($VC,[2,4]),o($VC,[2,5]),o($VC,[2,6]),o($VC,[2,7]),o($VC,[2,8]),o($VC,[2,9]),o($VC,[2,10]),{13:[1,57],15:[1,56]},{16:58,69:59,70:$VD,72:$VE,73:$VF,75:$VG,76:$VH,77:$VI,78:$VJ,79:$VK,80:$VL,81:$VM,82:$VN,83:$VO,84:$VP,85:$VQ,86:$VR,87:75,88:76,91:$VS,92:$VT,93:$VU,94:$VV,95:$VW,96:$VX,97:$VY,98:$VZ,99:$V_,100:$V$,101:$V01,102:$V11,103:$V21,104:$V31,105:$V41,106:$V51,107:$V61,108:$V71,109:$V81,110:$V91,111:$Va1,112:$Vb1,113:$Vc1,114:$Vd1,116:$Ve1,117:$Vf1,118:$Vg1,119:$Vh1,120:$Vi1},{15:[1,106]},{19:107,29:[1,108],30:[1,109]},{23:[1,110]},{23:[1,111]},{32:[1,112]},o($VC,[2,20]),o($Vj1,[2,52],{35:[1,114],36:[1,115],59:[1,113]}),{21:$V4,23:$V5,30:$V9,33:$Vb,61:116,62:22,63:$Vd,64:$Ve,65:25,66:26,67:$Vf,89:$Vg,90:$Vh,115:$Vi,121:$Vj,122:$Vk,123:$Vl,124:$Vm,125:$Vn,126:$Vo,127:$Vp,128:$Vq,129:$Vr,130:$Vs,131:$Vt,132:$Vu,133:$Vv,134:$Vw,135:$Vx,136:$Vy,137:$Vz,138:$VA,139:$VB},o($Vk1,[2,56],{37:$Vl1}),o($Vm1,[2,58]),o($Vm1,[2,59]),o($Vm1,[2,60]),o($Vm1,[2,61]),o($Vm1,[2,62]),o($Vm1,[2,65],{38:[1,118]}),o($Vm1,[2,66],{38:[1,119]}),o($Vm1,[2,67]),o($Vm1,[2,68]),o($Vn1,[2,142]),o($Vn1,[2,143]),o($Vn1,[2,144]),o($Vn1,[2,145]),o($Vn1,[2,146]),o($Vn1,[2,147]),o($Vn1,[2,148]),o($Vn1,[2,149]),o($Vn1,[2,150]),o($Vn1,[2,151]),o($Vn1,[2,152]),o($Vn1,[2,153]),o($Vn1,[2,154]),o($Vn1,[2,155]),o($Vn1,[2,156]),o($Vn1,[2,157]),o($Vm1,[2,135]),o($Vm1,[2,136]),o($Vm1,[2,137]),o($Vm1,[2,138]),o($Vm1,[2,139]),o($Vm1,[2,140]),o($Vm1,[2,141]),{1:[2,1]},o($VC,[2,2]),{16:120,69:59,70:$VD,72:$VE,73:$VF,75:$VG,76:$VH,77:$VI,78:$VJ,79:$VK,80:$VL,81:$VM,82:$VN,83:$VO,84:$VP,85:$VQ,86:$VR,87:75,88:76,91:$VS,92:$VT,93:$VU,94:$VV,95:$VW,96:$VX,97:$VY,98:$VZ,99:$V_,100:$V$,101:$V01,102:$V11,103:$V21,104:$V31,105:$V41,106:$V51,107:$V61,108:$V71,109:$V81,110:$V91,111:$Va1,112:$Vb1,113:$Vc1,114:$Vd1,116:$Ve1,117:$Vf1,118:$Vg1,119:$Vh1,120:$Vi1},o($VC,[2,12]),{13:[1,121],68:$Vo1},o($Vp1,[2,72]),{56:[1,123]},{56:[1,124]},{56:[1,125]},{56:[1,126]},{56:[1,127]},{56:[1,128]},{56:[1,129]},{56:[1,130]},{56:[1,131]},{56:[1,132]},{56:[1,133]},{56:[1,134]},{56:[1,135]},{56:[1,136]},{56:[1,137]},{56:[1,138]},{56:[1,139]},{56:[1,140]},o($Vp1,[2,107]),o($Vp1,[2,108]),o($Vp1,[2,109]),o($Vp1,[2,110]),o($Vp1,[2,111]),o($Vp1,[2,112]),o($Vp1,[2,113]),o($Vp1,[2,114]),o($Vp1,[2,115]),o($Vp1,[2,116]),o($Vp1,[2,117]),o($Vp1,[2,118]),o($Vp1,[2,119]),o($Vp1,[2,120]),o($Vp1,[2,121]),o($Vp1,[2,122]),o($Vp1,[2,123]),o($Vp1,[2,124]),o($Vp1,[2,125]),o($Vp1,[2,126]),o($Vp1,[2,127]),o($Vp1,[2,128]),{56:[1,141]},{56:[2,130]},{56:[2,131]},{56:[2,132]},{56:[2,133]},{56:[2,134]},o($VC,[2,14]),{17:[1,142]},{17:[2,21]},{17:[2,22]},{25:[1,143]},{25:[1,144]},o($VC,[2,23]),{30:$V9,60:145,65:146,89:$Vg,90:$Vh,115:$Vi,128:$Vq,129:$Vr,130:$Vs,131:$Vt,132:$Vu,133:$Vv,134:$Vw,135:$Vx,136:$Vy,137:$Vz,138:$VA,139:$VB},{21:$V4,23:$V5,30:$V9,33:$Vb,61:147,62:22,63:$Vd,64:$Ve,65:25,66:26,67:$Vf,89:$Vg,90:$Vh,115:$Vi,121:$Vj,122:$Vk,123:$Vl,124:$Vm,125:$Vn,126:$Vo,127:$Vp,128:$Vq,129:$Vr,130:$Vs,131:$Vt,132:$Vu,133:$Vv,134:$Vw,135:$Vx,136:$Vy,137:$Vz,138:$VA,139:$VB},{21:$V4,23:$V5,30:$V9,33:$Vb,61:148,62:22,63:$Vd,64:$Ve,65:25,66:26,67:$Vf,89:$Vg,90:$Vh,115:$Vi,121:$Vj,122:$Vk,123:$Vl,124:$Vm,125:$Vn,126:$Vo,127:$Vp,128:$Vq,129:$Vr,130:$Vs,131:$Vt,132:$Vu,133:$Vv,134:$Vw,135:$Vx,136:$Vy,137:$Vz,138:$VA,139:$VB},o($Vk1,[2,55],{37:$Vl1}),{21:$V4,23:$V5,30:$V9,33:$Vb,62:149,63:$Vd,64:$Ve,65:25,66:26,67:$Vf,89:$Vg,90:$Vh,115:$Vi,121:$Vj,122:$Vk,123:$Vl,124:$Vm,125:$Vn,126:$Vo,127:$Vp,128:$Vq,129:$Vr,130:$Vs,131:$Vt,132:$Vu,133:$Vv,134:$Vw,135:$Vx,136:$Vy,137:$Vz,138:$VA,139:$VB},{21:[1,150]},{33:[1,151]},{13:[1,152],68:$Vo1},o($VC,[2,13]),{69:153,70:$VD,72:$VE,73:$VF,75:$VG,76:$VH,77:$VI,78:$VJ,79:$VK,80:$VL,81:$VM,82:$VN,83:$VO,84:$VP,85:$VQ,86:$VR,87:75,88:76,91:$VS,92:$VT,93:$VU,94:$VV,95:$VW,96:$VX,97:$VY,98:$VZ,99:$V_,100:$V$,101:$V01,102:$V11,103:$V21,104:$V31,105:$V41,106:$V51,107:$V61,108:$V71,109:$V81,110:$V91,111:$Va1,112:$Vb1,113:$Vc1,114:$Vd1,116:$Ve1,117:$Vf1,118:$Vg1,119:$Vh1,120:$Vi1},{17:$Vq1,71:154,133:$Vr1,142:$Vs1,143:$Vt1,144:$Vu1},{17:$Vq1,71:160,133:$Vr1,142:$Vs1,143:$Vt1,144:$Vu1},{21:$Vv1,74:161,89:$Vw1,90:$Vx1},{21:$Vv1,74:165,89:$Vw1,90:$Vx1},{21:$Vv1,74:166,89:$Vw1,90:$Vx1},{21:$Vv1,74:167,89:$Vw1,90:$Vx1},{21:$Vv1,74:168,89:$Vw1,90:$Vx1},{21:$Vv1,74:169,89:$Vw1,90:$Vx1},{21:$Vv1,74:170,89:$Vw1,90:$Vx1},{21:$Vv1,74:171,89:$Vw1,90:$Vx1},{21:$Vv1,74:172,89:$Vw1,90:$Vx1},{21:$Vv1,74:173,89:$Vw1,90:$Vx1},{21:$Vv1,74:174,89:$Vw1,90:$Vx1},{21:$Vv1,74:175,89:$Vw1,90:$Vx1},{17:[1,176],67:[1,179],89:[1,177],90:[1,178]},{17:[1,180],67:[1,183],89:[1,181],90:[1,182]},{17:[1,184]},{17:[1,185],67:[1,186]},{115:[1,187]},o($VC,[2,15],{20:[1,188]}),{21:$Vy1,23:$Vz1,26:189,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:196,33:$VA1,36:$VB1,54:$VC1,56:$VD1},o($Vj1,[2,51],{68:[1,197]}),o($VE1,[2,70]),o($Vk1,[2,53],{37:$Vl1}),o($Vk1,[2,54],{37:$Vl1}),o($Vm1,[2,57]),o($Vm1,[2,63]),o($Vm1,[2,64]),o($VC,[2,11]),o($Vp1,[2,71]),{57:[1,198]},{35:[1,199],36:[1,200],57:[2,158],140:[1,201],141:[1,202]},{15:[1,203]},{15:[1,204]},{15:[1,205]},{20:[1,207],35:[1,206],57:[2,172]},{57:[1,208]},{57:[1,209]},{57:[2,180]},{35:[1,210],57:[2,181]},{35:[1,211],57:[2,182]},{57:[1,212]},{57:[1,213]},{57:[1,214]},{57:[1,215]},{57:[1,216]},{57:[1,217]},{57:[1,218]},{57:[1,219]},{57:[1,220]},{57:[1,221]},{57:[1,222]},{57:[1,223]},{57:[1,224]},{57:[1,225]},{35:[1,226]},{57:[1,227],68:[1,228]},{57:[1,229],68:[1,230]},{57:[1,231],68:[1,232]},{35:[1,233]},{57:[1,234],68:[1,235]},{57:[1,236]},{35:[1,237]},{57:[1,238]},{21:[1,239],23:[1,240]},o($VF1,[2,18],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1,43:$VO1,44:$VP1,45:$VQ1,46:$VR1,47:$VS1,48:$VT1,49:$VU1,50:$VV1,51:$VW1,52:$VX1,53:$VY1,55:$VZ1}),o($V_1,[2,24]),o($V_1,[2,25]),o($V_1,[2,26],{34:[1,261]}),{21:$Vy1,23:$Vz1,26:262,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:263,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:264,33:$VA1,36:$VB1,54:$VC1,56:$VD1},o($VF1,[2,19],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1,43:$VO1,44:$VP1,45:$VQ1,46:$VR1,47:$VS1,48:$VT1,49:$VU1,50:$VV1,51:$VW1,52:$VX1,53:$VY1,55:$VZ1}),{30:$V9,65:265,89:$Vg,90:$Vh,115:$Vi,128:$Vq,129:$Vr,130:$Vs,131:$Vt,132:$Vu,133:$Vv,134:$Vw,135:$Vx,136:$Vy,137:$Vz,138:$VA,139:$VB},o($Vp1,[2,73]),{21:[1,266]},{21:[1,267]},{57:[2,161]},{57:[2,162]},{90:[1,268]},{90:[1,269]},{90:[1,270]},{21:[1,273],89:[1,271],90:[1,272]},{21:[1,275],90:[1,274]},o($Vp1,[2,74]),o($Vp1,[2,75]),{21:[1,276]},{21:[1,277]},o($Vp1,[2,76]),o($Vp1,[2,77]),o($Vp1,[2,78]),o($Vp1,[2,79]),o($Vp1,[2,80]),o($Vp1,[2,81]),o($Vp1,[2,82]),o($Vp1,[2,83]),o($Vp1,[2,84]),o($Vp1,[2,85]),o($Vp1,[2,86]),o($Vp1,[2,87]),o($Vp1,[2,92]),o($Vp1,[2,93]),{89:[1,278],90:[1,279]},o($Vp1,[2,88]),{17:[1,280]},o($Vp1,[2,96]),{17:[1,281]},o($Vp1,[2,97]),{17:[1,282]},{89:[1,283],90:[1,284]},o($Vp1,[2,90]),{17:[1,285]},o($Vp1,[2,104]),{89:[1,286],90:[1,287]},o($Vp1,[2,129]),{22:[1,288]},{22:[1,289]},{21:$Vy1,23:$Vz1,26:290,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:291,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:292,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:293,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:294,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:295,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:296,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:297,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:298,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:299,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:300,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:301,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:302,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:303,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:304,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:305,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:306,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:307,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:308,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:309,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:310,33:$VA1,36:$VB1,54:$VC1,56:$VD1},o($V$1,[2,34],{37:$VI1,38:$VJ1,39:$VK1,40:$VL1}),o($V_1,[2,48]),{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1,43:$VO1,44:$VP1,45:$VQ1,46:$VR1,47:$VS1,48:$VT1,49:$VU1,50:$VV1,51:$VW1,52:$VX1,53:$VY1,55:$VZ1,57:[1,311]},o($VE1,[2,69]),{57:[2,159]},{57:[2,160]},{35:[1,312],36:[1,313],57:[2,165]},{35:[1,314],36:[1,315],57:[2,168]},{35:[1,316],36:[1,317],57:[2,171]},{57:[2,173]},{57:[2,174]},{57:[2,178]},{22:[1,318],35:[1,320],36:[1,319]},{22:[1,321]},{57:[2,183]},{57:[2,184]},{57:[1,322]},{57:[1,323]},{57:[1,324]},{57:[1,325]},{57:[1,326]},{57:[1,327],68:[1,328]},{57:[1,329],68:[1,330]},{57:[1,331]},{57:[1,332]},{57:[1,333]},o($VC,[2,16]),o($VC,[2,17]),o($V$1,[2,28],{37:$VI1,38:$VJ1,39:$VK1,40:$VL1}),o($V$1,[2,29],{37:$VI1,38:$VJ1,39:$VK1,40:$VL1}),o($V_1,[2,30]),o($V_1,[2,31]),o($V_1,[2,32]),o($V_1,[2,33]),o($V02,[2,35],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1}),o($V02,[2,36],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1}),o([5,13,15,17,18,21,23,24,27,28,30,31,33,43,52,53,55,57,63,64,67,89,90,115,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139],[2,37],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1,44:$VP1,45:$VQ1,46:$VR1,47:$VS1,48:$VT1,49:$VU1,50:$VV1,51:$VW1}),o([5,13,15,17,18,21,23,24,27,28,30,31,33,43,44,45,52,53,55,57,63,64,67,89,90,115,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139],[2,38],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1,46:$VR1,47:$VS1,48:$VT1,49:$VU1,50:$VV1,51:$VW1}),o([5,13,15,17,18,21,23,24,27,28,30,31,33,43,45,52,53,55,57,63,64,67,89,90,115,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139],[2,39],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1,44:$VP1,46:$VR1,47:$VS1,48:$VT1,49:$VU1,50:$VV1,51:$VW1}),o($V12,[2,40],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1}),o($V12,[2,41],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1}),o($V12,[2,42],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1}),o($V12,[2,43],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1}),o($V22,[2,44],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1,46:$VR1,47:$VS1,48:$VT1,49:$VU1}),o($V22,[2,45],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1,46:$VR1,47:$VS1,48:$VT1,49:$VU1}),o([5,13,15,17,18,21,23,24,27,28,30,31,33,52,53,55,57,63,64,67,89,90,115,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139],[2,46],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1,43:$VO1,44:$VP1,45:$VQ1,46:$VR1,47:$VS1,48:$VT1,49:$VU1,50:$VV1,51:$VW1}),o([5,13,15,17,18,21,23,24,27,28,30,31,33,53,55,57,63,64,67,89,90,115,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139],[2,47],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1,43:$VO1,44:$VP1,45:$VQ1,46:$VR1,47:$VS1,48:$VT1,49:$VU1,50:$VV1,51:$VW1,52:$VX1}),{15:[1,334],35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1,43:$VO1,44:$VP1,45:$VQ1,46:$VR1,47:$VS1,48:$VT1,49:$VU1,50:$VV1,51:$VW1,52:$VX1,53:$VY1,55:$VZ1},o([5,13,15,17,18,21,23,24,27,28,30,31,33,55,57,63,64,67,89,90,115,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139],[2,27],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1,43:$VO1,44:$VP1,45:$VQ1,46:$VR1,47:$VS1,48:$VT1,49:$VU1,50:$VV1,51:$VW1,52:$VX1,53:$VY1}),o($V_1,[2,50]),{21:[1,335]},{21:[1,336]},{21:[1,337]},{21:[1,338]},{21:[1,339]},{21:[1,340]},{57:[2,175]},{21:[1,341]},{21:[1,342]},{57:[2,179]},o($Vp1,[2,94]),o($Vp1,[2,95]),o($Vp1,[2,89]),o($Vp1,[2,100]),o($Vp1,[2,101]),o($Vp1,[2,98]),{17:[1,343]},o($Vp1,[2,99]),{17:[1,344]},o($Vp1,[2,91]),o($Vp1,[2,105]),o($Vp1,[2,106]),{21:$Vy1,23:$Vz1,26:345,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{57:[2,163]},{57:[2,164]},{57:[2,166]},{57:[2,167]},{57:[2,169]},{57:[2,170]},{22:[1,346]},{22:[1,347]},{57:[1,348]},{57:[1,349]},o([5,13,15,17,18,21,23,24,27,28,30,31,33,57,63,64,67,89,90,115,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139],[2,49],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1,43:$VO1,44:$VP1,45:$VQ1,46:$VR1,47:$VS1,48:$VT1,49:$VU1,50:$VV1,51:$VW1,52:$VX1,53:$VY1,55:$VZ1}),{57:[2,176]},{57:[2,177]},o($Vp1,[2,102]),o($Vp1,[2,103])], -defaultActions: {54:[2,1],101:[2,130],102:[2,131],103:[2,132],104:[2,133],105:[2,134],108:[2,21],109:[2,22],162:[2,180],201:[2,161],202:[2,162],266:[2,159],267:[2,160],271:[2,173],272:[2,174],273:[2,178],276:[2,183],277:[2,184],318:[2,175],321:[2,179],335:[2,163],336:[2,164],337:[2,166],338:[2,167],339:[2,169],340:[2,170],346:[2,176],347:[2,177]}, +table: [{3:1,4:2,6:3,7:4,8:5,9:6,10:7,11:8,12:9,13:$V0,14:11,15:$V1,17:$V2,18:$V3,21:$V4,23:$V5,24:$V6,27:$V7,28:$V8,30:$V9,31:$Va,33:$Vb,36:$Vc,58:19,61:21,62:22,63:$Vd,64:$Ve,65:25,66:26,67:$Vf,89:$Vg,90:$Vh,115:$Vi,121:$Vj,122:$Vk,123:$Vl,124:$Vm,125:$Vn,126:$Vo,127:$Vp,128:$Vq,129:$Vr,130:$Vs,131:$Vt,132:$Vu,133:$Vv,134:$Vw,135:$Vx,136:$Vy,137:$Vz,138:$VA,139:$VB},{1:[3]},{5:[1,54],6:55,7:4,8:5,9:6,10:7,11:8,12:9,13:$V0,14:11,15:$V1,17:$V2,18:$V3,21:$V4,23:$V5,24:$V6,27:$V7,28:$V8,30:$V9,31:$Va,33:$Vb,36:$Vc,58:19,61:21,62:22,63:$Vd,64:$Ve,65:25,66:26,67:$Vf,89:$Vg,90:$Vh,115:$Vi,121:$Vj,122:$Vk,123:$Vl,124:$Vm,125:$Vn,126:$Vo,127:$Vp,128:$Vq,129:$Vr,130:$Vs,131:$Vt,132:$Vu,133:$Vv,134:$Vw,135:$Vx,136:$Vy,137:$Vz,138:$VA,139:$VB},o($VC,[2,3]),o($VC,[2,4]),o($VC,[2,5]),o($VC,[2,6]),o($VC,[2,7]),o($VC,[2,8]),o($VC,[2,9]),o($VC,[2,10]),{13:[1,57],15:[1,56]},{16:58,69:59,70:$VD,72:$VE,73:$VF,75:$VG,76:$VH,77:$VI,78:$VJ,79:$VK,80:$VL,81:$VM,82:$VN,83:$VO,84:$VP,85:$VQ,86:$VR,87:75,88:76,91:$VS,92:$VT,93:$VU,94:$VV,95:$VW,96:$VX,97:$VY,98:$VZ,99:$V_,100:$V$,101:$V01,102:$V11,103:$V21,104:$V31,105:$V41,106:$V51,107:$V61,108:$V71,109:$V81,110:$V91,111:$Va1,112:$Vb1,113:$Vc1,114:$Vd1,116:$Ve1,117:$Vf1,118:$Vg1,119:$Vh1,120:$Vi1},{15:[1,106]},{19:107,29:[1,108],30:[1,109]},{23:[1,110]},{23:[1,111]},{32:[1,112]},o($VC,[2,20]),o($Vj1,[2,52],{35:[1,114],36:[1,115],59:[1,113]}),{21:$V4,23:$V5,30:$V9,33:$Vb,61:116,62:22,63:$Vd,64:$Ve,65:25,66:26,67:$Vf,89:$Vg,90:$Vh,115:$Vi,121:$Vj,122:$Vk,123:$Vl,124:$Vm,125:$Vn,126:$Vo,127:$Vp,128:$Vq,129:$Vr,130:$Vs,131:$Vt,132:$Vu,133:$Vv,134:$Vw,135:$Vx,136:$Vy,137:$Vz,138:$VA,139:$VB},o($Vk1,[2,56],{37:$Vl1}),o($Vm1,[2,58]),o($Vm1,[2,59]),o($Vm1,[2,60]),o($Vm1,[2,61]),o($Vm1,[2,62]),o($Vm1,[2,65],{38:[1,118]}),o($Vm1,[2,66],{38:[1,119]}),o($Vm1,[2,67]),o($Vm1,[2,68]),o($Vn1,[2,142]),o($Vn1,[2,143]),o($Vn1,[2,144]),o($Vn1,[2,145]),o($Vn1,[2,146]),o($Vn1,[2,147]),o($Vn1,[2,148]),o($Vn1,[2,149]),o($Vn1,[2,150]),o($Vn1,[2,151]),o($Vn1,[2,152]),o($Vn1,[2,153]),o($Vn1,[2,154]),o($Vn1,[2,155]),o($Vn1,[2,156]),o($Vn1,[2,157]),o($Vm1,[2,135]),o($Vm1,[2,136]),o($Vm1,[2,137]),o($Vm1,[2,138]),o($Vm1,[2,139]),o($Vm1,[2,140]),o($Vm1,[2,141]),{1:[2,1]},o($VC,[2,2]),{16:120,69:59,70:$VD,72:$VE,73:$VF,75:$VG,76:$VH,77:$VI,78:$VJ,79:$VK,80:$VL,81:$VM,82:$VN,83:$VO,84:$VP,85:$VQ,86:$VR,87:75,88:76,91:$VS,92:$VT,93:$VU,94:$VV,95:$VW,96:$VX,97:$VY,98:$VZ,99:$V_,100:$V$,101:$V01,102:$V11,103:$V21,104:$V31,105:$V41,106:$V51,107:$V61,108:$V71,109:$V81,110:$V91,111:$Va1,112:$Vb1,113:$Vc1,114:$Vd1,116:$Ve1,117:$Vf1,118:$Vg1,119:$Vh1,120:$Vi1},o($VC,[2,12]),{13:[1,121],68:$Vo1},o($Vp1,[2,72]),{56:[1,123]},{56:[1,124]},{56:[1,125]},{56:[1,126]},{56:[1,127]},{56:[1,128]},{56:[1,129]},{56:[1,130]},{56:[1,131]},{56:[1,132]},{56:[1,133]},{56:[1,134]},{56:[1,135]},{56:[1,136]},{56:[1,137]},{56:[1,138]},{56:[1,139]},{56:[1,140]},o($Vp1,[2,107]),o($Vp1,[2,108]),o($Vp1,[2,109]),o($Vp1,[2,110]),o($Vp1,[2,111]),o($Vp1,[2,112]),o($Vp1,[2,113]),o($Vp1,[2,114]),o($Vp1,[2,115]),o($Vp1,[2,116]),o($Vp1,[2,117]),o($Vp1,[2,118]),o($Vp1,[2,119]),o($Vp1,[2,120]),o($Vp1,[2,121]),o($Vp1,[2,122]),o($Vp1,[2,123]),o($Vp1,[2,124]),o($Vp1,[2,125]),o($Vp1,[2,126]),o($Vp1,[2,127]),o($Vp1,[2,128]),{56:[1,141]},{56:[2,130]},{56:[2,131]},{56:[2,132]},{56:[2,133]},{56:[2,134]},o($VC,[2,14]),{17:[1,142]},{17:[2,21]},{17:[2,22]},{25:[1,143]},{25:[1,144]},o($VC,[2,23]),{30:$V9,60:145,65:146,89:$Vg,90:$Vh,115:$Vi,128:$Vq,129:$Vr,130:$Vs,131:$Vt,132:$Vu,133:$Vv,134:$Vw,135:$Vx,136:$Vy,137:$Vz,138:$VA,139:$VB},{21:$V4,23:$V5,30:$V9,33:$Vb,61:147,62:22,63:$Vd,64:$Ve,65:25,66:26,67:$Vf,89:$Vg,90:$Vh,115:$Vi,121:$Vj,122:$Vk,123:$Vl,124:$Vm,125:$Vn,126:$Vo,127:$Vp,128:$Vq,129:$Vr,130:$Vs,131:$Vt,132:$Vu,133:$Vv,134:$Vw,135:$Vx,136:$Vy,137:$Vz,138:$VA,139:$VB},{21:$V4,23:$V5,30:$V9,33:$Vb,61:148,62:22,63:$Vd,64:$Ve,65:25,66:26,67:$Vf,89:$Vg,90:$Vh,115:$Vi,121:$Vj,122:$Vk,123:$Vl,124:$Vm,125:$Vn,126:$Vo,127:$Vp,128:$Vq,129:$Vr,130:$Vs,131:$Vt,132:$Vu,133:$Vv,134:$Vw,135:$Vx,136:$Vy,137:$Vz,138:$VA,139:$VB},o($Vk1,[2,55],{37:$Vl1}),{21:$V4,23:$V5,30:$V9,33:$Vb,62:149,63:$Vd,64:$Ve,65:25,66:26,67:$Vf,89:$Vg,90:$Vh,115:$Vi,121:$Vj,122:$Vk,123:$Vl,124:$Vm,125:$Vn,126:$Vo,127:$Vp,128:$Vq,129:$Vr,130:$Vs,131:$Vt,132:$Vu,133:$Vv,134:$Vw,135:$Vx,136:$Vy,137:$Vz,138:$VA,139:$VB},{21:[1,150]},{33:[1,151]},{13:[1,152],68:$Vo1},o($VC,[2,13]),{69:153,70:$VD,72:$VE,73:$VF,75:$VG,76:$VH,77:$VI,78:$VJ,79:$VK,80:$VL,81:$VM,82:$VN,83:$VO,84:$VP,85:$VQ,86:$VR,87:75,88:76,91:$VS,92:$VT,93:$VU,94:$VV,95:$VW,96:$VX,97:$VY,98:$VZ,99:$V_,100:$V$,101:$V01,102:$V11,103:$V21,104:$V31,105:$V41,106:$V51,107:$V61,108:$V71,109:$V81,110:$V91,111:$Va1,112:$Vb1,113:$Vc1,114:$Vd1,116:$Ve1,117:$Vf1,118:$Vg1,119:$Vh1,120:$Vi1},{17:$Vq1,71:154,133:$Vr1,142:$Vs1,143:$Vt1,144:$Vu1},{17:$Vq1,71:160,133:$Vr1,142:$Vs1,143:$Vt1,144:$Vu1},{21:$Vv1,74:161,89:$Vw1,90:$Vx1},{21:$Vv1,74:165,89:$Vw1,90:$Vx1},{21:$Vv1,74:166,89:$Vw1,90:$Vx1},{21:$Vv1,74:167,89:$Vw1,90:$Vx1},{21:$Vv1,74:168,89:$Vw1,90:$Vx1},{21:$Vv1,74:169,89:$Vw1,90:$Vx1},{21:$Vv1,74:170,89:$Vw1,90:$Vx1},{21:$Vv1,74:171,89:$Vw1,90:$Vx1},{21:$Vv1,74:172,89:$Vw1,90:$Vx1},{21:$Vv1,74:173,89:$Vw1,90:$Vx1},{21:$Vv1,74:174,89:$Vw1,90:$Vx1},{21:$Vv1,74:175,89:$Vw1,90:$Vx1},{17:[1,176],67:[1,179],89:[1,177],90:[1,178]},{17:[1,180],67:[1,183],89:[1,181],90:[1,182]},{17:[1,184]},{17:[1,185],67:[1,186]},{115:[1,187]},o($VC,[2,15],{20:[1,188]}),{21:$Vy1,23:$Vz1,26:189,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:196,33:$VA1,36:$VB1,54:$VC1,56:$VD1},o($Vj1,[2,51],{68:[1,197]}),o($VE1,[2,70]),o($Vk1,[2,53],{37:$Vl1}),o($Vk1,[2,54],{37:$Vl1}),o($Vm1,[2,57]),o($Vm1,[2,63]),o($Vm1,[2,64]),o($VC,[2,11]),o($Vp1,[2,71]),{57:[1,198]},{35:[1,199],36:[1,200],57:[2,158],140:[1,201],141:[1,202]},{15:[1,203]},{15:[1,204]},{15:[1,205]},{20:[1,207],35:[1,206],57:[2,181]},{57:[1,208]},{57:[1,209]},{57:[2,189]},{35:[1,210],57:[2,190]},{35:[1,211],57:[2,191]},{57:[1,212]},{57:[1,213]},{57:[1,214]},{57:[1,215]},{57:[1,216]},{57:[1,217]},{57:[1,218]},{57:[1,219]},{57:[1,220]},{57:[1,221]},{57:[1,222]},{57:[1,223]},{57:[1,224]},{57:[1,225]},{35:[1,226]},{57:[1,227],68:[1,228]},{57:[1,229],68:[1,230]},{57:[1,231],68:[1,232]},{35:[1,233]},{57:[1,234],68:[1,235]},{57:[1,236]},{35:[1,237]},{57:[1,238]},{21:[1,239],23:[1,240]},o($VF1,[2,18],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1,43:$VO1,44:$VP1,45:$VQ1,46:$VR1,47:$VS1,48:$VT1,49:$VU1,50:$VV1,51:$VW1,52:$VX1,53:$VY1,55:$VZ1}),o($V_1,[2,24]),o($V_1,[2,25]),o($V_1,[2,26],{34:[1,261]}),{21:$Vy1,23:$Vz1,26:262,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:263,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:264,33:$VA1,36:$VB1,54:$VC1,56:$VD1},o($VF1,[2,19],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1,43:$VO1,44:$VP1,45:$VQ1,46:$VR1,47:$VS1,48:$VT1,49:$VU1,50:$VV1,51:$VW1,52:$VX1,53:$VY1,55:$VZ1}),{30:$V9,65:265,89:$Vg,90:$Vh,115:$Vi,128:$Vq,129:$Vr,130:$Vs,131:$Vt,132:$Vu,133:$Vv,134:$Vw,135:$Vx,136:$Vy,137:$Vz,138:$VA,139:$VB},o($Vp1,[2,73]),{21:[1,266]},{21:[1,267]},{57:[2,161]},{57:[2,162]},{89:[1,269],90:[1,268]},{89:[1,271],90:[1,270]},{89:[1,273],90:[1,272]},{21:[1,276],89:[1,274],90:[1,275]},{21:[1,278],90:[1,277]},o($Vp1,[2,74]),o($Vp1,[2,75]),{21:[1,279]},{21:[1,280]},o($Vp1,[2,76]),o($Vp1,[2,77]),o($Vp1,[2,78]),o($Vp1,[2,79]),o($Vp1,[2,80]),o($Vp1,[2,81]),o($Vp1,[2,82]),o($Vp1,[2,83]),o($Vp1,[2,84]),o($Vp1,[2,85]),o($Vp1,[2,86]),o($Vp1,[2,87]),o($Vp1,[2,92]),o($Vp1,[2,93]),{89:[1,281],90:[1,282]},o($Vp1,[2,88]),{17:[1,283]},o($Vp1,[2,96]),{17:[1,284]},o($Vp1,[2,97]),{17:[1,285]},{89:[1,286],90:[1,287]},o($Vp1,[2,90]),{17:[1,288]},o($Vp1,[2,104]),{89:[1,289],90:[1,290]},o($Vp1,[2,129]),{22:[1,291]},{22:[1,292]},{21:$Vy1,23:$Vz1,26:293,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:294,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:295,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:296,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:297,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:298,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:299,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:300,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:301,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:302,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:303,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:304,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:305,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:306,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:307,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:308,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:309,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:310,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:311,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:312,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:313,33:$VA1,36:$VB1,54:$VC1,56:$VD1},o($V$1,[2,34],{37:$VI1,38:$VJ1,39:$VK1,40:$VL1}),o($V_1,[2,48]),{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1,43:$VO1,44:$VP1,45:$VQ1,46:$VR1,47:$VS1,48:$VT1,49:$VU1,50:$VV1,51:$VW1,52:$VX1,53:$VY1,55:$VZ1,57:[1,314]},o($VE1,[2,69]),{57:[2,159]},{57:[2,160]},{35:[1,315],36:[1,316],57:[2,165]},{35:[1,317],36:[1,318],57:[2,168]},{35:[1,319],36:[1,320],57:[2,171]},{35:[1,321],36:[1,322],57:[2,174]},{35:[1,323],36:[1,324],57:[2,177]},{35:[1,325],36:[1,326],57:[2,180]},{57:[2,182]},{57:[2,183]},{57:[2,187]},{22:[1,327],35:[1,329],36:[1,328]},{22:[1,330]},{57:[2,192]},{57:[2,193]},{57:[1,331]},{57:[1,332]},{57:[1,333]},{57:[1,334]},{57:[1,335]},{57:[1,336],68:[1,337]},{57:[1,338],68:[1,339]},{57:[1,340]},{57:[1,341]},{57:[1,342]},o($VC,[2,16]),o($VC,[2,17]),o($V$1,[2,28],{37:$VI1,38:$VJ1,39:$VK1,40:$VL1}),o($V$1,[2,29],{37:$VI1,38:$VJ1,39:$VK1,40:$VL1}),o($V_1,[2,30]),o($V_1,[2,31]),o($V_1,[2,32]),o($V_1,[2,33]),o($V02,[2,35],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1}),o($V02,[2,36],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1}),o([5,13,15,17,18,21,23,24,27,28,30,31,33,43,52,53,55,57,63,64,67,89,90,115,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139],[2,37],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1,44:$VP1,45:$VQ1,46:$VR1,47:$VS1,48:$VT1,49:$VU1,50:$VV1,51:$VW1}),o([5,13,15,17,18,21,23,24,27,28,30,31,33,43,44,45,52,53,55,57,63,64,67,89,90,115,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139],[2,38],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1,46:$VR1,47:$VS1,48:$VT1,49:$VU1,50:$VV1,51:$VW1}),o([5,13,15,17,18,21,23,24,27,28,30,31,33,43,45,52,53,55,57,63,64,67,89,90,115,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139],[2,39],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1,44:$VP1,46:$VR1,47:$VS1,48:$VT1,49:$VU1,50:$VV1,51:$VW1}),o($V12,[2,40],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1}),o($V12,[2,41],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1}),o($V12,[2,42],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1}),o($V12,[2,43],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1}),o($V22,[2,44],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1,46:$VR1,47:$VS1,48:$VT1,49:$VU1}),o($V22,[2,45],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1,46:$VR1,47:$VS1,48:$VT1,49:$VU1}),o([5,13,15,17,18,21,23,24,27,28,30,31,33,52,53,55,57,63,64,67,89,90,115,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139],[2,46],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1,43:$VO1,44:$VP1,45:$VQ1,46:$VR1,47:$VS1,48:$VT1,49:$VU1,50:$VV1,51:$VW1}),o([5,13,15,17,18,21,23,24,27,28,30,31,33,53,55,57,63,64,67,89,90,115,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139],[2,47],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1,43:$VO1,44:$VP1,45:$VQ1,46:$VR1,47:$VS1,48:$VT1,49:$VU1,50:$VV1,51:$VW1,52:$VX1}),{15:[1,343],35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1,43:$VO1,44:$VP1,45:$VQ1,46:$VR1,47:$VS1,48:$VT1,49:$VU1,50:$VV1,51:$VW1,52:$VX1,53:$VY1,55:$VZ1},o([5,13,15,17,18,21,23,24,27,28,30,31,33,55,57,63,64,67,89,90,115,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139],[2,27],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1,43:$VO1,44:$VP1,45:$VQ1,46:$VR1,47:$VS1,48:$VT1,49:$VU1,50:$VV1,51:$VW1,52:$VX1,53:$VY1}),o($V_1,[2,50]),{21:[1,344]},{21:[1,345]},{21:[1,346]},{21:[1,347]},{21:[1,348]},{21:[1,349]},{21:[1,350]},{21:[1,351]},{21:[1,352]},{21:[1,353]},{21:[1,354]},{21:[1,355]},{57:[2,184]},{21:[1,356]},{21:[1,357]},{57:[2,188]},o($Vp1,[2,94]),o($Vp1,[2,95]),o($Vp1,[2,89]),o($Vp1,[2,100]),o($Vp1,[2,101]),o($Vp1,[2,98]),{17:[1,358]},o($Vp1,[2,99]),{17:[1,359]},o($Vp1,[2,91]),o($Vp1,[2,105]),o($Vp1,[2,106]),{21:$Vy1,23:$Vz1,26:360,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{57:[2,163]},{57:[2,164]},{57:[2,166]},{57:[2,167]},{57:[2,169]},{57:[2,170]},{57:[2,172]},{57:[2,173]},{57:[2,175]},{57:[2,176]},{57:[2,178]},{57:[2,179]},{22:[1,361]},{22:[1,362]},{57:[1,363]},{57:[1,364]},o([5,13,15,17,18,21,23,24,27,28,30,31,33,57,63,64,67,89,90,115,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139],[2,49],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1,43:$VO1,44:$VP1,45:$VQ1,46:$VR1,47:$VS1,48:$VT1,49:$VU1,50:$VV1,51:$VW1,52:$VX1,53:$VY1,55:$VZ1}),{57:[2,185]},{57:[2,186]},o($Vp1,[2,102]),o($Vp1,[2,103])], +defaultActions: {54:[2,1],101:[2,130],102:[2,131],103:[2,132],104:[2,133],105:[2,134],108:[2,21],109:[2,22],162:[2,189],201:[2,161],202:[2,162],266:[2,159],267:[2,160],274:[2,182],275:[2,183],276:[2,187],279:[2,192],280:[2,193],327:[2,184],330:[2,188],344:[2,163],345:[2,164],346:[2,166],347:[2,167],348:[2,169],349:[2,170],350:[2,172],351:[2,173],352:[2,175],353:[2,176],354:[2,178],355:[2,179],361:[2,185],362:[2,186]}, parseError: function parseError (str, hash) { if (hash.recoverable) { this.trace(str); diff --git a/src/zkasm_parser.jison b/src/zkasm_parser.jison index ecdc5f9..aad48fc 100644 --- a/src/zkasm_parser.jison +++ b/src/zkasm_parser.jison @@ -821,6 +821,18 @@ addr { $$ = { isStack: 0, isMem:0, ind:1, indRR: 0, incStack: 0, offset: 0} } + | SYS ':' RR '+' NUMBER + { + $$ = { isStack: 0, isMem:0, ind:0, indRR: 1, incStack: 0, offset: $5} + } + | SYS ':' RR '-' NUMBER + { + $$ = { isStack: 0, isMem:0, ind:0, indRR: 1, incStack: 0, offset: -$5} + } + | SYS ':' RR + { + $$ = { isStack: 0, isMem:0, ind:0, indRR: 1, incStack: 0, offset: 0} + } | MEM ':' E '+' NUMBER { $$ = { isStack: 0, isMem: 1, ind:1, indRR: 0, incStack: 0, offset: $5, useCTX: 1} @@ -833,6 +845,18 @@ addr { $$ = { isStack: 0, isMem: 1, ind:1, indRR: 0, incStack: 0, offset: 0, useCTX: 1} } + | MEM ':' RR '+' NUMBER + { + $$ = { isStack: 0, isMem: 1, ind:0, indRR: 1, incStack: 0, offset: $5, useCTX: 1} + } + | MEM ':' RR '-' NUMBER + { + $$ = { isStack: 0, isMem: 1, ind:0, indRR: 1, incStack: 0, offset: -$5, useCTX: 1} + } + | MEM ':' RR + { + $$ = { isStack: 0, isMem: 1, ind:0, indRR: 1, incStack: 0, offset: 0, useCTX: 1} + } | STACK ':' E '+' NUMBER { $$ = { isStack: 1, ind:1, indRR: 0, incStack: 0, offset: $5, useCTX: 1} @@ -845,6 +869,18 @@ addr { $$ = { isStack: 1, ind:1, indRR: 0, incStack: 0, offset: 0, useCTX: 1} } + | STACK ':' RR '+' NUMBER + { + $$ = { isStack: 1, ind:0, indRR: 1, incStack: 0, offset: $5, useCTX: 1} + } + | STACK ':' RR '-' NUMBER + { + $$ = { isStack: 1, ind:0, indRR: 1, incStack: 0, offset: -$5, useCTX: 1} + } + | STACK ':' RR + { + $$ = { isStack: 1, ind:0, indRR: 1, incStack: 0, offset: 0, useCTX: 1} + } | IDENTIFIER { $$ = { offset: $1 } From b1162e855a540df142562da08666c2f63ed2e29c Mon Sep 17 00:00:00 2001 From: zkronos73 Date: Mon, 12 Feb 2024 12:08:25 +0100 Subject: [PATCH 5/7] add extra information to control bounds --- src/compiler.js | 42 +++++++++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/src/compiler.js b/src/compiler.js index 22bc746..4e0f7d2 100644 --- a/src/compiler.js +++ b/src/compiler.js @@ -11,6 +11,8 @@ const maxConstl = (1n << 256n) - 1n; const minConstl = 0n; const readOnlyRegisters = ['STEP', 'ROTL_C']; +const MAX_GLOBAL_VAR = 0x10000; + module.exports = async function compile(fileName, ctx, config = {}) { let isMain; @@ -67,26 +69,23 @@ module.exports = async function compile(fileName, ctx, config = {}) { } else if (l.type == "var") { if (typeof ctx.vars[l.name] !== "undefined") error(l, `Variable ${l.name} already defined`); if (l.scope == "GLOBAL") { + const count = typeof l.count === 'string' ? Number(getConstantValue(ctx, l.count)) : l.count; ctx.vars[l.name] = { scope: "GLOBAL", + count, offset: ctx.lastGlobalVarAssigned + 1 } - if (typeof l.count === 'string') { - ctx.lastGlobalVarAssigned += Number(getConstantValue(ctx, l.count)); - } else { - ctx.lastGlobalVarAssigned += l.count; - } + ctx.lastGlobalVarAssigned += count; } else if (l.scope == "CTX") { + const count = typeof l.count === 'string' ? Number(getConstantValue(ctx, l.count)) : l.count; ctx.vars[l.name] = { scope: "CTX", + count, offset: ctx.lastLocalVarCtxAssigned + 1 } - if (typeof l.count === 'string') { - ctx.lastGlobalVarAssigned += Number(getConstantValue(ctx, l.count)); - } else { - ctx.lastGlobalVarAssigned += l.count; - } - ctx.lastLocalVarCtxAssigned += l.count; + // ??? + ctx.lastGlobalVarAssigned += count; + ctx.lastLocalVarCtxAssigned += count; } else { throw error(l, `Invalid scope ${l.scope}`); } @@ -179,14 +178,21 @@ module.exports = async function compile(fileName, ctx, config = {}) { ctx.out[i].offset = 0; } else { - if (ctx.vars[ctx.out[i].offset].scope === 'CTX') { + const label = ctx.out[i].offset; + if (ctx.vars[label].scope === 'CTX') { ctx.out[i].useCTX = 1; - } else if (ctx.vars[ctx.out[i].offset].scope === 'GLOBAL') { + } else if (ctx.vars[label].scope === 'GLOBAL') { ctx.out[i].useCTX = 0; } else { - error(ctx.out[i].line, `Invalid variable scope: ${ctx.out[i].offset} not defined.`); + error(ctx.out[i].line, `Invalid variable scope: ${label} not defined.`); + } + + ctx.out[i].offset = ctx.vars[label].offset + (ctx.out[i].extraOffset ?? 0); + if (ctx.vars[label].count > 1) { + ctx.out[i].maxInd = (ctx.vars[label].offset + ctx.vars[label].count - 1) - ctx.out[i].offset; + ctx.out[i].baseLabel = ctx.vars[label].offset; + ctx.out[i].sizeLabel = ctx.vars[label].count; } - ctx.out[i].offset = ctx.vars[ctx.out[i].offset].offset + (ctx.out[i].extraOffset ?? 0); } } } @@ -226,6 +232,12 @@ module.exports = async function compile(fileName, ctx, config = {}) { constants: stringifyBigInts(ctx.constants) } + console.log(`GLOBAL memory: \x1B[1;35m${ctx.lastGlobalVarAssigned} ${(ctx.lastGlobalVarAssigned * 100.0/MAX_GLOBAL_VAR).toFixed(2)}%\x1B[0m`); + console.log(`LOCAL memory: ${ctx.lastLocalVarCtxAssigned}`); + + if (ctx.lastGlobalVarAssigned >= MAX_GLOBAL_VAR) { + throw new Error(`GLOBAL memory is too big ${ctx.lastGlobalVarAssigned} x 256-bit`); + } return res; } From 016aef36dd931408e1a051d7949aff7b9ca871eb Mon Sep 17 00:00:00 2001 From: zkronos73 Date: Tue, 13 Feb 2024 06:53:06 +0100 Subject: [PATCH 6/7] update memory use info --- src/compiler.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/compiler.js b/src/compiler.js index 4e0f7d2..b451d96 100644 --- a/src/compiler.js +++ b/src/compiler.js @@ -83,7 +83,6 @@ module.exports = async function compile(fileName, ctx, config = {}) { count, offset: ctx.lastLocalVarCtxAssigned + 1 } - // ??? ctx.lastGlobalVarAssigned += count; ctx.lastLocalVarCtxAssigned += count; } else { @@ -232,11 +231,11 @@ module.exports = async function compile(fileName, ctx, config = {}) { constants: stringifyBigInts(ctx.constants) } - console.log(`GLOBAL memory: \x1B[1;35m${ctx.lastGlobalVarAssigned} ${(ctx.lastGlobalVarAssigned * 100.0/MAX_GLOBAL_VAR).toFixed(2)}%\x1B[0m`); - console.log(`LOCAL memory: ${ctx.lastLocalVarCtxAssigned}`); + console.log(`GLOBAL memory: \x1B[1;35m${ctx.lastGlobalVarAssigned+1} ${((ctx.lastGlobalVarAssigned+1) * 100.0/MAX_GLOBAL_VAR).toFixed(2)}%\x1B[0m`); + console.log(`LOCAL memory: ${ctx.lastLocalVarCtxAssigned+1}`); - if (ctx.lastGlobalVarAssigned >= MAX_GLOBAL_VAR) { - throw new Error(`GLOBAL memory is too big ${ctx.lastGlobalVarAssigned} x 256-bit`); + if (ctx.lastGlobalVarAssigned > MAX_GLOBAL_VAR) { + throw new Error(`GLOBAL memory is too big ${ctx.lastGlobalVarAssigned+1} x 256-bit`); } return res; } From 1037b36be23b7c124b6157e32f2ca4cb86e76633 Mon Sep 17 00:00:00 2001 From: zkronos73 <94566827+zkronos73@users.noreply.github.com> Date: Wed, 14 Feb 2024 13:34:53 +0100 Subject: [PATCH 7/7] Revert "feature/multi indirection" --- build/zkasm_parser.js | 339 ++++++++++++++++++++++------------------- src/zkasm_parser.jison | 249 ++++++++++++++---------------- 2 files changed, 302 insertions(+), 286 deletions(-) diff --git a/build/zkasm_parser.js b/build/zkasm_parser.js index 7a8ae16..1e0e0d5 100644 --- a/build/zkasm_parser.js +++ b/build/zkasm_parser.js @@ -72,12 +72,12 @@ } */ var zkasm_parser = (function(){ -var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,10],$V1=[1,12],$V2=[1,13],$V3=[1,14],$V4=[1,27],$V5=[1,29],$V6=[1,15],$V7=[1,16],$V8=[1,18],$V9=[1,37],$Va=[1,17],$Vb=[1,28],$Vc=[1,20],$Vd=[1,23],$Ve=[1,24],$Vf=[1,30],$Vg=[1,46],$Vh=[1,47],$Vi=[1,48],$Vj=[1,49],$Vk=[1,50],$Vl=[1,51],$Vm=[1,52],$Vn=[1,53],$Vo=[1,31],$Vp=[1,32],$Vq=[1,33],$Vr=[1,34],$Vs=[1,35],$Vt=[1,36],$Vu=[1,38],$Vv=[1,39],$Vw=[1,40],$Vx=[1,41],$Vy=[1,42],$Vz=[1,43],$VA=[1,44],$VB=[1,45],$VC=[5,13,15,17,18,21,23,24,27,28,30,31,33,36,63,64,67,114,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141],$VD=[1,60],$VE=[1,61],$VF=[1,62],$VG=[1,63],$VH=[1,64],$VI=[1,65],$VJ=[1,66],$VK=[1,67],$VL=[1,68],$VM=[1,69],$VN=[1,70],$VO=[1,71],$VP=[1,72],$VQ=[1,73],$VR=[1,74],$VS=[1,77],$VT=[1,78],$VU=[1,79],$VV=[1,80],$VW=[1,81],$VX=[1,82],$VY=[1,83],$VZ=[1,84],$V_=[1,85],$V$=[1,86],$V01=[1,87],$V11=[1,88],$V21=[1,89],$V31=[1,90],$V41=[1,91],$V51=[1,92],$V61=[1,93],$V71=[1,94],$V81=[1,95],$V91=[1,96],$Va1=[1,97],$Vb1=[1,98],$Vc1=[1,99],$Vd1=[1,100],$Ve1=[1,103],$Vf1=[1,104],$Vg1=[1,105],$Vh1=[1,101],$Vi1=[1,102],$Vj1=[13,15],$Vk1=[13,15,35,36,59],$Vl1=[1,117],$Vm1=[13,15,35,36,37,59],$Vn1=[13,15,35,36,37,59,68],$Vo1=[1,122],$Vp1=[13,68],$Vq1=[1,160],$Vr1=[1,163],$Vs1=[1,164],$Vt1=[1,165],$Vu1=[1,155],$Vv1=[1,166],$Vw1=[1,156],$Vx1=[1,157],$Vy1=[1,158],$Vz1=[1,169],$VA1=[1,170],$VB1=[1,171],$VC1=[1,184],$VD1=[1,185],$VE1=[1,192],$VF1=[1,194],$VG1=[1,193],$VH1=[1,195],$VI1=[1,196],$VJ1=[1,197],$VK1=[13,15,68],$VL1=[22,57,68],$VM1=[1,211],$VN1=[1,212],$VO1=[22,35,36,57,68],$VP1=[1,213],$VQ1=[1,214],$VR1=[57,68],$VS1=[5,13,15,17,18,21,23,24,27,28,30,31,33,63,64,67,114,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141],$VT1=[1,241],$VU1=[1,242],$VV1=[1,243],$VW1=[1,244],$VX1=[1,245],$VY1=[1,246],$VZ1=[1,247],$V_1=[1,248],$V$1=[1,249],$V02=[1,250],$V12=[1,251],$V22=[1,252],$V32=[1,253],$V42=[1,254],$V52=[1,255],$V62=[1,256],$V72=[1,257],$V82=[1,258],$V92=[1,259],$Va2=[1,260],$Vb2=[5,13,15,17,18,21,23,24,27,28,30,31,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,55,57,63,64,67,114,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141],$Vc2=[1,273],$Vd2=[1,274],$Ve2=[21,23,132,137],$Vf2=[5,13,15,17,18,21,23,24,27,28,30,31,33,35,36,41,42,43,44,45,46,47,48,49,50,51,52,53,55,57,63,64,67,114,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141],$Vg2=[2,156],$Vh2=[2,157],$Vi2=[5,13,15,17,18,21,23,24,27,28,30,31,33,41,42,43,44,45,46,47,48,49,50,51,52,53,55,57,63,64,67,114,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141],$Vj2=[5,13,15,17,18,21,23,24,27,28,30,31,33,43,44,45,46,47,48,49,50,51,52,53,55,57,63,64,67,114,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141],$Vk2=[5,13,15,17,18,21,23,24,27,28,30,31,33,43,44,45,50,51,52,53,55,57,63,64,67,114,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141]; +var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,10],$V1=[1,12],$V2=[1,13],$V3=[1,14],$V4=[1,27],$V5=[1,29],$V6=[1,15],$V7=[1,16],$V8=[1,18],$V9=[1,37],$Va=[1,17],$Vb=[1,28],$Vc=[1,20],$Vd=[1,23],$Ve=[1,24],$Vf=[1,30],$Vg=[1,41],$Vh=[1,35],$Vi=[1,46],$Vj=[1,47],$Vk=[1,48],$Vl=[1,49],$Vm=[1,50],$Vn=[1,51],$Vo=[1,52],$Vp=[1,53],$Vq=[1,31],$Vr=[1,32],$Vs=[1,33],$Vt=[1,34],$Vu=[1,36],$Vv=[1,38],$Vw=[1,39],$Vx=[1,40],$Vy=[1,42],$Vz=[1,43],$VA=[1,44],$VB=[1,45],$VC=[5,13,15,17,18,21,23,24,27,28,30,31,33,36,63,64,67,89,90,115,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139],$VD=[1,60],$VE=[1,61],$VF=[1,62],$VG=[1,63],$VH=[1,64],$VI=[1,65],$VJ=[1,66],$VK=[1,67],$VL=[1,68],$VM=[1,69],$VN=[1,70],$VO=[1,71],$VP=[1,72],$VQ=[1,73],$VR=[1,74],$VS=[1,77],$VT=[1,78],$VU=[1,79],$VV=[1,80],$VW=[1,81],$VX=[1,82],$VY=[1,83],$VZ=[1,84],$V_=[1,85],$V$=[1,86],$V01=[1,87],$V11=[1,88],$V21=[1,89],$V31=[1,90],$V41=[1,91],$V51=[1,92],$V61=[1,93],$V71=[1,94],$V81=[1,95],$V91=[1,96],$Va1=[1,97],$Vb1=[1,98],$Vc1=[1,99],$Vd1=[1,100],$Ve1=[1,101],$Vf1=[1,102],$Vg1=[1,103],$Vh1=[1,104],$Vi1=[1,105],$Vj1=[13,15],$Vk1=[13,15,35,36,59],$Vl1=[1,117],$Vm1=[13,15,35,36,37,59],$Vn1=[13,15,35,36,37,59,68],$Vo1=[1,122],$Vp1=[13,68],$Vq1=[1,159],$Vr1=[1,155],$Vs1=[1,156],$Vt1=[1,157],$Vu1=[1,158],$Vv1=[1,162],$Vw1=[1,164],$Vx1=[1,163],$Vy1=[1,190],$Vz1=[1,192],$VA1=[1,191],$VB1=[1,193],$VC1=[1,194],$VD1=[1,195],$VE1=[13,15,68],$VF1=[5,13,15,17,18,21,23,24,27,28,30,31,33,63,64,67,89,90,115,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139],$VG1=[1,241],$VH1=[1,242],$VI1=[1,243],$VJ1=[1,244],$VK1=[1,245],$VL1=[1,246],$VM1=[1,247],$VN1=[1,248],$VO1=[1,249],$VP1=[1,250],$VQ1=[1,251],$VR1=[1,252],$VS1=[1,253],$VT1=[1,254],$VU1=[1,255],$VV1=[1,256],$VW1=[1,257],$VX1=[1,258],$VY1=[1,259],$VZ1=[1,260],$V_1=[5,13,15,17,18,21,23,24,27,28,30,31,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,55,57,63,64,67,89,90,115,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139],$V$1=[5,13,15,17,18,21,23,24,27,28,30,31,33,35,36,41,42,43,44,45,46,47,48,49,50,51,52,53,55,57,63,64,67,89,90,115,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139],$V02=[5,13,15,17,18,21,23,24,27,28,30,31,33,41,42,43,44,45,46,47,48,49,50,51,52,53,55,57,63,64,67,89,90,115,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139],$V12=[5,13,15,17,18,21,23,24,27,28,30,31,33,43,44,45,46,47,48,49,50,51,52,53,55,57,63,64,67,89,90,115,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139],$V22=[5,13,15,17,18,21,23,24,27,28,30,31,33,43,44,45,50,51,52,53,55,57,63,64,67,89,90,115,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139]; var parser = {trace: function trace () { }, yy: {}, -symbols_: {"error":2,"allStatments":3,"statmentList":4,"EOF":5,"statment":6,"step":7,"label":8,"varDef":9,"constDef":10,"include":11,"command":12,"LF":13,"assignment":14,":":15,"opList":16,"IDENTIFIER":17,"VAR":18,"scope":19,"[":20,"NUMBER":21,"]":22,"CONSTID":23,"CONST":24,"=":25,"nexpr":26,"CONSTL":27,"COMMAND":28,"GLOBAL":29,"CTX":30,"INCLUDE":31,"STRING":32,"NUMBERL":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,"inRegsSum":58,"=>":59,"regsList":60,"inRegP":61,"inReg":62,"TAG":63,"TAG_0":64,"reg":65,"counter":66,"REFERENCE":67,",":68,"op":69,"MLOAD":70,"addr":71,"MSTORE":72,"HASHK":73,"hashId":74,"HASHK1":75,"HASHKLEN":76,"HASHKDIGEST":77,"HASHS":78,"HASHS1":79,"HASHSLEN":80,"HASHSDIGEST":81,"HASHP":82,"HASHP1":83,"HASHPLEN":84,"HASHPDIGEST":85,"JMP":86,"jmpDestination":87,"jmpNotCond":88,"jmpCond":89,"CALL":90,"RETURN":91,"ASSERT":92,"SLOAD":93,"SSTORE":94,"ARITH":95,"ARITH_ECADD_DIFFERENT":96,"ARITH_ECADD_SAME":97,"ARITH_BN254_MULFP2":98,"ARITH_BN254_ADDFP2":99,"ARITH_BN254_SUBFP2":100,"ADD":101,"SUB":102,"LT":103,"SLT":104,"EQ":105,"AND":106,"OR":107,"XOR":108,"LT4":109,"MEM_ALIGN_RD":110,"MEM_ALIGN_WR":111,"MEM_ALIGN_WR8":112,"REPEAT":113,"RCX":114,"addrRel":115,"JMPN":116,"JMPC":117,"JMPZ":118,"JMPNC":119,"JMPNZ":120,"CNT_ARITH":121,"CNT_BINARY":122,"CNT_KECCAK_F":123,"CNT_SHA256_F":124,"CNT_MEM_ALIGN":125,"CNT_PADDING_PG":126,"CNT_POSEIDON_G":127,"A":128,"B":129,"C":130,"D":131,"E":132,"SR":133,"SP":134,"PC":135,"GAS":136,"RR":137,"zkPC":138,"STEP":139,"HASHPOS":140,"ROTL_C":141,"indRegMul":142,"indReg":143,"indReg2":144,"addrRelOp":145,"addrOffset":146,"++":147,"--":148,"SYS":149,"MEM":150,"STACK":151,"$accept":0,"$end":1}, -terminals_: {2:"error",5:"EOF",13:"LF",15:":",17:"IDENTIFIER",18:"VAR",20:"[",21:"NUMBER",22:"]",23:"CONSTID",24:"CONST",25:"=",27:"CONSTL",28:"COMMAND",29:"GLOBAL",30:"CTX",31:"INCLUDE",32:"STRING",33:"NUMBERL",34:"??",35:"+",36:"-",37:"*",38:"**",39:"%",40:"/",41:"<<",42:">>",43:"|",44:"&",45:"^",46:"<",47:">",48:"<=",49:">=",50:"==",51:"!=",52:"&&",53:"||",54:"!",55:"?",56:"(",57:")",59:"=>",63:"TAG",64:"TAG_0",67:"REFERENCE",68:",",70:"MLOAD",72:"MSTORE",73:"HASHK",75:"HASHK1",76:"HASHKLEN",77:"HASHKDIGEST",78:"HASHS",79:"HASHS1",80:"HASHSLEN",81:"HASHSDIGEST",82:"HASHP",83:"HASHP1",84:"HASHPLEN",85:"HASHPDIGEST",86:"JMP",90:"CALL",91:"RETURN",92:"ASSERT",93:"SLOAD",94:"SSTORE",95:"ARITH",96:"ARITH_ECADD_DIFFERENT",97:"ARITH_ECADD_SAME",98:"ARITH_BN254_MULFP2",99:"ARITH_BN254_ADDFP2",100:"ARITH_BN254_SUBFP2",101:"ADD",102:"SUB",103:"LT",104:"SLT",105:"EQ",106:"AND",107:"OR",108:"XOR",109:"LT4",110:"MEM_ALIGN_RD",111:"MEM_ALIGN_WR",112:"MEM_ALIGN_WR8",113:"REPEAT",114:"RCX",116:"JMPN",117:"JMPC",118:"JMPZ",119:"JMPNC",120:"JMPNZ",121:"CNT_ARITH",122:"CNT_BINARY",123:"CNT_KECCAK_F",124:"CNT_SHA256_F",125:"CNT_MEM_ALIGN",126:"CNT_PADDING_PG",127:"CNT_POSEIDON_G",128:"A",129:"B",130:"C",131:"D",132:"E",133:"SR",134:"SP",135:"PC",136:"GAS",137:"RR",138:"zkPC",139:"STEP",140:"HASHPOS",141:"ROTL_C",147:"++",148:"--",149:"SYS",150:"MEM",151:"STACK"}, -productions_: [0,[3,2],[4,2],[4,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[7,4],[7,2],[7,3],[8,2],[9,3],[9,6],[9,6],[10,4],[10,4],[12,1],[19,1],[19,1],[11,2],[26,1],[26,1],[26,1],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,2],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,2],[26,5],[26,3],[14,3],[14,1],[58,3],[58,3],[58,2],[58,1],[61,3],[61,1],[62,1],[62,1],[62,1],[62,1],[62,3],[62,3],[62,1],[62,1],[62,1],[62,1],[60,3],[60,1],[16,3],[16,1],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,6],[69,4],[69,6],[69,4],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,4],[87,1],[87,3],[87,3],[89,1],[89,1],[89,1],[88,1],[88,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[142,1],[142,1],[143,1],[143,1],[144,1],[144,3],[144,3],[145,1],[145,1],[146,1],[146,1],[115,1],[115,3],[115,5],[115,3],[71,1],[71,3],[71,3],[71,2],[71,2],[71,3],[71,3],[71,3],[71,1],[71,1],[71,3],[71,4],[71,3],[74,1],[74,1],[74,1],[74,3],[74,3]], +symbols_: {"error":2,"allStatments":3,"statmentList":4,"EOF":5,"statment":6,"step":7,"label":8,"varDef":9,"constDef":10,"include":11,"command":12,"LF":13,"assignment":14,":":15,"opList":16,"IDENTIFIER":17,"VAR":18,"scope":19,"[":20,"NUMBER":21,"]":22,"CONSTID":23,"CONST":24,"=":25,"nexpr":26,"CONSTL":27,"COMMAND":28,"GLOBAL":29,"CTX":30,"INCLUDE":31,"STRING":32,"NUMBERL":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,"inRegsSum":58,"=>":59,"regsList":60,"inRegP":61,"inReg":62,"TAG":63,"TAG_0":64,"reg":65,"counter":66,"REFERENCE":67,",":68,"op":69,"MLOAD":70,"addr":71,"MSTORE":72,"HASHK":73,"hashId":74,"HASHK1":75,"HASHKLEN":76,"HASHKDIGEST":77,"HASHS":78,"HASHS1":79,"HASHSLEN":80,"HASHSDIGEST":81,"HASHP":82,"HASHP1":83,"HASHPLEN":84,"HASHPDIGEST":85,"JMP":86,"jmpCond":87,"jmpNotCond":88,"RR":89,"E":90,"CALL":91,"RETURN":92,"ASSERT":93,"SLOAD":94,"SSTORE":95,"ARITH":96,"ARITH_ECADD_DIFFERENT":97,"ARITH_ECADD_SAME":98,"ARITH_BN254_MULFP2":99,"ARITH_BN254_ADDFP2":100,"ARITH_BN254_SUBFP2":101,"ADD":102,"SUB":103,"LT":104,"SLT":105,"EQ":106,"AND":107,"OR":108,"XOR":109,"LT4":110,"MEM_ALIGN_RD":111,"MEM_ALIGN_WR":112,"MEM_ALIGN_WR8":113,"REPEAT":114,"RCX":115,"JMPN":116,"JMPC":117,"JMPZ":118,"JMPNC":119,"JMPNZ":120,"CNT_ARITH":121,"CNT_BINARY":122,"CNT_KECCAK_F":123,"CNT_SHA256_F":124,"CNT_MEM_ALIGN":125,"CNT_PADDING_PG":126,"CNT_POSEIDON_G":127,"A":128,"B":129,"C":130,"D":131,"SR":132,"SP":133,"PC":134,"GAS":135,"zkPC":136,"STEP":137,"HASHPOS":138,"ROTL_C":139,"++":140,"--":141,"SYS":142,"MEM":143,"STACK":144,"$accept":0,"$end":1}, +terminals_: {2:"error",5:"EOF",13:"LF",15:":",17:"IDENTIFIER",18:"VAR",20:"[",21:"NUMBER",22:"]",23:"CONSTID",24:"CONST",25:"=",27:"CONSTL",28:"COMMAND",29:"GLOBAL",30:"CTX",31:"INCLUDE",32:"STRING",33:"NUMBERL",34:"??",35:"+",36:"-",37:"*",38:"**",39:"%",40:"/",41:"<<",42:">>",43:"|",44:"&",45:"^",46:"<",47:">",48:"<=",49:">=",50:"==",51:"!=",52:"&&",53:"||",54:"!",55:"?",56:"(",57:")",59:"=>",63:"TAG",64:"TAG_0",67:"REFERENCE",68:",",70:"MLOAD",72:"MSTORE",73:"HASHK",75:"HASHK1",76:"HASHKLEN",77:"HASHKDIGEST",78:"HASHS",79:"HASHS1",80:"HASHSLEN",81:"HASHSDIGEST",82:"HASHP",83:"HASHP1",84:"HASHPLEN",85:"HASHPDIGEST",86:"JMP",89:"RR",90:"E",91:"CALL",92:"RETURN",93:"ASSERT",94:"SLOAD",95:"SSTORE",96:"ARITH",97:"ARITH_ECADD_DIFFERENT",98:"ARITH_ECADD_SAME",99:"ARITH_BN254_MULFP2",100:"ARITH_BN254_ADDFP2",101:"ARITH_BN254_SUBFP2",102:"ADD",103:"SUB",104:"LT",105:"SLT",106:"EQ",107:"AND",108:"OR",109:"XOR",110:"LT4",111:"MEM_ALIGN_RD",112:"MEM_ALIGN_WR",113:"MEM_ALIGN_WR8",114:"REPEAT",115:"RCX",116:"JMPN",117:"JMPC",118:"JMPZ",119:"JMPNC",120:"JMPNZ",121:"CNT_ARITH",122:"CNT_BINARY",123:"CNT_KECCAK_F",124:"CNT_SHA256_F",125:"CNT_MEM_ALIGN",126:"CNT_PADDING_PG",127:"CNT_POSEIDON_G",128:"A",129:"B",130:"C",131:"D",132:"SR",133:"SP",134:"PC",135:"GAS",136:"zkPC",137:"STEP",138:"HASHPOS",139:"ROTL_C",140:"++",141:"--",142:"SYS",143:"MEM",144:"STACK"}, +productions_: [0,[3,2],[4,2],[4,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[7,4],[7,2],[7,3],[8,2],[9,3],[9,6],[9,6],[10,4],[10,4],[12,1],[19,1],[19,1],[11,2],[26,1],[26,1],[26,1],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,2],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,3],[26,2],[26,5],[26,3],[14,3],[14,1],[58,3],[58,3],[58,2],[58,1],[61,3],[61,1],[62,1],[62,1],[62,1],[62,1],[62,3],[62,3],[62,1],[62,1],[62,1],[62,1],[60,3],[60,1],[16,3],[16,1],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,4],[69,6],[69,4],[69,6],[69,4],[69,4],[69,6],[69,6],[69,4],[69,4],[69,6],[69,6],[69,6],[69,6],[69,8],[69,8],[69,4],[69,6],[69,6],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,4],[87,1],[87,1],[87,1],[88,1],[88,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[71,1],[71,3],[71,3],[71,2],[71,2],[71,5],[71,5],[71,3],[71,5],[71,5],[71,3],[71,5],[71,5],[71,3],[71,1],[71,3],[71,3],[71,4],[71,6],[71,6],[71,3],[71,4],[74,1],[74,1],[74,1],[74,3],[74,3]], performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) { /* this == yyval */ @@ -231,7 +231,7 @@ case 55: this.$ = {type: 'neg', values: [$$[$0]]} break; -case 56: case 58: case 170: +case 56: case 58: this.$ = $$[$0] @@ -390,134 +390,132 @@ case 86: break; case 87: - this.$ = { ...$$[$0-3], useJmpAddrRel: $$[$0-1].useAddrRel, ...$$[$0-1].indirections, jmpAddr: $$[$0-1].addr } + this.$ = { [$$[$0-3]]: 1, useJmpAddr: 1, jmpAddr: $$[$0-1] } break; case 88: - this.$ = { ...$$[$0-3], useElseAddrRel: $$[$0-1].useAddrRel, ...$$[$0-1].indirections, elseAddr: $$[$0-1].addr, useJmpAddrRel: 0, jmpAddr: 'next' } + this.$ = { [$$[$0-3]]: 1, useJmpAddr: 1, jmpAddr: $$[$0-1], useElseAddr: 1, elseAddr: 'next' } break; case 89: - // TODO: validate $$[$0-3].useAddrRel !== $$[$0-1].useAddrRel || $$[$0-3].indirections === $$[$0-1].indirections - this.$ = { ...$$[$0-5], useElseAddrRel: $$[$0-3].useAddrRel, ...$$[$0-3].indirections, elseAddr: $$[$0-3].addr, useJmpAddrRel: $$[$0-1].useAddrRel, jmpAddr: $$[$0-1], ...$$[$0-1].indirections } + this.$ = { [$$[$0-5]]: 1, useJmpAddr: 1, jmpAddr: $$[$0-3], useElseAddr: 1, elseAddr: $$[$0-1] } break; case 90: - this.$ = { ...$$[$0-3], useJmpAddrRel: $$[$0-1].useAddrRel, ...$$[$0-1].indirections, jmpAddr: $$[$0-1].addr, useElseAddrRel: 0, elseAddr: 'next' } + this.$ = { [$$[$0-3]]: 1, useJmpAddr: 1, jmpAddr: 'next', useElseAddr: 1, elseAddr: $$[$0-1] } break; case 91: - // TODO: validate $$[$0-3].useAddrRel !== $$[$0-1].useAddrRel || $$[$0-3].indirections === $$[$0-1].indirections - this.$ = { ...$$[$0-5], useJmpAddrRel: $$[$0-3].useAddrRel, ...$$[$0-3].indirections, jmpAddr: $$[$0-3].addr, useElseAddrRel: $$[$0-1].useAddrRel, elseAddr: $$[$0-1].addr, ...$$[$0-1].indirections } + this.$ = { [$$[$0-5]]: 1, useJmpAddr: 1, jmpAddr: $$[$0-1], useElseAddr: 1, elseAddr: $$[$0-3] } break; case 92: - this.$ = {JMP: 0, JMPC: 0, JMPN: 0, useJmpAddrRel: $$[$0-1].useAddrRel, jmpAddr: $$[$0-1].addr, ...$$[$0-1].indirections, call: 1 } + this.$ = { [$$[$0-3]]: 1, useJmpAddr: 0, ind: 0, indRR: 1, offset: 0 } break; case 93: - this.$ = {JMP: 0, JMPC: 0, JMPN: 0, call: 0, return: 1} + this.$ = { [$$[$0-3]]: 1, useJmpAddr: 0, ind: 1, indRR: 0, offset: 0 } break; case 94: - this.$ = {assert: 1} + this.$ = { [$$[$0-5]]: 1, useJmpAddr: 0, ind: 0, indRR: 1, offset: $$[$0-3] } break; case 95: - this.$ = {sRD: 1} + this.$ = { [$$[$0-5]]: 1, useJmpAddr: 0, ind: 1, indRR: 0, offset: $$[$0-3] } break; case 96: - this.$ = {sWR: 1} + this.$ = { [$$[$0-3]]: 1, useJmpAddr: 0, ind: 0, indRR: 1, offset: 0, useElseAddr: 1, elseAddr: 'next' } break; case 97: - this.$ = { arithEq0: 1, arithEq1: 0, arithEq2: 0, arithEq3: 0, arithEq4: 0, arithEq5: 0 } + this.$ = { [$$[$0-3]]: 1, useJmpAddr: 0, ind: 1, indRR: 0, offset: 0, useElseAddr: 1, elseAddr: 'next' } break; case 98: - this.$ = { arithEq0: 0, arithEq1: 1, arithEq2: 0, arithEq3: 0, arithEq4: 0, arithEq5: 0 } + this.$ = { [$$[$0-5]]: 1, useJmpAddr: 0, ind: 0, indRR: 1, offset: $$[$0-3], useElseAddr: 1, elseAddr: 'next' } break; case 99: - this.$ = { arithEq0: 0, arithEq1: 0, arithEq2: 0, arithEq3: 0, arithEq4: 0, arithEq5: 0 } + this.$ = { [$$[$0-5]]: 1, useJmpAddr: 0, ind: 1, indRR: 0, offset: $$[$0-3], useElseAddr: 1, elseAddr: 'next' } break; case 100: - this.$ = { arithEq0: 0, arithEq1: 0, arithEq2: 0, arithEq3: 1, arithEq4: 0, arithEq5: 0 } + this.$ = { [$$[$0-5]]: 1, useJmpAddr: 0, ind: 0, indRR: 1, offset: 0, useElseAddr: 1, elseAddr: $$[$0-1] } break; case 101: - this.$ = { arithEq0: 0, arithEq1: 0, arithEq2: 0, arithEq3: 0, arithEq4: 1, arithEq5: 0 } + this.$ = { [$$[$0-5]]: 1, useJmpAddr: 0, ind: 1, indRR: 0, offset: 0, useElseAddr: 1, elseAddr: $$[$0-1] } break; case 102: - this.$ = { arithEq0: 0, arithEq1: 0, arithEq2: 0, arithEq3: 0, arithEq4: 0, arithEq5: 1 } + this.$ = { [$$[$0-7]]: 1, useJmpAddr: 0, ind: 0, indRR: 1, offset: $$[$0-5], useElseAddr: 1, elseAddr: $$[$0-1] } break; case 103: - this.$ = { bin: 1, binOpcode: 0} + this.$ = { [$$[$0-7]]: 1, useJmpAddr: 0, ind: 1, indRR: 0, offset: $$[$0-5], useElseAddr: 1, elseAddr: $$[$0-1] } break; case 104: - this.$ = { bin: 1, binOpcode: 1} + this.$ = {JMP: 0, JMPC: 0, JMPN: 0, useJmpAddr:1, jmpAddr: $$[$0-1], call: 1} break; case 105: - this.$ = { bin: 1, binOpcode: 2} + this.$ = {JMP: 0, JMPC: 0, JMPN: 0, offset: $$[$0-3], ind: 0, indRR: 1, return: 0, call: 1} break; case 106: - this.$ = { bin: 1, binOpcode: 3} + this.$ = {JMP: 0, JMPC: 0, JMPN: 0, offset: $$[$0-3], ind: 1, indRR: 0, return: 0, call: 1} break; case 107: - this.$ = { bin: 1, binOpcode: 4} + this.$ = {JMP: 0, JMPC: 0, JMPN: 0, call: 0, return: 1} break; case 108: - this.$ = { bin: 1, binOpcode: 5} + this.$ = {assert: 1} break; case 109: - this.$ = { bin: 1, binOpcode: 6} + this.$ = {sRD: 1} break; case 110: - this.$ = { bin: 1, binOpcode: 7} + this.$ = {sWR: 1} break; case 111: - this.$ = { bin: 1, binOpcode: 8} + this.$ = { arithEq0: 1, arithEq1: 0, arithEq2: 0, arithEq3: 0, arithEq4: 0, arithEq5: 0 } break; case 112: - this.$ = { memAlignRD: 1, memAlignWR: 0, memAlignWR8: 0} + this.$ = { arithEq0: 0, arithEq1: 1, arithEq2: 0, arithEq3: 0, arithEq4: 0, arithEq5: 0 } break; case 113: @@ -527,201 +525,250 @@ case 113: break; case 114: - this.$ = { memAlignRD: 0, memAlignWR: 0, memAlignWR8: 1} + this.$ = { arithEq0: 0, arithEq1: 0, arithEq2: 0, arithEq3: 1, arithEq4: 0, arithEq5: 0 } break; case 115: - this.$ = { repeat: 1 } + this.$ = { arithEq0: 0, arithEq1: 0, arithEq2: 0, arithEq3: 0, arithEq4: 1, arithEq5: 0 } break; case 116: - this.$ = { useAddrRel: 0, jmpAddr: $$[$02] } + this.$ = { arithEq0: 0, arithEq1: 0, arithEq2: 0, arithEq3: 0, arithEq4: 0, arithEq5: 1 } break; case 117: - this.$ = { useAddrRel: $$[$0-2], ind: 0, indRR: 1, addr: $$[$0] } + this.$ = { bin: 1, binOpcode: 0} break; case 118: - this.$ = { useAddrRel: 1, ind: 0, indRR: 1, addr: $$[$0] } + this.$ = { bin: 1, binOpcode: 1} + +break; +case 119: + + this.$ = { bin: 1, binOpcode: 2} + +break; +case 120: + + this.$ = { bin: 1, binOpcode: 3} + +break; +case 121: + + this.$ = { bin: 1, binOpcode: 4} break; case 122: - this.$ = 'JMPC' + + this.$ = { bin: 1, binOpcode: 5} + break; case 123: - this.$ = 'JMPZ' + + this.$ = { bin: 1, binOpcode: 6} + break; case 124: - this.$ = 'cntArith' + + this.$ = { bin: 1, binOpcode: 7} + break; case 125: - this.$ = 'cntBinary' + + this.$ = { bin: 1, binOpcode: 8} + break; case 126: - this.$ = 'cntKeccakF' + + this.$ = { memAlignRD: 1, memAlignWR: 0, memAlignWR8: 0} + break; case 127: - this.$ = 'cntSha256F' + + this.$ = { memAlignRD: 0, memAlignWR: 1, memAlignWR8: 0} + break; case 128: - this.$ = 'cntMemAlign' + + this.$ = { memAlignRD: 0, memAlignWR: 0, memAlignWR8: 1} + break; case 129: - this.$ = 'cntPaddingPG' + + this.$ = { repeat: 1 } + break; -case 130: - this.$ = 'cntPoseidonG' +case 133: + this.$ = 'JMPC' break; -case 147: case 148: - - this.$ = $$[$0] - +case 134: + this.$ = 'JMPZ' break; -case 149: - - this.$ = { reg: 'ind' } - +case 135: + this.$ = 'cntArith' break; -case 150: - - this.$ = { reg: 'indRR' } - +case 136: + this.$ = 'cntBinary' break; -case 151: - - this.$ = { ...$$[$0], indReg: 1 } - +case 137: + this.$ = 'cntKeccakF' break; -case 152: case 153: - - this.$ = { ...$$[$0], indReg: $$[$0-2] } - +case 138: + this.$ = 'cntSha256F' break; -case 154: case 155: case 156: - - this.$ = $$[$0] - +case 139: + this.$ = 'cntMemAlign' break; -case 157: - - this.$ = $$[$0] - +case 140: + this.$ = 'cntPaddingPG' +break; +case 141: + this.$ = 'cntPoseidonG' break; case 158: - this.$ = { [$$[$0].reg]: $$[$0].indReg } + this.$ = { isStack: 1, isMem:0, ind:0, indRR: 0, incStack:0, offset: 0, useCTX: 1} break; case 159: - this.$ = { [$$[$0-2].reg]: $$[$0-2].indReg, extraOffset: applySign($$[$0-1], $$[$0])}; + this.$ = { isStack: 1, isMem:0, ind:0, indRR: 0, incStack: 0, offset: $$[$0], useCTX: 1} break; case 160: - this.$ = { [$$[$0-4].reg]: $$[$0-4].indReg, [$$[$0-2].reg]: applySign($$[$0-3], $$[$0-2].indReg), extraOffset: applySign($$[$0-1], $$[$0]) } - checkAddrRel(this.$); + this.$ = { isStack: 1, isMem:0, ind:0, indRR: 0, incStack: 0, offset: -$$[$0], useCTX: 1} break; case 161: - this.$ = { [$$[$0-2].reg]: $$[$0-2].indReg, [$$[$0].reg]: applySign($$[$0-1], $$[$0].indReg) } + this.$ = { isStack: 1, isMem:0, ind:0, indRR: 0, incStack: 1, offset: 0, useCTX: 1} break; case 162: - this.$ = { isStack: 1, isMem:0, ind:0, indRR: 0, incStack:0, offset: 0, useCTX: 1} + this.$ = { isStack: 1, isMem:0, ind:0, indRR: 0, incStack: -1, offset: 0, useCTX: 1} break; case 163: - this.$ = { isStack: 1, isMem:0, ind:0, indRR: 0, incStack: 0, offset: $$[$0], useCTX: 1} + this.$ = { isStack: 0, isMem:0, ind:1, indRR: 0, incStack: 0, offset: $$[$0]} break; case 164: - this.$ = { isStack: 1, isMem:0, ind:0, indRR: 0, incStack: 0, offset: -$$[$0], useCTX: 1} + this.$ = { isStack: 0, isMem:0, ind:1, indRR: 0, incStack: 0, offset: -$$[$0]} break; case 165: - this.$ = { isStack: 1, isMem:0, ind:0, indRR: 0, incStack: 1, offset: 0, useCTX: 1} + this.$ = { isStack: 0, isMem:0, ind:1, indRR: 0, incStack: 0, offset: 0} break; case 166: - this.$ = { isStack: 1, isMem:0, ind:0, indRR: 0, incStack: -1, offset: 0, useCTX: 1} + this.$ = { isStack: 0, isMem: 1, ind:1, indRR: 0, incStack: 0, offset: $$[$0], useCTX: 1} break; case 167: - this.$ = { isStack: 0, isMem:0, ind:1, indRR: 0, incStack: 0, offset: $$[$02]} + this.$ = { isStack: 0, isMem: 1, ind:1, indRR: 0, incStack: 0, offset: -$$[$0], useCTX: 1} break; case 168: - this.$ = { isStack: 0, isMem: 1, ind:1, indRR: 0, incStack: 0, offset: $$[$02], useCTX: 1} + this.$ = { isStack: 0, isMem: 1, ind:1, indRR: 0, incStack: 0, offset: 0, useCTX: 1} break; case 169: - this.$ = { isStack: 1, ind:1, indRR: 0, incStack: 0, offset: $$[$02], useCTX: 1} + this.$ = { isStack: 1, ind:1, indRR: 0, incStack: 0, offset: $$[$0], useCTX: 1} + +break; +case 170: + + this.$ = { isStack: 1, ind:1, indRR: 0, incStack: 0, offset: -$$[$0], useCTX: 1} break; case 171: - this.$ = { offset: $$[$0] } + this.$ = { isStack: 1, ind:1, indRR: 0, incStack: 0, offset: 0, useCTX: 1} break; case 172: - this.$ = { ...$$[$0], offset: $$[$0-2] } + this.$ = { offset: $$[$0] } break; case 173: - this.$ = { ...$$[$0-1], offset: $$[$0-3] } + this.$ = { offset: $$[$0-2], ind: 0, indRR: 1 } break; case 174: - this.$ = { offset: $$[$0-2], extraOffset: $$[$0] } + this.$ = { offset: $$[$0-2], ind: 1, indRR: 0 } break; case 175: - this.$ = { ind: 0, indRR: 0, offset:$$[$0] } + this.$ = { offset: $$[$0-3], ind: 1, indRR: 0 } break; case 176: - this.$ = { ind: 1, indRR: 0, offset:0 } + this.$ = { offset: $$[$0-5], extraOffset: -$$[$0-1], ind: 1, indRR: 0 } break; case 177: - this.$ = {ind: 0, indRR: 1, offset:0} + this.$ = { offset: $$[$0-5], extraOffset: $$[$0-1], ind: 1, indRR: 0 } break; case 178: - this.$ = {ind: 1, indRR: 0, offset:$$[$0]} + this.$ = { offset: $$[$0-2], extraOffset: $$[$0] } break; case 179: + this.$ = { offset: $$[$0-3], extraOffset: $$[$0-1] } + +break; +case 180: + + this.$ = {ind: 0, indRR: 0, offset:$$[$0]} + +break; +case 181: + + this.$ = {ind: 1, indRR: 0, offset:0} + +break; +case 182: + + this.$ = {ind: 0, indRR: 1, offset:0} + +break; +case 183: + + this.$ = {ind: 1, indRR: 0, offset:$$[$0]} + +break; +case 184: + this.$ = {ind: 0, indRR: 1, offset:$$[$0]} break; } }, -table: [{3:1,4:2,6:3,7:4,8:5,9:6,10:7,11:8,12:9,13:$V0,14:11,15:$V1,17:$V2,18:$V3,21:$V4,23:$V5,24:$V6,27:$V7,28:$V8,30:$V9,31:$Va,33:$Vb,36:$Vc,58:19,61:21,62:22,63:$Vd,64:$Ve,65:25,66:26,67:$Vf,114:$Vg,121:$Vh,122:$Vi,123:$Vj,124:$Vk,125:$Vl,126:$Vm,127:$Vn,128:$Vo,129:$Vp,130:$Vq,131:$Vr,132:$Vs,133:$Vt,134:$Vu,135:$Vv,136:$Vw,137:$Vx,138:$Vy,139:$Vz,140:$VA,141:$VB},{1:[3]},{5:[1,54],6:55,7:4,8:5,9:6,10:7,11:8,12:9,13:$V0,14:11,15:$V1,17:$V2,18:$V3,21:$V4,23:$V5,24:$V6,27:$V7,28:$V8,30:$V9,31:$Va,33:$Vb,36:$Vc,58:19,61:21,62:22,63:$Vd,64:$Ve,65:25,66:26,67:$Vf,114:$Vg,121:$Vh,122:$Vi,123:$Vj,124:$Vk,125:$Vl,126:$Vm,127:$Vn,128:$Vo,129:$Vp,130:$Vq,131:$Vr,132:$Vs,133:$Vt,134:$Vu,135:$Vv,136:$Vw,137:$Vx,138:$Vy,139:$Vz,140:$VA,141:$VB},o($VC,[2,3]),o($VC,[2,4]),o($VC,[2,5]),o($VC,[2,6]),o($VC,[2,7]),o($VC,[2,8]),o($VC,[2,9]),o($VC,[2,10]),{13:[1,57],15:[1,56]},{16:58,69:59,70:$VD,72:$VE,73:$VF,75:$VG,76:$VH,77:$VI,78:$VJ,79:$VK,80:$VL,81:$VM,82:$VN,83:$VO,84:$VP,85:$VQ,86:$VR,88:75,89:76,90:$VS,91:$VT,92:$VU,93:$VV,94:$VW,95:$VX,96:$VY,97:$VZ,98:$V_,99:$V$,100:$V01,101:$V11,102:$V21,103:$V31,104:$V41,105:$V51,106:$V61,107:$V71,108:$V81,109:$V91,110:$Va1,111:$Vb1,112:$Vc1,113:$Vd1,116:$Ve1,117:$Vf1,118:$Vg1,119:$Vh1,120:$Vi1},{15:[1,106]},{19:107,29:[1,108],30:[1,109]},{23:[1,110]},{23:[1,111]},{32:[1,112]},o($VC,[2,20]),o($Vj1,[2,52],{35:[1,114],36:[1,115],59:[1,113]}),{21:$V4,23:$V5,30:$V9,33:$Vb,61:116,62:22,63:$Vd,64:$Ve,65:25,66:26,67:$Vf,114:$Vg,121:$Vh,122:$Vi,123:$Vj,124:$Vk,125:$Vl,126:$Vm,127:$Vn,128:$Vo,129:$Vp,130:$Vq,131:$Vr,132:$Vs,133:$Vt,134:$Vu,135:$Vv,136:$Vw,137:$Vx,138:$Vy,139:$Vz,140:$VA,141:$VB},o($Vk1,[2,56],{37:$Vl1}),o($Vm1,[2,58]),o($Vm1,[2,59]),o($Vm1,[2,60]),o($Vm1,[2,61]),o($Vm1,[2,62]),o($Vm1,[2,65],{38:[1,118]}),o($Vm1,[2,66],{38:[1,119]}),o($Vm1,[2,67]),o($Vm1,[2,68]),o($Vn1,[2,131]),o($Vn1,[2,132]),o($Vn1,[2,133]),o($Vn1,[2,134]),o($Vn1,[2,135]),o($Vn1,[2,136]),o($Vn1,[2,137]),o($Vn1,[2,138]),o($Vn1,[2,139]),o($Vn1,[2,140]),o($Vn1,[2,141]),o($Vn1,[2,142]),o($Vn1,[2,143]),o($Vn1,[2,144]),o($Vn1,[2,145]),o($Vn1,[2,146]),o($Vm1,[2,124]),o($Vm1,[2,125]),o($Vm1,[2,126]),o($Vm1,[2,127]),o($Vm1,[2,128]),o($Vm1,[2,129]),o($Vm1,[2,130]),{1:[2,1]},o($VC,[2,2]),{16:120,69:59,70:$VD,72:$VE,73:$VF,75:$VG,76:$VH,77:$VI,78:$VJ,79:$VK,80:$VL,81:$VM,82:$VN,83:$VO,84:$VP,85:$VQ,86:$VR,88:75,89:76,90:$VS,91:$VT,92:$VU,93:$VV,94:$VW,95:$VX,96:$VY,97:$VZ,98:$V_,99:$V$,100:$V01,101:$V11,102:$V21,103:$V31,104:$V41,105:$V51,106:$V61,107:$V71,108:$V81,109:$V91,110:$Va1,111:$Vb1,112:$Vc1,113:$Vd1,116:$Ve1,117:$Vf1,118:$Vg1,119:$Vh1,120:$Vi1},o($VC,[2,12]),{13:[1,121],68:$Vo1},o($Vp1,[2,72]),{56:[1,123]},{56:[1,124]},{56:[1,125]},{56:[1,126]},{56:[1,127]},{56:[1,128]},{56:[1,129]},{56:[1,130]},{56:[1,131]},{56:[1,132]},{56:[1,133]},{56:[1,134]},{56:[1,135]},{56:[1,136]},{56:[1,137]},{56:[1,138]},{56:[1,139]},{56:[1,140]},o($Vp1,[2,93]),o($Vp1,[2,94]),o($Vp1,[2,95]),o($Vp1,[2,96]),o($Vp1,[2,97]),o($Vp1,[2,98]),o($Vp1,[2,99]),o($Vp1,[2,100]),o($Vp1,[2,101]),o($Vp1,[2,102]),o($Vp1,[2,103]),o($Vp1,[2,104]),o($Vp1,[2,105]),o($Vp1,[2,106]),o($Vp1,[2,107]),o($Vp1,[2,108]),o($Vp1,[2,109]),o($Vp1,[2,110]),o($Vp1,[2,111]),o($Vp1,[2,112]),o($Vp1,[2,113]),o($Vp1,[2,114]),{56:[1,141]},{56:[2,122]},{56:[2,123]},{56:[2,119]},{56:[2,120]},{56:[2,121]},o($VC,[2,14]),{17:[1,142]},{17:[2,21]},{17:[2,22]},{25:[1,143]},{25:[1,144]},o($VC,[2,23]),{30:$V9,60:145,65:146,114:$Vg,128:$Vo,129:$Vp,130:$Vq,131:$Vr,132:$Vs,133:$Vt,134:$Vu,135:$Vv,136:$Vw,137:$Vx,138:$Vy,139:$Vz,140:$VA,141:$VB},{21:$V4,23:$V5,30:$V9,33:$Vb,61:147,62:22,63:$Vd,64:$Ve,65:25,66:26,67:$Vf,114:$Vg,121:$Vh,122:$Vi,123:$Vj,124:$Vk,125:$Vl,126:$Vm,127:$Vn,128:$Vo,129:$Vp,130:$Vq,131:$Vr,132:$Vs,133:$Vt,134:$Vu,135:$Vv,136:$Vw,137:$Vx,138:$Vy,139:$Vz,140:$VA,141:$VB},{21:$V4,23:$V5,30:$V9,33:$Vb,61:148,62:22,63:$Vd,64:$Ve,65:25,66:26,67:$Vf,114:$Vg,121:$Vh,122:$Vi,123:$Vj,124:$Vk,125:$Vl,126:$Vm,127:$Vn,128:$Vo,129:$Vp,130:$Vq,131:$Vr,132:$Vs,133:$Vt,134:$Vu,135:$Vv,136:$Vw,137:$Vx,138:$Vy,139:$Vz,140:$VA,141:$VB},o($Vk1,[2,55],{37:$Vl1}),{21:$V4,23:$V5,30:$V9,33:$Vb,62:149,63:$Vd,64:$Ve,65:25,66:26,67:$Vf,114:$Vg,121:$Vh,122:$Vi,123:$Vj,124:$Vk,125:$Vl,126:$Vm,127:$Vn,128:$Vo,129:$Vp,130:$Vq,131:$Vr,132:$Vs,133:$Vt,134:$Vu,135:$Vv,136:$Vw,137:$Vx,138:$Vy,139:$Vz,140:$VA,141:$VB},{21:[1,150]},{33:[1,151]},{13:[1,152],68:$Vo1},o($VC,[2,13]),{69:153,70:$VD,72:$VE,73:$VF,75:$VG,76:$VH,77:$VI,78:$VJ,79:$VK,80:$VL,81:$VM,82:$VN,83:$VO,84:$VP,85:$VQ,86:$VR,88:75,89:76,90:$VS,91:$VT,92:$VU,93:$VV,94:$VW,95:$VX,96:$VY,97:$VZ,98:$V_,99:$V$,100:$V01,101:$V11,102:$V21,103:$V31,104:$V41,105:$V51,106:$V61,107:$V71,108:$V81,109:$V91,110:$Va1,111:$Vb1,112:$Vc1,113:$Vd1,116:$Ve1,117:$Vf1,118:$Vg1,119:$Vh1,120:$Vi1},{17:$Vq1,21:$Vr1,23:$Vs1,71:154,115:159,132:$Vt1,134:$Vu1,137:$Vv1,143:162,144:161,149:$Vw1,150:$Vx1,151:$Vy1},{17:$Vq1,21:$Vr1,23:$Vs1,71:167,115:159,132:$Vt1,134:$Vu1,137:$Vv1,143:162,144:161,149:$Vw1,150:$Vx1,151:$Vy1},{21:$Vz1,74:168,132:$VA1,137:$VB1},{21:$Vz1,74:172,132:$VA1,137:$VB1},{21:$Vz1,74:173,132:$VA1,137:$VB1},{21:$Vz1,74:174,132:$VA1,137:$VB1},{21:$Vz1,74:175,132:$VA1,137:$VB1},{21:$Vz1,74:176,132:$VA1,137:$VB1},{21:$Vz1,74:177,132:$VA1,137:$VB1},{21:$Vz1,74:178,132:$VA1,137:$VB1},{21:$Vz1,74:179,132:$VA1,137:$VB1},{21:$Vz1,74:180,132:$VA1,137:$VB1},{21:$Vz1,74:181,132:$VA1,137:$VB1},{21:$Vz1,74:182,132:$VA1,137:$VB1},{17:$VC1,67:$VD1,87:183},{17:$VC1,67:$VD1,87:186},{17:$VC1,67:$VD1,87:187},{17:$VC1,67:$VD1,87:188},{114:[1,189]},o($VC,[2,15],{20:[1,190]}),{21:$VE1,23:$VF1,26:191,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},{21:$VE1,23:$VF1,26:198,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},o($Vj1,[2,51],{68:[1,199]}),o($VK1,[2,70]),o($Vk1,[2,53],{37:$Vl1}),o($Vk1,[2,54],{37:$Vl1}),o($Vm1,[2,57]),o($Vm1,[2,63]),o($Vm1,[2,64]),o($VC,[2,11]),o($Vp1,[2,71]),{57:[1,200]},{35:[1,201],36:[1,202],57:[2,162],147:[1,203],148:[1,204]},{15:[1,205]},{15:[1,206]},{15:[1,207]},{57:[2,170]},{20:[1,209],35:[1,208],57:[2,171]},o($VL1,[2,158],{145:210,35:$VM1,36:$VN1}),o($VO1,[2,151]),{37:$VP1},{37:$VQ1},o($VO1,[2,149]),o($VO1,[2,150]),{57:[1,215]},{57:[1,216]},{57:[2,175]},{35:[1,217],57:[2,176]},{35:[1,218],57:[2,177]},{57:[1,219]},{57:[1,220]},{57:[1,221]},{57:[1,222]},{57:[1,223]},{57:[1,224]},{57:[1,225]},{57:[1,226]},{57:[1,227]},{57:[1,228]},{57:[1,229]},{57:[1,230]},o($VR1,[2,116]),{35:[1,231],36:[1,232]},{57:[1,233],68:[1,234]},{57:[1,235],68:[1,236]},{57:[1,237]},{57:[1,238]},{21:[1,239],23:[1,240]},o($VS1,[2,18],{35:$VT1,36:$VU1,37:$VV1,38:$VW1,39:$VX1,40:$VY1,41:$VZ1,42:$V_1,43:$V$1,44:$V02,45:$V12,46:$V22,47:$V32,48:$V42,49:$V52,50:$V62,51:$V72,52:$V82,53:$V92,55:$Va2}),o($Vb2,[2,24]),o($Vb2,[2,25]),o($Vb2,[2,26],{34:[1,261]}),{21:$VE1,23:$VF1,26:262,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},{21:$VE1,23:$VF1,26:263,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},{21:$VE1,23:$VF1,26:264,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},o($VS1,[2,19],{35:$VT1,36:$VU1,37:$VV1,38:$VW1,39:$VX1,40:$VY1,41:$VZ1,42:$V_1,43:$V$1,44:$V02,45:$V12,46:$V22,47:$V32,48:$V42,49:$V52,50:$V62,51:$V72,52:$V82,53:$V92,55:$Va2}),{30:$V9,65:265,114:$Vg,128:$Vo,129:$Vp,130:$Vq,131:$Vr,132:$Vs,133:$Vt,134:$Vu,135:$Vv,136:$Vw,137:$Vx,138:$Vy,139:$Vz,140:$VA,141:$VB},o($Vp1,[2,73]),{21:[1,266]},{21:[1,267]},{57:[2,165]},{57:[2,166]},{21:$Vr1,23:$Vs1,115:268,132:$Vt1,137:$Vv1,143:162,144:161},{21:$Vr1,23:$Vs1,115:269,132:$Vt1,137:$Vv1,143:162,144:161},{21:$Vr1,23:$Vs1,115:270,132:$Vt1,137:$Vv1,143:162,144:161},{21:$Vc2,23:$Vd2,115:271,132:$Vt1,137:$Vv1,143:162,144:161,146:272},{21:$Vr1,23:$Vs1,115:275,132:$Vt1,137:$Vv1,143:162,144:161},{21:$Vc2,23:$Vd2,132:$Vt1,137:$Vv1,143:162,144:277,146:276},o($Ve2,[2,154]),o($Ve2,[2,155]),{132:$Vt1,137:$Vv1,143:278},{132:$Vt1,137:$Vv1,143:279},o($Vp1,[2,74]),o($Vp1,[2,75]),{21:[1,280]},{21:[1,281]},o($Vp1,[2,76]),o($Vp1,[2,77]),o($Vp1,[2,78]),o($Vp1,[2,79]),o($Vp1,[2,80]),o($Vp1,[2,81]),o($Vp1,[2,82]),o($Vp1,[2,83]),o($Vp1,[2,84]),o($Vp1,[2,85]),o($Vp1,[2,86]),o($Vp1,[2,87]),{21:$Vr1,23:$Vs1,115:282,132:$Vt1,137:$Vv1,143:162,144:161},{21:$Vr1,23:$Vs1,115:283,132:$Vt1,137:$Vv1,143:162,144:161},o($Vp1,[2,88]),{17:$VC1,67:$VD1,87:284},o($Vp1,[2,90]),{17:$VC1,67:$VD1,87:285},o($Vp1,[2,92]),o($Vp1,[2,115]),{22:[1,286]},{22:[1,287]},{21:$VE1,23:$VF1,26:288,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},{21:$VE1,23:$VF1,26:289,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},{21:$VE1,23:$VF1,26:290,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},{21:$VE1,23:$VF1,26:291,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},{21:$VE1,23:$VF1,26:292,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},{21:$VE1,23:$VF1,26:293,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},{21:$VE1,23:$VF1,26:294,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},{21:$VE1,23:$VF1,26:295,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},{21:$VE1,23:$VF1,26:296,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},{21:$VE1,23:$VF1,26:297,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},{21:$VE1,23:$VF1,26:298,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},{21:$VE1,23:$VF1,26:299,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},{21:$VE1,23:$VF1,26:300,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},{21:$VE1,23:$VF1,26:301,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},{21:$VE1,23:$VF1,26:302,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},{21:$VE1,23:$VF1,26:303,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},{21:$VE1,23:$VF1,26:304,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},{21:$VE1,23:$VF1,26:305,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},{21:$VE1,23:$VF1,26:306,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},{21:$VE1,23:$VF1,26:307,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},{21:$VE1,23:$VF1,26:308,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},o($Vf2,[2,34],{37:$VV1,38:$VW1,39:$VX1,40:$VY1}),o($Vb2,[2,48]),{35:$VT1,36:$VU1,37:$VV1,38:$VW1,39:$VX1,40:$VY1,41:$VZ1,42:$V_1,43:$V$1,44:$V02,45:$V12,46:$V22,47:$V32,48:$V42,49:$V52,50:$V62,51:$V72,52:$V82,53:$V92,55:$Va2,57:[1,309]},o($VK1,[2,69]),{57:[2,163]},{57:[2,164]},{57:[2,167]},{57:[2,168]},{57:[2,169]},{57:[2,172]},{57:[2,174]},o($VL1,$Vg2,{37:$VP1}),o($VL1,$Vh2,{37:$VQ1}),{22:[1,310]},o($VL1,[2,159]),o($VL1,[2,161],{145:311,35:$VM1,36:$VN1}),o($VO1,[2,152]),o($VO1,[2,153]),{57:[2,178]},{57:[2,179]},o($VR1,[2,117]),o($VR1,[2,118]),{57:[1,312]},{57:[1,313]},o($VC,[2,16]),o($VC,[2,17]),o($Vf2,[2,28],{37:$VV1,38:$VW1,39:$VX1,40:$VY1}),o($Vf2,[2,29],{37:$VV1,38:$VW1,39:$VX1,40:$VY1}),o($Vb2,[2,30]),o($Vb2,[2,31]),o($Vb2,[2,32]),o($Vb2,[2,33]),o($Vi2,[2,35],{35:$VT1,36:$VU1,37:$VV1,38:$VW1,39:$VX1,40:$VY1}),o($Vi2,[2,36],{35:$VT1,36:$VU1,37:$VV1,38:$VW1,39:$VX1,40:$VY1}),o([5,13,15,17,18,21,23,24,27,28,30,31,33,43,52,53,55,57,63,64,67,114,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141],[2,37],{35:$VT1,36:$VU1,37:$VV1,38:$VW1,39:$VX1,40:$VY1,41:$VZ1,42:$V_1,44:$V02,45:$V12,46:$V22,47:$V32,48:$V42,49:$V52,50:$V62,51:$V72}),o([5,13,15,17,18,21,23,24,27,28,30,31,33,43,44,45,52,53,55,57,63,64,67,114,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141],[2,38],{35:$VT1,36:$VU1,37:$VV1,38:$VW1,39:$VX1,40:$VY1,41:$VZ1,42:$V_1,46:$V22,47:$V32,48:$V42,49:$V52,50:$V62,51:$V72}),o([5,13,15,17,18,21,23,24,27,28,30,31,33,43,45,52,53,55,57,63,64,67,114,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141],[2,39],{35:$VT1,36:$VU1,37:$VV1,38:$VW1,39:$VX1,40:$VY1,41:$VZ1,42:$V_1,44:$V02,46:$V22,47:$V32,48:$V42,49:$V52,50:$V62,51:$V72}),o($Vj2,[2,40],{35:$VT1,36:$VU1,37:$VV1,38:$VW1,39:$VX1,40:$VY1,41:$VZ1,42:$V_1}),o($Vj2,[2,41],{35:$VT1,36:$VU1,37:$VV1,38:$VW1,39:$VX1,40:$VY1,41:$VZ1,42:$V_1}),o($Vj2,[2,42],{35:$VT1,36:$VU1,37:$VV1,38:$VW1,39:$VX1,40:$VY1,41:$VZ1,42:$V_1}),o($Vj2,[2,43],{35:$VT1,36:$VU1,37:$VV1,38:$VW1,39:$VX1,40:$VY1,41:$VZ1,42:$V_1}),o($Vk2,[2,44],{35:$VT1,36:$VU1,37:$VV1,38:$VW1,39:$VX1,40:$VY1,41:$VZ1,42:$V_1,46:$V22,47:$V32,48:$V42,49:$V52}),o($Vk2,[2,45],{35:$VT1,36:$VU1,37:$VV1,38:$VW1,39:$VX1,40:$VY1,41:$VZ1,42:$V_1,46:$V22,47:$V32,48:$V42,49:$V52}),o([5,13,15,17,18,21,23,24,27,28,30,31,33,52,53,55,57,63,64,67,114,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141],[2,46],{35:$VT1,36:$VU1,37:$VV1,38:$VW1,39:$VX1,40:$VY1,41:$VZ1,42:$V_1,43:$V$1,44:$V02,45:$V12,46:$V22,47:$V32,48:$V42,49:$V52,50:$V62,51:$V72}),o([5,13,15,17,18,21,23,24,27,28,30,31,33,53,55,57,63,64,67,114,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141],[2,47],{35:$VT1,36:$VU1,37:$VV1,38:$VW1,39:$VX1,40:$VY1,41:$VZ1,42:$V_1,43:$V$1,44:$V02,45:$V12,46:$V22,47:$V32,48:$V42,49:$V52,50:$V62,51:$V72,52:$V82}),{15:[1,314],35:$VT1,36:$VU1,37:$VV1,38:$VW1,39:$VX1,40:$VY1,41:$VZ1,42:$V_1,43:$V$1,44:$V02,45:$V12,46:$V22,47:$V32,48:$V42,49:$V52,50:$V62,51:$V72,52:$V82,53:$V92,55:$Va2},o([5,13,15,17,18,21,23,24,27,28,30,31,33,55,57,63,64,67,114,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141],[2,27],{35:$VT1,36:$VU1,37:$VV1,38:$VW1,39:$VX1,40:$VY1,41:$VZ1,42:$V_1,43:$V$1,44:$V02,45:$V12,46:$V22,47:$V32,48:$V42,49:$V52,50:$V62,51:$V72,52:$V82,53:$V92}),o($Vb2,[2,50]),{57:[2,173]},{21:[1,316],23:[1,317],146:315},o($Vp1,[2,89]),o($Vp1,[2,91]),{21:$VE1,23:$VF1,26:318,33:$VG1,36:$VH1,54:$VI1,56:$VJ1},o($VL1,[2,160]),o($VL1,$Vg2),o($VL1,$Vh2),o([5,13,15,17,18,21,23,24,27,28,30,31,33,57,63,64,67,114,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141],[2,49],{35:$VT1,36:$VU1,37:$VV1,38:$VW1,39:$VX1,40:$VY1,41:$VZ1,42:$V_1,43:$V$1,44:$V02,45:$V12,46:$V22,47:$V32,48:$V42,49:$V52,50:$V62,51:$V72,52:$V82,53:$V92,55:$Va2})], -defaultActions: {54:[2,1],101:[2,122],102:[2,123],103:[2,119],104:[2,120],105:[2,121],108:[2,21],109:[2,22],159:[2,170],169:[2,175],203:[2,165],204:[2,166],266:[2,163],267:[2,164],268:[2,167],269:[2,168],270:[2,169],271:[2,172],272:[2,174],280:[2,178],281:[2,179],310:[2,173]}, +table: [{3:1,4:2,6:3,7:4,8:5,9:6,10:7,11:8,12:9,13:$V0,14:11,15:$V1,17:$V2,18:$V3,21:$V4,23:$V5,24:$V6,27:$V7,28:$V8,30:$V9,31:$Va,33:$Vb,36:$Vc,58:19,61:21,62:22,63:$Vd,64:$Ve,65:25,66:26,67:$Vf,89:$Vg,90:$Vh,115:$Vi,121:$Vj,122:$Vk,123:$Vl,124:$Vm,125:$Vn,126:$Vo,127:$Vp,128:$Vq,129:$Vr,130:$Vs,131:$Vt,132:$Vu,133:$Vv,134:$Vw,135:$Vx,136:$Vy,137:$Vz,138:$VA,139:$VB},{1:[3]},{5:[1,54],6:55,7:4,8:5,9:6,10:7,11:8,12:9,13:$V0,14:11,15:$V1,17:$V2,18:$V3,21:$V4,23:$V5,24:$V6,27:$V7,28:$V8,30:$V9,31:$Va,33:$Vb,36:$Vc,58:19,61:21,62:22,63:$Vd,64:$Ve,65:25,66:26,67:$Vf,89:$Vg,90:$Vh,115:$Vi,121:$Vj,122:$Vk,123:$Vl,124:$Vm,125:$Vn,126:$Vo,127:$Vp,128:$Vq,129:$Vr,130:$Vs,131:$Vt,132:$Vu,133:$Vv,134:$Vw,135:$Vx,136:$Vy,137:$Vz,138:$VA,139:$VB},o($VC,[2,3]),o($VC,[2,4]),o($VC,[2,5]),o($VC,[2,6]),o($VC,[2,7]),o($VC,[2,8]),o($VC,[2,9]),o($VC,[2,10]),{13:[1,57],15:[1,56]},{16:58,69:59,70:$VD,72:$VE,73:$VF,75:$VG,76:$VH,77:$VI,78:$VJ,79:$VK,80:$VL,81:$VM,82:$VN,83:$VO,84:$VP,85:$VQ,86:$VR,87:75,88:76,91:$VS,92:$VT,93:$VU,94:$VV,95:$VW,96:$VX,97:$VY,98:$VZ,99:$V_,100:$V$,101:$V01,102:$V11,103:$V21,104:$V31,105:$V41,106:$V51,107:$V61,108:$V71,109:$V81,110:$V91,111:$Va1,112:$Vb1,113:$Vc1,114:$Vd1,116:$Ve1,117:$Vf1,118:$Vg1,119:$Vh1,120:$Vi1},{15:[1,106]},{19:107,29:[1,108],30:[1,109]},{23:[1,110]},{23:[1,111]},{32:[1,112]},o($VC,[2,20]),o($Vj1,[2,52],{35:[1,114],36:[1,115],59:[1,113]}),{21:$V4,23:$V5,30:$V9,33:$Vb,61:116,62:22,63:$Vd,64:$Ve,65:25,66:26,67:$Vf,89:$Vg,90:$Vh,115:$Vi,121:$Vj,122:$Vk,123:$Vl,124:$Vm,125:$Vn,126:$Vo,127:$Vp,128:$Vq,129:$Vr,130:$Vs,131:$Vt,132:$Vu,133:$Vv,134:$Vw,135:$Vx,136:$Vy,137:$Vz,138:$VA,139:$VB},o($Vk1,[2,56],{37:$Vl1}),o($Vm1,[2,58]),o($Vm1,[2,59]),o($Vm1,[2,60]),o($Vm1,[2,61]),o($Vm1,[2,62]),o($Vm1,[2,65],{38:[1,118]}),o($Vm1,[2,66],{38:[1,119]}),o($Vm1,[2,67]),o($Vm1,[2,68]),o($Vn1,[2,142]),o($Vn1,[2,143]),o($Vn1,[2,144]),o($Vn1,[2,145]),o($Vn1,[2,146]),o($Vn1,[2,147]),o($Vn1,[2,148]),o($Vn1,[2,149]),o($Vn1,[2,150]),o($Vn1,[2,151]),o($Vn1,[2,152]),o($Vn1,[2,153]),o($Vn1,[2,154]),o($Vn1,[2,155]),o($Vn1,[2,156]),o($Vn1,[2,157]),o($Vm1,[2,135]),o($Vm1,[2,136]),o($Vm1,[2,137]),o($Vm1,[2,138]),o($Vm1,[2,139]),o($Vm1,[2,140]),o($Vm1,[2,141]),{1:[2,1]},o($VC,[2,2]),{16:120,69:59,70:$VD,72:$VE,73:$VF,75:$VG,76:$VH,77:$VI,78:$VJ,79:$VK,80:$VL,81:$VM,82:$VN,83:$VO,84:$VP,85:$VQ,86:$VR,87:75,88:76,91:$VS,92:$VT,93:$VU,94:$VV,95:$VW,96:$VX,97:$VY,98:$VZ,99:$V_,100:$V$,101:$V01,102:$V11,103:$V21,104:$V31,105:$V41,106:$V51,107:$V61,108:$V71,109:$V81,110:$V91,111:$Va1,112:$Vb1,113:$Vc1,114:$Vd1,116:$Ve1,117:$Vf1,118:$Vg1,119:$Vh1,120:$Vi1},o($VC,[2,12]),{13:[1,121],68:$Vo1},o($Vp1,[2,72]),{56:[1,123]},{56:[1,124]},{56:[1,125]},{56:[1,126]},{56:[1,127]},{56:[1,128]},{56:[1,129]},{56:[1,130]},{56:[1,131]},{56:[1,132]},{56:[1,133]},{56:[1,134]},{56:[1,135]},{56:[1,136]},{56:[1,137]},{56:[1,138]},{56:[1,139]},{56:[1,140]},o($Vp1,[2,107]),o($Vp1,[2,108]),o($Vp1,[2,109]),o($Vp1,[2,110]),o($Vp1,[2,111]),o($Vp1,[2,112]),o($Vp1,[2,113]),o($Vp1,[2,114]),o($Vp1,[2,115]),o($Vp1,[2,116]),o($Vp1,[2,117]),o($Vp1,[2,118]),o($Vp1,[2,119]),o($Vp1,[2,120]),o($Vp1,[2,121]),o($Vp1,[2,122]),o($Vp1,[2,123]),o($Vp1,[2,124]),o($Vp1,[2,125]),o($Vp1,[2,126]),o($Vp1,[2,127]),o($Vp1,[2,128]),{56:[1,141]},{56:[2,130]},{56:[2,131]},{56:[2,132]},{56:[2,133]},{56:[2,134]},o($VC,[2,14]),{17:[1,142]},{17:[2,21]},{17:[2,22]},{25:[1,143]},{25:[1,144]},o($VC,[2,23]),{30:$V9,60:145,65:146,89:$Vg,90:$Vh,115:$Vi,128:$Vq,129:$Vr,130:$Vs,131:$Vt,132:$Vu,133:$Vv,134:$Vw,135:$Vx,136:$Vy,137:$Vz,138:$VA,139:$VB},{21:$V4,23:$V5,30:$V9,33:$Vb,61:147,62:22,63:$Vd,64:$Ve,65:25,66:26,67:$Vf,89:$Vg,90:$Vh,115:$Vi,121:$Vj,122:$Vk,123:$Vl,124:$Vm,125:$Vn,126:$Vo,127:$Vp,128:$Vq,129:$Vr,130:$Vs,131:$Vt,132:$Vu,133:$Vv,134:$Vw,135:$Vx,136:$Vy,137:$Vz,138:$VA,139:$VB},{21:$V4,23:$V5,30:$V9,33:$Vb,61:148,62:22,63:$Vd,64:$Ve,65:25,66:26,67:$Vf,89:$Vg,90:$Vh,115:$Vi,121:$Vj,122:$Vk,123:$Vl,124:$Vm,125:$Vn,126:$Vo,127:$Vp,128:$Vq,129:$Vr,130:$Vs,131:$Vt,132:$Vu,133:$Vv,134:$Vw,135:$Vx,136:$Vy,137:$Vz,138:$VA,139:$VB},o($Vk1,[2,55],{37:$Vl1}),{21:$V4,23:$V5,30:$V9,33:$Vb,62:149,63:$Vd,64:$Ve,65:25,66:26,67:$Vf,89:$Vg,90:$Vh,115:$Vi,121:$Vj,122:$Vk,123:$Vl,124:$Vm,125:$Vn,126:$Vo,127:$Vp,128:$Vq,129:$Vr,130:$Vs,131:$Vt,132:$Vu,133:$Vv,134:$Vw,135:$Vx,136:$Vy,137:$Vz,138:$VA,139:$VB},{21:[1,150]},{33:[1,151]},{13:[1,152],68:$Vo1},o($VC,[2,13]),{69:153,70:$VD,72:$VE,73:$VF,75:$VG,76:$VH,77:$VI,78:$VJ,79:$VK,80:$VL,81:$VM,82:$VN,83:$VO,84:$VP,85:$VQ,86:$VR,87:75,88:76,91:$VS,92:$VT,93:$VU,94:$VV,95:$VW,96:$VX,97:$VY,98:$VZ,99:$V_,100:$V$,101:$V01,102:$V11,103:$V21,104:$V31,105:$V41,106:$V51,107:$V61,108:$V71,109:$V81,110:$V91,111:$Va1,112:$Vb1,113:$Vc1,114:$Vd1,116:$Ve1,117:$Vf1,118:$Vg1,119:$Vh1,120:$Vi1},{17:$Vq1,71:154,133:$Vr1,142:$Vs1,143:$Vt1,144:$Vu1},{17:$Vq1,71:160,133:$Vr1,142:$Vs1,143:$Vt1,144:$Vu1},{21:$Vv1,74:161,89:$Vw1,90:$Vx1},{21:$Vv1,74:165,89:$Vw1,90:$Vx1},{21:$Vv1,74:166,89:$Vw1,90:$Vx1},{21:$Vv1,74:167,89:$Vw1,90:$Vx1},{21:$Vv1,74:168,89:$Vw1,90:$Vx1},{21:$Vv1,74:169,89:$Vw1,90:$Vx1},{21:$Vv1,74:170,89:$Vw1,90:$Vx1},{21:$Vv1,74:171,89:$Vw1,90:$Vx1},{21:$Vv1,74:172,89:$Vw1,90:$Vx1},{21:$Vv1,74:173,89:$Vw1,90:$Vx1},{21:$Vv1,74:174,89:$Vw1,90:$Vx1},{21:$Vv1,74:175,89:$Vw1,90:$Vx1},{17:[1,176],67:[1,179],89:[1,177],90:[1,178]},{17:[1,180],67:[1,183],89:[1,181],90:[1,182]},{17:[1,184]},{17:[1,185],67:[1,186]},{115:[1,187]},o($VC,[2,15],{20:[1,188]}),{21:$Vy1,23:$Vz1,26:189,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:196,33:$VA1,36:$VB1,54:$VC1,56:$VD1},o($Vj1,[2,51],{68:[1,197]}),o($VE1,[2,70]),o($Vk1,[2,53],{37:$Vl1}),o($Vk1,[2,54],{37:$Vl1}),o($Vm1,[2,57]),o($Vm1,[2,63]),o($Vm1,[2,64]),o($VC,[2,11]),o($Vp1,[2,71]),{57:[1,198]},{35:[1,199],36:[1,200],57:[2,158],140:[1,201],141:[1,202]},{15:[1,203]},{15:[1,204]},{15:[1,205]},{20:[1,207],35:[1,206],57:[2,172]},{57:[1,208]},{57:[1,209]},{57:[2,180]},{35:[1,210],57:[2,181]},{35:[1,211],57:[2,182]},{57:[1,212]},{57:[1,213]},{57:[1,214]},{57:[1,215]},{57:[1,216]},{57:[1,217]},{57:[1,218]},{57:[1,219]},{57:[1,220]},{57:[1,221]},{57:[1,222]},{57:[1,223]},{57:[1,224]},{57:[1,225]},{35:[1,226]},{57:[1,227],68:[1,228]},{57:[1,229],68:[1,230]},{57:[1,231],68:[1,232]},{35:[1,233]},{57:[1,234],68:[1,235]},{57:[1,236]},{35:[1,237]},{57:[1,238]},{21:[1,239],23:[1,240]},o($VF1,[2,18],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1,43:$VO1,44:$VP1,45:$VQ1,46:$VR1,47:$VS1,48:$VT1,49:$VU1,50:$VV1,51:$VW1,52:$VX1,53:$VY1,55:$VZ1}),o($V_1,[2,24]),o($V_1,[2,25]),o($V_1,[2,26],{34:[1,261]}),{21:$Vy1,23:$Vz1,26:262,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:263,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:264,33:$VA1,36:$VB1,54:$VC1,56:$VD1},o($VF1,[2,19],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1,43:$VO1,44:$VP1,45:$VQ1,46:$VR1,47:$VS1,48:$VT1,49:$VU1,50:$VV1,51:$VW1,52:$VX1,53:$VY1,55:$VZ1}),{30:$V9,65:265,89:$Vg,90:$Vh,115:$Vi,128:$Vq,129:$Vr,130:$Vs,131:$Vt,132:$Vu,133:$Vv,134:$Vw,135:$Vx,136:$Vy,137:$Vz,138:$VA,139:$VB},o($Vp1,[2,73]),{21:[1,266]},{21:[1,267]},{57:[2,161]},{57:[2,162]},{90:[1,268]},{90:[1,269]},{90:[1,270]},{21:[1,273],89:[1,271],90:[1,272]},{21:[1,275],90:[1,274]},o($Vp1,[2,74]),o($Vp1,[2,75]),{21:[1,276]},{21:[1,277]},o($Vp1,[2,76]),o($Vp1,[2,77]),o($Vp1,[2,78]),o($Vp1,[2,79]),o($Vp1,[2,80]),o($Vp1,[2,81]),o($Vp1,[2,82]),o($Vp1,[2,83]),o($Vp1,[2,84]),o($Vp1,[2,85]),o($Vp1,[2,86]),o($Vp1,[2,87]),o($Vp1,[2,92]),o($Vp1,[2,93]),{89:[1,278],90:[1,279]},o($Vp1,[2,88]),{17:[1,280]},o($Vp1,[2,96]),{17:[1,281]},o($Vp1,[2,97]),{17:[1,282]},{89:[1,283],90:[1,284]},o($Vp1,[2,90]),{17:[1,285]},o($Vp1,[2,104]),{89:[1,286],90:[1,287]},o($Vp1,[2,129]),{22:[1,288]},{22:[1,289]},{21:$Vy1,23:$Vz1,26:290,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:291,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:292,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:293,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:294,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:295,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:296,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:297,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:298,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:299,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:300,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:301,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:302,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:303,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:304,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:305,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:306,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:307,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:308,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:309,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{21:$Vy1,23:$Vz1,26:310,33:$VA1,36:$VB1,54:$VC1,56:$VD1},o($V$1,[2,34],{37:$VI1,38:$VJ1,39:$VK1,40:$VL1}),o($V_1,[2,48]),{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1,43:$VO1,44:$VP1,45:$VQ1,46:$VR1,47:$VS1,48:$VT1,49:$VU1,50:$VV1,51:$VW1,52:$VX1,53:$VY1,55:$VZ1,57:[1,311]},o($VE1,[2,69]),{57:[2,159]},{57:[2,160]},{35:[1,312],36:[1,313],57:[2,165]},{35:[1,314],36:[1,315],57:[2,168]},{35:[1,316],36:[1,317],57:[2,171]},{57:[2,173]},{57:[2,174]},{57:[2,178]},{22:[1,318],35:[1,320],36:[1,319]},{22:[1,321]},{57:[2,183]},{57:[2,184]},{57:[1,322]},{57:[1,323]},{57:[1,324]},{57:[1,325]},{57:[1,326]},{57:[1,327],68:[1,328]},{57:[1,329],68:[1,330]},{57:[1,331]},{57:[1,332]},{57:[1,333]},o($VC,[2,16]),o($VC,[2,17]),o($V$1,[2,28],{37:$VI1,38:$VJ1,39:$VK1,40:$VL1}),o($V$1,[2,29],{37:$VI1,38:$VJ1,39:$VK1,40:$VL1}),o($V_1,[2,30]),o($V_1,[2,31]),o($V_1,[2,32]),o($V_1,[2,33]),o($V02,[2,35],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1}),o($V02,[2,36],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1}),o([5,13,15,17,18,21,23,24,27,28,30,31,33,43,52,53,55,57,63,64,67,89,90,115,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139],[2,37],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1,44:$VP1,45:$VQ1,46:$VR1,47:$VS1,48:$VT1,49:$VU1,50:$VV1,51:$VW1}),o([5,13,15,17,18,21,23,24,27,28,30,31,33,43,44,45,52,53,55,57,63,64,67,89,90,115,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139],[2,38],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1,46:$VR1,47:$VS1,48:$VT1,49:$VU1,50:$VV1,51:$VW1}),o([5,13,15,17,18,21,23,24,27,28,30,31,33,43,45,52,53,55,57,63,64,67,89,90,115,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139],[2,39],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1,44:$VP1,46:$VR1,47:$VS1,48:$VT1,49:$VU1,50:$VV1,51:$VW1}),o($V12,[2,40],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1}),o($V12,[2,41],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1}),o($V12,[2,42],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1}),o($V12,[2,43],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1}),o($V22,[2,44],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1,46:$VR1,47:$VS1,48:$VT1,49:$VU1}),o($V22,[2,45],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1,46:$VR1,47:$VS1,48:$VT1,49:$VU1}),o([5,13,15,17,18,21,23,24,27,28,30,31,33,52,53,55,57,63,64,67,89,90,115,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139],[2,46],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1,43:$VO1,44:$VP1,45:$VQ1,46:$VR1,47:$VS1,48:$VT1,49:$VU1,50:$VV1,51:$VW1}),o([5,13,15,17,18,21,23,24,27,28,30,31,33,53,55,57,63,64,67,89,90,115,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139],[2,47],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1,43:$VO1,44:$VP1,45:$VQ1,46:$VR1,47:$VS1,48:$VT1,49:$VU1,50:$VV1,51:$VW1,52:$VX1}),{15:[1,334],35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1,43:$VO1,44:$VP1,45:$VQ1,46:$VR1,47:$VS1,48:$VT1,49:$VU1,50:$VV1,51:$VW1,52:$VX1,53:$VY1,55:$VZ1},o([5,13,15,17,18,21,23,24,27,28,30,31,33,55,57,63,64,67,89,90,115,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139],[2,27],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1,43:$VO1,44:$VP1,45:$VQ1,46:$VR1,47:$VS1,48:$VT1,49:$VU1,50:$VV1,51:$VW1,52:$VX1,53:$VY1}),o($V_1,[2,50]),{21:[1,335]},{21:[1,336]},{21:[1,337]},{21:[1,338]},{21:[1,339]},{21:[1,340]},{57:[2,175]},{21:[1,341]},{21:[1,342]},{57:[2,179]},o($Vp1,[2,94]),o($Vp1,[2,95]),o($Vp1,[2,89]),o($Vp1,[2,100]),o($Vp1,[2,101]),o($Vp1,[2,98]),{17:[1,343]},o($Vp1,[2,99]),{17:[1,344]},o($Vp1,[2,91]),o($Vp1,[2,105]),o($Vp1,[2,106]),{21:$Vy1,23:$Vz1,26:345,33:$VA1,36:$VB1,54:$VC1,56:$VD1},{57:[2,163]},{57:[2,164]},{57:[2,166]},{57:[2,167]},{57:[2,169]},{57:[2,170]},{22:[1,346]},{22:[1,347]},{57:[1,348]},{57:[1,349]},o([5,13,15,17,18,21,23,24,27,28,30,31,33,57,63,64,67,89,90,115,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139],[2,49],{35:$VG1,36:$VH1,37:$VI1,38:$VJ1,39:$VK1,40:$VL1,41:$VM1,42:$VN1,43:$VO1,44:$VP1,45:$VQ1,46:$VR1,47:$VS1,48:$VT1,49:$VU1,50:$VV1,51:$VW1,52:$VX1,53:$VY1,55:$VZ1}),{57:[2,176]},{57:[2,177]},o($Vp1,[2,102]),o($Vp1,[2,103])], +defaultActions: {54:[2,1],101:[2,130],102:[2,131],103:[2,132],104:[2,133],105:[2,134],108:[2,21],109:[2,22],162:[2,180],201:[2,161],202:[2,162],266:[2,159],267:[2,160],271:[2,173],272:[2,174],273:[2,178],276:[2,183],277:[2,184],318:[2,175],321:[2,179],335:[2,163],336:[2,164],337:[2,166],338:[2,167],339:[2,169],340:[2,170],346:[2,176],347:[2,177]}, parseError: function parseError (str, hash) { if (hash.recoverable) { this.trace(str); @@ -872,20 +919,6 @@ parse: function parse(input) { function setLine(dst, first) { dst.line = first.first_line; } -function negate(value) { - if (typeof value === 'number' | typeof value === 'bigint') { - return -value; - } - if (typeof value === 'string') { - return value.startsWith('-') ? value.substring(1) : '-'+value; - } - throw new Error(`ERROR: couldn't negate value ${value} (${typeof value})`); -} -function applySign(sign, value) { - if (sign === '+') return value; - if (sign === '-') return negate(value); - throw new Error(`ERROR: invalid sign ${sign} with value ${value} (${typeof value})`); -} /* generated by jison-lex 0.3.4 */ var lexer = (function(){ var lexer = ({ @@ -1240,29 +1273,29 @@ case 11: return 130; break; case 12: return 131; break; -case 13: return 132; +case 13: return 90; break; -case 14: return 114; +case 14: return 115; break; -case 15: return 133; +case 15: return 132; break; case 16: return 30; break; -case 17: return 134; +case 17: return 133; break; -case 18: return 135; +case 18: return 134; break; -case 19: return 136; +case 19: return 135; break; -case 20: return 138; +case 20: return 136; break; -case 21: return 137; +case 21: return 89; break; -case 22: return 139; +case 22: return 137; break; -case 23: return 141; +case 23: return 139; break; -case 24: return 140; +case 24: return 138; break; case 25: return 70 break; @@ -1304,45 +1337,45 @@ case 43: return 119 break; case 44: return 116 break; -case 45: return 90 +case 45: return 91 break; -case 46: return 91 +case 46: return 92 break; -case 47: return 92 +case 47: return 93 break; -case 48: return 93 +case 48: return 94 break; -case 49: return 94 +case 49: return 95 break; -case 50: return 95 +case 50: return 96 break; -case 51: return 96 +case 51: return 97 break; -case 52: return 97 +case 52: return 98 break; -case 53: return 99 +case 53: return 100 break; -case 54: return 100 +case 54: return 101 break; -case 55: return 98 +case 55: return 99 break; -case 56: return 101 +case 56: return 102 break; -case 57: return 102 +case 57: return 103 break; -case 58: return 103 +case 58: return 104 break; -case 59: return 104 +case 59: return 105 break; -case 60: return 105 +case 60: return 106 break; -case 61: return 106 +case 61: return 107 break; -case 62: return 107 +case 62: return 108 break; -case 63: return 108 +case 63: return 109 break; -case 64: return 109 +case 64: return 110 break; case 65: return 121 break; @@ -1358,17 +1391,17 @@ case 70: return 126 break; case 71: return 127 break; -case 72: return 112 +case 72: return 113 break; -case 73: return 110 +case 73: return 111 break; -case 74: return 111 +case 74: return 112 break; -case 75: return 149 +case 75: return 142 break; -case 76: return 150 +case 76: return 143 break; -case 77: return 151 +case 77: return 144 break; case 78: return 31 break; @@ -1382,7 +1415,7 @@ case 82: return 24 break; case 83: return 27 break; -case 84: return 113 +case 84: return 114 break; case 85: yy_.yytext = yy_.yytext.slice(1,-1); return 32; break; @@ -1400,9 +1433,9 @@ case 91: return 56 break; case 92: return 57 break; -case 93: return 147 +case 93: return 140 break; -case 94: return 148 +case 94: return 141 break; case 95: return 35 break; diff --git a/src/zkasm_parser.jison b/src/zkasm_parser.jison index 609941d..ecdc5f9 100644 --- a/src/zkasm_parser.jison +++ b/src/zkasm_parser.jison @@ -145,20 +145,6 @@ REPEAT { return 'REPEAT' } function setLine(dst, first) { dst.line = first.first_line; } -function negate(value) { - if (typeof value === 'number' | typeof value === 'bigint') { - return -value; - } - if (typeof value === 'string') { - return value.startsWith('-') ? value.substring(1) : '-'+value; - } - throw new Error(`ERROR: couldn't negate value ${value} (${typeof value})`); -} -function applySign(sign, value) { - if (sign === '+') return value; - if (sign === '-') return negate(value); - throw new Error(`ERROR: invalid sign ${sign} with value ${value} (${typeof value})`); -} %} %start allStatments @@ -586,31 +572,85 @@ op $$ = $3; $$.hashPDigest = 1; } - | JMP '(' jmpDestination ')' + | JMP '(' IDENTIFIER ')' + { + $$ = { [$1]: 1, useJmpAddr: 1, jmpAddr: $3 } + } + | jmpCond '(' IDENTIFIER ')' { - $$ = { ...$1, useJmpAddrRel: $3.useAddrRel, ...$3.indirections, jmpAddr: $3.addr } + $$ = { [$1]: 1, useJmpAddr: 1, jmpAddr: $3, useElseAddr: 1, elseAddr: 'next' } } - | jmpNotCond '(' jmpDestination ')' + | jmpCond '(' IDENTIFIER ',' IDENTIFIER ')' { - $$ = { ...$1, useElseAddrRel: $3.useAddrRel, ...$3.indirections, elseAddr: $3.addr, useJmpAddrRel: 0, jmpAddr: 'next' } + $$ = { [$1]: 1, useJmpAddr: 1, jmpAddr: $3, useElseAddr: 1, elseAddr: $5 } } - | jmpNotCond '(' jmpDestination ',' jmpDestination ')' + | jmpNotCond '(' IDENTIFIER ')' { - // TODO: validate $3.useAddrRel !== $5.useAddrRel || $3.indirections === $5.indirections - $$ = { ...$1, useElseAddrRel: $3.useAddrRel, ...$3.indirections, elseAddr: $3.addr, useJmpAddrRel: $5.useAddrRel, jmpAddr: $5, ...$5.indirections } + $$ = { [$1]: 1, useJmpAddr: 1, jmpAddr: 'next', useElseAddr: 1, elseAddr: $3 } } - | jmpCond '(' jmpDestination ')' + | jmpNotCond '(' IDENTIFIER ',' IDENTIFIER ')' { - $$ = { ...$1, useJmpAddrRel: $3.useAddrRel, ...$3.indirections, jmpAddr: $3.addr, useElseAddrRel: 0, elseAddr: 'next' } + $$ = { [$1]: 1, useJmpAddr: 1, jmpAddr: $5, useElseAddr: 1, elseAddr: $3 } } - | jmpCond '(' jmpDestination ',' jmpDestination')' + | JMP '(' RR ')' { - // TODO: validate $3.useAddrRel !== $5.useAddrRel || $3.indirections === $5.indirections - $$ = { ...$1, useJmpAddrRel: $3.useAddrRel, ...$3.indirections, jmpAddr: $3.addr, useElseAddrRel: $5.useAddrRel, elseAddr: $5.addr, ...$5.indirections } + $$ = { [$1]: 1, useJmpAddr: 0, ind: 0, indRR: 1, offset: 0 } } - | CALL '(' jmpDestination ')' + | JMP '(' E ')' { - $$ = {JMP: 0, JMPC: 0, JMPN: 0, useJmpAddrRel: $3.useAddrRel, jmpAddr: $3.addr, ...$3.indirections, call: 1 } + $$ = { [$1]: 1, useJmpAddr: 0, ind: 1, indRR: 0, offset: 0 } + } + | JMP '(' REFERENCE '+' RR ')' + { + $$ = { [$1]: 1, useJmpAddr: 0, ind: 0, indRR: 1, offset: $3 } + } + | JMP '(' REFERENCE '+' E ')' + { + $$ = { [$1]: 1, useJmpAddr: 0, ind: 1, indRR: 0, offset: $3 } + } + | jmpCond '(' RR ')' + { + $$ = { [$1]: 1, useJmpAddr: 0, ind: 0, indRR: 1, offset: 0, useElseAddr: 1, elseAddr: 'next' } + } + | jmpCond '(' E ')' + { + $$ = { [$1]: 1, useJmpAddr: 0, ind: 1, indRR: 0, offset: 0, useElseAddr: 1, elseAddr: 'next' } + } + | jmpCond '(' REFERENCE '+' RR ')' + { + $$ = { [$1]: 1, useJmpAddr: 0, ind: 0, indRR: 1, offset: $3, useElseAddr: 1, elseAddr: 'next' } + } + | jmpCond '(' REFERENCE '+' E ')' + { + $$ = { [$1]: 1, useJmpAddr: 0, ind: 1, indRR: 0, offset: $3, useElseAddr: 1, elseAddr: 'next' } + } + | jmpCond '(' RR ',' IDENTIFIER ')' + { + $$ = { [$1]: 1, useJmpAddr: 0, ind: 0, indRR: 1, offset: 0, useElseAddr: 1, elseAddr: $5 } + } + | jmpCond '(' E ',' IDENTIFIER ')' + { + $$ = { [$1]: 1, useJmpAddr: 0, ind: 1, indRR: 0, offset: 0, useElseAddr: 1, elseAddr: $5 } + } + | jmpCond '(' REFERENCE '+' RR ',' IDENTIFIER ')' + { + $$ = { [$1]: 1, useJmpAddr: 0, ind: 0, indRR: 1, offset: $3, useElseAddr: 1, elseAddr: $7 } + } + | jmpCond '(' REFERENCE '+' E ',' IDENTIFIER')' + { + $$ = { [$1]: 1, useJmpAddr: 0, ind: 1, indRR: 0, offset: $3, useElseAddr: 1, elseAddr: $7 } + } + | CALL '(' IDENTIFIER ')' + { + $$ = {JMP: 0, JMPC: 0, JMPN: 0, useJmpAddr:1, jmpAddr: $3, call: 1} + } + | CALL '(' REFERENCE '+' RR ')' + { + $$ = {JMP: 0, JMPC: 0, JMPN: 0, offset: $3, ind: 0, indRR: 1, return: 0, call: 1} + } + | CALL '(' REFERENCE '+' E ')' + { + $$ = {JMP: 0, JMPC: 0, JMPN: 0, offset: $3, ind: 1, indRR: 0, return: 0, call: 1} } | RETURN { @@ -706,21 +746,6 @@ op } ; -jmpDestination - : IDENTIFIER - { - $$ = { useAddrRel: 0, jmpAddr: $3 } - } - | REFERENCE '+' addrRel - { - $$ = { useAddrRel: $1, ind: 0, indRR: 1, addr: $3 } - } - | REFERENCE '-' addrRel - { - $$ = { useAddrRel: 1, ind: 0, indRR: 1, addr: $3 } - } - ; - jmpCond : JMPN | JMPC @@ -762,84 +787,6 @@ reg | RCX ; -indRegMul - : NUMBER - { - $$ = $1 - } - | CONSTID - { - $$ = $1 - } - ; - -indReg - : E - { - $$ = { reg: 'ind' } - } - | RR - { - $$ = { reg: 'indRR' } - } - ; - -indReg2 - : indReg - { - $$ = { ...$1, indReg: 1 } - } - | NUMBER '*' indReg - { - $$ = { ...$3, indReg: $1 } - } - | CONSTID '*' indReg - { - $$ = { ...$3, indReg: $1 } - } - ; - -addrRelOp - : '+' - { - $$ = $1 - } - | '-' - { - $$ = $1 - } - ; - -addrOffset - : NUMBER - { - $$ = $1 - } - | CONSTID - { - $$ = $1 - } - ; - -addrRel - : indReg2 - { - $$ = { [$1.reg]: $1.indReg } - } - | indReg2 addrRelOp addrOffset - { - $$ = { [$1.reg]: $1.indReg, extraOffset: applySign($2, $3)}; - } - | indReg2 addrRelOp indReg2 addrRelOp addrOffset - { - $$ = { [$1.reg]: $1.indReg, [$3.reg]: applySign($2, $3.indReg), extraOffset: applySign($4, $5) } - checkAddrRel($$); - } - | indReg2 addrRelOp indReg2 - { - $$ = { [$1.reg]: $1.indReg, [$3.reg]: applySign($2, $3.indReg) } - } - ; addr : SP @@ -862,35 +809,71 @@ addr { $$ = { isStack: 1, isMem:0, ind:0, indRR: 0, incStack: -1, offset: 0, useCTX: 1} } - | SYS ':' addrRel + | SYS ':' E '+' NUMBER { $$ = { isStack: 0, isMem:0, ind:1, indRR: 0, incStack: 0, offset: $5} } - | MEM ':' addrRel + | SYS ':' E '-' NUMBER + { + $$ = { isStack: 0, isMem:0, ind:1, indRR: 0, incStack: 0, offset: -$5} + } + | SYS ':' E + { + $$ = { isStack: 0, isMem:0, ind:1, indRR: 0, incStack: 0, offset: 0} + } + | MEM ':' E '+' NUMBER { $$ = { isStack: 0, isMem: 1, ind:1, indRR: 0, incStack: 0, offset: $5, useCTX: 1} } - | STACK ':' addrRel + | MEM ':' E '-' NUMBER + { + $$ = { isStack: 0, isMem: 1, ind:1, indRR: 0, incStack: 0, offset: -$5, useCTX: 1} + } + | MEM ':' E + { + $$ = { isStack: 0, isMem: 1, ind:1, indRR: 0, incStack: 0, offset: 0, useCTX: 1} + } + | STACK ':' E '+' NUMBER { $$ = { isStack: 1, ind:1, indRR: 0, incStack: 0, offset: $5, useCTX: 1} } - | addrRel + | STACK ':' E '-' NUMBER { - $$ = $1 + $$ = { isStack: 1, ind:1, indRR: 0, incStack: 0, offset: -$5, useCTX: 1} + } + | STACK ':' E + { + $$ = { isStack: 1, ind:1, indRR: 0, incStack: 0, offset: 0, useCTX: 1} } | IDENTIFIER { $$ = { offset: $1 } } - | IDENTIFIER '+' addrRel + | IDENTIFIER '+' RR + { + $$ = { offset: $1, ind: 0, indRR: 1 } + } + | IDENTIFIER '+' E + { + $$ = { offset: $1, ind: 1, indRR: 0 } + } + | IDENTIFIER '[' E ']' + { + $$ = { offset: $1, ind: 1, indRR: 0 } + } + | IDENTIFIER '[' E '-' NUMBER ']' { - $$ = { ...$3, offset: $1 } + $$ = { offset: $1, extraOffset: -$5, ind: 1, indRR: 0 } } - | IDENTIFIER '[' addrRel ']' + | IDENTIFIER '[' E '+' NUMBER ']' { - $$ = { ...$3, offset: $1 } + $$ = { offset: $1, extraOffset: $5, ind: 1, indRR: 0 } + } + | IDENTIFIER '+' NUMBER + { + $$ = { offset: $1, extraOffset: $3 } } - | IDENTIFIER '+' addrOffset + | IDENTIFIER '[' NUMBER ']' { $$ = { offset: $1, extraOffset: $3 } } @@ -899,11 +882,11 @@ addr hashId : NUMBER { - $$ = { ind: 0, indRR: 0, offset:$1 } + $$ = {ind: 0, indRR: 0, offset:$1} } | E { - $$ = { ind: 1, indRR: 0, offset:0 } + $$ = {ind: 1, indRR: 0, offset:0} } | RR {