diff --git a/circom-g4-grammar b/circom-g4-grammar index 4724b90..01da6d3 160000 --- a/circom-g4-grammar +++ b/circom-g4-grammar @@ -1 +1 @@ -Subproject commit 4724b902b088c714960255cc221b62d2f2820784 +Subproject commit 01da6d3b721ce77f609d393a5047a9042ecd4dd0 diff --git a/package-lock.json b/package-lock.json index 251105e..1772e1c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@distributedlab/circom-parser", - "version": "0.1.1", + "version": "0.1.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@distributedlab/circom-parser", - "version": "0.1.1", + "version": "0.1.2", "license": "MIT", "dependencies": { "antlr4": "4.13.1-patch-1", diff --git a/package.json b/package.json index 34c8e96..3ebb5ba 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.1", + "version": "0.1.2", "main": "dist/index.js", "types": "dist/index.d.ts", "files": [ diff --git a/src/ExtendedCircomParser.ts b/src/ExtendedCircomParser.ts index 730282f..fee9efa 100644 --- a/src/ExtendedCircomParser.ts +++ b/src/ExtendedCircomParser.ts @@ -1,10 +1,10 @@ import { Token } from "antlr4"; import * as antlr4 from "antlr4"; +import { ParserErrorItem } from "./types"; import { CircomLexer, CircomParser } from "./generated"; import ErrorListener from "./errors/ErrorListener"; -import { ParserErrorItem } from "./types"; export class ExtendedCircomParser extends CircomParser { lexer: CircomLexer | null = null; diff --git a/src/generated/CircomListener.ts b/src/generated/CircomListener.ts index 29714a5..3729e96 100644 --- a/src/generated/CircomListener.ts +++ b/src/generated/CircomListener.ts @@ -24,6 +24,7 @@ import { TemplateBlockContext } from "./CircomParser"; import { ComponentMainDeclarationContext } from "./CircomParser"; import { PublicInputsListContext } from "./CircomParser"; import { TemplateStmtContext } from "./CircomParser"; +import { ElementContext } from "./CircomParser"; import { ForControlContext } from "./CircomParser"; import { ForInitContext } from "./CircomParser"; import { ForUpdateContext } from "./CircomParser"; @@ -304,6 +305,16 @@ export default class CircomListener extends ParseTreeListener { * @param ctx the parse tree */ exitTemplateStmt?: (ctx: TemplateStmtContext) => void; + /** + * Enter a parse tree produced by `CircomParser.element`. + * @param ctx the parse tree + */ + enterElement?: (ctx: ElementContext) => void; + /** + * Exit a parse tree produced by `CircomParser.element`. + * @param ctx the parse tree + */ + exitElement?: (ctx: ElementContext) => void; /** * Enter a parse tree produced by `CircomParser.forControl`. * @param ctx the parse tree diff --git a/src/generated/CircomParser.ts b/src/generated/CircomParser.ts index 15411da..bd2a170 100644 --- a/src/generated/CircomParser.ts +++ b/src/generated/CircomParser.ts @@ -116,29 +116,30 @@ export default class CircomParser extends Parser { public static readonly RULE_componentMainDeclaration = 9; public static readonly RULE_publicInputsList = 10; public static readonly RULE_templateStmt = 11; - public static readonly RULE_forControl = 12; - public static readonly RULE_forInit = 13; - public static readonly RULE_forUpdate = 14; - public static readonly RULE_parExpression = 15; - public static readonly RULE_expression = 16; - public static readonly RULE_primary = 17; - public static readonly RULE_logStmt = 18; - public static readonly RULE_componentDefinition = 19; - public static readonly RULE_componentDeclaration = 20; - public static readonly RULE_signalDefinition = 21; - public static readonly RULE_tagList = 22; - public static readonly RULE_signalDeclaration = 23; - public static readonly RULE_varDefinition = 24; - public static readonly RULE_varDeclaration = 25; - public static readonly RULE_rhsValue = 26; - public static readonly RULE_componentCall = 27; - public static readonly RULE_blockInstantiation = 28; - public static readonly RULE_expressionList = 29; - public static readonly RULE_identifier = 30; - public static readonly RULE_arrayDimension = 31; - public static readonly RULE_args = 32; - public static readonly RULE_argsWithUnderscore = 33; - public static readonly RULE_numSequence = 34; + public static readonly RULE_element = 12; + public static readonly RULE_forControl = 13; + public static readonly RULE_forInit = 14; + public static readonly RULE_forUpdate = 15; + public static readonly RULE_parExpression = 16; + public static readonly RULE_expression = 17; + public static readonly RULE_primary = 18; + public static readonly RULE_logStmt = 19; + public static readonly RULE_componentDefinition = 20; + public static readonly RULE_componentDeclaration = 21; + public static readonly RULE_signalDefinition = 22; + public static readonly RULE_tagList = 23; + public static readonly RULE_signalDeclaration = 24; + public static readonly RULE_varDefinition = 25; + public static readonly RULE_varDeclaration = 26; + public static readonly RULE_rhsValue = 27; + public static readonly RULE_componentCall = 28; + public static readonly RULE_blockInstantiation = 29; + public static readonly RULE_expressionList = 30; + public static readonly RULE_identifier = 31; + public static readonly RULE_arrayDimension = 32; + public static readonly RULE_args = 33; + public static readonly RULE_argsWithUnderscore = 34; + public static readonly RULE_numSequence = 35; public static readonly literalNames: (string | null)[] = [ null, null, @@ -296,6 +297,7 @@ export default class CircomParser extends Parser { "componentMainDeclaration", "publicInputsList", "templateStmt", + "element", "forControl", "forInit", "forUpdate", @@ -364,59 +366,59 @@ export default class CircomParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 73; + this.state = 75; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === 21) { { { - this.state = 70; + this.state = 72; this.pragmaDeclaration(); } } - this.state = 75; + this.state = 77; this._errHandler.sync(this); _la = this._input.LA(1); } - this.state = 79; + this.state = 81; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === 19) { { { - this.state = 76; + this.state = 78; this.includeDeclaration(); } } - this.state = 81; + this.state = 83; this._errHandler.sync(this); _la = this._input.LA(1); } - this.state = 85; + this.state = 87; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === 7 || _la === 10) { { { - this.state = 82; + this.state = 84; this.blockDeclaration(); } } - this.state = 87; + this.state = 89; this._errHandler.sync(this); _la = this._input.LA(1); } - this.state = 89; + this.state = 91; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === 8) { { - this.state = 88; + this.state = 90; this.componentMainDeclaration(); } } - this.state = 91; + this.state = 93; this.match(CircomParser.EOF); } } catch (re) { @@ -441,30 +443,30 @@ export default class CircomParser extends Parser { ); this.enterRule(localctx, 2, CircomParser.RULE_pragmaDeclaration); try { - this.state = 100; + this.state = 102; this._errHandler.sync(this); switch (this._interp.adaptivePredict(this._input, 4, this._ctx)) { case 1: this.enterOuterAlt(localctx, 1); { - this.state = 93; + this.state = 95; this.match(CircomParser.PRAGMA); - this.state = 94; + this.state = 96; this.match(CircomParser.CIRCOM); - this.state = 95; + this.state = 97; this.match(CircomParser.VERSION); - this.state = 96; + this.state = 98; this.match(CircomParser.SEMICOLON); } break; case 2: this.enterOuterAlt(localctx, 2); { - this.state = 97; + this.state = 99; this.match(CircomParser.PRAGMA); - this.state = 98; + this.state = 100; this.match(CircomParser.CUSTOM_TEMPLATES); - this.state = 99; + this.state = 101; this.match(CircomParser.SEMICOLON); } break; @@ -493,11 +495,11 @@ export default class CircomParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 102; + this.state = 104; this.match(CircomParser.INCLUDE); - this.state = 103; + this.state = 105; this.match(CircomParser.STRING); - this.state = 104; + this.state = 106; this.match(CircomParser.SEMICOLON); } } catch (re) { @@ -522,20 +524,20 @@ export default class CircomParser extends Parser { ); this.enterRule(localctx, 6, CircomParser.RULE_blockDeclaration); try { - this.state = 108; + this.state = 110; this._errHandler.sync(this); switch (this._input.LA(1)) { case 10: this.enterOuterAlt(localctx, 1); { - this.state = 106; + this.state = 108; this.functionDeclaration(); } break; case 7: this.enterOuterAlt(localctx, 2); { - this.state = 107; + this.state = 109; this.templateDeclaration(); } break; @@ -567,25 +569,25 @@ export default class CircomParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 110; + this.state = 112; this.match(CircomParser.FUNCTION); - this.state = 111; + this.state = 113; this.match(CircomParser.ID); - this.state = 112; - this.match(CircomParser.LP); this.state = 114; + this.match(CircomParser.LP); + this.state = 116; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === 66) { { - this.state = 113; + this.state = 115; this.args(); } } - this.state = 116; + this.state = 118; this.match(CircomParser.RP); - this.state = 117; + this.state = 119; this.functionBlock(); } } catch (re) { @@ -613,9 +615,9 @@ export default class CircomParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 119; + this.state = 121; this.match(CircomParser.LC); - this.state = 123; + this.state = 125; this._errHandler.sync(this); _la = this._input.LA(1); while ( @@ -624,15 +626,15 @@ export default class CircomParser extends Parser { ) { { { - this.state = 120; + this.state = 122; this.functionStmt(); } } - this.state = 125; + this.state = 127; this._errHandler.sync(this); _la = this._input.LA(1); } - this.state = 126; + this.state = 128; this.match(CircomParser.RC); } } catch (re) { @@ -658,14 +660,14 @@ export default class CircomParser extends Parser { this.enterRule(localctx, 12, CircomParser.RULE_functionStmt); let _la: number; try { - this.state = 175; + this.state = 177; this._errHandler.sync(this); switch (this._interp.adaptivePredict(this._input, 9, this._ctx)) { case 1: localctx = new FuncBlockContext(this, localctx); this.enterOuterAlt(localctx, 1); { - this.state = 128; + this.state = 130; this.functionBlock(); } break; @@ -673,11 +675,11 @@ export default class CircomParser extends Parser { localctx = new FuncSelfOpContext(this, localctx); this.enterOuterAlt(localctx, 2); { - this.state = 129; + this.state = 131; this.match(CircomParser.ID); - this.state = 130; + this.state = 132; this.match(CircomParser.SELF_OP); - this.state = 131; + this.state = 133; this.match(CircomParser.SEMICOLON); } break; @@ -685,9 +687,9 @@ export default class CircomParser extends Parser { localctx = new FuncVarDeclarationContext(this, localctx); this.enterOuterAlt(localctx, 3); { - this.state = 132; + this.state = 134; this.varDeclaration(); - this.state = 133; + this.state = 135; this.match(CircomParser.SEMICOLON); } break; @@ -695,9 +697,9 @@ export default class CircomParser extends Parser { localctx = new FuncAssignmentExpressionContext(this, localctx); this.enterOuterAlt(localctx, 4); { - this.state = 135; + this.state = 137; this.identifier(); - this.state = 136; + this.state = 138; _la = this._input.LA(1); if (!(_la === 36 || _la === 37)) { this._errHandler.recoverInline(this); @@ -705,9 +707,9 @@ export default class CircomParser extends Parser { this._errHandler.reportMatch(this); this.consume(); } - this.state = 137; + this.state = 139; this.expression(0); - this.state = 138; + this.state = 140; this.match(CircomParser.SEMICOLON); } break; @@ -715,17 +717,17 @@ export default class CircomParser extends Parser { localctx = new FuncVariadicAssignmentContext(this, localctx); this.enterOuterAlt(localctx, 5); { - this.state = 140; + this.state = 142; this.match(CircomParser.LP); - this.state = 141; + this.state = 143; this.argsWithUnderscore(); - this.state = 142; + this.state = 144; this.match(CircomParser.RP); - this.state = 143; + this.state = 145; this.match(CircomParser.ASSIGNMENT); - this.state = 144; + this.state = 146; this.expression(0); - this.state = 145; + this.state = 147; this.match(CircomParser.SEMICOLON); } break; @@ -733,20 +735,20 @@ export default class CircomParser extends Parser { localctx = new IfFuncStmtContext(this, localctx); this.enterOuterAlt(localctx, 6); { - this.state = 147; + this.state = 149; this.match(CircomParser.IF); - this.state = 148; + this.state = 150; this.parExpression(); - this.state = 149; + this.state = 151; this.functionStmt(); - this.state = 152; + this.state = 154; this._errHandler.sync(this); switch (this._interp.adaptivePredict(this._input, 8, this._ctx)) { case 1: { - this.state = 150; + this.state = 152; this.match(CircomParser.ELSE); - this.state = 151; + this.state = 153; this.functionStmt(); } break; @@ -757,11 +759,11 @@ export default class CircomParser extends Parser { localctx = new WhileFuncStmtContext(this, localctx); this.enterOuterAlt(localctx, 7); { - this.state = 154; + this.state = 156; this.match(CircomParser.WHILE); - this.state = 155; + this.state = 157; this.parExpression(); - this.state = 156; + this.state = 158; this.functionStmt(); } break; @@ -769,15 +771,15 @@ export default class CircomParser extends Parser { localctx = new ForFuncStmtContext(this, localctx); this.enterOuterAlt(localctx, 8); { - this.state = 158; + this.state = 160; this.match(CircomParser.FOR); - this.state = 159; + this.state = 161; this.match(CircomParser.LP); - this.state = 160; + this.state = 162; this.forControl(); - this.state = 161; + this.state = 163; this.match(CircomParser.RP); - this.state = 162; + this.state = 164; this.functionStmt(); } break; @@ -785,11 +787,11 @@ export default class CircomParser extends Parser { localctx = new ReturnFuncStmtContext(this, localctx); this.enterOuterAlt(localctx, 9); { - this.state = 164; + this.state = 166; this.match(CircomParser.RETURN); - this.state = 165; + this.state = 167; this.expression(0); - this.state = 166; + this.state = 168; this.match(CircomParser.SEMICOLON); } break; @@ -797,11 +799,11 @@ export default class CircomParser extends Parser { localctx = new AssertFuncStmtContext(this, localctx); this.enterOuterAlt(localctx, 10); { - this.state = 168; + this.state = 170; this.match(CircomParser.ASSERT); - this.state = 169; + this.state = 171; this.parExpression(); - this.state = 170; + this.state = 172; this.match(CircomParser.SEMICOLON); } break; @@ -809,9 +811,9 @@ export default class CircomParser extends Parser { localctx = new LogFuncStmtContext(this, localctx); this.enterOuterAlt(localctx, 11); { - this.state = 172; + this.state = 174; this.logStmt(); - this.state = 173; + this.state = 175; this.match(CircomParser.SEMICOLON); } break; @@ -841,45 +843,45 @@ export default class CircomParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 177; - this.match(CircomParser.TEMPLATE); this.state = 179; + this.match(CircomParser.TEMPLATE); + this.state = 181; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === 20) { { - this.state = 178; + this.state = 180; this.match(CircomParser.CUSTOM); } } - this.state = 182; + this.state = 184; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === 25) { { - this.state = 181; + this.state = 183; this.match(CircomParser.PARALLEL); } } - this.state = 184; + this.state = 186; this.match(CircomParser.ID); - this.state = 185; - this.match(CircomParser.LP); this.state = 187; + this.match(CircomParser.LP); + this.state = 189; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === 66) { { - this.state = 186; + this.state = 188; this.args(); } } - this.state = 189; + this.state = 191; this.match(CircomParser.RP); - this.state = 190; + this.state = 192; this.templateBlock(); } } catch (re) { @@ -907,9 +909,9 @@ export default class CircomParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 192; + this.state = 194; this.match(CircomParser.LC); - this.state = 196; + this.state = 198; this._errHandler.sync(this); _la = this._input.LA(1); while ( @@ -918,15 +920,15 @@ export default class CircomParser extends Parser { ) { { { - this.state = 193; + this.state = 195; this.templateStmt(); } } - this.state = 198; + this.state = 200; this._errHandler.sync(this); _la = this._input.LA(1); } - this.state = 199; + this.state = 201; this.match(CircomParser.RC); } } catch (re) { @@ -951,27 +953,27 @@ export default class CircomParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 201; + this.state = 203; this.match(CircomParser.COMPONENT); - this.state = 202; - this.match(CircomParser.MAIN); this.state = 204; + this.match(CircomParser.MAIN); + this.state = 206; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === 30) { { - this.state = 203; + this.state = 205; this.publicInputsList(); } } - this.state = 206; + this.state = 208; this.match(CircomParser.ASSIGNMENT); - this.state = 207; + this.state = 209; this.match(CircomParser.ID); - this.state = 208; - this.match(CircomParser.LP); this.state = 210; + this.match(CircomParser.LP); + this.state = 212; this._errHandler.sync(this); _la = this._input.LA(1); if ( @@ -979,14 +981,14 @@ export default class CircomParser extends Parser { (((_la - 44) & ~0x1f) === 0 && ((1 << (_la - 44)) & 12583171) !== 0) ) { { - this.state = 209; + this.state = 211; this.expressionList(); } } - this.state = 212; + this.state = 214; this.match(CircomParser.RP); - this.state = 213; + this.state = 215; this.match(CircomParser.SEMICOLON); } } catch (re) { @@ -1013,17 +1015,17 @@ export default class CircomParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 215; + this.state = 217; this.match(CircomParser.LC); - this.state = 216; + this.state = 218; this.match(CircomParser.PUBLIC); - this.state = 217; + this.state = 219; this.match(CircomParser.LB); - this.state = 218; + this.state = 220; this.args(); - this.state = 219; + this.state = 221; this.match(CircomParser.RB); - this.state = 220; + this.state = 222; this.match(CircomParser.RC); } } catch (re) { @@ -1049,60 +1051,60 @@ export default class CircomParser extends Parser { this.enterRule(localctx, 22, CircomParser.RULE_templateStmt); let _la: number; try { - this.state = 329; + this.state = 349; this._errHandler.sync(this); switch (this._interp.adaptivePredict(this._input, 23, this._ctx)) { case 1: this.enterOuterAlt(localctx, 1); { - this.state = 222; + this.state = 224; this.templateBlock(); } break; case 2: this.enterOuterAlt(localctx, 2); { - this.state = 223; + this.state = 225; this.match(CircomParser.ID); - this.state = 224; + this.state = 226; this.match(CircomParser.SELF_OP); - this.state = 225; + this.state = 227; this.match(CircomParser.SEMICOLON); } break; case 3: this.enterOuterAlt(localctx, 3); { - this.state = 226; + this.state = 228; this.varDeclaration(); - this.state = 227; + this.state = 229; this.match(CircomParser.SEMICOLON); } break; case 4: this.enterOuterAlt(localctx, 4); { - this.state = 229; + this.state = 231; this.signalDeclaration(); - this.state = 230; + this.state = 232; this.match(CircomParser.SEMICOLON); } break; case 5: this.enterOuterAlt(localctx, 5); { - this.state = 232; + this.state = 234; this.componentDeclaration(); - this.state = 233; + this.state = 235; this.match(CircomParser.SEMICOLON); } break; case 6: this.enterOuterAlt(localctx, 6); { - this.state = 235; + this.state = 237; this.blockInstantiation(); - this.state = 236; + this.state = 238; this.match(CircomParser.SEMICOLON); } break; @@ -1110,67 +1112,47 @@ export default class CircomParser extends Parser { this.enterOuterAlt(localctx, 7); { { - this.state = 238; + this.state = 240; this.identifier(); - this.state = 241; + this.state = 243; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === 34) { { - this.state = 239; + this.state = 241; this.match(CircomParser.DOT); - this.state = 240; + this.state = 242; this.match(CircomParser.ID); } } } - this.state = 243; + this.state = 245; this.match(CircomParser.ASSIGNMENT); - this.state = 244; + this.state = 246; this.expression(0); - this.state = 245; + this.state = 247; this.match(CircomParser.SEMICOLON); } break; case 8: this.enterOuterAlt(localctx, 8); { - this.state = 247; - this.expression(0); - this.state = 248; - this.match(CircomParser.CONSTRAINT_EQ); this.state = 249; this.expression(0); this.state = 250; + this.match(CircomParser.CONSTRAINT_EQ); + this.state = 251; + this.expression(0); + this.state = 252; this.match(CircomParser.SEMICOLON); } break; case 9: this.enterOuterAlt(localctx, 9); { - this.state = 257; - this._errHandler.sync(this); - switch (this._interp.adaptivePredict(this._input, 17, this._ctx)) { - case 1: - { - this.state = 252; - this.primary(); - } - break; - case 2: - { - { - this.state = 253; - this.identifier(); - this.state = 254; - this.match(CircomParser.DOT); - this.state = 255; - this.identifier(); - } - } - break; - } - this.state = 259; + this.state = 254; + this.element(); + this.state = 255; _la = this._input.LA(1); if (!(_la === 37 || _la === 39)) { this._errHandler.recoverInline(this); @@ -1178,44 +1160,97 @@ export default class CircomParser extends Parser { this._errHandler.reportMatch(this); this.consume(); } - this.state = 260; + this.state = 256; this.expression(0); - this.state = 261; + this.state = 257; this.match(CircomParser.SEMICOLON); } break; case 10: this.enterOuterAlt(localctx, 10); { - this.state = 263; - this.expression(0); - this.state = 264; - this.match(CircomParser.RIGHT_ASSIGNMENT); - { - this.state = 265; - this.identifier(); - this.state = 268; - this._errHandler.sync(this); - _la = this._input.LA(1); - if (_la === 34) { + this.state = 259; + this.match(CircomParser.LP); + this.state = 260; + this.element(); + this.state = 265; + this._errHandler.sync(this); + _la = this._input.LA(1); + while (_la === 35) { + { { - this.state = 266; - this.match(CircomParser.DOT); - this.state = 267; - this.identifier(); + this.state = 261; + this.match(CircomParser.COMMA); + this.state = 262; + this.element(); } } + this.state = 267; + this._errHandler.sync(this); + _la = this._input.LA(1); } + this.state = 268; + this.match(CircomParser.RP); + this.state = 269; + this.match(CircomParser.LEFT_ASSIGNMENT); this.state = 270; + this.expression(0); + this.state = 271; this.match(CircomParser.SEMICOLON); } break; case 11: this.enterOuterAlt(localctx, 11); { - this.state = 272; - this.match(CircomParser.UNDERSCORE); this.state = 273; + this.expression(0); + this.state = 274; + this.match(CircomParser.RIGHT_ASSIGNMENT); + this.state = 275; + this.element(); + this.state = 276; + this.match(CircomParser.SEMICOLON); + } + break; + case 12: + this.enterOuterAlt(localctx, 12); + { + this.state = 278; + this.expression(0); + this.state = 279; + this.match(CircomParser.RIGHT_ASSIGNMENT); + this.state = 280; + this.match(CircomParser.LP); + this.state = 281; + this.element(); + this.state = 286; + this._errHandler.sync(this); + _la = this._input.LA(1); + while (_la === 35) { + { + { + this.state = 282; + this.match(CircomParser.COMMA); + this.state = 283; + this.element(); + } + } + this.state = 288; + this._errHandler.sync(this); + _la = this._input.LA(1); + } + this.state = 289; + this.match(CircomParser.RP); + this.state = 290; + this.match(CircomParser.SEMICOLON); + } + break; + case 13: + this.enterOuterAlt(localctx, 13); + { + this.state = 292; + this.match(CircomParser.UNDERSCORE); + this.state = 293; _la = this._input.LA(1); if (!(_la === 36 || _la === 39)) { this._errHandler.recoverInline(this); @@ -1223,63 +1258,63 @@ export default class CircomParser extends Parser { this._errHandler.reportMatch(this); this.consume(); } - this.state = 276; + this.state = 296; this._errHandler.sync(this); switch (this._interp.adaptivePredict(this._input, 19, this._ctx)) { case 1: { - this.state = 274; + this.state = 294; this.expression(0); } break; case 2: { - this.state = 275; + this.state = 295; this.blockInstantiation(); } break; } - this.state = 278; + this.state = 298; this.match(CircomParser.SEMICOLON); } break; - case 12: - this.enterOuterAlt(localctx, 12); + case 14: + this.enterOuterAlt(localctx, 14); { - this.state = 282; + this.state = 302; this._errHandler.sync(this); switch (this._interp.adaptivePredict(this._input, 20, this._ctx)) { case 1: { - this.state = 280; + this.state = 300; this.expression(0); } break; case 2: { - this.state = 281; + this.state = 301; this.blockInstantiation(); } break; } - this.state = 284; + this.state = 304; this.match(CircomParser.RIGHT_ASSIGNMENT); - this.state = 285; + this.state = 305; this.match(CircomParser.UNDERSCORE); - this.state = 286; + this.state = 306; this.match(CircomParser.SEMICOLON); } break; - case 13: - this.enterOuterAlt(localctx, 13); + case 15: + this.enterOuterAlt(localctx, 15); { - this.state = 288; + this.state = 308; this.match(CircomParser.LP); - this.state = 289; + this.state = 309; this.argsWithUnderscore(); - this.state = 290; + this.state = 310; this.match(CircomParser.RP); - this.state = 291; + this.state = 311; _la = this._input.LA(1); if (!(_la === 36 || _la === 39)) { this._errHandler.recoverInline(this); @@ -1287,109 +1322,109 @@ export default class CircomParser extends Parser { this._errHandler.reportMatch(this); this.consume(); } - this.state = 294; + this.state = 314; this._errHandler.sync(this); switch (this._interp.adaptivePredict(this._input, 21, this._ctx)) { case 1: { - this.state = 292; + this.state = 312; this.blockInstantiation(); } break; case 2: { - this.state = 293; + this.state = 313; this.expression(0); } break; } - this.state = 296; + this.state = 316; this.match(CircomParser.SEMICOLON); } break; - case 14: - this.enterOuterAlt(localctx, 14); + case 16: + this.enterOuterAlt(localctx, 16); { - this.state = 298; + this.state = 318; this.blockInstantiation(); - this.state = 299; + this.state = 319; this.match(CircomParser.RIGHT_ASSIGNMENT); - this.state = 300; + this.state = 320; this.match(CircomParser.LP); - this.state = 301; + this.state = 321; this.argsWithUnderscore(); - this.state = 302; + this.state = 322; this.match(CircomParser.RP); - this.state = 303; + this.state = 323; this.match(CircomParser.SEMICOLON); } break; - case 15: - this.enterOuterAlt(localctx, 15); + case 17: + this.enterOuterAlt(localctx, 17); { - this.state = 305; + this.state = 325; this.match(CircomParser.IF); - this.state = 306; + this.state = 326; this.parExpression(); - this.state = 307; + this.state = 327; this.templateStmt(); - this.state = 310; + this.state = 330; this._errHandler.sync(this); switch (this._interp.adaptivePredict(this._input, 22, this._ctx)) { case 1: { - this.state = 308; + this.state = 328; this.match(CircomParser.ELSE); - this.state = 309; + this.state = 329; this.templateStmt(); } break; } } break; - case 16: - this.enterOuterAlt(localctx, 16); + case 18: + this.enterOuterAlt(localctx, 18); { - this.state = 312; + this.state = 332; this.match(CircomParser.WHILE); - this.state = 313; + this.state = 333; this.parExpression(); - this.state = 314; + this.state = 334; this.templateStmt(); } break; - case 17: - this.enterOuterAlt(localctx, 17); + case 19: + this.enterOuterAlt(localctx, 19); { - this.state = 316; + this.state = 336; this.match(CircomParser.FOR); - this.state = 317; + this.state = 337; this.match(CircomParser.LP); - this.state = 318; + this.state = 338; this.forControl(); - this.state = 319; + this.state = 339; this.match(CircomParser.RP); - this.state = 320; + this.state = 340; this.templateStmt(); } break; - case 18: - this.enterOuterAlt(localctx, 18); + case 20: + this.enterOuterAlt(localctx, 20); { - this.state = 322; + this.state = 342; this.match(CircomParser.ASSERT); - this.state = 323; + this.state = 343; this.parExpression(); - this.state = 324; + this.state = 344; this.match(CircomParser.SEMICOLON); } break; - case 19: - this.enterOuterAlt(localctx, 19); + case 21: + this.enterOuterAlt(localctx, 21); { - this.state = 326; + this.state = 346; this.logStmt(); - this.state = 327; + this.state = 347; this.match(CircomParser.SEMICOLON); } break; @@ -1408,25 +1443,66 @@ export default class CircomParser extends Parser { return localctx; } // @RuleVersion(0) + public element(): ElementContext { + let localctx: ElementContext = new ElementContext( + this, + this._ctx, + this.state, + ); + this.enterRule(localctx, 24, CircomParser.RULE_element); + let _la: number; + try { + this.enterOuterAlt(localctx, 1); + { + { + this.state = 351; + this.identifier(); + this.state = 354; + this._errHandler.sync(this); + _la = this._input.LA(1); + if (_la === 34) { + { + this.state = 352; + this.match(CircomParser.DOT); + this.state = 353; + this.identifier(); + } + } + } + } + } catch (re) { + if (re instanceof RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + // @RuleVersion(0) public forControl(): ForControlContext { let localctx: ForControlContext = new ForControlContext( this, this._ctx, this.state, ); - this.enterRule(localctx, 24, CircomParser.RULE_forControl); + this.enterRule(localctx, 26, CircomParser.RULE_forControl); try { this.enterOuterAlt(localctx, 1); { - this.state = 331; + this.state = 356; this.forInit(); - this.state = 332; + this.state = 357; this.match(CircomParser.SEMICOLON); - this.state = 333; + this.state = 358; this.expression(0); - this.state = 334; + this.state = 359; this.match(CircomParser.SEMICOLON); - this.state = 335; + this.state = 360; this.forUpdate(); } } catch (re) { @@ -1449,31 +1525,31 @@ export default class CircomParser extends Parser { this._ctx, this.state, ); - this.enterRule(localctx, 26, CircomParser.RULE_forInit); + this.enterRule(localctx, 28, CircomParser.RULE_forInit); let _la: number; try { this.enterOuterAlt(localctx, 1); { - this.state = 338; + this.state = 363; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === 9) { { - this.state = 337; + this.state = 362; this.match(CircomParser.VAR); } } - this.state = 340; + this.state = 365; this.identifier(); - this.state = 343; + this.state = 368; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === 36) { { - this.state = 341; + this.state = 366; this.match(CircomParser.ASSIGNMENT); - this.state = 342; + this.state = 367; this.rhsValue(); } } @@ -1498,23 +1574,23 @@ export default class CircomParser extends Parser { this._ctx, this.state, ); - this.enterRule(localctx, 28, CircomParser.RULE_forUpdate); + this.enterRule(localctx, 30, CircomParser.RULE_forUpdate); let _la: number; try { - this.state = 353; + this.state = 378; this._errHandler.sync(this); switch (this._input.LA(1)) { case 66: this.enterOuterAlt(localctx, 1); { - this.state = 345; + this.state = 370; this.match(CircomParser.ID); - this.state = 349; + this.state = 374; this._errHandler.sync(this); switch (this._input.LA(1)) { case 38: { - this.state = 346; + this.state = 371; this.match(CircomParser.SELF_OP); } break; @@ -1522,7 +1598,7 @@ export default class CircomParser extends Parser { case 37: { { - this.state = 347; + this.state = 372; _la = this._input.LA(1); if (!(_la === 36 || _la === 37)) { this._errHandler.recoverInline(this); @@ -1530,7 +1606,7 @@ export default class CircomParser extends Parser { this._errHandler.reportMatch(this); this.consume(); } - this.state = 348; + this.state = 373; this.expression(0); } } @@ -1543,9 +1619,9 @@ export default class CircomParser extends Parser { case 38: this.enterOuterAlt(localctx, 2); { - this.state = 351; + this.state = 376; this.match(CircomParser.SELF_OP); - this.state = 352; + this.state = 377; this.match(CircomParser.ID); } break; @@ -1572,15 +1648,15 @@ export default class CircomParser extends Parser { this._ctx, this.state, ); - this.enterRule(localctx, 30, CircomParser.RULE_parExpression); + this.enterRule(localctx, 32, CircomParser.RULE_parExpression); try { this.enterOuterAlt(localctx, 1); { - this.state = 355; + this.state = 380; this.match(CircomParser.LP); - this.state = 356; + this.state = 381; this.expression(0); - this.state = 357; + this.state = 382; this.match(CircomParser.RP); } } catch (re) { @@ -1613,23 +1689,23 @@ export default class CircomParser extends Parser { _parentState, ); let _prevctx: ExpressionContext = localctx; - let _startState: number = 32; - this.enterRecursionRule(localctx, 32, CircomParser.RULE_expression, _p); + let _startState: number = 34; + this.enterRecursionRule(localctx, 34, CircomParser.RULE_expression, _p); let _la: number; try { let _alt: number; this.enterOuterAlt(localctx, 1); { - this.state = 364; + this.state = 389; this._errHandler.sync(this); - switch (this._interp.adaptivePredict(this._input, 28, this._ctx)) { + switch (this._interp.adaptivePredict(this._input, 29, this._ctx)) { case 1: { localctx = new PrimaryExpressionContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 360; + this.state = 385; this.primary(); } break; @@ -1641,7 +1717,7 @@ export default class CircomParser extends Parser { ); this._ctx = localctx; _prevctx = localctx; - this.state = 361; + this.state = 386; this.blockInstantiation(); } break; @@ -1650,7 +1726,7 @@ export default class CircomParser extends Parser { localctx = new UnaryExpressionContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 362; + this.state = 387; (localctx as UnaryExpressionContext)._op = this._input.LT(1); _la = this._input.LA(1); if ( @@ -1662,15 +1738,15 @@ export default class CircomParser extends Parser { this._errHandler.reportMatch(this); this.consume(); } - this.state = 363; + this.state = 388; this.expression(7); } break; } this._ctx.stop = this._input.LT(-1); - this.state = 398; + this.state = 423; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input, 31, this._ctx); + _alt = this._interp.adaptivePredict(this._input, 32, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { if (this._parseListeners != null) { @@ -1678,10 +1754,10 @@ export default class CircomParser extends Parser { } _prevctx = localctx; { - this.state = 396; + this.state = 421; this._errHandler.sync(this); switch ( - this._interp.adaptivePredict(this._input, 30, this._ctx) + this._interp.adaptivePredict(this._input, 31, this._ctx) ) { case 1: { @@ -1694,13 +1770,13 @@ export default class CircomParser extends Parser { _startState, CircomParser.RULE_expression, ); - this.state = 366; + this.state = 391; if (!this.precpred(this._ctx, 6)) { throw this.createFailedPredicateException( "this.precpred(this._ctx, 6)", ); } - this.state = 367; + this.state = 392; (localctx as BinaryExpressionContext)._op = this._input.LT(1); _la = this._input.LA(1); @@ -1716,7 +1792,7 @@ export default class CircomParser extends Parser { this._errHandler.reportMatch(this); this.consume(); } - this.state = 368; + this.state = 393; this.expression(7); } break; @@ -1731,13 +1807,13 @@ export default class CircomParser extends Parser { _startState, CircomParser.RULE_expression, ); - this.state = 369; + this.state = 394; if (!this.precpred(this._ctx, 5)) { throw this.createFailedPredicateException( "this.precpred(this._ctx, 5)", ); } - this.state = 370; + this.state = 395; (localctx as BinaryExpressionContext)._op = this._input.LT(1); _la = this._input.LA(1); @@ -1748,7 +1824,7 @@ export default class CircomParser extends Parser { this._errHandler.reportMatch(this); this.consume(); } - this.state = 371; + this.state = 396; this.expression(6); } break; @@ -1763,13 +1839,13 @@ export default class CircomParser extends Parser { _startState, CircomParser.RULE_expression, ); - this.state = 372; + this.state = 397; if (!this.precpred(this._ctx, 4)) { throw this.createFailedPredicateException( "this.precpred(this._ctx, 4)", ); } - this.state = 373; + this.state = 398; (localctx as BinaryExpressionContext)._op = this._input.LT(1); _la = this._input.LA(1); @@ -1780,7 +1856,7 @@ export default class CircomParser extends Parser { this._errHandler.reportMatch(this); this.consume(); } - this.state = 374; + this.state = 399; this.expression(5); } break; @@ -1795,13 +1871,13 @@ export default class CircomParser extends Parser { _startState, CircomParser.RULE_expression, ); - this.state = 375; + this.state = 400; if (!this.precpred(this._ctx, 3)) { throw this.createFailedPredicateException( "this.precpred(this._ctx, 3)", ); } - this.state = 376; + this.state = 401; (localctx as BinaryExpressionContext)._op = this._input.LT(1); _la = this._input.LA(1); @@ -1817,7 +1893,7 @@ export default class CircomParser extends Parser { this._errHandler.reportMatch(this); this.consume(); } - this.state = 377; + this.state = 402; this.expression(4); } break; @@ -1832,13 +1908,13 @@ export default class CircomParser extends Parser { _startState, CircomParser.RULE_expression, ); - this.state = 378; + this.state = 403; if (!this.precpred(this._ctx, 2)) { throw this.createFailedPredicateException( "this.precpred(this._ctx, 2)", ); } - this.state = 379; + this.state = 404; (localctx as BinaryExpressionContext)._op = this._input.LT(1); _la = this._input.LA(1); @@ -1854,7 +1930,7 @@ export default class CircomParser extends Parser { this._errHandler.reportMatch(this); this.consume(); } - this.state = 380; + this.state = 405; this.expression(3); } break; @@ -1869,19 +1945,19 @@ export default class CircomParser extends Parser { _startState, CircomParser.RULE_expression, ); - this.state = 381; + this.state = 406; if (!this.precpred(this._ctx, 1)) { throw this.createFailedPredicateException( "this.precpred(this._ctx, 1)", ); } - this.state = 382; + this.state = 407; this.match(CircomParser.QUESTION_MARK); - this.state = 383; + this.state = 408; this.expression(0); - this.state = 384; + this.state = 409; this.match(CircomParser.COLON); - this.state = 385; + this.state = 410; this.expression(2); } break; @@ -1896,28 +1972,28 @@ export default class CircomParser extends Parser { _startState, CircomParser.RULE_expression, ); - this.state = 387; + this.state = 412; if (!this.precpred(this._ctx, 8)) { throw this.createFailedPredicateException( "this.precpred(this._ctx, 8)", ); } - this.state = 388; + this.state = 413; this.match(CircomParser.DOT); - this.state = 389; + this.state = 414; this.match(CircomParser.ID); - this.state = 394; + this.state = 419; this._errHandler.sync(this); switch ( - this._interp.adaptivePredict(this._input, 29, this._ctx) + this._interp.adaptivePredict(this._input, 30, this._ctx) ) { case 1: { - this.state = 390; + this.state = 415; this.match(CircomParser.LB); - this.state = 391; + this.state = 416; this.expression(0); - this.state = 392; + this.state = 417; this.match(CircomParser.RB); } break; @@ -1927,9 +2003,9 @@ export default class CircomParser extends Parser { } } } - this.state = 400; + this.state = 425; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input, 31, this._ctx); + _alt = this._interp.adaptivePredict(this._input, 32, this._ctx); } } } catch (re) { @@ -1952,58 +2028,58 @@ export default class CircomParser extends Parser { this._ctx, this.state, ); - this.enterRule(localctx, 34, CircomParser.RULE_primary); + this.enterRule(localctx, 36, CircomParser.RULE_primary); try { - this.state = 413; + this.state = 438; this._errHandler.sync(this); - switch (this._interp.adaptivePredict(this._input, 32, this._ctx)) { + switch (this._interp.adaptivePredict(this._input, 33, this._ctx)) { case 1: this.enterOuterAlt(localctx, 1); { - this.state = 401; + this.state = 426; this.match(CircomParser.LP); - this.state = 402; + this.state = 427; this.expression(0); - this.state = 403; + this.state = 428; this.match(CircomParser.RP); } break; case 2: this.enterOuterAlt(localctx, 2); { - this.state = 405; + this.state = 430; this.match(CircomParser.LB); - this.state = 406; + this.state = 431; this.expressionList(); - this.state = 407; + this.state = 432; this.match(CircomParser.RB); } break; case 3: this.enterOuterAlt(localctx, 3); { - this.state = 409; + this.state = 434; this.match(CircomParser.NUMBER); } break; case 4: this.enterOuterAlt(localctx, 4); { - this.state = 410; + this.state = 435; this.identifier(); } break; case 5: this.enterOuterAlt(localctx, 5); { - this.state = 411; + this.state = 436; this.args(); } break; case 6: this.enterOuterAlt(localctx, 6); { - this.state = 412; + this.state = 437; this.numSequence(); } break; @@ -2028,20 +2104,20 @@ export default class CircomParser extends Parser { this._ctx, this.state, ); - this.enterRule(localctx, 36, CircomParser.RULE_logStmt); + this.enterRule(localctx, 38, CircomParser.RULE_logStmt); try { this.enterOuterAlt(localctx, 1); { - this.state = 415; + this.state = 440; this.match(CircomParser.LOG); - this.state = 416; + this.state = 441; this.match(CircomParser.LP); - this.state = 419; + this.state = 444; this._errHandler.sync(this); switch (this._input.LA(1)) { case 69: { - this.state = 417; + this.state = 442; this.match(CircomParser.STRING); } break; @@ -2054,7 +2130,7 @@ export default class CircomParser extends Parser { case 66: case 67: { - this.state = 418; + this.state = 443; this.expression(0); } break; @@ -2063,7 +2139,7 @@ export default class CircomParser extends Parser { default: break; } - this.state = 421; + this.state = 446; this.match(CircomParser.RP); } } catch (re) { @@ -2086,13 +2162,13 @@ export default class CircomParser extends Parser { this._ctx, this.state, ); - this.enterRule(localctx, 38, CircomParser.RULE_componentDefinition); + this.enterRule(localctx, 40, CircomParser.RULE_componentDefinition); try { this.enterOuterAlt(localctx, 1); { - this.state = 423; + this.state = 448; this.match(CircomParser.COMPONENT); - this.state = 424; + this.state = 449; this.match(CircomParser.ID); } } catch (re) { @@ -2115,35 +2191,35 @@ export default class CircomParser extends Parser { this._ctx, this.state, ); - this.enterRule(localctx, 40, CircomParser.RULE_componentDeclaration); + this.enterRule(localctx, 42, CircomParser.RULE_componentDeclaration); let _la: number; try { this.enterOuterAlt(localctx, 1); { - this.state = 426; + this.state = 451; this.componentDefinition(); - this.state = 430; + this.state = 455; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === 28) { { { - this.state = 427; + this.state = 452; this.arrayDimension(); } } - this.state = 432; + this.state = 457; this._errHandler.sync(this); _la = this._input.LA(1); } - this.state = 435; + this.state = 460; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === 36) { { - this.state = 433; + this.state = 458; this.match(CircomParser.ASSIGNMENT); - this.state = 434; + this.state = 459; this.blockInstantiation(); } } @@ -2168,34 +2244,34 @@ export default class CircomParser extends Parser { this._ctx, this.state, ); - this.enterRule(localctx, 42, CircomParser.RULE_signalDefinition); + this.enterRule(localctx, 44, CircomParser.RULE_signalDefinition); let _la: number; try { this.enterOuterAlt(localctx, 1); { - this.state = 437; + this.state = 462; this.match(CircomParser.SIGNAL); - this.state = 439; + this.state = 464; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === 2) { { - this.state = 438; + this.state = 463; this.match(CircomParser.SIGNAL_TYPE); } } - this.state = 442; + this.state = 467; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === 30) { { - this.state = 441; + this.state = 466; this.tagList(); } } - this.state = 444; + this.state = 469; this.identifier(); } } catch (re) { @@ -2218,15 +2294,15 @@ export default class CircomParser extends Parser { this._ctx, this.state, ); - this.enterRule(localctx, 44, CircomParser.RULE_tagList); + this.enterRule(localctx, 46, CircomParser.RULE_tagList); try { this.enterOuterAlt(localctx, 1); { - this.state = 446; + this.state = 471; this.match(CircomParser.LC); - this.state = 447; + this.state = 472; this.args(); - this.state = 448; + this.state = 473; this.match(CircomParser.RC); } } catch (re) { @@ -2249,25 +2325,25 @@ export default class CircomParser extends Parser { this._ctx, this.state, ); - this.enterRule(localctx, 46, CircomParser.RULE_signalDeclaration); + this.enterRule(localctx, 48, CircomParser.RULE_signalDeclaration); let _la: number; try { - this.state = 463; + this.state = 488; this._errHandler.sync(this); - switch (this._interp.adaptivePredict(this._input, 40, this._ctx)) { + switch (this._interp.adaptivePredict(this._input, 41, this._ctx)) { case 1: this.enterOuterAlt(localctx, 1); { - this.state = 450; + this.state = 475; this.signalDefinition(); - this.state = 453; + this.state = 478; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === 39) { { - this.state = 451; + this.state = 476; this.match(CircomParser.LEFT_ASSIGNMENT); - this.state = 452; + this.state = 477; this.rhsValue(); } } @@ -2276,21 +2352,21 @@ export default class CircomParser extends Parser { case 2: this.enterOuterAlt(localctx, 2); { - this.state = 455; + this.state = 480; this.signalDefinition(); - this.state = 460; + this.state = 485; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === 35) { { { - this.state = 456; + this.state = 481; this.match(CircomParser.COMMA); - this.state = 457; + this.state = 482; this.identifier(); } } - this.state = 462; + this.state = 487; this._errHandler.sync(this); _la = this._input.LA(1); } @@ -2317,47 +2393,47 @@ export default class CircomParser extends Parser { this._ctx, this.state, ); - this.enterRule(localctx, 48, CircomParser.RULE_varDefinition); + this.enterRule(localctx, 50, CircomParser.RULE_varDefinition); let _la: number; try { - this.state = 479; + this.state = 504; this._errHandler.sync(this); - switch (this._interp.adaptivePredict(this._input, 42, this._ctx)) { + switch (this._interp.adaptivePredict(this._input, 43, this._ctx)) { case 1: this.enterOuterAlt(localctx, 1); { - this.state = 465; + this.state = 490; this.match(CircomParser.VAR); - this.state = 466; + this.state = 491; this.identifier(); } break; case 2: this.enterOuterAlt(localctx, 2); { - this.state = 467; + this.state = 492; this.match(CircomParser.VAR); - this.state = 468; + this.state = 493; this.match(CircomParser.LP); - this.state = 469; + this.state = 494; this.identifier(); - this.state = 474; + this.state = 499; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === 35) { { { - this.state = 470; + this.state = 495; this.match(CircomParser.COMMA); - this.state = 471; + this.state = 496; this.identifier(); } } - this.state = 476; + this.state = 501; this._errHandler.sync(this); _la = this._input.LA(1); } - this.state = 477; + this.state = 502; this.match(CircomParser.RP); } break; @@ -2382,25 +2458,25 @@ export default class CircomParser extends Parser { this._ctx, this.state, ); - this.enterRule(localctx, 50, CircomParser.RULE_varDeclaration); + this.enterRule(localctx, 52, CircomParser.RULE_varDeclaration); let _la: number; try { - this.state = 494; + this.state = 519; this._errHandler.sync(this); - switch (this._interp.adaptivePredict(this._input, 45, this._ctx)) { + switch (this._interp.adaptivePredict(this._input, 46, this._ctx)) { case 1: this.enterOuterAlt(localctx, 1); { - this.state = 481; + this.state = 506; this.varDefinition(); - this.state = 484; + this.state = 509; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === 36) { { - this.state = 482; + this.state = 507; this.match(CircomParser.ASSIGNMENT); - this.state = 483; + this.state = 508; this.rhsValue(); } } @@ -2409,21 +2485,21 @@ export default class CircomParser extends Parser { case 2: this.enterOuterAlt(localctx, 2); { - this.state = 486; + this.state = 511; this.varDefinition(); - this.state = 491; + this.state = 516; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === 35) { { { - this.state = 487; + this.state = 512; this.match(CircomParser.COMMA); - this.state = 488; + this.state = 513; this.identifier(); } } - this.state = 493; + this.state = 518; this._errHandler.sync(this); _la = this._input.LA(1); } @@ -2450,22 +2526,22 @@ export default class CircomParser extends Parser { this._ctx, this.state, ); - this.enterRule(localctx, 52, CircomParser.RULE_rhsValue); + this.enterRule(localctx, 54, CircomParser.RULE_rhsValue); try { - this.state = 498; + this.state = 523; this._errHandler.sync(this); - switch (this._interp.adaptivePredict(this._input, 46, this._ctx)) { + switch (this._interp.adaptivePredict(this._input, 47, this._ctx)) { case 1: this.enterOuterAlt(localctx, 1); { - this.state = 496; + this.state = 521; this.expression(0); } break; case 2: this.enterOuterAlt(localctx, 2); { - this.state = 497; + this.state = 522; this.blockInstantiation(); } break; @@ -2490,18 +2566,18 @@ export default class CircomParser extends Parser { this._ctx, this.state, ); - this.enterRule(localctx, 54, CircomParser.RULE_componentCall); + this.enterRule(localctx, 56, CircomParser.RULE_componentCall); let _la: number; try { - this.state = 536; + this.state = 561; this._errHandler.sync(this); - switch (this._interp.adaptivePredict(this._input, 50, this._ctx)) { + switch (this._interp.adaptivePredict(this._input, 51, this._ctx)) { case 1: this.enterOuterAlt(localctx, 1); { - this.state = 500; + this.state = 525; this.match(CircomParser.LP); - this.state = 502; + this.state = 527; this._errHandler.sync(this); _la = this._input.LA(1); if ( @@ -2510,82 +2586,82 @@ export default class CircomParser extends Parser { ((1 << (_la - 44)) & 12583171) !== 0) ) { { - this.state = 501; + this.state = 526; this.expressionList(); } } - this.state = 504; + this.state = 529; this.match(CircomParser.RP); } break; case 2: this.enterOuterAlt(localctx, 2); { - this.state = 505; + this.state = 530; this.match(CircomParser.LP); - this.state = 506; + this.state = 531; this.match(CircomParser.ID); - this.state = 507; + this.state = 532; this.match(CircomParser.LEFT_ASSIGNMENT); - this.state = 508; + this.state = 533; this.expression(0); - this.state = 515; + this.state = 540; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === 35) { { { - this.state = 509; + this.state = 534; this.match(CircomParser.COMMA); - this.state = 510; + this.state = 535; this.match(CircomParser.ID); - this.state = 511; + this.state = 536; this.match(CircomParser.LEFT_ASSIGNMENT); - this.state = 512; + this.state = 537; this.expression(0); } } - this.state = 517; + this.state = 542; this._errHandler.sync(this); _la = this._input.LA(1); } - this.state = 518; + this.state = 543; this.match(CircomParser.RP); } break; case 3: this.enterOuterAlt(localctx, 3); { - this.state = 520; + this.state = 545; this.match(CircomParser.LP); - this.state = 521; + this.state = 546; this.expression(0); - this.state = 522; + this.state = 547; this.match(CircomParser.RIGHT_ASSIGNMENT); - this.state = 523; + this.state = 548; this.match(CircomParser.ID); - this.state = 531; + this.state = 556; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === 35) { { { - this.state = 524; + this.state = 549; this.match(CircomParser.COMMA); - this.state = 525; + this.state = 550; this.expression(0); - this.state = 526; + this.state = 551; this.match(CircomParser.RIGHT_ASSIGNMENT); - this.state = 527; + this.state = 552; this.match(CircomParser.ID); } } - this.state = 533; + this.state = 558; this._errHandler.sync(this); _la = this._input.LA(1); } - this.state = 534; + this.state = 559; this.match(CircomParser.RP); } break; @@ -2610,26 +2686,26 @@ export default class CircomParser extends Parser { this._ctx, this.state, ); - this.enterRule(localctx, 56, CircomParser.RULE_blockInstantiation); + this.enterRule(localctx, 58, CircomParser.RULE_blockInstantiation); let _la: number; try { this.enterOuterAlt(localctx, 1); { - this.state = 539; + this.state = 564; this._errHandler.sync(this); _la = this._input.LA(1); if (_la === 25) { { - this.state = 538; + this.state = 563; this.match(CircomParser.PARALLEL); } } - this.state = 541; + this.state = 566; this.match(CircomParser.ID); - this.state = 542; + this.state = 567; this.match(CircomParser.LP); - this.state = 544; + this.state = 569; this._errHandler.sync(this); _la = this._input.LA(1); if ( @@ -2637,19 +2713,19 @@ export default class CircomParser extends Parser { (((_la - 44) & ~0x1f) === 0 && ((1 << (_la - 44)) & 12583171) !== 0) ) { { - this.state = 543; + this.state = 568; this.expressionList(); } } - this.state = 546; + this.state = 571; this.match(CircomParser.RP); - this.state = 548; + this.state = 573; this._errHandler.sync(this); - switch (this._interp.adaptivePredict(this._input, 53, this._ctx)) { + switch (this._interp.adaptivePredict(this._input, 54, this._ctx)) { case 1: { - this.state = 547; + this.state = 572; this.componentCall(); } break; @@ -2675,26 +2751,26 @@ export default class CircomParser extends Parser { this._ctx, this.state, ); - this.enterRule(localctx, 58, CircomParser.RULE_expressionList); + this.enterRule(localctx, 60, CircomParser.RULE_expressionList); let _la: number; try { this.enterOuterAlt(localctx, 1); { - this.state = 550; + this.state = 575; this.expression(0); - this.state = 555; + this.state = 580; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === 35) { { { - this.state = 551; + this.state = 576; this.match(CircomParser.COMMA); - this.state = 552; + this.state = 577; this.expression(0); } } - this.state = 557; + this.state = 582; this._errHandler.sync(this); _la = this._input.LA(1); } @@ -2719,28 +2795,28 @@ export default class CircomParser extends Parser { this._ctx, this.state, ); - this.enterRule(localctx, 60, CircomParser.RULE_identifier); + this.enterRule(localctx, 62, CircomParser.RULE_identifier); try { let _alt: number; this.enterOuterAlt(localctx, 1); { - this.state = 558; + this.state = 583; this.match(CircomParser.ID); - this.state = 562; + this.state = 587; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input, 55, this._ctx); + _alt = this._interp.adaptivePredict(this._input, 56, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { - this.state = 559; + this.state = 584; this.arrayDimension(); } } } - this.state = 564; + this.state = 589; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input, 55, this._ctx); + _alt = this._interp.adaptivePredict(this._input, 56, this._ctx); } } } catch (re) { @@ -2763,15 +2839,15 @@ export default class CircomParser extends Parser { this._ctx, this.state, ); - this.enterRule(localctx, 62, CircomParser.RULE_arrayDimension); + this.enterRule(localctx, 64, CircomParser.RULE_arrayDimension); try { this.enterOuterAlt(localctx, 1); { - this.state = 565; + this.state = 590; this.match(CircomParser.LB); - this.state = 566; + this.state = 591; this.expression(0); - this.state = 567; + this.state = 592; this.match(CircomParser.RB); } } catch (re) { @@ -2790,30 +2866,30 @@ export default class CircomParser extends Parser { // @RuleVersion(0) public args(): ArgsContext { let localctx: ArgsContext = new ArgsContext(this, this._ctx, this.state); - this.enterRule(localctx, 64, CircomParser.RULE_args); + this.enterRule(localctx, 66, CircomParser.RULE_args); try { let _alt: number; this.enterOuterAlt(localctx, 1); { - this.state = 569; + this.state = 594; this.match(CircomParser.ID); - this.state = 574; + this.state = 599; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input, 56, this._ctx); + _alt = this._interp.adaptivePredict(this._input, 57, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { - this.state = 570; + this.state = 595; this.match(CircomParser.COMMA); - this.state = 571; + this.state = 596; this.match(CircomParser.ID); } } } - this.state = 576; + this.state = 601; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input, 56, this._ctx); + _alt = this._interp.adaptivePredict(this._input, 57, this._ctx); } } } catch (re) { @@ -2836,12 +2912,12 @@ export default class CircomParser extends Parser { this._ctx, this.state, ); - this.enterRule(localctx, 66, CircomParser.RULE_argsWithUnderscore); + this.enterRule(localctx, 68, CircomParser.RULE_argsWithUnderscore); let _la: number; try { this.enterOuterAlt(localctx, 1); { - this.state = 577; + this.state = 602; _la = this._input.LA(1); if (!(_la === 43 || _la === 66)) { this._errHandler.recoverInline(this); @@ -2849,15 +2925,15 @@ export default class CircomParser extends Parser { this._errHandler.reportMatch(this); this.consume(); } - this.state = 582; + this.state = 607; this._errHandler.sync(this); _la = this._input.LA(1); while (_la === 35) { { { - this.state = 578; + this.state = 603; this.match(CircomParser.COMMA); - this.state = 579; + this.state = 604; _la = this._input.LA(1); if (!(_la === 43 || _la === 66)) { this._errHandler.recoverInline(this); @@ -2867,7 +2943,7 @@ export default class CircomParser extends Parser { } } } - this.state = 584; + this.state = 609; this._errHandler.sync(this); _la = this._input.LA(1); } @@ -2892,30 +2968,30 @@ export default class CircomParser extends Parser { this._ctx, this.state, ); - this.enterRule(localctx, 68, CircomParser.RULE_numSequence); + this.enterRule(localctx, 70, CircomParser.RULE_numSequence); try { let _alt: number; this.enterOuterAlt(localctx, 1); { - this.state = 585; + this.state = 610; this.match(CircomParser.NUMBER); - this.state = 590; + this.state = 615; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input, 58, this._ctx); + _alt = this._interp.adaptivePredict(this._input, 59, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { { { - this.state = 586; + this.state = 611; this.match(CircomParser.COMMA); - this.state = 587; + this.state = 612; this.match(CircomParser.NUMBER); } } } - this.state = 592; + this.state = 617; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input, 58, this._ctx); + _alt = this._interp.adaptivePredict(this._input, 59, this._ctx); } } } catch (re) { @@ -2938,7 +3014,7 @@ export default class CircomParser extends Parser { predIndex: number, ): boolean { switch (ruleIndex) { - case 16: + case 17: return this.expression_sempred( localctx as ExpressionContext, predIndex, @@ -2970,267 +3046,277 @@ export default class CircomParser extends Parser { } public static readonly _serializedATN: number[] = [ - 4, 1, 72, 594, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, + 4, 1, 72, 619, 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, 1, 0, 5, 0, 72, 8, 0, 10, 0, 12, 0, 75, 9, 0, 1, 0, - 5, 0, 78, 8, 0, 10, 0, 12, 0, 81, 9, 0, 1, 0, 5, 0, 84, 8, 0, 10, 0, 12, 0, - 87, 9, 0, 1, 0, 3, 0, 90, 8, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 3, 1, 101, 8, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 3, 3, 109, 8, - 3, 1, 4, 1, 4, 1, 4, 1, 4, 3, 4, 115, 8, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 5, - 5, 122, 8, 5, 10, 5, 12, 5, 125, 9, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, + 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 1, 0, 5, 0, 74, 8, 0, 10, 0, 12, 0, + 77, 9, 0, 1, 0, 5, 0, 80, 8, 0, 10, 0, 12, 0, 83, 9, 0, 1, 0, 5, 0, 86, 8, + 0, 10, 0, 12, 0, 89, 9, 0, 1, 0, 3, 0, 92, 8, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 103, 8, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, + 3, 3, 3, 111, 8, 3, 1, 4, 1, 4, 1, 4, 1, 4, 3, 4, 117, 8, 4, 1, 4, 1, 4, 1, + 4, 1, 5, 1, 5, 5, 5, 124, 8, 5, 10, 5, 12, 5, 127, 9, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, - 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 3, 6, 153, 8, 6, 1, 6, 1, 6, 1, + 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 3, 6, 155, 8, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, - 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 3, 6, 176, 8, 6, 1, 7, 1, 7, 3, 7, 180, - 8, 7, 1, 7, 3, 7, 183, 8, 7, 1, 7, 1, 7, 1, 7, 3, 7, 188, 8, 7, 1, 7, 1, 7, - 1, 7, 1, 8, 1, 8, 5, 8, 195, 8, 8, 10, 8, 12, 8, 198, 9, 8, 1, 8, 1, 8, 1, - 9, 1, 9, 1, 9, 3, 9, 205, 8, 9, 1, 9, 1, 9, 1, 9, 1, 9, 3, 9, 211, 8, 9, 1, - 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, + 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 3, 6, 178, 8, 6, 1, 7, + 1, 7, 3, 7, 182, 8, 7, 1, 7, 3, 7, 185, 8, 7, 1, 7, 1, 7, 1, 7, 3, 7, 190, + 8, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 5, 8, 197, 8, 8, 10, 8, 12, 8, 200, 9, + 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 3, 9, 207, 8, 9, 1, 9, 1, 9, 1, 9, 1, 9, 3, + 9, 213, 8, 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, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, + 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 3, 11, 244, 8, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, - 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 3, 11, 242, 8, 11, 1, 11, 1, - 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, - 11, 1, 11, 3, 11, 258, 8, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, - 11, 1, 11, 1, 11, 3, 11, 269, 8, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, - 11, 3, 11, 277, 8, 11, 1, 11, 1, 11, 1, 11, 1, 11, 3, 11, 283, 8, 11, 1, 11, - 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 3, 11, 295, + 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 5, 11, 264, 8, 11, 10, + 11, 12, 11, 267, 9, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, + 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 5, 11, 285, 8, + 11, 10, 11, 12, 11, 288, 9, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, + 11, 3, 11, 297, 8, 11, 1, 11, 1, 11, 1, 11, 1, 11, 3, 11, 303, 8, 11, 1, 11, + 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 3, 11, 315, 8, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, - 1, 11, 1, 11, 1, 11, 1, 11, 3, 11, 311, 8, 11, 1, 11, 1, 11, 1, 11, 1, 11, + 1, 11, 1, 11, 1, 11, 1, 11, 3, 11, 331, 8, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, - 1, 11, 1, 11, 3, 11, 330, 8, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, - 1, 13, 3, 13, 339, 8, 13, 1, 13, 1, 13, 1, 13, 3, 13, 344, 8, 13, 1, 14, 1, - 14, 1, 14, 1, 14, 3, 14, 350, 8, 14, 1, 14, 1, 14, 3, 14, 354, 8, 14, 1, 15, - 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 3, 16, 365, 8, 16, - 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, - 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, - 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 3, 16, 395, 8, 16, 5, 16, 397, 8, - 16, 10, 16, 12, 16, 400, 9, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, - 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 3, 17, 414, 8, 17, 1, 18, 1, 18, 1, - 18, 1, 18, 3, 18, 420, 8, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 20, 1, - 20, 5, 20, 429, 8, 20, 10, 20, 12, 20, 432, 9, 20, 1, 20, 1, 20, 3, 20, 436, - 8, 20, 1, 21, 1, 21, 3, 21, 440, 8, 21, 1, 21, 3, 21, 443, 8, 21, 1, 21, 1, - 21, 1, 22, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 3, 23, 454, 8, 23, 1, - 23, 1, 23, 1, 23, 5, 23, 459, 8, 23, 10, 23, 12, 23, 462, 9, 23, 3, 23, 464, - 8, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 5, 24, 473, 8, 24, - 10, 24, 12, 24, 476, 9, 24, 1, 24, 1, 24, 3, 24, 480, 8, 24, 1, 25, 1, 25, - 1, 25, 3, 25, 485, 8, 25, 1, 25, 1, 25, 1, 25, 5, 25, 490, 8, 25, 10, 25, - 12, 25, 493, 9, 25, 3, 25, 495, 8, 25, 1, 26, 1, 26, 3, 26, 499, 8, 26, 1, - 27, 1, 27, 3, 27, 503, 8, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, - 27, 1, 27, 1, 27, 5, 27, 514, 8, 27, 10, 27, 12, 27, 517, 9, 27, 1, 27, 1, - 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 5, 27, - 530, 8, 27, 10, 27, 12, 27, 533, 9, 27, 1, 27, 1, 27, 3, 27, 537, 8, 27, 1, - 28, 3, 28, 540, 8, 28, 1, 28, 1, 28, 1, 28, 3, 28, 545, 8, 28, 1, 28, 1, 28, - 3, 28, 549, 8, 28, 1, 29, 1, 29, 1, 29, 5, 29, 554, 8, 29, 10, 29, 12, 29, - 557, 9, 29, 1, 30, 1, 30, 5, 30, 561, 8, 30, 10, 30, 12, 30, 564, 9, 30, 1, - 31, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 5, 32, 573, 8, 32, 10, 32, 12, - 32, 576, 9, 32, 1, 33, 1, 33, 1, 33, 5, 33, 581, 8, 33, 10, 33, 12, 33, 584, - 9, 33, 1, 34, 1, 34, 1, 34, 5, 34, 589, 8, 34, 10, 34, 12, 34, 592, 9, 34, - 1, 34, 0, 1, 32, 35, 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, 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, 655, 0, 73, 1, 0, 0, 0, 2, 100, 1, 0, 0, 0, - 4, 102, 1, 0, 0, 0, 6, 108, 1, 0, 0, 0, 8, 110, 1, 0, 0, 0, 10, 119, 1, 0, - 0, 0, 12, 175, 1, 0, 0, 0, 14, 177, 1, 0, 0, 0, 16, 192, 1, 0, 0, 0, 18, - 201, 1, 0, 0, 0, 20, 215, 1, 0, 0, 0, 22, 329, 1, 0, 0, 0, 24, 331, 1, 0, 0, - 0, 26, 338, 1, 0, 0, 0, 28, 353, 1, 0, 0, 0, 30, 355, 1, 0, 0, 0, 32, 364, - 1, 0, 0, 0, 34, 413, 1, 0, 0, 0, 36, 415, 1, 0, 0, 0, 38, 423, 1, 0, 0, 0, - 40, 426, 1, 0, 0, 0, 42, 437, 1, 0, 0, 0, 44, 446, 1, 0, 0, 0, 46, 463, 1, - 0, 0, 0, 48, 479, 1, 0, 0, 0, 50, 494, 1, 0, 0, 0, 52, 498, 1, 0, 0, 0, 54, - 536, 1, 0, 0, 0, 56, 539, 1, 0, 0, 0, 58, 550, 1, 0, 0, 0, 60, 558, 1, 0, 0, - 0, 62, 565, 1, 0, 0, 0, 64, 569, 1, 0, 0, 0, 66, 577, 1, 0, 0, 0, 68, 585, - 1, 0, 0, 0, 70, 72, 3, 2, 1, 0, 71, 70, 1, 0, 0, 0, 72, 75, 1, 0, 0, 0, 73, - 71, 1, 0, 0, 0, 73, 74, 1, 0, 0, 0, 74, 79, 1, 0, 0, 0, 75, 73, 1, 0, 0, 0, - 76, 78, 3, 4, 2, 0, 77, 76, 1, 0, 0, 0, 78, 81, 1, 0, 0, 0, 79, 77, 1, 0, 0, - 0, 79, 80, 1, 0, 0, 0, 80, 85, 1, 0, 0, 0, 81, 79, 1, 0, 0, 0, 82, 84, 3, 6, - 3, 0, 83, 82, 1, 0, 0, 0, 84, 87, 1, 0, 0, 0, 85, 83, 1, 0, 0, 0, 85, 86, 1, - 0, 0, 0, 86, 89, 1, 0, 0, 0, 87, 85, 1, 0, 0, 0, 88, 90, 3, 18, 9, 0, 89, - 88, 1, 0, 0, 0, 89, 90, 1, 0, 0, 0, 90, 91, 1, 0, 0, 0, 91, 92, 5, 0, 0, 1, - 92, 1, 1, 0, 0, 0, 93, 94, 5, 21, 0, 0, 94, 95, 5, 22, 0, 0, 95, 96, 5, 1, - 0, 0, 96, 101, 5, 33, 0, 0, 97, 98, 5, 21, 0, 0, 98, 99, 5, 23, 0, 0, 99, - 101, 5, 33, 0, 0, 100, 93, 1, 0, 0, 0, 100, 97, 1, 0, 0, 0, 101, 3, 1, 0, 0, - 0, 102, 103, 5, 19, 0, 0, 103, 104, 5, 69, 0, 0, 104, 105, 5, 33, 0, 0, 105, - 5, 1, 0, 0, 0, 106, 109, 3, 8, 4, 0, 107, 109, 3, 14, 7, 0, 108, 106, 1, 0, - 0, 0, 108, 107, 1, 0, 0, 0, 109, 7, 1, 0, 0, 0, 110, 111, 5, 10, 0, 0, 111, - 112, 5, 66, 0, 0, 112, 114, 5, 26, 0, 0, 113, 115, 3, 64, 32, 0, 114, 113, - 1, 0, 0, 0, 114, 115, 1, 0, 0, 0, 115, 116, 1, 0, 0, 0, 116, 117, 5, 27, 0, - 0, 117, 118, 3, 10, 5, 0, 118, 9, 1, 0, 0, 0, 119, 123, 5, 30, 0, 0, 120, - 122, 3, 12, 6, 0, 121, 120, 1, 0, 0, 0, 122, 125, 1, 0, 0, 0, 123, 121, 1, - 0, 0, 0, 123, 124, 1, 0, 0, 0, 124, 126, 1, 0, 0, 0, 125, 123, 1, 0, 0, 0, - 126, 127, 5, 31, 0, 0, 127, 11, 1, 0, 0, 0, 128, 176, 3, 10, 5, 0, 129, 130, - 5, 66, 0, 0, 130, 131, 5, 38, 0, 0, 131, 176, 5, 33, 0, 0, 132, 133, 3, 50, - 25, 0, 133, 134, 5, 33, 0, 0, 134, 176, 1, 0, 0, 0, 135, 136, 3, 60, 30, 0, - 136, 137, 7, 0, 0, 0, 137, 138, 3, 32, 16, 0, 138, 139, 5, 33, 0, 0, 139, - 176, 1, 0, 0, 0, 140, 141, 5, 26, 0, 0, 141, 142, 3, 66, 33, 0, 142, 143, 5, - 27, 0, 0, 143, 144, 5, 36, 0, 0, 144, 145, 3, 32, 16, 0, 145, 146, 5, 33, 0, - 0, 146, 176, 1, 0, 0, 0, 147, 148, 5, 12, 0, 0, 148, 149, 3, 30, 15, 0, 149, - 152, 3, 12, 6, 0, 150, 151, 5, 13, 0, 0, 151, 153, 3, 12, 6, 0, 152, 150, 1, - 0, 0, 0, 152, 153, 1, 0, 0, 0, 153, 176, 1, 0, 0, 0, 154, 155, 5, 15, 0, 0, - 155, 156, 3, 30, 15, 0, 156, 157, 3, 12, 6, 0, 157, 176, 1, 0, 0, 0, 158, - 159, 5, 14, 0, 0, 159, 160, 5, 26, 0, 0, 160, 161, 3, 24, 12, 0, 161, 162, - 5, 27, 0, 0, 162, 163, 3, 12, 6, 0, 163, 176, 1, 0, 0, 0, 164, 165, 5, 11, - 0, 0, 165, 166, 3, 32, 16, 0, 166, 167, 5, 33, 0, 0, 167, 176, 1, 0, 0, 0, - 168, 169, 5, 18, 0, 0, 169, 170, 3, 30, 15, 0, 170, 171, 5, 33, 0, 0, 171, - 176, 1, 0, 0, 0, 172, 173, 3, 36, 18, 0, 173, 174, 5, 33, 0, 0, 174, 176, 1, - 0, 0, 0, 175, 128, 1, 0, 0, 0, 175, 129, 1, 0, 0, 0, 175, 132, 1, 0, 0, 0, - 175, 135, 1, 0, 0, 0, 175, 140, 1, 0, 0, 0, 175, 147, 1, 0, 0, 0, 175, 154, - 1, 0, 0, 0, 175, 158, 1, 0, 0, 0, 175, 164, 1, 0, 0, 0, 175, 168, 1, 0, 0, - 0, 175, 172, 1, 0, 0, 0, 176, 13, 1, 0, 0, 0, 177, 179, 5, 7, 0, 0, 178, - 180, 5, 20, 0, 0, 179, 178, 1, 0, 0, 0, 179, 180, 1, 0, 0, 0, 180, 182, 1, - 0, 0, 0, 181, 183, 5, 25, 0, 0, 182, 181, 1, 0, 0, 0, 182, 183, 1, 0, 0, 0, - 183, 184, 1, 0, 0, 0, 184, 185, 5, 66, 0, 0, 185, 187, 5, 26, 0, 0, 186, - 188, 3, 64, 32, 0, 187, 186, 1, 0, 0, 0, 187, 188, 1, 0, 0, 0, 188, 189, 1, - 0, 0, 0, 189, 190, 5, 27, 0, 0, 190, 191, 3, 16, 8, 0, 191, 15, 1, 0, 0, 0, - 192, 196, 5, 30, 0, 0, 193, 195, 3, 22, 11, 0, 194, 193, 1, 0, 0, 0, 195, - 198, 1, 0, 0, 0, 196, 194, 1, 0, 0, 0, 196, 197, 1, 0, 0, 0, 197, 199, 1, 0, - 0, 0, 198, 196, 1, 0, 0, 0, 199, 200, 5, 31, 0, 0, 200, 17, 1, 0, 0, 0, 201, - 202, 5, 8, 0, 0, 202, 204, 5, 24, 0, 0, 203, 205, 3, 20, 10, 0, 204, 203, 1, - 0, 0, 0, 204, 205, 1, 0, 0, 0, 205, 206, 1, 0, 0, 0, 206, 207, 5, 36, 0, 0, - 207, 208, 5, 66, 0, 0, 208, 210, 5, 26, 0, 0, 209, 211, 3, 58, 29, 0, 210, - 209, 1, 0, 0, 0, 210, 211, 1, 0, 0, 0, 211, 212, 1, 0, 0, 0, 212, 213, 5, - 27, 0, 0, 213, 214, 5, 33, 0, 0, 214, 19, 1, 0, 0, 0, 215, 216, 5, 30, 0, 0, - 216, 217, 5, 6, 0, 0, 217, 218, 5, 28, 0, 0, 218, 219, 3, 64, 32, 0, 219, - 220, 5, 29, 0, 0, 220, 221, 5, 31, 0, 0, 221, 21, 1, 0, 0, 0, 222, 330, 3, - 16, 8, 0, 223, 224, 5, 66, 0, 0, 224, 225, 5, 38, 0, 0, 225, 330, 5, 33, 0, - 0, 226, 227, 3, 50, 25, 0, 227, 228, 5, 33, 0, 0, 228, 330, 1, 0, 0, 0, 229, - 230, 3, 46, 23, 0, 230, 231, 5, 33, 0, 0, 231, 330, 1, 0, 0, 0, 232, 233, 3, - 40, 20, 0, 233, 234, 5, 33, 0, 0, 234, 330, 1, 0, 0, 0, 235, 236, 3, 56, 28, - 0, 236, 237, 5, 33, 0, 0, 237, 330, 1, 0, 0, 0, 238, 241, 3, 60, 30, 0, 239, - 240, 5, 34, 0, 0, 240, 242, 5, 66, 0, 0, 241, 239, 1, 0, 0, 0, 241, 242, 1, - 0, 0, 0, 242, 243, 1, 0, 0, 0, 243, 244, 5, 36, 0, 0, 244, 245, 3, 32, 16, - 0, 245, 246, 5, 33, 0, 0, 246, 330, 1, 0, 0, 0, 247, 248, 3, 32, 16, 0, 248, - 249, 5, 41, 0, 0, 249, 250, 3, 32, 16, 0, 250, 251, 5, 33, 0, 0, 251, 330, - 1, 0, 0, 0, 252, 258, 3, 34, 17, 0, 253, 254, 3, 60, 30, 0, 254, 255, 5, 34, - 0, 0, 255, 256, 3, 60, 30, 0, 256, 258, 1, 0, 0, 0, 257, 252, 1, 0, 0, 0, - 257, 253, 1, 0, 0, 0, 258, 259, 1, 0, 0, 0, 259, 260, 7, 1, 0, 0, 260, 261, - 3, 32, 16, 0, 261, 262, 5, 33, 0, 0, 262, 330, 1, 0, 0, 0, 263, 264, 3, 32, - 16, 0, 264, 265, 5, 40, 0, 0, 265, 268, 3, 60, 30, 0, 266, 267, 5, 34, 0, 0, - 267, 269, 3, 60, 30, 0, 268, 266, 1, 0, 0, 0, 268, 269, 1, 0, 0, 0, 269, - 270, 1, 0, 0, 0, 270, 271, 5, 33, 0, 0, 271, 330, 1, 0, 0, 0, 272, 273, 5, - 43, 0, 0, 273, 276, 7, 2, 0, 0, 274, 277, 3, 32, 16, 0, 275, 277, 3, 56, 28, - 0, 276, 274, 1, 0, 0, 0, 276, 275, 1, 0, 0, 0, 277, 278, 1, 0, 0, 0, 278, - 279, 5, 33, 0, 0, 279, 330, 1, 0, 0, 0, 280, 283, 3, 32, 16, 0, 281, 283, 3, - 56, 28, 0, 282, 280, 1, 0, 0, 0, 282, 281, 1, 0, 0, 0, 283, 284, 1, 0, 0, 0, - 284, 285, 5, 40, 0, 0, 285, 286, 5, 43, 0, 0, 286, 287, 5, 33, 0, 0, 287, - 330, 1, 0, 0, 0, 288, 289, 5, 26, 0, 0, 289, 290, 3, 66, 33, 0, 290, 291, 5, - 27, 0, 0, 291, 294, 7, 2, 0, 0, 292, 295, 3, 56, 28, 0, 293, 295, 3, 32, 16, - 0, 294, 292, 1, 0, 0, 0, 294, 293, 1, 0, 0, 0, 295, 296, 1, 0, 0, 0, 296, - 297, 5, 33, 0, 0, 297, 330, 1, 0, 0, 0, 298, 299, 3, 56, 28, 0, 299, 300, 5, - 40, 0, 0, 300, 301, 5, 26, 0, 0, 301, 302, 3, 66, 33, 0, 302, 303, 5, 27, 0, - 0, 303, 304, 5, 33, 0, 0, 304, 330, 1, 0, 0, 0, 305, 306, 5, 12, 0, 0, 306, - 307, 3, 30, 15, 0, 307, 310, 3, 22, 11, 0, 308, 309, 5, 13, 0, 0, 309, 311, - 3, 22, 11, 0, 310, 308, 1, 0, 0, 0, 310, 311, 1, 0, 0, 0, 311, 330, 1, 0, 0, - 0, 312, 313, 5, 15, 0, 0, 313, 314, 3, 30, 15, 0, 314, 315, 3, 22, 11, 0, - 315, 330, 1, 0, 0, 0, 316, 317, 5, 14, 0, 0, 317, 318, 5, 26, 0, 0, 318, - 319, 3, 24, 12, 0, 319, 320, 5, 27, 0, 0, 320, 321, 3, 22, 11, 0, 321, 330, - 1, 0, 0, 0, 322, 323, 5, 18, 0, 0, 323, 324, 3, 30, 15, 0, 324, 325, 5, 33, - 0, 0, 325, 330, 1, 0, 0, 0, 326, 327, 3, 36, 18, 0, 327, 328, 5, 33, 0, 0, - 328, 330, 1, 0, 0, 0, 329, 222, 1, 0, 0, 0, 329, 223, 1, 0, 0, 0, 329, 226, - 1, 0, 0, 0, 329, 229, 1, 0, 0, 0, 329, 232, 1, 0, 0, 0, 329, 235, 1, 0, 0, - 0, 329, 238, 1, 0, 0, 0, 329, 247, 1, 0, 0, 0, 329, 257, 1, 0, 0, 0, 329, - 263, 1, 0, 0, 0, 329, 272, 1, 0, 0, 0, 329, 282, 1, 0, 0, 0, 329, 288, 1, 0, - 0, 0, 329, 298, 1, 0, 0, 0, 329, 305, 1, 0, 0, 0, 329, 312, 1, 0, 0, 0, 329, - 316, 1, 0, 0, 0, 329, 322, 1, 0, 0, 0, 329, 326, 1, 0, 0, 0, 330, 23, 1, 0, - 0, 0, 331, 332, 3, 26, 13, 0, 332, 333, 5, 33, 0, 0, 333, 334, 3, 32, 16, 0, - 334, 335, 5, 33, 0, 0, 335, 336, 3, 28, 14, 0, 336, 25, 1, 0, 0, 0, 337, - 339, 5, 9, 0, 0, 338, 337, 1, 0, 0, 0, 338, 339, 1, 0, 0, 0, 339, 340, 1, 0, - 0, 0, 340, 343, 3, 60, 30, 0, 341, 342, 5, 36, 0, 0, 342, 344, 3, 52, 26, 0, - 343, 341, 1, 0, 0, 0, 343, 344, 1, 0, 0, 0, 344, 27, 1, 0, 0, 0, 345, 349, - 5, 66, 0, 0, 346, 350, 5, 38, 0, 0, 347, 348, 7, 0, 0, 0, 348, 350, 3, 32, - 16, 0, 349, 346, 1, 0, 0, 0, 349, 347, 1, 0, 0, 0, 350, 354, 1, 0, 0, 0, - 351, 352, 5, 38, 0, 0, 352, 354, 5, 66, 0, 0, 353, 345, 1, 0, 0, 0, 353, - 351, 1, 0, 0, 0, 354, 29, 1, 0, 0, 0, 355, 356, 5, 26, 0, 0, 356, 357, 3, - 32, 16, 0, 357, 358, 5, 27, 0, 0, 358, 31, 1, 0, 0, 0, 359, 360, 6, 16, -1, - 0, 360, 365, 3, 34, 17, 0, 361, 365, 3, 56, 28, 0, 362, 363, 7, 3, 0, 0, - 363, 365, 3, 32, 16, 7, 364, 359, 1, 0, 0, 0, 364, 361, 1, 0, 0, 0, 364, - 362, 1, 0, 0, 0, 365, 398, 1, 0, 0, 0, 366, 367, 10, 6, 0, 0, 367, 368, 7, - 4, 0, 0, 368, 397, 3, 32, 16, 7, 369, 370, 10, 5, 0, 0, 370, 371, 7, 5, 0, - 0, 371, 397, 3, 32, 16, 6, 372, 373, 10, 4, 0, 0, 373, 374, 7, 6, 0, 0, 374, - 397, 3, 32, 16, 5, 375, 376, 10, 3, 0, 0, 376, 377, 7, 7, 0, 0, 377, 397, 3, - 32, 16, 4, 378, 379, 10, 2, 0, 0, 379, 380, 7, 8, 0, 0, 380, 397, 3, 32, 16, - 3, 381, 382, 10, 1, 0, 0, 382, 383, 5, 42, 0, 0, 383, 384, 3, 32, 16, 0, - 384, 385, 5, 32, 0, 0, 385, 386, 3, 32, 16, 2, 386, 397, 1, 0, 0, 0, 387, - 388, 10, 8, 0, 0, 388, 389, 5, 34, 0, 0, 389, 394, 5, 66, 0, 0, 390, 391, 5, - 28, 0, 0, 391, 392, 3, 32, 16, 0, 392, 393, 5, 29, 0, 0, 393, 395, 1, 0, 0, - 0, 394, 390, 1, 0, 0, 0, 394, 395, 1, 0, 0, 0, 395, 397, 1, 0, 0, 0, 396, - 366, 1, 0, 0, 0, 396, 369, 1, 0, 0, 0, 396, 372, 1, 0, 0, 0, 396, 375, 1, 0, - 0, 0, 396, 378, 1, 0, 0, 0, 396, 381, 1, 0, 0, 0, 396, 387, 1, 0, 0, 0, 397, - 400, 1, 0, 0, 0, 398, 396, 1, 0, 0, 0, 398, 399, 1, 0, 0, 0, 399, 33, 1, 0, - 0, 0, 400, 398, 1, 0, 0, 0, 401, 402, 5, 26, 0, 0, 402, 403, 3, 32, 16, 0, - 403, 404, 5, 27, 0, 0, 404, 414, 1, 0, 0, 0, 405, 406, 5, 28, 0, 0, 406, - 407, 3, 58, 29, 0, 407, 408, 5, 29, 0, 0, 408, 414, 1, 0, 0, 0, 409, 414, 5, - 67, 0, 0, 410, 414, 3, 60, 30, 0, 411, 414, 3, 64, 32, 0, 412, 414, 3, 68, - 34, 0, 413, 401, 1, 0, 0, 0, 413, 405, 1, 0, 0, 0, 413, 409, 1, 0, 0, 0, - 413, 410, 1, 0, 0, 0, 413, 411, 1, 0, 0, 0, 413, 412, 1, 0, 0, 0, 414, 35, - 1, 0, 0, 0, 415, 416, 5, 17, 0, 0, 416, 419, 5, 26, 0, 0, 417, 420, 5, 69, - 0, 0, 418, 420, 3, 32, 16, 0, 419, 417, 1, 0, 0, 0, 419, 418, 1, 0, 0, 0, - 419, 420, 1, 0, 0, 0, 420, 421, 1, 0, 0, 0, 421, 422, 5, 27, 0, 0, 422, 37, - 1, 0, 0, 0, 423, 424, 5, 8, 0, 0, 424, 425, 5, 66, 0, 0, 425, 39, 1, 0, 0, - 0, 426, 430, 3, 38, 19, 0, 427, 429, 3, 62, 31, 0, 428, 427, 1, 0, 0, 0, - 429, 432, 1, 0, 0, 0, 430, 428, 1, 0, 0, 0, 430, 431, 1, 0, 0, 0, 431, 435, - 1, 0, 0, 0, 432, 430, 1, 0, 0, 0, 433, 434, 5, 36, 0, 0, 434, 436, 3, 56, - 28, 0, 435, 433, 1, 0, 0, 0, 435, 436, 1, 0, 0, 0, 436, 41, 1, 0, 0, 0, 437, - 439, 5, 3, 0, 0, 438, 440, 5, 2, 0, 0, 439, 438, 1, 0, 0, 0, 439, 440, 1, 0, - 0, 0, 440, 442, 1, 0, 0, 0, 441, 443, 3, 44, 22, 0, 442, 441, 1, 0, 0, 0, - 442, 443, 1, 0, 0, 0, 443, 444, 1, 0, 0, 0, 444, 445, 3, 60, 30, 0, 445, 43, - 1, 0, 0, 0, 446, 447, 5, 30, 0, 0, 447, 448, 3, 64, 32, 0, 448, 449, 5, 31, - 0, 0, 449, 45, 1, 0, 0, 0, 450, 453, 3, 42, 21, 0, 451, 452, 5, 39, 0, 0, - 452, 454, 3, 52, 26, 0, 453, 451, 1, 0, 0, 0, 453, 454, 1, 0, 0, 0, 454, - 464, 1, 0, 0, 0, 455, 460, 3, 42, 21, 0, 456, 457, 5, 35, 0, 0, 457, 459, 3, - 60, 30, 0, 458, 456, 1, 0, 0, 0, 459, 462, 1, 0, 0, 0, 460, 458, 1, 0, 0, 0, - 460, 461, 1, 0, 0, 0, 461, 464, 1, 0, 0, 0, 462, 460, 1, 0, 0, 0, 463, 450, - 1, 0, 0, 0, 463, 455, 1, 0, 0, 0, 464, 47, 1, 0, 0, 0, 465, 466, 5, 9, 0, 0, - 466, 480, 3, 60, 30, 0, 467, 468, 5, 9, 0, 0, 468, 469, 5, 26, 0, 0, 469, - 474, 3, 60, 30, 0, 470, 471, 5, 35, 0, 0, 471, 473, 3, 60, 30, 0, 472, 470, - 1, 0, 0, 0, 473, 476, 1, 0, 0, 0, 474, 472, 1, 0, 0, 0, 474, 475, 1, 0, 0, - 0, 475, 477, 1, 0, 0, 0, 476, 474, 1, 0, 0, 0, 477, 478, 5, 27, 0, 0, 478, - 480, 1, 0, 0, 0, 479, 465, 1, 0, 0, 0, 479, 467, 1, 0, 0, 0, 480, 49, 1, 0, - 0, 0, 481, 484, 3, 48, 24, 0, 482, 483, 5, 36, 0, 0, 483, 485, 3, 52, 26, 0, - 484, 482, 1, 0, 0, 0, 484, 485, 1, 0, 0, 0, 485, 495, 1, 0, 0, 0, 486, 491, - 3, 48, 24, 0, 487, 488, 5, 35, 0, 0, 488, 490, 3, 60, 30, 0, 489, 487, 1, 0, - 0, 0, 490, 493, 1, 0, 0, 0, 491, 489, 1, 0, 0, 0, 491, 492, 1, 0, 0, 0, 492, - 495, 1, 0, 0, 0, 493, 491, 1, 0, 0, 0, 494, 481, 1, 0, 0, 0, 494, 486, 1, 0, - 0, 0, 495, 51, 1, 0, 0, 0, 496, 499, 3, 32, 16, 0, 497, 499, 3, 56, 28, 0, - 498, 496, 1, 0, 0, 0, 498, 497, 1, 0, 0, 0, 499, 53, 1, 0, 0, 0, 500, 502, - 5, 26, 0, 0, 501, 503, 3, 58, 29, 0, 502, 501, 1, 0, 0, 0, 502, 503, 1, 0, - 0, 0, 503, 504, 1, 0, 0, 0, 504, 537, 5, 27, 0, 0, 505, 506, 5, 26, 0, 0, - 506, 507, 5, 66, 0, 0, 507, 508, 5, 39, 0, 0, 508, 515, 3, 32, 16, 0, 509, - 510, 5, 35, 0, 0, 510, 511, 5, 66, 0, 0, 511, 512, 5, 39, 0, 0, 512, 514, 3, - 32, 16, 0, 513, 509, 1, 0, 0, 0, 514, 517, 1, 0, 0, 0, 515, 513, 1, 0, 0, 0, - 515, 516, 1, 0, 0, 0, 516, 518, 1, 0, 0, 0, 517, 515, 1, 0, 0, 0, 518, 519, - 5, 27, 0, 0, 519, 537, 1, 0, 0, 0, 520, 521, 5, 26, 0, 0, 521, 522, 3, 32, - 16, 0, 522, 523, 5, 40, 0, 0, 523, 531, 5, 66, 0, 0, 524, 525, 5, 35, 0, 0, - 525, 526, 3, 32, 16, 0, 526, 527, 5, 40, 0, 0, 527, 528, 5, 66, 0, 0, 528, - 530, 1, 0, 0, 0, 529, 524, 1, 0, 0, 0, 530, 533, 1, 0, 0, 0, 531, 529, 1, 0, - 0, 0, 531, 532, 1, 0, 0, 0, 532, 534, 1, 0, 0, 0, 533, 531, 1, 0, 0, 0, 534, - 535, 5, 27, 0, 0, 535, 537, 1, 0, 0, 0, 536, 500, 1, 0, 0, 0, 536, 505, 1, - 0, 0, 0, 536, 520, 1, 0, 0, 0, 537, 55, 1, 0, 0, 0, 538, 540, 5, 25, 0, 0, - 539, 538, 1, 0, 0, 0, 539, 540, 1, 0, 0, 0, 540, 541, 1, 0, 0, 0, 541, 542, - 5, 66, 0, 0, 542, 544, 5, 26, 0, 0, 543, 545, 3, 58, 29, 0, 544, 543, 1, 0, - 0, 0, 544, 545, 1, 0, 0, 0, 545, 546, 1, 0, 0, 0, 546, 548, 5, 27, 0, 0, - 547, 549, 3, 54, 27, 0, 548, 547, 1, 0, 0, 0, 548, 549, 1, 0, 0, 0, 549, 57, - 1, 0, 0, 0, 550, 555, 3, 32, 16, 0, 551, 552, 5, 35, 0, 0, 552, 554, 3, 32, - 16, 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, 59, 1, 0, 0, 0, 557, 555, 1, 0, 0, 0, 558, 562, - 5, 66, 0, 0, 559, 561, 3, 62, 31, 0, 560, 559, 1, 0, 0, 0, 561, 564, 1, 0, - 0, 0, 562, 560, 1, 0, 0, 0, 562, 563, 1, 0, 0, 0, 563, 61, 1, 0, 0, 0, 564, - 562, 1, 0, 0, 0, 565, 566, 5, 28, 0, 0, 566, 567, 3, 32, 16, 0, 567, 568, 5, - 29, 0, 0, 568, 63, 1, 0, 0, 0, 569, 574, 5, 66, 0, 0, 570, 571, 5, 35, 0, 0, - 571, 573, 5, 66, 0, 0, 572, 570, 1, 0, 0, 0, 573, 576, 1, 0, 0, 0, 574, 572, - 1, 0, 0, 0, 574, 575, 1, 0, 0, 0, 575, 65, 1, 0, 0, 0, 576, 574, 1, 0, 0, 0, - 577, 582, 7, 9, 0, 0, 578, 579, 5, 35, 0, 0, 579, 581, 7, 9, 0, 0, 580, 578, - 1, 0, 0, 0, 581, 584, 1, 0, 0, 0, 582, 580, 1, 0, 0, 0, 582, 583, 1, 0, 0, - 0, 583, 67, 1, 0, 0, 0, 584, 582, 1, 0, 0, 0, 585, 590, 5, 67, 0, 0, 586, - 587, 5, 35, 0, 0, 587, 589, 5, 67, 0, 0, 588, 586, 1, 0, 0, 0, 589, 592, 1, - 0, 0, 0, 590, 588, 1, 0, 0, 0, 590, 591, 1, 0, 0, 0, 591, 69, 1, 0, 0, 0, - 592, 590, 1, 0, 0, 0, 59, 73, 79, 85, 89, 100, 108, 114, 123, 152, 175, 179, - 182, 187, 196, 204, 210, 241, 257, 268, 276, 282, 294, 310, 329, 338, 343, - 349, 353, 364, 394, 396, 398, 413, 419, 430, 435, 439, 442, 453, 460, 463, - 474, 479, 484, 491, 494, 498, 502, 515, 531, 536, 539, 544, 548, 555, 562, - 574, 582, 590, + 1, 11, 1, 11, 3, 11, 350, 8, 11, 1, 12, 1, 12, 1, 12, 3, 12, 355, 8, 12, 1, + 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 3, 14, 364, 8, 14, 1, 14, 1, + 14, 1, 14, 3, 14, 369, 8, 14, 1, 15, 1, 15, 1, 15, 1, 15, 3, 15, 375, 8, 15, + 1, 15, 1, 15, 3, 15, 379, 8, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, + 1, 17, 1, 17, 1, 17, 3, 17, 390, 8, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, + 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, + 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, + 1, 17, 3, 17, 420, 8, 17, 5, 17, 422, 8, 17, 10, 17, 12, 17, 425, 9, 17, 1, + 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, + 18, 3, 18, 439, 8, 18, 1, 19, 1, 19, 1, 19, 1, 19, 3, 19, 445, 8, 19, 1, 19, + 1, 19, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 5, 21, 454, 8, 21, 10, 21, 12, 21, + 457, 9, 21, 1, 21, 1, 21, 3, 21, 461, 8, 21, 1, 22, 1, 22, 3, 22, 465, 8, + 22, 1, 22, 3, 22, 468, 8, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 23, 1, + 24, 1, 24, 1, 24, 3, 24, 479, 8, 24, 1, 24, 1, 24, 1, 24, 5, 24, 484, 8, 24, + 10, 24, 12, 24, 487, 9, 24, 3, 24, 489, 8, 24, 1, 25, 1, 25, 1, 25, 1, 25, + 1, 25, 1, 25, 1, 25, 5, 25, 498, 8, 25, 10, 25, 12, 25, 501, 9, 25, 1, 25, + 1, 25, 3, 25, 505, 8, 25, 1, 26, 1, 26, 1, 26, 3, 26, 510, 8, 26, 1, 26, 1, + 26, 1, 26, 5, 26, 515, 8, 26, 10, 26, 12, 26, 518, 9, 26, 3, 26, 520, 8, 26, + 1, 27, 1, 27, 3, 27, 524, 8, 27, 1, 28, 1, 28, 3, 28, 528, 8, 28, 1, 28, 1, + 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 5, 28, 539, 8, 28, 10, + 28, 12, 28, 542, 9, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, 28, 1, + 28, 1, 28, 1, 28, 1, 28, 5, 28, 555, 8, 28, 10, 28, 12, 28, 558, 9, 28, 1, + 28, 1, 28, 3, 28, 562, 8, 28, 1, 29, 3, 29, 565, 8, 29, 1, 29, 1, 29, 1, 29, + 3, 29, 570, 8, 29, 1, 29, 1, 29, 3, 29, 574, 8, 29, 1, 30, 1, 30, 1, 30, 5, + 30, 579, 8, 30, 10, 30, 12, 30, 582, 9, 30, 1, 31, 1, 31, 5, 31, 586, 8, 31, + 10, 31, 12, 31, 589, 9, 31, 1, 32, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, + 5, 33, 598, 8, 33, 10, 33, 12, 33, 601, 9, 33, 1, 34, 1, 34, 1, 34, 5, 34, + 606, 8, 34, 10, 34, 12, 34, 609, 9, 34, 1, 35, 1, 35, 1, 35, 5, 35, 614, 8, + 35, 10, 35, 12, 35, 617, 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, 682, 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, 177, 1, 0, 0, 0, 14, 179, 1, 0, + 0, 0, 16, 194, 1, 0, 0, 0, 18, 203, 1, 0, 0, 0, 20, 217, 1, 0, 0, 0, 22, + 349, 1, 0, 0, 0, 24, 351, 1, 0, 0, 0, 26, 356, 1, 0, 0, 0, 28, 363, 1, 0, 0, + 0, 30, 378, 1, 0, 0, 0, 32, 380, 1, 0, 0, 0, 34, 389, 1, 0, 0, 0, 36, 438, + 1, 0, 0, 0, 38, 440, 1, 0, 0, 0, 40, 448, 1, 0, 0, 0, 42, 451, 1, 0, 0, 0, + 44, 462, 1, 0, 0, 0, 46, 471, 1, 0, 0, 0, 48, 488, 1, 0, 0, 0, 50, 504, 1, + 0, 0, 0, 52, 519, 1, 0, 0, 0, 54, 523, 1, 0, 0, 0, 56, 561, 1, 0, 0, 0, 58, + 564, 1, 0, 0, 0, 60, 575, 1, 0, 0, 0, 62, 583, 1, 0, 0, 0, 64, 590, 1, 0, 0, + 0, 66, 594, 1, 0, 0, 0, 68, 602, 1, 0, 0, 0, 70, 610, 1, 0, 0, 0, 72, 74, 3, + 2, 1, 0, 73, 72, 1, 0, 0, 0, 74, 77, 1, 0, 0, 0, 75, 73, 1, 0, 0, 0, 75, 76, + 1, 0, 0, 0, 76, 81, 1, 0, 0, 0, 77, 75, 1, 0, 0, 0, 78, 80, 3, 4, 2, 0, 79, + 78, 1, 0, 0, 0, 80, 83, 1, 0, 0, 0, 81, 79, 1, 0, 0, 0, 81, 82, 1, 0, 0, 0, + 82, 87, 1, 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, 128, 1, 0, 0, 0, 127, 125, 1, 0, 0, 0, 128, 129, 5, 31, 0, + 0, 129, 11, 1, 0, 0, 0, 130, 178, 3, 10, 5, 0, 131, 132, 5, 66, 0, 0, 132, + 133, 5, 38, 0, 0, 133, 178, 5, 33, 0, 0, 134, 135, 3, 52, 26, 0, 135, 136, + 5, 33, 0, 0, 136, 178, 1, 0, 0, 0, 137, 138, 3, 62, 31, 0, 138, 139, 7, 0, + 0, 0, 139, 140, 3, 34, 17, 0, 140, 141, 5, 33, 0, 0, 141, 178, 1, 0, 0, 0, + 142, 143, 5, 26, 0, 0, 143, 144, 3, 68, 34, 0, 144, 145, 5, 27, 0, 0, 145, + 146, 5, 36, 0, 0, 146, 147, 3, 34, 17, 0, 147, 148, 5, 33, 0, 0, 148, 178, + 1, 0, 0, 0, 149, 150, 5, 12, 0, 0, 150, 151, 3, 32, 16, 0, 151, 154, 3, 12, + 6, 0, 152, 153, 5, 13, 0, 0, 153, 155, 3, 12, 6, 0, 154, 152, 1, 0, 0, 0, + 154, 155, 1, 0, 0, 0, 155, 178, 1, 0, 0, 0, 156, 157, 5, 15, 0, 0, 157, 158, + 3, 32, 16, 0, 158, 159, 3, 12, 6, 0, 159, 178, 1, 0, 0, 0, 160, 161, 5, 14, + 0, 0, 161, 162, 5, 26, 0, 0, 162, 163, 3, 26, 13, 0, 163, 164, 5, 27, 0, 0, + 164, 165, 3, 12, 6, 0, 165, 178, 1, 0, 0, 0, 166, 167, 5, 11, 0, 0, 167, + 168, 3, 34, 17, 0, 168, 169, 5, 33, 0, 0, 169, 178, 1, 0, 0, 0, 170, 171, 5, + 18, 0, 0, 171, 172, 3, 32, 16, 0, 172, 173, 5, 33, 0, 0, 173, 178, 1, 0, 0, + 0, 174, 175, 3, 38, 19, 0, 175, 176, 5, 33, 0, 0, 176, 178, 1, 0, 0, 0, 177, + 130, 1, 0, 0, 0, 177, 131, 1, 0, 0, 0, 177, 134, 1, 0, 0, 0, 177, 137, 1, 0, + 0, 0, 177, 142, 1, 0, 0, 0, 177, 149, 1, 0, 0, 0, 177, 156, 1, 0, 0, 0, 177, + 160, 1, 0, 0, 0, 177, 166, 1, 0, 0, 0, 177, 170, 1, 0, 0, 0, 177, 174, 1, 0, + 0, 0, 178, 13, 1, 0, 0, 0, 179, 181, 5, 7, 0, 0, 180, 182, 5, 20, 0, 0, 181, + 180, 1, 0, 0, 0, 181, 182, 1, 0, 0, 0, 182, 184, 1, 0, 0, 0, 183, 185, 5, + 25, 0, 0, 184, 183, 1, 0, 0, 0, 184, 185, 1, 0, 0, 0, 185, 186, 1, 0, 0, 0, + 186, 187, 5, 66, 0, 0, 187, 189, 5, 26, 0, 0, 188, 190, 3, 66, 33, 0, 189, + 188, 1, 0, 0, 0, 189, 190, 1, 0, 0, 0, 190, 191, 1, 0, 0, 0, 191, 192, 5, + 27, 0, 0, 192, 193, 3, 16, 8, 0, 193, 15, 1, 0, 0, 0, 194, 198, 5, 30, 0, 0, + 195, 197, 3, 22, 11, 0, 196, 195, 1, 0, 0, 0, 197, 200, 1, 0, 0, 0, 198, + 196, 1, 0, 0, 0, 198, 199, 1, 0, 0, 0, 199, 201, 1, 0, 0, 0, 200, 198, 1, 0, + 0, 0, 201, 202, 5, 31, 0, 0, 202, 17, 1, 0, 0, 0, 203, 204, 5, 8, 0, 0, 204, + 206, 5, 24, 0, 0, 205, 207, 3, 20, 10, 0, 206, 205, 1, 0, 0, 0, 206, 207, 1, + 0, 0, 0, 207, 208, 1, 0, 0, 0, 208, 209, 5, 36, 0, 0, 209, 210, 5, 66, 0, 0, + 210, 212, 5, 26, 0, 0, 211, 213, 3, 60, 30, 0, 212, 211, 1, 0, 0, 0, 212, + 213, 1, 0, 0, 0, 213, 214, 1, 0, 0, 0, 214, 215, 5, 27, 0, 0, 215, 216, 5, + 33, 0, 0, 216, 19, 1, 0, 0, 0, 217, 218, 5, 30, 0, 0, 218, 219, 5, 6, 0, 0, + 219, 220, 5, 28, 0, 0, 220, 221, 3, 66, 33, 0, 221, 222, 5, 29, 0, 0, 222, + 223, 5, 31, 0, 0, 223, 21, 1, 0, 0, 0, 224, 350, 3, 16, 8, 0, 225, 226, 5, + 66, 0, 0, 226, 227, 5, 38, 0, 0, 227, 350, 5, 33, 0, 0, 228, 229, 3, 52, 26, + 0, 229, 230, 5, 33, 0, 0, 230, 350, 1, 0, 0, 0, 231, 232, 3, 48, 24, 0, 232, + 233, 5, 33, 0, 0, 233, 350, 1, 0, 0, 0, 234, 235, 3, 42, 21, 0, 235, 236, 5, + 33, 0, 0, 236, 350, 1, 0, 0, 0, 237, 238, 3, 58, 29, 0, 238, 239, 5, 33, 0, + 0, 239, 350, 1, 0, 0, 0, 240, 243, 3, 62, 31, 0, 241, 242, 5, 34, 0, 0, 242, + 244, 5, 66, 0, 0, 243, 241, 1, 0, 0, 0, 243, 244, 1, 0, 0, 0, 244, 245, 1, + 0, 0, 0, 245, 246, 5, 36, 0, 0, 246, 247, 3, 34, 17, 0, 247, 248, 5, 33, 0, + 0, 248, 350, 1, 0, 0, 0, 249, 250, 3, 34, 17, 0, 250, 251, 5, 41, 0, 0, 251, + 252, 3, 34, 17, 0, 252, 253, 5, 33, 0, 0, 253, 350, 1, 0, 0, 0, 254, 255, 3, + 24, 12, 0, 255, 256, 7, 1, 0, 0, 256, 257, 3, 34, 17, 0, 257, 258, 5, 33, 0, + 0, 258, 350, 1, 0, 0, 0, 259, 260, 5, 26, 0, 0, 260, 265, 3, 24, 12, 0, 261, + 262, 5, 35, 0, 0, 262, 264, 3, 24, 12, 0, 263, 261, 1, 0, 0, 0, 264, 267, 1, + 0, 0, 0, 265, 263, 1, 0, 0, 0, 265, 266, 1, 0, 0, 0, 266, 268, 1, 0, 0, 0, + 267, 265, 1, 0, 0, 0, 268, 269, 5, 27, 0, 0, 269, 270, 5, 39, 0, 0, 270, + 271, 3, 34, 17, 0, 271, 272, 5, 33, 0, 0, 272, 350, 1, 0, 0, 0, 273, 274, 3, + 34, 17, 0, 274, 275, 5, 40, 0, 0, 275, 276, 3, 24, 12, 0, 276, 277, 5, 33, + 0, 0, 277, 350, 1, 0, 0, 0, 278, 279, 3, 34, 17, 0, 279, 280, 5, 40, 0, 0, + 280, 281, 5, 26, 0, 0, 281, 286, 3, 24, 12, 0, 282, 283, 5, 35, 0, 0, 283, + 285, 3, 24, 12, 0, 284, 282, 1, 0, 0, 0, 285, 288, 1, 0, 0, 0, 286, 284, 1, + 0, 0, 0, 286, 287, 1, 0, 0, 0, 287, 289, 1, 0, 0, 0, 288, 286, 1, 0, 0, 0, + 289, 290, 5, 27, 0, 0, 290, 291, 5, 33, 0, 0, 291, 350, 1, 0, 0, 0, 292, + 293, 5, 43, 0, 0, 293, 296, 7, 2, 0, 0, 294, 297, 3, 34, 17, 0, 295, 297, 3, + 58, 29, 0, 296, 294, 1, 0, 0, 0, 296, 295, 1, 0, 0, 0, 297, 298, 1, 0, 0, 0, + 298, 299, 5, 33, 0, 0, 299, 350, 1, 0, 0, 0, 300, 303, 3, 34, 17, 0, 301, + 303, 3, 58, 29, 0, 302, 300, 1, 0, 0, 0, 302, 301, 1, 0, 0, 0, 303, 304, 1, + 0, 0, 0, 304, 305, 5, 40, 0, 0, 305, 306, 5, 43, 0, 0, 306, 307, 5, 33, 0, + 0, 307, 350, 1, 0, 0, 0, 308, 309, 5, 26, 0, 0, 309, 310, 3, 68, 34, 0, 310, + 311, 5, 27, 0, 0, 311, 314, 7, 2, 0, 0, 312, 315, 3, 58, 29, 0, 313, 315, 3, + 34, 17, 0, 314, 312, 1, 0, 0, 0, 314, 313, 1, 0, 0, 0, 315, 316, 1, 0, 0, 0, + 316, 317, 5, 33, 0, 0, 317, 350, 1, 0, 0, 0, 318, 319, 3, 58, 29, 0, 319, + 320, 5, 40, 0, 0, 320, 321, 5, 26, 0, 0, 321, 322, 3, 68, 34, 0, 322, 323, + 5, 27, 0, 0, 323, 324, 5, 33, 0, 0, 324, 350, 1, 0, 0, 0, 325, 326, 5, 12, + 0, 0, 326, 327, 3, 32, 16, 0, 327, 330, 3, 22, 11, 0, 328, 329, 5, 13, 0, 0, + 329, 331, 3, 22, 11, 0, 330, 328, 1, 0, 0, 0, 330, 331, 1, 0, 0, 0, 331, + 350, 1, 0, 0, 0, 332, 333, 5, 15, 0, 0, 333, 334, 3, 32, 16, 0, 334, 335, 3, + 22, 11, 0, 335, 350, 1, 0, 0, 0, 336, 337, 5, 14, 0, 0, 337, 338, 5, 26, 0, + 0, 338, 339, 3, 26, 13, 0, 339, 340, 5, 27, 0, 0, 340, 341, 3, 22, 11, 0, + 341, 350, 1, 0, 0, 0, 342, 343, 5, 18, 0, 0, 343, 344, 3, 32, 16, 0, 344, + 345, 5, 33, 0, 0, 345, 350, 1, 0, 0, 0, 346, 347, 3, 38, 19, 0, 347, 348, 5, + 33, 0, 0, 348, 350, 1, 0, 0, 0, 349, 224, 1, 0, 0, 0, 349, 225, 1, 0, 0, 0, + 349, 228, 1, 0, 0, 0, 349, 231, 1, 0, 0, 0, 349, 234, 1, 0, 0, 0, 349, 237, + 1, 0, 0, 0, 349, 240, 1, 0, 0, 0, 349, 249, 1, 0, 0, 0, 349, 254, 1, 0, 0, + 0, 349, 259, 1, 0, 0, 0, 349, 273, 1, 0, 0, 0, 349, 278, 1, 0, 0, 0, 349, + 292, 1, 0, 0, 0, 349, 302, 1, 0, 0, 0, 349, 308, 1, 0, 0, 0, 349, 318, 1, 0, + 0, 0, 349, 325, 1, 0, 0, 0, 349, 332, 1, 0, 0, 0, 349, 336, 1, 0, 0, 0, 349, + 342, 1, 0, 0, 0, 349, 346, 1, 0, 0, 0, 350, 23, 1, 0, 0, 0, 351, 354, 3, 62, + 31, 0, 352, 353, 5, 34, 0, 0, 353, 355, 3, 62, 31, 0, 354, 352, 1, 0, 0, 0, + 354, 355, 1, 0, 0, 0, 355, 25, 1, 0, 0, 0, 356, 357, 3, 28, 14, 0, 357, 358, + 5, 33, 0, 0, 358, 359, 3, 34, 17, 0, 359, 360, 5, 33, 0, 0, 360, 361, 3, 30, + 15, 0, 361, 27, 1, 0, 0, 0, 362, 364, 5, 9, 0, 0, 363, 362, 1, 0, 0, 0, 363, + 364, 1, 0, 0, 0, 364, 365, 1, 0, 0, 0, 365, 368, 3, 62, 31, 0, 366, 367, 5, + 36, 0, 0, 367, 369, 3, 54, 27, 0, 368, 366, 1, 0, 0, 0, 368, 369, 1, 0, 0, + 0, 369, 29, 1, 0, 0, 0, 370, 374, 5, 66, 0, 0, 371, 375, 5, 38, 0, 0, 372, + 373, 7, 0, 0, 0, 373, 375, 3, 34, 17, 0, 374, 371, 1, 0, 0, 0, 374, 372, 1, + 0, 0, 0, 375, 379, 1, 0, 0, 0, 376, 377, 5, 38, 0, 0, 377, 379, 5, 66, 0, 0, + 378, 370, 1, 0, 0, 0, 378, 376, 1, 0, 0, 0, 379, 31, 1, 0, 0, 0, 380, 381, + 5, 26, 0, 0, 381, 382, 3, 34, 17, 0, 382, 383, 5, 27, 0, 0, 383, 33, 1, 0, + 0, 0, 384, 385, 6, 17, -1, 0, 385, 390, 3, 36, 18, 0, 386, 390, 3, 58, 29, + 0, 387, 388, 7, 3, 0, 0, 388, 390, 3, 34, 17, 7, 389, 384, 1, 0, 0, 0, 389, + 386, 1, 0, 0, 0, 389, 387, 1, 0, 0, 0, 390, 423, 1, 0, 0, 0, 391, 392, 10, + 6, 0, 0, 392, 393, 7, 4, 0, 0, 393, 422, 3, 34, 17, 7, 394, 395, 10, 5, 0, + 0, 395, 396, 7, 5, 0, 0, 396, 422, 3, 34, 17, 6, 397, 398, 10, 4, 0, 0, 398, + 399, 7, 6, 0, 0, 399, 422, 3, 34, 17, 5, 400, 401, 10, 3, 0, 0, 401, 402, 7, + 7, 0, 0, 402, 422, 3, 34, 17, 4, 403, 404, 10, 2, 0, 0, 404, 405, 7, 8, 0, + 0, 405, 422, 3, 34, 17, 3, 406, 407, 10, 1, 0, 0, 407, 408, 5, 42, 0, 0, + 408, 409, 3, 34, 17, 0, 409, 410, 5, 32, 0, 0, 410, 411, 3, 34, 17, 2, 411, + 422, 1, 0, 0, 0, 412, 413, 10, 8, 0, 0, 413, 414, 5, 34, 0, 0, 414, 419, 5, + 66, 0, 0, 415, 416, 5, 28, 0, 0, 416, 417, 3, 34, 17, 0, 417, 418, 5, 29, 0, + 0, 418, 420, 1, 0, 0, 0, 419, 415, 1, 0, 0, 0, 419, 420, 1, 0, 0, 0, 420, + 422, 1, 0, 0, 0, 421, 391, 1, 0, 0, 0, 421, 394, 1, 0, 0, 0, 421, 397, 1, 0, + 0, 0, 421, 400, 1, 0, 0, 0, 421, 403, 1, 0, 0, 0, 421, 406, 1, 0, 0, 0, 421, + 412, 1, 0, 0, 0, 422, 425, 1, 0, 0, 0, 423, 421, 1, 0, 0, 0, 423, 424, 1, 0, + 0, 0, 424, 35, 1, 0, 0, 0, 425, 423, 1, 0, 0, 0, 426, 427, 5, 26, 0, 0, 427, + 428, 3, 34, 17, 0, 428, 429, 5, 27, 0, 0, 429, 439, 1, 0, 0, 0, 430, 431, 5, + 28, 0, 0, 431, 432, 3, 60, 30, 0, 432, 433, 5, 29, 0, 0, 433, 439, 1, 0, 0, + 0, 434, 439, 5, 67, 0, 0, 435, 439, 3, 62, 31, 0, 436, 439, 3, 66, 33, 0, + 437, 439, 3, 70, 35, 0, 438, 426, 1, 0, 0, 0, 438, 430, 1, 0, 0, 0, 438, + 434, 1, 0, 0, 0, 438, 435, 1, 0, 0, 0, 438, 436, 1, 0, 0, 0, 438, 437, 1, 0, + 0, 0, 439, 37, 1, 0, 0, 0, 440, 441, 5, 17, 0, 0, 441, 444, 5, 26, 0, 0, + 442, 445, 5, 69, 0, 0, 443, 445, 3, 34, 17, 0, 444, 442, 1, 0, 0, 0, 444, + 443, 1, 0, 0, 0, 444, 445, 1, 0, 0, 0, 445, 446, 1, 0, 0, 0, 446, 447, 5, + 27, 0, 0, 447, 39, 1, 0, 0, 0, 448, 449, 5, 8, 0, 0, 449, 450, 5, 66, 0, 0, + 450, 41, 1, 0, 0, 0, 451, 455, 3, 40, 20, 0, 452, 454, 3, 64, 32, 0, 453, + 452, 1, 0, 0, 0, 454, 457, 1, 0, 0, 0, 455, 453, 1, 0, 0, 0, 455, 456, 1, 0, + 0, 0, 456, 460, 1, 0, 0, 0, 457, 455, 1, 0, 0, 0, 458, 459, 5, 36, 0, 0, + 459, 461, 3, 58, 29, 0, 460, 458, 1, 0, 0, 0, 460, 461, 1, 0, 0, 0, 461, 43, + 1, 0, 0, 0, 462, 464, 5, 3, 0, 0, 463, 465, 5, 2, 0, 0, 464, 463, 1, 0, 0, + 0, 464, 465, 1, 0, 0, 0, 465, 467, 1, 0, 0, 0, 466, 468, 3, 46, 23, 0, 467, + 466, 1, 0, 0, 0, 467, 468, 1, 0, 0, 0, 468, 469, 1, 0, 0, 0, 469, 470, 3, + 62, 31, 0, 470, 45, 1, 0, 0, 0, 471, 472, 5, 30, 0, 0, 472, 473, 3, 66, 33, + 0, 473, 474, 5, 31, 0, 0, 474, 47, 1, 0, 0, 0, 475, 478, 3, 44, 22, 0, 476, + 477, 5, 39, 0, 0, 477, 479, 3, 54, 27, 0, 478, 476, 1, 0, 0, 0, 478, 479, 1, + 0, 0, 0, 479, 489, 1, 0, 0, 0, 480, 485, 3, 44, 22, 0, 481, 482, 5, 35, 0, + 0, 482, 484, 3, 62, 31, 0, 483, 481, 1, 0, 0, 0, 484, 487, 1, 0, 0, 0, 485, + 483, 1, 0, 0, 0, 485, 486, 1, 0, 0, 0, 486, 489, 1, 0, 0, 0, 487, 485, 1, 0, + 0, 0, 488, 475, 1, 0, 0, 0, 488, 480, 1, 0, 0, 0, 489, 49, 1, 0, 0, 0, 490, + 491, 5, 9, 0, 0, 491, 505, 3, 62, 31, 0, 492, 493, 5, 9, 0, 0, 493, 494, 5, + 26, 0, 0, 494, 499, 3, 62, 31, 0, 495, 496, 5, 35, 0, 0, 496, 498, 3, 62, + 31, 0, 497, 495, 1, 0, 0, 0, 498, 501, 1, 0, 0, 0, 499, 497, 1, 0, 0, 0, + 499, 500, 1, 0, 0, 0, 500, 502, 1, 0, 0, 0, 501, 499, 1, 0, 0, 0, 502, 503, + 5, 27, 0, 0, 503, 505, 1, 0, 0, 0, 504, 490, 1, 0, 0, 0, 504, 492, 1, 0, 0, + 0, 505, 51, 1, 0, 0, 0, 506, 509, 3, 50, 25, 0, 507, 508, 5, 36, 0, 0, 508, + 510, 3, 54, 27, 0, 509, 507, 1, 0, 0, 0, 509, 510, 1, 0, 0, 0, 510, 520, 1, + 0, 0, 0, 511, 516, 3, 50, 25, 0, 512, 513, 5, 35, 0, 0, 513, 515, 3, 62, 31, + 0, 514, 512, 1, 0, 0, 0, 515, 518, 1, 0, 0, 0, 516, 514, 1, 0, 0, 0, 516, + 517, 1, 0, 0, 0, 517, 520, 1, 0, 0, 0, 518, 516, 1, 0, 0, 0, 519, 506, 1, 0, + 0, 0, 519, 511, 1, 0, 0, 0, 520, 53, 1, 0, 0, 0, 521, 524, 3, 34, 17, 0, + 522, 524, 3, 58, 29, 0, 523, 521, 1, 0, 0, 0, 523, 522, 1, 0, 0, 0, 524, 55, + 1, 0, 0, 0, 525, 527, 5, 26, 0, 0, 526, 528, 3, 60, 30, 0, 527, 526, 1, 0, + 0, 0, 527, 528, 1, 0, 0, 0, 528, 529, 1, 0, 0, 0, 529, 562, 5, 27, 0, 0, + 530, 531, 5, 26, 0, 0, 531, 532, 5, 66, 0, 0, 532, 533, 5, 39, 0, 0, 533, + 540, 3, 34, 17, 0, 534, 535, 5, 35, 0, 0, 535, 536, 5, 66, 0, 0, 536, 537, + 5, 39, 0, 0, 537, 539, 3, 34, 17, 0, 538, 534, 1, 0, 0, 0, 539, 542, 1, 0, + 0, 0, 540, 538, 1, 0, 0, 0, 540, 541, 1, 0, 0, 0, 541, 543, 1, 0, 0, 0, 542, + 540, 1, 0, 0, 0, 543, 544, 5, 27, 0, 0, 544, 562, 1, 0, 0, 0, 545, 546, 5, + 26, 0, 0, 546, 547, 3, 34, 17, 0, 547, 548, 5, 40, 0, 0, 548, 556, 5, 66, 0, + 0, 549, 550, 5, 35, 0, 0, 550, 551, 3, 34, 17, 0, 551, 552, 5, 40, 0, 0, + 552, 553, 5, 66, 0, 0, 553, 555, 1, 0, 0, 0, 554, 549, 1, 0, 0, 0, 555, 558, + 1, 0, 0, 0, 556, 554, 1, 0, 0, 0, 556, 557, 1, 0, 0, 0, 557, 559, 1, 0, 0, + 0, 558, 556, 1, 0, 0, 0, 559, 560, 5, 27, 0, 0, 560, 562, 1, 0, 0, 0, 561, + 525, 1, 0, 0, 0, 561, 530, 1, 0, 0, 0, 561, 545, 1, 0, 0, 0, 562, 57, 1, 0, + 0, 0, 563, 565, 5, 25, 0, 0, 564, 563, 1, 0, 0, 0, 564, 565, 1, 0, 0, 0, + 565, 566, 1, 0, 0, 0, 566, 567, 5, 66, 0, 0, 567, 569, 5, 26, 0, 0, 568, + 570, 3, 60, 30, 0, 569, 568, 1, 0, 0, 0, 569, 570, 1, 0, 0, 0, 570, 571, 1, + 0, 0, 0, 571, 573, 5, 27, 0, 0, 572, 574, 3, 56, 28, 0, 573, 572, 1, 0, 0, + 0, 573, 574, 1, 0, 0, 0, 574, 59, 1, 0, 0, 0, 575, 580, 3, 34, 17, 0, 576, + 577, 5, 35, 0, 0, 577, 579, 3, 34, 17, 0, 578, 576, 1, 0, 0, 0, 579, 582, 1, + 0, 0, 0, 580, 578, 1, 0, 0, 0, 580, 581, 1, 0, 0, 0, 581, 61, 1, 0, 0, 0, + 582, 580, 1, 0, 0, 0, 583, 587, 5, 66, 0, 0, 584, 586, 3, 64, 32, 0, 585, + 584, 1, 0, 0, 0, 586, 589, 1, 0, 0, 0, 587, 585, 1, 0, 0, 0, 587, 588, 1, 0, + 0, 0, 588, 63, 1, 0, 0, 0, 589, 587, 1, 0, 0, 0, 590, 591, 5, 28, 0, 0, 591, + 592, 3, 34, 17, 0, 592, 593, 5, 29, 0, 0, 593, 65, 1, 0, 0, 0, 594, 599, 5, + 66, 0, 0, 595, 596, 5, 35, 0, 0, 596, 598, 5, 66, 0, 0, 597, 595, 1, 0, 0, + 0, 598, 601, 1, 0, 0, 0, 599, 597, 1, 0, 0, 0, 599, 600, 1, 0, 0, 0, 600, + 67, 1, 0, 0, 0, 601, 599, 1, 0, 0, 0, 602, 607, 7, 9, 0, 0, 603, 604, 5, 35, + 0, 0, 604, 606, 7, 9, 0, 0, 605, 603, 1, 0, 0, 0, 606, 609, 1, 0, 0, 0, 607, + 605, 1, 0, 0, 0, 607, 608, 1, 0, 0, 0, 608, 69, 1, 0, 0, 0, 609, 607, 1, 0, + 0, 0, 610, 615, 5, 67, 0, 0, 611, 612, 5, 35, 0, 0, 612, 614, 5, 67, 0, 0, + 613, 611, 1, 0, 0, 0, 614, 617, 1, 0, 0, 0, 615, 613, 1, 0, 0, 0, 615, 616, + 1, 0, 0, 0, 616, 71, 1, 0, 0, 0, 617, 615, 1, 0, 0, 0, 60, 75, 81, 87, 91, + 102, 110, 116, 125, 154, 177, 181, 184, 189, 198, 206, 212, 243, 265, 286, + 296, 302, 314, 330, 349, 354, 363, 368, 374, 378, 389, 419, 421, 423, 438, + 444, 455, 460, 464, 467, 478, 485, 488, 499, 504, 509, 516, 519, 523, 527, + 540, 556, 561, 564, 569, 573, 580, 587, 599, 607, 615, ]; private static __ATN: ATN; @@ -4261,11 +4347,8 @@ export class TemplateStmtContext extends ParserRuleContext { public expression(i: number): ExpressionContext { return this.getTypedRuleContext(ExpressionContext, i) as ExpressionContext; } - public identifier_list(): IdentifierContext[] { - return this.getTypedRuleContexts(IdentifierContext) as IdentifierContext[]; - } - public identifier(i: number): IdentifierContext { - return this.getTypedRuleContext(IdentifierContext, i) as IdentifierContext; + public identifier(): IdentifierContext { + return this.getTypedRuleContext(IdentifierContext, 0) as IdentifierContext; } public DOT(): TerminalNode { return this.getToken(CircomParser.DOT, 0); @@ -4273,14 +4356,29 @@ export class TemplateStmtContext extends ParserRuleContext { public CONSTRAINT_EQ(): TerminalNode { return this.getToken(CircomParser.CONSTRAINT_EQ, 0); } + public element_list(): ElementContext[] { + return this.getTypedRuleContexts(ElementContext) as ElementContext[]; + } + public element(i: number): ElementContext { + return this.getTypedRuleContext(ElementContext, i) as ElementContext; + } public LEFT_ASSIGNMENT(): TerminalNode { return this.getToken(CircomParser.LEFT_ASSIGNMENT, 0); } public ASSIGNMENT_OP(): TerminalNode { return this.getToken(CircomParser.ASSIGNMENT_OP, 0); } - public primary(): PrimaryContext { - return this.getTypedRuleContext(PrimaryContext, 0) as PrimaryContext; + public LP(): TerminalNode { + return this.getToken(CircomParser.LP, 0); + } + public RP(): TerminalNode { + return this.getToken(CircomParser.RP, 0); + } + public COMMA_list(): TerminalNode[] { + return this.getTokens(CircomParser.COMMA); + } + public COMMA(i: number): TerminalNode { + return this.getToken(CircomParser.COMMA, i); } public RIGHT_ASSIGNMENT(): TerminalNode { return this.getToken(CircomParser.RIGHT_ASSIGNMENT, 0); @@ -4288,18 +4386,12 @@ export class TemplateStmtContext extends ParserRuleContext { public UNDERSCORE(): TerminalNode { return this.getToken(CircomParser.UNDERSCORE, 0); } - public LP(): TerminalNode { - return this.getToken(CircomParser.LP, 0); - } public argsWithUnderscore(): ArgsWithUnderscoreContext { return this.getTypedRuleContext( ArgsWithUnderscoreContext, 0, ) as ArgsWithUnderscoreContext; } - public RP(): TerminalNode { - return this.getToken(CircomParser.RP, 0); - } public IF(): TerminalNode { return this.getToken(CircomParser.IF, 0); } @@ -4361,6 +4453,47 @@ export class TemplateStmtContext extends ParserRuleContext { } } +export class ElementContext extends ParserRuleContext { + constructor( + parser?: CircomParser, + parent?: ParserRuleContext, + invokingState?: number, + ) { + super(parent, invokingState); + this.parser = parser; + } + public identifier_list(): IdentifierContext[] { + return this.getTypedRuleContexts(IdentifierContext) as IdentifierContext[]; + } + public identifier(i: number): IdentifierContext { + return this.getTypedRuleContext(IdentifierContext, i) as IdentifierContext; + } + public DOT(): TerminalNode { + return this.getToken(CircomParser.DOT, 0); + } + public get ruleIndex(): number { + return CircomParser.RULE_element; + } + public enterRule(listener: CircomListener): void { + if (listener.enterElement) { + listener.enterElement(this); + } + } + public exitRule(listener: CircomListener): void { + if (listener.exitElement) { + listener.exitElement(this); + } + } + // @Override + public accept(visitor: CircomVisitor): Result { + if (visitor.visitElement) { + return visitor.visitElement(this); + } else { + return visitor.visitChildren(this); + } + } +} + export class ForControlContext extends ParserRuleContext { constructor( parser?: CircomParser, diff --git a/src/generated/CircomVisitor.ts b/src/generated/CircomVisitor.ts index fb9bfc8..5d52671 100644 --- a/src/generated/CircomVisitor.ts +++ b/src/generated/CircomVisitor.ts @@ -24,6 +24,7 @@ import { TemplateBlockContext } from "./CircomParser"; import { ComponentMainDeclarationContext } from "./CircomParser"; import { PublicInputsListContext } from "./CircomParser"; import { TemplateStmtContext } from "./CircomParser"; +import { ElementContext } from "./CircomParser"; import { ForControlContext } from "./CircomParser"; import { ForInitContext } from "./CircomParser"; import { ForUpdateContext } from "./CircomParser"; @@ -208,6 +209,12 @@ export default class CircomVisitor extends ParseTreeVisitor { * @return the visitor result */ visitTemplateStmt?: (ctx: TemplateStmtContext) => Result; + /** + * Visit a parse tree produced by `CircomParser.element`. + * @param ctx the parse tree + * @return the visitor result + */ + visitElement?: (ctx: ElementContext) => Result; /** * Visit a parse tree produced by `CircomParser.forControl`. * @param ctx the parse tree diff --git a/src/types.ts b/src/types.ts new file mode 100644 index 0000000..4ca1e57 --- /dev/null +++ b/src/types.ts @@ -0,0 +1 @@ +export * from "./types/index";