diff --git a/circom-g4-grammar b/circom-g4-grammar index a1b003d..6440ff4 160000 --- a/circom-g4-grammar +++ b/circom-g4-grammar @@ -1 +1 @@ -Subproject commit a1b003da79c82573750cb1945e40bcf7156a4dd3 +Subproject commit 6440ff47c5627c903e56ba5dcb7a55a73b9f4175 diff --git a/package-lock.json b/package-lock.json index 3706c0e..f094192 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@distributedlab/circom-parser", - "version": "0.1.4", + "version": "0.1.5", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@distributedlab/circom-parser", - "version": "0.1.4", + "version": "0.1.5", "license": "MIT", "dependencies": { "antlr4": "4.13.1-patch-1", diff --git a/package.json b/package.json index 3a7a9d6..c26e9bb 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@distributedlab/circom-parser", "description": "Circom circuit parser built with ANTLR4", - "version": "0.1.4", + "version": "0.1.5", "main": "dist/index.js", "types": "dist/index.d.ts", "files": [ @@ -30,7 +30,8 @@ "generate": "npm run init && ./parser/generate.sh", "build": "npm run generate && tsc && npm run lint-fix", "lint-fix": "prettier --write '**/*.ts'", - "test": "npm run build && mocha --exit", + "test": "mocha --exit", + "build-and-test": "npm run build && mocha --exit", "publish-to-npm": "npm run build && npm run lint-fix && npm publish ./ --access public" }, "dependencies": { diff --git a/parser/generate.sh b/parser/generate.sh index 88de25d..dda30e4 100755 --- a/parser/generate.sh +++ b/parser/generate.sh @@ -9,6 +9,7 @@ antlr4 -Dlanguage=TypeScript -visitor -package parser parser/*.g4 rm parser/*.g4 +mkdir -p src/generated mv parser/*.ts src/generated rm parser/*Circom*.* \ No newline at end of file diff --git a/src/generated/CircomLexer.ts b/src/generated/CircomLexer.ts index 4d88bd4..76fa7c4 100644 --- a/src/generated/CircomLexer.ts +++ b/src/generated/CircomLexer.ts @@ -1,4 +1,4 @@ -// Generated from parser/Circom.g4 by ANTLR 4.13.1 +// Generated from parser/CircomLexer.g4 by ANTLR 4.13.1 // noinspection ES6UnusedImports,JSUnusedGlobalSymbols,JSUnusedLocalSymbols import { ATN, @@ -15,69 +15,69 @@ import { export default class CircomLexer extends Lexer { public static readonly VERSION = 1; public static readonly SIGNAL_TYPE = 2; - public static readonly SIGNAL = 3; - public static readonly INPUT = 4; - public static readonly OUTPUT = 5; - public static readonly PUBLIC = 6; - public static readonly TEMPLATE = 7; - public static readonly COMPONENT = 8; - public static readonly VAR = 9; + public static readonly PRAGMA = 3; + public static readonly CIRCOM = 4; + public static readonly CUSTOM_TEMPLATES = 5; + public static readonly INCLUDE = 6; + public static readonly CUSTOM = 7; + public static readonly PARALLEL = 8; + public static readonly TEMPLATE = 9; public static readonly FUNCTION = 10; - public static readonly RETURN = 11; - public static readonly IF = 12; - public static readonly ELSE = 13; - public static readonly FOR = 14; - public static readonly WHILE = 15; - public static readonly DO = 16; - public static readonly LOG = 17; - public static readonly ASSERT = 18; - public static readonly INCLUDE = 19; - public static readonly CUSTOM = 20; - public static readonly PRAGMA = 21; - public static readonly CIRCOM = 22; - public static readonly CUSTOM_TEMPLATES = 23; - public static readonly MAIN = 24; - public static readonly PARALLEL = 25; + public static readonly MAIN = 11; + public static readonly PUBLIC = 12; + public static readonly COMPONENT = 13; + public static readonly VAR = 14; + public static readonly SIGNAL = 15; + public static readonly INPUT = 16; + public static readonly OUTPUT = 17; + public static readonly IF = 18; + public static readonly ELSE = 19; + public static readonly FOR = 20; + public static readonly WHILE = 21; + public static readonly DO = 22; + public static readonly LOG = 23; + public static readonly ASSERT = 24; + public static readonly RETURN = 25; public static readonly LP = 26; public static readonly RP = 27; public static readonly LB = 28; public static readonly RB = 29; public static readonly LC = 30; public static readonly RC = 31; - public static readonly COLON = 32; - public static readonly SEMICOLON = 33; - public static readonly DOT = 34; - public static readonly COMMA = 35; - public static readonly ASSIGNMENT = 36; - public static readonly ASSIGNMENT_OP = 37; - public static readonly SELF_OP = 38; - public static readonly LEFT_ASSIGNMENT = 39; - public static readonly RIGHT_ASSIGNMENT = 40; - public static readonly CONSTRAINT_EQ = 41; - public static readonly QUESTION_MARK = 42; - public static readonly UNDERSCORE = 43; - public static readonly NOT = 44; - public static readonly BNOT = 45; - public static readonly POW = 46; - public static readonly MUL = 47; - public static readonly DIV = 48; - public static readonly QUO = 49; - public static readonly MOD = 50; - public static readonly ADD = 51; - public static readonly SUB = 52; - public static readonly SHL = 53; - public static readonly SHR = 54; - public static readonly BAND = 55; - public static readonly BXOR = 56; - public static readonly BOR = 57; - public static readonly EQ = 58; - public static readonly NEQ = 59; - public static readonly GT = 60; - public static readonly LT = 61; - public static readonly LE = 62; - public static readonly GE = 63; - public static readonly AND = 64; - public static readonly OR = 65; + public static readonly SEMICOLON = 32; + public static readonly DOT = 33; + public static readonly COMMA = 34; + public static readonly UNDERSCORE = 35; + public static readonly TERNARY_CONDITION = 36; + public static readonly TERNARY_ALTERNATIVE = 37; + public static readonly EQ_CONSTRAINT = 38; + public static readonly LEFT_CONSTRAINT = 39; + public static readonly RIGHT_CONSTRAINT = 40; + public static readonly SELF_OP = 41; + public static readonly NOT = 42; + public static readonly BNOT = 43; + public static readonly POW = 44; + public static readonly MUL = 45; + public static readonly DIV = 46; + public static readonly QUO = 47; + public static readonly MOD = 48; + public static readonly ADD = 49; + public static readonly SUB = 50; + public static readonly SHL = 51; + public static readonly SHR = 52; + public static readonly BAND = 53; + public static readonly BXOR = 54; + public static readonly BOR = 55; + public static readonly EQ = 56; + public static readonly NEQ = 57; + public static readonly GT = 58; + public static readonly LT = 59; + public static readonly LE = 60; + public static readonly GE = 61; + public static readonly AND = 62; + public static readonly OR = 63; + public static readonly ASSIGNMENT = 64; + public static readonly ASSIGNMENT_WITH_OP = 65; public static readonly ID = 66; public static readonly NUMBER = 67; public static readonly HEX = 68; @@ -95,15 +95,21 @@ export default class CircomLexer extends Lexer { null, null, null, - "'signal'", - "'input'", - "'output'", - "'public'", + "'pragma'", + "'circom'", + "'custom_templates'", + "'include'", + "'custom'", + "'parallel'", "'template'", + "'function'", + "'main'", + "'public'", "'component'", "'var'", - "'function'", - "'return'", + "'signal'", + "'input'", + "'output'", "'if'", "'else'", "'for'", @@ -111,31 +117,23 @@ export default class CircomLexer extends Lexer { "'do'", "'log'", "'assert'", - "'include'", - "'custom'", - "'pragma'", - "'circom'", - "'custom_templates'", - "'main'", - "'parallel'", + "'return'", "'('", "')'", "'['", "']'", "'{'", "'}'", - "':'", "';'", "'.'", "','", - "'='", - null, + "'_'", + "'?'", + "':'", + "'==='", null, null, null, - "'==='", - "'?'", - "'_'", "'!'", "'~'", "'**'", @@ -154,24 +152,31 @@ export default class CircomLexer extends Lexer { "'!='", "'>'", "'<'", - "'>='", "'<='", + "'>='", "'&&'", "'||'", + "'='", ]; public static readonly symbolicNames: (string | null)[] = [ null, "VERSION", "SIGNAL_TYPE", - "SIGNAL", - "INPUT", - "OUTPUT", - "PUBLIC", + "PRAGMA", + "CIRCOM", + "CUSTOM_TEMPLATES", + "INCLUDE", + "CUSTOM", + "PARALLEL", "TEMPLATE", + "FUNCTION", + "MAIN", + "PUBLIC", "COMPONENT", "VAR", - "FUNCTION", - "RETURN", + "SIGNAL", + "INPUT", + "OUTPUT", "IF", "ELSE", "FOR", @@ -179,31 +184,23 @@ export default class CircomLexer extends Lexer { "DO", "LOG", "ASSERT", - "INCLUDE", - "CUSTOM", - "PRAGMA", - "CIRCOM", - "CUSTOM_TEMPLATES", - "MAIN", - "PARALLEL", + "RETURN", "LP", "RP", "LB", "RB", "LC", "RC", - "COLON", "SEMICOLON", "DOT", "COMMA", - "ASSIGNMENT", - "ASSIGNMENT_OP", - "SELF_OP", - "LEFT_ASSIGNMENT", - "RIGHT_ASSIGNMENT", - "CONSTRAINT_EQ", - "QUESTION_MARK", "UNDERSCORE", + "TERNARY_CONDITION", + "TERNARY_ALTERNATIVE", + "EQ_CONSTRAINT", + "LEFT_CONSTRAINT", + "RIGHT_CONSTRAINT", + "SELF_OP", "NOT", "BNOT", "POW", @@ -226,6 +223,8 @@ export default class CircomLexer extends Lexer { "GE", "AND", "OR", + "ASSIGNMENT", + "ASSIGNMENT_WITH_OP", "ID", "NUMBER", "HEX", @@ -239,15 +238,21 @@ export default class CircomLexer extends Lexer { public static readonly ruleNames: string[] = [ "VERSION", "SIGNAL_TYPE", - "SIGNAL", - "INPUT", - "OUTPUT", - "PUBLIC", + "PRAGMA", + "CIRCOM", + "CUSTOM_TEMPLATES", + "INCLUDE", + "CUSTOM", + "PARALLEL", "TEMPLATE", + "FUNCTION", + "MAIN", + "PUBLIC", "COMPONENT", "VAR", - "FUNCTION", - "RETURN", + "SIGNAL", + "INPUT", + "OUTPUT", "IF", "ELSE", "FOR", @@ -255,31 +260,23 @@ export default class CircomLexer extends Lexer { "DO", "LOG", "ASSERT", - "INCLUDE", - "CUSTOM", - "PRAGMA", - "CIRCOM", - "CUSTOM_TEMPLATES", - "MAIN", - "PARALLEL", + "RETURN", "LP", "RP", "LB", "RB", "LC", "RC", - "COLON", "SEMICOLON", "DOT", "COMMA", - "ASSIGNMENT", - "ASSIGNMENT_OP", - "SELF_OP", - "LEFT_ASSIGNMENT", - "RIGHT_ASSIGNMENT", - "CONSTRAINT_EQ", - "QUESTION_MARK", "UNDERSCORE", + "TERNARY_CONDITION", + "TERNARY_ALTERNATIVE", + "EQ_CONSTRAINT", + "LEFT_CONSTRAINT", + "RIGHT_CONSTRAINT", + "SELF_OP", "NOT", "BNOT", "POW", @@ -302,6 +299,8 @@ export default class CircomLexer extends Lexer { "GE", "AND", "OR", + "ASSIGNMENT", + "ASSIGNMENT_WITH_OP", "ID", "LETTER", "ID_SYMBOL", @@ -327,7 +326,7 @@ export default class CircomLexer extends Lexer { } public get grammarFileName(): string { - return "Circom.g4"; + return "CircomLexer.g4"; } public get literalNames(): (string | null)[] { @@ -369,217 +368,217 @@ export default class CircomLexer extends Lexer { 71, 7, 71, 2, 72, 7, 72, 2, 73, 7, 73, 2, 74, 7, 74, 2, 75, 7, 75, 2, 76, 7, 76, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 3, 1, 164, 8, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, - 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, - 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, - 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 9, - 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, - 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, - 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, - 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, - 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, - 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, - 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, - 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, - 1, 22, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, - 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 26, 1, 26, - 1, 27, 1, 27, 1, 28, 1, 28, 1, 29, 1, 29, 1, 30, 1, 30, 1, 31, 1, 31, 1, 32, - 1, 32, 1, 33, 1, 33, 1, 34, 1, 34, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 36, - 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, - 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, - 1, 36, 3, 36, 373, 8, 36, 1, 37, 1, 37, 1, 37, 1, 37, 3, 37, 379, 8, 37, 1, - 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 3, 38, 387, 8, 38, 1, 39, 1, 39, 1, - 39, 1, 39, 1, 39, 1, 39, 3, 39, 395, 8, 39, 1, 40, 1, 40, 1, 40, 1, 40, 1, - 41, 1, 41, 1, 42, 1, 42, 1, 43, 1, 43, 1, 44, 1, 44, 1, 45, 1, 45, 1, 45, 1, - 46, 1, 46, 1, 47, 1, 47, 1, 48, 1, 48, 1, 49, 1, 49, 1, 50, 1, 50, 1, 51, 1, - 51, 1, 52, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 1, 54, 1, 54, 1, 55, 1, 55, 1, - 56, 1, 56, 1, 57, 1, 57, 1, 57, 1, 58, 1, 58, 1, 58, 1, 59, 1, 59, 1, 60, 1, - 60, 1, 61, 1, 61, 1, 61, 1, 62, 1, 62, 1, 62, 1, 63, 1, 63, 1, 63, 1, 64, 1, - 64, 1, 64, 1, 65, 5, 65, 459, 8, 65, 10, 65, 12, 65, 462, 9, 65, 1, 65, 1, - 65, 1, 65, 1, 65, 5, 65, 468, 8, 65, 10, 65, 12, 65, 471, 9, 65, 1, 66, 1, - 66, 1, 67, 1, 67, 1, 68, 4, 68, 478, 8, 68, 11, 68, 12, 68, 479, 1, 68, 3, - 68, 483, 8, 68, 1, 69, 1, 69, 1, 70, 1, 70, 1, 70, 4, 70, 490, 8, 70, 11, - 70, 12, 70, 491, 1, 71, 1, 71, 1, 72, 1, 72, 1, 72, 5, 72, 499, 8, 72, 10, - 72, 12, 72, 502, 9, 72, 1, 72, 1, 72, 1, 73, 1, 73, 1, 73, 1, 74, 1, 74, 1, - 74, 1, 74, 5, 74, 513, 8, 74, 10, 74, 12, 74, 516, 9, 74, 1, 74, 1, 74, 1, - 74, 1, 74, 1, 74, 1, 75, 1, 75, 1, 75, 1, 75, 5, 75, 527, 8, 75, 10, 75, 12, - 75, 530, 9, 75, 1, 75, 1, 75, 1, 76, 4, 76, 535, 8, 76, 11, 76, 12, 76, 536, - 1, 76, 1, 76, 2, 500, 514, 0, 77, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, - 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, - 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, - 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, - 36, 73, 37, 75, 38, 77, 39, 79, 40, 81, 41, 83, 42, 85, 43, 87, 44, 89, 45, - 91, 46, 93, 47, 95, 48, 97, 49, 99, 50, 101, 51, 103, 52, 105, 53, 107, 54, - 109, 55, 111, 56, 113, 57, 115, 58, 117, 59, 119, 60, 121, 61, 123, 62, 125, - 63, 127, 64, 129, 65, 131, 66, 133, 0, 135, 0, 137, 67, 139, 0, 141, 68, - 143, 0, 145, 69, 147, 0, 149, 70, 151, 71, 153, 72, 1, 0, 7, 3, 0, 65, 90, - 97, 122, 128, 255, 2, 0, 36, 36, 95, 95, 1, 0, 48, 57, 3, 0, 48, 57, 65, 70, - 97, 102, 7, 0, 34, 34, 92, 92, 98, 98, 102, 102, 110, 110, 114, 114, 116, - 116, 2, 0, 10, 10, 13, 13, 3, 0, 9, 10, 12, 13, 32, 32, 561, 0, 1, 1, 0, 0, - 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, - 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, - 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, - 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, - 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, - 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, - 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, - 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, - 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, - 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, - 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, - 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 95, 1, 0, 0, 0, 0, 97, 1, 0, 0, 0, - 0, 99, 1, 0, 0, 0, 0, 101, 1, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 105, 1, 0, 0, - 0, 0, 107, 1, 0, 0, 0, 0, 109, 1, 0, 0, 0, 0, 111, 1, 0, 0, 0, 0, 113, 1, 0, - 0, 0, 0, 115, 1, 0, 0, 0, 0, 117, 1, 0, 0, 0, 0, 119, 1, 0, 0, 0, 0, 121, 1, - 0, 0, 0, 0, 123, 1, 0, 0, 0, 0, 125, 1, 0, 0, 0, 0, 127, 1, 0, 0, 0, 0, 129, - 1, 0, 0, 0, 0, 131, 1, 0, 0, 0, 0, 137, 1, 0, 0, 0, 0, 141, 1, 0, 0, 0, 0, - 145, 1, 0, 0, 0, 0, 149, 1, 0, 0, 0, 0, 151, 1, 0, 0, 0, 0, 153, 1, 0, 0, 0, - 1, 155, 1, 0, 0, 0, 3, 163, 1, 0, 0, 0, 5, 165, 1, 0, 0, 0, 7, 172, 1, 0, 0, - 0, 9, 178, 1, 0, 0, 0, 11, 185, 1, 0, 0, 0, 13, 192, 1, 0, 0, 0, 15, 201, 1, - 0, 0, 0, 17, 211, 1, 0, 0, 0, 19, 215, 1, 0, 0, 0, 21, 224, 1, 0, 0, 0, 23, - 231, 1, 0, 0, 0, 25, 234, 1, 0, 0, 0, 27, 239, 1, 0, 0, 0, 29, 243, 1, 0, 0, - 0, 31, 249, 1, 0, 0, 0, 33, 252, 1, 0, 0, 0, 35, 256, 1, 0, 0, 0, 37, 263, - 1, 0, 0, 0, 39, 271, 1, 0, 0, 0, 41, 278, 1, 0, 0, 0, 43, 285, 1, 0, 0, 0, - 45, 292, 1, 0, 0, 0, 47, 309, 1, 0, 0, 0, 49, 314, 1, 0, 0, 0, 51, 323, 1, - 0, 0, 0, 53, 325, 1, 0, 0, 0, 55, 327, 1, 0, 0, 0, 57, 329, 1, 0, 0, 0, 59, - 331, 1, 0, 0, 0, 61, 333, 1, 0, 0, 0, 63, 335, 1, 0, 0, 0, 65, 337, 1, 0, 0, - 0, 67, 339, 1, 0, 0, 0, 69, 341, 1, 0, 0, 0, 71, 343, 1, 0, 0, 0, 73, 372, - 1, 0, 0, 0, 75, 378, 1, 0, 0, 0, 77, 386, 1, 0, 0, 0, 79, 394, 1, 0, 0, 0, - 81, 396, 1, 0, 0, 0, 83, 400, 1, 0, 0, 0, 85, 402, 1, 0, 0, 0, 87, 404, 1, - 0, 0, 0, 89, 406, 1, 0, 0, 0, 91, 408, 1, 0, 0, 0, 93, 411, 1, 0, 0, 0, 95, - 413, 1, 0, 0, 0, 97, 415, 1, 0, 0, 0, 99, 417, 1, 0, 0, 0, 101, 419, 1, 0, - 0, 0, 103, 421, 1, 0, 0, 0, 105, 423, 1, 0, 0, 0, 107, 426, 1, 0, 0, 0, 109, - 429, 1, 0, 0, 0, 111, 431, 1, 0, 0, 0, 113, 433, 1, 0, 0, 0, 115, 435, 1, 0, - 0, 0, 117, 438, 1, 0, 0, 0, 119, 441, 1, 0, 0, 0, 121, 443, 1, 0, 0, 0, 123, - 445, 1, 0, 0, 0, 125, 448, 1, 0, 0, 0, 127, 451, 1, 0, 0, 0, 129, 454, 1, 0, - 0, 0, 131, 460, 1, 0, 0, 0, 133, 472, 1, 0, 0, 0, 135, 474, 1, 0, 0, 0, 137, - 482, 1, 0, 0, 0, 139, 484, 1, 0, 0, 0, 141, 486, 1, 0, 0, 0, 143, 493, 1, 0, - 0, 0, 145, 495, 1, 0, 0, 0, 147, 505, 1, 0, 0, 0, 149, 508, 1, 0, 0, 0, 151, - 522, 1, 0, 0, 0, 153, 534, 1, 0, 0, 0, 155, 156, 3, 137, 68, 0, 156, 157, 5, - 46, 0, 0, 157, 158, 3, 137, 68, 0, 158, 159, 5, 46, 0, 0, 159, 160, 3, 137, - 68, 0, 160, 2, 1, 0, 0, 0, 161, 164, 3, 7, 3, 0, 162, 164, 3, 9, 4, 0, 163, - 161, 1, 0, 0, 0, 163, 162, 1, 0, 0, 0, 164, 4, 1, 0, 0, 0, 165, 166, 5, 115, - 0, 0, 166, 167, 5, 105, 0, 0, 167, 168, 5, 103, 0, 0, 168, 169, 5, 110, 0, - 0, 169, 170, 5, 97, 0, 0, 170, 171, 5, 108, 0, 0, 171, 6, 1, 0, 0, 0, 172, - 173, 5, 105, 0, 0, 173, 174, 5, 110, 0, 0, 174, 175, 5, 112, 0, 0, 175, 176, - 5, 117, 0, 0, 176, 177, 5, 116, 0, 0, 177, 8, 1, 0, 0, 0, 178, 179, 5, 111, - 0, 0, 179, 180, 5, 117, 0, 0, 180, 181, 5, 116, 0, 0, 181, 182, 5, 112, 0, - 0, 182, 183, 5, 117, 0, 0, 183, 184, 5, 116, 0, 0, 184, 10, 1, 0, 0, 0, 185, - 186, 5, 112, 0, 0, 186, 187, 5, 117, 0, 0, 187, 188, 5, 98, 0, 0, 188, 189, - 5, 108, 0, 0, 189, 190, 5, 105, 0, 0, 190, 191, 5, 99, 0, 0, 191, 12, 1, 0, - 0, 0, 192, 193, 5, 116, 0, 0, 193, 194, 5, 101, 0, 0, 194, 195, 5, 109, 0, - 0, 195, 196, 5, 112, 0, 0, 196, 197, 5, 108, 0, 0, 197, 198, 5, 97, 0, 0, - 198, 199, 5, 116, 0, 0, 199, 200, 5, 101, 0, 0, 200, 14, 1, 0, 0, 0, 201, - 202, 5, 99, 0, 0, 202, 203, 5, 111, 0, 0, 203, 204, 5, 109, 0, 0, 204, 205, - 5, 112, 0, 0, 205, 206, 5, 111, 0, 0, 206, 207, 5, 110, 0, 0, 207, 208, 5, - 101, 0, 0, 208, 209, 5, 110, 0, 0, 209, 210, 5, 116, 0, 0, 210, 16, 1, 0, 0, - 0, 211, 212, 5, 118, 0, 0, 212, 213, 5, 97, 0, 0, 213, 214, 5, 114, 0, 0, - 214, 18, 1, 0, 0, 0, 215, 216, 5, 102, 0, 0, 216, 217, 5, 117, 0, 0, 217, - 218, 5, 110, 0, 0, 218, 219, 5, 99, 0, 0, 219, 220, 5, 116, 0, 0, 220, 221, - 5, 105, 0, 0, 221, 222, 5, 111, 0, 0, 222, 223, 5, 110, 0, 0, 223, 20, 1, 0, - 0, 0, 224, 225, 5, 114, 0, 0, 225, 226, 5, 101, 0, 0, 226, 227, 5, 116, 0, - 0, 227, 228, 5, 117, 0, 0, 228, 229, 5, 114, 0, 0, 229, 230, 5, 110, 0, 0, - 230, 22, 1, 0, 0, 0, 231, 232, 5, 105, 0, 0, 232, 233, 5, 102, 0, 0, 233, - 24, 1, 0, 0, 0, 234, 235, 5, 101, 0, 0, 235, 236, 5, 108, 0, 0, 236, 237, 5, - 115, 0, 0, 237, 238, 5, 101, 0, 0, 238, 26, 1, 0, 0, 0, 239, 240, 5, 102, 0, - 0, 240, 241, 5, 111, 0, 0, 241, 242, 5, 114, 0, 0, 242, 28, 1, 0, 0, 0, 243, - 244, 5, 119, 0, 0, 244, 245, 5, 104, 0, 0, 245, 246, 5, 105, 0, 0, 246, 247, - 5, 108, 0, 0, 247, 248, 5, 101, 0, 0, 248, 30, 1, 0, 0, 0, 249, 250, 5, 100, - 0, 0, 250, 251, 5, 111, 0, 0, 251, 32, 1, 0, 0, 0, 252, 253, 5, 108, 0, 0, - 253, 254, 5, 111, 0, 0, 254, 255, 5, 103, 0, 0, 255, 34, 1, 0, 0, 0, 256, - 257, 5, 97, 0, 0, 257, 258, 5, 115, 0, 0, 258, 259, 5, 115, 0, 0, 259, 260, - 5, 101, 0, 0, 260, 261, 5, 114, 0, 0, 261, 262, 5, 116, 0, 0, 262, 36, 1, 0, - 0, 0, 263, 264, 5, 105, 0, 0, 264, 265, 5, 110, 0, 0, 265, 266, 5, 99, 0, 0, - 266, 267, 5, 108, 0, 0, 267, 268, 5, 117, 0, 0, 268, 269, 5, 100, 0, 0, 269, - 270, 5, 101, 0, 0, 270, 38, 1, 0, 0, 0, 271, 272, 5, 99, 0, 0, 272, 273, 5, - 117, 0, 0, 273, 274, 5, 115, 0, 0, 274, 275, 5, 116, 0, 0, 275, 276, 5, 111, - 0, 0, 276, 277, 5, 109, 0, 0, 277, 40, 1, 0, 0, 0, 278, 279, 5, 112, 0, 0, - 279, 280, 5, 114, 0, 0, 280, 281, 5, 97, 0, 0, 281, 282, 5, 103, 0, 0, 282, - 283, 5, 109, 0, 0, 283, 284, 5, 97, 0, 0, 284, 42, 1, 0, 0, 0, 285, 286, 5, - 99, 0, 0, 286, 287, 5, 105, 0, 0, 287, 288, 5, 114, 0, 0, 288, 289, 5, 99, - 0, 0, 289, 290, 5, 111, 0, 0, 290, 291, 5, 109, 0, 0, 291, 44, 1, 0, 0, 0, - 292, 293, 5, 99, 0, 0, 293, 294, 5, 117, 0, 0, 294, 295, 5, 115, 0, 0, 295, - 296, 5, 116, 0, 0, 296, 297, 5, 111, 0, 0, 297, 298, 5, 109, 0, 0, 298, 299, - 5, 95, 0, 0, 299, 300, 5, 116, 0, 0, 300, 301, 5, 101, 0, 0, 301, 302, 5, - 109, 0, 0, 302, 303, 5, 112, 0, 0, 303, 304, 5, 108, 0, 0, 304, 305, 5, 97, - 0, 0, 305, 306, 5, 116, 0, 0, 306, 307, 5, 101, 0, 0, 307, 308, 5, 115, 0, - 0, 308, 46, 1, 0, 0, 0, 309, 310, 5, 109, 0, 0, 310, 311, 5, 97, 0, 0, 311, - 312, 5, 105, 0, 0, 312, 313, 5, 110, 0, 0, 313, 48, 1, 0, 0, 0, 314, 315, 5, - 112, 0, 0, 315, 316, 5, 97, 0, 0, 316, 317, 5, 114, 0, 0, 317, 318, 5, 97, - 0, 0, 318, 319, 5, 108, 0, 0, 319, 320, 5, 108, 0, 0, 320, 321, 5, 101, 0, - 0, 321, 322, 5, 108, 0, 0, 322, 50, 1, 0, 0, 0, 323, 324, 5, 40, 0, 0, 324, - 52, 1, 0, 0, 0, 325, 326, 5, 41, 0, 0, 326, 54, 1, 0, 0, 0, 327, 328, 5, 91, - 0, 0, 328, 56, 1, 0, 0, 0, 329, 330, 5, 93, 0, 0, 330, 58, 1, 0, 0, 0, 331, - 332, 5, 123, 0, 0, 332, 60, 1, 0, 0, 0, 333, 334, 5, 125, 0, 0, 334, 62, 1, - 0, 0, 0, 335, 336, 5, 58, 0, 0, 336, 64, 1, 0, 0, 0, 337, 338, 5, 59, 0, 0, - 338, 66, 1, 0, 0, 0, 339, 340, 5, 46, 0, 0, 340, 68, 1, 0, 0, 0, 341, 342, - 5, 44, 0, 0, 342, 70, 1, 0, 0, 0, 343, 344, 5, 61, 0, 0, 344, 72, 1, 0, 0, - 0, 345, 346, 5, 43, 0, 0, 346, 373, 5, 61, 0, 0, 347, 348, 5, 45, 0, 0, 348, - 373, 5, 61, 0, 0, 349, 350, 5, 42, 0, 0, 350, 373, 5, 61, 0, 0, 351, 352, 5, - 42, 0, 0, 352, 353, 5, 42, 0, 0, 353, 373, 5, 61, 0, 0, 354, 355, 5, 47, 0, - 0, 355, 373, 5, 61, 0, 0, 356, 357, 5, 92, 0, 0, 357, 373, 5, 61, 0, 0, 358, - 359, 5, 37, 0, 0, 359, 373, 5, 61, 0, 0, 360, 361, 5, 60, 0, 0, 361, 362, 5, - 60, 0, 0, 362, 373, 5, 61, 0, 0, 363, 364, 5, 62, 0, 0, 364, 365, 5, 62, 0, - 0, 365, 373, 5, 61, 0, 0, 366, 367, 5, 38, 0, 0, 367, 373, 5, 61, 0, 0, 368, - 369, 5, 94, 0, 0, 369, 373, 5, 61, 0, 0, 370, 371, 5, 124, 0, 0, 371, 373, - 5, 61, 0, 0, 372, 345, 1, 0, 0, 0, 372, 347, 1, 0, 0, 0, 372, 349, 1, 0, 0, - 0, 372, 351, 1, 0, 0, 0, 372, 354, 1, 0, 0, 0, 372, 356, 1, 0, 0, 0, 372, - 358, 1, 0, 0, 0, 372, 360, 1, 0, 0, 0, 372, 363, 1, 0, 0, 0, 372, 366, 1, 0, - 0, 0, 372, 368, 1, 0, 0, 0, 372, 370, 1, 0, 0, 0, 373, 74, 1, 0, 0, 0, 374, - 375, 5, 43, 0, 0, 375, 379, 5, 43, 0, 0, 376, 377, 5, 45, 0, 0, 377, 379, 5, - 45, 0, 0, 378, 374, 1, 0, 0, 0, 378, 376, 1, 0, 0, 0, 379, 76, 1, 0, 0, 0, - 380, 381, 5, 60, 0, 0, 381, 382, 5, 45, 0, 0, 382, 387, 5, 45, 0, 0, 383, - 384, 5, 60, 0, 0, 384, 385, 5, 61, 0, 0, 385, 387, 5, 61, 0, 0, 386, 380, 1, - 0, 0, 0, 386, 383, 1, 0, 0, 0, 387, 78, 1, 0, 0, 0, 388, 389, 5, 45, 0, 0, - 389, 390, 5, 45, 0, 0, 390, 395, 5, 62, 0, 0, 391, 392, 5, 61, 0, 0, 392, - 393, 5, 61, 0, 0, 393, 395, 5, 62, 0, 0, 394, 388, 1, 0, 0, 0, 394, 391, 1, - 0, 0, 0, 395, 80, 1, 0, 0, 0, 396, 397, 5, 61, 0, 0, 397, 398, 5, 61, 0, 0, - 398, 399, 5, 61, 0, 0, 399, 82, 1, 0, 0, 0, 400, 401, 5, 63, 0, 0, 401, 84, - 1, 0, 0, 0, 402, 403, 5, 95, 0, 0, 403, 86, 1, 0, 0, 0, 404, 405, 5, 33, 0, - 0, 405, 88, 1, 0, 0, 0, 406, 407, 5, 126, 0, 0, 407, 90, 1, 0, 0, 0, 408, - 409, 5, 42, 0, 0, 409, 410, 5, 42, 0, 0, 410, 92, 1, 0, 0, 0, 411, 412, 5, - 42, 0, 0, 412, 94, 1, 0, 0, 0, 413, 414, 5, 47, 0, 0, 414, 96, 1, 0, 0, 0, - 415, 416, 5, 92, 0, 0, 416, 98, 1, 0, 0, 0, 417, 418, 5, 37, 0, 0, 418, 100, - 1, 0, 0, 0, 419, 420, 5, 43, 0, 0, 420, 102, 1, 0, 0, 0, 421, 422, 5, 45, 0, - 0, 422, 104, 1, 0, 0, 0, 423, 424, 5, 60, 0, 0, 424, 425, 5, 60, 0, 0, 425, - 106, 1, 0, 0, 0, 426, 427, 5, 62, 0, 0, 427, 428, 5, 62, 0, 0, 428, 108, 1, - 0, 0, 0, 429, 430, 5, 38, 0, 0, 430, 110, 1, 0, 0, 0, 431, 432, 5, 94, 0, 0, - 432, 112, 1, 0, 0, 0, 433, 434, 5, 124, 0, 0, 434, 114, 1, 0, 0, 0, 435, - 436, 5, 61, 0, 0, 436, 437, 5, 61, 0, 0, 437, 116, 1, 0, 0, 0, 438, 439, 5, - 33, 0, 0, 439, 440, 5, 61, 0, 0, 440, 118, 1, 0, 0, 0, 441, 442, 5, 62, 0, - 0, 442, 120, 1, 0, 0, 0, 443, 444, 5, 60, 0, 0, 444, 122, 1, 0, 0, 0, 445, - 446, 5, 62, 0, 0, 446, 447, 5, 61, 0, 0, 447, 124, 1, 0, 0, 0, 448, 449, 5, - 60, 0, 0, 449, 450, 5, 61, 0, 0, 450, 126, 1, 0, 0, 0, 451, 452, 5, 38, 0, - 0, 452, 453, 5, 38, 0, 0, 453, 128, 1, 0, 0, 0, 454, 455, 5, 124, 0, 0, 455, - 456, 5, 124, 0, 0, 456, 130, 1, 0, 0, 0, 457, 459, 3, 135, 67, 0, 458, 457, - 1, 0, 0, 0, 459, 462, 1, 0, 0, 0, 460, 458, 1, 0, 0, 0, 460, 461, 1, 0, 0, - 0, 461, 463, 1, 0, 0, 0, 462, 460, 1, 0, 0, 0, 463, 469, 3, 133, 66, 0, 464, - 468, 3, 133, 66, 0, 465, 468, 3, 139, 69, 0, 466, 468, 3, 135, 67, 0, 467, - 464, 1, 0, 0, 0, 467, 465, 1, 0, 0, 0, 467, 466, 1, 0, 0, 0, 468, 471, 1, 0, - 0, 0, 469, 467, 1, 0, 0, 0, 469, 470, 1, 0, 0, 0, 470, 132, 1, 0, 0, 0, 471, - 469, 1, 0, 0, 0, 472, 473, 7, 0, 0, 0, 473, 134, 1, 0, 0, 0, 474, 475, 7, 1, - 0, 0, 475, 136, 1, 0, 0, 0, 476, 478, 3, 139, 69, 0, 477, 476, 1, 0, 0, 0, - 478, 479, 1, 0, 0, 0, 479, 477, 1, 0, 0, 0, 479, 480, 1, 0, 0, 0, 480, 483, - 1, 0, 0, 0, 481, 483, 3, 141, 70, 0, 482, 477, 1, 0, 0, 0, 482, 481, 1, 0, - 0, 0, 483, 138, 1, 0, 0, 0, 484, 485, 7, 2, 0, 0, 485, 140, 1, 0, 0, 0, 486, - 487, 5, 48, 0, 0, 487, 489, 5, 120, 0, 0, 488, 490, 3, 143, 71, 0, 489, 488, - 1, 0, 0, 0, 490, 491, 1, 0, 0, 0, 491, 489, 1, 0, 0, 0, 491, 492, 1, 0, 0, - 0, 492, 142, 1, 0, 0, 0, 493, 494, 7, 3, 0, 0, 494, 144, 1, 0, 0, 0, 495, - 500, 5, 34, 0, 0, 496, 499, 3, 147, 73, 0, 497, 499, 9, 0, 0, 0, 498, 496, - 1, 0, 0, 0, 498, 497, 1, 0, 0, 0, 499, 502, 1, 0, 0, 0, 500, 501, 1, 0, 0, - 0, 500, 498, 1, 0, 0, 0, 501, 503, 1, 0, 0, 0, 502, 500, 1, 0, 0, 0, 503, - 504, 5, 34, 0, 0, 504, 146, 1, 0, 0, 0, 505, 506, 5, 92, 0, 0, 506, 507, 7, - 4, 0, 0, 507, 148, 1, 0, 0, 0, 508, 509, 5, 47, 0, 0, 509, 510, 5, 42, 0, 0, - 510, 514, 1, 0, 0, 0, 511, 513, 9, 0, 0, 0, 512, 511, 1, 0, 0, 0, 513, 516, - 1, 0, 0, 0, 514, 515, 1, 0, 0, 0, 514, 512, 1, 0, 0, 0, 515, 517, 1, 0, 0, - 0, 516, 514, 1, 0, 0, 0, 517, 518, 5, 42, 0, 0, 518, 519, 5, 47, 0, 0, 519, - 520, 1, 0, 0, 0, 520, 521, 6, 74, 0, 0, 521, 150, 1, 0, 0, 0, 522, 523, 5, - 47, 0, 0, 523, 524, 5, 47, 0, 0, 524, 528, 1, 0, 0, 0, 525, 527, 8, 5, 0, 0, - 526, 525, 1, 0, 0, 0, 527, 530, 1, 0, 0, 0, 528, 526, 1, 0, 0, 0, 528, 529, - 1, 0, 0, 0, 529, 531, 1, 0, 0, 0, 530, 528, 1, 0, 0, 0, 531, 532, 6, 75, 0, - 0, 532, 152, 1, 0, 0, 0, 533, 535, 7, 6, 0, 0, 534, 533, 1, 0, 0, 0, 535, - 536, 1, 0, 0, 0, 536, 534, 1, 0, 0, 0, 536, 537, 1, 0, 0, 0, 537, 538, 1, 0, - 0, 0, 538, 539, 6, 76, 0, 0, 539, 154, 1, 0, 0, 0, 17, 0, 163, 372, 378, - 386, 394, 460, 467, 469, 479, 482, 491, 498, 500, 514, 528, 536, 1, 0, 1, 0, + 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, + 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, + 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, + 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, + 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, + 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, + 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, + 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, + 15, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, + 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, + 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 22, 1, + 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 24, 1, + 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 26, 1, 26, 1, 27, 1, + 27, 1, 28, 1, 28, 1, 29, 1, 29, 1, 30, 1, 30, 1, 31, 1, 31, 1, 32, 1, 32, 1, + 33, 1, 33, 1, 34, 1, 34, 1, 35, 1, 35, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, + 37, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 3, 38, 358, 8, 38, 1, 39, 1, + 39, 1, 39, 1, 39, 1, 39, 1, 39, 3, 39, 366, 8, 39, 1, 40, 1, 40, 1, 40, 1, + 40, 3, 40, 372, 8, 40, 1, 41, 1, 41, 1, 42, 1, 42, 1, 43, 1, 43, 1, 43, 1, + 44, 1, 44, 1, 45, 1, 45, 1, 46, 1, 46, 1, 47, 1, 47, 1, 48, 1, 48, 1, 49, 1, + 49, 1, 50, 1, 50, 1, 50, 1, 51, 1, 51, 1, 51, 1, 52, 1, 52, 1, 53, 1, 53, 1, + 54, 1, 54, 1, 55, 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 1, 57, 1, 57, 1, 58, 1, + 58, 1, 59, 1, 59, 1, 59, 1, 60, 1, 60, 1, 60, 1, 61, 1, 61, 1, 61, 1, 62, 1, + 62, 1, 62, 1, 63, 1, 63, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, + 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, + 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 3, 64, 456, 8, + 64, 1, 65, 5, 65, 459, 8, 65, 10, 65, 12, 65, 462, 9, 65, 1, 65, 1, 65, 1, + 65, 1, 65, 5, 65, 468, 8, 65, 10, 65, 12, 65, 471, 9, 65, 1, 66, 1, 66, 1, + 67, 1, 67, 1, 68, 4, 68, 478, 8, 68, 11, 68, 12, 68, 479, 1, 68, 3, 68, 483, + 8, 68, 1, 69, 1, 69, 1, 70, 1, 70, 1, 70, 4, 70, 490, 8, 70, 11, 70, 12, 70, + 491, 1, 71, 1, 71, 1, 72, 1, 72, 1, 72, 5, 72, 499, 8, 72, 10, 72, 12, 72, + 502, 9, 72, 1, 72, 1, 72, 1, 73, 1, 73, 1, 73, 1, 74, 1, 74, 1, 74, 1, 74, + 5, 74, 513, 8, 74, 10, 74, 12, 74, 516, 9, 74, 1, 74, 1, 74, 1, 74, 1, 74, + 1, 74, 1, 75, 1, 75, 1, 75, 1, 75, 5, 75, 527, 8, 75, 10, 75, 12, 75, 530, + 9, 75, 1, 75, 1, 75, 1, 76, 4, 76, 535, 8, 76, 11, 76, 12, 76, 536, 1, 76, + 1, 76, 2, 500, 514, 0, 77, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, + 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, + 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, + 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, + 73, 37, 75, 38, 77, 39, 79, 40, 81, 41, 83, 42, 85, 43, 87, 44, 89, 45, 91, + 46, 93, 47, 95, 48, 97, 49, 99, 50, 101, 51, 103, 52, 105, 53, 107, 54, 109, + 55, 111, 56, 113, 57, 115, 58, 117, 59, 119, 60, 121, 61, 123, 62, 125, 63, + 127, 64, 129, 65, 131, 66, 133, 0, 135, 0, 137, 67, 139, 0, 141, 68, 143, 0, + 145, 69, 147, 0, 149, 70, 151, 71, 153, 72, 1, 0, 7, 3, 0, 65, 90, 97, 122, + 128, 255, 2, 0, 36, 36, 95, 95, 1, 0, 48, 57, 3, 0, 48, 57, 65, 70, 97, 102, + 7, 0, 34, 34, 92, 92, 98, 98, 102, 102, 110, 110, 114, 114, 116, 116, 2, 0, + 10, 10, 13, 13, 3, 0, 9, 10, 12, 13, 32, 32, 561, 0, 1, 1, 0, 0, 0, 0, 3, 1, + 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, + 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, + 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, + 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, + 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, + 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, + 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, + 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, + 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, + 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, + 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, + 0, 0, 0, 93, 1, 0, 0, 0, 0, 95, 1, 0, 0, 0, 0, 97, 1, 0, 0, 0, 0, 99, 1, 0, + 0, 0, 0, 101, 1, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 105, 1, 0, 0, 0, 0, 107, 1, + 0, 0, 0, 0, 109, 1, 0, 0, 0, 0, 111, 1, 0, 0, 0, 0, 113, 1, 0, 0, 0, 0, 115, + 1, 0, 0, 0, 0, 117, 1, 0, 0, 0, 0, 119, 1, 0, 0, 0, 0, 121, 1, 0, 0, 0, 0, + 123, 1, 0, 0, 0, 0, 125, 1, 0, 0, 0, 0, 127, 1, 0, 0, 0, 0, 129, 1, 0, 0, 0, + 0, 131, 1, 0, 0, 0, 0, 137, 1, 0, 0, 0, 0, 141, 1, 0, 0, 0, 0, 145, 1, 0, 0, + 0, 0, 149, 1, 0, 0, 0, 0, 151, 1, 0, 0, 0, 0, 153, 1, 0, 0, 0, 1, 155, 1, 0, + 0, 0, 3, 163, 1, 0, 0, 0, 5, 165, 1, 0, 0, 0, 7, 172, 1, 0, 0, 0, 9, 179, 1, + 0, 0, 0, 11, 196, 1, 0, 0, 0, 13, 204, 1, 0, 0, 0, 15, 211, 1, 0, 0, 0, 17, + 220, 1, 0, 0, 0, 19, 229, 1, 0, 0, 0, 21, 238, 1, 0, 0, 0, 23, 243, 1, 0, 0, + 0, 25, 250, 1, 0, 0, 0, 27, 260, 1, 0, 0, 0, 29, 264, 1, 0, 0, 0, 31, 271, + 1, 0, 0, 0, 33, 277, 1, 0, 0, 0, 35, 284, 1, 0, 0, 0, 37, 287, 1, 0, 0, 0, + 39, 292, 1, 0, 0, 0, 41, 296, 1, 0, 0, 0, 43, 302, 1, 0, 0, 0, 45, 305, 1, + 0, 0, 0, 47, 309, 1, 0, 0, 0, 49, 316, 1, 0, 0, 0, 51, 323, 1, 0, 0, 0, 53, + 325, 1, 0, 0, 0, 55, 327, 1, 0, 0, 0, 57, 329, 1, 0, 0, 0, 59, 331, 1, 0, 0, + 0, 61, 333, 1, 0, 0, 0, 63, 335, 1, 0, 0, 0, 65, 337, 1, 0, 0, 0, 67, 339, + 1, 0, 0, 0, 69, 341, 1, 0, 0, 0, 71, 343, 1, 0, 0, 0, 73, 345, 1, 0, 0, 0, + 75, 347, 1, 0, 0, 0, 77, 357, 1, 0, 0, 0, 79, 365, 1, 0, 0, 0, 81, 371, 1, + 0, 0, 0, 83, 373, 1, 0, 0, 0, 85, 375, 1, 0, 0, 0, 87, 377, 1, 0, 0, 0, 89, + 380, 1, 0, 0, 0, 91, 382, 1, 0, 0, 0, 93, 384, 1, 0, 0, 0, 95, 386, 1, 0, 0, + 0, 97, 388, 1, 0, 0, 0, 99, 390, 1, 0, 0, 0, 101, 392, 1, 0, 0, 0, 103, 395, + 1, 0, 0, 0, 105, 398, 1, 0, 0, 0, 107, 400, 1, 0, 0, 0, 109, 402, 1, 0, 0, + 0, 111, 404, 1, 0, 0, 0, 113, 407, 1, 0, 0, 0, 115, 410, 1, 0, 0, 0, 117, + 412, 1, 0, 0, 0, 119, 414, 1, 0, 0, 0, 121, 417, 1, 0, 0, 0, 123, 420, 1, 0, + 0, 0, 125, 423, 1, 0, 0, 0, 127, 426, 1, 0, 0, 0, 129, 455, 1, 0, 0, 0, 131, + 460, 1, 0, 0, 0, 133, 472, 1, 0, 0, 0, 135, 474, 1, 0, 0, 0, 137, 482, 1, 0, + 0, 0, 139, 484, 1, 0, 0, 0, 141, 486, 1, 0, 0, 0, 143, 493, 1, 0, 0, 0, 145, + 495, 1, 0, 0, 0, 147, 505, 1, 0, 0, 0, 149, 508, 1, 0, 0, 0, 151, 522, 1, 0, + 0, 0, 153, 534, 1, 0, 0, 0, 155, 156, 3, 137, 68, 0, 156, 157, 5, 46, 0, 0, + 157, 158, 3, 137, 68, 0, 158, 159, 5, 46, 0, 0, 159, 160, 3, 137, 68, 0, + 160, 2, 1, 0, 0, 0, 161, 164, 3, 31, 15, 0, 162, 164, 3, 33, 16, 0, 163, + 161, 1, 0, 0, 0, 163, 162, 1, 0, 0, 0, 164, 4, 1, 0, 0, 0, 165, 166, 5, 112, + 0, 0, 166, 167, 5, 114, 0, 0, 167, 168, 5, 97, 0, 0, 168, 169, 5, 103, 0, 0, + 169, 170, 5, 109, 0, 0, 170, 171, 5, 97, 0, 0, 171, 6, 1, 0, 0, 0, 172, 173, + 5, 99, 0, 0, 173, 174, 5, 105, 0, 0, 174, 175, 5, 114, 0, 0, 175, 176, 5, + 99, 0, 0, 176, 177, 5, 111, 0, 0, 177, 178, 5, 109, 0, 0, 178, 8, 1, 0, 0, + 0, 179, 180, 5, 99, 0, 0, 180, 181, 5, 117, 0, 0, 181, 182, 5, 115, 0, 0, + 182, 183, 5, 116, 0, 0, 183, 184, 5, 111, 0, 0, 184, 185, 5, 109, 0, 0, 185, + 186, 5, 95, 0, 0, 186, 187, 5, 116, 0, 0, 187, 188, 5, 101, 0, 0, 188, 189, + 5, 109, 0, 0, 189, 190, 5, 112, 0, 0, 190, 191, 5, 108, 0, 0, 191, 192, 5, + 97, 0, 0, 192, 193, 5, 116, 0, 0, 193, 194, 5, 101, 0, 0, 194, 195, 5, 115, + 0, 0, 195, 10, 1, 0, 0, 0, 196, 197, 5, 105, 0, 0, 197, 198, 5, 110, 0, 0, + 198, 199, 5, 99, 0, 0, 199, 200, 5, 108, 0, 0, 200, 201, 5, 117, 0, 0, 201, + 202, 5, 100, 0, 0, 202, 203, 5, 101, 0, 0, 203, 12, 1, 0, 0, 0, 204, 205, 5, + 99, 0, 0, 205, 206, 5, 117, 0, 0, 206, 207, 5, 115, 0, 0, 207, 208, 5, 116, + 0, 0, 208, 209, 5, 111, 0, 0, 209, 210, 5, 109, 0, 0, 210, 14, 1, 0, 0, 0, + 211, 212, 5, 112, 0, 0, 212, 213, 5, 97, 0, 0, 213, 214, 5, 114, 0, 0, 214, + 215, 5, 97, 0, 0, 215, 216, 5, 108, 0, 0, 216, 217, 5, 108, 0, 0, 217, 218, + 5, 101, 0, 0, 218, 219, 5, 108, 0, 0, 219, 16, 1, 0, 0, 0, 220, 221, 5, 116, + 0, 0, 221, 222, 5, 101, 0, 0, 222, 223, 5, 109, 0, 0, 223, 224, 5, 112, 0, + 0, 224, 225, 5, 108, 0, 0, 225, 226, 5, 97, 0, 0, 226, 227, 5, 116, 0, 0, + 227, 228, 5, 101, 0, 0, 228, 18, 1, 0, 0, 0, 229, 230, 5, 102, 0, 0, 230, + 231, 5, 117, 0, 0, 231, 232, 5, 110, 0, 0, 232, 233, 5, 99, 0, 0, 233, 234, + 5, 116, 0, 0, 234, 235, 5, 105, 0, 0, 235, 236, 5, 111, 0, 0, 236, 237, 5, + 110, 0, 0, 237, 20, 1, 0, 0, 0, 238, 239, 5, 109, 0, 0, 239, 240, 5, 97, 0, + 0, 240, 241, 5, 105, 0, 0, 241, 242, 5, 110, 0, 0, 242, 22, 1, 0, 0, 0, 243, + 244, 5, 112, 0, 0, 244, 245, 5, 117, 0, 0, 245, 246, 5, 98, 0, 0, 246, 247, + 5, 108, 0, 0, 247, 248, 5, 105, 0, 0, 248, 249, 5, 99, 0, 0, 249, 24, 1, 0, + 0, 0, 250, 251, 5, 99, 0, 0, 251, 252, 5, 111, 0, 0, 252, 253, 5, 109, 0, 0, + 253, 254, 5, 112, 0, 0, 254, 255, 5, 111, 0, 0, 255, 256, 5, 110, 0, 0, 256, + 257, 5, 101, 0, 0, 257, 258, 5, 110, 0, 0, 258, 259, 5, 116, 0, 0, 259, 26, + 1, 0, 0, 0, 260, 261, 5, 118, 0, 0, 261, 262, 5, 97, 0, 0, 262, 263, 5, 114, + 0, 0, 263, 28, 1, 0, 0, 0, 264, 265, 5, 115, 0, 0, 265, 266, 5, 105, 0, 0, + 266, 267, 5, 103, 0, 0, 267, 268, 5, 110, 0, 0, 268, 269, 5, 97, 0, 0, 269, + 270, 5, 108, 0, 0, 270, 30, 1, 0, 0, 0, 271, 272, 5, 105, 0, 0, 272, 273, 5, + 110, 0, 0, 273, 274, 5, 112, 0, 0, 274, 275, 5, 117, 0, 0, 275, 276, 5, 116, + 0, 0, 276, 32, 1, 0, 0, 0, 277, 278, 5, 111, 0, 0, 278, 279, 5, 117, 0, 0, + 279, 280, 5, 116, 0, 0, 280, 281, 5, 112, 0, 0, 281, 282, 5, 117, 0, 0, 282, + 283, 5, 116, 0, 0, 283, 34, 1, 0, 0, 0, 284, 285, 5, 105, 0, 0, 285, 286, 5, + 102, 0, 0, 286, 36, 1, 0, 0, 0, 287, 288, 5, 101, 0, 0, 288, 289, 5, 108, 0, + 0, 289, 290, 5, 115, 0, 0, 290, 291, 5, 101, 0, 0, 291, 38, 1, 0, 0, 0, 292, + 293, 5, 102, 0, 0, 293, 294, 5, 111, 0, 0, 294, 295, 5, 114, 0, 0, 295, 40, + 1, 0, 0, 0, 296, 297, 5, 119, 0, 0, 297, 298, 5, 104, 0, 0, 298, 299, 5, + 105, 0, 0, 299, 300, 5, 108, 0, 0, 300, 301, 5, 101, 0, 0, 301, 42, 1, 0, 0, + 0, 302, 303, 5, 100, 0, 0, 303, 304, 5, 111, 0, 0, 304, 44, 1, 0, 0, 0, 305, + 306, 5, 108, 0, 0, 306, 307, 5, 111, 0, 0, 307, 308, 5, 103, 0, 0, 308, 46, + 1, 0, 0, 0, 309, 310, 5, 97, 0, 0, 310, 311, 5, 115, 0, 0, 311, 312, 5, 115, + 0, 0, 312, 313, 5, 101, 0, 0, 313, 314, 5, 114, 0, 0, 314, 315, 5, 116, 0, + 0, 315, 48, 1, 0, 0, 0, 316, 317, 5, 114, 0, 0, 317, 318, 5, 101, 0, 0, 318, + 319, 5, 116, 0, 0, 319, 320, 5, 117, 0, 0, 320, 321, 5, 114, 0, 0, 321, 322, + 5, 110, 0, 0, 322, 50, 1, 0, 0, 0, 323, 324, 5, 40, 0, 0, 324, 52, 1, 0, 0, + 0, 325, 326, 5, 41, 0, 0, 326, 54, 1, 0, 0, 0, 327, 328, 5, 91, 0, 0, 328, + 56, 1, 0, 0, 0, 329, 330, 5, 93, 0, 0, 330, 58, 1, 0, 0, 0, 331, 332, 5, + 123, 0, 0, 332, 60, 1, 0, 0, 0, 333, 334, 5, 125, 0, 0, 334, 62, 1, 0, 0, 0, + 335, 336, 5, 59, 0, 0, 336, 64, 1, 0, 0, 0, 337, 338, 5, 46, 0, 0, 338, 66, + 1, 0, 0, 0, 339, 340, 5, 44, 0, 0, 340, 68, 1, 0, 0, 0, 341, 342, 5, 95, 0, + 0, 342, 70, 1, 0, 0, 0, 343, 344, 5, 63, 0, 0, 344, 72, 1, 0, 0, 0, 345, + 346, 5, 58, 0, 0, 346, 74, 1, 0, 0, 0, 347, 348, 5, 61, 0, 0, 348, 349, 5, + 61, 0, 0, 349, 350, 5, 61, 0, 0, 350, 76, 1, 0, 0, 0, 351, 352, 5, 60, 0, 0, + 352, 353, 5, 45, 0, 0, 353, 358, 5, 45, 0, 0, 354, 355, 5, 60, 0, 0, 355, + 356, 5, 61, 0, 0, 356, 358, 5, 61, 0, 0, 357, 351, 1, 0, 0, 0, 357, 354, 1, + 0, 0, 0, 358, 78, 1, 0, 0, 0, 359, 360, 5, 45, 0, 0, 360, 361, 5, 45, 0, 0, + 361, 366, 5, 62, 0, 0, 362, 363, 5, 61, 0, 0, 363, 364, 5, 61, 0, 0, 364, + 366, 5, 62, 0, 0, 365, 359, 1, 0, 0, 0, 365, 362, 1, 0, 0, 0, 366, 80, 1, 0, + 0, 0, 367, 368, 5, 43, 0, 0, 368, 372, 5, 43, 0, 0, 369, 370, 5, 45, 0, 0, + 370, 372, 5, 45, 0, 0, 371, 367, 1, 0, 0, 0, 371, 369, 1, 0, 0, 0, 372, 82, + 1, 0, 0, 0, 373, 374, 5, 33, 0, 0, 374, 84, 1, 0, 0, 0, 375, 376, 5, 126, 0, + 0, 376, 86, 1, 0, 0, 0, 377, 378, 5, 42, 0, 0, 378, 379, 5, 42, 0, 0, 379, + 88, 1, 0, 0, 0, 380, 381, 5, 42, 0, 0, 381, 90, 1, 0, 0, 0, 382, 383, 5, 47, + 0, 0, 383, 92, 1, 0, 0, 0, 384, 385, 5, 92, 0, 0, 385, 94, 1, 0, 0, 0, 386, + 387, 5, 37, 0, 0, 387, 96, 1, 0, 0, 0, 388, 389, 5, 43, 0, 0, 389, 98, 1, 0, + 0, 0, 390, 391, 5, 45, 0, 0, 391, 100, 1, 0, 0, 0, 392, 393, 5, 60, 0, 0, + 393, 394, 5, 60, 0, 0, 394, 102, 1, 0, 0, 0, 395, 396, 5, 62, 0, 0, 396, + 397, 5, 62, 0, 0, 397, 104, 1, 0, 0, 0, 398, 399, 5, 38, 0, 0, 399, 106, 1, + 0, 0, 0, 400, 401, 5, 94, 0, 0, 401, 108, 1, 0, 0, 0, 402, 403, 5, 124, 0, + 0, 403, 110, 1, 0, 0, 0, 404, 405, 5, 61, 0, 0, 405, 406, 5, 61, 0, 0, 406, + 112, 1, 0, 0, 0, 407, 408, 5, 33, 0, 0, 408, 409, 5, 61, 0, 0, 409, 114, 1, + 0, 0, 0, 410, 411, 5, 62, 0, 0, 411, 116, 1, 0, 0, 0, 412, 413, 5, 60, 0, 0, + 413, 118, 1, 0, 0, 0, 414, 415, 5, 60, 0, 0, 415, 416, 5, 61, 0, 0, 416, + 120, 1, 0, 0, 0, 417, 418, 5, 62, 0, 0, 418, 419, 5, 61, 0, 0, 419, 122, 1, + 0, 0, 0, 420, 421, 5, 38, 0, 0, 421, 422, 5, 38, 0, 0, 422, 124, 1, 0, 0, 0, + 423, 424, 5, 124, 0, 0, 424, 425, 5, 124, 0, 0, 425, 126, 1, 0, 0, 0, 426, + 427, 5, 61, 0, 0, 427, 128, 1, 0, 0, 0, 428, 429, 5, 43, 0, 0, 429, 456, 5, + 61, 0, 0, 430, 431, 5, 45, 0, 0, 431, 456, 5, 61, 0, 0, 432, 433, 5, 42, 0, + 0, 433, 456, 5, 61, 0, 0, 434, 435, 5, 42, 0, 0, 435, 436, 5, 42, 0, 0, 436, + 456, 5, 61, 0, 0, 437, 438, 5, 47, 0, 0, 438, 456, 5, 61, 0, 0, 439, 440, 5, + 92, 0, 0, 440, 456, 5, 61, 0, 0, 441, 442, 5, 37, 0, 0, 442, 456, 5, 61, 0, + 0, 443, 444, 5, 60, 0, 0, 444, 445, 5, 60, 0, 0, 445, 456, 5, 61, 0, 0, 446, + 447, 5, 62, 0, 0, 447, 448, 5, 62, 0, 0, 448, 456, 5, 61, 0, 0, 449, 450, 5, + 38, 0, 0, 450, 456, 5, 61, 0, 0, 451, 452, 5, 94, 0, 0, 452, 456, 5, 61, 0, + 0, 453, 454, 5, 124, 0, 0, 454, 456, 5, 61, 0, 0, 455, 428, 1, 0, 0, 0, 455, + 430, 1, 0, 0, 0, 455, 432, 1, 0, 0, 0, 455, 434, 1, 0, 0, 0, 455, 437, 1, 0, + 0, 0, 455, 439, 1, 0, 0, 0, 455, 441, 1, 0, 0, 0, 455, 443, 1, 0, 0, 0, 455, + 446, 1, 0, 0, 0, 455, 449, 1, 0, 0, 0, 455, 451, 1, 0, 0, 0, 455, 453, 1, 0, + 0, 0, 456, 130, 1, 0, 0, 0, 457, 459, 3, 135, 67, 0, 458, 457, 1, 0, 0, 0, + 459, 462, 1, 0, 0, 0, 460, 458, 1, 0, 0, 0, 460, 461, 1, 0, 0, 0, 461, 463, + 1, 0, 0, 0, 462, 460, 1, 0, 0, 0, 463, 469, 3, 133, 66, 0, 464, 468, 3, 133, + 66, 0, 465, 468, 3, 139, 69, 0, 466, 468, 3, 135, 67, 0, 467, 464, 1, 0, 0, + 0, 467, 465, 1, 0, 0, 0, 467, 466, 1, 0, 0, 0, 468, 471, 1, 0, 0, 0, 469, + 467, 1, 0, 0, 0, 469, 470, 1, 0, 0, 0, 470, 132, 1, 0, 0, 0, 471, 469, 1, 0, + 0, 0, 472, 473, 7, 0, 0, 0, 473, 134, 1, 0, 0, 0, 474, 475, 7, 1, 0, 0, 475, + 136, 1, 0, 0, 0, 476, 478, 3, 139, 69, 0, 477, 476, 1, 0, 0, 0, 478, 479, 1, + 0, 0, 0, 479, 477, 1, 0, 0, 0, 479, 480, 1, 0, 0, 0, 480, 483, 1, 0, 0, 0, + 481, 483, 3, 141, 70, 0, 482, 477, 1, 0, 0, 0, 482, 481, 1, 0, 0, 0, 483, + 138, 1, 0, 0, 0, 484, 485, 7, 2, 0, 0, 485, 140, 1, 0, 0, 0, 486, 487, 5, + 48, 0, 0, 487, 489, 5, 120, 0, 0, 488, 490, 3, 143, 71, 0, 489, 488, 1, 0, + 0, 0, 490, 491, 1, 0, 0, 0, 491, 489, 1, 0, 0, 0, 491, 492, 1, 0, 0, 0, 492, + 142, 1, 0, 0, 0, 493, 494, 7, 3, 0, 0, 494, 144, 1, 0, 0, 0, 495, 500, 5, + 34, 0, 0, 496, 499, 3, 147, 73, 0, 497, 499, 9, 0, 0, 0, 498, 496, 1, 0, 0, + 0, 498, 497, 1, 0, 0, 0, 499, 502, 1, 0, 0, 0, 500, 501, 1, 0, 0, 0, 500, + 498, 1, 0, 0, 0, 501, 503, 1, 0, 0, 0, 502, 500, 1, 0, 0, 0, 503, 504, 5, + 34, 0, 0, 504, 146, 1, 0, 0, 0, 505, 506, 5, 92, 0, 0, 506, 507, 7, 4, 0, 0, + 507, 148, 1, 0, 0, 0, 508, 509, 5, 47, 0, 0, 509, 510, 5, 42, 0, 0, 510, + 514, 1, 0, 0, 0, 511, 513, 9, 0, 0, 0, 512, 511, 1, 0, 0, 0, 513, 516, 1, 0, + 0, 0, 514, 515, 1, 0, 0, 0, 514, 512, 1, 0, 0, 0, 515, 517, 1, 0, 0, 0, 516, + 514, 1, 0, 0, 0, 517, 518, 5, 42, 0, 0, 518, 519, 5, 47, 0, 0, 519, 520, 1, + 0, 0, 0, 520, 521, 6, 74, 0, 0, 521, 150, 1, 0, 0, 0, 522, 523, 5, 47, 0, 0, + 523, 524, 5, 47, 0, 0, 524, 528, 1, 0, 0, 0, 525, 527, 8, 5, 0, 0, 526, 525, + 1, 0, 0, 0, 527, 530, 1, 0, 0, 0, 528, 526, 1, 0, 0, 0, 528, 529, 1, 0, 0, + 0, 529, 531, 1, 0, 0, 0, 530, 528, 1, 0, 0, 0, 531, 532, 6, 75, 0, 0, 532, + 152, 1, 0, 0, 0, 533, 535, 7, 6, 0, 0, 534, 533, 1, 0, 0, 0, 535, 536, 1, 0, + 0, 0, 536, 534, 1, 0, 0, 0, 536, 537, 1, 0, 0, 0, 537, 538, 1, 0, 0, 0, 538, + 539, 6, 76, 0, 0, 539, 154, 1, 0, 0, 0, 17, 0, 163, 357, 365, 371, 455, 460, + 467, 469, 479, 482, 491, 498, 500, 514, 528, 536, 1, 0, 1, 0, ]; private static __ATN: ATN; diff --git a/src/generated/CircomParser.ts b/src/generated/CircomParser.ts index 89dadfb..f63398b 100644 --- a/src/generated/CircomParser.ts +++ b/src/generated/CircomParser.ts @@ -1,4 +1,4 @@ -// Generated from parser/Circom.g4 by ANTLR 4.13.1 +// Generated from parser/CircomParser.g4 by ANTLR 4.13.1 // noinspection ES6UnusedImports,JSUnusedGlobalSymbols,JSUnusedLocalSymbols import { @@ -23,8 +23,8 @@ import { Interval, IntervalSet, } from "antlr4"; -import CircomListener from "./CircomListener.js"; -import CircomVisitor from "./CircomVisitor.js"; +import CircomParserListener from "./CircomParserListener.js"; +import CircomParserVisitor from "./CircomParserVisitor.js"; // for running tests with parameters, TODO: discuss strategy for typed parameters in CI // eslint-disable-next-line no-unused-vars @@ -33,69 +33,69 @@ type int = number; export default class CircomParser extends Parser { public static readonly VERSION = 1; public static readonly SIGNAL_TYPE = 2; - public static readonly SIGNAL = 3; - public static readonly INPUT = 4; - public static readonly OUTPUT = 5; - public static readonly PUBLIC = 6; - public static readonly TEMPLATE = 7; - public static readonly COMPONENT = 8; - public static readonly VAR = 9; + public static readonly PRAGMA = 3; + public static readonly CIRCOM = 4; + public static readonly CUSTOM_TEMPLATES = 5; + public static readonly INCLUDE = 6; + public static readonly CUSTOM = 7; + public static readonly PARALLEL = 8; + public static readonly TEMPLATE = 9; public static readonly FUNCTION = 10; - public static readonly RETURN = 11; - public static readonly IF = 12; - public static readonly ELSE = 13; - public static readonly FOR = 14; - public static readonly WHILE = 15; - public static readonly DO = 16; - public static readonly LOG = 17; - public static readonly ASSERT = 18; - public static readonly INCLUDE = 19; - public static readonly CUSTOM = 20; - public static readonly PRAGMA = 21; - public static readonly CIRCOM = 22; - public static readonly CUSTOM_TEMPLATES = 23; - public static readonly MAIN = 24; - public static readonly PARALLEL = 25; + public static readonly MAIN = 11; + public static readonly PUBLIC = 12; + public static readonly COMPONENT = 13; + public static readonly VAR = 14; + public static readonly SIGNAL = 15; + public static readonly INPUT = 16; + public static readonly OUTPUT = 17; + public static readonly IF = 18; + public static readonly ELSE = 19; + public static readonly FOR = 20; + public static readonly WHILE = 21; + public static readonly DO = 22; + public static readonly LOG = 23; + public static readonly ASSERT = 24; + public static readonly RETURN = 25; public static readonly LP = 26; public static readonly RP = 27; public static readonly LB = 28; public static readonly RB = 29; public static readonly LC = 30; public static readonly RC = 31; - public static readonly COLON = 32; - public static readonly SEMICOLON = 33; - public static readonly DOT = 34; - public static readonly COMMA = 35; - public static readonly ASSIGNMENT = 36; - public static readonly ASSIGNMENT_OP = 37; - public static readonly SELF_OP = 38; - public static readonly LEFT_ASSIGNMENT = 39; - public static readonly RIGHT_ASSIGNMENT = 40; - public static readonly CONSTRAINT_EQ = 41; - public static readonly QUESTION_MARK = 42; - public static readonly UNDERSCORE = 43; - public static readonly NOT = 44; - public static readonly BNOT = 45; - public static readonly POW = 46; - public static readonly MUL = 47; - public static readonly DIV = 48; - public static readonly QUO = 49; - public static readonly MOD = 50; - public static readonly ADD = 51; - public static readonly SUB = 52; - public static readonly SHL = 53; - public static readonly SHR = 54; - public static readonly BAND = 55; - public static readonly BXOR = 56; - public static readonly BOR = 57; - public static readonly EQ = 58; - public static readonly NEQ = 59; - public static readonly GT = 60; - public static readonly LT = 61; - public static readonly LE = 62; - public static readonly GE = 63; - public static readonly AND = 64; - public static readonly OR = 65; + public static readonly SEMICOLON = 32; + public static readonly DOT = 33; + public static readonly COMMA = 34; + public static readonly UNDERSCORE = 35; + public static readonly TERNARY_CONDITION = 36; + public static readonly TERNARY_ALTERNATIVE = 37; + public static readonly EQ_CONSTRAINT = 38; + public static readonly LEFT_CONSTRAINT = 39; + public static readonly RIGHT_CONSTRAINT = 40; + public static readonly SELF_OP = 41; + public static readonly NOT = 42; + public static readonly BNOT = 43; + public static readonly POW = 44; + public static readonly MUL = 45; + public static readonly DIV = 46; + public static readonly QUO = 47; + public static readonly MOD = 48; + public static readonly ADD = 49; + public static readonly SUB = 50; + public static readonly SHL = 51; + public static readonly SHR = 52; + public static readonly BAND = 53; + public static readonly BXOR = 54; + public static readonly BOR = 55; + public static readonly EQ = 56; + public static readonly NEQ = 57; + public static readonly GT = 58; + public static readonly LT = 59; + public static readonly LE = 60; + public static readonly GE = 61; + public static readonly AND = 62; + public static readonly OR = 63; + public static readonly ASSIGNMENT = 64; + public static readonly ASSIGNMENT_WITH_OP = 65; public static readonly ID = 66; public static readonly NUMBER = 67; public static readonly HEX = 68; @@ -144,15 +144,21 @@ export default class CircomParser extends Parser { null, null, null, - "'signal'", - "'input'", - "'output'", - "'public'", + "'pragma'", + "'circom'", + "'custom_templates'", + "'include'", + "'custom'", + "'parallel'", "'template'", + "'function'", + "'main'", + "'public'", "'component'", "'var'", - "'function'", - "'return'", + "'signal'", + "'input'", + "'output'", "'if'", "'else'", "'for'", @@ -160,31 +166,23 @@ export default class CircomParser extends Parser { "'do'", "'log'", "'assert'", - "'include'", - "'custom'", - "'pragma'", - "'circom'", - "'custom_templates'", - "'main'", - "'parallel'", + "'return'", "'('", "')'", "'['", "']'", "'{'", "'}'", - "':'", "';'", "'.'", "','", - "'='", - null, + "'_'", + "'?'", + "':'", + "'==='", null, null, null, - "'==='", - "'?'", - "'_'", "'!'", "'~'", "'**'", @@ -203,24 +201,31 @@ export default class CircomParser extends Parser { "'!='", "'>'", "'<'", - "'>='", "'<='", + "'>='", "'&&'", "'||'", + "'='", ]; public static readonly symbolicNames: (string | null)[] = [ null, "VERSION", "SIGNAL_TYPE", - "SIGNAL", - "INPUT", - "OUTPUT", - "PUBLIC", + "PRAGMA", + "CIRCOM", + "CUSTOM_TEMPLATES", + "INCLUDE", + "CUSTOM", + "PARALLEL", "TEMPLATE", + "FUNCTION", + "MAIN", + "PUBLIC", "COMPONENT", "VAR", - "FUNCTION", - "RETURN", + "SIGNAL", + "INPUT", + "OUTPUT", "IF", "ELSE", "FOR", @@ -228,31 +233,23 @@ export default class CircomParser extends Parser { "DO", "LOG", "ASSERT", - "INCLUDE", - "CUSTOM", - "PRAGMA", - "CIRCOM", - "CUSTOM_TEMPLATES", - "MAIN", - "PARALLEL", + "RETURN", "LP", "RP", "LB", "RB", "LC", "RC", - "COLON", "SEMICOLON", "DOT", "COMMA", - "ASSIGNMENT", - "ASSIGNMENT_OP", - "SELF_OP", - "LEFT_ASSIGNMENT", - "RIGHT_ASSIGNMENT", - "CONSTRAINT_EQ", - "QUESTION_MARK", "UNDERSCORE", + "TERNARY_CONDITION", + "TERNARY_ALTERNATIVE", + "EQ_CONSTRAINT", + "LEFT_CONSTRAINT", + "RIGHT_CONSTRAINT", + "SELF_OP", "NOT", "BNOT", "POW", @@ -275,6 +272,8 @@ export default class CircomParser extends Parser { "GE", "AND", "OR", + "ASSIGNMENT", + "ASSIGNMENT_WITH_OP", "ID", "NUMBER", "HEX", @@ -323,7 +322,7 @@ export default class CircomParser extends Parser { "numSequence", ]; public get grammarFileName(): string { - return "Circom.g4"; + return "CircomParser.g4"; } public get literalNames(): (string | null)[] { return CircomParser.literalNames; @@ -369,7 +368,7 @@ export default class CircomParser extends Parser { this.state = 75; this._errHandler.sync(this); _la = this._input.LA(1); - while (_la === 21) { + while (_la === 3) { { { this.state = 72; @@ -383,7 +382,7 @@ export default class CircomParser extends Parser { this.state = 81; this._errHandler.sync(this); _la = this._input.LA(1); - while (_la === 19) { + while (_la === 6) { { { this.state = 78; @@ -397,7 +396,7 @@ export default class CircomParser extends Parser { this.state = 87; this._errHandler.sync(this); _la = this._input.LA(1); - while (_la === 7 || _la === 10) { + while (_la === 9 || _la === 10) { { { this.state = 84; @@ -411,7 +410,7 @@ export default class CircomParser extends Parser { this.state = 91; this._errHandler.sync(this); _la = this._input.LA(1); - if (_la === 8) { + if (_la === 13) { { this.state = 90; this.componentMainDeclaration(); @@ -534,7 +533,7 @@ export default class CircomParser extends Parser { this.functionDeclaration(); } break; - case 7: + case 9: this.enterOuterAlt(localctx, 2); { this.state = 109; @@ -621,7 +620,7 @@ export default class CircomParser extends Parser { this._errHandler.sync(this); _la = this._input.LA(1); while ( - ((_la & ~0x1f) === 0 && ((1 << _la) & 1141299712) !== 0) || + ((_la & ~0x1f) === 0 && ((1 << _la) & 1202995200) !== 0) || _la === 66 ) { { @@ -715,7 +714,7 @@ export default class CircomParser extends Parser { this.identifier(); this.state = 144; _la = this._input.LA(1); - if (!(_la === 36 || _la === 37)) { + if (!(_la === 64 || _la === 65)) { this._errHandler.recoverInline(this); } else { this._errHandler.reportMatch(this); @@ -880,7 +879,7 @@ export default class CircomParser extends Parser { this.state = 193; this._errHandler.sync(this); _la = this._input.LA(1); - if (_la === 20) { + if (_la === 7) { { this.state = 192; this.match(CircomParser.CUSTOM); @@ -890,7 +889,7 @@ export default class CircomParser extends Parser { this.state = 196; this._errHandler.sync(this); _la = this._input.LA(1); - if (_la === 25) { + if (_la === 8) { { this.state = 195; this.match(CircomParser.PARALLEL); @@ -947,8 +946,8 @@ export default class CircomParser extends Parser { this._errHandler.sync(this); _la = this._input.LA(1); while ( - ((_la & ~0x1f) === 0 && ((1 << _la) & 1443287816) !== 0) || - (((_la - 43) & ~0x1f) === 0 && ((1 << (_la - 43)) & 25166343) !== 0) + (((_la - 8) & ~0x1f) === 0 && ((1 << (_la - 8)) & 139834593) !== 0) || + (((_la - 42) & ~0x1f) === 0 && ((1 << (_la - 42)) & 50331907) !== 0) ) { { { @@ -1009,8 +1008,8 @@ export default class CircomParser extends Parser { this._errHandler.sync(this); _la = this._input.LA(1); if ( - ((_la & ~0x1f) === 0 && ((1 << _la) & 369098752) !== 0) || - (((_la - 44) & ~0x1f) === 0 && ((1 << (_la - 44)) & 12583171) !== 0) + ((_la & ~0x1f) === 0 && ((1 << _la) & 335544576) !== 0) || + (((_la - 42) & ~0x1f) === 0 && ((1 << (_la - 42)) & 50331907) !== 0) ) { { this.state = 223; @@ -1173,7 +1172,7 @@ export default class CircomParser extends Parser { this.state = 263; this.expression(0); this.state = 264; - this.match(CircomParser.CONSTRAINT_EQ); + this.match(CircomParser.EQ_CONSTRAINT); this.state = 265; this.expression(0); this.state = 266; @@ -1187,7 +1186,7 @@ export default class CircomParser extends Parser { this.element(); this.state = 269; _la = this._input.LA(1); - if (!(_la === 37 || _la === 39)) { + if (!(_la === 39 || _la === 65)) { this._errHandler.recoverInline(this); } else { this._errHandler.reportMatch(this); @@ -1209,7 +1208,7 @@ export default class CircomParser extends Parser { this.state = 279; this._errHandler.sync(this); _la = this._input.LA(1); - while (_la === 35) { + while (_la === 34) { { { this.state = 275; @@ -1225,7 +1224,7 @@ export default class CircomParser extends Parser { this.state = 282; this.match(CircomParser.RP); this.state = 283; - this.match(CircomParser.LEFT_ASSIGNMENT); + this.match(CircomParser.LEFT_CONSTRAINT); this.state = 284; this.match(CircomParser.LP); this.state = 285; @@ -1233,7 +1232,7 @@ export default class CircomParser extends Parser { this.state = 290; this._errHandler.sync(this); _la = this._input.LA(1); - while (_la === 35) { + while (_la === 34) { { { this.state = 286; @@ -1258,7 +1257,7 @@ export default class CircomParser extends Parser { this.state = 296; this.expression(0); this.state = 297; - this.match(CircomParser.RIGHT_ASSIGNMENT); + this.match(CircomParser.RIGHT_CONSTRAINT); this.state = 298; this.element(); this.state = 299; @@ -1271,7 +1270,7 @@ export default class CircomParser extends Parser { this.state = 301; this.expression(0); this.state = 302; - this.match(CircomParser.RIGHT_ASSIGNMENT); + this.match(CircomParser.RIGHT_CONSTRAINT); this.state = 303; this.match(CircomParser.LP); this.state = 304; @@ -1279,7 +1278,7 @@ export default class CircomParser extends Parser { this.state = 309; this._errHandler.sync(this); _la = this._input.LA(1); - while (_la === 35) { + while (_la === 34) { { { this.state = 305; @@ -1305,7 +1304,7 @@ export default class CircomParser extends Parser { this.match(CircomParser.UNDERSCORE); this.state = 316; _la = this._input.LA(1); - if (!(_la === 36 || _la === 39)) { + if (!(_la === 39 || _la === 64)) { this._errHandler.recoverInline(this); } else { this._errHandler.reportMatch(this); @@ -1351,7 +1350,7 @@ export default class CircomParser extends Parser { break; } this.state = 327; - this.match(CircomParser.RIGHT_ASSIGNMENT); + this.match(CircomParser.RIGHT_CONSTRAINT); this.state = 328; this.match(CircomParser.UNDERSCORE); this.state = 329; @@ -1369,7 +1368,7 @@ export default class CircomParser extends Parser { this.match(CircomParser.RP); this.state = 334; _la = this._input.LA(1); - if (!(_la === 36 || _la === 39)) { + if (!(_la === 39 || _la === 64)) { this._errHandler.recoverInline(this); } else { this._errHandler.reportMatch(this); @@ -1411,7 +1410,7 @@ export default class CircomParser extends Parser { this.state = 345; this.blockInstantiation(); this.state = 346; - this.match(CircomParser.RIGHT_ASSIGNMENT); + this.match(CircomParser.RIGHT_CONSTRAINT); this.state = 347; this.match(CircomParser.LP); this.state = 348; @@ -1523,7 +1522,7 @@ export default class CircomParser extends Parser { this.state = 381; this._errHandler.sync(this); _la = this._input.LA(1); - if (_la === 34) { + if (_la === 33) { { this.state = 379; this.match(CircomParser.DOT); @@ -1596,7 +1595,7 @@ export default class CircomParser extends Parser { this.state = 390; this._errHandler.sync(this); _la = this._input.LA(1); - if (_la === 9) { + if (_la === 14) { { this.state = 389; this.match(CircomParser.VAR); @@ -1608,7 +1607,7 @@ export default class CircomParser extends Parser { this.state = 395; this._errHandler.sync(this); _la = this._input.LA(1); - if (_la === 36) { + if (_la === 64) { { this.state = 393; this.match(CircomParser.ASSIGNMENT); @@ -1651,19 +1650,19 @@ export default class CircomParser extends Parser { this.state = 401; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 38: + case 41: { this.state = 398; this.match(CircomParser.SELF_OP); } break; - case 36: - case 37: + case 64: + case 65: { { this.state = 399; _la = this._input.LA(1); - if (!(_la === 36 || _la === 37)) { + if (!(_la === 64 || _la === 65)) { this._errHandler.recoverInline(this); } else { this._errHandler.reportMatch(this); @@ -1679,7 +1678,7 @@ export default class CircomParser extends Parser { } } break; - case 38: + case 41: this.enterOuterAlt(localctx, 2); { this.state = 403; @@ -1793,7 +1792,7 @@ export default class CircomParser extends Parser { (localctx as UnaryExpressionContext)._op = this._input.LT(1); _la = this._input.LA(1); if ( - !(((_la - 44) & ~0x1f) === 0 && ((1 << (_la - 44)) & 259) !== 0) + !(((_la - 42) & ~0x1f) === 0 && ((1 << (_la - 42)) & 259) !== 0) ) { (localctx as UnaryExpressionContext)._op = this._errHandler.recoverInline(this); @@ -1845,8 +1844,8 @@ export default class CircomParser extends Parser { _la = this._input.LA(1); if ( !( - ((_la - 46) & ~0x1f) === 0 && - ((1 << (_la - 46)) & 31) !== 0 + ((_la - 44) & ~0x1f) === 0 && + ((1 << (_la - 44)) & 31) !== 0 ) ) { (localctx as BinaryExpressionContext)._op = @@ -1880,7 +1879,7 @@ export default class CircomParser extends Parser { (localctx as BinaryExpressionContext)._op = this._input.LT(1); _la = this._input.LA(1); - if (!(_la === 51 || _la === 52)) { + if (!(_la === 49 || _la === 50)) { (localctx as BinaryExpressionContext)._op = this._errHandler.recoverInline(this); } else { @@ -1912,7 +1911,7 @@ export default class CircomParser extends Parser { (localctx as BinaryExpressionContext)._op = this._input.LT(1); _la = this._input.LA(1); - if (!(_la === 53 || _la === 54)) { + if (!(_la === 51 || _la === 52)) { (localctx as BinaryExpressionContext)._op = this._errHandler.recoverInline(this); } else { @@ -1946,8 +1945,8 @@ export default class CircomParser extends Parser { _la = this._input.LA(1); if ( !( - ((_la - 55) & ~0x1f) === 0 && - ((1 << (_la - 55)) & 7) !== 0 + ((_la - 53) & ~0x1f) === 0 && + ((1 << (_la - 53)) & 7) !== 0 ) ) { (localctx as BinaryExpressionContext)._op = @@ -1983,8 +1982,8 @@ export default class CircomParser extends Parser { _la = this._input.LA(1); if ( !( - ((_la - 58) & ~0x1f) === 0 && - ((1 << (_la - 58)) & 255) !== 0 + ((_la - 56) & ~0x1f) === 0 && + ((1 << (_la - 56)) & 255) !== 0 ) ) { (localctx as BinaryExpressionContext)._op = @@ -2015,11 +2014,11 @@ export default class CircomParser extends Parser { ); } this.state = 434; - this.match(CircomParser.QUESTION_MARK); + this.match(CircomParser.TERNARY_CONDITION); this.state = 435; this.expression(0); this.state = 436; - this.match(CircomParser.COLON); + this.match(CircomParser.TERNARY_ALTERNATIVE); this.state = 437; this.expression(2); } @@ -2180,8 +2179,8 @@ export default class CircomParser extends Parser { this._errHandler.sync(this); _la = this._input.LA(1); if ( - ((_la & ~0x1f) === 0 && ((1 << _la) & 369098752) !== 0) || - (((_la - 44) & ~0x1f) === 0 && ((1 << (_la - 44)) & 46137603) !== 0) + ((_la & ~0x1f) === 0 && ((1 << _la) & 335544576) !== 0) || + (((_la - 42) & ~0x1f) === 0 && ((1 << (_la - 42)) & 184549635) !== 0) ) { { this.state = 471; @@ -2193,12 +2192,12 @@ export default class CircomParser extends Parser { this.match(CircomParser.STRING); } break; - case 25: + case 8: case 26: case 28: - case 44: - case 45: - case 52: + case 42: + case 43: + case 50: case 66: case 67: { @@ -2212,7 +2211,7 @@ export default class CircomParser extends Parser { this.state = 480; this._errHandler.sync(this); _la = this._input.LA(1); - while (_la === 35) { + while (_la === 34) { { { this.state = 473; @@ -2226,12 +2225,12 @@ export default class CircomParser extends Parser { this.match(CircomParser.STRING); } break; - case 25: + case 8: case 26: case 28: - case 44: - case 45: - case 52: + case 42: + case 43: + case 50: case 66: case 67: { @@ -2327,7 +2326,7 @@ export default class CircomParser extends Parser { this.state = 499; this._errHandler.sync(this); _la = this._input.LA(1); - if (_la === 36) { + if (_la === 64) { { this.state = 497; this.match(CircomParser.ASSIGNMENT); @@ -2454,7 +2453,7 @@ export default class CircomParser extends Parser { if (_la === 39) { { this.state = 515; - this.match(CircomParser.LEFT_ASSIGNMENT); + this.match(CircomParser.LEFT_CONSTRAINT); this.state = 516; this.rhsValue(); } @@ -2469,7 +2468,7 @@ export default class CircomParser extends Parser { this.state = 524; this._errHandler.sync(this); _la = this._input.LA(1); - while (_la === 35) { + while (_la === 34) { { { this.state = 520; @@ -2532,7 +2531,7 @@ export default class CircomParser extends Parser { this.state = 538; this._errHandler.sync(this); _la = this._input.LA(1); - while (_la === 35) { + while (_la === 34) { { { this.state = 534; @@ -2584,7 +2583,7 @@ export default class CircomParser extends Parser { this.state = 548; this._errHandler.sync(this); _la = this._input.LA(1); - if (_la === 36) { + if (_la === 64) { { this.state = 546; this.match(CircomParser.ASSIGNMENT); @@ -2602,7 +2601,7 @@ export default class CircomParser extends Parser { this.state = 555; this._errHandler.sync(this); _la = this._input.LA(1); - while (_la === 35) { + while (_la === 34) { { { this.state = 551; @@ -2704,9 +2703,9 @@ export default class CircomParser extends Parser { this._errHandler.sync(this); _la = this._input.LA(1); if ( - ((_la & ~0x1f) === 0 && ((1 << _la) & 369098752) !== 0) || - (((_la - 44) & ~0x1f) === 0 && - ((1 << (_la - 44)) & 12583171) !== 0) + ((_la & ~0x1f) === 0 && ((1 << _la) & 335544576) !== 0) || + (((_la - 42) & ~0x1f) === 0 && + ((1 << (_la - 42)) & 50331907) !== 0) ) { { this.state = 569; @@ -2726,13 +2725,13 @@ export default class CircomParser extends Parser { this.state = 574; this.match(CircomParser.ID); this.state = 575; - this.match(CircomParser.LEFT_ASSIGNMENT); + this.match(CircomParser.LEFT_CONSTRAINT); this.state = 576; this.expression(0); this.state = 583; this._errHandler.sync(this); _la = this._input.LA(1); - while (_la === 35) { + while (_la === 34) { { { this.state = 577; @@ -2740,7 +2739,7 @@ export default class CircomParser extends Parser { this.state = 578; this.match(CircomParser.ID); this.state = 579; - this.match(CircomParser.LEFT_ASSIGNMENT); + this.match(CircomParser.LEFT_CONSTRAINT); this.state = 580; this.expression(0); } @@ -2761,13 +2760,13 @@ export default class CircomParser extends Parser { this.state = 589; this.expression(0); this.state = 590; - this.match(CircomParser.RIGHT_ASSIGNMENT); + this.match(CircomParser.RIGHT_CONSTRAINT); this.state = 591; this.match(CircomParser.ID); this.state = 599; this._errHandler.sync(this); _la = this._input.LA(1); - while (_la === 35) { + while (_la === 34) { { { this.state = 592; @@ -2775,7 +2774,7 @@ export default class CircomParser extends Parser { this.state = 593; this.expression(0); this.state = 594; - this.match(CircomParser.RIGHT_ASSIGNMENT); + this.match(CircomParser.RIGHT_CONSTRAINT); this.state = 595; this.match(CircomParser.ID); } @@ -2817,7 +2816,7 @@ export default class CircomParser extends Parser { this.state = 607; this._errHandler.sync(this); _la = this._input.LA(1); - if (_la === 25) { + if (_la === 8) { { this.state = 606; this.match(CircomParser.PARALLEL); @@ -2832,8 +2831,8 @@ export default class CircomParser extends Parser { this._errHandler.sync(this); _la = this._input.LA(1); if ( - ((_la & ~0x1f) === 0 && ((1 << _la) & 369098752) !== 0) || - (((_la - 44) & ~0x1f) === 0 && ((1 << (_la - 44)) & 12583171) !== 0) + ((_la & ~0x1f) === 0 && ((1 << _la) & 335544576) !== 0) || + (((_la - 42) & ~0x1f) === 0 && ((1 << (_la - 42)) & 50331907) !== 0) ) { { this.state = 611; @@ -2884,7 +2883,7 @@ export default class CircomParser extends Parser { this.state = 623; this._errHandler.sync(this); _la = this._input.LA(1); - while (_la === 35) { + while (_la === 34) { { { this.state = 619; @@ -3070,7 +3069,7 @@ export default class CircomParser extends Parser { { this.state = 655; _la = this._input.LA(1); - if (!(_la === 43 || _la === 66)) { + if (!(_la === 35 || _la === 66)) { this._errHandler.recoverInline(this); } else { this._errHandler.reportMatch(this); @@ -3079,14 +3078,14 @@ export default class CircomParser extends Parser { this.state = 660; this._errHandler.sync(this); _la = this._input.LA(1); - while (_la === 35) { + while (_la === 34) { { { this.state = 656; this.match(CircomParser.COMMA); this.state = 657; _la = this._input.LA(1); - if (!(_la === 43 || _la === 66)) { + if (!(_la === 35 || _la === 66)) { this._errHandler.recoverInline(this); } else { this._errHandler.reportMatch(this); @@ -3265,9 +3264,9 @@ export default class CircomParser extends Parser { 10, 34, 12, 34, 662, 9, 34, 1, 35, 1, 35, 1, 35, 5, 35, 667, 8, 35, 10, 35, 12, 35, 670, 9, 35, 1, 35, 0, 1, 34, 36, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, - 58, 60, 62, 64, 66, 68, 70, 0, 10, 1, 0, 36, 37, 2, 0, 37, 37, 39, 39, 2, 0, - 36, 36, 39, 39, 2, 0, 44, 45, 52, 52, 1, 0, 46, 50, 1, 0, 51, 52, 1, 0, 53, - 54, 1, 0, 55, 57, 1, 0, 58, 65, 2, 0, 43, 43, 66, 66, 744, 0, 75, 1, 0, 0, + 58, 60, 62, 64, 66, 68, 70, 0, 10, 1, 0, 64, 65, 2, 0, 39, 39, 65, 65, 2, 0, + 39, 39, 64, 64, 2, 0, 42, 43, 50, 50, 1, 0, 44, 48, 1, 0, 49, 50, 1, 0, 51, + 52, 1, 0, 53, 55, 1, 0, 56, 63, 2, 0, 35, 35, 66, 66, 744, 0, 75, 1, 0, 0, 0, 2, 102, 1, 0, 0, 0, 4, 104, 1, 0, 0, 0, 6, 110, 1, 0, 0, 0, 8, 112, 1, 0, 0, 0, 10, 121, 1, 0, 0, 0, 12, 189, 1, 0, 0, 0, 14, 191, 1, 0, 0, 0, 16, 206, 1, 0, 0, 0, 18, 215, 1, 0, 0, 0, 20, 229, 1, 0, 0, 0, 22, 376, 1, 0, 0, @@ -3284,132 +3283,132 @@ export default class CircomParser extends Parser { 0, 0, 0, 83, 81, 1, 0, 0, 0, 84, 86, 3, 6, 3, 0, 85, 84, 1, 0, 0, 0, 86, 89, 1, 0, 0, 0, 87, 85, 1, 0, 0, 0, 87, 88, 1, 0, 0, 0, 88, 91, 1, 0, 0, 0, 89, 87, 1, 0, 0, 0, 90, 92, 3, 18, 9, 0, 91, 90, 1, 0, 0, 0, 91, 92, 1, 0, 0, 0, - 92, 93, 1, 0, 0, 0, 93, 94, 5, 0, 0, 1, 94, 1, 1, 0, 0, 0, 95, 96, 5, 21, 0, - 0, 96, 97, 5, 22, 0, 0, 97, 98, 5, 1, 0, 0, 98, 103, 5, 33, 0, 0, 99, 100, - 5, 21, 0, 0, 100, 101, 5, 23, 0, 0, 101, 103, 5, 33, 0, 0, 102, 95, 1, 0, 0, - 0, 102, 99, 1, 0, 0, 0, 103, 3, 1, 0, 0, 0, 104, 105, 5, 19, 0, 0, 105, 106, - 5, 69, 0, 0, 106, 107, 5, 33, 0, 0, 107, 5, 1, 0, 0, 0, 108, 111, 3, 8, 4, - 0, 109, 111, 3, 14, 7, 0, 110, 108, 1, 0, 0, 0, 110, 109, 1, 0, 0, 0, 111, - 7, 1, 0, 0, 0, 112, 113, 5, 10, 0, 0, 113, 114, 5, 66, 0, 0, 114, 116, 5, - 26, 0, 0, 115, 117, 3, 66, 33, 0, 116, 115, 1, 0, 0, 0, 116, 117, 1, 0, 0, - 0, 117, 118, 1, 0, 0, 0, 118, 119, 5, 27, 0, 0, 119, 120, 3, 10, 5, 0, 120, - 9, 1, 0, 0, 0, 121, 125, 5, 30, 0, 0, 122, 124, 3, 12, 6, 0, 123, 122, 1, 0, - 0, 0, 124, 127, 1, 0, 0, 0, 125, 123, 1, 0, 0, 0, 125, 126, 1, 0, 0, 0, 126, + 92, 93, 1, 0, 0, 0, 93, 94, 5, 0, 0, 1, 94, 1, 1, 0, 0, 0, 95, 96, 5, 3, 0, + 0, 96, 97, 5, 4, 0, 0, 97, 98, 5, 1, 0, 0, 98, 103, 5, 32, 0, 0, 99, 100, 5, + 3, 0, 0, 100, 101, 5, 5, 0, 0, 101, 103, 5, 32, 0, 0, 102, 95, 1, 0, 0, 0, + 102, 99, 1, 0, 0, 0, 103, 3, 1, 0, 0, 0, 104, 105, 5, 6, 0, 0, 105, 106, 5, + 69, 0, 0, 106, 107, 5, 32, 0, 0, 107, 5, 1, 0, 0, 0, 108, 111, 3, 8, 4, 0, + 109, 111, 3, 14, 7, 0, 110, 108, 1, 0, 0, 0, 110, 109, 1, 0, 0, 0, 111, 7, + 1, 0, 0, 0, 112, 113, 5, 10, 0, 0, 113, 114, 5, 66, 0, 0, 114, 116, 5, 26, + 0, 0, 115, 117, 3, 66, 33, 0, 116, 115, 1, 0, 0, 0, 116, 117, 1, 0, 0, 0, + 117, 118, 1, 0, 0, 0, 118, 119, 5, 27, 0, 0, 119, 120, 3, 10, 5, 0, 120, 9, + 1, 0, 0, 0, 121, 125, 5, 30, 0, 0, 122, 124, 3, 12, 6, 0, 123, 122, 1, 0, 0, + 0, 124, 127, 1, 0, 0, 0, 125, 123, 1, 0, 0, 0, 125, 126, 1, 0, 0, 0, 126, 128, 1, 0, 0, 0, 127, 125, 1, 0, 0, 0, 128, 129, 5, 31, 0, 0, 129, 11, 1, 0, 0, 0, 130, 190, 3, 10, 5, 0, 131, 135, 5, 66, 0, 0, 132, 134, 3, 64, 32, 0, 133, 132, 1, 0, 0, 0, 134, 137, 1, 0, 0, 0, 135, 133, 1, 0, 0, 0, 135, 136, - 1, 0, 0, 0, 136, 138, 1, 0, 0, 0, 137, 135, 1, 0, 0, 0, 138, 139, 5, 38, 0, - 0, 139, 190, 5, 33, 0, 0, 140, 141, 3, 52, 26, 0, 141, 142, 5, 33, 0, 0, + 1, 0, 0, 0, 136, 138, 1, 0, 0, 0, 137, 135, 1, 0, 0, 0, 138, 139, 5, 41, 0, + 0, 139, 190, 5, 32, 0, 0, 140, 141, 3, 52, 26, 0, 141, 142, 5, 32, 0, 0, 142, 190, 1, 0, 0, 0, 143, 144, 3, 62, 31, 0, 144, 145, 7, 0, 0, 0, 145, - 146, 3, 34, 17, 0, 146, 147, 5, 33, 0, 0, 147, 190, 1, 0, 0, 0, 148, 149, 5, - 26, 0, 0, 149, 150, 3, 68, 34, 0, 150, 151, 5, 27, 0, 0, 151, 157, 5, 36, 0, + 146, 3, 34, 17, 0, 146, 147, 5, 32, 0, 0, 147, 190, 1, 0, 0, 0, 148, 149, 5, + 26, 0, 0, 149, 150, 3, 68, 34, 0, 150, 151, 5, 27, 0, 0, 151, 157, 5, 64, 0, 0, 152, 153, 5, 26, 0, 0, 153, 154, 3, 60, 30, 0, 154, 155, 5, 27, 0, 0, 155, 158, 1, 0, 0, 0, 156, 158, 3, 34, 17, 0, 157, 152, 1, 0, 0, 0, 157, - 156, 1, 0, 0, 0, 158, 159, 1, 0, 0, 0, 159, 160, 5, 33, 0, 0, 160, 190, 1, - 0, 0, 0, 161, 162, 5, 12, 0, 0, 162, 163, 3, 32, 16, 0, 163, 166, 3, 12, 6, - 0, 164, 165, 5, 13, 0, 0, 165, 167, 3, 12, 6, 0, 166, 164, 1, 0, 0, 0, 166, - 167, 1, 0, 0, 0, 167, 190, 1, 0, 0, 0, 168, 169, 5, 15, 0, 0, 169, 170, 3, - 32, 16, 0, 170, 171, 3, 12, 6, 0, 171, 190, 1, 0, 0, 0, 172, 173, 5, 14, 0, + 156, 1, 0, 0, 0, 158, 159, 1, 0, 0, 0, 159, 160, 5, 32, 0, 0, 160, 190, 1, + 0, 0, 0, 161, 162, 5, 18, 0, 0, 162, 163, 3, 32, 16, 0, 163, 166, 3, 12, 6, + 0, 164, 165, 5, 19, 0, 0, 165, 167, 3, 12, 6, 0, 166, 164, 1, 0, 0, 0, 166, + 167, 1, 0, 0, 0, 167, 190, 1, 0, 0, 0, 168, 169, 5, 21, 0, 0, 169, 170, 3, + 32, 16, 0, 170, 171, 3, 12, 6, 0, 171, 190, 1, 0, 0, 0, 172, 173, 5, 20, 0, 0, 173, 174, 5, 26, 0, 0, 174, 175, 3, 26, 13, 0, 175, 176, 5, 27, 0, 0, - 176, 177, 3, 12, 6, 0, 177, 190, 1, 0, 0, 0, 178, 179, 5, 11, 0, 0, 179, - 180, 3, 34, 17, 0, 180, 181, 5, 33, 0, 0, 181, 190, 1, 0, 0, 0, 182, 183, 5, - 18, 0, 0, 183, 184, 3, 32, 16, 0, 184, 185, 5, 33, 0, 0, 185, 190, 1, 0, 0, - 0, 186, 187, 3, 38, 19, 0, 187, 188, 5, 33, 0, 0, 188, 190, 1, 0, 0, 0, 189, + 176, 177, 3, 12, 6, 0, 177, 190, 1, 0, 0, 0, 178, 179, 5, 25, 0, 0, 179, + 180, 3, 34, 17, 0, 180, 181, 5, 32, 0, 0, 181, 190, 1, 0, 0, 0, 182, 183, 5, + 24, 0, 0, 183, 184, 3, 32, 16, 0, 184, 185, 5, 32, 0, 0, 185, 190, 1, 0, 0, + 0, 186, 187, 3, 38, 19, 0, 187, 188, 5, 32, 0, 0, 188, 190, 1, 0, 0, 0, 189, 130, 1, 0, 0, 0, 189, 131, 1, 0, 0, 0, 189, 140, 1, 0, 0, 0, 189, 143, 1, 0, 0, 0, 189, 148, 1, 0, 0, 0, 189, 161, 1, 0, 0, 0, 189, 168, 1, 0, 0, 0, 189, 172, 1, 0, 0, 0, 189, 178, 1, 0, 0, 0, 189, 182, 1, 0, 0, 0, 189, 186, 1, 0, - 0, 0, 190, 13, 1, 0, 0, 0, 191, 193, 5, 7, 0, 0, 192, 194, 5, 20, 0, 0, 193, - 192, 1, 0, 0, 0, 193, 194, 1, 0, 0, 0, 194, 196, 1, 0, 0, 0, 195, 197, 5, - 25, 0, 0, 196, 195, 1, 0, 0, 0, 196, 197, 1, 0, 0, 0, 197, 198, 1, 0, 0, 0, - 198, 199, 5, 66, 0, 0, 199, 201, 5, 26, 0, 0, 200, 202, 3, 66, 33, 0, 201, - 200, 1, 0, 0, 0, 201, 202, 1, 0, 0, 0, 202, 203, 1, 0, 0, 0, 203, 204, 5, - 27, 0, 0, 204, 205, 3, 16, 8, 0, 205, 15, 1, 0, 0, 0, 206, 210, 5, 30, 0, 0, - 207, 209, 3, 22, 11, 0, 208, 207, 1, 0, 0, 0, 209, 212, 1, 0, 0, 0, 210, - 208, 1, 0, 0, 0, 210, 211, 1, 0, 0, 0, 211, 213, 1, 0, 0, 0, 212, 210, 1, 0, - 0, 0, 213, 214, 5, 31, 0, 0, 214, 17, 1, 0, 0, 0, 215, 216, 5, 8, 0, 0, 216, - 218, 5, 24, 0, 0, 217, 219, 3, 20, 10, 0, 218, 217, 1, 0, 0, 0, 218, 219, 1, - 0, 0, 0, 219, 220, 1, 0, 0, 0, 220, 221, 5, 36, 0, 0, 221, 222, 5, 66, 0, 0, + 0, 0, 190, 13, 1, 0, 0, 0, 191, 193, 5, 9, 0, 0, 192, 194, 5, 7, 0, 0, 193, + 192, 1, 0, 0, 0, 193, 194, 1, 0, 0, 0, 194, 196, 1, 0, 0, 0, 195, 197, 5, 8, + 0, 0, 196, 195, 1, 0, 0, 0, 196, 197, 1, 0, 0, 0, 197, 198, 1, 0, 0, 0, 198, + 199, 5, 66, 0, 0, 199, 201, 5, 26, 0, 0, 200, 202, 3, 66, 33, 0, 201, 200, + 1, 0, 0, 0, 201, 202, 1, 0, 0, 0, 202, 203, 1, 0, 0, 0, 203, 204, 5, 27, 0, + 0, 204, 205, 3, 16, 8, 0, 205, 15, 1, 0, 0, 0, 206, 210, 5, 30, 0, 0, 207, + 209, 3, 22, 11, 0, 208, 207, 1, 0, 0, 0, 209, 212, 1, 0, 0, 0, 210, 208, 1, + 0, 0, 0, 210, 211, 1, 0, 0, 0, 211, 213, 1, 0, 0, 0, 212, 210, 1, 0, 0, 0, + 213, 214, 5, 31, 0, 0, 214, 17, 1, 0, 0, 0, 215, 216, 5, 13, 0, 0, 216, 218, + 5, 11, 0, 0, 217, 219, 3, 20, 10, 0, 218, 217, 1, 0, 0, 0, 218, 219, 1, 0, + 0, 0, 219, 220, 1, 0, 0, 0, 220, 221, 5, 64, 0, 0, 221, 222, 5, 66, 0, 0, 222, 224, 5, 26, 0, 0, 223, 225, 3, 60, 30, 0, 224, 223, 1, 0, 0, 0, 224, 225, 1, 0, 0, 0, 225, 226, 1, 0, 0, 0, 226, 227, 5, 27, 0, 0, 227, 228, 5, - 33, 0, 0, 228, 19, 1, 0, 0, 0, 229, 230, 5, 30, 0, 0, 230, 231, 5, 6, 0, 0, + 32, 0, 0, 228, 19, 1, 0, 0, 0, 229, 230, 5, 30, 0, 0, 230, 231, 5, 12, 0, 0, 231, 232, 5, 28, 0, 0, 232, 233, 3, 66, 33, 0, 233, 234, 5, 29, 0, 0, 234, 235, 5, 31, 0, 0, 235, 21, 1, 0, 0, 0, 236, 377, 3, 16, 8, 0, 237, 241, 5, 66, 0, 0, 238, 240, 3, 64, 32, 0, 239, 238, 1, 0, 0, 0, 240, 243, 1, 0, 0, 0, 241, 239, 1, 0, 0, 0, 241, 242, 1, 0, 0, 0, 242, 244, 1, 0, 0, 0, 243, - 241, 1, 0, 0, 0, 244, 245, 5, 38, 0, 0, 245, 377, 5, 33, 0, 0, 246, 247, 3, - 52, 26, 0, 247, 248, 5, 33, 0, 0, 248, 377, 1, 0, 0, 0, 249, 250, 3, 48, 24, - 0, 250, 251, 5, 33, 0, 0, 251, 377, 1, 0, 0, 0, 252, 253, 3, 42, 21, 0, 253, - 254, 5, 33, 0, 0, 254, 377, 1, 0, 0, 0, 255, 256, 3, 58, 29, 0, 256, 257, 5, - 33, 0, 0, 257, 377, 1, 0, 0, 0, 258, 259, 3, 62, 31, 0, 259, 260, 5, 36, 0, - 0, 260, 261, 3, 34, 17, 0, 261, 262, 5, 33, 0, 0, 262, 377, 1, 0, 0, 0, 263, - 264, 3, 34, 17, 0, 264, 265, 5, 41, 0, 0, 265, 266, 3, 34, 17, 0, 266, 267, - 5, 33, 0, 0, 267, 377, 1, 0, 0, 0, 268, 269, 3, 24, 12, 0, 269, 270, 7, 1, - 0, 0, 270, 271, 3, 34, 17, 0, 271, 272, 5, 33, 0, 0, 272, 377, 1, 0, 0, 0, - 273, 274, 5, 26, 0, 0, 274, 279, 3, 24, 12, 0, 275, 276, 5, 35, 0, 0, 276, + 241, 1, 0, 0, 0, 244, 245, 5, 41, 0, 0, 245, 377, 5, 32, 0, 0, 246, 247, 3, + 52, 26, 0, 247, 248, 5, 32, 0, 0, 248, 377, 1, 0, 0, 0, 249, 250, 3, 48, 24, + 0, 250, 251, 5, 32, 0, 0, 251, 377, 1, 0, 0, 0, 252, 253, 3, 42, 21, 0, 253, + 254, 5, 32, 0, 0, 254, 377, 1, 0, 0, 0, 255, 256, 3, 58, 29, 0, 256, 257, 5, + 32, 0, 0, 257, 377, 1, 0, 0, 0, 258, 259, 3, 62, 31, 0, 259, 260, 5, 64, 0, + 0, 260, 261, 3, 34, 17, 0, 261, 262, 5, 32, 0, 0, 262, 377, 1, 0, 0, 0, 263, + 264, 3, 34, 17, 0, 264, 265, 5, 38, 0, 0, 265, 266, 3, 34, 17, 0, 266, 267, + 5, 32, 0, 0, 267, 377, 1, 0, 0, 0, 268, 269, 3, 24, 12, 0, 269, 270, 7, 1, + 0, 0, 270, 271, 3, 34, 17, 0, 271, 272, 5, 32, 0, 0, 272, 377, 1, 0, 0, 0, + 273, 274, 5, 26, 0, 0, 274, 279, 3, 24, 12, 0, 275, 276, 5, 34, 0, 0, 276, 278, 3, 24, 12, 0, 277, 275, 1, 0, 0, 0, 278, 281, 1, 0, 0, 0, 279, 277, 1, 0, 0, 0, 279, 280, 1, 0, 0, 0, 280, 282, 1, 0, 0, 0, 281, 279, 1, 0, 0, 0, 282, 283, 5, 27, 0, 0, 283, 284, 5, 39, 0, 0, 284, 285, 5, 26, 0, 0, 285, - 290, 3, 34, 17, 0, 286, 287, 5, 35, 0, 0, 287, 289, 3, 34, 17, 0, 288, 286, + 290, 3, 34, 17, 0, 286, 287, 5, 34, 0, 0, 287, 289, 3, 34, 17, 0, 288, 286, 1, 0, 0, 0, 289, 292, 1, 0, 0, 0, 290, 288, 1, 0, 0, 0, 290, 291, 1, 0, 0, 0, 291, 293, 1, 0, 0, 0, 292, 290, 1, 0, 0, 0, 293, 294, 5, 27, 0, 0, 294, - 295, 5, 33, 0, 0, 295, 377, 1, 0, 0, 0, 296, 297, 3, 34, 17, 0, 297, 298, 5, - 40, 0, 0, 298, 299, 3, 24, 12, 0, 299, 300, 5, 33, 0, 0, 300, 377, 1, 0, 0, + 295, 5, 32, 0, 0, 295, 377, 1, 0, 0, 0, 296, 297, 3, 34, 17, 0, 297, 298, 5, + 40, 0, 0, 298, 299, 3, 24, 12, 0, 299, 300, 5, 32, 0, 0, 300, 377, 1, 0, 0, 0, 301, 302, 3, 34, 17, 0, 302, 303, 5, 40, 0, 0, 303, 304, 5, 26, 0, 0, - 304, 309, 3, 24, 12, 0, 305, 306, 5, 35, 0, 0, 306, 308, 3, 24, 12, 0, 307, + 304, 309, 3, 24, 12, 0, 305, 306, 5, 34, 0, 0, 306, 308, 3, 24, 12, 0, 307, 305, 1, 0, 0, 0, 308, 311, 1, 0, 0, 0, 309, 307, 1, 0, 0, 0, 309, 310, 1, 0, 0, 0, 310, 312, 1, 0, 0, 0, 311, 309, 1, 0, 0, 0, 312, 313, 5, 27, 0, 0, - 313, 314, 5, 33, 0, 0, 314, 377, 1, 0, 0, 0, 315, 316, 5, 43, 0, 0, 316, + 313, 314, 5, 32, 0, 0, 314, 377, 1, 0, 0, 0, 315, 316, 5, 35, 0, 0, 316, 319, 7, 2, 0, 0, 317, 320, 3, 34, 17, 0, 318, 320, 3, 58, 29, 0, 319, 317, - 1, 0, 0, 0, 319, 318, 1, 0, 0, 0, 320, 321, 1, 0, 0, 0, 321, 322, 5, 33, 0, + 1, 0, 0, 0, 319, 318, 1, 0, 0, 0, 320, 321, 1, 0, 0, 0, 321, 322, 5, 32, 0, 0, 322, 377, 1, 0, 0, 0, 323, 326, 3, 34, 17, 0, 324, 326, 3, 58, 29, 0, 325, 323, 1, 0, 0, 0, 325, 324, 1, 0, 0, 0, 326, 327, 1, 0, 0, 0, 327, 328, - 5, 40, 0, 0, 328, 329, 5, 43, 0, 0, 329, 330, 5, 33, 0, 0, 330, 377, 1, 0, + 5, 40, 0, 0, 328, 329, 5, 35, 0, 0, 329, 330, 5, 32, 0, 0, 330, 377, 1, 0, 0, 0, 331, 332, 5, 26, 0, 0, 332, 333, 3, 68, 34, 0, 333, 334, 5, 27, 0, 0, 334, 341, 7, 2, 0, 0, 335, 336, 5, 26, 0, 0, 336, 337, 3, 60, 30, 0, 337, 338, 5, 27, 0, 0, 338, 342, 1, 0, 0, 0, 339, 342, 3, 58, 29, 0, 340, 342, 3, 34, 17, 0, 341, 335, 1, 0, 0, 0, 341, 339, 1, 0, 0, 0, 341, 340, 1, 0, 0, 0, - 342, 343, 1, 0, 0, 0, 343, 344, 5, 33, 0, 0, 344, 377, 1, 0, 0, 0, 345, 346, + 342, 343, 1, 0, 0, 0, 343, 344, 5, 32, 0, 0, 344, 377, 1, 0, 0, 0, 345, 346, 3, 58, 29, 0, 346, 347, 5, 40, 0, 0, 347, 348, 5, 26, 0, 0, 348, 349, 3, 68, - 34, 0, 349, 350, 5, 27, 0, 0, 350, 351, 5, 33, 0, 0, 351, 377, 1, 0, 0, 0, - 352, 353, 5, 12, 0, 0, 353, 354, 3, 32, 16, 0, 354, 357, 3, 22, 11, 0, 355, - 356, 5, 13, 0, 0, 356, 358, 3, 22, 11, 0, 357, 355, 1, 0, 0, 0, 357, 358, 1, - 0, 0, 0, 358, 377, 1, 0, 0, 0, 359, 360, 5, 15, 0, 0, 360, 361, 3, 32, 16, - 0, 361, 362, 3, 22, 11, 0, 362, 377, 1, 0, 0, 0, 363, 364, 5, 14, 0, 0, 364, + 34, 0, 349, 350, 5, 27, 0, 0, 350, 351, 5, 32, 0, 0, 351, 377, 1, 0, 0, 0, + 352, 353, 5, 18, 0, 0, 353, 354, 3, 32, 16, 0, 354, 357, 3, 22, 11, 0, 355, + 356, 5, 19, 0, 0, 356, 358, 3, 22, 11, 0, 357, 355, 1, 0, 0, 0, 357, 358, 1, + 0, 0, 0, 358, 377, 1, 0, 0, 0, 359, 360, 5, 21, 0, 0, 360, 361, 3, 32, 16, + 0, 361, 362, 3, 22, 11, 0, 362, 377, 1, 0, 0, 0, 363, 364, 5, 20, 0, 0, 364, 365, 5, 26, 0, 0, 365, 366, 3, 26, 13, 0, 366, 367, 5, 27, 0, 0, 367, 368, - 3, 22, 11, 0, 368, 377, 1, 0, 0, 0, 369, 370, 5, 18, 0, 0, 370, 371, 3, 32, - 16, 0, 371, 372, 5, 33, 0, 0, 372, 377, 1, 0, 0, 0, 373, 374, 3, 38, 19, 0, - 374, 375, 5, 33, 0, 0, 375, 377, 1, 0, 0, 0, 376, 236, 1, 0, 0, 0, 376, 237, + 3, 22, 11, 0, 368, 377, 1, 0, 0, 0, 369, 370, 5, 24, 0, 0, 370, 371, 3, 32, + 16, 0, 371, 372, 5, 32, 0, 0, 372, 377, 1, 0, 0, 0, 373, 374, 3, 38, 19, 0, + 374, 375, 5, 32, 0, 0, 375, 377, 1, 0, 0, 0, 376, 236, 1, 0, 0, 0, 376, 237, 1, 0, 0, 0, 376, 246, 1, 0, 0, 0, 376, 249, 1, 0, 0, 0, 376, 252, 1, 0, 0, 0, 376, 255, 1, 0, 0, 0, 376, 258, 1, 0, 0, 0, 376, 263, 1, 0, 0, 0, 376, 268, 1, 0, 0, 0, 376, 273, 1, 0, 0, 0, 376, 296, 1, 0, 0, 0, 376, 301, 1, 0, 0, 0, 376, 315, 1, 0, 0, 0, 376, 325, 1, 0, 0, 0, 376, 331, 1, 0, 0, 0, 376, 345, 1, 0, 0, 0, 376, 352, 1, 0, 0, 0, 376, 359, 1, 0, 0, 0, 376, 363, 1, 0, 0, 0, 376, 369, 1, 0, 0, 0, 376, 373, 1, 0, 0, 0, 377, 23, 1, 0, 0, 0, 378, - 381, 3, 62, 31, 0, 379, 380, 5, 34, 0, 0, 380, 382, 3, 62, 31, 0, 381, 379, + 381, 3, 62, 31, 0, 379, 380, 5, 33, 0, 0, 380, 382, 3, 62, 31, 0, 381, 379, 1, 0, 0, 0, 381, 382, 1, 0, 0, 0, 382, 25, 1, 0, 0, 0, 383, 384, 3, 28, 14, - 0, 384, 385, 5, 33, 0, 0, 385, 386, 3, 34, 17, 0, 386, 387, 5, 33, 0, 0, - 387, 388, 3, 30, 15, 0, 388, 27, 1, 0, 0, 0, 389, 391, 5, 9, 0, 0, 390, 389, - 1, 0, 0, 0, 390, 391, 1, 0, 0, 0, 391, 392, 1, 0, 0, 0, 392, 395, 3, 62, 31, - 0, 393, 394, 5, 36, 0, 0, 394, 396, 3, 54, 27, 0, 395, 393, 1, 0, 0, 0, 395, - 396, 1, 0, 0, 0, 396, 29, 1, 0, 0, 0, 397, 401, 5, 66, 0, 0, 398, 402, 5, - 38, 0, 0, 399, 400, 7, 0, 0, 0, 400, 402, 3, 34, 17, 0, 401, 398, 1, 0, 0, - 0, 401, 399, 1, 0, 0, 0, 402, 406, 1, 0, 0, 0, 403, 404, 5, 38, 0, 0, 404, - 406, 5, 66, 0, 0, 405, 397, 1, 0, 0, 0, 405, 403, 1, 0, 0, 0, 406, 31, 1, 0, - 0, 0, 407, 408, 5, 26, 0, 0, 408, 409, 3, 34, 17, 0, 409, 410, 5, 27, 0, 0, - 410, 33, 1, 0, 0, 0, 411, 412, 6, 17, -1, 0, 412, 417, 3, 36, 18, 0, 413, - 417, 3, 58, 29, 0, 414, 415, 7, 3, 0, 0, 415, 417, 3, 34, 17, 7, 416, 411, - 1, 0, 0, 0, 416, 413, 1, 0, 0, 0, 416, 414, 1, 0, 0, 0, 417, 450, 1, 0, 0, - 0, 418, 419, 10, 6, 0, 0, 419, 420, 7, 4, 0, 0, 420, 449, 3, 34, 17, 7, 421, - 422, 10, 5, 0, 0, 422, 423, 7, 5, 0, 0, 423, 449, 3, 34, 17, 6, 424, 425, - 10, 4, 0, 0, 425, 426, 7, 6, 0, 0, 426, 449, 3, 34, 17, 5, 427, 428, 10, 3, - 0, 0, 428, 429, 7, 7, 0, 0, 429, 449, 3, 34, 17, 4, 430, 431, 10, 2, 0, 0, - 431, 432, 7, 8, 0, 0, 432, 449, 3, 34, 17, 3, 433, 434, 10, 1, 0, 0, 434, - 435, 5, 42, 0, 0, 435, 436, 3, 34, 17, 0, 436, 437, 5, 32, 0, 0, 437, 438, - 3, 34, 17, 2, 438, 449, 1, 0, 0, 0, 439, 440, 10, 8, 0, 0, 440, 441, 5, 34, - 0, 0, 441, 446, 5, 66, 0, 0, 442, 443, 5, 28, 0, 0, 443, 444, 3, 34, 17, 0, - 444, 445, 5, 29, 0, 0, 445, 447, 1, 0, 0, 0, 446, 442, 1, 0, 0, 0, 446, 447, - 1, 0, 0, 0, 447, 449, 1, 0, 0, 0, 448, 418, 1, 0, 0, 0, 448, 421, 1, 0, 0, - 0, 448, 424, 1, 0, 0, 0, 448, 427, 1, 0, 0, 0, 448, 430, 1, 0, 0, 0, 448, + 0, 384, 385, 5, 32, 0, 0, 385, 386, 3, 34, 17, 0, 386, 387, 5, 32, 0, 0, + 387, 388, 3, 30, 15, 0, 388, 27, 1, 0, 0, 0, 389, 391, 5, 14, 0, 0, 390, + 389, 1, 0, 0, 0, 390, 391, 1, 0, 0, 0, 391, 392, 1, 0, 0, 0, 392, 395, 3, + 62, 31, 0, 393, 394, 5, 64, 0, 0, 394, 396, 3, 54, 27, 0, 395, 393, 1, 0, 0, + 0, 395, 396, 1, 0, 0, 0, 396, 29, 1, 0, 0, 0, 397, 401, 5, 66, 0, 0, 398, + 402, 5, 41, 0, 0, 399, 400, 7, 0, 0, 0, 400, 402, 3, 34, 17, 0, 401, 398, 1, + 0, 0, 0, 401, 399, 1, 0, 0, 0, 402, 406, 1, 0, 0, 0, 403, 404, 5, 41, 0, 0, + 404, 406, 5, 66, 0, 0, 405, 397, 1, 0, 0, 0, 405, 403, 1, 0, 0, 0, 406, 31, + 1, 0, 0, 0, 407, 408, 5, 26, 0, 0, 408, 409, 3, 34, 17, 0, 409, 410, 5, 27, + 0, 0, 410, 33, 1, 0, 0, 0, 411, 412, 6, 17, -1, 0, 412, 417, 3, 36, 18, 0, + 413, 417, 3, 58, 29, 0, 414, 415, 7, 3, 0, 0, 415, 417, 3, 34, 17, 7, 416, + 411, 1, 0, 0, 0, 416, 413, 1, 0, 0, 0, 416, 414, 1, 0, 0, 0, 417, 450, 1, 0, + 0, 0, 418, 419, 10, 6, 0, 0, 419, 420, 7, 4, 0, 0, 420, 449, 3, 34, 17, 7, + 421, 422, 10, 5, 0, 0, 422, 423, 7, 5, 0, 0, 423, 449, 3, 34, 17, 6, 424, + 425, 10, 4, 0, 0, 425, 426, 7, 6, 0, 0, 426, 449, 3, 34, 17, 5, 427, 428, + 10, 3, 0, 0, 428, 429, 7, 7, 0, 0, 429, 449, 3, 34, 17, 4, 430, 431, 10, 2, + 0, 0, 431, 432, 7, 8, 0, 0, 432, 449, 3, 34, 17, 3, 433, 434, 10, 1, 0, 0, + 434, 435, 5, 36, 0, 0, 435, 436, 3, 34, 17, 0, 436, 437, 5, 37, 0, 0, 437, + 438, 3, 34, 17, 2, 438, 449, 1, 0, 0, 0, 439, 440, 10, 8, 0, 0, 440, 441, 5, + 33, 0, 0, 441, 446, 5, 66, 0, 0, 442, 443, 5, 28, 0, 0, 443, 444, 3, 34, 17, + 0, 444, 445, 5, 29, 0, 0, 445, 447, 1, 0, 0, 0, 446, 442, 1, 0, 0, 0, 446, + 447, 1, 0, 0, 0, 447, 449, 1, 0, 0, 0, 448, 418, 1, 0, 0, 0, 448, 421, 1, 0, + 0, 0, 448, 424, 1, 0, 0, 0, 448, 427, 1, 0, 0, 0, 448, 430, 1, 0, 0, 0, 448, 433, 1, 0, 0, 0, 448, 439, 1, 0, 0, 0, 449, 452, 1, 0, 0, 0, 450, 448, 1, 0, 0, 0, 450, 451, 1, 0, 0, 0, 451, 35, 1, 0, 0, 0, 452, 450, 1, 0, 0, 0, 453, 454, 5, 26, 0, 0, 454, 455, 3, 34, 17, 0, 455, 456, 5, 27, 0, 0, 456, 466, @@ -3417,36 +3416,36 @@ export default class CircomParser extends Parser { 0, 0, 460, 466, 1, 0, 0, 0, 461, 466, 5, 67, 0, 0, 462, 466, 3, 62, 31, 0, 463, 466, 3, 66, 33, 0, 464, 466, 3, 70, 35, 0, 465, 453, 1, 0, 0, 0, 465, 457, 1, 0, 0, 0, 465, 461, 1, 0, 0, 0, 465, 462, 1, 0, 0, 0, 465, 463, 1, 0, - 0, 0, 465, 464, 1, 0, 0, 0, 466, 37, 1, 0, 0, 0, 467, 468, 5, 17, 0, 0, 468, + 0, 0, 465, 464, 1, 0, 0, 0, 466, 37, 1, 0, 0, 0, 467, 468, 5, 23, 0, 0, 468, 483, 5, 26, 0, 0, 469, 472, 5, 69, 0, 0, 470, 472, 3, 34, 17, 0, 471, 469, - 1, 0, 0, 0, 471, 470, 1, 0, 0, 0, 472, 480, 1, 0, 0, 0, 473, 476, 5, 35, 0, + 1, 0, 0, 0, 471, 470, 1, 0, 0, 0, 472, 480, 1, 0, 0, 0, 473, 476, 5, 34, 0, 0, 474, 477, 5, 69, 0, 0, 475, 477, 3, 34, 17, 0, 476, 474, 1, 0, 0, 0, 476, 475, 1, 0, 0, 0, 477, 479, 1, 0, 0, 0, 478, 473, 1, 0, 0, 0, 479, 482, 1, 0, 0, 0, 480, 478, 1, 0, 0, 0, 480, 481, 1, 0, 0, 0, 481, 484, 1, 0, 0, 0, 482, 480, 1, 0, 0, 0, 483, 471, 1, 0, 0, 0, 483, 484, 1, 0, 0, 0, 484, 485, 1, 0, - 0, 0, 485, 486, 5, 27, 0, 0, 486, 39, 1, 0, 0, 0, 487, 488, 5, 8, 0, 0, 488, - 489, 5, 66, 0, 0, 489, 41, 1, 0, 0, 0, 490, 494, 3, 40, 20, 0, 491, 493, 3, - 64, 32, 0, 492, 491, 1, 0, 0, 0, 493, 496, 1, 0, 0, 0, 494, 492, 1, 0, 0, 0, - 494, 495, 1, 0, 0, 0, 495, 499, 1, 0, 0, 0, 496, 494, 1, 0, 0, 0, 497, 498, - 5, 36, 0, 0, 498, 500, 3, 58, 29, 0, 499, 497, 1, 0, 0, 0, 499, 500, 1, 0, - 0, 0, 500, 43, 1, 0, 0, 0, 501, 503, 5, 3, 0, 0, 502, 504, 5, 2, 0, 0, 503, - 502, 1, 0, 0, 0, 503, 504, 1, 0, 0, 0, 504, 506, 1, 0, 0, 0, 505, 507, 3, - 46, 23, 0, 506, 505, 1, 0, 0, 0, 506, 507, 1, 0, 0, 0, 507, 508, 1, 0, 0, 0, - 508, 509, 3, 62, 31, 0, 509, 45, 1, 0, 0, 0, 510, 511, 5, 30, 0, 0, 511, - 512, 3, 66, 33, 0, 512, 513, 5, 31, 0, 0, 513, 47, 1, 0, 0, 0, 514, 517, 3, - 44, 22, 0, 515, 516, 5, 39, 0, 0, 516, 518, 3, 54, 27, 0, 517, 515, 1, 0, 0, - 0, 517, 518, 1, 0, 0, 0, 518, 528, 1, 0, 0, 0, 519, 524, 3, 44, 22, 0, 520, - 521, 5, 35, 0, 0, 521, 523, 3, 62, 31, 0, 522, 520, 1, 0, 0, 0, 523, 526, 1, - 0, 0, 0, 524, 522, 1, 0, 0, 0, 524, 525, 1, 0, 0, 0, 525, 528, 1, 0, 0, 0, - 526, 524, 1, 0, 0, 0, 527, 514, 1, 0, 0, 0, 527, 519, 1, 0, 0, 0, 528, 49, - 1, 0, 0, 0, 529, 530, 5, 9, 0, 0, 530, 544, 3, 62, 31, 0, 531, 532, 5, 9, 0, - 0, 532, 533, 5, 26, 0, 0, 533, 538, 3, 62, 31, 0, 534, 535, 5, 35, 0, 0, - 535, 537, 3, 62, 31, 0, 536, 534, 1, 0, 0, 0, 537, 540, 1, 0, 0, 0, 538, + 0, 0, 485, 486, 5, 27, 0, 0, 486, 39, 1, 0, 0, 0, 487, 488, 5, 13, 0, 0, + 488, 489, 5, 66, 0, 0, 489, 41, 1, 0, 0, 0, 490, 494, 3, 40, 20, 0, 491, + 493, 3, 64, 32, 0, 492, 491, 1, 0, 0, 0, 493, 496, 1, 0, 0, 0, 494, 492, 1, + 0, 0, 0, 494, 495, 1, 0, 0, 0, 495, 499, 1, 0, 0, 0, 496, 494, 1, 0, 0, 0, + 497, 498, 5, 64, 0, 0, 498, 500, 3, 58, 29, 0, 499, 497, 1, 0, 0, 0, 499, + 500, 1, 0, 0, 0, 500, 43, 1, 0, 0, 0, 501, 503, 5, 15, 0, 0, 502, 504, 5, 2, + 0, 0, 503, 502, 1, 0, 0, 0, 503, 504, 1, 0, 0, 0, 504, 506, 1, 0, 0, 0, 505, + 507, 3, 46, 23, 0, 506, 505, 1, 0, 0, 0, 506, 507, 1, 0, 0, 0, 507, 508, 1, + 0, 0, 0, 508, 509, 3, 62, 31, 0, 509, 45, 1, 0, 0, 0, 510, 511, 5, 30, 0, 0, + 511, 512, 3, 66, 33, 0, 512, 513, 5, 31, 0, 0, 513, 47, 1, 0, 0, 0, 514, + 517, 3, 44, 22, 0, 515, 516, 5, 39, 0, 0, 516, 518, 3, 54, 27, 0, 517, 515, + 1, 0, 0, 0, 517, 518, 1, 0, 0, 0, 518, 528, 1, 0, 0, 0, 519, 524, 3, 44, 22, + 0, 520, 521, 5, 34, 0, 0, 521, 523, 3, 62, 31, 0, 522, 520, 1, 0, 0, 0, 523, + 526, 1, 0, 0, 0, 524, 522, 1, 0, 0, 0, 524, 525, 1, 0, 0, 0, 525, 528, 1, 0, + 0, 0, 526, 524, 1, 0, 0, 0, 527, 514, 1, 0, 0, 0, 527, 519, 1, 0, 0, 0, 528, + 49, 1, 0, 0, 0, 529, 530, 5, 14, 0, 0, 530, 544, 3, 62, 31, 0, 531, 532, 5, + 14, 0, 0, 532, 533, 5, 26, 0, 0, 533, 538, 3, 62, 31, 0, 534, 535, 5, 34, 0, + 0, 535, 537, 3, 62, 31, 0, 536, 534, 1, 0, 0, 0, 537, 540, 1, 0, 0, 0, 538, 536, 1, 0, 0, 0, 538, 539, 1, 0, 0, 0, 539, 541, 1, 0, 0, 0, 540, 538, 1, 0, 0, 0, 541, 542, 5, 27, 0, 0, 542, 544, 1, 0, 0, 0, 543, 529, 1, 0, 0, 0, 543, 531, 1, 0, 0, 0, 544, 51, 1, 0, 0, 0, 545, 548, 3, 50, 25, 0, 546, 547, - 5, 36, 0, 0, 547, 549, 3, 54, 27, 0, 548, 546, 1, 0, 0, 0, 548, 549, 1, 0, - 0, 0, 549, 559, 1, 0, 0, 0, 550, 555, 3, 50, 25, 0, 551, 552, 5, 35, 0, 0, + 5, 64, 0, 0, 547, 549, 3, 54, 27, 0, 548, 546, 1, 0, 0, 0, 548, 549, 1, 0, + 0, 0, 549, 559, 1, 0, 0, 0, 550, 555, 3, 50, 25, 0, 551, 552, 5, 34, 0, 0, 552, 554, 3, 62, 31, 0, 553, 551, 1, 0, 0, 0, 554, 557, 1, 0, 0, 0, 555, 553, 1, 0, 0, 0, 555, 556, 1, 0, 0, 0, 556, 559, 1, 0, 0, 0, 557, 555, 1, 0, 0, 0, 558, 545, 1, 0, 0, 0, 558, 550, 1, 0, 0, 0, 559, 53, 1, 0, 0, 0, 560, @@ -3456,36 +3455,36 @@ export default class CircomParser extends Parser { 570, 5, 26, 0, 0, 569, 571, 3, 60, 30, 0, 570, 569, 1, 0, 0, 0, 570, 571, 1, 0, 0, 0, 571, 572, 1, 0, 0, 0, 572, 605, 5, 27, 0, 0, 573, 574, 5, 26, 0, 0, 574, 575, 5, 66, 0, 0, 575, 576, 5, 39, 0, 0, 576, 583, 3, 34, 17, 0, 577, - 578, 5, 35, 0, 0, 578, 579, 5, 66, 0, 0, 579, 580, 5, 39, 0, 0, 580, 582, 3, + 578, 5, 34, 0, 0, 578, 579, 5, 66, 0, 0, 579, 580, 5, 39, 0, 0, 580, 582, 3, 34, 17, 0, 581, 577, 1, 0, 0, 0, 582, 585, 1, 0, 0, 0, 583, 581, 1, 0, 0, 0, 583, 584, 1, 0, 0, 0, 584, 586, 1, 0, 0, 0, 585, 583, 1, 0, 0, 0, 586, 587, 5, 27, 0, 0, 587, 605, 1, 0, 0, 0, 588, 589, 5, 26, 0, 0, 589, 590, 3, 34, - 17, 0, 590, 591, 5, 40, 0, 0, 591, 599, 5, 66, 0, 0, 592, 593, 5, 35, 0, 0, + 17, 0, 590, 591, 5, 40, 0, 0, 591, 599, 5, 66, 0, 0, 592, 593, 5, 34, 0, 0, 593, 594, 3, 34, 17, 0, 594, 595, 5, 40, 0, 0, 595, 596, 5, 66, 0, 0, 596, 598, 1, 0, 0, 0, 597, 592, 1, 0, 0, 0, 598, 601, 1, 0, 0, 0, 599, 597, 1, 0, 0, 0, 599, 600, 1, 0, 0, 0, 600, 602, 1, 0, 0, 0, 601, 599, 1, 0, 0, 0, 602, 603, 5, 27, 0, 0, 603, 605, 1, 0, 0, 0, 604, 568, 1, 0, 0, 0, 604, 573, 1, - 0, 0, 0, 604, 588, 1, 0, 0, 0, 605, 57, 1, 0, 0, 0, 606, 608, 5, 25, 0, 0, + 0, 0, 0, 604, 588, 1, 0, 0, 0, 605, 57, 1, 0, 0, 0, 606, 608, 5, 8, 0, 0, 607, 606, 1, 0, 0, 0, 607, 608, 1, 0, 0, 0, 608, 609, 1, 0, 0, 0, 609, 610, 5, 66, 0, 0, 610, 612, 5, 26, 0, 0, 611, 613, 3, 60, 30, 0, 612, 611, 1, 0, 0, 0, 612, 613, 1, 0, 0, 0, 613, 614, 1, 0, 0, 0, 614, 616, 5, 27, 0, 0, 615, 617, 3, 56, 28, 0, 616, 615, 1, 0, 0, 0, 616, 617, 1, 0, 0, 0, 617, 59, - 1, 0, 0, 0, 618, 623, 3, 34, 17, 0, 619, 620, 5, 35, 0, 0, 620, 622, 3, 34, + 1, 0, 0, 0, 618, 623, 3, 34, 17, 0, 619, 620, 5, 34, 0, 0, 620, 622, 3, 34, 17, 0, 621, 619, 1, 0, 0, 0, 622, 625, 1, 0, 0, 0, 623, 621, 1, 0, 0, 0, 623, 624, 1, 0, 0, 0, 624, 61, 1, 0, 0, 0, 625, 623, 1, 0, 0, 0, 626, 630, 5, 66, 0, 0, 627, 629, 3, 64, 32, 0, 628, 627, 1, 0, 0, 0, 629, 632, 1, 0, 0, 0, 630, 628, 1, 0, 0, 0, 630, 631, 1, 0, 0, 0, 631, 635, 1, 0, 0, 0, 632, - 630, 1, 0, 0, 0, 633, 634, 5, 34, 0, 0, 634, 636, 5, 66, 0, 0, 635, 633, 1, + 630, 1, 0, 0, 0, 633, 634, 5, 33, 0, 0, 634, 636, 5, 66, 0, 0, 635, 633, 1, 0, 0, 0, 635, 636, 1, 0, 0, 0, 636, 640, 1, 0, 0, 0, 637, 639, 3, 64, 32, 0, 638, 637, 1, 0, 0, 0, 639, 642, 1, 0, 0, 0, 640, 638, 1, 0, 0, 0, 640, 641, 1, 0, 0, 0, 641, 63, 1, 0, 0, 0, 642, 640, 1, 0, 0, 0, 643, 644, 5, 28, 0, 0, 644, 645, 3, 34, 17, 0, 645, 646, 5, 29, 0, 0, 646, 65, 1, 0, 0, 0, 647, - 652, 5, 66, 0, 0, 648, 649, 5, 35, 0, 0, 649, 651, 5, 66, 0, 0, 650, 648, 1, + 652, 5, 66, 0, 0, 648, 649, 5, 34, 0, 0, 649, 651, 5, 66, 0, 0, 650, 648, 1, 0, 0, 0, 651, 654, 1, 0, 0, 0, 652, 650, 1, 0, 0, 0, 652, 653, 1, 0, 0, 0, 653, 67, 1, 0, 0, 0, 654, 652, 1, 0, 0, 0, 655, 660, 7, 9, 0, 0, 656, 657, - 5, 35, 0, 0, 657, 659, 7, 9, 0, 0, 658, 656, 1, 0, 0, 0, 659, 662, 1, 0, 0, + 5, 34, 0, 0, 657, 659, 7, 9, 0, 0, 658, 656, 1, 0, 0, 0, 659, 662, 1, 0, 0, 0, 660, 658, 1, 0, 0, 0, 660, 661, 1, 0, 0, 0, 661, 69, 1, 0, 0, 0, 662, - 660, 1, 0, 0, 0, 663, 668, 5, 67, 0, 0, 664, 665, 5, 35, 0, 0, 665, 667, 5, + 660, 1, 0, 0, 0, 663, 668, 5, 67, 0, 0, 664, 665, 5, 34, 0, 0, 665, 667, 5, 67, 0, 0, 666, 664, 1, 0, 0, 0, 667, 670, 1, 0, 0, 0, 668, 666, 1, 0, 0, 0, 668, 669, 1, 0, 0, 0, 669, 71, 1, 0, 0, 0, 670, 668, 1, 0, 0, 0, 68, 75, 81, 87, 91, 102, 110, 116, 125, 135, 157, 166, 189, 193, 196, 201, 210, 218, @@ -3565,18 +3564,18 @@ export class CircuitContext extends ParserRuleContext { public get ruleIndex(): number { return CircomParser.RULE_circuit; } - public enterRule(listener: CircomListener): void { + public enterRule(listener: CircomParserListener): void { if (listener.enterCircuit) { listener.enterCircuit(this); } } - public exitRule(listener: CircomListener): void { + public exitRule(listener: CircomParserListener): void { if (listener.exitCircuit) { listener.exitCircuit(this); } } // @Override - public accept(visitor: CircomVisitor): Result { + public accept(visitor: CircomParserVisitor): Result { if (visitor.visitCircuit) { return visitor.visitCircuit(this); } else { @@ -3612,18 +3611,18 @@ export class PragmaDeclarationContext extends ParserRuleContext { public get ruleIndex(): number { return CircomParser.RULE_pragmaDeclaration; } - public enterRule(listener: CircomListener): void { + public enterRule(listener: CircomParserListener): void { if (listener.enterPragmaDeclaration) { listener.enterPragmaDeclaration(this); } } - public exitRule(listener: CircomListener): void { + public exitRule(listener: CircomParserListener): void { if (listener.exitPragmaDeclaration) { listener.exitPragmaDeclaration(this); } } // @Override - public accept(visitor: CircomVisitor): Result { + public accept(visitor: CircomParserVisitor): Result { if (visitor.visitPragmaDeclaration) { return visitor.visitPragmaDeclaration(this); } else { @@ -3653,18 +3652,18 @@ export class IncludeDeclarationContext extends ParserRuleContext { public get ruleIndex(): number { return CircomParser.RULE_includeDeclaration; } - public enterRule(listener: CircomListener): void { + public enterRule(listener: CircomParserListener): void { if (listener.enterIncludeDeclaration) { listener.enterIncludeDeclaration(this); } } - public exitRule(listener: CircomListener): void { + public exitRule(listener: CircomParserListener): void { if (listener.exitIncludeDeclaration) { listener.exitIncludeDeclaration(this); } } // @Override - public accept(visitor: CircomVisitor): Result { + public accept(visitor: CircomParserVisitor): Result { if (visitor.visitIncludeDeclaration) { return visitor.visitIncludeDeclaration(this); } else { @@ -3697,18 +3696,18 @@ export class BlockDeclarationContext extends ParserRuleContext { public get ruleIndex(): number { return CircomParser.RULE_blockDeclaration; } - public enterRule(listener: CircomListener): void { + public enterRule(listener: CircomParserListener): void { if (listener.enterBlockDeclaration) { listener.enterBlockDeclaration(this); } } - public exitRule(listener: CircomListener): void { + public exitRule(listener: CircomParserListener): void { if (listener.exitBlockDeclaration) { listener.exitBlockDeclaration(this); } } // @Override - public accept(visitor: CircomVisitor): Result { + public accept(visitor: CircomParserVisitor): Result { if (visitor.visitBlockDeclaration) { return visitor.visitBlockDeclaration(this); } else { @@ -3750,18 +3749,18 @@ export class FunctionDeclarationContext extends ParserRuleContext { public get ruleIndex(): number { return CircomParser.RULE_functionDeclaration; } - public enterRule(listener: CircomListener): void { + public enterRule(listener: CircomParserListener): void { if (listener.enterFunctionDeclaration) { listener.enterFunctionDeclaration(this); } } - public exitRule(listener: CircomListener): void { + public exitRule(listener: CircomParserListener): void { if (listener.exitFunctionDeclaration) { listener.exitFunctionDeclaration(this); } } // @Override - public accept(visitor: CircomVisitor): Result { + public accept(visitor: CircomParserVisitor): Result { if (visitor.visitFunctionDeclaration) { return visitor.visitFunctionDeclaration(this); } else { @@ -3799,18 +3798,18 @@ export class FunctionBlockContext extends ParserRuleContext { public get ruleIndex(): number { return CircomParser.RULE_functionBlock; } - public enterRule(listener: CircomListener): void { + public enterRule(listener: CircomParserListener): void { if (listener.enterFunctionBlock) { listener.enterFunctionBlock(this); } } - public exitRule(listener: CircomListener): void { + public exitRule(listener: CircomParserListener): void { if (listener.exitFunctionBlock) { listener.exitFunctionBlock(this); } } // @Override - public accept(visitor: CircomVisitor): Result { + public accept(visitor: CircomParserVisitor): Result { if (visitor.visitFunctionBlock) { return visitor.visitFunctionBlock(this); } else { @@ -3858,18 +3857,18 @@ export class ForFuncStmtContext extends FunctionStmtContext { 0, ) as FunctionStmtContext; } - public enterRule(listener: CircomListener): void { + public enterRule(listener: CircomParserListener): void { if (listener.enterForFuncStmt) { listener.enterForFuncStmt(this); } } - public exitRule(listener: CircomListener): void { + public exitRule(listener: CircomParserListener): void { if (listener.exitForFuncStmt) { listener.exitForFuncStmt(this); } } // @Override - public accept(visitor: CircomVisitor): Result { + public accept(visitor: CircomParserVisitor): Result { if (visitor.visitForFuncStmt) { return visitor.visitForFuncStmt(this); } else { @@ -3888,18 +3887,18 @@ export class LogFuncStmtContext extends FunctionStmtContext { public SEMICOLON(): TerminalNode { return this.getToken(CircomParser.SEMICOLON, 0); } - public enterRule(listener: CircomListener): void { + public enterRule(listener: CircomParserListener): void { if (listener.enterLogFuncStmt) { listener.enterLogFuncStmt(this); } } - public exitRule(listener: CircomListener): void { + public exitRule(listener: CircomParserListener): void { if (listener.exitLogFuncStmt) { listener.exitLogFuncStmt(this); } } // @Override - public accept(visitor: CircomVisitor): Result { + public accept(visitor: CircomParserVisitor): Result { if (visitor.visitLogFuncStmt) { return visitor.visitLogFuncStmt(this); } else { @@ -3921,18 +3920,18 @@ export class FuncVarDeclarationContext extends FunctionStmtContext { public SEMICOLON(): TerminalNode { return this.getToken(CircomParser.SEMICOLON, 0); } - public enterRule(listener: CircomListener): void { + public enterRule(listener: CircomParserListener): void { if (listener.enterFuncVarDeclaration) { listener.enterFuncVarDeclaration(this); } } - public exitRule(listener: CircomListener): void { + public exitRule(listener: CircomParserListener): void { if (listener.exitFuncVarDeclaration) { listener.exitFuncVarDeclaration(this); } } // @Override - public accept(visitor: CircomVisitor): Result { + public accept(visitor: CircomParserVisitor): Result { if (visitor.visitFuncVarDeclaration) { return visitor.visitFuncVarDeclaration(this); } else { @@ -3957,18 +3956,18 @@ export class AssertFuncStmtContext extends FunctionStmtContext { public SEMICOLON(): TerminalNode { return this.getToken(CircomParser.SEMICOLON, 0); } - public enterRule(listener: CircomListener): void { + public enterRule(listener: CircomParserListener): void { if (listener.enterAssertFuncStmt) { listener.enterAssertFuncStmt(this); } } - public exitRule(listener: CircomListener): void { + public exitRule(listener: CircomParserListener): void { if (listener.exitAssertFuncStmt) { listener.exitAssertFuncStmt(this); } } // @Override - public accept(visitor: CircomVisitor): Result { + public accept(visitor: CircomParserVisitor): Result { if (visitor.visitAssertFuncStmt) { return visitor.visitAssertFuncStmt(this); } else { @@ -3987,18 +3986,18 @@ export class FuncBlockContext extends FunctionStmtContext { 0, ) as FunctionBlockContext; } - public enterRule(listener: CircomListener): void { + public enterRule(listener: CircomParserListener): void { if (listener.enterFuncBlock) { listener.enterFuncBlock(this); } } - public exitRule(listener: CircomListener): void { + public exitRule(listener: CircomParserListener): void { if (listener.exitFuncBlock) { listener.exitFuncBlock(this); } } // @Override - public accept(visitor: CircomVisitor): Result { + public accept(visitor: CircomParserVisitor): Result { if (visitor.visitFuncBlock) { return visitor.visitFuncBlock(this); } else { @@ -4031,18 +4030,18 @@ export class FuncSelfOpContext extends FunctionStmtContext { i, ) as ArrayDimensionContext; } - public enterRule(listener: CircomListener): void { + public enterRule(listener: CircomParserListener): void { if (listener.enterFuncSelfOp) { listener.enterFuncSelfOp(this); } } - public exitRule(listener: CircomListener): void { + public exitRule(listener: CircomParserListener): void { if (listener.exitFuncSelfOp) { listener.exitFuncSelfOp(this); } } // @Override - public accept(visitor: CircomVisitor): Result { + public accept(visitor: CircomParserVisitor): Result { if (visitor.visitFuncSelfOp) { return visitor.visitFuncSelfOp(this); } else { @@ -4078,18 +4077,18 @@ export class IfFuncStmtContext extends FunctionStmtContext { public ELSE(): TerminalNode { return this.getToken(CircomParser.ELSE, 0); } - public enterRule(listener: CircomListener): void { + public enterRule(listener: CircomParserListener): void { if (listener.enterIfFuncStmt) { listener.enterIfFuncStmt(this); } } - public exitRule(listener: CircomListener): void { + public exitRule(listener: CircomParserListener): void { if (listener.exitIfFuncStmt) { listener.exitIfFuncStmt(this); } } // @Override - public accept(visitor: CircomVisitor): Result { + public accept(visitor: CircomParserVisitor): Result { if (visitor.visitIfFuncStmt) { return visitor.visitIfFuncStmt(this); } else { @@ -4117,18 +4116,18 @@ export class WhileFuncStmtContext extends FunctionStmtContext { 0, ) as FunctionStmtContext; } - public enterRule(listener: CircomListener): void { + public enterRule(listener: CircomParserListener): void { if (listener.enterWhileFuncStmt) { listener.enterWhileFuncStmt(this); } } - public exitRule(listener: CircomListener): void { + public exitRule(listener: CircomParserListener): void { if (listener.exitWhileFuncStmt) { listener.exitWhileFuncStmt(this); } } // @Override - public accept(visitor: CircomVisitor): Result { + public accept(visitor: CircomParserVisitor): Result { if (visitor.visitWhileFuncStmt) { return visitor.visitWhileFuncStmt(this); } else { @@ -4150,18 +4149,18 @@ export class ReturnFuncStmtContext extends FunctionStmtContext { public SEMICOLON(): TerminalNode { return this.getToken(CircomParser.SEMICOLON, 0); } - public enterRule(listener: CircomListener): void { + public enterRule(listener: CircomParserListener): void { if (listener.enterReturnFuncStmt) { listener.enterReturnFuncStmt(this); } } - public exitRule(listener: CircomListener): void { + public exitRule(listener: CircomParserListener): void { if (listener.exitReturnFuncStmt) { listener.exitReturnFuncStmt(this); } } // @Override - public accept(visitor: CircomVisitor): Result { + public accept(visitor: CircomParserVisitor): Result { if (visitor.visitReturnFuncStmt) { return visitor.visitReturnFuncStmt(this); } else { @@ -4207,18 +4206,18 @@ export class FuncVariadicAssignmentContext extends FunctionStmtContext { public expression(): ExpressionContext { return this.getTypedRuleContext(ExpressionContext, 0) as ExpressionContext; } - public enterRule(listener: CircomListener): void { + public enterRule(listener: CircomParserListener): void { if (listener.enterFuncVariadicAssignment) { listener.enterFuncVariadicAssignment(this); } } - public exitRule(listener: CircomListener): void { + public exitRule(listener: CircomParserListener): void { if (listener.exitFuncVariadicAssignment) { listener.exitFuncVariadicAssignment(this); } } // @Override - public accept(visitor: CircomVisitor): Result { + public accept(visitor: CircomParserVisitor): Result { if (visitor.visitFuncVariadicAssignment) { return visitor.visitFuncVariadicAssignment(this); } else { @@ -4243,21 +4242,21 @@ export class FuncAssignmentExpressionContext extends FunctionStmtContext { public ASSIGNMENT(): TerminalNode { return this.getToken(CircomParser.ASSIGNMENT, 0); } - public ASSIGNMENT_OP(): TerminalNode { - return this.getToken(CircomParser.ASSIGNMENT_OP, 0); + public ASSIGNMENT_WITH_OP(): TerminalNode { + return this.getToken(CircomParser.ASSIGNMENT_WITH_OP, 0); } - public enterRule(listener: CircomListener): void { + public enterRule(listener: CircomParserListener): void { if (listener.enterFuncAssignmentExpression) { listener.enterFuncAssignmentExpression(this); } } - public exitRule(listener: CircomListener): void { + public exitRule(listener: CircomParserListener): void { if (listener.exitFuncAssignmentExpression) { listener.exitFuncAssignmentExpression(this); } } // @Override - public accept(visitor: CircomVisitor): Result { + public accept(visitor: CircomParserVisitor): Result { if (visitor.visitFuncAssignmentExpression) { return visitor.visitFuncAssignmentExpression(this); } else { @@ -4305,18 +4304,18 @@ export class TemplateDeclarationContext extends ParserRuleContext { public get ruleIndex(): number { return CircomParser.RULE_templateDeclaration; } - public enterRule(listener: CircomListener): void { + public enterRule(listener: CircomParserListener): void { if (listener.enterTemplateDeclaration) { listener.enterTemplateDeclaration(this); } } - public exitRule(listener: CircomListener): void { + public exitRule(listener: CircomParserListener): void { if (listener.exitTemplateDeclaration) { listener.exitTemplateDeclaration(this); } } // @Override - public accept(visitor: CircomVisitor): Result { + public accept(visitor: CircomParserVisitor): Result { if (visitor.visitTemplateDeclaration) { return visitor.visitTemplateDeclaration(this); } else { @@ -4354,18 +4353,18 @@ export class TemplateBlockContext extends ParserRuleContext { public get ruleIndex(): number { return CircomParser.RULE_templateBlock; } - public enterRule(listener: CircomListener): void { + public enterRule(listener: CircomParserListener): void { if (listener.enterTemplateBlock) { listener.enterTemplateBlock(this); } } - public exitRule(listener: CircomListener): void { + public exitRule(listener: CircomParserListener): void { if (listener.exitTemplateBlock) { listener.exitTemplateBlock(this); } } // @Override - public accept(visitor: CircomVisitor): Result { + public accept(visitor: CircomParserVisitor): Result { if (visitor.visitTemplateBlock) { return visitor.visitTemplateBlock(this); } else { @@ -4419,18 +4418,18 @@ export class ComponentMainDeclarationContext extends ParserRuleContext { public get ruleIndex(): number { return CircomParser.RULE_componentMainDeclaration; } - public enterRule(listener: CircomListener): void { + public enterRule(listener: CircomParserListener): void { if (listener.enterComponentMainDeclaration) { listener.enterComponentMainDeclaration(this); } } - public exitRule(listener: CircomListener): void { + public exitRule(listener: CircomParserListener): void { if (listener.exitComponentMainDeclaration) { listener.exitComponentMainDeclaration(this); } } // @Override - public accept(visitor: CircomVisitor): Result { + public accept(visitor: CircomParserVisitor): Result { if (visitor.visitComponentMainDeclaration) { return visitor.visitComponentMainDeclaration(this); } else { @@ -4469,18 +4468,18 @@ export class PublicInputsListContext extends ParserRuleContext { public get ruleIndex(): number { return CircomParser.RULE_publicInputsList; } - public enterRule(listener: CircomListener): void { + public enterRule(listener: CircomParserListener): void { if (listener.enterPublicInputsList) { listener.enterPublicInputsList(this); } } - public exitRule(listener: CircomListener): void { + public exitRule(listener: CircomParserListener): void { if (listener.exitPublicInputsList) { listener.exitPublicInputsList(this); } } // @Override - public accept(visitor: CircomVisitor): Result { + public accept(visitor: CircomParserVisitor): Result { if (visitor.visitPublicInputsList) { return visitor.visitPublicInputsList(this); } else { @@ -4560,8 +4559,8 @@ export class TemplateStmtContext extends ParserRuleContext { public expression(i: number): ExpressionContext { return this.getTypedRuleContext(ExpressionContext, i) as ExpressionContext; } - public CONSTRAINT_EQ(): TerminalNode { - return this.getToken(CircomParser.CONSTRAINT_EQ, 0); + public EQ_CONSTRAINT(): TerminalNode { + return this.getToken(CircomParser.EQ_CONSTRAINT, 0); } public element_list(): ElementContext[] { return this.getTypedRuleContexts(ElementContext) as ElementContext[]; @@ -4569,11 +4568,11 @@ export class TemplateStmtContext extends ParserRuleContext { public element(i: number): ElementContext { return this.getTypedRuleContext(ElementContext, i) as ElementContext; } - public LEFT_ASSIGNMENT(): TerminalNode { - return this.getToken(CircomParser.LEFT_ASSIGNMENT, 0); + public LEFT_CONSTRAINT(): TerminalNode { + return this.getToken(CircomParser.LEFT_CONSTRAINT, 0); } - public ASSIGNMENT_OP(): TerminalNode { - return this.getToken(CircomParser.ASSIGNMENT_OP, 0); + public ASSIGNMENT_WITH_OP(): TerminalNode { + return this.getToken(CircomParser.ASSIGNMENT_WITH_OP, 0); } public LP_list(): TerminalNode[] { return this.getTokens(CircomParser.LP); @@ -4593,8 +4592,8 @@ export class TemplateStmtContext extends ParserRuleContext { public COMMA(i: number): TerminalNode { return this.getToken(CircomParser.COMMA, i); } - public RIGHT_ASSIGNMENT(): TerminalNode { - return this.getToken(CircomParser.RIGHT_ASSIGNMENT, 0); + public RIGHT_CONSTRAINT(): TerminalNode { + return this.getToken(CircomParser.RIGHT_CONSTRAINT, 0); } public UNDERSCORE(): TerminalNode { return this.getToken(CircomParser.UNDERSCORE, 0); @@ -4652,18 +4651,18 @@ export class TemplateStmtContext extends ParserRuleContext { public get ruleIndex(): number { return CircomParser.RULE_templateStmt; } - public enterRule(listener: CircomListener): void { + public enterRule(listener: CircomParserListener): void { if (listener.enterTemplateStmt) { listener.enterTemplateStmt(this); } } - public exitRule(listener: CircomListener): void { + public exitRule(listener: CircomParserListener): void { if (listener.exitTemplateStmt) { listener.exitTemplateStmt(this); } } // @Override - public accept(visitor: CircomVisitor): Result { + public accept(visitor: CircomParserVisitor): Result { if (visitor.visitTemplateStmt) { return visitor.visitTemplateStmt(this); } else { @@ -4693,18 +4692,18 @@ export class ElementContext extends ParserRuleContext { public get ruleIndex(): number { return CircomParser.RULE_element; } - public enterRule(listener: CircomListener): void { + public enterRule(listener: CircomParserListener): void { if (listener.enterElement) { listener.enterElement(this); } } - public exitRule(listener: CircomListener): void { + public exitRule(listener: CircomParserListener): void { if (listener.exitElement) { listener.exitElement(this); } } // @Override - public accept(visitor: CircomVisitor): Result { + public accept(visitor: CircomParserVisitor): Result { if (visitor.visitElement) { return visitor.visitElement(this); } else { @@ -4740,18 +4739,18 @@ export class ForControlContext extends ParserRuleContext { public get ruleIndex(): number { return CircomParser.RULE_forControl; } - public enterRule(listener: CircomListener): void { + public enterRule(listener: CircomParserListener): void { if (listener.enterForControl) { listener.enterForControl(this); } } - public exitRule(listener: CircomListener): void { + public exitRule(listener: CircomParserListener): void { if (listener.exitForControl) { listener.exitForControl(this); } } // @Override - public accept(visitor: CircomVisitor): Result { + public accept(visitor: CircomParserVisitor): Result { if (visitor.visitForControl) { return visitor.visitForControl(this); } else { @@ -4784,18 +4783,18 @@ export class ForInitContext extends ParserRuleContext { public get ruleIndex(): number { return CircomParser.RULE_forInit; } - public enterRule(listener: CircomListener): void { + public enterRule(listener: CircomParserListener): void { if (listener.enterForInit) { listener.enterForInit(this); } } - public exitRule(listener: CircomListener): void { + public exitRule(listener: CircomParserListener): void { if (listener.exitForInit) { listener.exitForInit(this); } } // @Override - public accept(visitor: CircomVisitor): Result { + public accept(visitor: CircomParserVisitor): Result { if (visitor.visitForInit) { return visitor.visitForInit(this); } else { @@ -4825,24 +4824,24 @@ export class ForUpdateContext extends ParserRuleContext { public ASSIGNMENT(): TerminalNode { return this.getToken(CircomParser.ASSIGNMENT, 0); } - public ASSIGNMENT_OP(): TerminalNode { - return this.getToken(CircomParser.ASSIGNMENT_OP, 0); + public ASSIGNMENT_WITH_OP(): TerminalNode { + return this.getToken(CircomParser.ASSIGNMENT_WITH_OP, 0); } public get ruleIndex(): number { return CircomParser.RULE_forUpdate; } - public enterRule(listener: CircomListener): void { + public enterRule(listener: CircomParserListener): void { if (listener.enterForUpdate) { listener.enterForUpdate(this); } } - public exitRule(listener: CircomListener): void { + public exitRule(listener: CircomParserListener): void { if (listener.exitForUpdate) { listener.exitForUpdate(this); } } // @Override - public accept(visitor: CircomVisitor): Result { + public accept(visitor: CircomParserVisitor): Result { if (visitor.visitForUpdate) { return visitor.visitForUpdate(this); } else { @@ -4872,18 +4871,18 @@ export class ParExpressionContext extends ParserRuleContext { public get ruleIndex(): number { return CircomParser.RULE_parExpression; } - public enterRule(listener: CircomListener): void { + public enterRule(listener: CircomParserListener): void { if (listener.enterParExpression) { listener.enterParExpression(this); } } - public exitRule(listener: CircomListener): void { + public exitRule(listener: CircomParserListener): void { if (listener.exitParExpression) { listener.exitParExpression(this); } } // @Override - public accept(visitor: CircomVisitor): Result { + public accept(visitor: CircomParserVisitor): Result { if (visitor.visitParExpression) { return visitor.visitParExpression(this); } else { @@ -4919,24 +4918,24 @@ export class TernaryExpressionContext extends ExpressionContext { public expression(i: number): ExpressionContext { return this.getTypedRuleContext(ExpressionContext, i) as ExpressionContext; } - public QUESTION_MARK(): TerminalNode { - return this.getToken(CircomParser.QUESTION_MARK, 0); + public TERNARY_CONDITION(): TerminalNode { + return this.getToken(CircomParser.TERNARY_CONDITION, 0); } - public COLON(): TerminalNode { - return this.getToken(CircomParser.COLON, 0); + public TERNARY_ALTERNATIVE(): TerminalNode { + return this.getToken(CircomParser.TERNARY_ALTERNATIVE, 0); } - public enterRule(listener: CircomListener): void { + public enterRule(listener: CircomParserListener): void { if (listener.enterTernaryExpression) { listener.enterTernaryExpression(this); } } - public exitRule(listener: CircomListener): void { + public exitRule(listener: CircomParserListener): void { if (listener.exitTernaryExpression) { listener.exitTernaryExpression(this); } } // @Override - public accept(visitor: CircomVisitor): Result { + public accept(visitor: CircomParserVisitor): Result { if (visitor.visitTernaryExpression) { return visitor.visitTernaryExpression(this); } else { @@ -4967,18 +4966,18 @@ export class DotExpressionContext extends ExpressionContext { public RB(): TerminalNode { return this.getToken(CircomParser.RB, 0); } - public enterRule(listener: CircomListener): void { + public enterRule(listener: CircomParserListener): void { if (listener.enterDotExpression) { listener.enterDotExpression(this); } } - public exitRule(listener: CircomListener): void { + public exitRule(listener: CircomParserListener): void { if (listener.exitDotExpression) { listener.exitDotExpression(this); } } // @Override - public accept(visitor: CircomVisitor): Result { + public accept(visitor: CircomParserVisitor): Result { if (visitor.visitDotExpression) { return visitor.visitDotExpression(this); } else { @@ -4994,18 +4993,18 @@ export class PrimaryExpressionContext extends ExpressionContext { public primary(): PrimaryContext { return this.getTypedRuleContext(PrimaryContext, 0) as PrimaryContext; } - public enterRule(listener: CircomListener): void { + public enterRule(listener: CircomParserListener): void { if (listener.enterPrimaryExpression) { listener.enterPrimaryExpression(this); } } - public exitRule(listener: CircomListener): void { + public exitRule(listener: CircomParserListener): void { if (listener.exitPrimaryExpression) { listener.exitPrimaryExpression(this); } } // @Override - public accept(visitor: CircomVisitor): Result { + public accept(visitor: CircomParserVisitor): Result { if (visitor.visitPrimaryExpression) { return visitor.visitPrimaryExpression(this); } else { @@ -5085,18 +5084,18 @@ export class BinaryExpressionContext extends ExpressionContext { public OR(): TerminalNode { return this.getToken(CircomParser.OR, 0); } - public enterRule(listener: CircomListener): void { + public enterRule(listener: CircomParserListener): void { if (listener.enterBinaryExpression) { listener.enterBinaryExpression(this); } } - public exitRule(listener: CircomListener): void { + public exitRule(listener: CircomParserListener): void { if (listener.exitBinaryExpression) { listener.exitBinaryExpression(this); } } // @Override - public accept(visitor: CircomVisitor): Result { + public accept(visitor: CircomParserVisitor): Result { if (visitor.visitBinaryExpression) { return visitor.visitBinaryExpression(this); } else { @@ -5115,18 +5114,18 @@ export class BlockInstantiationExpressionContext extends ExpressionContext { 0, ) as BlockInstantiationContext; } - public enterRule(listener: CircomListener): void { + public enterRule(listener: CircomParserListener): void { if (listener.enterBlockInstantiationExpression) { listener.enterBlockInstantiationExpression(this); } } - public exitRule(listener: CircomListener): void { + public exitRule(listener: CircomParserListener): void { if (listener.exitBlockInstantiationExpression) { listener.exitBlockInstantiationExpression(this); } } // @Override - public accept(visitor: CircomVisitor): Result { + public accept(visitor: CircomParserVisitor): Result { if (visitor.visitBlockInstantiationExpression) { return visitor.visitBlockInstantiationExpression(this); } else { @@ -5152,18 +5151,18 @@ export class UnaryExpressionContext extends ExpressionContext { public SUB(): TerminalNode { return this.getToken(CircomParser.SUB, 0); } - public enterRule(listener: CircomListener): void { + public enterRule(listener: CircomParserListener): void { if (listener.enterUnaryExpression) { listener.enterUnaryExpression(this); } } - public exitRule(listener: CircomListener): void { + public exitRule(listener: CircomParserListener): void { if (listener.exitUnaryExpression) { listener.exitUnaryExpression(this); } } // @Override - public accept(visitor: CircomVisitor): Result { + public accept(visitor: CircomParserVisitor): Result { if (visitor.visitUnaryExpression) { return visitor.visitUnaryExpression(this); } else { @@ -5220,18 +5219,18 @@ export class PrimaryContext extends ParserRuleContext { public get ruleIndex(): number { return CircomParser.RULE_primary; } - public enterRule(listener: CircomListener): void { + public enterRule(listener: CircomParserListener): void { if (listener.enterPrimary) { listener.enterPrimary(this); } } - public exitRule(listener: CircomListener): void { + public exitRule(listener: CircomParserListener): void { if (listener.exitPrimary) { listener.exitPrimary(this); } } // @Override - public accept(visitor: CircomVisitor): Result { + public accept(visitor: CircomParserVisitor): Result { if (visitor.visitPrimary) { return visitor.visitPrimary(this); } else { @@ -5279,18 +5278,18 @@ export class LogStmtContext extends ParserRuleContext { public get ruleIndex(): number { return CircomParser.RULE_logStmt; } - public enterRule(listener: CircomListener): void { + public enterRule(listener: CircomParserListener): void { if (listener.enterLogStmt) { listener.enterLogStmt(this); } } - public exitRule(listener: CircomListener): void { + public exitRule(listener: CircomParserListener): void { if (listener.exitLogStmt) { listener.exitLogStmt(this); } } // @Override - public accept(visitor: CircomVisitor): Result { + public accept(visitor: CircomParserVisitor): Result { if (visitor.visitLogStmt) { return visitor.visitLogStmt(this); } else { @@ -5317,18 +5316,18 @@ export class ComponentDefinitionContext extends ParserRuleContext { public get ruleIndex(): number { return CircomParser.RULE_componentDefinition; } - public enterRule(listener: CircomListener): void { + public enterRule(listener: CircomParserListener): void { if (listener.enterComponentDefinition) { listener.enterComponentDefinition(this); } } - public exitRule(listener: CircomListener): void { + public exitRule(listener: CircomParserListener): void { if (listener.exitComponentDefinition) { listener.exitComponentDefinition(this); } } // @Override - public accept(visitor: CircomVisitor): Result { + public accept(visitor: CircomParserVisitor): Result { if (visitor.visitComponentDefinition) { return visitor.visitComponentDefinition(this); } else { @@ -5375,18 +5374,18 @@ export class ComponentDeclarationContext extends ParserRuleContext { public get ruleIndex(): number { return CircomParser.RULE_componentDeclaration; } - public enterRule(listener: CircomListener): void { + public enterRule(listener: CircomParserListener): void { if (listener.enterComponentDeclaration) { listener.enterComponentDeclaration(this); } } - public exitRule(listener: CircomListener): void { + public exitRule(listener: CircomParserListener): void { if (listener.exitComponentDeclaration) { listener.exitComponentDeclaration(this); } } // @Override - public accept(visitor: CircomVisitor): Result { + public accept(visitor: CircomParserVisitor): Result { if (visitor.visitComponentDeclaration) { return visitor.visitComponentDeclaration(this); } else { @@ -5419,18 +5418,18 @@ export class SignalDefinitionContext extends ParserRuleContext { public get ruleIndex(): number { return CircomParser.RULE_signalDefinition; } - public enterRule(listener: CircomListener): void { + public enterRule(listener: CircomParserListener): void { if (listener.enterSignalDefinition) { listener.enterSignalDefinition(this); } } - public exitRule(listener: CircomListener): void { + public exitRule(listener: CircomParserListener): void { if (listener.exitSignalDefinition) { listener.exitSignalDefinition(this); } } // @Override - public accept(visitor: CircomVisitor): Result { + public accept(visitor: CircomParserVisitor): Result { if (visitor.visitSignalDefinition) { return visitor.visitSignalDefinition(this); } else { @@ -5460,18 +5459,18 @@ export class TagListContext extends ParserRuleContext { public get ruleIndex(): number { return CircomParser.RULE_tagList; } - public enterRule(listener: CircomListener): void { + public enterRule(listener: CircomParserListener): void { if (listener.enterTagList) { listener.enterTagList(this); } } - public exitRule(listener: CircomListener): void { + public exitRule(listener: CircomParserListener): void { if (listener.exitTagList) { listener.exitTagList(this); } } // @Override - public accept(visitor: CircomVisitor): Result { + public accept(visitor: CircomParserVisitor): Result { if (visitor.visitTagList) { return visitor.visitTagList(this); } else { @@ -5495,8 +5494,8 @@ export class SignalDeclarationContext extends ParserRuleContext { 0, ) as SignalDefinitionContext; } - public LEFT_ASSIGNMENT(): TerminalNode { - return this.getToken(CircomParser.LEFT_ASSIGNMENT, 0); + public LEFT_CONSTRAINT(): TerminalNode { + return this.getToken(CircomParser.LEFT_CONSTRAINT, 0); } public rhsValue(): RhsValueContext { return this.getTypedRuleContext(RhsValueContext, 0) as RhsValueContext; @@ -5516,18 +5515,18 @@ export class SignalDeclarationContext extends ParserRuleContext { public get ruleIndex(): number { return CircomParser.RULE_signalDeclaration; } - public enterRule(listener: CircomListener): void { + public enterRule(listener: CircomParserListener): void { if (listener.enterSignalDeclaration) { listener.enterSignalDeclaration(this); } } - public exitRule(listener: CircomListener): void { + public exitRule(listener: CircomParserListener): void { if (listener.exitSignalDeclaration) { listener.exitSignalDeclaration(this); } } // @Override - public accept(visitor: CircomVisitor): Result { + public accept(visitor: CircomParserVisitor): Result { if (visitor.visitSignalDeclaration) { return visitor.visitSignalDeclaration(this); } else { @@ -5569,18 +5568,18 @@ export class VarDefinitionContext extends ParserRuleContext { public get ruleIndex(): number { return CircomParser.RULE_varDefinition; } - public enterRule(listener: CircomListener): void { + public enterRule(listener: CircomParserListener): void { if (listener.enterVarDefinition) { listener.enterVarDefinition(this); } } - public exitRule(listener: CircomListener): void { + public exitRule(listener: CircomParserListener): void { if (listener.exitVarDefinition) { listener.exitVarDefinition(this); } } // @Override - public accept(visitor: CircomVisitor): Result { + public accept(visitor: CircomParserVisitor): Result { if (visitor.visitVarDefinition) { return visitor.visitVarDefinition(this); } else { @@ -5625,18 +5624,18 @@ export class VarDeclarationContext extends ParserRuleContext { public get ruleIndex(): number { return CircomParser.RULE_varDeclaration; } - public enterRule(listener: CircomListener): void { + public enterRule(listener: CircomParserListener): void { if (listener.enterVarDeclaration) { listener.enterVarDeclaration(this); } } - public exitRule(listener: CircomListener): void { + public exitRule(listener: CircomParserListener): void { if (listener.exitVarDeclaration) { listener.exitVarDeclaration(this); } } // @Override - public accept(visitor: CircomVisitor): Result { + public accept(visitor: CircomParserVisitor): Result { if (visitor.visitVarDeclaration) { return visitor.visitVarDeclaration(this); } else { @@ -5678,18 +5677,18 @@ export class RhsValueContext extends ParserRuleContext { public get ruleIndex(): number { return CircomParser.RULE_rhsValue; } - public enterRule(listener: CircomListener): void { + public enterRule(listener: CircomParserListener): void { if (listener.enterRhsValue) { listener.enterRhsValue(this); } } - public exitRule(listener: CircomListener): void { + public exitRule(listener: CircomParserListener): void { if (listener.exitRhsValue) { listener.exitRhsValue(this); } } // @Override - public accept(visitor: CircomVisitor): Result { + public accept(visitor: CircomParserVisitor): Result { if (visitor.visitRhsValue) { return visitor.visitRhsValue(this); } else { @@ -5725,11 +5724,11 @@ export class ComponentCallContext extends ParserRuleContext { public ID(i: number): TerminalNode { return this.getToken(CircomParser.ID, i); } - public LEFT_ASSIGNMENT_list(): TerminalNode[] { - return this.getTokens(CircomParser.LEFT_ASSIGNMENT); + public LEFT_CONSTRAINT_list(): TerminalNode[] { + return this.getTokens(CircomParser.LEFT_CONSTRAINT); } - public LEFT_ASSIGNMENT(i: number): TerminalNode { - return this.getToken(CircomParser.LEFT_ASSIGNMENT, i); + public LEFT_CONSTRAINT(i: number): TerminalNode { + return this.getToken(CircomParser.LEFT_CONSTRAINT, i); } public expression_list(): ExpressionContext[] { return this.getTypedRuleContexts(ExpressionContext) as ExpressionContext[]; @@ -5743,27 +5742,27 @@ export class ComponentCallContext extends ParserRuleContext { public COMMA(i: number): TerminalNode { return this.getToken(CircomParser.COMMA, i); } - public RIGHT_ASSIGNMENT_list(): TerminalNode[] { - return this.getTokens(CircomParser.RIGHT_ASSIGNMENT); + public RIGHT_CONSTRAINT_list(): TerminalNode[] { + return this.getTokens(CircomParser.RIGHT_CONSTRAINT); } - public RIGHT_ASSIGNMENT(i: number): TerminalNode { - return this.getToken(CircomParser.RIGHT_ASSIGNMENT, i); + public RIGHT_CONSTRAINT(i: number): TerminalNode { + return this.getToken(CircomParser.RIGHT_CONSTRAINT, i); } public get ruleIndex(): number { return CircomParser.RULE_componentCall; } - public enterRule(listener: CircomListener): void { + public enterRule(listener: CircomParserListener): void { if (listener.enterComponentCall) { listener.enterComponentCall(this); } } - public exitRule(listener: CircomListener): void { + public exitRule(listener: CircomParserListener): void { if (listener.exitComponentCall) { listener.exitComponentCall(this); } } // @Override - public accept(visitor: CircomVisitor): Result { + public accept(visitor: CircomParserVisitor): Result { if (visitor.visitComponentCall) { return visitor.visitComponentCall(this); } else { @@ -5808,18 +5807,18 @@ export class BlockInstantiationContext extends ParserRuleContext { public get ruleIndex(): number { return CircomParser.RULE_blockInstantiation; } - public enterRule(listener: CircomListener): void { + public enterRule(listener: CircomParserListener): void { if (listener.enterBlockInstantiation) { listener.enterBlockInstantiation(this); } } - public exitRule(listener: CircomListener): void { + public exitRule(listener: CircomParserListener): void { if (listener.exitBlockInstantiation) { listener.exitBlockInstantiation(this); } } // @Override - public accept(visitor: CircomVisitor): Result { + public accept(visitor: CircomParserVisitor): Result { if (visitor.visitBlockInstantiation) { return visitor.visitBlockInstantiation(this); } else { @@ -5852,18 +5851,18 @@ export class ExpressionListContext extends ParserRuleContext { public get ruleIndex(): number { return CircomParser.RULE_expressionList; } - public enterRule(listener: CircomListener): void { + public enterRule(listener: CircomParserListener): void { if (listener.enterExpressionList) { listener.enterExpressionList(this); } } - public exitRule(listener: CircomListener): void { + public exitRule(listener: CircomParserListener): void { if (listener.exitExpressionList) { listener.exitExpressionList(this); } } // @Override - public accept(visitor: CircomVisitor): Result { + public accept(visitor: CircomParserVisitor): Result { if (visitor.visitExpressionList) { return visitor.visitExpressionList(this); } else { @@ -5904,18 +5903,18 @@ export class IdentifierContext extends ParserRuleContext { public get ruleIndex(): number { return CircomParser.RULE_identifier; } - public enterRule(listener: CircomListener): void { + public enterRule(listener: CircomParserListener): void { if (listener.enterIdentifier) { listener.enterIdentifier(this); } } - public exitRule(listener: CircomListener): void { + public exitRule(listener: CircomParserListener): void { if (listener.exitIdentifier) { listener.exitIdentifier(this); } } // @Override - public accept(visitor: CircomVisitor): Result { + public accept(visitor: CircomParserVisitor): Result { if (visitor.visitIdentifier) { return visitor.visitIdentifier(this); } else { @@ -5945,18 +5944,18 @@ export class ArrayDimensionContext extends ParserRuleContext { public get ruleIndex(): number { return CircomParser.RULE_arrayDimension; } - public enterRule(listener: CircomListener): void { + public enterRule(listener: CircomParserListener): void { if (listener.enterArrayDimension) { listener.enterArrayDimension(this); } } - public exitRule(listener: CircomListener): void { + public exitRule(listener: CircomParserListener): void { if (listener.exitArrayDimension) { listener.exitArrayDimension(this); } } // @Override - public accept(visitor: CircomVisitor): Result { + public accept(visitor: CircomParserVisitor): Result { if (visitor.visitArrayDimension) { return visitor.visitArrayDimension(this); } else { @@ -5989,18 +5988,18 @@ export class ArgsContext extends ParserRuleContext { public get ruleIndex(): number { return CircomParser.RULE_args; } - public enterRule(listener: CircomListener): void { + public enterRule(listener: CircomParserListener): void { if (listener.enterArgs) { listener.enterArgs(this); } } - public exitRule(listener: CircomListener): void { + public exitRule(listener: CircomParserListener): void { if (listener.exitArgs) { listener.exitArgs(this); } } // @Override - public accept(visitor: CircomVisitor): Result { + public accept(visitor: CircomParserVisitor): Result { if (visitor.visitArgs) { return visitor.visitArgs(this); } else { @@ -6039,18 +6038,18 @@ export class ArgsWithUnderscoreContext extends ParserRuleContext { public get ruleIndex(): number { return CircomParser.RULE_argsWithUnderscore; } - public enterRule(listener: CircomListener): void { + public enterRule(listener: CircomParserListener): void { if (listener.enterArgsWithUnderscore) { listener.enterArgsWithUnderscore(this); } } - public exitRule(listener: CircomListener): void { + public exitRule(listener: CircomParserListener): void { if (listener.exitArgsWithUnderscore) { listener.exitArgsWithUnderscore(this); } } // @Override - public accept(visitor: CircomVisitor): Result { + public accept(visitor: CircomParserVisitor): Result { if (visitor.visitArgsWithUnderscore) { return visitor.visitArgsWithUnderscore(this); } else { @@ -6083,18 +6082,18 @@ export class NumSequenceContext extends ParserRuleContext { public get ruleIndex(): number { return CircomParser.RULE_numSequence; } - public enterRule(listener: CircomListener): void { + public enterRule(listener: CircomParserListener): void { if (listener.enterNumSequence) { listener.enterNumSequence(this); } } - public exitRule(listener: CircomListener): void { + public exitRule(listener: CircomParserListener): void { if (listener.exitNumSequence) { listener.exitNumSequence(this); } } // @Override - public accept(visitor: CircomVisitor): Result { + public accept(visitor: CircomParserVisitor): Result { if (visitor.visitNumSequence) { return visitor.visitNumSequence(this); } else { diff --git a/src/generated/CircomListener.ts b/src/generated/CircomParserListener.ts similarity index 99% rename from src/generated/CircomListener.ts rename to src/generated/CircomParserListener.ts index 3729e96..034812d 100644 --- a/src/generated/CircomListener.ts +++ b/src/generated/CircomParserListener.ts @@ -1,4 +1,4 @@ -// Generated from parser/Circom.g4 by ANTLR 4.13.1 +// Generated from parser/CircomParser.g4 by ANTLR 4.13.1 import { ParseTreeListener } from "antlr4"; @@ -58,7 +58,7 @@ import { NumSequenceContext } from "./CircomParser"; * This interface defines a complete listener for a parse tree produced by * `CircomParser`. */ -export default class CircomListener extends ParseTreeListener { +export default class CircomParserListener extends ParseTreeListener { /** * Enter a parse tree produced by `CircomParser.circuit`. * @param ctx the parse tree diff --git a/src/generated/CircomVisitor.ts b/src/generated/CircomParserVisitor.ts similarity index 98% rename from src/generated/CircomVisitor.ts rename to src/generated/CircomParserVisitor.ts index 5d52671..6e3318f 100644 --- a/src/generated/CircomVisitor.ts +++ b/src/generated/CircomParserVisitor.ts @@ -1,4 +1,4 @@ -// Generated from parser/Circom.g4 by ANTLR 4.13.1 +// Generated from parser/CircomParser.g4 by ANTLR 4.13.1 import { ParseTreeVisitor } from "antlr4"; @@ -61,7 +61,9 @@ import { NumSequenceContext } from "./CircomParser"; * @param The return type of the visit operation. Use `void` for * operations with no return type. */ -export default class CircomVisitor extends ParseTreeVisitor { +export default class CircomParserVisitor< + Result, +> extends ParseTreeVisitor { /** * Visit a parse tree produced by `CircomParser.circuit`. * @param ctx the parse tree diff --git a/src/generated/LexerCircom.ts b/src/generated/LexerCircom.ts deleted file mode 100644 index ec2d8e3..0000000 --- a/src/generated/LexerCircom.ts +++ /dev/null @@ -1,599 +0,0 @@ -// Generated from parser/LexerCircom.g4 by ANTLR 4.13.1 -// noinspection ES6UnusedImports,JSUnusedGlobalSymbols,JSUnusedLocalSymbols -import { - ATN, - ATNDeserializer, - CharStream, - DecisionState, - DFA, - Lexer, - LexerATNSimulator, - RuleContext, - PredictionContextCache, - Token, -} from "antlr4"; -export default class LexerCircom extends Lexer { - public static readonly VERSION = 1; - public static readonly SIGNAL_TYPE = 2; - public static readonly SIGNAL = 3; - public static readonly INPUT = 4; - public static readonly OUTPUT = 5; - public static readonly PUBLIC = 6; - public static readonly TEMPLATE = 7; - public static readonly COMPONENT = 8; - public static readonly VAR = 9; - public static readonly FUNCTION = 10; - public static readonly RETURN = 11; - public static readonly IF = 12; - public static readonly ELSE = 13; - public static readonly FOR = 14; - public static readonly WHILE = 15; - public static readonly DO = 16; - public static readonly LOG = 17; - public static readonly ASSERT = 18; - public static readonly INCLUDE = 19; - public static readonly CUSTOM = 20; - public static readonly PRAGMA = 21; - public static readonly CIRCOM = 22; - public static readonly CUSTOM_TEMPLATES = 23; - public static readonly MAIN = 24; - public static readonly PARALLEL = 25; - public static readonly LP = 26; - public static readonly RP = 27; - public static readonly LB = 28; - public static readonly RB = 29; - public static readonly LC = 30; - public static readonly RC = 31; - public static readonly COLON = 32; - public static readonly SEMICOLON = 33; - public static readonly DOT = 34; - public static readonly COMMA = 35; - public static readonly ASSIGNMENT = 36; - public static readonly ASSIGNMENT_OP = 37; - public static readonly SELF_OP = 38; - public static readonly LEFT_ASSIGNMENT = 39; - public static readonly RIGHT_ASSIGNMENT = 40; - public static readonly CONSTRAINT_EQ = 41; - public static readonly QUESTION_MARK = 42; - public static readonly UNDERSCORE = 43; - public static readonly NOT = 44; - public static readonly BNOT = 45; - public static readonly POW = 46; - public static readonly MUL = 47; - public static readonly DIV = 48; - public static readonly QUO = 49; - public static readonly MOD = 50; - public static readonly ADD = 51; - public static readonly SUB = 52; - public static readonly SHL = 53; - public static readonly SHR = 54; - public static readonly BAND = 55; - public static readonly BXOR = 56; - public static readonly BOR = 57; - public static readonly EQ = 58; - public static readonly NEQ = 59; - public static readonly GT = 60; - public static readonly LT = 61; - public static readonly LE = 62; - public static readonly GE = 63; - public static readonly AND = 64; - public static readonly OR = 65; - public static readonly ID = 66; - public static readonly NUMBER = 67; - public static readonly HEX = 68; - public static readonly STRING = 69; - public static readonly COMMENT = 70; - public static readonly LINE_COMMENT = 71; - public static readonly WS = 72; - public static readonly EOF = Token.EOF; - - public static readonly channelNames: string[] = [ - "DEFAULT_TOKEN_CHANNEL", - "HIDDEN", - ]; - public static readonly literalNames: (string | null)[] = [ - null, - null, - null, - "'signal'", - "'input'", - "'output'", - "'public'", - "'template'", - "'component'", - "'var'", - "'function'", - "'return'", - "'if'", - "'else'", - "'for'", - "'while'", - "'do'", - "'log'", - "'assert'", - "'include'", - "'custom'", - "'pragma'", - "'circom'", - "'custom_templates'", - "'main'", - "'parallel'", - "'('", - "')'", - "'['", - "']'", - "'{'", - "'}'", - "':'", - "';'", - "'.'", - "','", - "'='", - null, - null, - null, - null, - "'==='", - "'?'", - "'_'", - "'!'", - "'~'", - "'**'", - "'*'", - "'/'", - "'\\'", - "'%'", - "'+'", - "'-'", - "'<<'", - "'>>'", - "'&'", - "'^'", - "'|'", - "'=='", - "'!='", - "'>'", - "'<'", - "'>='", - "'<='", - "'&&'", - "'||'", - ]; - public static readonly symbolicNames: (string | null)[] = [ - null, - "VERSION", - "SIGNAL_TYPE", - "SIGNAL", - "INPUT", - "OUTPUT", - "PUBLIC", - "TEMPLATE", - "COMPONENT", - "VAR", - "FUNCTION", - "RETURN", - "IF", - "ELSE", - "FOR", - "WHILE", - "DO", - "LOG", - "ASSERT", - "INCLUDE", - "CUSTOM", - "PRAGMA", - "CIRCOM", - "CUSTOM_TEMPLATES", - "MAIN", - "PARALLEL", - "LP", - "RP", - "LB", - "RB", - "LC", - "RC", - "COLON", - "SEMICOLON", - "DOT", - "COMMA", - "ASSIGNMENT", - "ASSIGNMENT_OP", - "SELF_OP", - "LEFT_ASSIGNMENT", - "RIGHT_ASSIGNMENT", - "CONSTRAINT_EQ", - "QUESTION_MARK", - "UNDERSCORE", - "NOT", - "BNOT", - "POW", - "MUL", - "DIV", - "QUO", - "MOD", - "ADD", - "SUB", - "SHL", - "SHR", - "BAND", - "BXOR", - "BOR", - "EQ", - "NEQ", - "GT", - "LT", - "LE", - "GE", - "AND", - "OR", - "ID", - "NUMBER", - "HEX", - "STRING", - "COMMENT", - "LINE_COMMENT", - "WS", - ]; - public static readonly modeNames: string[] = ["DEFAULT_MODE"]; - - public static readonly ruleNames: string[] = [ - "VERSION", - "SIGNAL_TYPE", - "SIGNAL", - "INPUT", - "OUTPUT", - "PUBLIC", - "TEMPLATE", - "COMPONENT", - "VAR", - "FUNCTION", - "RETURN", - "IF", - "ELSE", - "FOR", - "WHILE", - "DO", - "LOG", - "ASSERT", - "INCLUDE", - "CUSTOM", - "PRAGMA", - "CIRCOM", - "CUSTOM_TEMPLATES", - "MAIN", - "PARALLEL", - "LP", - "RP", - "LB", - "RB", - "LC", - "RC", - "COLON", - "SEMICOLON", - "DOT", - "COMMA", - "ASSIGNMENT", - "ASSIGNMENT_OP", - "SELF_OP", - "LEFT_ASSIGNMENT", - "RIGHT_ASSIGNMENT", - "CONSTRAINT_EQ", - "QUESTION_MARK", - "UNDERSCORE", - "NOT", - "BNOT", - "POW", - "MUL", - "DIV", - "QUO", - "MOD", - "ADD", - "SUB", - "SHL", - "SHR", - "BAND", - "BXOR", - "BOR", - "EQ", - "NEQ", - "GT", - "LT", - "LE", - "GE", - "AND", - "OR", - "ID", - "LETTER", - "ID_SYMBOL", - "NUMBER", - "DIGIT", - "HEX", - "HEXDIGIT", - "STRING", - "ESC", - "COMMENT", - "LINE_COMMENT", - "WS", - ]; - - constructor(input: CharStream) { - super(input); - this._interp = new LexerATNSimulator( - this, - LexerCircom._ATN, - LexerCircom.DecisionsToDFA, - new PredictionContextCache(), - ); - } - - public get grammarFileName(): string { - return "LexerCircom.g4"; - } - - public get literalNames(): (string | null)[] { - return LexerCircom.literalNames; - } - public get symbolicNames(): (string | null)[] { - return LexerCircom.symbolicNames; - } - public get ruleNames(): string[] { - return LexerCircom.ruleNames; - } - - public get serializedATN(): number[] { - return LexerCircom._serializedATN; - } - - public get channelNames(): string[] { - return LexerCircom.channelNames; - } - - public get modeNames(): string[] { - return LexerCircom.modeNames; - } - - public static readonly _serializedATN: number[] = [ - 4, 0, 72, 540, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, - 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, - 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, - 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, - 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, - 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, - 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, - 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, - 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, - 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, - 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 2, 58, 7, 58, 2, 59, 7, 59, 2, - 60, 7, 60, 2, 61, 7, 61, 2, 62, 7, 62, 2, 63, 7, 63, 2, 64, 7, 64, 2, 65, 7, - 65, 2, 66, 7, 66, 2, 67, 7, 67, 2, 68, 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 2, - 71, 7, 71, 2, 72, 7, 72, 2, 73, 7, 73, 2, 74, 7, 74, 2, 75, 7, 75, 2, 76, 7, - 76, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 3, 1, 164, 8, 1, 1, 2, - 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, - 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, - 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, - 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 9, - 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, - 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, - 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, - 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, - 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, - 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, - 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, - 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, - 1, 22, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, - 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 26, 1, 26, - 1, 27, 1, 27, 1, 28, 1, 28, 1, 29, 1, 29, 1, 30, 1, 30, 1, 31, 1, 31, 1, 32, - 1, 32, 1, 33, 1, 33, 1, 34, 1, 34, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 36, - 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, - 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, - 1, 36, 3, 36, 373, 8, 36, 1, 37, 1, 37, 1, 37, 1, 37, 3, 37, 379, 8, 37, 1, - 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 3, 38, 387, 8, 38, 1, 39, 1, 39, 1, - 39, 1, 39, 1, 39, 1, 39, 3, 39, 395, 8, 39, 1, 40, 1, 40, 1, 40, 1, 40, 1, - 41, 1, 41, 1, 42, 1, 42, 1, 43, 1, 43, 1, 44, 1, 44, 1, 45, 1, 45, 1, 45, 1, - 46, 1, 46, 1, 47, 1, 47, 1, 48, 1, 48, 1, 49, 1, 49, 1, 50, 1, 50, 1, 51, 1, - 51, 1, 52, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 1, 54, 1, 54, 1, 55, 1, 55, 1, - 56, 1, 56, 1, 57, 1, 57, 1, 57, 1, 58, 1, 58, 1, 58, 1, 59, 1, 59, 1, 60, 1, - 60, 1, 61, 1, 61, 1, 61, 1, 62, 1, 62, 1, 62, 1, 63, 1, 63, 1, 63, 1, 64, 1, - 64, 1, 64, 1, 65, 5, 65, 459, 8, 65, 10, 65, 12, 65, 462, 9, 65, 1, 65, 1, - 65, 1, 65, 1, 65, 5, 65, 468, 8, 65, 10, 65, 12, 65, 471, 9, 65, 1, 66, 1, - 66, 1, 67, 1, 67, 1, 68, 4, 68, 478, 8, 68, 11, 68, 12, 68, 479, 1, 68, 3, - 68, 483, 8, 68, 1, 69, 1, 69, 1, 70, 1, 70, 1, 70, 4, 70, 490, 8, 70, 11, - 70, 12, 70, 491, 1, 71, 1, 71, 1, 72, 1, 72, 1, 72, 5, 72, 499, 8, 72, 10, - 72, 12, 72, 502, 9, 72, 1, 72, 1, 72, 1, 73, 1, 73, 1, 73, 1, 74, 1, 74, 1, - 74, 1, 74, 5, 74, 513, 8, 74, 10, 74, 12, 74, 516, 9, 74, 1, 74, 1, 74, 1, - 74, 1, 74, 1, 74, 1, 75, 1, 75, 1, 75, 1, 75, 5, 75, 527, 8, 75, 10, 75, 12, - 75, 530, 9, 75, 1, 75, 1, 75, 1, 76, 4, 76, 535, 8, 76, 11, 76, 12, 76, 536, - 1, 76, 1, 76, 2, 500, 514, 0, 77, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, - 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, - 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, - 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, - 36, 73, 37, 75, 38, 77, 39, 79, 40, 81, 41, 83, 42, 85, 43, 87, 44, 89, 45, - 91, 46, 93, 47, 95, 48, 97, 49, 99, 50, 101, 51, 103, 52, 105, 53, 107, 54, - 109, 55, 111, 56, 113, 57, 115, 58, 117, 59, 119, 60, 121, 61, 123, 62, 125, - 63, 127, 64, 129, 65, 131, 66, 133, 0, 135, 0, 137, 67, 139, 0, 141, 68, - 143, 0, 145, 69, 147, 0, 149, 70, 151, 71, 153, 72, 1, 0, 7, 3, 0, 65, 90, - 97, 122, 128, 255, 2, 0, 36, 36, 95, 95, 1, 0, 48, 57, 3, 0, 48, 57, 65, 70, - 97, 102, 7, 0, 34, 34, 92, 92, 98, 98, 102, 102, 110, 110, 114, 114, 116, - 116, 2, 0, 10, 10, 13, 13, 3, 0, 9, 10, 12, 13, 32, 32, 561, 0, 1, 1, 0, 0, - 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, - 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, - 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, - 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, - 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, - 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, - 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, - 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, - 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, - 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, - 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, - 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 95, 1, 0, 0, 0, 0, 97, 1, 0, 0, 0, - 0, 99, 1, 0, 0, 0, 0, 101, 1, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 105, 1, 0, 0, - 0, 0, 107, 1, 0, 0, 0, 0, 109, 1, 0, 0, 0, 0, 111, 1, 0, 0, 0, 0, 113, 1, 0, - 0, 0, 0, 115, 1, 0, 0, 0, 0, 117, 1, 0, 0, 0, 0, 119, 1, 0, 0, 0, 0, 121, 1, - 0, 0, 0, 0, 123, 1, 0, 0, 0, 0, 125, 1, 0, 0, 0, 0, 127, 1, 0, 0, 0, 0, 129, - 1, 0, 0, 0, 0, 131, 1, 0, 0, 0, 0, 137, 1, 0, 0, 0, 0, 141, 1, 0, 0, 0, 0, - 145, 1, 0, 0, 0, 0, 149, 1, 0, 0, 0, 0, 151, 1, 0, 0, 0, 0, 153, 1, 0, 0, 0, - 1, 155, 1, 0, 0, 0, 3, 163, 1, 0, 0, 0, 5, 165, 1, 0, 0, 0, 7, 172, 1, 0, 0, - 0, 9, 178, 1, 0, 0, 0, 11, 185, 1, 0, 0, 0, 13, 192, 1, 0, 0, 0, 15, 201, 1, - 0, 0, 0, 17, 211, 1, 0, 0, 0, 19, 215, 1, 0, 0, 0, 21, 224, 1, 0, 0, 0, 23, - 231, 1, 0, 0, 0, 25, 234, 1, 0, 0, 0, 27, 239, 1, 0, 0, 0, 29, 243, 1, 0, 0, - 0, 31, 249, 1, 0, 0, 0, 33, 252, 1, 0, 0, 0, 35, 256, 1, 0, 0, 0, 37, 263, - 1, 0, 0, 0, 39, 271, 1, 0, 0, 0, 41, 278, 1, 0, 0, 0, 43, 285, 1, 0, 0, 0, - 45, 292, 1, 0, 0, 0, 47, 309, 1, 0, 0, 0, 49, 314, 1, 0, 0, 0, 51, 323, 1, - 0, 0, 0, 53, 325, 1, 0, 0, 0, 55, 327, 1, 0, 0, 0, 57, 329, 1, 0, 0, 0, 59, - 331, 1, 0, 0, 0, 61, 333, 1, 0, 0, 0, 63, 335, 1, 0, 0, 0, 65, 337, 1, 0, 0, - 0, 67, 339, 1, 0, 0, 0, 69, 341, 1, 0, 0, 0, 71, 343, 1, 0, 0, 0, 73, 372, - 1, 0, 0, 0, 75, 378, 1, 0, 0, 0, 77, 386, 1, 0, 0, 0, 79, 394, 1, 0, 0, 0, - 81, 396, 1, 0, 0, 0, 83, 400, 1, 0, 0, 0, 85, 402, 1, 0, 0, 0, 87, 404, 1, - 0, 0, 0, 89, 406, 1, 0, 0, 0, 91, 408, 1, 0, 0, 0, 93, 411, 1, 0, 0, 0, 95, - 413, 1, 0, 0, 0, 97, 415, 1, 0, 0, 0, 99, 417, 1, 0, 0, 0, 101, 419, 1, 0, - 0, 0, 103, 421, 1, 0, 0, 0, 105, 423, 1, 0, 0, 0, 107, 426, 1, 0, 0, 0, 109, - 429, 1, 0, 0, 0, 111, 431, 1, 0, 0, 0, 113, 433, 1, 0, 0, 0, 115, 435, 1, 0, - 0, 0, 117, 438, 1, 0, 0, 0, 119, 441, 1, 0, 0, 0, 121, 443, 1, 0, 0, 0, 123, - 445, 1, 0, 0, 0, 125, 448, 1, 0, 0, 0, 127, 451, 1, 0, 0, 0, 129, 454, 1, 0, - 0, 0, 131, 460, 1, 0, 0, 0, 133, 472, 1, 0, 0, 0, 135, 474, 1, 0, 0, 0, 137, - 482, 1, 0, 0, 0, 139, 484, 1, 0, 0, 0, 141, 486, 1, 0, 0, 0, 143, 493, 1, 0, - 0, 0, 145, 495, 1, 0, 0, 0, 147, 505, 1, 0, 0, 0, 149, 508, 1, 0, 0, 0, 151, - 522, 1, 0, 0, 0, 153, 534, 1, 0, 0, 0, 155, 156, 3, 137, 68, 0, 156, 157, 5, - 46, 0, 0, 157, 158, 3, 137, 68, 0, 158, 159, 5, 46, 0, 0, 159, 160, 3, 137, - 68, 0, 160, 2, 1, 0, 0, 0, 161, 164, 3, 7, 3, 0, 162, 164, 3, 9, 4, 0, 163, - 161, 1, 0, 0, 0, 163, 162, 1, 0, 0, 0, 164, 4, 1, 0, 0, 0, 165, 166, 5, 115, - 0, 0, 166, 167, 5, 105, 0, 0, 167, 168, 5, 103, 0, 0, 168, 169, 5, 110, 0, - 0, 169, 170, 5, 97, 0, 0, 170, 171, 5, 108, 0, 0, 171, 6, 1, 0, 0, 0, 172, - 173, 5, 105, 0, 0, 173, 174, 5, 110, 0, 0, 174, 175, 5, 112, 0, 0, 175, 176, - 5, 117, 0, 0, 176, 177, 5, 116, 0, 0, 177, 8, 1, 0, 0, 0, 178, 179, 5, 111, - 0, 0, 179, 180, 5, 117, 0, 0, 180, 181, 5, 116, 0, 0, 181, 182, 5, 112, 0, - 0, 182, 183, 5, 117, 0, 0, 183, 184, 5, 116, 0, 0, 184, 10, 1, 0, 0, 0, 185, - 186, 5, 112, 0, 0, 186, 187, 5, 117, 0, 0, 187, 188, 5, 98, 0, 0, 188, 189, - 5, 108, 0, 0, 189, 190, 5, 105, 0, 0, 190, 191, 5, 99, 0, 0, 191, 12, 1, 0, - 0, 0, 192, 193, 5, 116, 0, 0, 193, 194, 5, 101, 0, 0, 194, 195, 5, 109, 0, - 0, 195, 196, 5, 112, 0, 0, 196, 197, 5, 108, 0, 0, 197, 198, 5, 97, 0, 0, - 198, 199, 5, 116, 0, 0, 199, 200, 5, 101, 0, 0, 200, 14, 1, 0, 0, 0, 201, - 202, 5, 99, 0, 0, 202, 203, 5, 111, 0, 0, 203, 204, 5, 109, 0, 0, 204, 205, - 5, 112, 0, 0, 205, 206, 5, 111, 0, 0, 206, 207, 5, 110, 0, 0, 207, 208, 5, - 101, 0, 0, 208, 209, 5, 110, 0, 0, 209, 210, 5, 116, 0, 0, 210, 16, 1, 0, 0, - 0, 211, 212, 5, 118, 0, 0, 212, 213, 5, 97, 0, 0, 213, 214, 5, 114, 0, 0, - 214, 18, 1, 0, 0, 0, 215, 216, 5, 102, 0, 0, 216, 217, 5, 117, 0, 0, 217, - 218, 5, 110, 0, 0, 218, 219, 5, 99, 0, 0, 219, 220, 5, 116, 0, 0, 220, 221, - 5, 105, 0, 0, 221, 222, 5, 111, 0, 0, 222, 223, 5, 110, 0, 0, 223, 20, 1, 0, - 0, 0, 224, 225, 5, 114, 0, 0, 225, 226, 5, 101, 0, 0, 226, 227, 5, 116, 0, - 0, 227, 228, 5, 117, 0, 0, 228, 229, 5, 114, 0, 0, 229, 230, 5, 110, 0, 0, - 230, 22, 1, 0, 0, 0, 231, 232, 5, 105, 0, 0, 232, 233, 5, 102, 0, 0, 233, - 24, 1, 0, 0, 0, 234, 235, 5, 101, 0, 0, 235, 236, 5, 108, 0, 0, 236, 237, 5, - 115, 0, 0, 237, 238, 5, 101, 0, 0, 238, 26, 1, 0, 0, 0, 239, 240, 5, 102, 0, - 0, 240, 241, 5, 111, 0, 0, 241, 242, 5, 114, 0, 0, 242, 28, 1, 0, 0, 0, 243, - 244, 5, 119, 0, 0, 244, 245, 5, 104, 0, 0, 245, 246, 5, 105, 0, 0, 246, 247, - 5, 108, 0, 0, 247, 248, 5, 101, 0, 0, 248, 30, 1, 0, 0, 0, 249, 250, 5, 100, - 0, 0, 250, 251, 5, 111, 0, 0, 251, 32, 1, 0, 0, 0, 252, 253, 5, 108, 0, 0, - 253, 254, 5, 111, 0, 0, 254, 255, 5, 103, 0, 0, 255, 34, 1, 0, 0, 0, 256, - 257, 5, 97, 0, 0, 257, 258, 5, 115, 0, 0, 258, 259, 5, 115, 0, 0, 259, 260, - 5, 101, 0, 0, 260, 261, 5, 114, 0, 0, 261, 262, 5, 116, 0, 0, 262, 36, 1, 0, - 0, 0, 263, 264, 5, 105, 0, 0, 264, 265, 5, 110, 0, 0, 265, 266, 5, 99, 0, 0, - 266, 267, 5, 108, 0, 0, 267, 268, 5, 117, 0, 0, 268, 269, 5, 100, 0, 0, 269, - 270, 5, 101, 0, 0, 270, 38, 1, 0, 0, 0, 271, 272, 5, 99, 0, 0, 272, 273, 5, - 117, 0, 0, 273, 274, 5, 115, 0, 0, 274, 275, 5, 116, 0, 0, 275, 276, 5, 111, - 0, 0, 276, 277, 5, 109, 0, 0, 277, 40, 1, 0, 0, 0, 278, 279, 5, 112, 0, 0, - 279, 280, 5, 114, 0, 0, 280, 281, 5, 97, 0, 0, 281, 282, 5, 103, 0, 0, 282, - 283, 5, 109, 0, 0, 283, 284, 5, 97, 0, 0, 284, 42, 1, 0, 0, 0, 285, 286, 5, - 99, 0, 0, 286, 287, 5, 105, 0, 0, 287, 288, 5, 114, 0, 0, 288, 289, 5, 99, - 0, 0, 289, 290, 5, 111, 0, 0, 290, 291, 5, 109, 0, 0, 291, 44, 1, 0, 0, 0, - 292, 293, 5, 99, 0, 0, 293, 294, 5, 117, 0, 0, 294, 295, 5, 115, 0, 0, 295, - 296, 5, 116, 0, 0, 296, 297, 5, 111, 0, 0, 297, 298, 5, 109, 0, 0, 298, 299, - 5, 95, 0, 0, 299, 300, 5, 116, 0, 0, 300, 301, 5, 101, 0, 0, 301, 302, 5, - 109, 0, 0, 302, 303, 5, 112, 0, 0, 303, 304, 5, 108, 0, 0, 304, 305, 5, 97, - 0, 0, 305, 306, 5, 116, 0, 0, 306, 307, 5, 101, 0, 0, 307, 308, 5, 115, 0, - 0, 308, 46, 1, 0, 0, 0, 309, 310, 5, 109, 0, 0, 310, 311, 5, 97, 0, 0, 311, - 312, 5, 105, 0, 0, 312, 313, 5, 110, 0, 0, 313, 48, 1, 0, 0, 0, 314, 315, 5, - 112, 0, 0, 315, 316, 5, 97, 0, 0, 316, 317, 5, 114, 0, 0, 317, 318, 5, 97, - 0, 0, 318, 319, 5, 108, 0, 0, 319, 320, 5, 108, 0, 0, 320, 321, 5, 101, 0, - 0, 321, 322, 5, 108, 0, 0, 322, 50, 1, 0, 0, 0, 323, 324, 5, 40, 0, 0, 324, - 52, 1, 0, 0, 0, 325, 326, 5, 41, 0, 0, 326, 54, 1, 0, 0, 0, 327, 328, 5, 91, - 0, 0, 328, 56, 1, 0, 0, 0, 329, 330, 5, 93, 0, 0, 330, 58, 1, 0, 0, 0, 331, - 332, 5, 123, 0, 0, 332, 60, 1, 0, 0, 0, 333, 334, 5, 125, 0, 0, 334, 62, 1, - 0, 0, 0, 335, 336, 5, 58, 0, 0, 336, 64, 1, 0, 0, 0, 337, 338, 5, 59, 0, 0, - 338, 66, 1, 0, 0, 0, 339, 340, 5, 46, 0, 0, 340, 68, 1, 0, 0, 0, 341, 342, - 5, 44, 0, 0, 342, 70, 1, 0, 0, 0, 343, 344, 5, 61, 0, 0, 344, 72, 1, 0, 0, - 0, 345, 346, 5, 43, 0, 0, 346, 373, 5, 61, 0, 0, 347, 348, 5, 45, 0, 0, 348, - 373, 5, 61, 0, 0, 349, 350, 5, 42, 0, 0, 350, 373, 5, 61, 0, 0, 351, 352, 5, - 42, 0, 0, 352, 353, 5, 42, 0, 0, 353, 373, 5, 61, 0, 0, 354, 355, 5, 47, 0, - 0, 355, 373, 5, 61, 0, 0, 356, 357, 5, 92, 0, 0, 357, 373, 5, 61, 0, 0, 358, - 359, 5, 37, 0, 0, 359, 373, 5, 61, 0, 0, 360, 361, 5, 60, 0, 0, 361, 362, 5, - 60, 0, 0, 362, 373, 5, 61, 0, 0, 363, 364, 5, 62, 0, 0, 364, 365, 5, 62, 0, - 0, 365, 373, 5, 61, 0, 0, 366, 367, 5, 38, 0, 0, 367, 373, 5, 61, 0, 0, 368, - 369, 5, 94, 0, 0, 369, 373, 5, 61, 0, 0, 370, 371, 5, 124, 0, 0, 371, 373, - 5, 61, 0, 0, 372, 345, 1, 0, 0, 0, 372, 347, 1, 0, 0, 0, 372, 349, 1, 0, 0, - 0, 372, 351, 1, 0, 0, 0, 372, 354, 1, 0, 0, 0, 372, 356, 1, 0, 0, 0, 372, - 358, 1, 0, 0, 0, 372, 360, 1, 0, 0, 0, 372, 363, 1, 0, 0, 0, 372, 366, 1, 0, - 0, 0, 372, 368, 1, 0, 0, 0, 372, 370, 1, 0, 0, 0, 373, 74, 1, 0, 0, 0, 374, - 375, 5, 43, 0, 0, 375, 379, 5, 43, 0, 0, 376, 377, 5, 45, 0, 0, 377, 379, 5, - 45, 0, 0, 378, 374, 1, 0, 0, 0, 378, 376, 1, 0, 0, 0, 379, 76, 1, 0, 0, 0, - 380, 381, 5, 60, 0, 0, 381, 382, 5, 45, 0, 0, 382, 387, 5, 45, 0, 0, 383, - 384, 5, 60, 0, 0, 384, 385, 5, 61, 0, 0, 385, 387, 5, 61, 0, 0, 386, 380, 1, - 0, 0, 0, 386, 383, 1, 0, 0, 0, 387, 78, 1, 0, 0, 0, 388, 389, 5, 45, 0, 0, - 389, 390, 5, 45, 0, 0, 390, 395, 5, 62, 0, 0, 391, 392, 5, 61, 0, 0, 392, - 393, 5, 61, 0, 0, 393, 395, 5, 62, 0, 0, 394, 388, 1, 0, 0, 0, 394, 391, 1, - 0, 0, 0, 395, 80, 1, 0, 0, 0, 396, 397, 5, 61, 0, 0, 397, 398, 5, 61, 0, 0, - 398, 399, 5, 61, 0, 0, 399, 82, 1, 0, 0, 0, 400, 401, 5, 63, 0, 0, 401, 84, - 1, 0, 0, 0, 402, 403, 5, 95, 0, 0, 403, 86, 1, 0, 0, 0, 404, 405, 5, 33, 0, - 0, 405, 88, 1, 0, 0, 0, 406, 407, 5, 126, 0, 0, 407, 90, 1, 0, 0, 0, 408, - 409, 5, 42, 0, 0, 409, 410, 5, 42, 0, 0, 410, 92, 1, 0, 0, 0, 411, 412, 5, - 42, 0, 0, 412, 94, 1, 0, 0, 0, 413, 414, 5, 47, 0, 0, 414, 96, 1, 0, 0, 0, - 415, 416, 5, 92, 0, 0, 416, 98, 1, 0, 0, 0, 417, 418, 5, 37, 0, 0, 418, 100, - 1, 0, 0, 0, 419, 420, 5, 43, 0, 0, 420, 102, 1, 0, 0, 0, 421, 422, 5, 45, 0, - 0, 422, 104, 1, 0, 0, 0, 423, 424, 5, 60, 0, 0, 424, 425, 5, 60, 0, 0, 425, - 106, 1, 0, 0, 0, 426, 427, 5, 62, 0, 0, 427, 428, 5, 62, 0, 0, 428, 108, 1, - 0, 0, 0, 429, 430, 5, 38, 0, 0, 430, 110, 1, 0, 0, 0, 431, 432, 5, 94, 0, 0, - 432, 112, 1, 0, 0, 0, 433, 434, 5, 124, 0, 0, 434, 114, 1, 0, 0, 0, 435, - 436, 5, 61, 0, 0, 436, 437, 5, 61, 0, 0, 437, 116, 1, 0, 0, 0, 438, 439, 5, - 33, 0, 0, 439, 440, 5, 61, 0, 0, 440, 118, 1, 0, 0, 0, 441, 442, 5, 62, 0, - 0, 442, 120, 1, 0, 0, 0, 443, 444, 5, 60, 0, 0, 444, 122, 1, 0, 0, 0, 445, - 446, 5, 62, 0, 0, 446, 447, 5, 61, 0, 0, 447, 124, 1, 0, 0, 0, 448, 449, 5, - 60, 0, 0, 449, 450, 5, 61, 0, 0, 450, 126, 1, 0, 0, 0, 451, 452, 5, 38, 0, - 0, 452, 453, 5, 38, 0, 0, 453, 128, 1, 0, 0, 0, 454, 455, 5, 124, 0, 0, 455, - 456, 5, 124, 0, 0, 456, 130, 1, 0, 0, 0, 457, 459, 3, 135, 67, 0, 458, 457, - 1, 0, 0, 0, 459, 462, 1, 0, 0, 0, 460, 458, 1, 0, 0, 0, 460, 461, 1, 0, 0, - 0, 461, 463, 1, 0, 0, 0, 462, 460, 1, 0, 0, 0, 463, 469, 3, 133, 66, 0, 464, - 468, 3, 133, 66, 0, 465, 468, 3, 139, 69, 0, 466, 468, 3, 135, 67, 0, 467, - 464, 1, 0, 0, 0, 467, 465, 1, 0, 0, 0, 467, 466, 1, 0, 0, 0, 468, 471, 1, 0, - 0, 0, 469, 467, 1, 0, 0, 0, 469, 470, 1, 0, 0, 0, 470, 132, 1, 0, 0, 0, 471, - 469, 1, 0, 0, 0, 472, 473, 7, 0, 0, 0, 473, 134, 1, 0, 0, 0, 474, 475, 7, 1, - 0, 0, 475, 136, 1, 0, 0, 0, 476, 478, 3, 139, 69, 0, 477, 476, 1, 0, 0, 0, - 478, 479, 1, 0, 0, 0, 479, 477, 1, 0, 0, 0, 479, 480, 1, 0, 0, 0, 480, 483, - 1, 0, 0, 0, 481, 483, 3, 141, 70, 0, 482, 477, 1, 0, 0, 0, 482, 481, 1, 0, - 0, 0, 483, 138, 1, 0, 0, 0, 484, 485, 7, 2, 0, 0, 485, 140, 1, 0, 0, 0, 486, - 487, 5, 48, 0, 0, 487, 489, 5, 120, 0, 0, 488, 490, 3, 143, 71, 0, 489, 488, - 1, 0, 0, 0, 490, 491, 1, 0, 0, 0, 491, 489, 1, 0, 0, 0, 491, 492, 1, 0, 0, - 0, 492, 142, 1, 0, 0, 0, 493, 494, 7, 3, 0, 0, 494, 144, 1, 0, 0, 0, 495, - 500, 5, 34, 0, 0, 496, 499, 3, 147, 73, 0, 497, 499, 9, 0, 0, 0, 498, 496, - 1, 0, 0, 0, 498, 497, 1, 0, 0, 0, 499, 502, 1, 0, 0, 0, 500, 501, 1, 0, 0, - 0, 500, 498, 1, 0, 0, 0, 501, 503, 1, 0, 0, 0, 502, 500, 1, 0, 0, 0, 503, - 504, 5, 34, 0, 0, 504, 146, 1, 0, 0, 0, 505, 506, 5, 92, 0, 0, 506, 507, 7, - 4, 0, 0, 507, 148, 1, 0, 0, 0, 508, 509, 5, 47, 0, 0, 509, 510, 5, 42, 0, 0, - 510, 514, 1, 0, 0, 0, 511, 513, 9, 0, 0, 0, 512, 511, 1, 0, 0, 0, 513, 516, - 1, 0, 0, 0, 514, 515, 1, 0, 0, 0, 514, 512, 1, 0, 0, 0, 515, 517, 1, 0, 0, - 0, 516, 514, 1, 0, 0, 0, 517, 518, 5, 42, 0, 0, 518, 519, 5, 47, 0, 0, 519, - 520, 1, 0, 0, 0, 520, 521, 6, 74, 0, 0, 521, 150, 1, 0, 0, 0, 522, 523, 5, - 47, 0, 0, 523, 524, 5, 47, 0, 0, 524, 528, 1, 0, 0, 0, 525, 527, 8, 5, 0, 0, - 526, 525, 1, 0, 0, 0, 527, 530, 1, 0, 0, 0, 528, 526, 1, 0, 0, 0, 528, 529, - 1, 0, 0, 0, 529, 531, 1, 0, 0, 0, 530, 528, 1, 0, 0, 0, 531, 532, 6, 75, 0, - 0, 532, 152, 1, 0, 0, 0, 533, 535, 7, 6, 0, 0, 534, 533, 1, 0, 0, 0, 535, - 536, 1, 0, 0, 0, 536, 534, 1, 0, 0, 0, 536, 537, 1, 0, 0, 0, 537, 538, 1, 0, - 0, 0, 538, 539, 6, 76, 0, 0, 539, 154, 1, 0, 0, 0, 17, 0, 163, 372, 378, - 386, 394, 460, 467, 469, 479, 482, 491, 498, 500, 514, 528, 536, 1, 0, 1, 0, - ]; - - private static __ATN: ATN; - public static get _ATN(): ATN { - if (!LexerCircom.__ATN) { - LexerCircom.__ATN = new ATNDeserializer().deserialize( - LexerCircom._serializedATN, - ); - } - - return LexerCircom.__ATN; - } - - static DecisionsToDFA = LexerCircom._ATN.decisionToState.map( - (ds: DecisionState, index: number) => new DFA(ds, index), - ); -} diff --git a/src/generated/index.ts b/src/generated/index.ts index 95fe9f2..08ca26e 100644 --- a/src/generated/index.ts +++ b/src/generated/index.ts @@ -1,7 +1,6 @@ -export { default as LexerCircom } from "./LexerCircom"; export { default as CircomLexer } from "./CircomLexer"; export { default as CircomParser } from "./CircomParser"; -export { default as CircomVisitor } from "./CircomVisitor"; -export { default as CircomListener } from "./CircomListener"; +export { default as CircomVisitor } from "./CircomParserVisitor"; +export { default as CircomListener } from "./CircomParserListener"; export * from "./CircomParser"; diff --git a/test/data/curve.circom b/test/data/curve.circom new file mode 100644 index 0000000..99f95e3 --- /dev/null +++ b/test/data/curve.circom @@ -0,0 +1,97 @@ +pragma circom 2.1.6; + +template RegisterIdentityBuilder ( + SIGNATURE_TYPE, // 1, 2.. (list above) ^^^ + DG_HASH_TYPE, // 160, 224, 256, 384, 512 (list above)^^^ + DOCUMENT_TYPE, // 1: TD1; 3: TD3 + EC_BLOCK_NUMBER, + EC_SHIFT, + DG1_SHIFT, + AA_SIGNATURE_ALGO, + DG15_SHIFT, + DG15_BLOCK_NUMBER, + AA_SHIFT +) { + + var TREE_DEPTH = 80; + var CHUNK_SIZE = 64; + var CHUNK_NUMBER = 32; + var HASH_TYPE = 256; + + if (SIGNATURE_TYPE == 2){ + CHUNK_NUMBER = 64; + } + + if (SIGNATURE_TYPE == 13){ + HASH_TYPE = 384; + } + + if (SIGNATURE_TYPE >= 20){ + CHUNK_NUMBER = 4; + } + + if (SIGNATURE_TYPE == 22){ + CHUNK_NUMBER = 5; + } + + if (SIGNATURE_TYPE == 23){ + CHUNK_NUMBER = 3; + HASH_TYPE = 160; + } + + + var DG_HASH_BLOCK_SIZE = 1024; + if (DG_HASH_TYPE <= 256){ + DG_HASH_BLOCK_SIZE = 512; + } + var HASH_BLOCK_SIZE = 1024; + if (HASH_TYPE <= 256){ + HASH_BLOCK_SIZE = 512; + } + + + var DG1_LEN = 1024; + var SIGNED_ATTRIBUTES_LEN = 1024; + + var PUBKEY_LEN; + var SIGNATURE_LEN; + + //ECDSA + if (SIGNATURE_TYPE >= 20){ + PUBKEY_LEN = 2 * CHUNK_NUMBER * CHUNK_SIZE; + SIGNATURE_LEN = 2 * CHUNK_NUMBER * CHUNK_SIZE; + } + //RSA||RSAPSS + if (SIGNATURE_TYPE < 20){ + PUBKEY_LEN = CHUNK_NUMBER; + SIGNATURE_LEN = CHUNK_NUMBER; + } + + + // INPUT SIGNALS: + signal input encapsulatedContent[EC_BLOCK_NUMBER * HASH_BLOCK_SIZE]; + signal input dg1[DG1_LEN]; + signal input dg15[DG15_BLOCK_NUMBER * HASH_BLOCK_SIZE]; + signal input signedAttributes[SIGNED_ATTRIBUTES_LEN]; + signal input signature[SIGNATURE_LEN]; + signal input pubkey[PUBKEY_LEN]; + signal input slaveMerkleRoot; + signal input slaveMerkleInclusionBranches[TREE_DEPTH]; + signal input skIdentity; + + + signal output dg15PubKeyHash; + signal output passportHash; + signal output dg1Commitment; + signal output pkIdentityHash; + + dg15PubKeyHash <== 0; + passportHash <== 0; + dg1Commitment <== 0; + pkIdentityHash <== 0; + + + +} + + diff --git a/test/expression-visitor.test.ts b/test/expression-visitor.test.ts index 7991cf2..099b90e 100644 --- a/test/expression-visitor.test.ts +++ b/test/expression-visitor.test.ts @@ -28,4 +28,72 @@ describe("Circom Expression Visitor", () => { { name: "in2", dimensions: [10, 3] }, ]); }); + + it("should correctly change vars with 'if' logic -- #1", async () => { + const vars: Variables = { + SIGNATURE_TYPE: { value: 2n }, + DG_HASH_TYPE: { value: 3n }, + DOCUMENT_TYPE: { value: 3n }, + EC_BLOCK_NUMBER: { value: 3n }, + EC_SHIFT: { value: 3n }, + DG1_SHIFT: { value: 3n }, + AA_SIGNATURE_ALGO: { value: 3n }, + DG15_SHIFT: { value: 3n }, + DG15_BLOCK_NUMBER: { value: 3n }, + AA_SHIFT: { value: 3n }, + }; + + const visitor = new CircomSignalDeclarationVisitor(vars); + const parser = getCircomParser("test/data/curve.circom"); + + visitor.visit(parser.circuit()); + + expect(visitor.vars["TREE_DEPTH"]).to.deep.equal({ value: 80n }); + expect(visitor.vars["CHUNK_SIZE"]).to.deep.equal({ value: 64n }); + expect(visitor.vars["HASH_TYPE"]).to.deep.equal({ value: 256n }); + expect(visitor.vars["CHUNK_NUMBER"]).to.deep.equal({ value: 64n }); + expect(visitor.vars["HASH_TYPE"]).to.deep.equal({ value: 256n }); + expect(visitor.vars["DG_HASH_BLOCK_SIZE"]).to.deep.equal({ value: 512n }); + expect(visitor.vars["HASH_BLOCK_SIZE"]).to.deep.equal({ value: 512n }); + expect(visitor.vars["PUBKEY_LEN"]).to.deep.equal({ + value: 64n, + }); + expect(visitor.vars["SIGNATURE_LEN"]).to.deep.equal({ + value: 64n, + }); + }); + + it("should correctly change vars with 'if' logic -- #2", async () => { + const vars: Variables = { + SIGNATURE_TYPE: { value: 8n }, + DG_HASH_TYPE: { value: 8n }, + DOCUMENT_TYPE: { value: 512n }, + EC_BLOCK_NUMBER: { value: 256n }, + EC_SHIFT: { value: 2n }, + DG1_SHIFT: { value: 0n }, + AA_SIGNATURE_ALGO: { value: 17n }, + DG15_SHIFT: { value: 64n }, + DG15_BLOCK_NUMBER: { value: 64n }, + AA_SHIFT: { value: 256n }, + }; + + const visitor = new CircomSignalDeclarationVisitor(vars); + const parser = getCircomParser("test/data/curve.circom"); + + visitor.visit(parser.circuit()); + + expect(visitor.vars["TREE_DEPTH"]).to.deep.equal({ value: 80n }); + expect(visitor.vars["CHUNK_SIZE"]).to.deep.equal({ value: 64n }); + expect(visitor.vars["HASH_TYPE"]).to.deep.equal({ value: 256n }); + expect(visitor.vars["CHUNK_NUMBER"]).to.deep.equal({ value: 32n }); + expect(visitor.vars["HASH_TYPE"]).to.deep.equal({ value: 256n }); + expect(visitor.vars["DG_HASH_BLOCK_SIZE"]).to.deep.equal({ value: 512n }); + expect(visitor.vars["HASH_BLOCK_SIZE"]).to.deep.equal({ value: 512n }); + expect(visitor.vars["PUBKEY_LEN"]).to.deep.equal({ + value: 32n, + }); + expect(visitor.vars["SIGNATURE_LEN"]).to.deep.equal({ + value: 32n, + }); + }); }); diff --git a/test/mocks/CircomSignalDeclarationVisitor.ts b/test/mocks/CircomSignalDeclarationVisitor.ts index 913980b..bf68354 100644 --- a/test/mocks/CircomSignalDeclarationVisitor.ts +++ b/test/mocks/CircomSignalDeclarationVisitor.ts @@ -3,6 +3,11 @@ import { CircomVisitor, SignalDefinitionContext, resolveDimensions, + VarDeclarationContext, + VarDefinitionContext, + RhsValueContext, + CircomExpressionVisitor, + TemplateStmtContext, } from "../../src"; export class CircomSignalDeclarationVisitor extends CircomVisitor { @@ -11,9 +16,17 @@ export class CircomSignalDeclarationVisitor extends CircomVisitor { dimensions: number[]; }[]; - constructor(private _vars: Variables) { + vars: Variables = {}; + + constructor(vars: Variables) { super(); this.signalDeclarations = []; + + for (const key of Object.keys(vars)) { + this.vars[key] = { + value: vars[key].value, + }; + } } visitSignalDefinition = (ctx: SignalDefinitionContext) => { @@ -21,7 +34,7 @@ export class CircomSignalDeclarationVisitor extends CircomVisitor { const signalName = ctx.identifier().ID(0).getText(); const dimensions = resolveDimensions( ctx.identifier().arrayDimension_list(), - this._vars, + this.vars, ); this.signalDeclarations.push({ @@ -29,4 +42,128 @@ export class CircomSignalDeclarationVisitor extends CircomVisitor { dimensions: dimensions, }); }; + + visitTemplateStmt = (ctx: TemplateStmtContext) => { + if (ctx.identifier() && ctx.ASSIGNMENT() && ctx.expression(0)) { + const id = ctx.identifier().ID(0).getText(); + const value = new CircomExpressionVisitor( + true, + this.vars, + ).visitExpression(ctx.expression(0)); + + if (Array.isArray(value)) { + throw new Error( + `Currently, only single value assignment is supported - ${value}`, + ); + } + + this.vars[id] = { + value: value, + }; + + return; + } + + if (!ctx.IF()) { + this.visitChildren(ctx); + + return; + } + + const result = new CircomExpressionVisitor(true, this.vars).visitExpression( + ctx.parExpression().expression(), + ); + + if (Array.isArray(result)) { + throw new Error( + `Currently, only single value assignment is supported as a result inside if statement - ${result}`, + ); + } + + if (result === 1n) { + this.visitTemplateStmt(ctx.templateStmt(0)); + + return; + } + + if (result === 0n && !ctx.ELSE()) { + return; + } + + if (result === 0n && ctx.ELSE()) { + this.visitTemplateStmt(ctx.templateStmt(1)); + + return; + } + }; + + visitVarDeclaration = (ctx: VarDeclarationContext) => { + const vars = this._parseVarDefinition(ctx.varDefinition()); + + if (!ctx.ASSIGNMENT()) return; + + const results = this._parseRHSValue(ctx.rhsValue()); + + if (vars.length !== results.length) { + throw new Error( + `Mismatch between variable definitions and values - ${ctx.getText()}`, + ); + } + + vars.forEach((varName, index) => { + this.vars[varName] = { + value: results[index], + }; + }); + }; + + _parseVarDefinition = (ctx: VarDefinitionContext): string[] => { + return ctx + .identifier_list() + .map((identifier) => identifier.ID(0).getText()); + }; + + _parseRHSValue = (ctx: RhsValueContext): bigint[] => { + const expressionVisitor = new CircomExpressionVisitor(true, this.vars); + + if (ctx.expression()) { + const expressionResult = expressionVisitor.visitExpression( + ctx.expression(), + ); + + if (Array.isArray(expressionResult)) { + throw new Error( + `Currently, only single value assignment is supported - ${expressionResult}`, + ); + } + + return [expressionResult]; + } + + if (ctx.expressionList()) { + const expressionsResult: bigint[] = []; + + ctx + .expressionList() + .expression_list() + .forEach((expression) => { + const expressionResult = + expressionVisitor.visitExpression(expression); + + if (Array.isArray(expressionResult)) { + throw new Error( + `Currently, only single value assignment is supported - ${expressionResult}`, + ); + } + + expressionsResult.push(expressionResult); + }); + + return expressionsResult; + } + + throw new Error( + `RHS value as function call is not supported - ${ctx.getText()}`, + ); + }; }