From 9757c082e13d32af46f961d7fdcddb62887f3fbf Mon Sep 17 00:00:00 2001
From: laurenz
Date: Sat, 18 May 2024 16:18:52 +0200
Subject: [PATCH] Declaration is now a Statement and Varaibles can be declared
anywhere BUT now it actually all get's parsed in the right order
---
src/main/antlr/Decaf.g4 | 8 +-
src/main/java/de/maishai/ASTGenerator.java | 8 +-
src/main/java/de/maishai/BlockGenerator.java | 11 +-
src/main/java/de/maishai/Compiler.java | 31 +-
.../java/de/maishai/StatementGenerator.java | 63 +-
.../java/de/maishai/VariableGenerator.java | 32 -
src/main/java/de/maishai/antlr/Decaf.interp | 3 +-
.../de/maishai/antlr/DecafBaseListener.java | 36 +
.../de/maishai/antlr/DecafBaseVisitor.java | 21 +
.../java/de/maishai/antlr/DecafListener.java | 34 +
.../java/de/maishai/antlr/DecafParser.java | 952 ++++++++++--------
.../java/de/maishai/antlr/DecafVisitor.java | 20 +
.../java/de/maishai/ast/records/Block.java | 2 +-
.../de/maishai/ast/records/Declaration.java | 2 +-
.../java/de/maishai/ast/records/Node.java | 2 +-
.../de/maishai/ast/records/Statement.java | 2 +-
.../typedast/typedclass/TypedBlock.java | 7 +-
17 files changed, 719 insertions(+), 515 deletions(-)
delete mode 100644 src/main/java/de/maishai/VariableGenerator.java
diff --git a/src/main/antlr/Decaf.g4 b/src/main/antlr/Decaf.g4
index 09b3168..7fa542d 100644
--- a/src/main/antlr/Decaf.g4
+++ b/src/main/antlr/Decaf.g4
@@ -14,9 +14,9 @@ constructor: PUBLIC id '(' params? ')' block;
params : param (',' param)*;
param : type id;
-block : '{' (localVar | stmt)* return? '}';
-localVar : type id ';'
- | type id '=' expr';';
+block : '{' (stmt)* return? '}';
+localVar : type id;
+localVarWithInitialization: type id '=' expr;
return: 'return' expr ';'
| 'return' ';'
;
@@ -27,6 +27,8 @@ stmt : 'if' '(' expr ')' block ('else' block)? #If
| 'while' '(' expr ')' block #While
| 'do' block 'while' '(' expr ')' ';'? #DoWhile
| 'break' ';' #Break
+ | localVar ';' #LocalVarDec
+ | localVarWithInitialization ';' #LocalVarDecWithInitialization
| assign ';' #Assignment
| stmtexpr ';' #StatementExpressionstmt
;
diff --git a/src/main/java/de/maishai/ASTGenerator.java b/src/main/java/de/maishai/ASTGenerator.java
index e8fe68e..95c50ce 100644
--- a/src/main/java/de/maishai/ASTGenerator.java
+++ b/src/main/java/de/maishai/ASTGenerator.java
@@ -1,8 +1,12 @@
package de.maishai;
import de.maishai.antlr.DecafParser;
-import de.maishai.ast.records.*;
+import de.maishai.ast.records.Block;
import de.maishai.ast.records.Class;
+import de.maishai.ast.records.Constructor;
+import de.maishai.ast.records.Declaration;
+import de.maishai.ast.records.Method;
+import de.maishai.ast.records.Parameter;
import de.maishai.typedast.Type;
import java.util.ArrayList;
@@ -21,7 +25,7 @@ public class ASTGenerator {
constructors = ctx.constructor().stream().map(ASTGenerator::generateConstructor).toList();
}
else {
- constructors.add(new Constructor(ctx.id().IDENTIFIER().getText(), List.of(), new Block(List.of(), List.of())));
+ constructors.add(new Constructor(ctx.id().IDENTIFIER().getText(), List.of(), new Block(List.of())));
}
List meths = new ArrayList<>();
if (ctx.meth() != null) {
diff --git a/src/main/java/de/maishai/BlockGenerator.java b/src/main/java/de/maishai/BlockGenerator.java
index f3f70aa..6b762cc 100644
--- a/src/main/java/de/maishai/BlockGenerator.java
+++ b/src/main/java/de/maishai/BlockGenerator.java
@@ -2,24 +2,23 @@ package de.maishai;
import de.maishai.antlr.DecafBaseVisitor;
import de.maishai.antlr.DecafParser;
-import de.maishai.ast.records.Declaration;
+import de.maishai.ast.records.Block;
import de.maishai.ast.records.Return;
import de.maishai.ast.records.Statement;
-import de.maishai.ast.records.Block;
+import java.util.ArrayList;
import java.util.List;
public class BlockGenerator extends DecafBaseVisitor {
@Override
public Block visitBlock(DecafParser.BlockContext ctx) {
- List vars = ctx.localVar().stream().map(var -> new VariableGenerator().visit(var)).toList();
- List statements = VariableGenerator.generateInstanciations(ctx.localVar());
+ List statements = new ArrayList<>(ctx.stmt().size());
for (DecafParser.StmtContext stmtContext : ctx.stmt()) {
- statements.add(new StatementGenerator().visit(stmtContext));
+ statements.addAll(new StatementGenerator().visit(stmtContext));
}
if (ctx.return_() != null){
statements.add(ctx.return_().isEmpty() ? new Return(null) : new Return(new ExpressionGenerator().visit(ctx.return_())));
}
- return new Block(vars, statements);
+ return new Block(statements);
}
}
diff --git a/src/main/java/de/maishai/Compiler.java b/src/main/java/de/maishai/Compiler.java
index 08a70a1..4b32b3e 100644
--- a/src/main/java/de/maishai/Compiler.java
+++ b/src/main/java/de/maishai/Compiler.java
@@ -18,6 +18,25 @@ import java.util.List;
*/
public class Compiler {
+ public static void main(String[] args) {
+ generateAST(List.of("""
+ public class E2ETests {
+ char ZZ;
+ int p;
+ public E2ETests() {
+ this.ZZ = 'z';
+ }
+
+ public int method(){
+ x += 4;
+ this.p = x;
+ int x = 5;
+ return this.p;
+ }
+ }
+ """));
+ }
+
public static Program generateAST(List fromSources) {
List classes = new ArrayList<>();
for (String fromSource : fromSources) {
@@ -97,10 +116,10 @@ public class Compiler {
}
}
- public static void main(String[] args) {
- generateByteCodeFileFromFile(List.of("src/main/resources/JavaTestfiles/ClassWithConstructor.java",
- "src/main/resources/JavaTestfiles/ClassWithConstructorAndMethodCall.java",
- "src/main/resources/JavaTestfiles/ComplexClass.java"),
- List.of("ClassWithConstructor","ClassWithConstructorAndMethodCall","ComplexClass"));
- }
+// public static void main(String[] args) {
+// generateByteCodeFileFromFile(List.of("src/main/resources/JavaTestfiles/ClassWithConstructor.java",
+// "src/main/resources/JavaTestfiles/ClassWithConstructorAndMethodCall.java",
+// "src/main/resources/JavaTestfiles/ComplexClass.java"),
+// List.of("ClassWithConstructor","ClassWithConstructorAndMethodCall","ComplexClass"));
+// }
}
diff --git a/src/main/java/de/maishai/StatementGenerator.java b/src/main/java/de/maishai/StatementGenerator.java
index ee138eb..cff4fc3 100644
--- a/src/main/java/de/maishai/StatementGenerator.java
+++ b/src/main/java/de/maishai/StatementGenerator.java
@@ -3,57 +3,82 @@ package de.maishai;
import de.maishai.antlr.DecafBaseVisitor;
import de.maishai.antlr.DecafParser;
import de.maishai.ast.Operator;
+import de.maishai.ast.records.Assignment;
+import de.maishai.ast.records.Binary;
+import de.maishai.ast.records.Block;
+import de.maishai.ast.records.Break;
+import de.maishai.ast.records.Declaration;
+import de.maishai.ast.records.DoWhile;
import de.maishai.ast.records.Expression;
+import de.maishai.ast.records.FieldVarAccess;
+import de.maishai.ast.records.For;
+import de.maishai.ast.records.IfElse;
+import de.maishai.ast.records.MethodCall;
+import de.maishai.ast.records.New;
import de.maishai.ast.records.Statement;
-import de.maishai.ast.records.*;
+import de.maishai.ast.records.While;
import de.maishai.typedast.Type;
import java.util.ArrayList;
import java.util.List;
-public class StatementGenerator extends DecafBaseVisitor {
+public class StatementGenerator extends DecafBaseVisitor> {
@Override
- public Statement visitIf(DecafParser.IfContext ctx) {
+ public List visitIf(DecafParser.IfContext ctx) {
Expression expr = new ExpressionGenerator().visit(ctx.expr());
Block ifBlock = new BlockGenerator().visit(ctx.block(0));
if (ctx.block().size() == 2) {
Block elseBlock = new BlockGenerator().visit(ctx.block(1));
- return new IfElse(expr, ifBlock, elseBlock);
+ return List.of(new IfElse(expr, ifBlock, elseBlock));
}
- return new IfElse(expr, ifBlock, null);
+ return List.of(new IfElse(expr, ifBlock, null));
}
@Override
- public For visitFor(DecafParser.ForContext ctx) {
+ public List visitFor(DecafParser.ForContext ctx) {
Assignment init = generateAssign(ctx.assign(0));
Expression expr = new ExpressionGenerator().visit(ctx.expr());
Assignment update = generateAssign(ctx.assign(1));
Block block = new BlockGenerator().visit(ctx.block());
- return new For(init, expr, update, block);
+ return List.of(new For(init, expr, update, block));
}
@Override
- public Statement visitWhile(DecafParser.WhileContext ctx) {
+ public List visitWhile(DecafParser.WhileContext ctx) {
Expression expr = new ExpressionGenerator().visit(ctx.expr());
Block block = new BlockGenerator().visit(ctx.block());
- return new While(expr, block);
+ return List.of(new While(expr, block));
}
@Override
- public DoWhile visitDoWhile(DecafParser.DoWhileContext ctx) {
+ public List visitDoWhile(DecafParser.DoWhileContext ctx) {
Block block = new BlockGenerator().visit(ctx.block());
Expression expr = new ExpressionGenerator().visit(ctx.expr());
- return new DoWhile(block, expr);
+ return List.of(new DoWhile(block, expr));
}
@Override
- public Statement visitBreak(DecafParser.BreakContext ctx) {
- return new Break();
+ public List visitBreak(DecafParser.BreakContext ctx) {
+ return List.of(new Break());
}
@Override
- public Statement visitAssignment(DecafParser.AssignmentContext ctx) {
- return generateAssign(ctx.assign());
+ public List visitLocalVarDec(DecafParser.LocalVarDecContext ctx) {
+ Declaration declaration = new Declaration(ctx.localVar().id().IDENTIFIER().getText(), ASTGenerator.getType(ctx.localVar().type()));
+ return List.of(declaration);
+ }
+
+ @Override
+ public List visitLocalVarDecWithInitialization(DecafParser.LocalVarDecWithInitializationContext ctx) {
+ Declaration declaration = new Declaration(ctx.localVarWithInitialization().id().IDENTIFIER().getText(), ASTGenerator.getType(ctx.localVarWithInitialization().type()));
+ Expression initialization = new ExpressionGenerator().visit(ctx.localVarWithInitialization().expr());
+ return List.of(declaration, new Assignment(new FieldVarAccess(false, null, declaration.name()), initialization));
+ }
+
+
+ @Override
+ public List visitAssignment(DecafParser.AssignmentContext ctx) {
+ return List.of(generateAssign(ctx.assign()));
}
private Assignment generateAssign(DecafParser.AssignContext ctx) {
@@ -70,7 +95,7 @@ public class StatementGenerator extends DecafBaseVisitor {
//StatementExpression
@Override
- public Statement visitMethodCall(DecafParser.MethodCallContext ctx) {
+ public List visitMethodCall(DecafParser.MethodCallContext ctx) {
boolean isField = ctx.methCall().THIS() != null;
Expression recursiveOwnerChain = null;
if (ctx.methCall().recipient() != null) {
@@ -82,18 +107,18 @@ public class StatementGenerator extends DecafBaseVisitor {
Expression astExpr = expr.accept(new ExpressionGenerator());
args.add(astExpr);
}
- return new MethodCall(new FieldVarAccess(isField, recursiveOwnerChain, ctx.methCall().methName().id().IDENTIFIER().getText()), args);
+ return List.of(new MethodCall(new FieldVarAccess(isField, recursiveOwnerChain, ctx.methCall().methName().id().IDENTIFIER().getText()), args));
}
@Override
- public Statement visitNew(DecafParser.NewContext ctx) {
+ public List visitNew(DecafParser.NewContext ctx) {
Type type = ASTGenerator.getType(ctx.type());
List args = new ArrayList<>();
for (var expr : ctx.args().expr()) {
Expression astExpr = expr.accept(new ExpressionGenerator());
args.add(astExpr);
}
- return new New(type, args);
+ return List.of(new New(type, args));
}
public static Expression resolveFancyAssign(DecafParser.AssignSignContext ctx, FieldVarAccess fieldVarAccess, Expression expression) {
diff --git a/src/main/java/de/maishai/VariableGenerator.java b/src/main/java/de/maishai/VariableGenerator.java
deleted file mode 100644
index 778868b..0000000
--- a/src/main/java/de/maishai/VariableGenerator.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package de.maishai;
-
-
-import de.maishai.antlr.DecafBaseVisitor;
-import de.maishai.antlr.DecafParser;
-import de.maishai.ast.records.Assignment;
-import de.maishai.ast.records.Declaration;
-import de.maishai.ast.records.FieldVarAccess;
-import de.maishai.ast.records.Statement;
-import de.maishai.typedast.Type;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class VariableGenerator extends DecafBaseVisitor {
-
- public static List generateInstanciations(List localVarContexts) {
- List assignements = new ArrayList<>(localVarContexts.size());
- for (DecafParser.LocalVarContext localVarContext : localVarContexts) {
- if (!localVarContext.expr().isEmpty()) {
- assignements.add(new Assignment(new FieldVarAccess(false, null, localVarContext.id().IDENTIFIER().getText()), new ExpressionGenerator().visit(localVarContext.expr())));
- }
- }
- return assignements;
- }
-
- @Override
- public Declaration visitLocalVar(DecafParser.LocalVarContext ctx) {
- Type type = ASTGenerator.getType(ctx.type());
- return new Declaration(ctx.id().IDENTIFIER().getText(), type);
- }
-}
diff --git a/src/main/java/de/maishai/antlr/Decaf.interp b/src/main/java/de/maishai/antlr/Decaf.interp
index 0d636c1..99f2347 100644
--- a/src/main/java/de/maishai/antlr/Decaf.interp
+++ b/src/main/java/de/maishai/antlr/Decaf.interp
@@ -115,6 +115,7 @@ params
param
block
localVar
+localVarWithInitialization
return
stmt
stmtexpr
@@ -132,4 +133,4 @@ id
atn:
-[4, 1, 49, 297, 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, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 3, 0, 58, 8, 0, 1, 0, 1, 0, 1, 0, 5, 0, 63, 8, 0, 10, 0, 12, 0, 66, 9, 0, 1, 0, 1, 0, 1, 1, 3, 1, 71, 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 3, 3, 3, 81, 8, 3, 1, 4, 1, 4, 1, 4, 1, 4, 3, 4, 87, 8, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 3, 5, 94, 8, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 3, 7, 112, 8, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 5, 8, 120, 8, 8, 10, 8, 12, 8, 123, 9, 8, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 5, 10, 131, 8, 10, 10, 10, 12, 10, 134, 9, 10, 1, 10, 3, 10, 137, 8, 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, 3, 11, 151, 8, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 3, 12, 159, 8, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 3, 13, 168, 8, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 3, 13, 193, 8, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 3, 13, 203, 8, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 3, 14, 210, 8, 14, 1, 14, 1, 14, 3, 14, 214, 8, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 3, 15, 227, 8, 15, 1, 15, 1, 15, 1, 15, 1, 15, 5, 15, 233, 8, 15, 10, 15, 12, 15, 236, 9, 15, 1, 16, 1, 16, 1, 17, 1, 17, 1, 18, 1, 18, 3, 18, 244, 8, 18, 1, 18, 1, 18, 1, 18, 5, 18, 249, 8, 18, 10, 18, 12, 18, 252, 9, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 3, 20, 262, 8, 20, 1, 20, 1, 20, 1, 20, 5, 20, 267, 8, 20, 10, 20, 12, 20, 270, 9, 20, 1, 20, 1, 20, 1, 21, 1, 21, 3, 21, 276, 8, 21, 1, 22, 1, 22, 1, 22, 3, 22, 281, 8, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 5, 23, 288, 8, 23, 10, 23, 12, 23, 291, 9, 23, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 0, 1, 30, 26, 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, 0, 4, 1, 0, 34, 37, 1, 0, 23, 33, 2, 0, 23, 23, 38, 38, 2, 0, 43, 44, 46, 46, 309, 0, 52, 1, 0, 0, 0, 2, 70, 1, 0, 0, 0, 4, 76, 1, 0, 0, 0, 6, 80, 1, 0, 0, 0, 8, 86, 1, 0, 0, 0, 10, 88, 1, 0, 0, 0, 12, 98, 1, 0, 0, 0, 14, 107, 1, 0, 0, 0, 16, 116, 1, 0, 0, 0, 18, 124, 1, 0, 0, 0, 20, 127, 1, 0, 0, 0, 22, 150, 1, 0, 0, 0, 24, 158, 1, 0, 0, 0, 26, 202, 1, 0, 0, 0, 28, 213, 1, 0, 0, 0, 30, 226, 1, 0, 0, 0, 32, 237, 1, 0, 0, 0, 34, 239, 1, 0, 0, 0, 36, 243, 1, 0, 0, 0, 38, 255, 1, 0, 0, 0, 40, 261, 1, 0, 0, 0, 42, 275, 1, 0, 0, 0, 44, 277, 1, 0, 0, 0, 46, 284, 1, 0, 0, 0, 48, 292, 1, 0, 0, 0, 50, 294, 1, 0, 0, 0, 52, 53, 5, 19, 0, 0, 53, 54, 5, 1, 0, 0, 54, 55, 3, 50, 25, 0, 55, 57, 5, 2, 0, 0, 56, 58, 3, 12, 6, 0, 57, 56, 1, 0, 0, 0, 57, 58, 1, 0, 0, 0, 58, 64, 1, 0, 0, 0, 59, 63, 3, 2, 1, 0, 60, 63, 3, 10, 5, 0, 61, 63, 3, 14, 7, 0, 62, 59, 1, 0, 0, 0, 62, 60, 1, 0, 0, 0, 62, 61, 1, 0, 0, 0, 63, 66, 1, 0, 0, 0, 64, 62, 1, 0, 0, 0, 64, 65, 1, 0, 0, 0, 65, 67, 1, 0, 0, 0, 66, 64, 1, 0, 0, 0, 67, 68, 5, 3, 0, 0, 68, 1, 1, 0, 0, 0, 69, 71, 5, 19, 0, 0, 70, 69, 1, 0, 0, 0, 70, 71, 1, 0, 0, 0, 71, 72, 1, 0, 0, 0, 72, 73, 3, 8, 4, 0, 73, 74, 3, 50, 25, 0, 74, 75, 5, 4, 0, 0, 75, 3, 1, 0, 0, 0, 76, 77, 7, 0, 0, 0, 77, 5, 1, 0, 0, 0, 78, 81, 3, 8, 4, 0, 79, 81, 5, 41, 0, 0, 80, 78, 1, 0, 0, 0, 80, 79, 1, 0, 0, 0, 81, 7, 1, 0, 0, 0, 82, 87, 5, 39, 0, 0, 83, 87, 5, 40, 0, 0, 84, 87, 5, 42, 0, 0, 85, 87, 3, 50, 25, 0, 86, 82, 1, 0, 0, 0, 86, 83, 1, 0, 0, 0, 86, 84, 1, 0, 0, 0, 86, 85, 1, 0, 0, 0, 87, 9, 1, 0, 0, 0, 88, 89, 5, 19, 0, 0, 89, 90, 3, 6, 3, 0, 90, 91, 3, 50, 25, 0, 91, 93, 5, 5, 0, 0, 92, 94, 3, 16, 8, 0, 93, 92, 1, 0, 0, 0, 93, 94, 1, 0, 0, 0, 94, 95, 1, 0, 0, 0, 95, 96, 5, 6, 0, 0, 96, 97, 3, 20, 10, 0, 97, 11, 1, 0, 0, 0, 98, 99, 5, 19, 0, 0, 99, 100, 5, 7, 0, 0, 100, 101, 5, 41, 0, 0, 101, 102, 5, 8, 0, 0, 102, 103, 5, 5, 0, 0, 103, 104, 5, 9, 0, 0, 104, 105, 5, 6, 0, 0, 105, 106, 3, 20, 10, 0, 106, 13, 1, 0, 0, 0, 107, 108, 5, 19, 0, 0, 108, 109, 3, 50, 25, 0, 109, 111, 5, 5, 0, 0, 110, 112, 3, 16, 8, 0, 111, 110, 1, 0, 0, 0, 111, 112, 1, 0, 0, 0, 112, 113, 1, 0, 0, 0, 113, 114, 5, 6, 0, 0, 114, 115, 3, 20, 10, 0, 115, 15, 1, 0, 0, 0, 116, 121, 3, 18, 9, 0, 117, 118, 5, 10, 0, 0, 118, 120, 3, 18, 9, 0, 119, 117, 1, 0, 0, 0, 120, 123, 1, 0, 0, 0, 121, 119, 1, 0, 0, 0, 121, 122, 1, 0, 0, 0, 122, 17, 1, 0, 0, 0, 123, 121, 1, 0, 0, 0, 124, 125, 3, 8, 4, 0, 125, 126, 3, 50, 25, 0, 126, 19, 1, 0, 0, 0, 127, 132, 5, 2, 0, 0, 128, 131, 3, 22, 11, 0, 129, 131, 3, 26, 13, 0, 130, 128, 1, 0, 0, 0, 130, 129, 1, 0, 0, 0, 131, 134, 1, 0, 0, 0, 132, 130, 1, 0, 0, 0, 132, 133, 1, 0, 0, 0, 133, 136, 1, 0, 0, 0, 134, 132, 1, 0, 0, 0, 135, 137, 3, 24, 12, 0, 136, 135, 1, 0, 0, 0, 136, 137, 1, 0, 0, 0, 137, 138, 1, 0, 0, 0, 138, 139, 5, 3, 0, 0, 139, 21, 1, 0, 0, 0, 140, 141, 3, 8, 4, 0, 141, 142, 3, 50, 25, 0, 142, 143, 5, 4, 0, 0, 143, 151, 1, 0, 0, 0, 144, 145, 3, 8, 4, 0, 145, 146, 3, 50, 25, 0, 146, 147, 5, 34, 0, 0, 147, 148, 3, 30, 15, 0, 148, 149, 5, 4, 0, 0, 149, 151, 1, 0, 0, 0, 150, 140, 1, 0, 0, 0, 150, 144, 1, 0, 0, 0, 151, 23, 1, 0, 0, 0, 152, 153, 5, 11, 0, 0, 153, 154, 3, 30, 15, 0, 154, 155, 5, 4, 0, 0, 155, 159, 1, 0, 0, 0, 156, 157, 5, 11, 0, 0, 157, 159, 5, 4, 0, 0, 158, 152, 1, 0, 0, 0, 158, 156, 1, 0, 0, 0, 159, 25, 1, 0, 0, 0, 160, 161, 5, 12, 0, 0, 161, 162, 5, 5, 0, 0, 162, 163, 3, 30, 15, 0, 163, 164, 5, 6, 0, 0, 164, 167, 3, 20, 10, 0, 165, 166, 5, 13, 0, 0, 166, 168, 3, 20, 10, 0, 167, 165, 1, 0, 0, 0, 167, 168, 1, 0, 0, 0, 168, 203, 1, 0, 0, 0, 169, 170, 5, 14, 0, 0, 170, 171, 5, 5, 0, 0, 171, 172, 3, 38, 19, 0, 172, 173, 5, 4, 0, 0, 173, 174, 3, 30, 15, 0, 174, 175, 5, 4, 0, 0, 175, 176, 3, 38, 19, 0, 176, 177, 5, 6, 0, 0, 177, 178, 3, 20, 10, 0, 178, 203, 1, 0, 0, 0, 179, 180, 5, 15, 0, 0, 180, 181, 5, 5, 0, 0, 181, 182, 3, 30, 15, 0, 182, 183, 5, 6, 0, 0, 183, 184, 3, 20, 10, 0, 184, 203, 1, 0, 0, 0, 185, 186, 5, 16, 0, 0, 186, 187, 3, 20, 10, 0, 187, 188, 5, 15, 0, 0, 188, 189, 5, 5, 0, 0, 189, 190, 3, 30, 15, 0, 190, 192, 5, 6, 0, 0, 191, 193, 5, 4, 0, 0, 192, 191, 1, 0, 0, 0, 192, 193, 1, 0, 0, 0, 193, 203, 1, 0, 0, 0, 194, 195, 5, 17, 0, 0, 195, 203, 5, 4, 0, 0, 196, 197, 3, 38, 19, 0, 197, 198, 5, 4, 0, 0, 198, 203, 1, 0, 0, 0, 199, 200, 3, 28, 14, 0, 200, 201, 5, 4, 0, 0, 201, 203, 1, 0, 0, 0, 202, 160, 1, 0, 0, 0, 202, 169, 1, 0, 0, 0, 202, 179, 1, 0, 0, 0, 202, 185, 1, 0, 0, 0, 202, 194, 1, 0, 0, 0, 202, 196, 1, 0, 0, 0, 202, 199, 1, 0, 0, 0, 203, 27, 1, 0, 0, 0, 204, 214, 3, 40, 20, 0, 205, 206, 5, 20, 0, 0, 206, 207, 3, 8, 4, 0, 207, 209, 5, 5, 0, 0, 208, 210, 3, 46, 23, 0, 209, 208, 1, 0, 0, 0, 209, 210, 1, 0, 0, 0, 210, 211, 1, 0, 0, 0, 211, 212, 5, 6, 0, 0, 212, 214, 1, 0, 0, 0, 213, 204, 1, 0, 0, 0, 213, 205, 1, 0, 0, 0, 214, 29, 1, 0, 0, 0, 215, 216, 6, 15, -1, 0, 216, 217, 3, 34, 17, 0, 217, 218, 3, 30, 15, 5, 218, 227, 1, 0, 0, 0, 219, 227, 3, 48, 24, 0, 220, 221, 5, 5, 0, 0, 221, 222, 3, 30, 15, 0, 222, 223, 5, 6, 0, 0, 223, 227, 1, 0, 0, 0, 224, 227, 3, 36, 18, 0, 225, 227, 3, 28, 14, 0, 226, 215, 1, 0, 0, 0, 226, 219, 1, 0, 0, 0, 226, 220, 1, 0, 0, 0, 226, 224, 1, 0, 0, 0, 226, 225, 1, 0, 0, 0, 227, 234, 1, 0, 0, 0, 228, 229, 10, 6, 0, 0, 229, 230, 3, 32, 16, 0, 230, 231, 3, 30, 15, 7, 231, 233, 1, 0, 0, 0, 232, 228, 1, 0, 0, 0, 233, 236, 1, 0, 0, 0, 234, 232, 1, 0, 0, 0, 234, 235, 1, 0, 0, 0, 235, 31, 1, 0, 0, 0, 236, 234, 1, 0, 0, 0, 237, 238, 7, 1, 0, 0, 238, 33, 1, 0, 0, 0, 239, 240, 7, 2, 0, 0, 240, 35, 1, 0, 0, 0, 241, 242, 5, 22, 0, 0, 242, 244, 5, 18, 0, 0, 243, 241, 1, 0, 0, 0, 243, 244, 1, 0, 0, 0, 244, 250, 1, 0, 0, 0, 245, 246, 3, 42, 21, 0, 246, 247, 5, 18, 0, 0, 247, 249, 1, 0, 0, 0, 248, 245, 1, 0, 0, 0, 249, 252, 1, 0, 0, 0, 250, 248, 1, 0, 0, 0, 250, 251, 1, 0, 0, 0, 251, 253, 1, 0, 0, 0, 252, 250, 1, 0, 0, 0, 253, 254, 3, 50, 25, 0, 254, 37, 1, 0, 0, 0, 255, 256, 3, 36, 18, 0, 256, 257, 3, 4, 2, 0, 257, 258, 3, 30, 15, 0, 258, 39, 1, 0, 0, 0, 259, 260, 5, 22, 0, 0, 260, 262, 5, 18, 0, 0, 261, 259, 1, 0, 0, 0, 261, 262, 1, 0, 0, 0, 262, 268, 1, 0, 0, 0, 263, 264, 3, 42, 21, 0, 264, 265, 5, 18, 0, 0, 265, 267, 1, 0, 0, 0, 266, 263, 1, 0, 0, 0, 267, 270, 1, 0, 0, 0, 268, 266, 1, 0, 0, 0, 268, 269, 1, 0, 0, 0, 269, 271, 1, 0, 0, 0, 270, 268, 1, 0, 0, 0, 271, 272, 3, 44, 22, 0, 272, 41, 1, 0, 0, 0, 273, 276, 3, 44, 22, 0, 274, 276, 3, 50, 25, 0, 275, 273, 1, 0, 0, 0, 275, 274, 1, 0, 0, 0, 276, 43, 1, 0, 0, 0, 277, 278, 3, 50, 25, 0, 278, 280, 5, 5, 0, 0, 279, 281, 3, 46, 23, 0, 280, 279, 1, 0, 0, 0, 280, 281, 1, 0, 0, 0, 281, 282, 1, 0, 0, 0, 282, 283, 5, 6, 0, 0, 283, 45, 1, 0, 0, 0, 284, 289, 3, 30, 15, 0, 285, 286, 5, 10, 0, 0, 286, 288, 3, 30, 15, 0, 287, 285, 1, 0, 0, 0, 288, 291, 1, 0, 0, 0, 289, 287, 1, 0, 0, 0, 289, 290, 1, 0, 0, 0, 290, 47, 1, 0, 0, 0, 291, 289, 1, 0, 0, 0, 292, 293, 7, 3, 0, 0, 293, 49, 1, 0, 0, 0, 294, 295, 5, 45, 0, 0, 295, 51, 1, 0, 0, 0, 28, 57, 62, 64, 70, 80, 86, 93, 111, 121, 130, 132, 136, 150, 158, 167, 192, 202, 209, 213, 226, 234, 243, 250, 261, 268, 275, 280, 289]
\ No newline at end of file
+[4, 1, 49, 300, 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, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 3, 0, 60, 8, 0, 1, 0, 1, 0, 1, 0, 5, 0, 65, 8, 0, 10, 0, 12, 0, 68, 9, 0, 1, 0, 1, 0, 1, 1, 3, 1, 73, 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 3, 3, 3, 83, 8, 3, 1, 4, 1, 4, 1, 4, 1, 4, 3, 4, 89, 8, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 3, 5, 96, 8, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 3, 7, 114, 8, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 5, 8, 122, 8, 8, 10, 8, 12, 8, 125, 9, 8, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 5, 10, 132, 8, 10, 10, 10, 12, 10, 135, 9, 10, 1, 10, 3, 10, 138, 8, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 3, 13, 156, 8, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 3, 14, 165, 8, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 3, 14, 190, 8, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 3, 14, 206, 8, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 3, 15, 213, 8, 15, 1, 15, 1, 15, 3, 15, 217, 8, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 3, 16, 230, 8, 16, 1, 16, 1, 16, 1, 16, 1, 16, 5, 16, 236, 8, 16, 10, 16, 12, 16, 239, 9, 16, 1, 17, 1, 17, 1, 18, 1, 18, 1, 19, 1, 19, 3, 19, 247, 8, 19, 1, 19, 1, 19, 1, 19, 5, 19, 252, 8, 19, 10, 19, 12, 19, 255, 9, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 3, 21, 265, 8, 21, 1, 21, 1, 21, 1, 21, 5, 21, 270, 8, 21, 10, 21, 12, 21, 273, 9, 21, 1, 21, 1, 21, 1, 22, 1, 22, 3, 22, 279, 8, 22, 1, 23, 1, 23, 1, 23, 3, 23, 284, 8, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 5, 24, 291, 8, 24, 10, 24, 12, 24, 294, 9, 24, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 0, 1, 32, 27, 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, 0, 4, 1, 0, 34, 37, 1, 0, 23, 33, 2, 0, 23, 23, 38, 38, 2, 0, 43, 44, 46, 46, 311, 0, 54, 1, 0, 0, 0, 2, 72, 1, 0, 0, 0, 4, 78, 1, 0, 0, 0, 6, 82, 1, 0, 0, 0, 8, 88, 1, 0, 0, 0, 10, 90, 1, 0, 0, 0, 12, 100, 1, 0, 0, 0, 14, 109, 1, 0, 0, 0, 16, 118, 1, 0, 0, 0, 18, 126, 1, 0, 0, 0, 20, 129, 1, 0, 0, 0, 22, 141, 1, 0, 0, 0, 24, 144, 1, 0, 0, 0, 26, 155, 1, 0, 0, 0, 28, 205, 1, 0, 0, 0, 30, 216, 1, 0, 0, 0, 32, 229, 1, 0, 0, 0, 34, 240, 1, 0, 0, 0, 36, 242, 1, 0, 0, 0, 38, 246, 1, 0, 0, 0, 40, 258, 1, 0, 0, 0, 42, 264, 1, 0, 0, 0, 44, 278, 1, 0, 0, 0, 46, 280, 1, 0, 0, 0, 48, 287, 1, 0, 0, 0, 50, 295, 1, 0, 0, 0, 52, 297, 1, 0, 0, 0, 54, 55, 5, 19, 0, 0, 55, 56, 5, 1, 0, 0, 56, 57, 3, 52, 26, 0, 57, 59, 5, 2, 0, 0, 58, 60, 3, 12, 6, 0, 59, 58, 1, 0, 0, 0, 59, 60, 1, 0, 0, 0, 60, 66, 1, 0, 0, 0, 61, 65, 3, 2, 1, 0, 62, 65, 3, 10, 5, 0, 63, 65, 3, 14, 7, 0, 64, 61, 1, 0, 0, 0, 64, 62, 1, 0, 0, 0, 64, 63, 1, 0, 0, 0, 65, 68, 1, 0, 0, 0, 66, 64, 1, 0, 0, 0, 66, 67, 1, 0, 0, 0, 67, 69, 1, 0, 0, 0, 68, 66, 1, 0, 0, 0, 69, 70, 5, 3, 0, 0, 70, 1, 1, 0, 0, 0, 71, 73, 5, 19, 0, 0, 72, 71, 1, 0, 0, 0, 72, 73, 1, 0, 0, 0, 73, 74, 1, 0, 0, 0, 74, 75, 3, 8, 4, 0, 75, 76, 3, 52, 26, 0, 76, 77, 5, 4, 0, 0, 77, 3, 1, 0, 0, 0, 78, 79, 7, 0, 0, 0, 79, 5, 1, 0, 0, 0, 80, 83, 3, 8, 4, 0, 81, 83, 5, 41, 0, 0, 82, 80, 1, 0, 0, 0, 82, 81, 1, 0, 0, 0, 83, 7, 1, 0, 0, 0, 84, 89, 5, 39, 0, 0, 85, 89, 5, 40, 0, 0, 86, 89, 5, 42, 0, 0, 87, 89, 3, 52, 26, 0, 88, 84, 1, 0, 0, 0, 88, 85, 1, 0, 0, 0, 88, 86, 1, 0, 0, 0, 88, 87, 1, 0, 0, 0, 89, 9, 1, 0, 0, 0, 90, 91, 5, 19, 0, 0, 91, 92, 3, 6, 3, 0, 92, 93, 3, 52, 26, 0, 93, 95, 5, 5, 0, 0, 94, 96, 3, 16, 8, 0, 95, 94, 1, 0, 0, 0, 95, 96, 1, 0, 0, 0, 96, 97, 1, 0, 0, 0, 97, 98, 5, 6, 0, 0, 98, 99, 3, 20, 10, 0, 99, 11, 1, 0, 0, 0, 100, 101, 5, 19, 0, 0, 101, 102, 5, 7, 0, 0, 102, 103, 5, 41, 0, 0, 103, 104, 5, 8, 0, 0, 104, 105, 5, 5, 0, 0, 105, 106, 5, 9, 0, 0, 106, 107, 5, 6, 0, 0, 107, 108, 3, 20, 10, 0, 108, 13, 1, 0, 0, 0, 109, 110, 5, 19, 0, 0, 110, 111, 3, 52, 26, 0, 111, 113, 5, 5, 0, 0, 112, 114, 3, 16, 8, 0, 113, 112, 1, 0, 0, 0, 113, 114, 1, 0, 0, 0, 114, 115, 1, 0, 0, 0, 115, 116, 5, 6, 0, 0, 116, 117, 3, 20, 10, 0, 117, 15, 1, 0, 0, 0, 118, 123, 3, 18, 9, 0, 119, 120, 5, 10, 0, 0, 120, 122, 3, 18, 9, 0, 121, 119, 1, 0, 0, 0, 122, 125, 1, 0, 0, 0, 123, 121, 1, 0, 0, 0, 123, 124, 1, 0, 0, 0, 124, 17, 1, 0, 0, 0, 125, 123, 1, 0, 0, 0, 126, 127, 3, 8, 4, 0, 127, 128, 3, 52, 26, 0, 128, 19, 1, 0, 0, 0, 129, 133, 5, 2, 0, 0, 130, 132, 3, 28, 14, 0, 131, 130, 1, 0, 0, 0, 132, 135, 1, 0, 0, 0, 133, 131, 1, 0, 0, 0, 133, 134, 1, 0, 0, 0, 134, 137, 1, 0, 0, 0, 135, 133, 1, 0, 0, 0, 136, 138, 3, 26, 13, 0, 137, 136, 1, 0, 0, 0, 137, 138, 1, 0, 0, 0, 138, 139, 1, 0, 0, 0, 139, 140, 5, 3, 0, 0, 140, 21, 1, 0, 0, 0, 141, 142, 3, 8, 4, 0, 142, 143, 3, 52, 26, 0, 143, 23, 1, 0, 0, 0, 144, 145, 3, 8, 4, 0, 145, 146, 3, 52, 26, 0, 146, 147, 5, 34, 0, 0, 147, 148, 3, 32, 16, 0, 148, 25, 1, 0, 0, 0, 149, 150, 5, 11, 0, 0, 150, 151, 3, 32, 16, 0, 151, 152, 5, 4, 0, 0, 152, 156, 1, 0, 0, 0, 153, 154, 5, 11, 0, 0, 154, 156, 5, 4, 0, 0, 155, 149, 1, 0, 0, 0, 155, 153, 1, 0, 0, 0, 156, 27, 1, 0, 0, 0, 157, 158, 5, 12, 0, 0, 158, 159, 5, 5, 0, 0, 159, 160, 3, 32, 16, 0, 160, 161, 5, 6, 0, 0, 161, 164, 3, 20, 10, 0, 162, 163, 5, 13, 0, 0, 163, 165, 3, 20, 10, 0, 164, 162, 1, 0, 0, 0, 164, 165, 1, 0, 0, 0, 165, 206, 1, 0, 0, 0, 166, 167, 5, 14, 0, 0, 167, 168, 5, 5, 0, 0, 168, 169, 3, 40, 20, 0, 169, 170, 5, 4, 0, 0, 170, 171, 3, 32, 16, 0, 171, 172, 5, 4, 0, 0, 172, 173, 3, 40, 20, 0, 173, 174, 5, 6, 0, 0, 174, 175, 3, 20, 10, 0, 175, 206, 1, 0, 0, 0, 176, 177, 5, 15, 0, 0, 177, 178, 5, 5, 0, 0, 178, 179, 3, 32, 16, 0, 179, 180, 5, 6, 0, 0, 180, 181, 3, 20, 10, 0, 181, 206, 1, 0, 0, 0, 182, 183, 5, 16, 0, 0, 183, 184, 3, 20, 10, 0, 184, 185, 5, 15, 0, 0, 185, 186, 5, 5, 0, 0, 186, 187, 3, 32, 16, 0, 187, 189, 5, 6, 0, 0, 188, 190, 5, 4, 0, 0, 189, 188, 1, 0, 0, 0, 189, 190, 1, 0, 0, 0, 190, 206, 1, 0, 0, 0, 191, 192, 5, 17, 0, 0, 192, 206, 5, 4, 0, 0, 193, 194, 3, 22, 11, 0, 194, 195, 5, 4, 0, 0, 195, 206, 1, 0, 0, 0, 196, 197, 3, 24, 12, 0, 197, 198, 5, 4, 0, 0, 198, 206, 1, 0, 0, 0, 199, 200, 3, 40, 20, 0, 200, 201, 5, 4, 0, 0, 201, 206, 1, 0, 0, 0, 202, 203, 3, 30, 15, 0, 203, 204, 5, 4, 0, 0, 204, 206, 1, 0, 0, 0, 205, 157, 1, 0, 0, 0, 205, 166, 1, 0, 0, 0, 205, 176, 1, 0, 0, 0, 205, 182, 1, 0, 0, 0, 205, 191, 1, 0, 0, 0, 205, 193, 1, 0, 0, 0, 205, 196, 1, 0, 0, 0, 205, 199, 1, 0, 0, 0, 205, 202, 1, 0, 0, 0, 206, 29, 1, 0, 0, 0, 207, 217, 3, 42, 21, 0, 208, 209, 5, 20, 0, 0, 209, 210, 3, 8, 4, 0, 210, 212, 5, 5, 0, 0, 211, 213, 3, 48, 24, 0, 212, 211, 1, 0, 0, 0, 212, 213, 1, 0, 0, 0, 213, 214, 1, 0, 0, 0, 214, 215, 5, 6, 0, 0, 215, 217, 1, 0, 0, 0, 216, 207, 1, 0, 0, 0, 216, 208, 1, 0, 0, 0, 217, 31, 1, 0, 0, 0, 218, 219, 6, 16, -1, 0, 219, 220, 3, 36, 18, 0, 220, 221, 3, 32, 16, 5, 221, 230, 1, 0, 0, 0, 222, 230, 3, 50, 25, 0, 223, 224, 5, 5, 0, 0, 224, 225, 3, 32, 16, 0, 225, 226, 5, 6, 0, 0, 226, 230, 1, 0, 0, 0, 227, 230, 3, 38, 19, 0, 228, 230, 3, 30, 15, 0, 229, 218, 1, 0, 0, 0, 229, 222, 1, 0, 0, 0, 229, 223, 1, 0, 0, 0, 229, 227, 1, 0, 0, 0, 229, 228, 1, 0, 0, 0, 230, 237, 1, 0, 0, 0, 231, 232, 10, 6, 0, 0, 232, 233, 3, 34, 17, 0, 233, 234, 3, 32, 16, 7, 234, 236, 1, 0, 0, 0, 235, 231, 1, 0, 0, 0, 236, 239, 1, 0, 0, 0, 237, 235, 1, 0, 0, 0, 237, 238, 1, 0, 0, 0, 238, 33, 1, 0, 0, 0, 239, 237, 1, 0, 0, 0, 240, 241, 7, 1, 0, 0, 241, 35, 1, 0, 0, 0, 242, 243, 7, 2, 0, 0, 243, 37, 1, 0, 0, 0, 244, 245, 5, 22, 0, 0, 245, 247, 5, 18, 0, 0, 246, 244, 1, 0, 0, 0, 246, 247, 1, 0, 0, 0, 247, 253, 1, 0, 0, 0, 248, 249, 3, 44, 22, 0, 249, 250, 5, 18, 0, 0, 250, 252, 1, 0, 0, 0, 251, 248, 1, 0, 0, 0, 252, 255, 1, 0, 0, 0, 253, 251, 1, 0, 0, 0, 253, 254, 1, 0, 0, 0, 254, 256, 1, 0, 0, 0, 255, 253, 1, 0, 0, 0, 256, 257, 3, 52, 26, 0, 257, 39, 1, 0, 0, 0, 258, 259, 3, 38, 19, 0, 259, 260, 3, 4, 2, 0, 260, 261, 3, 32, 16, 0, 261, 41, 1, 0, 0, 0, 262, 263, 5, 22, 0, 0, 263, 265, 5, 18, 0, 0, 264, 262, 1, 0, 0, 0, 264, 265, 1, 0, 0, 0, 265, 271, 1, 0, 0, 0, 266, 267, 3, 44, 22, 0, 267, 268, 5, 18, 0, 0, 268, 270, 1, 0, 0, 0, 269, 266, 1, 0, 0, 0, 270, 273, 1, 0, 0, 0, 271, 269, 1, 0, 0, 0, 271, 272, 1, 0, 0, 0, 272, 274, 1, 0, 0, 0, 273, 271, 1, 0, 0, 0, 274, 275, 3, 46, 23, 0, 275, 43, 1, 0, 0, 0, 276, 279, 3, 46, 23, 0, 277, 279, 3, 52, 26, 0, 278, 276, 1, 0, 0, 0, 278, 277, 1, 0, 0, 0, 279, 45, 1, 0, 0, 0, 280, 281, 3, 52, 26, 0, 281, 283, 5, 5, 0, 0, 282, 284, 3, 48, 24, 0, 283, 282, 1, 0, 0, 0, 283, 284, 1, 0, 0, 0, 284, 285, 1, 0, 0, 0, 285, 286, 5, 6, 0, 0, 286, 47, 1, 0, 0, 0, 287, 292, 3, 32, 16, 0, 288, 289, 5, 10, 0, 0, 289, 291, 3, 32, 16, 0, 290, 288, 1, 0, 0, 0, 291, 294, 1, 0, 0, 0, 292, 290, 1, 0, 0, 0, 292, 293, 1, 0, 0, 0, 293, 49, 1, 0, 0, 0, 294, 292, 1, 0, 0, 0, 295, 296, 7, 3, 0, 0, 296, 51, 1, 0, 0, 0, 297, 298, 5, 45, 0, 0, 298, 53, 1, 0, 0, 0, 26, 59, 64, 66, 72, 82, 88, 95, 113, 123, 133, 137, 155, 164, 189, 205, 212, 216, 229, 237, 246, 253, 264, 271, 278, 283, 292]
\ No newline at end of file
diff --git a/src/main/java/de/maishai/antlr/DecafBaseListener.java b/src/main/java/de/maishai/antlr/DecafBaseListener.java
index 81faa12..c74fcc9 100644
--- a/src/main/java/de/maishai/antlr/DecafBaseListener.java
+++ b/src/main/java/de/maishai/antlr/DecafBaseListener.java
@@ -156,6 +156,18 @@ public class DecafBaseListener implements DecafListener {
* The default implementation does nothing.
*/
@Override public void exitLocalVar(DecafParser.LocalVarContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterLocalVarWithInitialization(DecafParser.LocalVarWithInitializationContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitLocalVarWithInitialization(DecafParser.LocalVarWithInitializationContext ctx) { }
/**
* {@inheritDoc}
*
@@ -228,6 +240,30 @@ public class DecafBaseListener implements DecafListener {
* The default implementation does nothing.
*/
@Override public void exitBreak(DecafParser.BreakContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterLocalVarDec(DecafParser.LocalVarDecContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitLocalVarDec(DecafParser.LocalVarDecContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterLocalVarDecWithInitialization(DecafParser.LocalVarDecWithInitializationContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitLocalVarDecWithInitialization(DecafParser.LocalVarDecWithInitializationContext ctx) { }
/**
* {@inheritDoc}
*
diff --git a/src/main/java/de/maishai/antlr/DecafBaseVisitor.java b/src/main/java/de/maishai/antlr/DecafBaseVisitor.java
index e97edbc..97c3af4 100644
--- a/src/main/java/de/maishai/antlr/DecafBaseVisitor.java
+++ b/src/main/java/de/maishai/antlr/DecafBaseVisitor.java
@@ -96,6 +96,13 @@ public class DecafBaseVisitor extends AbstractParseTreeVisitor implements
* {@link #visitChildren} on {@code ctx}.
*/
@Override public T visitLocalVar(DecafParser.LocalVarContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitLocalVarWithInitialization(DecafParser.LocalVarWithInitializationContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
@@ -138,6 +145,20 @@ public class DecafBaseVisitor extends AbstractParseTreeVisitor implements
* {@link #visitChildren} on {@code ctx}.
*/
@Override public T visitBreak(DecafParser.BreakContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitLocalVarDec(DecafParser.LocalVarDecContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitLocalVarDecWithInitialization(DecafParser.LocalVarDecWithInitializationContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
diff --git a/src/main/java/de/maishai/antlr/DecafListener.java b/src/main/java/de/maishai/antlr/DecafListener.java
index de44ef1..7428da8 100644
--- a/src/main/java/de/maishai/antlr/DecafListener.java
+++ b/src/main/java/de/maishai/antlr/DecafListener.java
@@ -127,6 +127,16 @@ public interface DecafListener extends ParseTreeListener {
* @param ctx the parse tree
*/
void exitLocalVar(DecafParser.LocalVarContext ctx);
+ /**
+ * Enter a parse tree produced by {@link DecafParser#localVarWithInitialization}.
+ * @param ctx the parse tree
+ */
+ void enterLocalVarWithInitialization(DecafParser.LocalVarWithInitializationContext ctx);
+ /**
+ * Exit a parse tree produced by {@link DecafParser#localVarWithInitialization}.
+ * @param ctx the parse tree
+ */
+ void exitLocalVarWithInitialization(DecafParser.LocalVarWithInitializationContext ctx);
/**
* Enter a parse tree produced by {@link DecafParser#return}.
* @param ctx the parse tree
@@ -197,6 +207,30 @@ public interface DecafListener extends ParseTreeListener {
* @param ctx the parse tree
*/
void exitBreak(DecafParser.BreakContext ctx);
+ /**
+ * Enter a parse tree produced by the {@code LocalVarDec}
+ * labeled alternative in {@link DecafParser#stmt}.
+ * @param ctx the parse tree
+ */
+ void enterLocalVarDec(DecafParser.LocalVarDecContext ctx);
+ /**
+ * Exit a parse tree produced by the {@code LocalVarDec}
+ * labeled alternative in {@link DecafParser#stmt}.
+ * @param ctx the parse tree
+ */
+ void exitLocalVarDec(DecafParser.LocalVarDecContext ctx);
+ /**
+ * Enter a parse tree produced by the {@code LocalVarDecWithInitialization}
+ * labeled alternative in {@link DecafParser#stmt}.
+ * @param ctx the parse tree
+ */
+ void enterLocalVarDecWithInitialization(DecafParser.LocalVarDecWithInitializationContext ctx);
+ /**
+ * Exit a parse tree produced by the {@code LocalVarDecWithInitialization}
+ * labeled alternative in {@link DecafParser#stmt}.
+ * @param ctx the parse tree
+ */
+ void exitLocalVarDecWithInitialization(DecafParser.LocalVarDecWithInitializationContext ctx);
/**
* Enter a parse tree produced by the {@code Assignment}
* labeled alternative in {@link DecafParser#stmt}.
diff --git a/src/main/java/de/maishai/antlr/DecafParser.java b/src/main/java/de/maishai/antlr/DecafParser.java
index dc240d5..fe83be9 100644
--- a/src/main/java/de/maishai/antlr/DecafParser.java
+++ b/src/main/java/de/maishai/antlr/DecafParser.java
@@ -28,16 +28,16 @@ public class DecafParser extends Parser {
RULE_class = 0, RULE_field = 1, RULE_assignSign = 2, RULE_returntype = 3,
RULE_type = 4, RULE_meth = 5, RULE_mainmeth = 6, RULE_constructor = 7,
RULE_params = 8, RULE_param = 9, RULE_block = 10, RULE_localVar = 11,
- RULE_return = 12, RULE_stmt = 13, RULE_stmtexpr = 14, RULE_expr = 15,
- RULE_binaryOp = 16, RULE_unaryOp = 17, RULE_fieldVarAccess = 18, RULE_assign = 19,
- RULE_methCall = 20, RULE_recipient = 21, RULE_methName = 22, RULE_args = 23,
- RULE_literal = 24, RULE_id = 25;
+ RULE_localVarWithInitialization = 12, RULE_return = 13, RULE_stmt = 14,
+ RULE_stmtexpr = 15, RULE_expr = 16, RULE_binaryOp = 17, RULE_unaryOp = 18,
+ RULE_fieldVarAccess = 19, RULE_assign = 20, RULE_methCall = 21, RULE_recipient = 22,
+ RULE_methName = 23, RULE_args = 24, RULE_literal = 25, RULE_id = 26;
private static String[] makeRuleNames() {
return new String[] {
"class", "field", "assignSign", "returntype", "type", "meth", "mainmeth",
- "constructor", "params", "param", "block", "localVar", "return", "stmt",
- "stmtexpr", "expr", "binaryOp", "unaryOp", "fieldVarAccess", "assign",
- "methCall", "recipient", "methName", "args", "literal", "id"
+ "constructor", "params", "param", "block", "localVar", "localVarWithInitialization",
+ "return", "stmt", "stmtexpr", "expr", "binaryOp", "unaryOp", "fieldVarAccess",
+ "assign", "methCall", "recipient", "methName", "args", "literal", "id"
};
}
public static final String[] ruleNames = makeRuleNames();
@@ -167,57 +167,57 @@ public class DecafParser extends Parser {
try {
enterOuterAlt(_localctx, 1);
{
- setState(52);
- match(PUBLIC);
- setState(53);
- match(T__0);
setState(54);
- id();
+ match(PUBLIC);
setState(55);
- match(T__1);
+ match(T__0);
+ setState(56);
+ id();
setState(57);
+ match(T__1);
+ setState(59);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,0,_ctx) ) {
case 1:
{
- setState(56);
+ setState(58);
mainmeth();
}
break;
}
- setState(64);
+ setState(66);
_errHandler.sync(this);
_la = _input.LA(1);
while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 41231686565888L) != 0)) {
{
- setState(62);
+ setState(64);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,1,_ctx) ) {
case 1:
{
- setState(59);
+ setState(61);
field();
}
break;
case 2:
{
- setState(60);
+ setState(62);
meth();
}
break;
case 3:
{
- setState(61);
+ setState(63);
constructor();
}
break;
}
}
- setState(66);
+ setState(68);
_errHandler.sync(this);
_la = _input.LA(1);
}
- setState(67);
+ setState(69);
match(T__2);
}
}
@@ -267,21 +267,21 @@ public class DecafParser extends Parser {
try {
enterOuterAlt(_localctx, 1);
{
- setState(70);
+ setState(72);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==PUBLIC) {
{
- setState(69);
+ setState(71);
match(PUBLIC);
}
}
- setState(72);
- type();
- setState(73);
- id();
setState(74);
+ type();
+ setState(75);
+ id();
+ setState(76);
match(T__3);
}
}
@@ -328,7 +328,7 @@ public class DecafParser extends Parser {
try {
enterOuterAlt(_localctx, 1);
{
- setState(76);
+ setState(78);
_la = _input.LA(1);
if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 257698037760L) != 0)) ) {
_errHandler.recoverInline(this);
@@ -380,7 +380,7 @@ public class DecafParser extends Parser {
ReturntypeContext _localctx = new ReturntypeContext(_ctx, getState());
enterRule(_localctx, 6, RULE_returntype);
try {
- setState(80);
+ setState(82);
_errHandler.sync(this);
switch (_input.LA(1)) {
case INT:
@@ -389,14 +389,14 @@ public class DecafParser extends Parser {
case IDENTIFIER:
enterOuterAlt(_localctx, 1);
{
- setState(78);
+ setState(80);
type();
}
break;
case VOID:
enterOuterAlt(_localctx, 2);
{
- setState(79);
+ setState(81);
match(VOID);
}
break;
@@ -446,34 +446,34 @@ public class DecafParser extends Parser {
TypeContext _localctx = new TypeContext(_ctx, getState());
enterRule(_localctx, 8, RULE_type);
try {
- setState(86);
+ setState(88);
_errHandler.sync(this);
switch (_input.LA(1)) {
case INT:
enterOuterAlt(_localctx, 1);
{
- setState(82);
+ setState(84);
match(INT);
}
break;
case BOOL:
enterOuterAlt(_localctx, 2);
{
- setState(83);
+ setState(85);
match(BOOL);
}
break;
case CHAR:
enterOuterAlt(_localctx, 3);
{
- setState(84);
+ setState(86);
match(CHAR);
}
break;
case IDENTIFIER:
enterOuterAlt(_localctx, 4);
{
- setState(85);
+ setState(87);
id();
}
break;
@@ -533,27 +533,27 @@ public class DecafParser extends Parser {
try {
enterOuterAlt(_localctx, 1);
{
- setState(88);
- match(PUBLIC);
- setState(89);
- returntype();
setState(90);
- id();
+ match(PUBLIC);
setState(91);
- match(T__4);
+ returntype();
+ setState(92);
+ id();
setState(93);
+ match(T__4);
+ setState(95);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 41231686041600L) != 0)) {
{
- setState(92);
+ setState(94);
params();
}
}
- setState(95);
+ setState(97);
match(T__5);
- setState(96);
+ setState(98);
block();
}
}
@@ -600,21 +600,21 @@ public class DecafParser extends Parser {
try {
enterOuterAlt(_localctx, 1);
{
- setState(98);
- match(PUBLIC);
- setState(99);
- match(T__6);
setState(100);
- match(VOID);
+ match(PUBLIC);
setState(101);
- match(T__7);
+ match(T__6);
setState(102);
- match(T__4);
+ match(VOID);
setState(103);
- match(T__8);
+ match(T__7);
setState(104);
- match(T__5);
+ match(T__4);
setState(105);
+ match(T__8);
+ setState(106);
+ match(T__5);
+ setState(107);
block();
}
}
@@ -667,25 +667,25 @@ public class DecafParser extends Parser {
try {
enterOuterAlt(_localctx, 1);
{
- setState(107);
- match(PUBLIC);
- setState(108);
- id();
setState(109);
- match(T__4);
+ match(PUBLIC);
+ setState(110);
+ id();
setState(111);
+ match(T__4);
+ setState(113);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 41231686041600L) != 0)) {
{
- setState(110);
+ setState(112);
params();
}
}
- setState(113);
+ setState(115);
match(T__5);
- setState(114);
+ setState(116);
block();
}
}
@@ -734,21 +734,21 @@ public class DecafParser extends Parser {
try {
enterOuterAlt(_localctx, 1);
{
- setState(116);
+ setState(118);
param();
- setState(121);
+ setState(123);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==T__9) {
{
{
- setState(117);
+ setState(119);
match(T__9);
- setState(118);
+ setState(120);
param();
}
}
- setState(123);
+ setState(125);
_errHandler.sync(this);
_la = _input.LA(1);
}
@@ -798,9 +798,9 @@ public class DecafParser extends Parser {
try {
enterOuterAlt(_localctx, 1);
{
- setState(124);
+ setState(126);
type();
- setState(125);
+ setState(127);
id();
}
}
@@ -817,12 +817,6 @@ public class DecafParser extends Parser {
@SuppressWarnings("CheckReturnValue")
public static class BlockContext extends ParserRuleContext {
- public List localVar() {
- return getRuleContexts(LocalVarContext.class);
- }
- public LocalVarContext localVar(int i) {
- return getRuleContext(LocalVarContext.class,i);
- }
public List stmt() {
return getRuleContexts(StmtContext.class);
}
@@ -858,45 +852,33 @@ public class DecafParser extends Parser {
try {
enterOuterAlt(_localctx, 1);
{
- setState(127);
+ setState(129);
match(T__1);
- setState(132);
+ setState(133);
_errHandler.sync(this);
_la = _input.LA(1);
while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 41231691534336L) != 0)) {
+ {
{
setState(130);
- _errHandler.sync(this);
- switch ( getInterpreter().adaptivePredict(_input,9,_ctx) ) {
- case 1:
- {
- setState(128);
- localVar();
- }
- break;
- case 2:
- {
- setState(129);
- stmt();
- }
- break;
+ stmt();
}
}
- setState(134);
+ setState(135);
_errHandler.sync(this);
_la = _input.LA(1);
}
- setState(136);
+ setState(137);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T__10) {
{
- setState(135);
+ setState(136);
return_();
}
}
- setState(138);
+ setState(139);
match(T__2);
}
}
@@ -919,10 +901,6 @@ public class DecafParser extends Parser {
public IdContext id() {
return getRuleContext(IdContext.class,0);
}
- public TerminalNode ASSIGN() { return getToken(DecafParser.ASSIGN, 0); }
- public ExprContext expr() {
- return getRuleContext(ExprContext.class,0);
- }
public LocalVarContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@@ -946,35 +924,70 @@ public class DecafParser extends Parser {
LocalVarContext _localctx = new LocalVarContext(_ctx, getState());
enterRule(_localctx, 22, RULE_localVar);
try {
- setState(150);
- _errHandler.sync(this);
- switch ( getInterpreter().adaptivePredict(_input,12,_ctx) ) {
- case 1:
- enterOuterAlt(_localctx, 1);
- {
- setState(140);
- type();
- setState(141);
- id();
- setState(142);
- match(T__3);
- }
- break;
- case 2:
- enterOuterAlt(_localctx, 2);
- {
- setState(144);
- type();
- setState(145);
- id();
- setState(146);
- match(ASSIGN);
- setState(147);
- expr(0);
- setState(148);
- match(T__3);
- }
- break;
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(141);
+ type();
+ setState(142);
+ id();
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class LocalVarWithInitializationContext extends ParserRuleContext {
+ public TypeContext type() {
+ return getRuleContext(TypeContext.class,0);
+ }
+ public IdContext id() {
+ return getRuleContext(IdContext.class,0);
+ }
+ public TerminalNode ASSIGN() { return getToken(DecafParser.ASSIGN, 0); }
+ public ExprContext expr() {
+ return getRuleContext(ExprContext.class,0);
+ }
+ public LocalVarWithInitializationContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_localVarWithInitialization; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof DecafListener ) ((DecafListener)listener).enterLocalVarWithInitialization(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof DecafListener ) ((DecafListener)listener).exitLocalVarWithInitialization(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof DecafVisitor ) return ((DecafVisitor extends T>)visitor).visitLocalVarWithInitialization(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final LocalVarWithInitializationContext localVarWithInitialization() throws RecognitionException {
+ LocalVarWithInitializationContext _localctx = new LocalVarWithInitializationContext(_ctx, getState());
+ enterRule(_localctx, 24, RULE_localVarWithInitialization);
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(144);
+ type();
+ setState(145);
+ id();
+ setState(146);
+ match(ASSIGN);
+ setState(147);
+ expr(0);
}
}
catch (RecognitionException re) {
@@ -1014,28 +1027,28 @@ public class DecafParser extends Parser {
public final ReturnContext return_() throws RecognitionException {
ReturnContext _localctx = new ReturnContext(_ctx, getState());
- enterRule(_localctx, 24, RULE_return);
+ enterRule(_localctx, 26, RULE_return);
try {
- setState(158);
+ setState(155);
_errHandler.sync(this);
- switch ( getInterpreter().adaptivePredict(_input,13,_ctx) ) {
+ switch ( getInterpreter().adaptivePredict(_input,11,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
- setState(152);
+ setState(149);
match(T__10);
- setState(153);
+ setState(150);
expr(0);
- setState(154);
+ setState(151);
match(T__3);
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
- setState(156);
+ setState(153);
match(T__10);
- setState(157);
+ setState(154);
match(T__3);
}
break;
@@ -1085,6 +1098,26 @@ public class DecafParser extends Parser {
}
}
@SuppressWarnings("CheckReturnValue")
+ public static class LocalVarDecContext extends StmtContext {
+ public LocalVarContext localVar() {
+ return getRuleContext(LocalVarContext.class,0);
+ }
+ public LocalVarDecContext(StmtContext ctx) { copyFrom(ctx); }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof DecafListener ) ((DecafListener)listener).enterLocalVarDec(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof DecafListener ) ((DecafListener)listener).exitLocalVarDec(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof DecafVisitor ) return ((DecafVisitor extends T>)visitor).visitLocalVarDec(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+ @SuppressWarnings("CheckReturnValue")
public static class StatementExpressionstmtContext extends StmtContext {
public StmtexprContext stmtexpr() {
return getRuleContext(StmtexprContext.class,0);
@@ -1151,6 +1184,26 @@ public class DecafParser extends Parser {
}
}
@SuppressWarnings("CheckReturnValue")
+ public static class LocalVarDecWithInitializationContext extends StmtContext {
+ public LocalVarWithInitializationContext localVarWithInitialization() {
+ return getRuleContext(LocalVarWithInitializationContext.class,0);
+ }
+ public LocalVarDecWithInitializationContext(StmtContext ctx) { copyFrom(ctx); }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof DecafListener ) ((DecafListener)listener).enterLocalVarDecWithInitialization(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof DecafListener ) ((DecafListener)listener).exitLocalVarDecWithInitialization(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof DecafVisitor ) return ((DecafVisitor extends T>)visitor).visitLocalVarDecWithInitialization(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+ @SuppressWarnings("CheckReturnValue")
public static class DoWhileContext extends StmtContext {
public BlockContext block() {
return getRuleContext(BlockContext.class,0);
@@ -1225,34 +1278,34 @@ public class DecafParser extends Parser {
public final StmtContext stmt() throws RecognitionException {
StmtContext _localctx = new StmtContext(_ctx, getState());
- enterRule(_localctx, 26, RULE_stmt);
+ enterRule(_localctx, 28, RULE_stmt);
int _la;
try {
- setState(202);
+ setState(205);
_errHandler.sync(this);
- switch ( getInterpreter().adaptivePredict(_input,16,_ctx) ) {
+ switch ( getInterpreter().adaptivePredict(_input,14,_ctx) ) {
case 1:
_localctx = new IfContext(_localctx);
enterOuterAlt(_localctx, 1);
{
- setState(160);
+ setState(157);
match(T__11);
- setState(161);
+ setState(158);
match(T__4);
- setState(162);
+ setState(159);
expr(0);
- setState(163);
+ setState(160);
match(T__5);
- setState(164);
+ setState(161);
block();
- setState(167);
+ setState(164);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T__12) {
{
- setState(165);
+ setState(162);
match(T__12);
- setState(166);
+ setState(163);
block();
}
}
@@ -1263,23 +1316,23 @@ public class DecafParser extends Parser {
_localctx = new ForContext(_localctx);
enterOuterAlt(_localctx, 2);
{
- setState(169);
+ setState(166);
match(T__13);
- setState(170);
+ setState(167);
match(T__4);
- setState(171);
+ setState(168);
assign();
- setState(172);
+ setState(169);
match(T__3);
- setState(173);
+ setState(170);
expr(0);
- setState(174);
+ setState(171);
match(T__3);
- setState(175);
+ setState(172);
assign();
- setState(176);
+ setState(173);
match(T__5);
- setState(177);
+ setState(174);
block();
}
break;
@@ -1287,15 +1340,15 @@ public class DecafParser extends Parser {
_localctx = new WhileContext(_localctx);
enterOuterAlt(_localctx, 3);
{
- setState(179);
+ setState(176);
match(T__14);
- setState(180);
+ setState(177);
match(T__4);
- setState(181);
+ setState(178);
expr(0);
- setState(182);
+ setState(179);
match(T__5);
- setState(183);
+ setState(180);
block();
}
break;
@@ -1303,24 +1356,24 @@ public class DecafParser extends Parser {
_localctx = new DoWhileContext(_localctx);
enterOuterAlt(_localctx, 4);
{
- setState(185);
+ setState(182);
match(T__15);
- setState(186);
+ setState(183);
block();
- setState(187);
+ setState(184);
match(T__14);
- setState(188);
+ setState(185);
match(T__4);
- setState(189);
+ setState(186);
expr(0);
- setState(190);
+ setState(187);
match(T__5);
- setState(192);
+ setState(189);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T__3) {
{
- setState(191);
+ setState(188);
match(T__3);
}
}
@@ -1331,32 +1384,52 @@ public class DecafParser extends Parser {
_localctx = new BreakContext(_localctx);
enterOuterAlt(_localctx, 5);
{
- setState(194);
+ setState(191);
match(T__16);
- setState(195);
+ setState(192);
match(T__3);
}
break;
case 6:
- _localctx = new AssignmentContext(_localctx);
+ _localctx = new LocalVarDecContext(_localctx);
enterOuterAlt(_localctx, 6);
{
- setState(196);
- assign();
- setState(197);
+ setState(193);
+ localVar();
+ setState(194);
match(T__3);
}
break;
case 7:
- _localctx = new StatementExpressionstmtContext(_localctx);
+ _localctx = new LocalVarDecWithInitializationContext(_localctx);
enterOuterAlt(_localctx, 7);
{
+ setState(196);
+ localVarWithInitialization();
+ setState(197);
+ match(T__3);
+ }
+ break;
+ case 8:
+ _localctx = new AssignmentContext(_localctx);
+ enterOuterAlt(_localctx, 8);
+ {
setState(199);
- stmtexpr();
+ assign();
setState(200);
match(T__3);
}
break;
+ case 9:
+ _localctx = new StatementExpressionstmtContext(_localctx);
+ enterOuterAlt(_localctx, 9);
+ {
+ setState(202);
+ stmtexpr();
+ setState(203);
+ match(T__3);
+ }
+ break;
}
}
catch (RecognitionException re) {
@@ -1429,10 +1502,10 @@ public class DecafParser extends Parser {
public final StmtexprContext stmtexpr() throws RecognitionException {
StmtexprContext _localctx = new StmtexprContext(_ctx, getState());
- enterRule(_localctx, 28, RULE_stmtexpr);
+ enterRule(_localctx, 30, RULE_stmtexpr);
int _la;
try {
- setState(213);
+ setState(216);
_errHandler.sync(this);
switch (_input.LA(1)) {
case THIS:
@@ -1440,7 +1513,7 @@ public class DecafParser extends Parser {
_localctx = new MethodCallContext(_localctx);
enterOuterAlt(_localctx, 1);
{
- setState(204);
+ setState(207);
methCall();
}
break;
@@ -1448,23 +1521,23 @@ public class DecafParser extends Parser {
_localctx = new NewContext(_localctx);
enterOuterAlt(_localctx, 2);
{
- setState(205);
+ setState(208);
match(NEW);
- setState(206);
- type();
- setState(207);
- match(T__4);
setState(209);
+ type();
+ setState(210);
+ match(T__4);
+ setState(212);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 132216286871584L) != 0)) {
{
- setState(208);
+ setState(211);
args();
}
}
- setState(211);
+ setState(214);
match(T__5);
}
break;
@@ -1634,24 +1707,24 @@ public class DecafParser extends Parser {
int _parentState = getState();
ExprContext _localctx = new ExprContext(_ctx, _parentState);
ExprContext _prevctx = _localctx;
- int _startState = 30;
- enterRecursionRule(_localctx, 30, RULE_expr, _p);
+ int _startState = 32;
+ enterRecursionRule(_localctx, 32, RULE_expr, _p);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
- setState(226);
+ setState(229);
_errHandler.sync(this);
- switch ( getInterpreter().adaptivePredict(_input,19,_ctx) ) {
+ switch ( getInterpreter().adaptivePredict(_input,17,_ctx) ) {
case 1:
{
_localctx = new UnaryOperationContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
- setState(216);
+ setState(219);
unaryOp();
- setState(217);
+ setState(220);
expr(5);
}
break;
@@ -1660,7 +1733,7 @@ public class DecafParser extends Parser {
_localctx = new ConstantContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
- setState(219);
+ setState(222);
literal();
}
break;
@@ -1669,11 +1742,11 @@ public class DecafParser extends Parser {
_localctx = new ExpressionContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
- setState(220);
+ setState(223);
match(T__4);
- setState(221);
+ setState(224);
expr(0);
- setState(222);
+ setState(225);
match(T__5);
}
break;
@@ -1682,7 +1755,7 @@ public class DecafParser extends Parser {
_localctx = new IdentifierContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
- setState(224);
+ setState(227);
fieldVarAccess();
}
break;
@@ -1691,15 +1764,15 @@ public class DecafParser extends Parser {
_localctx = new StatementExpressionexprContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
- setState(225);
+ setState(228);
stmtexpr();
}
break;
}
_ctx.stop = _input.LT(-1);
- setState(234);
+ setState(237);
_errHandler.sync(this);
- _alt = getInterpreter().adaptivePredict(_input,20,_ctx);
+ _alt = getInterpreter().adaptivePredict(_input,18,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
if ( _parseListeners!=null ) triggerExitRuleEvent();
@@ -1708,18 +1781,18 @@ public class DecafParser extends Parser {
{
_localctx = new BinaryOperationContext(new ExprContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expr);
- setState(228);
+ setState(231);
if (!(precpred(_ctx, 6))) throw new FailedPredicateException(this, "precpred(_ctx, 6)");
- setState(229);
+ setState(232);
binaryOp();
- setState(230);
+ setState(233);
expr(7);
}
}
}
- setState(236);
+ setState(239);
_errHandler.sync(this);
- _alt = getInterpreter().adaptivePredict(_input,20,_ctx);
+ _alt = getInterpreter().adaptivePredict(_input,18,_ctx);
}
}
}
@@ -1768,12 +1841,12 @@ public class DecafParser extends Parser {
public final BinaryOpContext binaryOp() throws RecognitionException {
BinaryOpContext _localctx = new BinaryOpContext(_ctx, getState());
- enterRule(_localctx, 32, RULE_binaryOp);
+ enterRule(_localctx, 34, RULE_binaryOp);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
- setState(237);
+ setState(240);
_la = _input.LA(1);
if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 17171480576L) != 0)) ) {
_errHandler.recoverInline(this);
@@ -1821,12 +1894,12 @@ public class DecafParser extends Parser {
public final UnaryOpContext unaryOp() throws RecognitionException {
UnaryOpContext _localctx = new UnaryOpContext(_ctx, getState());
- enterRule(_localctx, 34, RULE_unaryOp);
+ enterRule(_localctx, 36, RULE_unaryOp);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
- setState(239);
+ setState(242);
_la = _input.LA(1);
if ( !(_la==SUB || _la==NOT) ) {
_errHandler.recoverInline(this);
@@ -1882,43 +1955,43 @@ public class DecafParser extends Parser {
public final FieldVarAccessContext fieldVarAccess() throws RecognitionException {
FieldVarAccessContext _localctx = new FieldVarAccessContext(_ctx, getState());
- enterRule(_localctx, 36, RULE_fieldVarAccess);
+ enterRule(_localctx, 38, RULE_fieldVarAccess);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
- setState(243);
+ setState(246);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==THIS) {
{
- setState(241);
+ setState(244);
match(THIS);
- setState(242);
+ setState(245);
match(T__17);
}
}
- setState(250);
+ setState(253);
_errHandler.sync(this);
- _alt = getInterpreter().adaptivePredict(_input,22,_ctx);
+ _alt = getInterpreter().adaptivePredict(_input,20,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
- setState(245);
+ setState(248);
recipient();
- setState(246);
+ setState(249);
match(T__17);
}
}
}
- setState(252);
+ setState(255);
_errHandler.sync(this);
- _alt = getInterpreter().adaptivePredict(_input,22,_ctx);
+ _alt = getInterpreter().adaptivePredict(_input,20,_ctx);
}
- setState(253);
+ setState(256);
id();
}
}
@@ -1965,15 +2038,15 @@ public class DecafParser extends Parser {
public final AssignContext assign() throws RecognitionException {
AssignContext _localctx = new AssignContext(_ctx, getState());
- enterRule(_localctx, 38, RULE_assign);
+ enterRule(_localctx, 40, RULE_assign);
try {
enterOuterAlt(_localctx, 1);
{
- setState(255);
+ setState(258);
fieldVarAccess();
- setState(256);
+ setState(259);
assignSign();
- setState(257);
+ setState(260);
expr(0);
}
}
@@ -2021,43 +2094,43 @@ public class DecafParser extends Parser {
public final MethCallContext methCall() throws RecognitionException {
MethCallContext _localctx = new MethCallContext(_ctx, getState());
- enterRule(_localctx, 40, RULE_methCall);
+ enterRule(_localctx, 42, RULE_methCall);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
- setState(261);
+ setState(264);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==THIS) {
{
- setState(259);
+ setState(262);
match(THIS);
- setState(260);
+ setState(263);
match(T__17);
}
}
- setState(268);
+ setState(271);
_errHandler.sync(this);
- _alt = getInterpreter().adaptivePredict(_input,24,_ctx);
+ _alt = getInterpreter().adaptivePredict(_input,22,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
- setState(263);
+ setState(266);
recipient();
- setState(264);
+ setState(267);
match(T__17);
}
}
}
- setState(270);
+ setState(273);
_errHandler.sync(this);
- _alt = getInterpreter().adaptivePredict(_input,24,_ctx);
+ _alt = getInterpreter().adaptivePredict(_input,22,_ctx);
}
- setState(271);
+ setState(274);
methName();
}
}
@@ -2101,22 +2174,22 @@ public class DecafParser extends Parser {
public final RecipientContext recipient() throws RecognitionException {
RecipientContext _localctx = new RecipientContext(_ctx, getState());
- enterRule(_localctx, 42, RULE_recipient);
+ enterRule(_localctx, 44, RULE_recipient);
try {
- setState(275);
+ setState(278);
_errHandler.sync(this);
- switch ( getInterpreter().adaptivePredict(_input,25,_ctx) ) {
+ switch ( getInterpreter().adaptivePredict(_input,23,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
- setState(273);
+ setState(276);
methName();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
- setState(274);
+ setState(277);
id();
}
break;
@@ -2162,26 +2235,26 @@ public class DecafParser extends Parser {
public final MethNameContext methName() throws RecognitionException {
MethNameContext _localctx = new MethNameContext(_ctx, getState());
- enterRule(_localctx, 44, RULE_methName);
+ enterRule(_localctx, 46, RULE_methName);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
- setState(277);
- id();
- setState(278);
- match(T__4);
setState(280);
+ id();
+ setState(281);
+ match(T__4);
+ setState(283);
_errHandler.sync(this);
_la = _input.LA(1);
if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 132216286871584L) != 0)) {
{
- setState(279);
+ setState(282);
args();
}
}
- setState(282);
+ setState(285);
match(T__5);
}
}
@@ -2225,26 +2298,26 @@ public class DecafParser extends Parser {
public final ArgsContext args() throws RecognitionException {
ArgsContext _localctx = new ArgsContext(_ctx, getState());
- enterRule(_localctx, 46, RULE_args);
+ enterRule(_localctx, 48, RULE_args);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
- setState(284);
+ setState(287);
expr(0);
- setState(289);
+ setState(292);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==T__9) {
{
{
- setState(285);
+ setState(288);
match(T__9);
- setState(286);
+ setState(289);
expr(0);
}
}
- setState(291);
+ setState(294);
_errHandler.sync(this);
_la = _input.LA(1);
}
@@ -2287,12 +2360,12 @@ public class DecafParser extends Parser {
public final LiteralContext literal() throws RecognitionException {
LiteralContext _localctx = new LiteralContext(_ctx, getState());
- enterRule(_localctx, 48, RULE_literal);
+ enterRule(_localctx, 50, RULE_literal);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
- setState(292);
+ setState(295);
_la = _input.LA(1);
if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 96757023244288L) != 0)) ) {
_errHandler.recoverInline(this);
@@ -2339,11 +2412,11 @@ public class DecafParser extends Parser {
public final IdContext id() throws RecognitionException {
IdContext _localctx = new IdContext(_ctx, getState());
- enterRule(_localctx, 50, RULE_id);
+ enterRule(_localctx, 52, RULE_id);
try {
enterOuterAlt(_localctx, 1);
{
- setState(294);
+ setState(297);
match(IDENTIFIER);
}
}
@@ -2360,7 +2433,7 @@ public class DecafParser extends Parser {
public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) {
switch (ruleIndex) {
- case 15:
+ case 16:
return expr_sempred((ExprContext)_localctx, predIndex);
}
return true;
@@ -2374,7 +2447,7 @@ public class DecafParser extends Parser {
}
public static final String _serializedATN =
- "\u0004\u00011\u0129\u0002\u0000\u0007\u0000\u0002\u0001\u0007\u0001\u0002"+
+ "\u0004\u00011\u012c\u0002\u0000\u0007\u0000\u0002\u0001\u0007\u0001\u0002"+
"\u0002\u0007\u0002\u0002\u0003\u0007\u0003\u0002\u0004\u0007\u0004\u0002"+
"\u0005\u0007\u0005\u0002\u0006\u0007\u0006\u0002\u0007\u0007\u0007\u0002"+
"\b\u0007\b\u0002\t\u0007\t\u0002\n\u0007\n\u0002\u000b\u0007\u000b\u0002"+
@@ -2382,184 +2455,187 @@ public class DecafParser extends Parser {
"\u0002\u0010\u0007\u0010\u0002\u0011\u0007\u0011\u0002\u0012\u0007\u0012"+
"\u0002\u0013\u0007\u0013\u0002\u0014\u0007\u0014\u0002\u0015\u0007\u0015"+
"\u0002\u0016\u0007\u0016\u0002\u0017\u0007\u0017\u0002\u0018\u0007\u0018"+
- "\u0002\u0019\u0007\u0019\u0001\u0000\u0001\u0000\u0001\u0000\u0001\u0000"+
- "\u0001\u0000\u0003\u0000:\b\u0000\u0001\u0000\u0001\u0000\u0001\u0000"+
- "\u0005\u0000?\b\u0000\n\u0000\f\u0000B\t\u0000\u0001\u0000\u0001\u0000"+
- "\u0001\u0001\u0003\u0001G\b\u0001\u0001\u0001\u0001\u0001\u0001\u0001"+
- "\u0001\u0001\u0001\u0002\u0001\u0002\u0001\u0003\u0001\u0003\u0003\u0003"+
- "Q\b\u0003\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0003\u0004"+
- "W\b\u0004\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005"+
- "\u0003\u0005^\b\u0005\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0006"+
- "\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006"+
- "\u0001\u0006\u0001\u0006\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007"+
- "\u0003\u0007p\b\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\b\u0001"+
- "\b\u0001\b\u0005\bx\b\b\n\b\f\b{\t\b\u0001\t\u0001\t\u0001\t\u0001\n\u0001"+
- "\n\u0001\n\u0005\n\u0083\b\n\n\n\f\n\u0086\t\n\u0001\n\u0003\n\u0089\b"+
- "\n\u0001\n\u0001\n\u0001\u000b\u0001\u000b\u0001\u000b\u0001\u000b\u0001"+
- "\u000b\u0001\u000b\u0001\u000b\u0001\u000b\u0001\u000b\u0001\u000b\u0003"+
- "\u000b\u0097\b\u000b\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f\u0003"+
- "\f\u009f\b\f\u0001\r\u0001\r\u0001\r\u0001\r\u0001\r\u0001\r\u0001\r\u0003"+
- "\r\u00a8\b\r\u0001\r\u0001\r\u0001\r\u0001\r\u0001\r\u0001\r\u0001\r\u0001"+
- "\r\u0001\r\u0001\r\u0001\r\u0001\r\u0001\r\u0001\r\u0001\r\u0001\r\u0001"+
- "\r\u0001\r\u0001\r\u0001\r\u0001\r\u0001\r\u0001\r\u0003\r\u00c1\b\r\u0001"+
- "\r\u0001\r\u0001\r\u0001\r\u0001\r\u0001\r\u0001\r\u0001\r\u0003\r\u00cb"+
- "\b\r\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0003"+
- "\u000e\u00d2\b\u000e\u0001\u000e\u0001\u000e\u0003\u000e\u00d6\b\u000e"+
- "\u0001\u000f\u0001\u000f\u0001\u000f\u0001\u000f\u0001\u000f\u0001\u000f"+
- "\u0001\u000f\u0001\u000f\u0001\u000f\u0001\u000f\u0001\u000f\u0003\u000f"+
- "\u00e3\b\u000f\u0001\u000f\u0001\u000f\u0001\u000f\u0001\u000f\u0005\u000f"+
- "\u00e9\b\u000f\n\u000f\f\u000f\u00ec\t\u000f\u0001\u0010\u0001\u0010\u0001"+
- "\u0011\u0001\u0011\u0001\u0012\u0001\u0012\u0003\u0012\u00f4\b\u0012\u0001"+
- "\u0012\u0001\u0012\u0001\u0012\u0005\u0012\u00f9\b\u0012\n\u0012\f\u0012"+
- "\u00fc\t\u0012\u0001\u0012\u0001\u0012\u0001\u0013\u0001\u0013\u0001\u0013"+
- "\u0001\u0013\u0001\u0014\u0001\u0014\u0003\u0014\u0106\b\u0014\u0001\u0014"+
- "\u0001\u0014\u0001\u0014\u0005\u0014\u010b\b\u0014\n\u0014\f\u0014\u010e"+
- "\t\u0014\u0001\u0014\u0001\u0014\u0001\u0015\u0001\u0015\u0003\u0015\u0114"+
- "\b\u0015\u0001\u0016\u0001\u0016\u0001\u0016\u0003\u0016\u0119\b\u0016"+
- "\u0001\u0016\u0001\u0016\u0001\u0017\u0001\u0017\u0001\u0017\u0005\u0017"+
- "\u0120\b\u0017\n\u0017\f\u0017\u0123\t\u0017\u0001\u0018\u0001\u0018\u0001"+
- "\u0019\u0001\u0019\u0001\u0019\u0000\u0001\u001e\u001a\u0000\u0002\u0004"+
- "\u0006\b\n\f\u000e\u0010\u0012\u0014\u0016\u0018\u001a\u001c\u001e \""+
- "$&(*,.02\u0000\u0004\u0001\u0000\"%\u0001\u0000\u0017!\u0002\u0000\u0017"+
- "\u0017&&\u0002\u0000+,..\u0135\u00004\u0001\u0000\u0000\u0000\u0002F\u0001"+
- "\u0000\u0000\u0000\u0004L\u0001\u0000\u0000\u0000\u0006P\u0001\u0000\u0000"+
- "\u0000\bV\u0001\u0000\u0000\u0000\nX\u0001\u0000\u0000\u0000\fb\u0001"+
- "\u0000\u0000\u0000\u000ek\u0001\u0000\u0000\u0000\u0010t\u0001\u0000\u0000"+
- "\u0000\u0012|\u0001\u0000\u0000\u0000\u0014\u007f\u0001\u0000\u0000\u0000"+
- "\u0016\u0096\u0001\u0000\u0000\u0000\u0018\u009e\u0001\u0000\u0000\u0000"+
- "\u001a\u00ca\u0001\u0000\u0000\u0000\u001c\u00d5\u0001\u0000\u0000\u0000"+
- "\u001e\u00e2\u0001\u0000\u0000\u0000 \u00ed\u0001\u0000\u0000\u0000\""+
- "\u00ef\u0001\u0000\u0000\u0000$\u00f3\u0001\u0000\u0000\u0000&\u00ff\u0001"+
- "\u0000\u0000\u0000(\u0105\u0001\u0000\u0000\u0000*\u0113\u0001\u0000\u0000"+
- "\u0000,\u0115\u0001\u0000\u0000\u0000.\u011c\u0001\u0000\u0000\u00000"+
- "\u0124\u0001\u0000\u0000\u00002\u0126\u0001\u0000\u0000\u000045\u0005"+
- "\u0013\u0000\u000056\u0005\u0001\u0000\u000067\u00032\u0019\u000079\u0005"+
- "\u0002\u0000\u00008:\u0003\f\u0006\u000098\u0001\u0000\u0000\u00009:\u0001"+
- "\u0000\u0000\u0000:@\u0001\u0000\u0000\u0000;?\u0003\u0002\u0001\u0000"+
- "\u0003\n\u0005\u0000=?\u0003\u000e\u0007\u0000>;\u0001\u0000\u0000\u0000"+
- "><\u0001\u0000\u0000\u0000>=\u0001\u0000\u0000\u0000?B\u0001\u0000\u0000"+
- "\u0000@>\u0001\u0000\u0000\u0000@A\u0001\u0000\u0000\u0000AC\u0001\u0000"+
- "\u0000\u0000B@\u0001\u0000\u0000\u0000CD\u0005\u0003\u0000\u0000D\u0001"+
- "\u0001\u0000\u0000\u0000EG\u0005\u0013\u0000\u0000FE\u0001\u0000\u0000"+
- "\u0000FG\u0001\u0000\u0000\u0000GH\u0001\u0000\u0000\u0000HI\u0003\b\u0004"+
- "\u0000IJ\u00032\u0019\u0000JK\u0005\u0004\u0000\u0000K\u0003\u0001\u0000"+
- "\u0000\u0000LM\u0007\u0000\u0000\u0000M\u0005\u0001\u0000\u0000\u0000"+
- "NQ\u0003\b\u0004\u0000OQ\u0005)\u0000\u0000PN\u0001\u0000\u0000\u0000"+
- "PO\u0001\u0000\u0000\u0000Q\u0007\u0001\u0000\u0000\u0000RW\u0005\'\u0000"+
- "\u0000SW\u0005(\u0000\u0000TW\u0005*\u0000\u0000UW\u00032\u0019\u0000"+
- "VR\u0001\u0000\u0000\u0000VS\u0001\u0000\u0000\u0000VT\u0001\u0000\u0000"+
- "\u0000VU\u0001\u0000\u0000\u0000W\t\u0001\u0000\u0000\u0000XY\u0005\u0013"+
- "\u0000\u0000YZ\u0003\u0006\u0003\u0000Z[\u00032\u0019\u0000[]\u0005\u0005"+
- "\u0000\u0000\\^\u0003\u0010\b\u0000]\\\u0001\u0000\u0000\u0000]^\u0001"+
- "\u0000\u0000\u0000^_\u0001\u0000\u0000\u0000_`\u0005\u0006\u0000\u0000"+
- "`a\u0003\u0014\n\u0000a\u000b\u0001\u0000\u0000\u0000bc\u0005\u0013\u0000"+
- "\u0000cd\u0005\u0007\u0000\u0000de\u0005)\u0000\u0000ef\u0005\b\u0000"+
- "\u0000fg\u0005\u0005\u0000\u0000gh\u0005\t\u0000\u0000hi\u0005\u0006\u0000"+
- "\u0000ij\u0003\u0014\n\u0000j\r\u0001\u0000\u0000\u0000kl\u0005\u0013"+
- "\u0000\u0000lm\u00032\u0019\u0000mo\u0005\u0005\u0000\u0000np\u0003\u0010"+
- "\b\u0000on\u0001\u0000\u0000\u0000op\u0001\u0000\u0000\u0000pq\u0001\u0000"+
- "\u0000\u0000qr\u0005\u0006\u0000\u0000rs\u0003\u0014\n\u0000s\u000f\u0001"+
- "\u0000\u0000\u0000ty\u0003\u0012\t\u0000uv\u0005\n\u0000\u0000vx\u0003"+
- "\u0012\t\u0000wu\u0001\u0000\u0000\u0000x{\u0001\u0000\u0000\u0000yw\u0001"+
- "\u0000\u0000\u0000yz\u0001\u0000\u0000\u0000z\u0011\u0001\u0000\u0000"+
- "\u0000{y\u0001\u0000\u0000\u0000|}\u0003\b\u0004\u0000}~\u00032\u0019"+
- "\u0000~\u0013\u0001\u0000\u0000\u0000\u007f\u0084\u0005\u0002\u0000\u0000"+
- "\u0080\u0083\u0003\u0016\u000b\u0000\u0081\u0083\u0003\u001a\r\u0000\u0082"+
- "\u0080\u0001\u0000\u0000\u0000\u0082\u0081\u0001\u0000\u0000\u0000\u0083"+
- "\u0086\u0001\u0000\u0000\u0000\u0084\u0082\u0001\u0000\u0000\u0000\u0084"+
- "\u0085\u0001\u0000\u0000\u0000\u0085\u0088\u0001\u0000\u0000\u0000\u0086"+
- "\u0084\u0001\u0000\u0000\u0000\u0087\u0089\u0003\u0018\f\u0000\u0088\u0087"+
- "\u0001\u0000\u0000\u0000\u0088\u0089\u0001\u0000\u0000\u0000\u0089\u008a"+
- "\u0001\u0000\u0000\u0000\u008a\u008b\u0005\u0003\u0000\u0000\u008b\u0015"+
- "\u0001\u0000\u0000\u0000\u008c\u008d\u0003\b\u0004\u0000\u008d\u008e\u0003"+
- "2\u0019\u0000\u008e\u008f\u0005\u0004\u0000\u0000\u008f\u0097\u0001\u0000"+
- "\u0000\u0000\u0090\u0091\u0003\b\u0004\u0000\u0091\u0092\u00032\u0019"+
- "\u0000\u0092\u0093\u0005\"\u0000\u0000\u0093\u0094\u0003\u001e\u000f\u0000"+
- "\u0094\u0095\u0005\u0004\u0000\u0000\u0095\u0097\u0001\u0000\u0000\u0000"+
- "\u0096\u008c\u0001\u0000\u0000\u0000\u0096\u0090\u0001\u0000\u0000\u0000"+
- "\u0097\u0017\u0001\u0000\u0000\u0000\u0098\u0099\u0005\u000b\u0000\u0000"+
- "\u0099\u009a\u0003\u001e\u000f\u0000\u009a\u009b\u0005\u0004\u0000\u0000"+
- "\u009b\u009f\u0001\u0000\u0000\u0000\u009c\u009d\u0005\u000b\u0000\u0000"+
- "\u009d\u009f\u0005\u0004\u0000\u0000\u009e\u0098\u0001\u0000\u0000\u0000"+
- "\u009e\u009c\u0001\u0000\u0000\u0000\u009f\u0019\u0001\u0000\u0000\u0000"+
- "\u00a0\u00a1\u0005\f\u0000\u0000\u00a1\u00a2\u0005\u0005\u0000\u0000\u00a2"+
- "\u00a3\u0003\u001e\u000f\u0000\u00a3\u00a4\u0005\u0006\u0000\u0000\u00a4"+
- "\u00a7\u0003\u0014\n\u0000\u00a5\u00a6\u0005\r\u0000\u0000\u00a6\u00a8"+
- "\u0003\u0014\n\u0000\u00a7\u00a5\u0001\u0000\u0000\u0000\u00a7\u00a8\u0001"+
- "\u0000\u0000\u0000\u00a8\u00cb\u0001\u0000\u0000\u0000\u00a9\u00aa\u0005"+
- "\u000e\u0000\u0000\u00aa\u00ab\u0005\u0005\u0000\u0000\u00ab\u00ac\u0003"+
- "&\u0013\u0000\u00ac\u00ad\u0005\u0004\u0000\u0000\u00ad\u00ae\u0003\u001e"+
- "\u000f\u0000\u00ae\u00af\u0005\u0004\u0000\u0000\u00af\u00b0\u0003&\u0013"+
- "\u0000\u00b0\u00b1\u0005\u0006\u0000\u0000\u00b1\u00b2\u0003\u0014\n\u0000"+
- "\u00b2\u00cb\u0001\u0000\u0000\u0000\u00b3\u00b4\u0005\u000f\u0000\u0000"+
- "\u00b4\u00b5\u0005\u0005\u0000\u0000\u00b5\u00b6\u0003\u001e\u000f\u0000"+
- "\u00b6\u00b7\u0005\u0006\u0000\u0000\u00b7\u00b8\u0003\u0014\n\u0000\u00b8"+
- "\u00cb\u0001\u0000\u0000\u0000\u00b9\u00ba\u0005\u0010\u0000\u0000\u00ba"+
- "\u00bb\u0003\u0014\n\u0000\u00bb\u00bc\u0005\u000f\u0000\u0000\u00bc\u00bd"+
- "\u0005\u0005\u0000\u0000\u00bd\u00be\u0003\u001e\u000f\u0000\u00be\u00c0"+
- "\u0005\u0006\u0000\u0000\u00bf\u00c1\u0005\u0004\u0000\u0000\u00c0\u00bf"+
- "\u0001\u0000\u0000\u0000\u00c0\u00c1\u0001\u0000\u0000\u0000\u00c1\u00cb"+
- "\u0001\u0000\u0000\u0000\u00c2\u00c3\u0005\u0011\u0000\u0000\u00c3\u00cb"+
- "\u0005\u0004\u0000\u0000\u00c4\u00c5\u0003&\u0013\u0000\u00c5\u00c6\u0005"+
- "\u0004\u0000\u0000\u00c6\u00cb\u0001\u0000\u0000\u0000\u00c7\u00c8\u0003"+
- "\u001c\u000e\u0000\u00c8\u00c9\u0005\u0004\u0000\u0000\u00c9\u00cb\u0001"+
- "\u0000\u0000\u0000\u00ca\u00a0\u0001\u0000\u0000\u0000\u00ca\u00a9\u0001"+
- "\u0000\u0000\u0000\u00ca\u00b3\u0001\u0000\u0000\u0000\u00ca\u00b9\u0001"+
- "\u0000\u0000\u0000\u00ca\u00c2\u0001\u0000\u0000\u0000\u00ca\u00c4\u0001"+
- "\u0000\u0000\u0000\u00ca\u00c7\u0001\u0000\u0000\u0000\u00cb\u001b\u0001"+
- "\u0000\u0000\u0000\u00cc\u00d6\u0003(\u0014\u0000\u00cd\u00ce\u0005\u0014"+
- "\u0000\u0000\u00ce\u00cf\u0003\b\u0004\u0000\u00cf\u00d1\u0005\u0005\u0000"+
- "\u0000\u00d0\u00d2\u0003.\u0017\u0000\u00d1\u00d0\u0001\u0000\u0000\u0000"+
- "\u00d1\u00d2\u0001\u0000\u0000\u0000\u00d2\u00d3\u0001\u0000\u0000\u0000"+
- "\u00d3\u00d4\u0005\u0006\u0000\u0000\u00d4\u00d6\u0001\u0000\u0000\u0000"+
- "\u00d5\u00cc\u0001\u0000\u0000\u0000\u00d5\u00cd\u0001\u0000\u0000\u0000"+
- "\u00d6\u001d\u0001\u0000\u0000\u0000\u00d7\u00d8\u0006\u000f\uffff\uffff"+
- "\u0000\u00d8\u00d9\u0003\"\u0011\u0000\u00d9\u00da\u0003\u001e\u000f\u0005"+
- "\u00da\u00e3\u0001\u0000\u0000\u0000\u00db\u00e3\u00030\u0018\u0000\u00dc"+
- "\u00dd\u0005\u0005\u0000\u0000\u00dd\u00de\u0003\u001e\u000f\u0000\u00de"+
- "\u00df\u0005\u0006\u0000\u0000\u00df\u00e3\u0001\u0000\u0000\u0000\u00e0"+
- "\u00e3\u0003$\u0012\u0000\u00e1\u00e3\u0003\u001c\u000e\u0000\u00e2\u00d7"+
- "\u0001\u0000\u0000\u0000\u00e2\u00db\u0001\u0000\u0000\u0000\u00e2\u00dc"+
- "\u0001\u0000\u0000\u0000\u00e2\u00e0\u0001\u0000\u0000\u0000\u00e2\u00e1"+
- "\u0001\u0000\u0000\u0000\u00e3\u00ea\u0001\u0000\u0000\u0000\u00e4\u00e5"+
- "\n\u0006\u0000\u0000\u00e5\u00e6\u0003 \u0010\u0000\u00e6\u00e7\u0003"+
- "\u001e\u000f\u0007\u00e7\u00e9\u0001\u0000\u0000\u0000\u00e8\u00e4\u0001"+
- "\u0000\u0000\u0000\u00e9\u00ec\u0001\u0000\u0000\u0000\u00ea\u00e8\u0001"+
- "\u0000\u0000\u0000\u00ea\u00eb\u0001\u0000\u0000\u0000\u00eb\u001f\u0001"+
- "\u0000\u0000\u0000\u00ec\u00ea\u0001\u0000\u0000\u0000\u00ed\u00ee\u0007"+
- "\u0001\u0000\u0000\u00ee!\u0001\u0000\u0000\u0000\u00ef\u00f0\u0007\u0002"+
- "\u0000\u0000\u00f0#\u0001\u0000\u0000\u0000\u00f1\u00f2\u0005\u0016\u0000"+
- "\u0000\u00f2\u00f4\u0005\u0012\u0000\u0000\u00f3\u00f1\u0001\u0000\u0000"+
- "\u0000\u00f3\u00f4\u0001\u0000\u0000\u0000\u00f4\u00fa\u0001\u0000\u0000"+
- "\u0000\u00f5\u00f6\u0003*\u0015\u0000\u00f6\u00f7\u0005\u0012\u0000\u0000"+
- "\u00f7\u00f9\u0001\u0000\u0000\u0000\u00f8\u00f5\u0001\u0000\u0000\u0000"+
- "\u00f9\u00fc\u0001\u0000\u0000\u0000\u00fa\u00f8\u0001\u0000\u0000\u0000"+
- "\u00fa\u00fb\u0001\u0000\u0000\u0000\u00fb\u00fd\u0001\u0000\u0000\u0000"+
- "\u00fc\u00fa\u0001\u0000\u0000\u0000\u00fd\u00fe\u00032\u0019\u0000\u00fe"+
- "%\u0001\u0000\u0000\u0000\u00ff\u0100\u0003$\u0012\u0000\u0100\u0101\u0003"+
- "\u0004\u0002\u0000\u0101\u0102\u0003\u001e\u000f\u0000\u0102\'\u0001\u0000"+
- "\u0000\u0000\u0103\u0104\u0005\u0016\u0000\u0000\u0104\u0106\u0005\u0012"+
- "\u0000\u0000\u0105\u0103\u0001\u0000\u0000\u0000\u0105\u0106\u0001\u0000"+
- "\u0000\u0000\u0106\u010c\u0001\u0000\u0000\u0000\u0107\u0108\u0003*\u0015"+
- "\u0000\u0108\u0109\u0005\u0012\u0000\u0000\u0109\u010b\u0001\u0000\u0000"+
- "\u0000\u010a\u0107\u0001\u0000\u0000\u0000\u010b\u010e\u0001\u0000\u0000"+
- "\u0000\u010c\u010a\u0001\u0000\u0000\u0000\u010c\u010d\u0001\u0000\u0000"+
- "\u0000\u010d\u010f\u0001\u0000\u0000\u0000\u010e\u010c\u0001\u0000\u0000"+
- "\u0000\u010f\u0110\u0003,\u0016\u0000\u0110)\u0001\u0000\u0000\u0000\u0111"+
- "\u0114\u0003,\u0016\u0000\u0112\u0114\u00032\u0019\u0000\u0113\u0111\u0001"+
- "\u0000\u0000\u0000\u0113\u0112\u0001\u0000\u0000\u0000\u0114+\u0001\u0000"+
- "\u0000\u0000\u0115\u0116\u00032\u0019\u0000\u0116\u0118\u0005\u0005\u0000"+
- "\u0000\u0117\u0119\u0003.\u0017\u0000\u0118\u0117\u0001\u0000\u0000\u0000"+
- "\u0118\u0119\u0001\u0000\u0000\u0000\u0119\u011a\u0001\u0000\u0000\u0000"+
- "\u011a\u011b\u0005\u0006\u0000\u0000\u011b-\u0001\u0000\u0000\u0000\u011c"+
- "\u0121\u0003\u001e\u000f\u0000\u011d\u011e\u0005\n\u0000\u0000\u011e\u0120"+
- "\u0003\u001e\u000f\u0000\u011f\u011d\u0001\u0000\u0000\u0000\u0120\u0123"+
- "\u0001\u0000\u0000\u0000\u0121\u011f\u0001\u0000\u0000\u0000\u0121\u0122"+
- "\u0001\u0000\u0000\u0000\u0122/\u0001\u0000\u0000\u0000\u0123\u0121\u0001"+
- "\u0000\u0000\u0000\u0124\u0125\u0007\u0003\u0000\u0000\u01251\u0001\u0000"+
- "\u0000\u0000\u0126\u0127\u0005-\u0000\u0000\u01273\u0001\u0000\u0000\u0000"+
- "\u001c9>@FPV]oy\u0082\u0084\u0088\u0096\u009e\u00a7\u00c0\u00ca\u00d1"+
- "\u00d5\u00e2\u00ea\u00f3\u00fa\u0105\u010c\u0113\u0118\u0121";
+ "\u0002\u0019\u0007\u0019\u0002\u001a\u0007\u001a\u0001\u0000\u0001\u0000"+
+ "\u0001\u0000\u0001\u0000\u0001\u0000\u0003\u0000<\b\u0000\u0001\u0000"+
+ "\u0001\u0000\u0001\u0000\u0005\u0000A\b\u0000\n\u0000\f\u0000D\t\u0000"+
+ "\u0001\u0000\u0001\u0000\u0001\u0001\u0003\u0001I\b\u0001\u0001\u0001"+
+ "\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0002\u0001\u0002\u0001\u0003"+
+ "\u0001\u0003\u0003\u0003S\b\u0003\u0001\u0004\u0001\u0004\u0001\u0004"+
+ "\u0001\u0004\u0003\u0004Y\b\u0004\u0001\u0005\u0001\u0005\u0001\u0005"+
+ "\u0001\u0005\u0001\u0005\u0003\u0005`\b\u0005\u0001\u0005\u0001\u0005"+
+ "\u0001\u0005\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006"+
+ "\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0007\u0001\u0007"+
+ "\u0001\u0007\u0001\u0007\u0003\u0007r\b\u0007\u0001\u0007\u0001\u0007"+
+ "\u0001\u0007\u0001\b\u0001\b\u0001\b\u0005\bz\b\b\n\b\f\b}\t\b\u0001\t"+
+ "\u0001\t\u0001\t\u0001\n\u0001\n\u0005\n\u0084\b\n\n\n\f\n\u0087\t\n\u0001"+
+ "\n\u0003\n\u008a\b\n\u0001\n\u0001\n\u0001\u000b\u0001\u000b\u0001\u000b"+
+ "\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\r\u0001\r\u0001\r\u0001"+
+ "\r\u0001\r\u0001\r\u0003\r\u009c\b\r\u0001\u000e\u0001\u000e\u0001\u000e"+
+ "\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0003\u000e\u00a5\b\u000e"+
+ "\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e"+
+ "\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e"+
+ "\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e"+
+ "\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0003\u000e"+
+ "\u00be\b\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e"+
+ "\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e"+
+ "\u0001\u000e\u0001\u000e\u0001\u000e\u0003\u000e\u00ce\b\u000e\u0001\u000f"+
+ "\u0001\u000f\u0001\u000f\u0001\u000f\u0001\u000f\u0003\u000f\u00d5\b\u000f"+
+ "\u0001\u000f\u0001\u000f\u0003\u000f\u00d9\b\u000f\u0001\u0010\u0001\u0010"+
+ "\u0001\u0010\u0001\u0010\u0001\u0010\u0001\u0010\u0001\u0010\u0001\u0010"+
+ "\u0001\u0010\u0001\u0010\u0001\u0010\u0003\u0010\u00e6\b\u0010\u0001\u0010"+
+ "\u0001\u0010\u0001\u0010\u0001\u0010\u0005\u0010\u00ec\b\u0010\n\u0010"+
+ "\f\u0010\u00ef\t\u0010\u0001\u0011\u0001\u0011\u0001\u0012\u0001\u0012"+
+ "\u0001\u0013\u0001\u0013\u0003\u0013\u00f7\b\u0013\u0001\u0013\u0001\u0013"+
+ "\u0001\u0013\u0005\u0013\u00fc\b\u0013\n\u0013\f\u0013\u00ff\t\u0013\u0001"+
+ "\u0013\u0001\u0013\u0001\u0014\u0001\u0014\u0001\u0014\u0001\u0014\u0001"+
+ "\u0015\u0001\u0015\u0003\u0015\u0109\b\u0015\u0001\u0015\u0001\u0015\u0001"+
+ "\u0015\u0005\u0015\u010e\b\u0015\n\u0015\f\u0015\u0111\t\u0015\u0001\u0015"+
+ "\u0001\u0015\u0001\u0016\u0001\u0016\u0003\u0016\u0117\b\u0016\u0001\u0017"+
+ "\u0001\u0017\u0001\u0017\u0003\u0017\u011c\b\u0017\u0001\u0017\u0001\u0017"+
+ "\u0001\u0018\u0001\u0018\u0001\u0018\u0005\u0018\u0123\b\u0018\n\u0018"+
+ "\f\u0018\u0126\t\u0018\u0001\u0019\u0001\u0019\u0001\u001a\u0001\u001a"+
+ "\u0001\u001a\u0000\u0001 \u001b\u0000\u0002\u0004\u0006\b\n\f\u000e\u0010"+
+ "\u0012\u0014\u0016\u0018\u001a\u001c\u001e \"$&(*,.024\u0000\u0004\u0001"+
+ "\u0000\"%\u0001\u0000\u0017!\u0002\u0000\u0017\u0017&&\u0002\u0000+,."+
+ ".\u0137\u00006\u0001\u0000\u0000\u0000\u0002H\u0001\u0000\u0000\u0000"+
+ "\u0004N\u0001\u0000\u0000\u0000\u0006R\u0001\u0000\u0000\u0000\bX\u0001"+
+ "\u0000\u0000\u0000\nZ\u0001\u0000\u0000\u0000\fd\u0001\u0000\u0000\u0000"+
+ "\u000em\u0001\u0000\u0000\u0000\u0010v\u0001\u0000\u0000\u0000\u0012~"+
+ "\u0001\u0000\u0000\u0000\u0014\u0081\u0001\u0000\u0000\u0000\u0016\u008d"+
+ "\u0001\u0000\u0000\u0000\u0018\u0090\u0001\u0000\u0000\u0000\u001a\u009b"+
+ "\u0001\u0000\u0000\u0000\u001c\u00cd\u0001\u0000\u0000\u0000\u001e\u00d8"+
+ "\u0001\u0000\u0000\u0000 \u00e5\u0001\u0000\u0000\u0000\"\u00f0\u0001"+
+ "\u0000\u0000\u0000$\u00f2\u0001\u0000\u0000\u0000&\u00f6\u0001\u0000\u0000"+
+ "\u0000(\u0102\u0001\u0000\u0000\u0000*\u0108\u0001\u0000\u0000\u0000,"+
+ "\u0116\u0001\u0000\u0000\u0000.\u0118\u0001\u0000\u0000\u00000\u011f\u0001"+
+ "\u0000\u0000\u00002\u0127\u0001\u0000\u0000\u00004\u0129\u0001\u0000\u0000"+
+ "\u000067\u0005\u0013\u0000\u000078\u0005\u0001\u0000\u000089\u00034\u001a"+
+ "\u00009;\u0005\u0002\u0000\u0000:<\u0003\f\u0006\u0000;:\u0001\u0000\u0000"+
+ "\u0000;<\u0001\u0000\u0000\u0000A\u0003\n\u0005\u0000?A\u0003\u000e\u0007\u0000@=\u0001\u0000"+
+ "\u0000\u0000@>\u0001\u0000\u0000\u0000@?\u0001\u0000\u0000\u0000AD\u0001"+
+ "\u0000\u0000\u0000B@\u0001\u0000\u0000\u0000BC\u0001\u0000\u0000\u0000"+
+ "CE\u0001\u0000\u0000\u0000DB\u0001\u0000\u0000\u0000EF\u0005\u0003\u0000"+
+ "\u0000F\u0001\u0001\u0000\u0000\u0000GI\u0005\u0013\u0000\u0000HG\u0001"+
+ "\u0000\u0000\u0000HI\u0001\u0000\u0000\u0000IJ\u0001\u0000\u0000\u0000"+
+ "JK\u0003\b\u0004\u0000KL\u00034\u001a\u0000LM\u0005\u0004\u0000\u0000"+
+ "M\u0003\u0001\u0000\u0000\u0000NO\u0007\u0000\u0000\u0000O\u0005\u0001"+
+ "\u0000\u0000\u0000PS\u0003\b\u0004\u0000QS\u0005)\u0000\u0000RP\u0001"+
+ "\u0000\u0000\u0000RQ\u0001\u0000\u0000\u0000S\u0007\u0001\u0000\u0000"+
+ "\u0000TY\u0005\'\u0000\u0000UY\u0005(\u0000\u0000VY\u0005*\u0000\u0000"+
+ "WY\u00034\u001a\u0000XT\u0001\u0000\u0000\u0000XU\u0001\u0000\u0000\u0000"+
+ "XV\u0001\u0000\u0000\u0000XW\u0001\u0000\u0000\u0000Y\t\u0001\u0000\u0000"+
+ "\u0000Z[\u0005\u0013\u0000\u0000[\\\u0003\u0006\u0003\u0000\\]\u00034"+
+ "\u001a\u0000]_\u0005\u0005\u0000\u0000^`\u0003\u0010\b\u0000_^\u0001\u0000"+
+ "\u0000\u0000_`\u0001\u0000\u0000\u0000`a\u0001\u0000\u0000\u0000ab\u0005"+
+ "\u0006\u0000\u0000bc\u0003\u0014\n\u0000c\u000b\u0001\u0000\u0000\u0000"+
+ "de\u0005\u0013\u0000\u0000ef\u0005\u0007\u0000\u0000fg\u0005)\u0000\u0000"+
+ "gh\u0005\b\u0000\u0000hi\u0005\u0005\u0000\u0000ij\u0005\t\u0000\u0000"+
+ "jk\u0005\u0006\u0000\u0000kl\u0003\u0014\n\u0000l\r\u0001\u0000\u0000"+
+ "\u0000mn\u0005\u0013\u0000\u0000no\u00034\u001a\u0000oq\u0005\u0005\u0000"+
+ "\u0000pr\u0003\u0010\b\u0000qp\u0001\u0000\u0000\u0000qr\u0001\u0000\u0000"+
+ "\u0000rs\u0001\u0000\u0000\u0000st\u0005\u0006\u0000\u0000tu\u0003\u0014"+
+ "\n\u0000u\u000f\u0001\u0000\u0000\u0000v{\u0003\u0012\t\u0000wx\u0005"+
+ "\n\u0000\u0000xz\u0003\u0012\t\u0000yw\u0001\u0000\u0000\u0000z}\u0001"+
+ "\u0000\u0000\u0000{y\u0001\u0000\u0000\u0000{|\u0001\u0000\u0000\u0000"+
+ "|\u0011\u0001\u0000\u0000\u0000}{\u0001\u0000\u0000\u0000~\u007f\u0003"+
+ "\b\u0004\u0000\u007f\u0080\u00034\u001a\u0000\u0080\u0013\u0001\u0000"+
+ "\u0000\u0000\u0081\u0085\u0005\u0002\u0000\u0000\u0082\u0084\u0003\u001c"+
+ "\u000e\u0000\u0083\u0082\u0001\u0000\u0000\u0000\u0084\u0087\u0001\u0000"+
+ "\u0000\u0000\u0085\u0083\u0001\u0000\u0000\u0000\u0085\u0086\u0001\u0000"+
+ "\u0000\u0000\u0086\u0089\u0001\u0000\u0000\u0000\u0087\u0085\u0001\u0000"+
+ "\u0000\u0000\u0088\u008a\u0003\u001a\r\u0000\u0089\u0088\u0001\u0000\u0000"+
+ "\u0000\u0089\u008a\u0001\u0000\u0000\u0000\u008a\u008b\u0001\u0000\u0000"+
+ "\u0000\u008b\u008c\u0005\u0003\u0000\u0000\u008c\u0015\u0001\u0000\u0000"+
+ "\u0000\u008d\u008e\u0003\b\u0004\u0000\u008e\u008f\u00034\u001a\u0000"+
+ "\u008f\u0017\u0001\u0000\u0000\u0000\u0090\u0091\u0003\b\u0004\u0000\u0091"+
+ "\u0092\u00034\u001a\u0000\u0092\u0093\u0005\"\u0000\u0000\u0093\u0094"+
+ "\u0003 \u0010\u0000\u0094\u0019\u0001\u0000\u0000\u0000\u0095\u0096\u0005"+
+ "\u000b\u0000\u0000\u0096\u0097\u0003 \u0010\u0000\u0097\u0098\u0005\u0004"+
+ "\u0000\u0000\u0098\u009c\u0001\u0000\u0000\u0000\u0099\u009a\u0005\u000b"+
+ "\u0000\u0000\u009a\u009c\u0005\u0004\u0000\u0000\u009b\u0095\u0001\u0000"+
+ "\u0000\u0000\u009b\u0099\u0001\u0000\u0000\u0000\u009c\u001b\u0001\u0000"+
+ "\u0000\u0000\u009d\u009e\u0005\f\u0000\u0000\u009e\u009f\u0005\u0005\u0000"+
+ "\u0000\u009f\u00a0\u0003 \u0010\u0000\u00a0\u00a1\u0005\u0006\u0000\u0000"+
+ "\u00a1\u00a4\u0003\u0014\n\u0000\u00a2\u00a3\u0005\r\u0000\u0000\u00a3"+
+ "\u00a5\u0003\u0014\n\u0000\u00a4\u00a2\u0001\u0000\u0000\u0000\u00a4\u00a5"+
+ "\u0001\u0000\u0000\u0000\u00a5\u00ce\u0001\u0000\u0000\u0000\u00a6\u00a7"+
+ "\u0005\u000e\u0000\u0000\u00a7\u00a8\u0005\u0005\u0000\u0000\u00a8\u00a9"+
+ "\u0003(\u0014\u0000\u00a9\u00aa\u0005\u0004\u0000\u0000\u00aa\u00ab\u0003"+
+ " \u0010\u0000\u00ab\u00ac\u0005\u0004\u0000\u0000\u00ac\u00ad\u0003(\u0014"+
+ "\u0000\u00ad\u00ae\u0005\u0006\u0000\u0000\u00ae\u00af\u0003\u0014\n\u0000"+
+ "\u00af\u00ce\u0001\u0000\u0000\u0000\u00b0\u00b1\u0005\u000f\u0000\u0000"+
+ "\u00b1\u00b2\u0005\u0005\u0000\u0000\u00b2\u00b3\u0003 \u0010\u0000\u00b3"+
+ "\u00b4\u0005\u0006\u0000\u0000\u00b4\u00b5\u0003\u0014\n\u0000\u00b5\u00ce"+
+ "\u0001\u0000\u0000\u0000\u00b6\u00b7\u0005\u0010\u0000\u0000\u00b7\u00b8"+
+ "\u0003\u0014\n\u0000\u00b8\u00b9\u0005\u000f\u0000\u0000\u00b9\u00ba\u0005"+
+ "\u0005\u0000\u0000\u00ba\u00bb\u0003 \u0010\u0000\u00bb\u00bd\u0005\u0006"+
+ "\u0000\u0000\u00bc\u00be\u0005\u0004\u0000\u0000\u00bd\u00bc\u0001\u0000"+
+ "\u0000\u0000\u00bd\u00be\u0001\u0000\u0000\u0000\u00be\u00ce\u0001\u0000"+
+ "\u0000\u0000\u00bf\u00c0\u0005\u0011\u0000\u0000\u00c0\u00ce\u0005\u0004"+
+ "\u0000\u0000\u00c1\u00c2\u0003\u0016\u000b\u0000\u00c2\u00c3\u0005\u0004"+
+ "\u0000\u0000\u00c3\u00ce\u0001\u0000\u0000\u0000\u00c4\u00c5\u0003\u0018"+
+ "\f\u0000\u00c5\u00c6\u0005\u0004\u0000\u0000\u00c6\u00ce\u0001\u0000\u0000"+
+ "\u0000\u00c7\u00c8\u0003(\u0014\u0000\u00c8\u00c9\u0005\u0004\u0000\u0000"+
+ "\u00c9\u00ce\u0001\u0000\u0000\u0000\u00ca\u00cb\u0003\u001e\u000f\u0000"+
+ "\u00cb\u00cc\u0005\u0004\u0000\u0000\u00cc\u00ce\u0001\u0000\u0000\u0000"+
+ "\u00cd\u009d\u0001\u0000\u0000\u0000\u00cd\u00a6\u0001\u0000\u0000\u0000"+
+ "\u00cd\u00b0\u0001\u0000\u0000\u0000\u00cd\u00b6\u0001\u0000\u0000\u0000"+
+ "\u00cd\u00bf\u0001\u0000\u0000\u0000\u00cd\u00c1\u0001\u0000\u0000\u0000"+
+ "\u00cd\u00c4\u0001\u0000\u0000\u0000\u00cd\u00c7\u0001\u0000\u0000\u0000"+
+ "\u00cd\u00ca\u0001\u0000\u0000\u0000\u00ce\u001d\u0001\u0000\u0000\u0000"+
+ "\u00cf\u00d9\u0003*\u0015\u0000\u00d0\u00d1\u0005\u0014\u0000\u0000\u00d1"+
+ "\u00d2\u0003\b\u0004\u0000\u00d2\u00d4\u0005\u0005\u0000\u0000\u00d3\u00d5"+
+ "\u00030\u0018\u0000\u00d4\u00d3\u0001\u0000\u0000\u0000\u00d4\u00d5\u0001"+
+ "\u0000\u0000\u0000\u00d5\u00d6\u0001\u0000\u0000\u0000\u00d6\u00d7\u0005"+
+ "\u0006\u0000\u0000\u00d7\u00d9\u0001\u0000\u0000\u0000\u00d8\u00cf\u0001"+
+ "\u0000\u0000\u0000\u00d8\u00d0\u0001\u0000\u0000\u0000\u00d9\u001f\u0001"+
+ "\u0000\u0000\u0000\u00da\u00db\u0006\u0010\uffff\uffff\u0000\u00db\u00dc"+
+ "\u0003$\u0012\u0000\u00dc\u00dd\u0003 \u0010\u0005\u00dd\u00e6\u0001\u0000"+
+ "\u0000\u0000\u00de\u00e6\u00032\u0019\u0000\u00df\u00e0\u0005\u0005\u0000"+
+ "\u0000\u00e0\u00e1\u0003 \u0010\u0000\u00e1\u00e2\u0005\u0006\u0000\u0000"+
+ "\u00e2\u00e6\u0001\u0000\u0000\u0000\u00e3\u00e6\u0003&\u0013\u0000\u00e4"+
+ "\u00e6\u0003\u001e\u000f\u0000\u00e5\u00da\u0001\u0000\u0000\u0000\u00e5"+
+ "\u00de\u0001\u0000\u0000\u0000\u00e5\u00df\u0001\u0000\u0000\u0000\u00e5"+
+ "\u00e3\u0001\u0000\u0000\u0000\u00e5\u00e4\u0001\u0000\u0000\u0000\u00e6"+
+ "\u00ed\u0001\u0000\u0000\u0000\u00e7\u00e8\n\u0006\u0000\u0000\u00e8\u00e9"+
+ "\u0003\"\u0011\u0000\u00e9\u00ea\u0003 \u0010\u0007\u00ea\u00ec\u0001"+
+ "\u0000\u0000\u0000\u00eb\u00e7\u0001\u0000\u0000\u0000\u00ec\u00ef\u0001"+
+ "\u0000\u0000\u0000\u00ed\u00eb\u0001\u0000\u0000\u0000\u00ed\u00ee\u0001"+
+ "\u0000\u0000\u0000\u00ee!\u0001\u0000\u0000\u0000\u00ef\u00ed\u0001\u0000"+
+ "\u0000\u0000\u00f0\u00f1\u0007\u0001\u0000\u0000\u00f1#\u0001\u0000\u0000"+
+ "\u0000\u00f2\u00f3\u0007\u0002\u0000\u0000\u00f3%\u0001\u0000\u0000\u0000"+
+ "\u00f4\u00f5\u0005\u0016\u0000\u0000\u00f5\u00f7\u0005\u0012\u0000\u0000"+
+ "\u00f6\u00f4\u0001\u0000\u0000\u0000\u00f6\u00f7\u0001\u0000\u0000\u0000"+
+ "\u00f7\u00fd\u0001\u0000\u0000\u0000\u00f8\u00f9\u0003,\u0016\u0000\u00f9"+
+ "\u00fa\u0005\u0012\u0000\u0000\u00fa\u00fc\u0001\u0000\u0000\u0000\u00fb"+
+ "\u00f8\u0001\u0000\u0000\u0000\u00fc\u00ff\u0001\u0000\u0000\u0000\u00fd"+
+ "\u00fb\u0001\u0000\u0000\u0000\u00fd\u00fe\u0001\u0000\u0000\u0000\u00fe"+
+ "\u0100\u0001\u0000\u0000\u0000\u00ff\u00fd\u0001\u0000\u0000\u0000\u0100"+
+ "\u0101\u00034\u001a\u0000\u0101\'\u0001\u0000\u0000\u0000\u0102\u0103"+
+ "\u0003&\u0013\u0000\u0103\u0104\u0003\u0004\u0002\u0000\u0104\u0105\u0003"+
+ " \u0010\u0000\u0105)\u0001\u0000\u0000\u0000\u0106\u0107\u0005\u0016\u0000"+
+ "\u0000\u0107\u0109\u0005\u0012\u0000\u0000\u0108\u0106\u0001\u0000\u0000"+
+ "\u0000\u0108\u0109\u0001\u0000\u0000\u0000\u0109\u010f\u0001\u0000\u0000"+
+ "\u0000\u010a\u010b\u0003,\u0016\u0000\u010b\u010c\u0005\u0012\u0000\u0000"+
+ "\u010c\u010e\u0001\u0000\u0000\u0000\u010d\u010a\u0001\u0000\u0000\u0000"+
+ "\u010e\u0111\u0001\u0000\u0000\u0000\u010f\u010d\u0001\u0000\u0000\u0000"+
+ "\u010f\u0110\u0001\u0000\u0000\u0000\u0110\u0112\u0001\u0000\u0000\u0000"+
+ "\u0111\u010f\u0001\u0000\u0000\u0000\u0112\u0113\u0003.\u0017\u0000\u0113"+
+ "+\u0001\u0000\u0000\u0000\u0114\u0117\u0003.\u0017\u0000\u0115\u0117\u0003"+
+ "4\u001a\u0000\u0116\u0114\u0001\u0000\u0000\u0000\u0116\u0115\u0001\u0000"+
+ "\u0000\u0000\u0117-\u0001\u0000\u0000\u0000\u0118\u0119\u00034\u001a\u0000"+
+ "\u0119\u011b\u0005\u0005\u0000\u0000\u011a\u011c\u00030\u0018\u0000\u011b"+
+ "\u011a\u0001\u0000\u0000\u0000\u011b\u011c\u0001\u0000\u0000\u0000\u011c"+
+ "\u011d\u0001\u0000\u0000\u0000\u011d\u011e\u0005\u0006\u0000\u0000\u011e"+
+ "/\u0001\u0000\u0000\u0000\u011f\u0124\u0003 \u0010\u0000\u0120\u0121\u0005"+
+ "\n\u0000\u0000\u0121\u0123\u0003 \u0010\u0000\u0122\u0120\u0001\u0000"+
+ "\u0000\u0000\u0123\u0126\u0001\u0000\u0000\u0000\u0124\u0122\u0001\u0000"+
+ "\u0000\u0000\u0124\u0125\u0001\u0000\u0000\u0000\u01251\u0001\u0000\u0000"+
+ "\u0000\u0126\u0124\u0001\u0000\u0000\u0000\u0127\u0128\u0007\u0003\u0000"+
+ "\u0000\u01283\u0001\u0000\u0000\u0000\u0129\u012a\u0005-\u0000\u0000\u012a"+
+ "5\u0001\u0000\u0000\u0000\u001a;@BHRX_q{\u0085\u0089\u009b\u00a4\u00bd"+
+ "\u00cd\u00d4\u00d8\u00e5\u00ed\u00f6\u00fd\u0108\u010f\u0116\u011b\u0124";
public static final ATN _ATN =
new ATNDeserializer().deserialize(_serializedATN.toCharArray());
static {
diff --git a/src/main/java/de/maishai/antlr/DecafVisitor.java b/src/main/java/de/maishai/antlr/DecafVisitor.java
index e440e63..b810cc6 100644
--- a/src/main/java/de/maishai/antlr/DecafVisitor.java
+++ b/src/main/java/de/maishai/antlr/DecafVisitor.java
@@ -82,6 +82,12 @@ public interface DecafVisitor extends ParseTreeVisitor {
* @return the visitor result
*/
T visitLocalVar(DecafParser.LocalVarContext ctx);
+ /**
+ * Visit a parse tree produced by {@link DecafParser#localVarWithInitialization}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitLocalVarWithInitialization(DecafParser.LocalVarWithInitializationContext ctx);
/**
* Visit a parse tree produced by {@link DecafParser#return}.
* @param ctx the parse tree
@@ -123,6 +129,20 @@ public interface DecafVisitor extends ParseTreeVisitor {
* @return the visitor result
*/
T visitBreak(DecafParser.BreakContext ctx);
+ /**
+ * Visit a parse tree produced by the {@code LocalVarDec}
+ * labeled alternative in {@link DecafParser#stmt}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitLocalVarDec(DecafParser.LocalVarDecContext ctx);
+ /**
+ * Visit a parse tree produced by the {@code LocalVarDecWithInitialization}
+ * labeled alternative in {@link DecafParser#stmt}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitLocalVarDecWithInitialization(DecafParser.LocalVarDecWithInitializationContext ctx);
/**
* Visit a parse tree produced by the {@code Assignment}
* labeled alternative in {@link DecafParser#stmt}.
diff --git a/src/main/java/de/maishai/ast/records/Block.java b/src/main/java/de/maishai/ast/records/Block.java
index 81f49e2..f4e7c82 100644
--- a/src/main/java/de/maishai/ast/records/Block.java
+++ b/src/main/java/de/maishai/ast/records/Block.java
@@ -4,5 +4,5 @@ package de.maishai.ast.records;
import java.util.List;
-public record Block(List localVariables, List stmts) implements Node {
+public record Block(List stmts) implements Node {
}
diff --git a/src/main/java/de/maishai/ast/records/Declaration.java b/src/main/java/de/maishai/ast/records/Declaration.java
index 4cb300e..7c0a50e 100644
--- a/src/main/java/de/maishai/ast/records/Declaration.java
+++ b/src/main/java/de/maishai/ast/records/Declaration.java
@@ -2,5 +2,5 @@ package de.maishai.ast.records;
import de.maishai.typedast.Type;
-public record Declaration(String name, Type type) implements Node {
+public record Declaration(String name, Type type) implements Statement {
}
diff --git a/src/main/java/de/maishai/ast/records/Node.java b/src/main/java/de/maishai/ast/records/Node.java
index 0d3e782..9cdd211 100644
--- a/src/main/java/de/maishai/ast/records/Node.java
+++ b/src/main/java/de/maishai/ast/records/Node.java
@@ -1,4 +1,4 @@
package de.maishai.ast.records;
-public sealed interface Node permits Block, Class, Constructor, Declaration, Expression, Method, Parameter, Program, Statement {
+public sealed interface Node permits Block, Class, Constructor, Expression, Method, Parameter, Program, Statement {
}
diff --git a/src/main/java/de/maishai/ast/records/Statement.java b/src/main/java/de/maishai/ast/records/Statement.java
index 5a36534..ad0372f 100644
--- a/src/main/java/de/maishai/ast/records/Statement.java
+++ b/src/main/java/de/maishai/ast/records/Statement.java
@@ -1,4 +1,4 @@
package de.maishai.ast.records;
-public sealed interface Statement extends Node permits Assignment, Break, DoWhile, For, IfElse, MethodCall, New, Return, While {
+public sealed interface Statement extends Node permits Assignment, Break, Declaration, DoWhile, For, IfElse, MethodCall, New, Return, While {
}
diff --git a/src/main/java/de/maishai/typedast/typedclass/TypedBlock.java b/src/main/java/de/maishai/typedast/typedclass/TypedBlock.java
index 58b5986..41e5e56 100644
--- a/src/main/java/de/maishai/typedast/typedclass/TypedBlock.java
+++ b/src/main/java/de/maishai/typedast/typedclass/TypedBlock.java
@@ -36,11 +36,10 @@ public class TypedBlock implements TypedNode {
return;
}
- for (Declaration var : unTypedBlock.localVariables()) {
- vars.add(new TypedLocalVariable(typedProgram, var));
- }
-
for (var stmt : unTypedBlock.stmts()) {
+ if (stmt instanceof Declaration){
+ vars.add(new TypedLocalVariable(typedProgram,(Declaration) stmt));
+ }
if (stmt instanceof Assignment assignment) {
TypedAssignment typedAssignment = new TypedAssignment(typedProgram, assignment);
typedAssignment.typeCheck(typedProgram);