diff --git a/src/main/antlr/Decaf.g4 b/src/main/antlr/Decaf.g4 index 4c880a1..0171f6e 100644 --- a/src/main/antlr/Decaf.g4 +++ b/src/main/antlr/Decaf.g4 @@ -1,8 +1,7 @@ grammar Decaf; -program : (class)+; -class : PUBLIC? 'class' id '{' mainmeth? (field | meth | constructor)* '}'; +class : PUBLIC 'class' id '{' mainmeth? (field | meth | constructor)* '}'; field : type id ';'; localVar : type id ';'; @@ -10,7 +9,7 @@ assignSign : ASSIGN | ADD_ASSIGN | SUB_ASSIGN | MUL_ASSIGN; returntype : type | VOID; type : INT | BOOL | CHAR | id; -meth : PUBLIC? returntype id '(' params? ')' block; +meth : PUBLIC returntype id '(' params? ')' block; mainmeth : PUBLIC 'static' 'void' 'main' '(' 'String[] args' ')' block; constructor: PUBLIC? id '(' params? ')' block; params : param (',' param)*; @@ -25,7 +24,6 @@ stmt : 'if' '(' expr ')' block ('else' block)? #If | 'return' expr ';' #Return | 'return' ';' #ReturnVoid | 'break' ';' #Break - | 'continue' ';' #Continue | assign ';' #Assignment | stmtexpr ';' #StatementExpressionstmt ; diff --git a/src/main/java/de/maishai/ASTGenerator.java b/src/main/java/de/maishai/ASTGenerator.java index 5de5b65..26c253a 100644 --- a/src/main/java/de/maishai/ASTGenerator.java +++ b/src/main/java/de/maishai/ASTGenerator.java @@ -11,16 +11,8 @@ import java.util.List; public class ASTGenerator { - public static Program generateAST(DecafParser.ProgramContext parseTree) { - List classes = new ArrayList<>(); - for (DecafParser.ClassContext cctx : parseTree.class_()) { - classes.add(generateClass(cctx)); - } - return new Program(classes); - } - public static Class generateClass(DecafParser.ClassContext ctx) { - Boolean isPublic = ctx.PUBLIC() != null; + public static Class generateAST(DecafParser.ClassContext ctx) { List fields = new ArrayList<>(); if (ctx.field() != null) { fields = ctx.field().stream().map(ASTGenerator::generateFieldVariable).toList(); @@ -38,7 +30,7 @@ public class ASTGenerator { meths = ctx.meth().stream().map(ASTGenerator::generateMethod).toList(); } Id classId = new Id(ctx.id().getText()); - return new Class(isPublic, classId, fields, meths, mainMethod, constructors); + return new Class(classId, fields, meths, mainMethod, constructors); } public static Field generateFieldVariable(DecafParser.FieldContext ctx) { @@ -52,14 +44,13 @@ public class ASTGenerator { } public static Method generateMethod(DecafParser.MethContext ctx) { - Boolean isPublic = ctx.PUBLIC() != null; List params = new ArrayList<>(); if (ctx.params() != null) { params = ctx.params().param().stream().map(ASTGenerator::generateParameter).toList(); } Block block = new BlockGenerator().visit(ctx.block()); Id methId = new Id(ctx.id().getText()); - return new Method(isPublic, getReturnType(ctx.returntype()), methId, params, block); + return new Method(getReturnType(ctx.returntype()), methId, params, block); } public static Constructor generateConstructor(DecafParser.ConstructorContext ctx) { diff --git a/src/main/java/de/maishai/Compiler.java b/src/main/java/de/maishai/Compiler.java index 954fb84..4567d94 100644 --- a/src/main/java/de/maishai/Compiler.java +++ b/src/main/java/de/maishai/Compiler.java @@ -2,7 +2,7 @@ package de.maishai; import de.maishai.antlr.DecafLexer; import de.maishai.antlr.DecafParser; -import de.maishai.ast.records.Program; +import de.maishai.ast.records.Class; import org.antlr.v4.runtime.CharStream; import org.antlr.v4.runtime.CharStreams; import org.antlr.v4.runtime.CommonTokenStream; @@ -12,13 +12,14 @@ import org.antlr.v4.runtime.CommonTokenStream; */ public class Compiler { - public static Program generateAST(String fromSource) { + public static Class generateAST(String fromSource) { CharStream input = CharStreams.fromString(fromSource); DecafLexer lexer = new DecafLexer(input); CommonTokenStream tokens = new CommonTokenStream(lexer); DecafParser parser = new DecafParser(tokens); - DecafParser.ProgramContext tree = parser.program(); //Parsen - return ASTGenerator.generateAST(tree); + DecafParser.ClassContext tree = parser.class_(); //Parsen + Class ast = ASTGenerator.generateAST(tree); + return ast; } diff --git a/src/main/java/de/maishai/StatementGenerator.java b/src/main/java/de/maishai/StatementGenerator.java index a2adb4a..7c3984e 100644 --- a/src/main/java/de/maishai/StatementGenerator.java +++ b/src/main/java/de/maishai/StatementGenerator.java @@ -61,11 +61,6 @@ public class StatementGenerator extends DecafBaseVisitor { return new Break(); } - @Override - public Statement visitContinue(DecafParser.ContinueContext ctx) { - return new Continue(); - } - @Override public Statement visitAssignment(DecafParser.AssignmentContext ctx) { return generateAssign(ctx.assign()); diff --git a/src/main/java/de/maishai/antlr/Decaf.interp b/src/main/java/de/maishai/antlr/Decaf.interp index 728814e..fff3e52 100644 --- a/src/main/java/de/maishai/antlr/Decaf.interp +++ b/src/main/java/de/maishai/antlr/Decaf.interp @@ -17,7 +17,6 @@ null 'do' 'return' 'break' -'continue' '.' 'public' 'new' @@ -69,7 +68,6 @@ null null null null -null PUBLIC NEW NULL @@ -101,7 +99,6 @@ NUMBER WS rule names: -program class field localVar @@ -130,4 +127,4 @@ id atn: -[4, 1, 48, 293, 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, 4, 0, 54, 8, 0, 11, 0, 12, 0, 55, 1, 1, 3, 1, 59, 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 65, 8, 1, 1, 1, 1, 1, 1, 1, 5, 1, 70, 8, 1, 10, 1, 12, 1, 73, 9, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 5, 1, 5, 3, 5, 89, 8, 5, 1, 6, 1, 6, 1, 6, 1, 6, 3, 6, 95, 8, 6, 1, 7, 3, 7, 98, 8, 7, 1, 7, 1, 7, 1, 7, 1, 7, 3, 7, 104, 8, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 9, 3, 9, 119, 8, 9, 1, 9, 1, 9, 1, 9, 3, 9, 124, 8, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 5, 10, 132, 8, 10, 10, 10, 12, 10, 135, 9, 10, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 5, 12, 143, 8, 12, 10, 12, 12, 12, 146, 9, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 3, 13, 157, 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, 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, 198, 8, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 3, 14, 205, 8, 14, 1, 14, 1, 14, 3, 14, 209, 8, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 3, 15, 223, 8, 15, 1, 15, 1, 15, 1, 15, 1, 15, 5, 15, 229, 8, 15, 10, 15, 12, 15, 232, 9, 15, 1, 16, 1, 16, 1, 17, 1, 17, 1, 18, 1, 18, 3, 18, 240, 8, 18, 1, 18, 1, 18, 1, 18, 5, 18, 245, 8, 18, 10, 18, 12, 18, 248, 9, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 3, 20, 258, 8, 20, 1, 20, 1, 20, 1, 20, 5, 20, 263, 8, 20, 10, 20, 12, 20, 266, 9, 20, 1, 20, 1, 20, 1, 21, 1, 21, 3, 21, 272, 8, 21, 1, 22, 1, 22, 1, 22, 3, 22, 277, 8, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 5, 23, 284, 8, 23, 10, 23, 12, 23, 287, 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, 35, 38, 1, 0, 24, 34, 2, 0, 24, 24, 39, 39, 2, 0, 44, 45, 47, 47, 308, 0, 53, 1, 0, 0, 0, 2, 58, 1, 0, 0, 0, 4, 76, 1, 0, 0, 0, 6, 80, 1, 0, 0, 0, 8, 84, 1, 0, 0, 0, 10, 88, 1, 0, 0, 0, 12, 94, 1, 0, 0, 0, 14, 97, 1, 0, 0, 0, 16, 108, 1, 0, 0, 0, 18, 118, 1, 0, 0, 0, 20, 128, 1, 0, 0, 0, 22, 136, 1, 0, 0, 0, 24, 139, 1, 0, 0, 0, 26, 197, 1, 0, 0, 0, 28, 208, 1, 0, 0, 0, 30, 222, 1, 0, 0, 0, 32, 233, 1, 0, 0, 0, 34, 235, 1, 0, 0, 0, 36, 239, 1, 0, 0, 0, 38, 251, 1, 0, 0, 0, 40, 257, 1, 0, 0, 0, 42, 271, 1, 0, 0, 0, 44, 273, 1, 0, 0, 0, 46, 280, 1, 0, 0, 0, 48, 288, 1, 0, 0, 0, 50, 290, 1, 0, 0, 0, 52, 54, 3, 2, 1, 0, 53, 52, 1, 0, 0, 0, 54, 55, 1, 0, 0, 0, 55, 53, 1, 0, 0, 0, 55, 56, 1, 0, 0, 0, 56, 1, 1, 0, 0, 0, 57, 59, 5, 20, 0, 0, 58, 57, 1, 0, 0, 0, 58, 59, 1, 0, 0, 0, 59, 60, 1, 0, 0, 0, 60, 61, 5, 1, 0, 0, 61, 62, 3, 50, 25, 0, 62, 64, 5, 2, 0, 0, 63, 65, 3, 16, 8, 0, 64, 63, 1, 0, 0, 0, 64, 65, 1, 0, 0, 0, 65, 71, 1, 0, 0, 0, 66, 70, 3, 4, 2, 0, 67, 70, 3, 14, 7, 0, 68, 70, 3, 18, 9, 0, 69, 66, 1, 0, 0, 0, 69, 67, 1, 0, 0, 0, 69, 68, 1, 0, 0, 0, 70, 73, 1, 0, 0, 0, 71, 69, 1, 0, 0, 0, 71, 72, 1, 0, 0, 0, 72, 74, 1, 0, 0, 0, 73, 71, 1, 0, 0, 0, 74, 75, 5, 3, 0, 0, 75, 3, 1, 0, 0, 0, 76, 77, 3, 12, 6, 0, 77, 78, 3, 50, 25, 0, 78, 79, 5, 4, 0, 0, 79, 5, 1, 0, 0, 0, 80, 81, 3, 12, 6, 0, 81, 82, 3, 50, 25, 0, 82, 83, 5, 4, 0, 0, 83, 7, 1, 0, 0, 0, 84, 85, 7, 0, 0, 0, 85, 9, 1, 0, 0, 0, 86, 89, 3, 12, 6, 0, 87, 89, 5, 42, 0, 0, 88, 86, 1, 0, 0, 0, 88, 87, 1, 0, 0, 0, 89, 11, 1, 0, 0, 0, 90, 95, 5, 40, 0, 0, 91, 95, 5, 41, 0, 0, 92, 95, 5, 43, 0, 0, 93, 95, 3, 50, 25, 0, 94, 90, 1, 0, 0, 0, 94, 91, 1, 0, 0, 0, 94, 92, 1, 0, 0, 0, 94, 93, 1, 0, 0, 0, 95, 13, 1, 0, 0, 0, 96, 98, 5, 20, 0, 0, 97, 96, 1, 0, 0, 0, 97, 98, 1, 0, 0, 0, 98, 99, 1, 0, 0, 0, 99, 100, 3, 10, 5, 0, 100, 101, 3, 50, 25, 0, 101, 103, 5, 5, 0, 0, 102, 104, 3, 20, 10, 0, 103, 102, 1, 0, 0, 0, 103, 104, 1, 0, 0, 0, 104, 105, 1, 0, 0, 0, 105, 106, 5, 6, 0, 0, 106, 107, 3, 24, 12, 0, 107, 15, 1, 0, 0, 0, 108, 109, 5, 20, 0, 0, 109, 110, 5, 7, 0, 0, 110, 111, 5, 42, 0, 0, 111, 112, 5, 8, 0, 0, 112, 113, 5, 5, 0, 0, 113, 114, 5, 9, 0, 0, 114, 115, 5, 6, 0, 0, 115, 116, 3, 24, 12, 0, 116, 17, 1, 0, 0, 0, 117, 119, 5, 20, 0, 0, 118, 117, 1, 0, 0, 0, 118, 119, 1, 0, 0, 0, 119, 120, 1, 0, 0, 0, 120, 121, 3, 50, 25, 0, 121, 123, 5, 5, 0, 0, 122, 124, 3, 20, 10, 0, 123, 122, 1, 0, 0, 0, 123, 124, 1, 0, 0, 0, 124, 125, 1, 0, 0, 0, 125, 126, 5, 6, 0, 0, 126, 127, 3, 24, 12, 0, 127, 19, 1, 0, 0, 0, 128, 133, 3, 22, 11, 0, 129, 130, 5, 10, 0, 0, 130, 132, 3, 22, 11, 0, 131, 129, 1, 0, 0, 0, 132, 135, 1, 0, 0, 0, 133, 131, 1, 0, 0, 0, 133, 134, 1, 0, 0, 0, 134, 21, 1, 0, 0, 0, 135, 133, 1, 0, 0, 0, 136, 137, 3, 12, 6, 0, 137, 138, 3, 50, 25, 0, 138, 23, 1, 0, 0, 0, 139, 144, 5, 2, 0, 0, 140, 143, 3, 6, 3, 0, 141, 143, 3, 26, 13, 0, 142, 140, 1, 0, 0, 0, 142, 141, 1, 0, 0, 0, 143, 146, 1, 0, 0, 0, 144, 142, 1, 0, 0, 0, 144, 145, 1, 0, 0, 0, 145, 147, 1, 0, 0, 0, 146, 144, 1, 0, 0, 0, 147, 148, 5, 3, 0, 0, 148, 25, 1, 0, 0, 0, 149, 150, 5, 11, 0, 0, 150, 151, 5, 5, 0, 0, 151, 152, 3, 30, 15, 0, 152, 153, 5, 6, 0, 0, 153, 156, 3, 24, 12, 0, 154, 155, 5, 12, 0, 0, 155, 157, 3, 24, 12, 0, 156, 154, 1, 0, 0, 0, 156, 157, 1, 0, 0, 0, 157, 198, 1, 0, 0, 0, 158, 159, 5, 13, 0, 0, 159, 160, 5, 5, 0, 0, 160, 161, 3, 38, 19, 0, 161, 162, 5, 4, 0, 0, 162, 163, 3, 30, 15, 0, 163, 164, 5, 4, 0, 0, 164, 165, 3, 38, 19, 0, 165, 166, 5, 6, 0, 0, 166, 167, 3, 24, 12, 0, 167, 198, 1, 0, 0, 0, 168, 169, 5, 14, 0, 0, 169, 170, 5, 5, 0, 0, 170, 171, 3, 30, 15, 0, 171, 172, 5, 6, 0, 0, 172, 173, 3, 24, 12, 0, 173, 198, 1, 0, 0, 0, 174, 175, 5, 15, 0, 0, 175, 176, 3, 24, 12, 0, 176, 177, 5, 14, 0, 0, 177, 178, 5, 5, 0, 0, 178, 179, 3, 30, 15, 0, 179, 180, 5, 6, 0, 0, 180, 198, 1, 0, 0, 0, 181, 182, 5, 16, 0, 0, 182, 183, 3, 30, 15, 0, 183, 184, 5, 4, 0, 0, 184, 198, 1, 0, 0, 0, 185, 186, 5, 16, 0, 0, 186, 198, 5, 4, 0, 0, 187, 188, 5, 17, 0, 0, 188, 198, 5, 4, 0, 0, 189, 190, 5, 18, 0, 0, 190, 198, 5, 4, 0, 0, 191, 192, 3, 38, 19, 0, 192, 193, 5, 4, 0, 0, 193, 198, 1, 0, 0, 0, 194, 195, 3, 28, 14, 0, 195, 196, 5, 4, 0, 0, 196, 198, 1, 0, 0, 0, 197, 149, 1, 0, 0, 0, 197, 158, 1, 0, 0, 0, 197, 168, 1, 0, 0, 0, 197, 174, 1, 0, 0, 0, 197, 181, 1, 0, 0, 0, 197, 185, 1, 0, 0, 0, 197, 187, 1, 0, 0, 0, 197, 189, 1, 0, 0, 0, 197, 191, 1, 0, 0, 0, 197, 194, 1, 0, 0, 0, 198, 27, 1, 0, 0, 0, 199, 209, 3, 40, 20, 0, 200, 201, 5, 21, 0, 0, 201, 202, 3, 12, 6, 0, 202, 204, 5, 5, 0, 0, 203, 205, 3, 46, 23, 0, 204, 203, 1, 0, 0, 0, 204, 205, 1, 0, 0, 0, 205, 206, 1, 0, 0, 0, 206, 207, 5, 6, 0, 0, 207, 209, 1, 0, 0, 0, 208, 199, 1, 0, 0, 0, 208, 200, 1, 0, 0, 0, 209, 29, 1, 0, 0, 0, 210, 211, 6, 15, -1, 0, 211, 212, 3, 34, 17, 0, 212, 213, 3, 30, 15, 6, 213, 223, 1, 0, 0, 0, 214, 223, 3, 48, 24, 0, 215, 216, 5, 5, 0, 0, 216, 217, 3, 30, 15, 0, 217, 218, 5, 6, 0, 0, 218, 223, 1, 0, 0, 0, 219, 223, 3, 36, 18, 0, 220, 223, 3, 28, 14, 0, 221, 223, 5, 22, 0, 0, 222, 210, 1, 0, 0, 0, 222, 214, 1, 0, 0, 0, 222, 215, 1, 0, 0, 0, 222, 219, 1, 0, 0, 0, 222, 220, 1, 0, 0, 0, 222, 221, 1, 0, 0, 0, 223, 230, 1, 0, 0, 0, 224, 225, 10, 7, 0, 0, 225, 226, 3, 32, 16, 0, 226, 227, 3, 30, 15, 8, 227, 229, 1, 0, 0, 0, 228, 224, 1, 0, 0, 0, 229, 232, 1, 0, 0, 0, 230, 228, 1, 0, 0, 0, 230, 231, 1, 0, 0, 0, 231, 31, 1, 0, 0, 0, 232, 230, 1, 0, 0, 0, 233, 234, 7, 1, 0, 0, 234, 33, 1, 0, 0, 0, 235, 236, 7, 2, 0, 0, 236, 35, 1, 0, 0, 0, 237, 238, 5, 23, 0, 0, 238, 240, 5, 19, 0, 0, 239, 237, 1, 0, 0, 0, 239, 240, 1, 0, 0, 0, 240, 246, 1, 0, 0, 0, 241, 242, 3, 42, 21, 0, 242, 243, 5, 19, 0, 0, 243, 245, 1, 0, 0, 0, 244, 241, 1, 0, 0, 0, 245, 248, 1, 0, 0, 0, 246, 244, 1, 0, 0, 0, 246, 247, 1, 0, 0, 0, 247, 249, 1, 0, 0, 0, 248, 246, 1, 0, 0, 0, 249, 250, 3, 50, 25, 0, 250, 37, 1, 0, 0, 0, 251, 252, 3, 50, 25, 0, 252, 253, 3, 8, 4, 0, 253, 254, 3, 30, 15, 0, 254, 39, 1, 0, 0, 0, 255, 256, 5, 23, 0, 0, 256, 258, 5, 19, 0, 0, 257, 255, 1, 0, 0, 0, 257, 258, 1, 0, 0, 0, 258, 264, 1, 0, 0, 0, 259, 260, 3, 42, 21, 0, 260, 261, 5, 19, 0, 0, 261, 263, 1, 0, 0, 0, 262, 259, 1, 0, 0, 0, 263, 266, 1, 0, 0, 0, 264, 262, 1, 0, 0, 0, 264, 265, 1, 0, 0, 0, 265, 267, 1, 0, 0, 0, 266, 264, 1, 0, 0, 0, 267, 268, 3, 44, 22, 0, 268, 41, 1, 0, 0, 0, 269, 272, 3, 44, 22, 0, 270, 272, 3, 50, 25, 0, 271, 269, 1, 0, 0, 0, 271, 270, 1, 0, 0, 0, 272, 43, 1, 0, 0, 0, 273, 274, 3, 50, 25, 0, 274, 276, 5, 5, 0, 0, 275, 277, 3, 46, 23, 0, 276, 275, 1, 0, 0, 0, 276, 277, 1, 0, 0, 0, 277, 278, 1, 0, 0, 0, 278, 279, 5, 6, 0, 0, 279, 45, 1, 0, 0, 0, 280, 285, 3, 30, 15, 0, 281, 282, 5, 10, 0, 0, 282, 284, 3, 30, 15, 0, 283, 281, 1, 0, 0, 0, 284, 287, 1, 0, 0, 0, 285, 283, 1, 0, 0, 0, 285, 286, 1, 0, 0, 0, 286, 47, 1, 0, 0, 0, 287, 285, 1, 0, 0, 0, 288, 289, 7, 3, 0, 0, 289, 49, 1, 0, 0, 0, 290, 291, 5, 46, 0, 0, 291, 51, 1, 0, 0, 0, 27, 55, 58, 64, 69, 71, 88, 94, 97, 103, 118, 123, 133, 142, 144, 156, 197, 204, 208, 222, 230, 239, 246, 257, 264, 271, 276, 285] \ No newline at end of file +[4, 1, 47, 280, 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, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 3, 0, 56, 8, 0, 1, 0, 1, 0, 1, 0, 5, 0, 61, 8, 0, 10, 0, 12, 0, 64, 9, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 4, 1, 4, 3, 4, 80, 8, 4, 1, 5, 1, 5, 1, 5, 1, 5, 3, 5, 86, 8, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 3, 6, 93, 8, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 3, 8, 108, 8, 8, 1, 8, 1, 8, 1, 8, 3, 8, 113, 8, 8, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 5, 9, 121, 8, 9, 10, 9, 12, 9, 124, 9, 9, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 5, 11, 132, 8, 11, 10, 11, 12, 11, 135, 9, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 3, 12, 146, 8, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 3, 12, 185, 8, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 3, 13, 192, 8, 13, 1, 13, 1, 13, 3, 13, 196, 8, 13, 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, 210, 8, 14, 1, 14, 1, 14, 1, 14, 1, 14, 5, 14, 216, 8, 14, 10, 14, 12, 14, 219, 9, 14, 1, 15, 1, 15, 1, 16, 1, 16, 1, 17, 1, 17, 3, 17, 227, 8, 17, 1, 17, 1, 17, 1, 17, 5, 17, 232, 8, 17, 10, 17, 12, 17, 235, 9, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 3, 19, 245, 8, 19, 1, 19, 1, 19, 1, 19, 5, 19, 250, 8, 19, 10, 19, 12, 19, 253, 9, 19, 1, 19, 1, 19, 1, 20, 1, 20, 3, 20, 259, 8, 20, 1, 21, 1, 21, 1, 21, 3, 21, 264, 8, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 5, 22, 271, 8, 22, 10, 22, 12, 22, 274, 9, 22, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 0, 1, 28, 25, 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, 0, 4, 1, 0, 34, 37, 1, 0, 23, 33, 2, 0, 23, 23, 38, 38, 2, 0, 43, 44, 46, 46, 292, 0, 50, 1, 0, 0, 0, 2, 67, 1, 0, 0, 0, 4, 71, 1, 0, 0, 0, 6, 75, 1, 0, 0, 0, 8, 79, 1, 0, 0, 0, 10, 85, 1, 0, 0, 0, 12, 87, 1, 0, 0, 0, 14, 97, 1, 0, 0, 0, 16, 107, 1, 0, 0, 0, 18, 117, 1, 0, 0, 0, 20, 125, 1, 0, 0, 0, 22, 128, 1, 0, 0, 0, 24, 184, 1, 0, 0, 0, 26, 195, 1, 0, 0, 0, 28, 209, 1, 0, 0, 0, 30, 220, 1, 0, 0, 0, 32, 222, 1, 0, 0, 0, 34, 226, 1, 0, 0, 0, 36, 238, 1, 0, 0, 0, 38, 244, 1, 0, 0, 0, 40, 258, 1, 0, 0, 0, 42, 260, 1, 0, 0, 0, 44, 267, 1, 0, 0, 0, 46, 275, 1, 0, 0, 0, 48, 277, 1, 0, 0, 0, 50, 51, 5, 19, 0, 0, 51, 52, 5, 1, 0, 0, 52, 53, 3, 48, 24, 0, 53, 55, 5, 2, 0, 0, 54, 56, 3, 14, 7, 0, 55, 54, 1, 0, 0, 0, 55, 56, 1, 0, 0, 0, 56, 62, 1, 0, 0, 0, 57, 61, 3, 2, 1, 0, 58, 61, 3, 12, 6, 0, 59, 61, 3, 16, 8, 0, 60, 57, 1, 0, 0, 0, 60, 58, 1, 0, 0, 0, 60, 59, 1, 0, 0, 0, 61, 64, 1, 0, 0, 0, 62, 60, 1, 0, 0, 0, 62, 63, 1, 0, 0, 0, 63, 65, 1, 0, 0, 0, 64, 62, 1, 0, 0, 0, 65, 66, 5, 3, 0, 0, 66, 1, 1, 0, 0, 0, 67, 68, 3, 10, 5, 0, 68, 69, 3, 48, 24, 0, 69, 70, 5, 4, 0, 0, 70, 3, 1, 0, 0, 0, 71, 72, 3, 10, 5, 0, 72, 73, 3, 48, 24, 0, 73, 74, 5, 4, 0, 0, 74, 5, 1, 0, 0, 0, 75, 76, 7, 0, 0, 0, 76, 7, 1, 0, 0, 0, 77, 80, 3, 10, 5, 0, 78, 80, 5, 41, 0, 0, 79, 77, 1, 0, 0, 0, 79, 78, 1, 0, 0, 0, 80, 9, 1, 0, 0, 0, 81, 86, 5, 39, 0, 0, 82, 86, 5, 40, 0, 0, 83, 86, 5, 42, 0, 0, 84, 86, 3, 48, 24, 0, 85, 81, 1, 0, 0, 0, 85, 82, 1, 0, 0, 0, 85, 83, 1, 0, 0, 0, 85, 84, 1, 0, 0, 0, 86, 11, 1, 0, 0, 0, 87, 88, 5, 19, 0, 0, 88, 89, 3, 8, 4, 0, 89, 90, 3, 48, 24, 0, 90, 92, 5, 5, 0, 0, 91, 93, 3, 18, 9, 0, 92, 91, 1, 0, 0, 0, 92, 93, 1, 0, 0, 0, 93, 94, 1, 0, 0, 0, 94, 95, 5, 6, 0, 0, 95, 96, 3, 22, 11, 0, 96, 13, 1, 0, 0, 0, 97, 98, 5, 19, 0, 0, 98, 99, 5, 7, 0, 0, 99, 100, 5, 41, 0, 0, 100, 101, 5, 8, 0, 0, 101, 102, 5, 5, 0, 0, 102, 103, 5, 9, 0, 0, 103, 104, 5, 6, 0, 0, 104, 105, 3, 22, 11, 0, 105, 15, 1, 0, 0, 0, 106, 108, 5, 19, 0, 0, 107, 106, 1, 0, 0, 0, 107, 108, 1, 0, 0, 0, 108, 109, 1, 0, 0, 0, 109, 110, 3, 48, 24, 0, 110, 112, 5, 5, 0, 0, 111, 113, 3, 18, 9, 0, 112, 111, 1, 0, 0, 0, 112, 113, 1, 0, 0, 0, 113, 114, 1, 0, 0, 0, 114, 115, 5, 6, 0, 0, 115, 116, 3, 22, 11, 0, 116, 17, 1, 0, 0, 0, 117, 122, 3, 20, 10, 0, 118, 119, 5, 10, 0, 0, 119, 121, 3, 20, 10, 0, 120, 118, 1, 0, 0, 0, 121, 124, 1, 0, 0, 0, 122, 120, 1, 0, 0, 0, 122, 123, 1, 0, 0, 0, 123, 19, 1, 0, 0, 0, 124, 122, 1, 0, 0, 0, 125, 126, 3, 10, 5, 0, 126, 127, 3, 48, 24, 0, 127, 21, 1, 0, 0, 0, 128, 133, 5, 2, 0, 0, 129, 132, 3, 4, 2, 0, 130, 132, 3, 24, 12, 0, 131, 129, 1, 0, 0, 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, 136, 1, 0, 0, 0, 135, 133, 1, 0, 0, 0, 136, 137, 5, 3, 0, 0, 137, 23, 1, 0, 0, 0, 138, 139, 5, 11, 0, 0, 139, 140, 5, 5, 0, 0, 140, 141, 3, 28, 14, 0, 141, 142, 5, 6, 0, 0, 142, 145, 3, 22, 11, 0, 143, 144, 5, 12, 0, 0, 144, 146, 3, 22, 11, 0, 145, 143, 1, 0, 0, 0, 145, 146, 1, 0, 0, 0, 146, 185, 1, 0, 0, 0, 147, 148, 5, 13, 0, 0, 148, 149, 5, 5, 0, 0, 149, 150, 3, 36, 18, 0, 150, 151, 5, 4, 0, 0, 151, 152, 3, 28, 14, 0, 152, 153, 5, 4, 0, 0, 153, 154, 3, 36, 18, 0, 154, 155, 5, 6, 0, 0, 155, 156, 3, 22, 11, 0, 156, 185, 1, 0, 0, 0, 157, 158, 5, 14, 0, 0, 158, 159, 5, 5, 0, 0, 159, 160, 3, 28, 14, 0, 160, 161, 5, 6, 0, 0, 161, 162, 3, 22, 11, 0, 162, 185, 1, 0, 0, 0, 163, 164, 5, 15, 0, 0, 164, 165, 3, 22, 11, 0, 165, 166, 5, 14, 0, 0, 166, 167, 5, 5, 0, 0, 167, 168, 3, 28, 14, 0, 168, 169, 5, 6, 0, 0, 169, 185, 1, 0, 0, 0, 170, 171, 5, 16, 0, 0, 171, 172, 3, 28, 14, 0, 172, 173, 5, 4, 0, 0, 173, 185, 1, 0, 0, 0, 174, 175, 5, 16, 0, 0, 175, 185, 5, 4, 0, 0, 176, 177, 5, 17, 0, 0, 177, 185, 5, 4, 0, 0, 178, 179, 3, 36, 18, 0, 179, 180, 5, 4, 0, 0, 180, 185, 1, 0, 0, 0, 181, 182, 3, 26, 13, 0, 182, 183, 5, 4, 0, 0, 183, 185, 1, 0, 0, 0, 184, 138, 1, 0, 0, 0, 184, 147, 1, 0, 0, 0, 184, 157, 1, 0, 0, 0, 184, 163, 1, 0, 0, 0, 184, 170, 1, 0, 0, 0, 184, 174, 1, 0, 0, 0, 184, 176, 1, 0, 0, 0, 184, 178, 1, 0, 0, 0, 184, 181, 1, 0, 0, 0, 185, 25, 1, 0, 0, 0, 186, 196, 3, 38, 19, 0, 187, 188, 5, 20, 0, 0, 188, 189, 3, 10, 5, 0, 189, 191, 5, 5, 0, 0, 190, 192, 3, 44, 22, 0, 191, 190, 1, 0, 0, 0, 191, 192, 1, 0, 0, 0, 192, 193, 1, 0, 0, 0, 193, 194, 5, 6, 0, 0, 194, 196, 1, 0, 0, 0, 195, 186, 1, 0, 0, 0, 195, 187, 1, 0, 0, 0, 196, 27, 1, 0, 0, 0, 197, 198, 6, 14, -1, 0, 198, 199, 3, 32, 16, 0, 199, 200, 3, 28, 14, 6, 200, 210, 1, 0, 0, 0, 201, 210, 3, 46, 23, 0, 202, 203, 5, 5, 0, 0, 203, 204, 3, 28, 14, 0, 204, 205, 5, 6, 0, 0, 205, 210, 1, 0, 0, 0, 206, 210, 3, 34, 17, 0, 207, 210, 3, 26, 13, 0, 208, 210, 5, 21, 0, 0, 209, 197, 1, 0, 0, 0, 209, 201, 1, 0, 0, 0, 209, 202, 1, 0, 0, 0, 209, 206, 1, 0, 0, 0, 209, 207, 1, 0, 0, 0, 209, 208, 1, 0, 0, 0, 210, 217, 1, 0, 0, 0, 211, 212, 10, 7, 0, 0, 212, 213, 3, 30, 15, 0, 213, 214, 3, 28, 14, 8, 214, 216, 1, 0, 0, 0, 215, 211, 1, 0, 0, 0, 216, 219, 1, 0, 0, 0, 217, 215, 1, 0, 0, 0, 217, 218, 1, 0, 0, 0, 218, 29, 1, 0, 0, 0, 219, 217, 1, 0, 0, 0, 220, 221, 7, 1, 0, 0, 221, 31, 1, 0, 0, 0, 222, 223, 7, 2, 0, 0, 223, 33, 1, 0, 0, 0, 224, 225, 5, 22, 0, 0, 225, 227, 5, 18, 0, 0, 226, 224, 1, 0, 0, 0, 226, 227, 1, 0, 0, 0, 227, 233, 1, 0, 0, 0, 228, 229, 3, 40, 20, 0, 229, 230, 5, 18, 0, 0, 230, 232, 1, 0, 0, 0, 231, 228, 1, 0, 0, 0, 232, 235, 1, 0, 0, 0, 233, 231, 1, 0, 0, 0, 233, 234, 1, 0, 0, 0, 234, 236, 1, 0, 0, 0, 235, 233, 1, 0, 0, 0, 236, 237, 3, 48, 24, 0, 237, 35, 1, 0, 0, 0, 238, 239, 3, 48, 24, 0, 239, 240, 3, 6, 3, 0, 240, 241, 3, 28, 14, 0, 241, 37, 1, 0, 0, 0, 242, 243, 5, 22, 0, 0, 243, 245, 5, 18, 0, 0, 244, 242, 1, 0, 0, 0, 244, 245, 1, 0, 0, 0, 245, 251, 1, 0, 0, 0, 246, 247, 3, 40, 20, 0, 247, 248, 5, 18, 0, 0, 248, 250, 1, 0, 0, 0, 249, 246, 1, 0, 0, 0, 250, 253, 1, 0, 0, 0, 251, 249, 1, 0, 0, 0, 251, 252, 1, 0, 0, 0, 252, 254, 1, 0, 0, 0, 253, 251, 1, 0, 0, 0, 254, 255, 3, 42, 21, 0, 255, 39, 1, 0, 0, 0, 256, 259, 3, 42, 21, 0, 257, 259, 3, 48, 24, 0, 258, 256, 1, 0, 0, 0, 258, 257, 1, 0, 0, 0, 259, 41, 1, 0, 0, 0, 260, 261, 3, 48, 24, 0, 261, 263, 5, 5, 0, 0, 262, 264, 3, 44, 22, 0, 263, 262, 1, 0, 0, 0, 263, 264, 1, 0, 0, 0, 264, 265, 1, 0, 0, 0, 265, 266, 5, 6, 0, 0, 266, 43, 1, 0, 0, 0, 267, 272, 3, 28, 14, 0, 268, 269, 5, 10, 0, 0, 269, 271, 3, 28, 14, 0, 270, 268, 1, 0, 0, 0, 271, 274, 1, 0, 0, 0, 272, 270, 1, 0, 0, 0, 272, 273, 1, 0, 0, 0, 273, 45, 1, 0, 0, 0, 274, 272, 1, 0, 0, 0, 275, 276, 7, 3, 0, 0, 276, 47, 1, 0, 0, 0, 277, 278, 5, 45, 0, 0, 278, 49, 1, 0, 0, 0, 24, 55, 60, 62, 79, 85, 92, 107, 112, 122, 131, 133, 145, 184, 191, 195, 209, 217, 226, 233, 244, 251, 258, 263, 272] \ No newline at end of file diff --git a/src/main/java/de/maishai/antlr/Decaf.tokens b/src/main/java/de/maishai/antlr/Decaf.tokens index 78b9736..fbc0193 100644 --- a/src/main/java/de/maishai/antlr/Decaf.tokens +++ b/src/main/java/de/maishai/antlr/Decaf.tokens @@ -16,36 +16,35 @@ T__14=15 T__15=16 T__16=17 T__17=18 -T__18=19 -PUBLIC=20 -NEW=21 -NULL=22 -THIS=23 -SUB=24 -ADD=25 -MUL=26 -GT=27 -LT=28 -GE=29 -LE=30 -EQ=31 -NE=32 -AND=33 -OR=34 -ASSIGN=35 -ADD_ASSIGN=36 -SUB_ASSIGN=37 -MUL_ASSIGN=38 -NOT=39 -INT=40 -BOOL=41 -VOID=42 -CHAR=43 -BOOLEANLITERAL=44 -CHARLITERAL=45 -IDENTIFIER=46 -NUMBER=47 -WS=48 +PUBLIC=19 +NEW=20 +NULL=21 +THIS=22 +SUB=23 +ADD=24 +MUL=25 +GT=26 +LT=27 +GE=28 +LE=29 +EQ=30 +NE=31 +AND=32 +OR=33 +ASSIGN=34 +ADD_ASSIGN=35 +SUB_ASSIGN=36 +MUL_ASSIGN=37 +NOT=38 +INT=39 +BOOL=40 +VOID=41 +CHAR=42 +BOOLEANLITERAL=43 +CHARLITERAL=44 +IDENTIFIER=45 +NUMBER=46 +WS=47 'class'=1 '{'=2 '}'=3 @@ -63,29 +62,28 @@ WS=48 'do'=15 'return'=16 'break'=17 -'continue'=18 -'.'=19 -'public'=20 -'new'=21 -'null'=22 -'this'=23 -'-'=24 -'+'=25 -'*'=26 -'>'=27 -'<'=28 -'>='=29 -'<='=30 -'=='=31 -'!='=32 -'&&'=33 -'||'=34 -'='=35 -'+='=36 -'-='=37 -'*='=38 -'!'=39 -'int'=40 -'boolean'=41 -'void'=42 -'char'=43 +'.'=18 +'public'=19 +'new'=20 +'null'=21 +'this'=22 +'-'=23 +'+'=24 +'*'=25 +'>'=26 +'<'=27 +'>='=28 +'<='=29 +'=='=30 +'!='=31 +'&&'=32 +'||'=33 +'='=34 +'+='=35 +'-='=36 +'*='=37 +'!'=38 +'int'=39 +'boolean'=40 +'void'=41 +'char'=42 diff --git a/src/main/java/de/maishai/antlr/DecafBaseListener.java b/src/main/java/de/maishai/antlr/DecafBaseListener.java index 74ad593..5004d31 100644 --- a/src/main/java/de/maishai/antlr/DecafBaseListener.java +++ b/src/main/java/de/maishai/antlr/DecafBaseListener.java @@ -12,18 +12,6 @@ import org.antlr.v4.runtime.tree.TerminalNode; */ @SuppressWarnings("CheckReturnValue") public class DecafBaseListener implements DecafListener { - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterProgram(DecafParser.ProgramContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitProgram(DecafParser.ProgramContext ctx) { } /** * {@inheritDoc} * @@ -252,18 +240,6 @@ 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 enterContinue(DecafParser.ContinueContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitContinue(DecafParser.ContinueContext ctx) { } /** * {@inheritDoc} * diff --git a/src/main/java/de/maishai/antlr/DecafBaseVisitor.java b/src/main/java/de/maishai/antlr/DecafBaseVisitor.java index dc6941b..073438a 100644 --- a/src/main/java/de/maishai/antlr/DecafBaseVisitor.java +++ b/src/main/java/de/maishai/antlr/DecafBaseVisitor.java @@ -12,13 +12,6 @@ import org.antlr.v4.runtime.tree.AbstractParseTreeVisitor; */ @SuppressWarnings("CheckReturnValue") public class DecafBaseVisitor extends AbstractParseTreeVisitor implements DecafVisitor { - /** - * {@inheritDoc} - * - *

The default implementation returns the result of calling - * {@link #visitChildren} on {@code ctx}.

- */ - @Override public T visitProgram(DecafParser.ProgramContext ctx) { return visitChildren(ctx); } /** * {@inheritDoc} * @@ -152,13 +145,6 @@ 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 visitContinue(DecafParser.ContinueContext ctx) { return visitChildren(ctx); } /** * {@inheritDoc} * diff --git a/src/main/java/de/maishai/antlr/DecafLexer.interp b/src/main/java/de/maishai/antlr/DecafLexer.interp index 3ad479c..e9f449b 100644 --- a/src/main/java/de/maishai/antlr/DecafLexer.interp +++ b/src/main/java/de/maishai/antlr/DecafLexer.interp @@ -17,7 +17,6 @@ null 'do' 'return' 'break' -'continue' '.' 'public' 'new' @@ -69,7 +68,6 @@ null null null null -null PUBLIC NEW NULL @@ -119,7 +117,6 @@ T__14 T__15 T__16 T__17 -T__18 PUBLIC NEW NULL @@ -158,4 +155,4 @@ mode names: DEFAULT_MODE atn: -[4, 0, 48, 299, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 3, 1, 4, 1, 4, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 24, 1, 24, 1, 25, 1, 25, 1, 26, 1, 26, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 1, 39, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 3, 43, 280, 8, 43, 1, 44, 1, 44, 1, 44, 1, 44, 1, 45, 4, 45, 287, 8, 45, 11, 45, 12, 45, 288, 1, 46, 4, 46, 292, 8, 46, 11, 46, 12, 46, 293, 1, 47, 1, 47, 1, 47, 1, 47, 0, 0, 48, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, 37, 75, 38, 77, 39, 79, 40, 81, 41, 83, 42, 85, 43, 87, 44, 89, 45, 91, 46, 93, 47, 95, 48, 1, 0, 4, 1, 0, 39, 39, 2, 0, 65, 90, 97, 122, 1, 0, 48, 57, 3, 0, 9, 10, 13, 13, 32, 32, 301, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 95, 1, 0, 0, 0, 1, 97, 1, 0, 0, 0, 3, 103, 1, 0, 0, 0, 5, 105, 1, 0, 0, 0, 7, 107, 1, 0, 0, 0, 9, 109, 1, 0, 0, 0, 11, 111, 1, 0, 0, 0, 13, 113, 1, 0, 0, 0, 15, 120, 1, 0, 0, 0, 17, 125, 1, 0, 0, 0, 19, 139, 1, 0, 0, 0, 21, 141, 1, 0, 0, 0, 23, 144, 1, 0, 0, 0, 25, 149, 1, 0, 0, 0, 27, 153, 1, 0, 0, 0, 29, 159, 1, 0, 0, 0, 31, 162, 1, 0, 0, 0, 33, 169, 1, 0, 0, 0, 35, 175, 1, 0, 0, 0, 37, 184, 1, 0, 0, 0, 39, 186, 1, 0, 0, 0, 41, 193, 1, 0, 0, 0, 43, 197, 1, 0, 0, 0, 45, 202, 1, 0, 0, 0, 47, 207, 1, 0, 0, 0, 49, 209, 1, 0, 0, 0, 51, 211, 1, 0, 0, 0, 53, 213, 1, 0, 0, 0, 55, 215, 1, 0, 0, 0, 57, 217, 1, 0, 0, 0, 59, 220, 1, 0, 0, 0, 61, 223, 1, 0, 0, 0, 63, 226, 1, 0, 0, 0, 65, 229, 1, 0, 0, 0, 67, 232, 1, 0, 0, 0, 69, 235, 1, 0, 0, 0, 71, 237, 1, 0, 0, 0, 73, 240, 1, 0, 0, 0, 75, 243, 1, 0, 0, 0, 77, 246, 1, 0, 0, 0, 79, 248, 1, 0, 0, 0, 81, 252, 1, 0, 0, 0, 83, 260, 1, 0, 0, 0, 85, 265, 1, 0, 0, 0, 87, 279, 1, 0, 0, 0, 89, 281, 1, 0, 0, 0, 91, 286, 1, 0, 0, 0, 93, 291, 1, 0, 0, 0, 95, 295, 1, 0, 0, 0, 97, 98, 5, 99, 0, 0, 98, 99, 5, 108, 0, 0, 99, 100, 5, 97, 0, 0, 100, 101, 5, 115, 0, 0, 101, 102, 5, 115, 0, 0, 102, 2, 1, 0, 0, 0, 103, 104, 5, 123, 0, 0, 104, 4, 1, 0, 0, 0, 105, 106, 5, 125, 0, 0, 106, 6, 1, 0, 0, 0, 107, 108, 5, 59, 0, 0, 108, 8, 1, 0, 0, 0, 109, 110, 5, 40, 0, 0, 110, 10, 1, 0, 0, 0, 111, 112, 5, 41, 0, 0, 112, 12, 1, 0, 0, 0, 113, 114, 5, 115, 0, 0, 114, 115, 5, 116, 0, 0, 115, 116, 5, 97, 0, 0, 116, 117, 5, 116, 0, 0, 117, 118, 5, 105, 0, 0, 118, 119, 5, 99, 0, 0, 119, 14, 1, 0, 0, 0, 120, 121, 5, 109, 0, 0, 121, 122, 5, 97, 0, 0, 122, 123, 5, 105, 0, 0, 123, 124, 5, 110, 0, 0, 124, 16, 1, 0, 0, 0, 125, 126, 5, 83, 0, 0, 126, 127, 5, 116, 0, 0, 127, 128, 5, 114, 0, 0, 128, 129, 5, 105, 0, 0, 129, 130, 5, 110, 0, 0, 130, 131, 5, 103, 0, 0, 131, 132, 5, 91, 0, 0, 132, 133, 5, 93, 0, 0, 133, 134, 5, 32, 0, 0, 134, 135, 5, 97, 0, 0, 135, 136, 5, 114, 0, 0, 136, 137, 5, 103, 0, 0, 137, 138, 5, 115, 0, 0, 138, 18, 1, 0, 0, 0, 139, 140, 5, 44, 0, 0, 140, 20, 1, 0, 0, 0, 141, 142, 5, 105, 0, 0, 142, 143, 5, 102, 0, 0, 143, 22, 1, 0, 0, 0, 144, 145, 5, 101, 0, 0, 145, 146, 5, 108, 0, 0, 146, 147, 5, 115, 0, 0, 147, 148, 5, 101, 0, 0, 148, 24, 1, 0, 0, 0, 149, 150, 5, 102, 0, 0, 150, 151, 5, 111, 0, 0, 151, 152, 5, 114, 0, 0, 152, 26, 1, 0, 0, 0, 153, 154, 5, 119, 0, 0, 154, 155, 5, 104, 0, 0, 155, 156, 5, 105, 0, 0, 156, 157, 5, 108, 0, 0, 157, 158, 5, 101, 0, 0, 158, 28, 1, 0, 0, 0, 159, 160, 5, 100, 0, 0, 160, 161, 5, 111, 0, 0, 161, 30, 1, 0, 0, 0, 162, 163, 5, 114, 0, 0, 163, 164, 5, 101, 0, 0, 164, 165, 5, 116, 0, 0, 165, 166, 5, 117, 0, 0, 166, 167, 5, 114, 0, 0, 167, 168, 5, 110, 0, 0, 168, 32, 1, 0, 0, 0, 169, 170, 5, 98, 0, 0, 170, 171, 5, 114, 0, 0, 171, 172, 5, 101, 0, 0, 172, 173, 5, 97, 0, 0, 173, 174, 5, 107, 0, 0, 174, 34, 1, 0, 0, 0, 175, 176, 5, 99, 0, 0, 176, 177, 5, 111, 0, 0, 177, 178, 5, 110, 0, 0, 178, 179, 5, 116, 0, 0, 179, 180, 5, 105, 0, 0, 180, 181, 5, 110, 0, 0, 181, 182, 5, 117, 0, 0, 182, 183, 5, 101, 0, 0, 183, 36, 1, 0, 0, 0, 184, 185, 5, 46, 0, 0, 185, 38, 1, 0, 0, 0, 186, 187, 5, 112, 0, 0, 187, 188, 5, 117, 0, 0, 188, 189, 5, 98, 0, 0, 189, 190, 5, 108, 0, 0, 190, 191, 5, 105, 0, 0, 191, 192, 5, 99, 0, 0, 192, 40, 1, 0, 0, 0, 193, 194, 5, 110, 0, 0, 194, 195, 5, 101, 0, 0, 195, 196, 5, 119, 0, 0, 196, 42, 1, 0, 0, 0, 197, 198, 5, 110, 0, 0, 198, 199, 5, 117, 0, 0, 199, 200, 5, 108, 0, 0, 200, 201, 5, 108, 0, 0, 201, 44, 1, 0, 0, 0, 202, 203, 5, 116, 0, 0, 203, 204, 5, 104, 0, 0, 204, 205, 5, 105, 0, 0, 205, 206, 5, 115, 0, 0, 206, 46, 1, 0, 0, 0, 207, 208, 5, 45, 0, 0, 208, 48, 1, 0, 0, 0, 209, 210, 5, 43, 0, 0, 210, 50, 1, 0, 0, 0, 211, 212, 5, 42, 0, 0, 212, 52, 1, 0, 0, 0, 213, 214, 5, 62, 0, 0, 214, 54, 1, 0, 0, 0, 215, 216, 5, 60, 0, 0, 216, 56, 1, 0, 0, 0, 217, 218, 5, 62, 0, 0, 218, 219, 5, 61, 0, 0, 219, 58, 1, 0, 0, 0, 220, 221, 5, 60, 0, 0, 221, 222, 5, 61, 0, 0, 222, 60, 1, 0, 0, 0, 223, 224, 5, 61, 0, 0, 224, 225, 5, 61, 0, 0, 225, 62, 1, 0, 0, 0, 226, 227, 5, 33, 0, 0, 227, 228, 5, 61, 0, 0, 228, 64, 1, 0, 0, 0, 229, 230, 5, 38, 0, 0, 230, 231, 5, 38, 0, 0, 231, 66, 1, 0, 0, 0, 232, 233, 5, 124, 0, 0, 233, 234, 5, 124, 0, 0, 234, 68, 1, 0, 0, 0, 235, 236, 5, 61, 0, 0, 236, 70, 1, 0, 0, 0, 237, 238, 5, 43, 0, 0, 238, 239, 5, 61, 0, 0, 239, 72, 1, 0, 0, 0, 240, 241, 5, 45, 0, 0, 241, 242, 5, 61, 0, 0, 242, 74, 1, 0, 0, 0, 243, 244, 5, 42, 0, 0, 244, 245, 5, 61, 0, 0, 245, 76, 1, 0, 0, 0, 246, 247, 5, 33, 0, 0, 247, 78, 1, 0, 0, 0, 248, 249, 5, 105, 0, 0, 249, 250, 5, 110, 0, 0, 250, 251, 5, 116, 0, 0, 251, 80, 1, 0, 0, 0, 252, 253, 5, 98, 0, 0, 253, 254, 5, 111, 0, 0, 254, 255, 5, 111, 0, 0, 255, 256, 5, 108, 0, 0, 256, 257, 5, 101, 0, 0, 257, 258, 5, 97, 0, 0, 258, 259, 5, 110, 0, 0, 259, 82, 1, 0, 0, 0, 260, 261, 5, 118, 0, 0, 261, 262, 5, 111, 0, 0, 262, 263, 5, 105, 0, 0, 263, 264, 5, 100, 0, 0, 264, 84, 1, 0, 0, 0, 265, 266, 5, 99, 0, 0, 266, 267, 5, 104, 0, 0, 267, 268, 5, 97, 0, 0, 268, 269, 5, 114, 0, 0, 269, 86, 1, 0, 0, 0, 270, 271, 5, 116, 0, 0, 271, 272, 5, 114, 0, 0, 272, 273, 5, 117, 0, 0, 273, 280, 5, 101, 0, 0, 274, 275, 5, 102, 0, 0, 275, 276, 5, 97, 0, 0, 276, 277, 5, 108, 0, 0, 277, 278, 5, 115, 0, 0, 278, 280, 5, 101, 0, 0, 279, 270, 1, 0, 0, 0, 279, 274, 1, 0, 0, 0, 280, 88, 1, 0, 0, 0, 281, 282, 7, 0, 0, 0, 282, 283, 7, 1, 0, 0, 283, 284, 7, 0, 0, 0, 284, 90, 1, 0, 0, 0, 285, 287, 7, 1, 0, 0, 286, 285, 1, 0, 0, 0, 287, 288, 1, 0, 0, 0, 288, 286, 1, 0, 0, 0, 288, 289, 1, 0, 0, 0, 289, 92, 1, 0, 0, 0, 290, 292, 7, 2, 0, 0, 291, 290, 1, 0, 0, 0, 292, 293, 1, 0, 0, 0, 293, 291, 1, 0, 0, 0, 293, 294, 1, 0, 0, 0, 294, 94, 1, 0, 0, 0, 295, 296, 7, 3, 0, 0, 296, 297, 1, 0, 0, 0, 297, 298, 6, 47, 0, 0, 298, 96, 1, 0, 0, 0, 4, 0, 279, 288, 293, 1, 6, 0, 0] \ No newline at end of file +[4, 0, 47, 288, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 3, 1, 4, 1, 4, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 23, 1, 23, 1, 24, 1, 24, 1, 25, 1, 25, 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 38, 1, 38, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 3, 42, 269, 8, 42, 1, 43, 1, 43, 1, 43, 1, 43, 1, 44, 4, 44, 276, 8, 44, 11, 44, 12, 44, 277, 1, 45, 4, 45, 281, 8, 45, 11, 45, 12, 45, 282, 1, 46, 1, 46, 1, 46, 1, 46, 0, 0, 47, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, 37, 75, 38, 77, 39, 79, 40, 81, 41, 83, 42, 85, 43, 87, 44, 89, 45, 91, 46, 93, 47, 1, 0, 4, 1, 0, 39, 39, 2, 0, 65, 90, 97, 122, 1, 0, 48, 57, 3, 0, 9, 10, 13, 13, 32, 32, 290, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 1, 95, 1, 0, 0, 0, 3, 101, 1, 0, 0, 0, 5, 103, 1, 0, 0, 0, 7, 105, 1, 0, 0, 0, 9, 107, 1, 0, 0, 0, 11, 109, 1, 0, 0, 0, 13, 111, 1, 0, 0, 0, 15, 118, 1, 0, 0, 0, 17, 123, 1, 0, 0, 0, 19, 137, 1, 0, 0, 0, 21, 139, 1, 0, 0, 0, 23, 142, 1, 0, 0, 0, 25, 147, 1, 0, 0, 0, 27, 151, 1, 0, 0, 0, 29, 157, 1, 0, 0, 0, 31, 160, 1, 0, 0, 0, 33, 167, 1, 0, 0, 0, 35, 173, 1, 0, 0, 0, 37, 175, 1, 0, 0, 0, 39, 182, 1, 0, 0, 0, 41, 186, 1, 0, 0, 0, 43, 191, 1, 0, 0, 0, 45, 196, 1, 0, 0, 0, 47, 198, 1, 0, 0, 0, 49, 200, 1, 0, 0, 0, 51, 202, 1, 0, 0, 0, 53, 204, 1, 0, 0, 0, 55, 206, 1, 0, 0, 0, 57, 209, 1, 0, 0, 0, 59, 212, 1, 0, 0, 0, 61, 215, 1, 0, 0, 0, 63, 218, 1, 0, 0, 0, 65, 221, 1, 0, 0, 0, 67, 224, 1, 0, 0, 0, 69, 226, 1, 0, 0, 0, 71, 229, 1, 0, 0, 0, 73, 232, 1, 0, 0, 0, 75, 235, 1, 0, 0, 0, 77, 237, 1, 0, 0, 0, 79, 241, 1, 0, 0, 0, 81, 249, 1, 0, 0, 0, 83, 254, 1, 0, 0, 0, 85, 268, 1, 0, 0, 0, 87, 270, 1, 0, 0, 0, 89, 275, 1, 0, 0, 0, 91, 280, 1, 0, 0, 0, 93, 284, 1, 0, 0, 0, 95, 96, 5, 99, 0, 0, 96, 97, 5, 108, 0, 0, 97, 98, 5, 97, 0, 0, 98, 99, 5, 115, 0, 0, 99, 100, 5, 115, 0, 0, 100, 2, 1, 0, 0, 0, 101, 102, 5, 123, 0, 0, 102, 4, 1, 0, 0, 0, 103, 104, 5, 125, 0, 0, 104, 6, 1, 0, 0, 0, 105, 106, 5, 59, 0, 0, 106, 8, 1, 0, 0, 0, 107, 108, 5, 40, 0, 0, 108, 10, 1, 0, 0, 0, 109, 110, 5, 41, 0, 0, 110, 12, 1, 0, 0, 0, 111, 112, 5, 115, 0, 0, 112, 113, 5, 116, 0, 0, 113, 114, 5, 97, 0, 0, 114, 115, 5, 116, 0, 0, 115, 116, 5, 105, 0, 0, 116, 117, 5, 99, 0, 0, 117, 14, 1, 0, 0, 0, 118, 119, 5, 109, 0, 0, 119, 120, 5, 97, 0, 0, 120, 121, 5, 105, 0, 0, 121, 122, 5, 110, 0, 0, 122, 16, 1, 0, 0, 0, 123, 124, 5, 83, 0, 0, 124, 125, 5, 116, 0, 0, 125, 126, 5, 114, 0, 0, 126, 127, 5, 105, 0, 0, 127, 128, 5, 110, 0, 0, 128, 129, 5, 103, 0, 0, 129, 130, 5, 91, 0, 0, 130, 131, 5, 93, 0, 0, 131, 132, 5, 32, 0, 0, 132, 133, 5, 97, 0, 0, 133, 134, 5, 114, 0, 0, 134, 135, 5, 103, 0, 0, 135, 136, 5, 115, 0, 0, 136, 18, 1, 0, 0, 0, 137, 138, 5, 44, 0, 0, 138, 20, 1, 0, 0, 0, 139, 140, 5, 105, 0, 0, 140, 141, 5, 102, 0, 0, 141, 22, 1, 0, 0, 0, 142, 143, 5, 101, 0, 0, 143, 144, 5, 108, 0, 0, 144, 145, 5, 115, 0, 0, 145, 146, 5, 101, 0, 0, 146, 24, 1, 0, 0, 0, 147, 148, 5, 102, 0, 0, 148, 149, 5, 111, 0, 0, 149, 150, 5, 114, 0, 0, 150, 26, 1, 0, 0, 0, 151, 152, 5, 119, 0, 0, 152, 153, 5, 104, 0, 0, 153, 154, 5, 105, 0, 0, 154, 155, 5, 108, 0, 0, 155, 156, 5, 101, 0, 0, 156, 28, 1, 0, 0, 0, 157, 158, 5, 100, 0, 0, 158, 159, 5, 111, 0, 0, 159, 30, 1, 0, 0, 0, 160, 161, 5, 114, 0, 0, 161, 162, 5, 101, 0, 0, 162, 163, 5, 116, 0, 0, 163, 164, 5, 117, 0, 0, 164, 165, 5, 114, 0, 0, 165, 166, 5, 110, 0, 0, 166, 32, 1, 0, 0, 0, 167, 168, 5, 98, 0, 0, 168, 169, 5, 114, 0, 0, 169, 170, 5, 101, 0, 0, 170, 171, 5, 97, 0, 0, 171, 172, 5, 107, 0, 0, 172, 34, 1, 0, 0, 0, 173, 174, 5, 46, 0, 0, 174, 36, 1, 0, 0, 0, 175, 176, 5, 112, 0, 0, 176, 177, 5, 117, 0, 0, 177, 178, 5, 98, 0, 0, 178, 179, 5, 108, 0, 0, 179, 180, 5, 105, 0, 0, 180, 181, 5, 99, 0, 0, 181, 38, 1, 0, 0, 0, 182, 183, 5, 110, 0, 0, 183, 184, 5, 101, 0, 0, 184, 185, 5, 119, 0, 0, 185, 40, 1, 0, 0, 0, 186, 187, 5, 110, 0, 0, 187, 188, 5, 117, 0, 0, 188, 189, 5, 108, 0, 0, 189, 190, 5, 108, 0, 0, 190, 42, 1, 0, 0, 0, 191, 192, 5, 116, 0, 0, 192, 193, 5, 104, 0, 0, 193, 194, 5, 105, 0, 0, 194, 195, 5, 115, 0, 0, 195, 44, 1, 0, 0, 0, 196, 197, 5, 45, 0, 0, 197, 46, 1, 0, 0, 0, 198, 199, 5, 43, 0, 0, 199, 48, 1, 0, 0, 0, 200, 201, 5, 42, 0, 0, 201, 50, 1, 0, 0, 0, 202, 203, 5, 62, 0, 0, 203, 52, 1, 0, 0, 0, 204, 205, 5, 60, 0, 0, 205, 54, 1, 0, 0, 0, 206, 207, 5, 62, 0, 0, 207, 208, 5, 61, 0, 0, 208, 56, 1, 0, 0, 0, 209, 210, 5, 60, 0, 0, 210, 211, 5, 61, 0, 0, 211, 58, 1, 0, 0, 0, 212, 213, 5, 61, 0, 0, 213, 214, 5, 61, 0, 0, 214, 60, 1, 0, 0, 0, 215, 216, 5, 33, 0, 0, 216, 217, 5, 61, 0, 0, 217, 62, 1, 0, 0, 0, 218, 219, 5, 38, 0, 0, 219, 220, 5, 38, 0, 0, 220, 64, 1, 0, 0, 0, 221, 222, 5, 124, 0, 0, 222, 223, 5, 124, 0, 0, 223, 66, 1, 0, 0, 0, 224, 225, 5, 61, 0, 0, 225, 68, 1, 0, 0, 0, 226, 227, 5, 43, 0, 0, 227, 228, 5, 61, 0, 0, 228, 70, 1, 0, 0, 0, 229, 230, 5, 45, 0, 0, 230, 231, 5, 61, 0, 0, 231, 72, 1, 0, 0, 0, 232, 233, 5, 42, 0, 0, 233, 234, 5, 61, 0, 0, 234, 74, 1, 0, 0, 0, 235, 236, 5, 33, 0, 0, 236, 76, 1, 0, 0, 0, 237, 238, 5, 105, 0, 0, 238, 239, 5, 110, 0, 0, 239, 240, 5, 116, 0, 0, 240, 78, 1, 0, 0, 0, 241, 242, 5, 98, 0, 0, 242, 243, 5, 111, 0, 0, 243, 244, 5, 111, 0, 0, 244, 245, 5, 108, 0, 0, 245, 246, 5, 101, 0, 0, 246, 247, 5, 97, 0, 0, 247, 248, 5, 110, 0, 0, 248, 80, 1, 0, 0, 0, 249, 250, 5, 118, 0, 0, 250, 251, 5, 111, 0, 0, 251, 252, 5, 105, 0, 0, 252, 253, 5, 100, 0, 0, 253, 82, 1, 0, 0, 0, 254, 255, 5, 99, 0, 0, 255, 256, 5, 104, 0, 0, 256, 257, 5, 97, 0, 0, 257, 258, 5, 114, 0, 0, 258, 84, 1, 0, 0, 0, 259, 260, 5, 116, 0, 0, 260, 261, 5, 114, 0, 0, 261, 262, 5, 117, 0, 0, 262, 269, 5, 101, 0, 0, 263, 264, 5, 102, 0, 0, 264, 265, 5, 97, 0, 0, 265, 266, 5, 108, 0, 0, 266, 267, 5, 115, 0, 0, 267, 269, 5, 101, 0, 0, 268, 259, 1, 0, 0, 0, 268, 263, 1, 0, 0, 0, 269, 86, 1, 0, 0, 0, 270, 271, 7, 0, 0, 0, 271, 272, 7, 1, 0, 0, 272, 273, 7, 0, 0, 0, 273, 88, 1, 0, 0, 0, 274, 276, 7, 1, 0, 0, 275, 274, 1, 0, 0, 0, 276, 277, 1, 0, 0, 0, 277, 275, 1, 0, 0, 0, 277, 278, 1, 0, 0, 0, 278, 90, 1, 0, 0, 0, 279, 281, 7, 2, 0, 0, 280, 279, 1, 0, 0, 0, 281, 282, 1, 0, 0, 0, 282, 280, 1, 0, 0, 0, 282, 283, 1, 0, 0, 0, 283, 92, 1, 0, 0, 0, 284, 285, 7, 3, 0, 0, 285, 286, 1, 0, 0, 0, 286, 287, 6, 46, 0, 0, 287, 94, 1, 0, 0, 0, 4, 0, 268, 277, 282, 1, 6, 0, 0] \ No newline at end of file diff --git a/src/main/java/de/maishai/antlr/DecafLexer.java b/src/main/java/de/maishai/antlr/DecafLexer.java index f8afa1a..079186c 100644 --- a/src/main/java/de/maishai/antlr/DecafLexer.java +++ b/src/main/java/de/maishai/antlr/DecafLexer.java @@ -19,11 +19,10 @@ public class DecafLexer extends Lexer { public static final int T__0=1, T__1=2, T__2=3, T__3=4, T__4=5, T__5=6, T__6=7, T__7=8, T__8=9, T__9=10, T__10=11, T__11=12, T__12=13, T__13=14, T__14=15, T__15=16, T__16=17, - T__17=18, T__18=19, PUBLIC=20, NEW=21, NULL=22, THIS=23, SUB=24, ADD=25, - MUL=26, GT=27, LT=28, GE=29, LE=30, EQ=31, NE=32, AND=33, OR=34, ASSIGN=35, - ADD_ASSIGN=36, SUB_ASSIGN=37, MUL_ASSIGN=38, NOT=39, INT=40, BOOL=41, - VOID=42, CHAR=43, BOOLEANLITERAL=44, CHARLITERAL=45, IDENTIFIER=46, NUMBER=47, - WS=48; + T__17=18, PUBLIC=19, NEW=20, NULL=21, THIS=22, SUB=23, ADD=24, MUL=25, + GT=26, LT=27, GE=28, LE=29, EQ=30, NE=31, AND=32, OR=33, ASSIGN=34, ADD_ASSIGN=35, + SUB_ASSIGN=36, MUL_ASSIGN=37, NOT=38, INT=39, BOOL=40, VOID=41, CHAR=42, + BOOLEANLITERAL=43, CHARLITERAL=44, IDENTIFIER=45, NUMBER=46, WS=47; public static String[] channelNames = { "DEFAULT_TOKEN_CHANNEL", "HIDDEN" }; @@ -36,9 +35,9 @@ public class DecafLexer extends Lexer { return new String[] { "T__0", "T__1", "T__2", "T__3", "T__4", "T__5", "T__6", "T__7", "T__8", "T__9", "T__10", "T__11", "T__12", "T__13", "T__14", "T__15", "T__16", - "T__17", "T__18", "PUBLIC", "NEW", "NULL", "THIS", "SUB", "ADD", "MUL", - "GT", "LT", "GE", "LE", "EQ", "NE", "AND", "OR", "ASSIGN", "ADD_ASSIGN", - "SUB_ASSIGN", "MUL_ASSIGN", "NOT", "INT", "BOOL", "VOID", "CHAR", "BOOLEANLITERAL", + "T__17", "PUBLIC", "NEW", "NULL", "THIS", "SUB", "ADD", "MUL", "GT", + "LT", "GE", "LE", "EQ", "NE", "AND", "OR", "ASSIGN", "ADD_ASSIGN", "SUB_ASSIGN", + "MUL_ASSIGN", "NOT", "INT", "BOOL", "VOID", "CHAR", "BOOLEANLITERAL", "CHARLITERAL", "IDENTIFIER", "NUMBER", "WS" }; } @@ -48,21 +47,21 @@ public class DecafLexer extends Lexer { return new String[] { null, "'class'", "'{'", "'}'", "';'", "'('", "')'", "'static'", "'main'", "'String[] args'", "','", "'if'", "'else'", "'for'", "'while'", "'do'", - "'return'", "'break'", "'continue'", "'.'", "'public'", "'new'", "'null'", - "'this'", "'-'", "'+'", "'*'", "'>'", "'<'", "'>='", "'<='", "'=='", - "'!='", "'&&'", "'||'", "'='", "'+='", "'-='", "'*='", "'!'", "'int'", - "'boolean'", "'void'", "'char'" + "'return'", "'break'", "'.'", "'public'", "'new'", "'null'", "'this'", + "'-'", "'+'", "'*'", "'>'", "'<'", "'>='", "'<='", "'=='", "'!='", "'&&'", + "'||'", "'='", "'+='", "'-='", "'*='", "'!'", "'int'", "'boolean'", "'void'", + "'char'" }; } private static final String[] _LITERAL_NAMES = makeLiteralNames(); private static String[] makeSymbolicNames() { return new String[] { null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, "PUBLIC", "NEW", "NULL", - "THIS", "SUB", "ADD", "MUL", "GT", "LT", "GE", "LE", "EQ", "NE", "AND", - "OR", "ASSIGN", "ADD_ASSIGN", "SUB_ASSIGN", "MUL_ASSIGN", "NOT", "INT", - "BOOL", "VOID", "CHAR", "BOOLEANLITERAL", "CHARLITERAL", "IDENTIFIER", - "NUMBER", "WS" + null, null, null, null, null, null, null, "PUBLIC", "NEW", "NULL", "THIS", + "SUB", "ADD", "MUL", "GT", "LT", "GE", "LE", "EQ", "NE", "AND", "OR", + "ASSIGN", "ADD_ASSIGN", "SUB_ASSIGN", "MUL_ASSIGN", "NOT", "INT", "BOOL", + "VOID", "CHAR", "BOOLEANLITERAL", "CHARLITERAL", "IDENTIFIER", "NUMBER", + "WS" }; } private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames(); @@ -124,7 +123,7 @@ public class DecafLexer extends Lexer { public ATN getATN() { return _ATN; } public static final String _serializedATN = - "\u0004\u00000\u012b\u0006\uffff\uffff\u0002\u0000\u0007\u0000\u0002\u0001"+ + "\u0004\u0000/\u0120\u0006\uffff\uffff\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"+ @@ -137,170 +136,164 @@ public class DecafLexer extends Lexer { "\u001e\u0007\u001e\u0002\u001f\u0007\u001f\u0002 \u0007 \u0002!\u0007"+ "!\u0002\"\u0007\"\u0002#\u0007#\u0002$\u0007$\u0002%\u0007%\u0002&\u0007"+ "&\u0002\'\u0007\'\u0002(\u0007(\u0002)\u0007)\u0002*\u0007*\u0002+\u0007"+ - "+\u0002,\u0007,\u0002-\u0007-\u0002.\u0007.\u0002/\u0007/\u0001\u0000"+ - "\u0001\u0000\u0001\u0000\u0001\u0000\u0001\u0000\u0001\u0000\u0001\u0001"+ - "\u0001\u0001\u0001\u0002\u0001\u0002\u0001\u0003\u0001\u0003\u0001\u0004"+ - "\u0001\u0004\u0001\u0005\u0001\u0005\u0001\u0006\u0001\u0006\u0001\u0006"+ - "\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0007\u0001\u0007"+ - "\u0001\u0007\u0001\u0007\u0001\u0007\u0001\b\u0001\b\u0001\b\u0001\b\u0001"+ - "\b\u0001\b\u0001\b\u0001\b\u0001\b\u0001\b\u0001\b\u0001\b\u0001\b\u0001"+ - "\b\u0001\t\u0001\t\u0001\n\u0001\n\u0001\n\u0001\u000b\u0001\u000b\u0001"+ - "\u000b\u0001\u000b\u0001\u000b\u0001\f\u0001\f\u0001\f\u0001\f\u0001\r"+ - "\u0001\r\u0001\r\u0001\r\u0001\r\u0001\r\u0001\u000e\u0001\u000e\u0001"+ - "\u000e\u0001\u000f\u0001\u000f\u0001\u000f\u0001\u000f\u0001\u000f\u0001"+ - "\u000f\u0001\u000f\u0001\u0010\u0001\u0010\u0001\u0010\u0001\u0010\u0001"+ - "\u0010\u0001\u0010\u0001\u0011\u0001\u0011\u0001\u0011\u0001\u0011\u0001"+ - "\u0011\u0001\u0011\u0001\u0011\u0001\u0011\u0001\u0011\u0001\u0012\u0001"+ - "\u0012\u0001\u0013\u0001\u0013\u0001\u0013\u0001\u0013\u0001\u0013\u0001"+ - "\u0013\u0001\u0013\u0001\u0014\u0001\u0014\u0001\u0014\u0001\u0014\u0001"+ + "+\u0002,\u0007,\u0002-\u0007-\u0002.\u0007.\u0001\u0000\u0001\u0000\u0001"+ + "\u0000\u0001\u0000\u0001\u0000\u0001\u0000\u0001\u0001\u0001\u0001\u0001"+ + "\u0002\u0001\u0002\u0001\u0003\u0001\u0003\u0001\u0004\u0001\u0004\u0001"+ + "\u0005\u0001\u0005\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001"+ + "\u0006\u0001\u0006\u0001\u0006\u0001\u0007\u0001\u0007\u0001\u0007\u0001"+ + "\u0007\u0001\u0007\u0001\b\u0001\b\u0001\b\u0001\b\u0001\b\u0001\b\u0001"+ + "\b\u0001\b\u0001\b\u0001\b\u0001\b\u0001\b\u0001\b\u0001\b\u0001\t\u0001"+ + "\t\u0001\n\u0001\n\u0001\n\u0001\u000b\u0001\u000b\u0001\u000b\u0001\u000b"+ + "\u0001\u000b\u0001\f\u0001\f\u0001\f\u0001\f\u0001\r\u0001\r\u0001\r\u0001"+ + "\r\u0001\r\u0001\r\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000f\u0001"+ + "\u000f\u0001\u000f\u0001\u000f\u0001\u000f\u0001\u000f\u0001\u000f\u0001"+ + "\u0010\u0001\u0010\u0001\u0010\u0001\u0010\u0001\u0010\u0001\u0010\u0001"+ + "\u0011\u0001\u0011\u0001\u0012\u0001\u0012\u0001\u0012\u0001\u0012\u0001"+ + "\u0012\u0001\u0012\u0001\u0012\u0001\u0013\u0001\u0013\u0001\u0013\u0001"+ + "\u0013\u0001\u0014\u0001\u0014\u0001\u0014\u0001\u0014\u0001\u0014\u0001"+ "\u0015\u0001\u0015\u0001\u0015\u0001\u0015\u0001\u0015\u0001\u0016\u0001"+ - "\u0016\u0001\u0016\u0001\u0016\u0001\u0016\u0001\u0017\u0001\u0017\u0001"+ - "\u0018\u0001\u0018\u0001\u0019\u0001\u0019\u0001\u001a\u0001\u001a\u0001"+ - "\u001b\u0001\u001b\u0001\u001c\u0001\u001c\u0001\u001c\u0001\u001d\u0001"+ - "\u001d\u0001\u001d\u0001\u001e\u0001\u001e\u0001\u001e\u0001\u001f\u0001"+ - "\u001f\u0001\u001f\u0001 \u0001 \u0001 \u0001!\u0001!\u0001!\u0001\"\u0001"+ - "\"\u0001#\u0001#\u0001#\u0001$\u0001$\u0001$\u0001%\u0001%\u0001%\u0001"+ - "&\u0001&\u0001\'\u0001\'\u0001\'\u0001\'\u0001(\u0001(\u0001(\u0001(\u0001"+ + "\u0016\u0001\u0017\u0001\u0017\u0001\u0018\u0001\u0018\u0001\u0019\u0001"+ + "\u0019\u0001\u001a\u0001\u001a\u0001\u001b\u0001\u001b\u0001\u001b\u0001"+ + "\u001c\u0001\u001c\u0001\u001c\u0001\u001d\u0001\u001d\u0001\u001d\u0001"+ + "\u001e\u0001\u001e\u0001\u001e\u0001\u001f\u0001\u001f\u0001\u001f\u0001"+ + " \u0001 \u0001 \u0001!\u0001!\u0001\"\u0001\"\u0001\"\u0001#\u0001#\u0001"+ + "#\u0001$\u0001$\u0001$\u0001%\u0001%\u0001&\u0001&\u0001&\u0001&\u0001"+ + "\'\u0001\'\u0001\'\u0001\'\u0001\'\u0001\'\u0001\'\u0001\'\u0001(\u0001"+ "(\u0001(\u0001(\u0001(\u0001)\u0001)\u0001)\u0001)\u0001)\u0001*\u0001"+ - "*\u0001*\u0001*\u0001*\u0001+\u0001+\u0001+\u0001+\u0001+\u0001+\u0001"+ - "+\u0001+\u0001+\u0003+\u0118\b+\u0001,\u0001,\u0001,\u0001,\u0001-\u0004"+ - "-\u011f\b-\u000b-\f-\u0120\u0001.\u0004.\u0124\b.\u000b.\f.\u0125\u0001"+ - "/\u0001/\u0001/\u0001/\u0000\u00000\u0001\u0001\u0003\u0002\u0005\u0003"+ - "\u0007\u0004\t\u0005\u000b\u0006\r\u0007\u000f\b\u0011\t\u0013\n\u0015"+ - "\u000b\u0017\f\u0019\r\u001b\u000e\u001d\u000f\u001f\u0010!\u0011#\u0012"+ - "%\u0013\'\u0014)\u0015+\u0016-\u0017/\u00181\u00193\u001a5\u001b7\u001c"+ - "9\u001d;\u001e=\u001f? A!C\"E#G$I%K&M\'O(Q)S*U+W,Y-[.]/_0\u0001\u0000"+ - "\u0004\u0001\u0000\'\'\u0002\u0000AZaz\u0001\u000009\u0003\u0000\t\n\r"+ - "\r \u012d\u0000\u0001\u0001\u0000\u0000\u0000\u0000\u0003\u0001\u0000"+ - "\u0000\u0000\u0000\u0005\u0001\u0000\u0000\u0000\u0000\u0007\u0001\u0000"+ - "\u0000\u0000\u0000\t\u0001\u0000\u0000\u0000\u0000\u000b\u0001\u0000\u0000"+ - "\u0000\u0000\r\u0001\u0000\u0000\u0000\u0000\u000f\u0001\u0000\u0000\u0000"+ - "\u0000\u0011\u0001\u0000\u0000\u0000\u0000\u0013\u0001\u0000\u0000\u0000"+ - "\u0000\u0015\u0001\u0000\u0000\u0000\u0000\u0017\u0001\u0000\u0000\u0000"+ - "\u0000\u0019\u0001\u0000\u0000\u0000\u0000\u001b\u0001\u0000\u0000\u0000"+ - "\u0000\u001d\u0001\u0000\u0000\u0000\u0000\u001f\u0001\u0000\u0000\u0000"+ - "\u0000!\u0001\u0000\u0000\u0000\u0000#\u0001\u0000\u0000\u0000\u0000%"+ - "\u0001\u0000\u0000\u0000\u0000\'\u0001\u0000\u0000\u0000\u0000)\u0001"+ - "\u0000\u0000\u0000\u0000+\u0001\u0000\u0000\u0000\u0000-\u0001\u0000\u0000"+ - "\u0000\u0000/\u0001\u0000\u0000\u0000\u00001\u0001\u0000\u0000\u0000\u0000"+ - "3\u0001\u0000\u0000\u0000\u00005\u0001\u0000\u0000\u0000\u00007\u0001"+ - "\u0000\u0000\u0000\u00009\u0001\u0000\u0000\u0000\u0000;\u0001\u0000\u0000"+ - "\u0000\u0000=\u0001\u0000\u0000\u0000\u0000?\u0001\u0000\u0000\u0000\u0000"+ - "A\u0001\u0000\u0000\u0000\u0000C\u0001\u0000\u0000\u0000\u0000E\u0001"+ - "\u0000\u0000\u0000\u0000G\u0001\u0000\u0000\u0000\u0000I\u0001\u0000\u0000"+ - "\u0000\u0000K\u0001\u0000\u0000\u0000\u0000M\u0001\u0000\u0000\u0000\u0000"+ - "O\u0001\u0000\u0000\u0000\u0000Q\u0001\u0000\u0000\u0000\u0000S\u0001"+ - "\u0000\u0000\u0000\u0000U\u0001\u0000\u0000\u0000\u0000W\u0001\u0000\u0000"+ - "\u0000\u0000Y\u0001\u0000\u0000\u0000\u0000[\u0001\u0000\u0000\u0000\u0000"+ - "]\u0001\u0000\u0000\u0000\u0000_\u0001\u0000\u0000\u0000\u0001a\u0001"+ - "\u0000\u0000\u0000\u0003g\u0001\u0000\u0000\u0000\u0005i\u0001\u0000\u0000"+ - "\u0000\u0007k\u0001\u0000\u0000\u0000\tm\u0001\u0000\u0000\u0000\u000b"+ - "o\u0001\u0000\u0000\u0000\rq\u0001\u0000\u0000\u0000\u000fx\u0001\u0000"+ - "\u0000\u0000\u0011}\u0001\u0000\u0000\u0000\u0013\u008b\u0001\u0000\u0000"+ - "\u0000\u0015\u008d\u0001\u0000\u0000\u0000\u0017\u0090\u0001\u0000\u0000"+ - "\u0000\u0019\u0095\u0001\u0000\u0000\u0000\u001b\u0099\u0001\u0000\u0000"+ - "\u0000\u001d\u009f\u0001\u0000\u0000\u0000\u001f\u00a2\u0001\u0000\u0000"+ - "\u0000!\u00a9\u0001\u0000\u0000\u0000#\u00af\u0001\u0000\u0000\u0000%"+ - "\u00b8\u0001\u0000\u0000\u0000\'\u00ba\u0001\u0000\u0000\u0000)\u00c1"+ - "\u0001\u0000\u0000\u0000+\u00c5\u0001\u0000\u0000\u0000-\u00ca\u0001\u0000"+ - "\u0000\u0000/\u00cf\u0001\u0000\u0000\u00001\u00d1\u0001\u0000\u0000\u0000"+ - "3\u00d3\u0001\u0000\u0000\u00005\u00d5\u0001\u0000\u0000\u00007\u00d7"+ - "\u0001\u0000\u0000\u00009\u00d9\u0001\u0000\u0000\u0000;\u00dc\u0001\u0000"+ - "\u0000\u0000=\u00df\u0001\u0000\u0000\u0000?\u00e2\u0001\u0000\u0000\u0000"+ - "A\u00e5\u0001\u0000\u0000\u0000C\u00e8\u0001\u0000\u0000\u0000E\u00eb"+ - "\u0001\u0000\u0000\u0000G\u00ed\u0001\u0000\u0000\u0000I\u00f0\u0001\u0000"+ - "\u0000\u0000K\u00f3\u0001\u0000\u0000\u0000M\u00f6\u0001\u0000\u0000\u0000"+ - "O\u00f8\u0001\u0000\u0000\u0000Q\u00fc\u0001\u0000\u0000\u0000S\u0104"+ - "\u0001\u0000\u0000\u0000U\u0109\u0001\u0000\u0000\u0000W\u0117\u0001\u0000"+ - "\u0000\u0000Y\u0119\u0001\u0000\u0000\u0000[\u011e\u0001\u0000\u0000\u0000"+ - "]\u0123\u0001\u0000\u0000\u0000_\u0127\u0001\u0000\u0000\u0000ab\u0005"+ - "c\u0000\u0000bc\u0005l\u0000\u0000cd\u0005a\u0000\u0000de\u0005s\u0000"+ - "\u0000ef\u0005s\u0000\u0000f\u0002\u0001\u0000\u0000\u0000gh\u0005{\u0000"+ - "\u0000h\u0004\u0001\u0000\u0000\u0000ij\u0005}\u0000\u0000j\u0006\u0001"+ - "\u0000\u0000\u0000kl\u0005;\u0000\u0000l\b\u0001\u0000\u0000\u0000mn\u0005"+ - "(\u0000\u0000n\n\u0001\u0000\u0000\u0000op\u0005)\u0000\u0000p\f\u0001"+ - "\u0000\u0000\u0000qr\u0005s\u0000\u0000rs\u0005t\u0000\u0000st\u0005a"+ - "\u0000\u0000tu\u0005t\u0000\u0000uv\u0005i\u0000\u0000vw\u0005c\u0000"+ - "\u0000w\u000e\u0001\u0000\u0000\u0000xy\u0005m\u0000\u0000yz\u0005a\u0000"+ - "\u0000z{\u0005i\u0000\u0000{|\u0005n\u0000\u0000|\u0010\u0001\u0000\u0000"+ - "\u0000}~\u0005S\u0000\u0000~\u007f\u0005t\u0000\u0000\u007f\u0080\u0005"+ - "r\u0000\u0000\u0080\u0081\u0005i\u0000\u0000\u0081\u0082\u0005n\u0000"+ - "\u0000\u0082\u0083\u0005g\u0000\u0000\u0083\u0084\u0005[\u0000\u0000\u0084"+ - "\u0085\u0005]\u0000\u0000\u0085\u0086\u0005 \u0000\u0000\u0086\u0087\u0005"+ - "a\u0000\u0000\u0087\u0088\u0005r\u0000\u0000\u0088\u0089\u0005g\u0000"+ - "\u0000\u0089\u008a\u0005s\u0000\u0000\u008a\u0012\u0001\u0000\u0000\u0000"+ - "\u008b\u008c\u0005,\u0000\u0000\u008c\u0014\u0001\u0000\u0000\u0000\u008d"+ - "\u008e\u0005i\u0000\u0000\u008e\u008f\u0005f\u0000\u0000\u008f\u0016\u0001"+ - "\u0000\u0000\u0000\u0090\u0091\u0005e\u0000\u0000\u0091\u0092\u0005l\u0000"+ - "\u0000\u0092\u0093\u0005s\u0000\u0000\u0093\u0094\u0005e\u0000\u0000\u0094"+ - "\u0018\u0001\u0000\u0000\u0000\u0095\u0096\u0005f\u0000\u0000\u0096\u0097"+ - "\u0005o\u0000\u0000\u0097\u0098\u0005r\u0000\u0000\u0098\u001a\u0001\u0000"+ - "\u0000\u0000\u0099\u009a\u0005w\u0000\u0000\u009a\u009b\u0005h\u0000\u0000"+ - "\u009b\u009c\u0005i\u0000\u0000\u009c\u009d\u0005l\u0000\u0000\u009d\u009e"+ - "\u0005e\u0000\u0000\u009e\u001c\u0001\u0000\u0000\u0000\u009f\u00a0\u0005"+ - "d\u0000\u0000\u00a0\u00a1\u0005o\u0000\u0000\u00a1\u001e\u0001\u0000\u0000"+ - "\u0000\u00a2\u00a3\u0005r\u0000\u0000\u00a3\u00a4\u0005e\u0000\u0000\u00a4"+ - "\u00a5\u0005t\u0000\u0000\u00a5\u00a6\u0005u\u0000\u0000\u00a6\u00a7\u0005"+ - "r\u0000\u0000\u00a7\u00a8\u0005n\u0000\u0000\u00a8 \u0001\u0000\u0000"+ - "\u0000\u00a9\u00aa\u0005b\u0000\u0000\u00aa\u00ab\u0005r\u0000\u0000\u00ab"+ - "\u00ac\u0005e\u0000\u0000\u00ac\u00ad\u0005a\u0000\u0000\u00ad\u00ae\u0005"+ - "k\u0000\u0000\u00ae\"\u0001\u0000\u0000\u0000\u00af\u00b0\u0005c\u0000"+ - "\u0000\u00b0\u00b1\u0005o\u0000\u0000\u00b1\u00b2\u0005n\u0000\u0000\u00b2"+ - "\u00b3\u0005t\u0000\u0000\u00b3\u00b4\u0005i\u0000\u0000\u00b4\u00b5\u0005"+ - "n\u0000\u0000\u00b5\u00b6\u0005u\u0000\u0000\u00b6\u00b7\u0005e\u0000"+ - "\u0000\u00b7$\u0001\u0000\u0000\u0000\u00b8\u00b9\u0005.\u0000\u0000\u00b9"+ - "&\u0001\u0000\u0000\u0000\u00ba\u00bb\u0005p\u0000\u0000\u00bb\u00bc\u0005"+ - "u\u0000\u0000\u00bc\u00bd\u0005b\u0000\u0000\u00bd\u00be\u0005l\u0000"+ - "\u0000\u00be\u00bf\u0005i\u0000\u0000\u00bf\u00c0\u0005c\u0000\u0000\u00c0"+ - "(\u0001\u0000\u0000\u0000\u00c1\u00c2\u0005n\u0000\u0000\u00c2\u00c3\u0005"+ - "e\u0000\u0000\u00c3\u00c4\u0005w\u0000\u0000\u00c4*\u0001\u0000\u0000"+ - "\u0000\u00c5\u00c6\u0005n\u0000\u0000\u00c6\u00c7\u0005u\u0000\u0000\u00c7"+ - "\u00c8\u0005l\u0000\u0000\u00c8\u00c9\u0005l\u0000\u0000\u00c9,\u0001"+ - "\u0000\u0000\u0000\u00ca\u00cb\u0005t\u0000\u0000\u00cb\u00cc\u0005h\u0000"+ - "\u0000\u00cc\u00cd\u0005i\u0000\u0000\u00cd\u00ce\u0005s\u0000\u0000\u00ce"+ - ".\u0001\u0000\u0000\u0000\u00cf\u00d0\u0005-\u0000\u0000\u00d00\u0001"+ - "\u0000\u0000\u0000\u00d1\u00d2\u0005+\u0000\u0000\u00d22\u0001\u0000\u0000"+ - "\u0000\u00d3\u00d4\u0005*\u0000\u0000\u00d44\u0001\u0000\u0000\u0000\u00d5"+ - "\u00d6\u0005>\u0000\u0000\u00d66\u0001\u0000\u0000\u0000\u00d7\u00d8\u0005"+ - "<\u0000\u0000\u00d88\u0001\u0000\u0000\u0000\u00d9\u00da\u0005>\u0000"+ - "\u0000\u00da\u00db\u0005=\u0000\u0000\u00db:\u0001\u0000\u0000\u0000\u00dc"+ - "\u00dd\u0005<\u0000\u0000\u00dd\u00de\u0005=\u0000\u0000\u00de<\u0001"+ - "\u0000\u0000\u0000\u00df\u00e0\u0005=\u0000\u0000\u00e0\u00e1\u0005=\u0000"+ - "\u0000\u00e1>\u0001\u0000\u0000\u0000\u00e2\u00e3\u0005!\u0000\u0000\u00e3"+ - "\u00e4\u0005=\u0000\u0000\u00e4@\u0001\u0000\u0000\u0000\u00e5\u00e6\u0005"+ - "&\u0000\u0000\u00e6\u00e7\u0005&\u0000\u0000\u00e7B\u0001\u0000\u0000"+ - "\u0000\u00e8\u00e9\u0005|\u0000\u0000\u00e9\u00ea\u0005|\u0000\u0000\u00ea"+ - "D\u0001\u0000\u0000\u0000\u00eb\u00ec\u0005=\u0000\u0000\u00ecF\u0001"+ - "\u0000\u0000\u0000\u00ed\u00ee\u0005+\u0000\u0000\u00ee\u00ef\u0005=\u0000"+ - "\u0000\u00efH\u0001\u0000\u0000\u0000\u00f0\u00f1\u0005-\u0000\u0000\u00f1"+ - "\u00f2\u0005=\u0000\u0000\u00f2J\u0001\u0000\u0000\u0000\u00f3\u00f4\u0005"+ - "*\u0000\u0000\u00f4\u00f5\u0005=\u0000\u0000\u00f5L\u0001\u0000\u0000"+ - "\u0000\u00f6\u00f7\u0005!\u0000\u0000\u00f7N\u0001\u0000\u0000\u0000\u00f8"+ - "\u00f9\u0005i\u0000\u0000\u00f9\u00fa\u0005n\u0000\u0000\u00fa\u00fb\u0005"+ - "t\u0000\u0000\u00fbP\u0001\u0000\u0000\u0000\u00fc\u00fd\u0005b\u0000"+ - "\u0000\u00fd\u00fe\u0005o\u0000\u0000\u00fe\u00ff\u0005o\u0000\u0000\u00ff"+ - "\u0100\u0005l\u0000\u0000\u0100\u0101\u0005e\u0000\u0000\u0101\u0102\u0005"+ - "a\u0000\u0000\u0102\u0103\u0005n\u0000\u0000\u0103R\u0001\u0000\u0000"+ - "\u0000\u0104\u0105\u0005v\u0000\u0000\u0105\u0106\u0005o\u0000\u0000\u0106"+ - "\u0107\u0005i\u0000\u0000\u0107\u0108\u0005d\u0000\u0000\u0108T\u0001"+ - "\u0000\u0000\u0000\u0109\u010a\u0005c\u0000\u0000\u010a\u010b\u0005h\u0000"+ - "\u0000\u010b\u010c\u0005a\u0000\u0000\u010c\u010d\u0005r\u0000\u0000\u010d"+ - "V\u0001\u0000\u0000\u0000\u010e\u010f\u0005t\u0000\u0000\u010f\u0110\u0005"+ - "r\u0000\u0000\u0110\u0111\u0005u\u0000\u0000\u0111\u0118\u0005e\u0000"+ - "\u0000\u0112\u0113\u0005f\u0000\u0000\u0113\u0114\u0005a\u0000\u0000\u0114"+ - "\u0115\u0005l\u0000\u0000\u0115\u0116\u0005s\u0000\u0000\u0116\u0118\u0005"+ - "e\u0000\u0000\u0117\u010e\u0001\u0000\u0000\u0000\u0117\u0112\u0001\u0000"+ - "\u0000\u0000\u0118X\u0001\u0000\u0000\u0000\u0119\u011a\u0007\u0000\u0000"+ - "\u0000\u011a\u011b\u0007\u0001\u0000\u0000\u011b\u011c\u0007\u0000\u0000"+ - "\u0000\u011cZ\u0001\u0000\u0000\u0000\u011d\u011f\u0007\u0001\u0000\u0000"+ - "\u011e\u011d\u0001\u0000\u0000\u0000\u011f\u0120\u0001\u0000\u0000\u0000"+ - "\u0120\u011e\u0001\u0000\u0000\u0000\u0120\u0121\u0001\u0000\u0000\u0000"+ - "\u0121\\\u0001\u0000\u0000\u0000\u0122\u0124\u0007\u0002\u0000\u0000\u0123"+ - "\u0122\u0001\u0000\u0000\u0000\u0124\u0125\u0001\u0000\u0000\u0000\u0125"+ - "\u0123\u0001\u0000\u0000\u0000\u0125\u0126\u0001\u0000\u0000\u0000\u0126"+ - "^\u0001\u0000\u0000\u0000\u0127\u0128\u0007\u0003\u0000\u0000\u0128\u0129"+ - "\u0001\u0000\u0000\u0000\u0129\u012a\u0006/\u0000\u0000\u012a`\u0001\u0000"+ - "\u0000\u0000\u0004\u0000\u0117\u0120\u0125\u0001\u0006\u0000\u0000"; + "*\u0001*\u0001*\u0001*\u0001*\u0001*\u0001*\u0001*\u0003*\u010d\b*\u0001"+ + "+\u0001+\u0001+\u0001+\u0001,\u0004,\u0114\b,\u000b,\f,\u0115\u0001-\u0004"+ + "-\u0119\b-\u000b-\f-\u011a\u0001.\u0001.\u0001.\u0001.\u0000\u0000/\u0001"+ + "\u0001\u0003\u0002\u0005\u0003\u0007\u0004\t\u0005\u000b\u0006\r\u0007"+ + "\u000f\b\u0011\t\u0013\n\u0015\u000b\u0017\f\u0019\r\u001b\u000e\u001d"+ + "\u000f\u001f\u0010!\u0011#\u0012%\u0013\'\u0014)\u0015+\u0016-\u0017/"+ + "\u00181\u00193\u001a5\u001b7\u001c9\u001d;\u001e=\u001f? A!C\"E#G$I%K"+ + "&M\'O(Q)S*U+W,Y-[.]/\u0001\u0000\u0004\u0001\u0000\'\'\u0002\u0000AZa"+ + "z\u0001\u000009\u0003\u0000\t\n\r\r \u0122\u0000\u0001\u0001\u0000\u0000"+ + "\u0000\u0000\u0003\u0001\u0000\u0000\u0000\u0000\u0005\u0001\u0000\u0000"+ + "\u0000\u0000\u0007\u0001\u0000\u0000\u0000\u0000\t\u0001\u0000\u0000\u0000"+ + "\u0000\u000b\u0001\u0000\u0000\u0000\u0000\r\u0001\u0000\u0000\u0000\u0000"+ + "\u000f\u0001\u0000\u0000\u0000\u0000\u0011\u0001\u0000\u0000\u0000\u0000"+ + "\u0013\u0001\u0000\u0000\u0000\u0000\u0015\u0001\u0000\u0000\u0000\u0000"+ + "\u0017\u0001\u0000\u0000\u0000\u0000\u0019\u0001\u0000\u0000\u0000\u0000"+ + "\u001b\u0001\u0000\u0000\u0000\u0000\u001d\u0001\u0000\u0000\u0000\u0000"+ + "\u001f\u0001\u0000\u0000\u0000\u0000!\u0001\u0000\u0000\u0000\u0000#\u0001"+ + "\u0000\u0000\u0000\u0000%\u0001\u0000\u0000\u0000\u0000\'\u0001\u0000"+ + "\u0000\u0000\u0000)\u0001\u0000\u0000\u0000\u0000+\u0001\u0000\u0000\u0000"+ + "\u0000-\u0001\u0000\u0000\u0000\u0000/\u0001\u0000\u0000\u0000\u00001"+ + "\u0001\u0000\u0000\u0000\u00003\u0001\u0000\u0000\u0000\u00005\u0001\u0000"+ + "\u0000\u0000\u00007\u0001\u0000\u0000\u0000\u00009\u0001\u0000\u0000\u0000"+ + "\u0000;\u0001\u0000\u0000\u0000\u0000=\u0001\u0000\u0000\u0000\u0000?"+ + "\u0001\u0000\u0000\u0000\u0000A\u0001\u0000\u0000\u0000\u0000C\u0001\u0000"+ + "\u0000\u0000\u0000E\u0001\u0000\u0000\u0000\u0000G\u0001\u0000\u0000\u0000"+ + "\u0000I\u0001\u0000\u0000\u0000\u0000K\u0001\u0000\u0000\u0000\u0000M"+ + "\u0001\u0000\u0000\u0000\u0000O\u0001\u0000\u0000\u0000\u0000Q\u0001\u0000"+ + "\u0000\u0000\u0000S\u0001\u0000\u0000\u0000\u0000U\u0001\u0000\u0000\u0000"+ + "\u0000W\u0001\u0000\u0000\u0000\u0000Y\u0001\u0000\u0000\u0000\u0000["+ + "\u0001\u0000\u0000\u0000\u0000]\u0001\u0000\u0000\u0000\u0001_\u0001\u0000"+ + "\u0000\u0000\u0003e\u0001\u0000\u0000\u0000\u0005g\u0001\u0000\u0000\u0000"+ + "\u0007i\u0001\u0000\u0000\u0000\tk\u0001\u0000\u0000\u0000\u000bm\u0001"+ + "\u0000\u0000\u0000\ro\u0001\u0000\u0000\u0000\u000fv\u0001\u0000\u0000"+ + "\u0000\u0011{\u0001\u0000\u0000\u0000\u0013\u0089\u0001\u0000\u0000\u0000"+ + "\u0015\u008b\u0001\u0000\u0000\u0000\u0017\u008e\u0001\u0000\u0000\u0000"+ + "\u0019\u0093\u0001\u0000\u0000\u0000\u001b\u0097\u0001\u0000\u0000\u0000"+ + "\u001d\u009d\u0001\u0000\u0000\u0000\u001f\u00a0\u0001\u0000\u0000\u0000"+ + "!\u00a7\u0001\u0000\u0000\u0000#\u00ad\u0001\u0000\u0000\u0000%\u00af"+ + "\u0001\u0000\u0000\u0000\'\u00b6\u0001\u0000\u0000\u0000)\u00ba\u0001"+ + "\u0000\u0000\u0000+\u00bf\u0001\u0000\u0000\u0000-\u00c4\u0001\u0000\u0000"+ + "\u0000/\u00c6\u0001\u0000\u0000\u00001\u00c8\u0001\u0000\u0000\u00003"+ + "\u00ca\u0001\u0000\u0000\u00005\u00cc\u0001\u0000\u0000\u00007\u00ce\u0001"+ + "\u0000\u0000\u00009\u00d1\u0001\u0000\u0000\u0000;\u00d4\u0001\u0000\u0000"+ + "\u0000=\u00d7\u0001\u0000\u0000\u0000?\u00da\u0001\u0000\u0000\u0000A"+ + "\u00dd\u0001\u0000\u0000\u0000C\u00e0\u0001\u0000\u0000\u0000E\u00e2\u0001"+ + "\u0000\u0000\u0000G\u00e5\u0001\u0000\u0000\u0000I\u00e8\u0001\u0000\u0000"+ + "\u0000K\u00eb\u0001\u0000\u0000\u0000M\u00ed\u0001\u0000\u0000\u0000O"+ + "\u00f1\u0001\u0000\u0000\u0000Q\u00f9\u0001\u0000\u0000\u0000S\u00fe\u0001"+ + "\u0000\u0000\u0000U\u010c\u0001\u0000\u0000\u0000W\u010e\u0001\u0000\u0000"+ + "\u0000Y\u0113\u0001\u0000\u0000\u0000[\u0118\u0001\u0000\u0000\u0000]"+ + "\u011c\u0001\u0000\u0000\u0000_`\u0005c\u0000\u0000`a\u0005l\u0000\u0000"+ + "ab\u0005a\u0000\u0000bc\u0005s\u0000\u0000cd\u0005s\u0000\u0000d\u0002"+ + "\u0001\u0000\u0000\u0000ef\u0005{\u0000\u0000f\u0004\u0001\u0000\u0000"+ + "\u0000gh\u0005}\u0000\u0000h\u0006\u0001\u0000\u0000\u0000ij\u0005;\u0000"+ + "\u0000j\b\u0001\u0000\u0000\u0000kl\u0005(\u0000\u0000l\n\u0001\u0000"+ + "\u0000\u0000mn\u0005)\u0000\u0000n\f\u0001\u0000\u0000\u0000op\u0005s"+ + "\u0000\u0000pq\u0005t\u0000\u0000qr\u0005a\u0000\u0000rs\u0005t\u0000"+ + "\u0000st\u0005i\u0000\u0000tu\u0005c\u0000\u0000u\u000e\u0001\u0000\u0000"+ + "\u0000vw\u0005m\u0000\u0000wx\u0005a\u0000\u0000xy\u0005i\u0000\u0000"+ + "yz\u0005n\u0000\u0000z\u0010\u0001\u0000\u0000\u0000{|\u0005S\u0000\u0000"+ + "|}\u0005t\u0000\u0000}~\u0005r\u0000\u0000~\u007f\u0005i\u0000\u0000\u007f"+ + "\u0080\u0005n\u0000\u0000\u0080\u0081\u0005g\u0000\u0000\u0081\u0082\u0005"+ + "[\u0000\u0000\u0082\u0083\u0005]\u0000\u0000\u0083\u0084\u0005 \u0000"+ + "\u0000\u0084\u0085\u0005a\u0000\u0000\u0085\u0086\u0005r\u0000\u0000\u0086"+ + "\u0087\u0005g\u0000\u0000\u0087\u0088\u0005s\u0000\u0000\u0088\u0012\u0001"+ + "\u0000\u0000\u0000\u0089\u008a\u0005,\u0000\u0000\u008a\u0014\u0001\u0000"+ + "\u0000\u0000\u008b\u008c\u0005i\u0000\u0000\u008c\u008d\u0005f\u0000\u0000"+ + "\u008d\u0016\u0001\u0000\u0000\u0000\u008e\u008f\u0005e\u0000\u0000\u008f"+ + "\u0090\u0005l\u0000\u0000\u0090\u0091\u0005s\u0000\u0000\u0091\u0092\u0005"+ + "e\u0000\u0000\u0092\u0018\u0001\u0000\u0000\u0000\u0093\u0094\u0005f\u0000"+ + "\u0000\u0094\u0095\u0005o\u0000\u0000\u0095\u0096\u0005r\u0000\u0000\u0096"+ + "\u001a\u0001\u0000\u0000\u0000\u0097\u0098\u0005w\u0000\u0000\u0098\u0099"+ + "\u0005h\u0000\u0000\u0099\u009a\u0005i\u0000\u0000\u009a\u009b\u0005l"+ + "\u0000\u0000\u009b\u009c\u0005e\u0000\u0000\u009c\u001c\u0001\u0000\u0000"+ + "\u0000\u009d\u009e\u0005d\u0000\u0000\u009e\u009f\u0005o\u0000\u0000\u009f"+ + "\u001e\u0001\u0000\u0000\u0000\u00a0\u00a1\u0005r\u0000\u0000\u00a1\u00a2"+ + "\u0005e\u0000\u0000\u00a2\u00a3\u0005t\u0000\u0000\u00a3\u00a4\u0005u"+ + "\u0000\u0000\u00a4\u00a5\u0005r\u0000\u0000\u00a5\u00a6\u0005n\u0000\u0000"+ + "\u00a6 \u0001\u0000\u0000\u0000\u00a7\u00a8\u0005b\u0000\u0000\u00a8\u00a9"+ + "\u0005r\u0000\u0000\u00a9\u00aa\u0005e\u0000\u0000\u00aa\u00ab\u0005a"+ + "\u0000\u0000\u00ab\u00ac\u0005k\u0000\u0000\u00ac\"\u0001\u0000\u0000"+ + "\u0000\u00ad\u00ae\u0005.\u0000\u0000\u00ae$\u0001\u0000\u0000\u0000\u00af"+ + "\u00b0\u0005p\u0000\u0000\u00b0\u00b1\u0005u\u0000\u0000\u00b1\u00b2\u0005"+ + "b\u0000\u0000\u00b2\u00b3\u0005l\u0000\u0000\u00b3\u00b4\u0005i\u0000"+ + "\u0000\u00b4\u00b5\u0005c\u0000\u0000\u00b5&\u0001\u0000\u0000\u0000\u00b6"+ + "\u00b7\u0005n\u0000\u0000\u00b7\u00b8\u0005e\u0000\u0000\u00b8\u00b9\u0005"+ + "w\u0000\u0000\u00b9(\u0001\u0000\u0000\u0000\u00ba\u00bb\u0005n\u0000"+ + "\u0000\u00bb\u00bc\u0005u\u0000\u0000\u00bc\u00bd\u0005l\u0000\u0000\u00bd"+ + "\u00be\u0005l\u0000\u0000\u00be*\u0001\u0000\u0000\u0000\u00bf\u00c0\u0005"+ + "t\u0000\u0000\u00c0\u00c1\u0005h\u0000\u0000\u00c1\u00c2\u0005i\u0000"+ + "\u0000\u00c2\u00c3\u0005s\u0000\u0000\u00c3,\u0001\u0000\u0000\u0000\u00c4"+ + "\u00c5\u0005-\u0000\u0000\u00c5.\u0001\u0000\u0000\u0000\u00c6\u00c7\u0005"+ + "+\u0000\u0000\u00c70\u0001\u0000\u0000\u0000\u00c8\u00c9\u0005*\u0000"+ + "\u0000\u00c92\u0001\u0000\u0000\u0000\u00ca\u00cb\u0005>\u0000\u0000\u00cb"+ + "4\u0001\u0000\u0000\u0000\u00cc\u00cd\u0005<\u0000\u0000\u00cd6\u0001"+ + "\u0000\u0000\u0000\u00ce\u00cf\u0005>\u0000\u0000\u00cf\u00d0\u0005=\u0000"+ + "\u0000\u00d08\u0001\u0000\u0000\u0000\u00d1\u00d2\u0005<\u0000\u0000\u00d2"+ + "\u00d3\u0005=\u0000\u0000\u00d3:\u0001\u0000\u0000\u0000\u00d4\u00d5\u0005"+ + "=\u0000\u0000\u00d5\u00d6\u0005=\u0000\u0000\u00d6<\u0001\u0000\u0000"+ + "\u0000\u00d7\u00d8\u0005!\u0000\u0000\u00d8\u00d9\u0005=\u0000\u0000\u00d9"+ + ">\u0001\u0000\u0000\u0000\u00da\u00db\u0005&\u0000\u0000\u00db\u00dc\u0005"+ + "&\u0000\u0000\u00dc@\u0001\u0000\u0000\u0000\u00dd\u00de\u0005|\u0000"+ + "\u0000\u00de\u00df\u0005|\u0000\u0000\u00dfB\u0001\u0000\u0000\u0000\u00e0"+ + "\u00e1\u0005=\u0000\u0000\u00e1D\u0001\u0000\u0000\u0000\u00e2\u00e3\u0005"+ + "+\u0000\u0000\u00e3\u00e4\u0005=\u0000\u0000\u00e4F\u0001\u0000\u0000"+ + "\u0000\u00e5\u00e6\u0005-\u0000\u0000\u00e6\u00e7\u0005=\u0000\u0000\u00e7"+ + "H\u0001\u0000\u0000\u0000\u00e8\u00e9\u0005*\u0000\u0000\u00e9\u00ea\u0005"+ + "=\u0000\u0000\u00eaJ\u0001\u0000\u0000\u0000\u00eb\u00ec\u0005!\u0000"+ + "\u0000\u00ecL\u0001\u0000\u0000\u0000\u00ed\u00ee\u0005i\u0000\u0000\u00ee"+ + "\u00ef\u0005n\u0000\u0000\u00ef\u00f0\u0005t\u0000\u0000\u00f0N\u0001"+ + "\u0000\u0000\u0000\u00f1\u00f2\u0005b\u0000\u0000\u00f2\u00f3\u0005o\u0000"+ + "\u0000\u00f3\u00f4\u0005o\u0000\u0000\u00f4\u00f5\u0005l\u0000\u0000\u00f5"+ + "\u00f6\u0005e\u0000\u0000\u00f6\u00f7\u0005a\u0000\u0000\u00f7\u00f8\u0005"+ + "n\u0000\u0000\u00f8P\u0001\u0000\u0000\u0000\u00f9\u00fa\u0005v\u0000"+ + "\u0000\u00fa\u00fb\u0005o\u0000\u0000\u00fb\u00fc\u0005i\u0000\u0000\u00fc"+ + "\u00fd\u0005d\u0000\u0000\u00fdR\u0001\u0000\u0000\u0000\u00fe\u00ff\u0005"+ + "c\u0000\u0000\u00ff\u0100\u0005h\u0000\u0000\u0100\u0101\u0005a\u0000"+ + "\u0000\u0101\u0102\u0005r\u0000\u0000\u0102T\u0001\u0000\u0000\u0000\u0103"+ + "\u0104\u0005t\u0000\u0000\u0104\u0105\u0005r\u0000\u0000\u0105\u0106\u0005"+ + "u\u0000\u0000\u0106\u010d\u0005e\u0000\u0000\u0107\u0108\u0005f\u0000"+ + "\u0000\u0108\u0109\u0005a\u0000\u0000\u0109\u010a\u0005l\u0000\u0000\u010a"+ + "\u010b\u0005s\u0000\u0000\u010b\u010d\u0005e\u0000\u0000\u010c\u0103\u0001"+ + "\u0000\u0000\u0000\u010c\u0107\u0001\u0000\u0000\u0000\u010dV\u0001\u0000"+ + "\u0000\u0000\u010e\u010f\u0007\u0000\u0000\u0000\u010f\u0110\u0007\u0001"+ + "\u0000\u0000\u0110\u0111\u0007\u0000\u0000\u0000\u0111X\u0001\u0000\u0000"+ + "\u0000\u0112\u0114\u0007\u0001\u0000\u0000\u0113\u0112\u0001\u0000\u0000"+ + "\u0000\u0114\u0115\u0001\u0000\u0000\u0000\u0115\u0113\u0001\u0000\u0000"+ + "\u0000\u0115\u0116\u0001\u0000\u0000\u0000\u0116Z\u0001\u0000\u0000\u0000"+ + "\u0117\u0119\u0007\u0002\u0000\u0000\u0118\u0117\u0001\u0000\u0000\u0000"+ + "\u0119\u011a\u0001\u0000\u0000\u0000\u011a\u0118\u0001\u0000\u0000\u0000"+ + "\u011a\u011b\u0001\u0000\u0000\u0000\u011b\\\u0001\u0000\u0000\u0000\u011c"+ + "\u011d\u0007\u0003\u0000\u0000\u011d\u011e\u0001\u0000\u0000\u0000\u011e"+ + "\u011f\u0006.\u0000\u0000\u011f^\u0001\u0000\u0000\u0000\u0004\u0000\u010c"+ + "\u0115\u011a\u0001\u0006\u0000\u0000"; public static final ATN _ATN = new ATNDeserializer().deserialize(_serializedATN.toCharArray()); static { diff --git a/src/main/java/de/maishai/antlr/DecafLexer.tokens b/src/main/java/de/maishai/antlr/DecafLexer.tokens index 78b9736..fbc0193 100644 --- a/src/main/java/de/maishai/antlr/DecafLexer.tokens +++ b/src/main/java/de/maishai/antlr/DecafLexer.tokens @@ -16,36 +16,35 @@ T__14=15 T__15=16 T__16=17 T__17=18 -T__18=19 -PUBLIC=20 -NEW=21 -NULL=22 -THIS=23 -SUB=24 -ADD=25 -MUL=26 -GT=27 -LT=28 -GE=29 -LE=30 -EQ=31 -NE=32 -AND=33 -OR=34 -ASSIGN=35 -ADD_ASSIGN=36 -SUB_ASSIGN=37 -MUL_ASSIGN=38 -NOT=39 -INT=40 -BOOL=41 -VOID=42 -CHAR=43 -BOOLEANLITERAL=44 -CHARLITERAL=45 -IDENTIFIER=46 -NUMBER=47 -WS=48 +PUBLIC=19 +NEW=20 +NULL=21 +THIS=22 +SUB=23 +ADD=24 +MUL=25 +GT=26 +LT=27 +GE=28 +LE=29 +EQ=30 +NE=31 +AND=32 +OR=33 +ASSIGN=34 +ADD_ASSIGN=35 +SUB_ASSIGN=36 +MUL_ASSIGN=37 +NOT=38 +INT=39 +BOOL=40 +VOID=41 +CHAR=42 +BOOLEANLITERAL=43 +CHARLITERAL=44 +IDENTIFIER=45 +NUMBER=46 +WS=47 'class'=1 '{'=2 '}'=3 @@ -63,29 +62,28 @@ WS=48 'do'=15 'return'=16 'break'=17 -'continue'=18 -'.'=19 -'public'=20 -'new'=21 -'null'=22 -'this'=23 -'-'=24 -'+'=25 -'*'=26 -'>'=27 -'<'=28 -'>='=29 -'<='=30 -'=='=31 -'!='=32 -'&&'=33 -'||'=34 -'='=35 -'+='=36 -'-='=37 -'*='=38 -'!'=39 -'int'=40 -'boolean'=41 -'void'=42 -'char'=43 +'.'=18 +'public'=19 +'new'=20 +'null'=21 +'this'=22 +'-'=23 +'+'=24 +'*'=25 +'>'=26 +'<'=27 +'>='=28 +'<='=29 +'=='=30 +'!='=31 +'&&'=32 +'||'=33 +'='=34 +'+='=35 +'-='=36 +'*='=37 +'!'=38 +'int'=39 +'boolean'=40 +'void'=41 +'char'=42 diff --git a/src/main/java/de/maishai/antlr/DecafListener.java b/src/main/java/de/maishai/antlr/DecafListener.java index 9a6744e..993c502 100644 --- a/src/main/java/de/maishai/antlr/DecafListener.java +++ b/src/main/java/de/maishai/antlr/DecafListener.java @@ -7,16 +7,6 @@ import org.antlr.v4.runtime.tree.ParseTreeListener; * {@link DecafParser}. */ public interface DecafListener extends ParseTreeListener { - /** - * Enter a parse tree produced by {@link DecafParser#program}. - * @param ctx the parse tree - */ - void enterProgram(DecafParser.ProgramContext ctx); - /** - * Exit a parse tree produced by {@link DecafParser#program}. - * @param ctx the parse tree - */ - void exitProgram(DecafParser.ProgramContext ctx); /** * Enter a parse tree produced by {@link DecafParser#class}. * @param ctx the parse tree @@ -221,18 +211,6 @@ public interface DecafListener extends ParseTreeListener { * @param ctx the parse tree */ void exitBreak(DecafParser.BreakContext ctx); - /** - * Enter a parse tree produced by the {@code Continue} - * labeled alternative in {@link DecafParser#stmt}. - * @param ctx the parse tree - */ - void enterContinue(DecafParser.ContinueContext ctx); - /** - * Exit a parse tree produced by the {@code Continue} - * labeled alternative in {@link DecafParser#stmt}. - * @param ctx the parse tree - */ - void exitContinue(DecafParser.ContinueContext 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 e3aa246..461e1f4 100644 --- a/src/main/java/de/maishai/antlr/DecafParser.java +++ b/src/main/java/de/maishai/antlr/DecafParser.java @@ -19,25 +19,24 @@ public class DecafParser extends Parser { public static final int T__0=1, T__1=2, T__2=3, T__3=4, T__4=5, T__5=6, T__6=7, T__7=8, T__8=9, T__9=10, T__10=11, T__11=12, T__12=13, T__13=14, T__14=15, T__15=16, T__16=17, - T__17=18, T__18=19, PUBLIC=20, NEW=21, NULL=22, THIS=23, SUB=24, ADD=25, - MUL=26, GT=27, LT=28, GE=29, LE=30, EQ=31, NE=32, AND=33, OR=34, ASSIGN=35, - ADD_ASSIGN=36, SUB_ASSIGN=37, MUL_ASSIGN=38, NOT=39, INT=40, BOOL=41, - VOID=42, CHAR=43, BOOLEANLITERAL=44, CHARLITERAL=45, IDENTIFIER=46, NUMBER=47, - WS=48; + T__17=18, PUBLIC=19, NEW=20, NULL=21, THIS=22, SUB=23, ADD=24, MUL=25, + GT=26, LT=27, GE=28, LE=29, EQ=30, NE=31, AND=32, OR=33, ASSIGN=34, ADD_ASSIGN=35, + SUB_ASSIGN=36, MUL_ASSIGN=37, NOT=38, INT=39, BOOL=40, VOID=41, CHAR=42, + BOOLEANLITERAL=43, CHARLITERAL=44, IDENTIFIER=45, NUMBER=46, WS=47; public static final int - RULE_program = 0, RULE_class = 1, RULE_field = 2, RULE_localVar = 3, RULE_assignSign = 4, - RULE_returntype = 5, RULE_type = 6, RULE_meth = 7, RULE_mainmeth = 8, - RULE_constructor = 9, RULE_params = 10, RULE_param = 11, RULE_block = 12, - RULE_stmt = 13, RULE_stmtexpr = 14, RULE_expr = 15, RULE_binaryOp = 16, - RULE_unaryOp = 17, RULE_fieldId = 18, RULE_assign = 19, RULE_methCall = 20, - RULE_recipient = 21, RULE_methName = 22, RULE_args = 23, RULE_literal = 24, - RULE_id = 25; + RULE_class = 0, RULE_field = 1, RULE_localVar = 2, RULE_assignSign = 3, + RULE_returntype = 4, RULE_type = 5, RULE_meth = 6, RULE_mainmeth = 7, + RULE_constructor = 8, RULE_params = 9, RULE_param = 10, RULE_block = 11, + RULE_stmt = 12, RULE_stmtexpr = 13, RULE_expr = 14, RULE_binaryOp = 15, + RULE_unaryOp = 16, RULE_fieldId = 17, RULE_assign = 18, RULE_methCall = 19, + RULE_recipient = 20, RULE_methName = 21, RULE_args = 22, RULE_literal = 23, + RULE_id = 24; private static String[] makeRuleNames() { return new String[] { - "program", "class", "field", "localVar", "assignSign", "returntype", - "type", "meth", "mainmeth", "constructor", "params", "param", "block", - "stmt", "stmtexpr", "expr", "binaryOp", "unaryOp", "fieldId", "assign", - "methCall", "recipient", "methName", "args", "literal", "id" + "class", "field", "localVar", "assignSign", "returntype", "type", "meth", + "mainmeth", "constructor", "params", "param", "block", "stmt", "stmtexpr", + "expr", "binaryOp", "unaryOp", "fieldId", "assign", "methCall", "recipient", + "methName", "args", "literal", "id" }; } public static final String[] ruleNames = makeRuleNames(); @@ -46,21 +45,21 @@ public class DecafParser extends Parser { return new String[] { null, "'class'", "'{'", "'}'", "';'", "'('", "')'", "'static'", "'main'", "'String[] args'", "','", "'if'", "'else'", "'for'", "'while'", "'do'", - "'return'", "'break'", "'continue'", "'.'", "'public'", "'new'", "'null'", - "'this'", "'-'", "'+'", "'*'", "'>'", "'<'", "'>='", "'<='", "'=='", - "'!='", "'&&'", "'||'", "'='", "'+='", "'-='", "'*='", "'!'", "'int'", - "'boolean'", "'void'", "'char'" + "'return'", "'break'", "'.'", "'public'", "'new'", "'null'", "'this'", + "'-'", "'+'", "'*'", "'>'", "'<'", "'>='", "'<='", "'=='", "'!='", "'&&'", + "'||'", "'='", "'+='", "'-='", "'*='", "'!'", "'int'", "'boolean'", "'void'", + "'char'" }; } private static final String[] _LITERAL_NAMES = makeLiteralNames(); private static String[] makeSymbolicNames() { return new String[] { null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null, "PUBLIC", "NEW", "NULL", - "THIS", "SUB", "ADD", "MUL", "GT", "LT", "GE", "LE", "EQ", "NE", "AND", - "OR", "ASSIGN", "ADD_ASSIGN", "SUB_ASSIGN", "MUL_ASSIGN", "NOT", "INT", - "BOOL", "VOID", "CHAR", "BOOLEANLITERAL", "CHARLITERAL", "IDENTIFIER", - "NUMBER", "WS" + null, null, null, null, null, null, null, "PUBLIC", "NEW", "NULL", "THIS", + "SUB", "ADD", "MUL", "GT", "LT", "GE", "LE", "EQ", "NE", "AND", "OR", + "ASSIGN", "ADD_ASSIGN", "SUB_ASSIGN", "MUL_ASSIGN", "NOT", "INT", "BOOL", + "VOID", "CHAR", "BOOLEANLITERAL", "CHARLITERAL", "IDENTIFIER", "NUMBER", + "WS" }; } private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames(); @@ -114,73 +113,12 @@ public class DecafParser extends Parser { _interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); } - @SuppressWarnings("CheckReturnValue") - public static class ProgramContext extends ParserRuleContext { - public List class_() { - return getRuleContexts(ClassContext.class); - } - public ClassContext class_(int i) { - return getRuleContext(ClassContext.class,i); - } - public ProgramContext(ParserRuleContext parent, int invokingState) { - super(parent, invokingState); - } - @Override public int getRuleIndex() { return RULE_program; } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof DecafListener ) ((DecafListener)listener).enterProgram(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof DecafListener ) ((DecafListener)listener).exitProgram(this); - } - @Override - public T accept(ParseTreeVisitor visitor) { - if ( visitor instanceof DecafVisitor ) return ((DecafVisitor)visitor).visitProgram(this); - else return visitor.visitChildren(this); - } - } - - public final ProgramContext program() throws RecognitionException { - ProgramContext _localctx = new ProgramContext(_ctx, getState()); - enterRule(_localctx, 0, RULE_program); - int _la; - try { - enterOuterAlt(_localctx, 1); - { - setState(53); - _errHandler.sync(this); - _la = _input.LA(1); - do { - { - { - setState(52); - class_(); - } - } - setState(55); - _errHandler.sync(this); - _la = _input.LA(1); - } while ( _la==T__0 || _la==PUBLIC ); - } - } - catch (RecognitionException re) { - _localctx.exception = re; - _errHandler.reportError(this, re); - _errHandler.recover(this, re); - } - finally { - exitRule(); - } - return _localctx; - } - @SuppressWarnings("CheckReturnValue") public static class ClassContext extends ParserRuleContext { + public TerminalNode PUBLIC() { return getToken(DecafParser.PUBLIC, 0); } public IdContext id() { return getRuleContext(IdContext.class,0); } - public TerminalNode PUBLIC() { return getToken(DecafParser.PUBLIC, 0); } public MainmethContext mainmeth() { return getRuleContext(MainmethContext.class,0); } @@ -223,70 +161,62 @@ public class DecafParser extends Parser { public final ClassContext class_() throws RecognitionException { ClassContext _localctx = new ClassContext(_ctx, getState()); - enterRule(_localctx, 2, RULE_class); + enterRule(_localctx, 0, RULE_class); int _la; try { enterOuterAlt(_localctx, 1); { - setState(58); - _errHandler.sync(this); - _la = _input.LA(1); - if (_la==PUBLIC) { - { - setState(57); - match(PUBLIC); - } - } - - setState(60); + setState(50); + match(PUBLIC); + setState(51); match(T__0); - setState(61); + setState(52); id(); - setState(62); + setState(53); match(T__1); - setState(64); + setState(55); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,2,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,0,_ctx) ) { case 1: { - setState(63); + setState(54); mainmeth(); } break; } - setState(71); + setState(62); _errHandler.sync(this); _la = _input.LA(1); - while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 86861419642880L) != 0)) { + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 41231686565888L) != 0)) { { - setState(69); + setState(60); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,3,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,1,_ctx) ) { case 1: { - setState(66); + setState(57); field(); } break; case 2: { - setState(67); + setState(58); meth(); } break; case 3: { - setState(68); + setState(59); constructor(); } break; } } - setState(73); + setState(64); _errHandler.sync(this); _la = _input.LA(1); } - setState(74); + setState(65); match(T__2); } } @@ -330,15 +260,15 @@ public class DecafParser extends Parser { public final FieldContext field() throws RecognitionException { FieldContext _localctx = new FieldContext(_ctx, getState()); - enterRule(_localctx, 4, RULE_field); + enterRule(_localctx, 2, RULE_field); try { enterOuterAlt(_localctx, 1); { - setState(76); + setState(67); type(); - setState(77); + setState(68); id(); - setState(78); + setState(69); match(T__3); } } @@ -382,15 +312,15 @@ public class DecafParser extends Parser { public final LocalVarContext localVar() throws RecognitionException { LocalVarContext _localctx = new LocalVarContext(_ctx, getState()); - enterRule(_localctx, 6, RULE_localVar); + enterRule(_localctx, 4, RULE_localVar); try { enterOuterAlt(_localctx, 1); { - setState(80); + setState(71); type(); - setState(81); + setState(72); id(); - setState(82); + setState(73); match(T__3); } } @@ -432,14 +362,14 @@ public class DecafParser extends Parser { public final AssignSignContext assignSign() throws RecognitionException { AssignSignContext _localctx = new AssignSignContext(_ctx, getState()); - enterRule(_localctx, 8, RULE_assignSign); + enterRule(_localctx, 6, RULE_assignSign); int _la; try { enterOuterAlt(_localctx, 1); { - setState(84); + setState(75); _la = _input.LA(1); - if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 515396075520L) != 0)) ) { + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 257698037760L) != 0)) ) { _errHandler.recoverInline(this); } else { @@ -487,9 +417,9 @@ public class DecafParser extends Parser { public final ReturntypeContext returntype() throws RecognitionException { ReturntypeContext _localctx = new ReturntypeContext(_ctx, getState()); - enterRule(_localctx, 10, RULE_returntype); + enterRule(_localctx, 8, RULE_returntype); try { - setState(88); + setState(79); _errHandler.sync(this); switch (_input.LA(1)) { case INT: @@ -498,14 +428,14 @@ public class DecafParser extends Parser { case IDENTIFIER: enterOuterAlt(_localctx, 1); { - setState(86); + setState(77); type(); } break; case VOID: enterOuterAlt(_localctx, 2); { - setState(87); + setState(78); match(VOID); } break; @@ -553,36 +483,36 @@ public class DecafParser extends Parser { public final TypeContext type() throws RecognitionException { TypeContext _localctx = new TypeContext(_ctx, getState()); - enterRule(_localctx, 12, RULE_type); + enterRule(_localctx, 10, RULE_type); try { - setState(94); + setState(85); _errHandler.sync(this); switch (_input.LA(1)) { case INT: enterOuterAlt(_localctx, 1); { - setState(90); + setState(81); match(INT); } break; case BOOL: enterOuterAlt(_localctx, 2); { - setState(91); + setState(82); match(BOOL); } break; case CHAR: enterOuterAlt(_localctx, 3); { - setState(92); + setState(83); match(CHAR); } break; case IDENTIFIER: enterOuterAlt(_localctx, 4); { - setState(93); + setState(84); id(); } break; @@ -603,6 +533,7 @@ public class DecafParser extends Parser { @SuppressWarnings("CheckReturnValue") public static class MethContext extends ParserRuleContext { + public TerminalNode PUBLIC() { return getToken(DecafParser.PUBLIC, 0); } public ReturntypeContext returntype() { return getRuleContext(ReturntypeContext.class,0); } @@ -612,7 +543,6 @@ public class DecafParser extends Parser { public BlockContext block() { return getRuleContext(BlockContext.class,0); } - public TerminalNode PUBLIC() { return getToken(DecafParser.PUBLIC, 0); } public ParamsContext params() { return getRuleContext(ParamsContext.class,0); } @@ -637,40 +567,32 @@ public class DecafParser extends Parser { public final MethContext meth() throws RecognitionException { MethContext _localctx = new MethContext(_ctx, getState()); - enterRule(_localctx, 14, RULE_meth); + enterRule(_localctx, 12, RULE_meth); int _la; try { enterOuterAlt(_localctx, 1); { - setState(97); - _errHandler.sync(this); - _la = _input.LA(1); - if (_la==PUBLIC) { - { - setState(96); - match(PUBLIC); - } - } - - setState(99); + setState(87); + match(PUBLIC); + setState(88); returntype(); - setState(100); + setState(89); id(); - setState(101); + setState(90); match(T__4); - setState(103); + setState(92); _errHandler.sync(this); _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 82463372083200L) != 0)) { + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 41231686041600L) != 0)) { { - setState(102); + setState(91); params(); } } - setState(105); + setState(94); match(T__5); - setState(106); + setState(95); block(); } } @@ -713,25 +635,25 @@ public class DecafParser extends Parser { public final MainmethContext mainmeth() throws RecognitionException { MainmethContext _localctx = new MainmethContext(_ctx, getState()); - enterRule(_localctx, 16, RULE_mainmeth); + enterRule(_localctx, 14, RULE_mainmeth); try { enterOuterAlt(_localctx, 1); { - setState(108); + setState(97); match(PUBLIC); - setState(109); + setState(98); match(T__6); - setState(110); + setState(99); match(VOID); - setState(111); + setState(100); match(T__7); - setState(112); + setState(101); match(T__4); - setState(113); + setState(102); match(T__8); - setState(114); + setState(103); match(T__5); - setState(115); + setState(104); block(); } } @@ -779,38 +701,38 @@ public class DecafParser extends Parser { public final ConstructorContext constructor() throws RecognitionException { ConstructorContext _localctx = new ConstructorContext(_ctx, getState()); - enterRule(_localctx, 18, RULE_constructor); + enterRule(_localctx, 16, RULE_constructor); int _la; try { enterOuterAlt(_localctx, 1); { - setState(118); + setState(107); _errHandler.sync(this); _la = _input.LA(1); if (_la==PUBLIC) { { - setState(117); + setState(106); match(PUBLIC); } } - setState(120); + setState(109); id(); - setState(121); + setState(110); match(T__4); - setState(123); + setState(112); _errHandler.sync(this); _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 82463372083200L) != 0)) { + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 41231686041600L) != 0)) { { - setState(122); + setState(111); params(); } } - setState(125); + setState(114); match(T__5); - setState(126); + setState(115); block(); } } @@ -854,26 +776,26 @@ public class DecafParser extends Parser { public final ParamsContext params() throws RecognitionException { ParamsContext _localctx = new ParamsContext(_ctx, getState()); - enterRule(_localctx, 20, RULE_params); + enterRule(_localctx, 18, RULE_params); int _la; try { enterOuterAlt(_localctx, 1); { - setState(128); + setState(117); param(); - setState(133); + setState(122); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__9) { { { - setState(129); + setState(118); match(T__9); - setState(130); + setState(119); param(); } } - setState(135); + setState(124); _errHandler.sync(this); _la = _input.LA(1); } @@ -919,13 +841,13 @@ public class DecafParser extends Parser { public final ParamContext param() throws RecognitionException { ParamContext _localctx = new ParamContext(_ctx, getState()); - enterRule(_localctx, 22, RULE_param); + enterRule(_localctx, 20, RULE_param); try { enterOuterAlt(_localctx, 1); { - setState(136); + setState(125); type(); - setState(137); + setState(126); id(); } } @@ -975,40 +897,40 @@ public class DecafParser extends Parser { public final BlockContext block() throws RecognitionException { BlockContext _localctx = new BlockContext(_ctx, getState()); - enterRule(_localctx, 24, RULE_block); + enterRule(_localctx, 22, RULE_block); int _la; try { enterOuterAlt(_localctx, 1); { - setState(139); + setState(128); match(T__1); - setState(144); + setState(133); _errHandler.sync(this); _la = _input.LA(1); - while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 82463383087104L) != 0)) { + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 41231691540480L) != 0)) { { - setState(142); + setState(131); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,12,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,9,_ctx) ) { case 1: { - setState(140); + setState(129); localVar(); } break; case 2: { - setState(141); + setState(130); stmt(); } break; } } - setState(146); + setState(135); _errHandler.sync(this); _la = _input.LA(1); } - setState(147); + setState(136); match(T__2); } } @@ -1205,23 +1127,6 @@ public class DecafParser extends Parser { } } @SuppressWarnings("CheckReturnValue") - public static class ContinueContext extends StmtContext { - public ContinueContext(StmtContext ctx) { copyFrom(ctx); } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof DecafListener ) ((DecafListener)listener).enterContinue(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof DecafListener ) ((DecafListener)listener).exitContinue(this); - } - @Override - public T accept(ParseTreeVisitor visitor) { - if ( visitor instanceof DecafVisitor ) return ((DecafVisitor)visitor).visitContinue(this); - else return visitor.visitChildren(this); - } - } - @SuppressWarnings("CheckReturnValue") public static class IfContext extends StmtContext { public ExprContext expr() { return getRuleContext(ExprContext.class,0); @@ -1250,34 +1155,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, 24, RULE_stmt); int _la; try { - setState(197); + setState(184); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,15,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,12,_ctx) ) { case 1: _localctx = new IfContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(149); + setState(138); match(T__10); - setState(150); + setState(139); match(T__4); - setState(151); + setState(140); expr(0); - setState(152); + setState(141); match(T__5); - setState(153); + setState(142); block(); - setState(156); + setState(145); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__11) { { - setState(154); + setState(143); match(T__11); - setState(155); + setState(144); block(); } } @@ -1288,23 +1193,23 @@ public class DecafParser extends Parser { _localctx = new ForContext(_localctx); enterOuterAlt(_localctx, 2); { - setState(158); + setState(147); match(T__12); - setState(159); + setState(148); match(T__4); - setState(160); + setState(149); assign(); - setState(161); + setState(150); match(T__3); - setState(162); + setState(151); expr(0); - setState(163); + setState(152); match(T__3); - setState(164); + setState(153); assign(); - setState(165); + setState(154); match(T__5); - setState(166); + setState(155); block(); } break; @@ -1312,15 +1217,15 @@ public class DecafParser extends Parser { _localctx = new WhileContext(_localctx); enterOuterAlt(_localctx, 3); { - setState(168); + setState(157); match(T__13); - setState(169); + setState(158); match(T__4); - setState(170); + setState(159); expr(0); - setState(171); + setState(160); match(T__5); - setState(172); + setState(161); block(); } break; @@ -1328,17 +1233,17 @@ public class DecafParser extends Parser { _localctx = new DoWhileContext(_localctx); enterOuterAlt(_localctx, 4); { - setState(174); + setState(163); match(T__14); - setState(175); + setState(164); block(); - setState(176); + setState(165); match(T__13); - setState(177); + setState(166); match(T__4); - setState(178); + setState(167); expr(0); - setState(179); + setState(168); match(T__5); } break; @@ -1346,11 +1251,11 @@ public class DecafParser extends Parser { _localctx = new ReturnContext(_localctx); enterOuterAlt(_localctx, 5); { - setState(181); + setState(170); match(T__15); - setState(182); + setState(171); expr(0); - setState(183); + setState(172); match(T__3); } break; @@ -1358,9 +1263,9 @@ public class DecafParser extends Parser { _localctx = new ReturnVoidContext(_localctx); enterOuterAlt(_localctx, 6); { - setState(185); + setState(174); match(T__15); - setState(186); + setState(175); match(T__3); } break; @@ -1368,39 +1273,29 @@ public class DecafParser extends Parser { _localctx = new BreakContext(_localctx); enterOuterAlt(_localctx, 7); { - setState(187); + setState(176); match(T__16); - setState(188); + setState(177); match(T__3); } break; case 8: - _localctx = new ContinueContext(_localctx); + _localctx = new AssignmentContext(_localctx); enterOuterAlt(_localctx, 8); { - setState(189); - match(T__17); - setState(190); + setState(178); + assign(); + setState(179); match(T__3); } break; case 9: - _localctx = new AssignmentContext(_localctx); + _localctx = new StatementExpressionstmtContext(_localctx); enterOuterAlt(_localctx, 9); { - setState(191); - assign(); - setState(192); - match(T__3); - } - break; - case 10: - _localctx = new StatementExpressionstmtContext(_localctx); - enterOuterAlt(_localctx, 10); - { - setState(194); + setState(181); stmtexpr(); - setState(195); + setState(182); match(T__3); } break; @@ -1476,10 +1371,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, 26, RULE_stmtexpr); int _la; try { - setState(208); + setState(195); _errHandler.sync(this); switch (_input.LA(1)) { case THIS: @@ -1487,7 +1382,7 @@ public class DecafParser extends Parser { _localctx = new MethodCallContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(199); + setState(186); methCall(); } break; @@ -1495,23 +1390,23 @@ public class DecafParser extends Parser { _localctx = new NewContext(_localctx); enterOuterAlt(_localctx, 2); { - setState(200); + setState(187); match(NEW); - setState(201); + setState(188); type(); - setState(202); + setState(189); match(T__4); - setState(204); + setState(191); _errHandler.sync(this); _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 264432577937440L) != 0)) { + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 132216288968736L) != 0)) { { - setState(203); + setState(190); args(); } } - setState(206); + setState(193); match(T__5); } break; @@ -1699,24 +1594,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 = 28; + enterRecursionRule(_localctx, 28, RULE_expr, _p); try { int _alt; enterOuterAlt(_localctx, 1); { - setState(222); + setState(209); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,18,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,15,_ctx) ) { case 1: { _localctx = new UnaryOperationContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(211); + setState(198); unaryOp(); - setState(212); + setState(199); expr(6); } break; @@ -1725,7 +1620,7 @@ public class DecafParser extends Parser { _localctx = new ConstantContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(214); + setState(201); literal(); } break; @@ -1734,11 +1629,11 @@ public class DecafParser extends Parser { _localctx = new ExpressionContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(215); + setState(202); match(T__4); - setState(216); + setState(203); expr(0); - setState(217); + setState(204); match(T__5); } break; @@ -1747,7 +1642,7 @@ public class DecafParser extends Parser { _localctx = new IdentifierContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(219); + setState(206); fieldId(); } break; @@ -1756,7 +1651,7 @@ public class DecafParser extends Parser { _localctx = new StatementExpressionexprContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(220); + setState(207); stmtexpr(); } break; @@ -1765,15 +1660,15 @@ public class DecafParser extends Parser { _localctx = new NullContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(221); + setState(208); match(NULL); } break; } _ctx.stop = _input.LT(-1); - setState(230); + setState(217); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,19,_ctx); + _alt = getInterpreter().adaptivePredict(_input,16,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { if ( _parseListeners!=null ) triggerExitRuleEvent(); @@ -1782,18 +1677,18 @@ public class DecafParser extends Parser { { _localctx = new BinaryOperationContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(224); + setState(211); if (!(precpred(_ctx, 7))) throw new FailedPredicateException(this, "precpred(_ctx, 7)"); - setState(225); + setState(212); binaryOp(); - setState(226); + setState(213); expr(8); } } } - setState(232); + setState(219); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,19,_ctx); + _alt = getInterpreter().adaptivePredict(_input,16,_ctx); } } } @@ -1842,14 +1737,14 @@ public class DecafParser extends Parser { public final BinaryOpContext binaryOp() throws RecognitionException { BinaryOpContext _localctx = new BinaryOpContext(_ctx, getState()); - enterRule(_localctx, 32, RULE_binaryOp); + enterRule(_localctx, 30, RULE_binaryOp); int _la; try { enterOuterAlt(_localctx, 1); { - setState(233); + setState(220); _la = _input.LA(1); - if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 34342961152L) != 0)) ) { + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 17171480576L) != 0)) ) { _errHandler.recoverInline(this); } else { @@ -1895,12 +1790,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, 32, RULE_unaryOp); int _la; try { enterOuterAlt(_localctx, 1); { - setState(235); + setState(222); _la = _input.LA(1); if ( !(_la==SUB || _la==NOT) ) { _errHandler.recoverInline(this); @@ -1956,43 +1851,43 @@ public class DecafParser extends Parser { public final FieldIdContext fieldId() throws RecognitionException { FieldIdContext _localctx = new FieldIdContext(_ctx, getState()); - enterRule(_localctx, 36, RULE_fieldId); + enterRule(_localctx, 34, RULE_fieldId); int _la; try { int _alt; enterOuterAlt(_localctx, 1); { - setState(239); + setState(226); _errHandler.sync(this); _la = _input.LA(1); if (_la==THIS) { { - setState(237); + setState(224); match(THIS); - setState(238); - match(T__18); + setState(225); + match(T__17); } } - setState(246); + setState(233); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,21,_ctx); + _alt = getInterpreter().adaptivePredict(_input,18,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(241); + setState(228); recipient(); - setState(242); - match(T__18); + setState(229); + match(T__17); } } } - setState(248); + setState(235); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,21,_ctx); + _alt = getInterpreter().adaptivePredict(_input,18,_ctx); } - setState(249); + setState(236); id(); } } @@ -2039,15 +1934,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, 36, RULE_assign); try { enterOuterAlt(_localctx, 1); { - setState(251); + setState(238); id(); - setState(252); + setState(239); assignSign(); - setState(253); + setState(240); expr(0); } } @@ -2095,43 +1990,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, 38, RULE_methCall); int _la; try { int _alt; enterOuterAlt(_localctx, 1); { - setState(257); + setState(244); _errHandler.sync(this); _la = _input.LA(1); if (_la==THIS) { { - setState(255); + setState(242); match(THIS); - setState(256); - match(T__18); + setState(243); + match(T__17); } } - setState(264); + setState(251); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,23,_ctx); + _alt = getInterpreter().adaptivePredict(_input,20,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(259); + setState(246); recipient(); - setState(260); - match(T__18); + setState(247); + match(T__17); } } } - setState(266); + setState(253); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,23,_ctx); + _alt = getInterpreter().adaptivePredict(_input,20,_ctx); } - setState(267); + setState(254); methName(); } } @@ -2175,22 +2070,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, 40, RULE_recipient); try { - setState(271); + setState(258); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,24,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,21,_ctx) ) { case 1: enterOuterAlt(_localctx, 1); { - setState(269); + setState(256); methName(); } break; case 2: enterOuterAlt(_localctx, 2); { - setState(270); + setState(257); id(); } break; @@ -2236,26 +2131,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, 42, RULE_methName); int _la; try { enterOuterAlt(_localctx, 1); { - setState(273); + setState(260); id(); - setState(274); + setState(261); match(T__4); - setState(276); + setState(263); _errHandler.sync(this); _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 264432577937440L) != 0)) { + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 132216288968736L) != 0)) { { - setState(275); + setState(262); args(); } } - setState(278); + setState(265); match(T__5); } } @@ -2299,26 +2194,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, 44, RULE_args); int _la; try { enterOuterAlt(_localctx, 1); { - setState(280); + setState(267); expr(0); - setState(285); + setState(272); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__9) { { { - setState(281); + setState(268); match(T__9); - setState(282); + setState(269); expr(0); } } - setState(287); + setState(274); _errHandler.sync(this); _la = _input.LA(1); } @@ -2361,14 +2256,14 @@ public class DecafParser extends Parser { public final LiteralContext literal() throws RecognitionException { LiteralContext _localctx = new LiteralContext(_ctx, getState()); - enterRule(_localctx, 48, RULE_literal); + enterRule(_localctx, 46, RULE_literal); int _la; try { enterOuterAlt(_localctx, 1); { - setState(288); + setState(275); _la = _input.LA(1); - if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 193514046488576L) != 0)) ) { + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 96757023244288L) != 0)) ) { _errHandler.recoverInline(this); } else { @@ -2413,11 +2308,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, 48, RULE_id); try { enterOuterAlt(_localctx, 1); { - setState(290); + setState(277); match(IDENTIFIER); } } @@ -2434,7 +2329,7 @@ public class DecafParser extends Parser { public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) { switch (ruleIndex) { - case 15: + case 14: return expr_sempred((ExprContext)_localctx, predIndex); } return true; @@ -2448,7 +2343,7 @@ public class DecafParser extends Parser { } public static final String _serializedATN = - "\u0004\u00010\u0125\u0002\u0000\u0007\u0000\u0002\u0001\u0007\u0001\u0002"+ + "\u0004\u0001/\u0118\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"+ @@ -2456,182 +2351,173 @@ 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\u0004\u00006\b\u0000\u000b\u0000"+ - "\f\u00007\u0001\u0001\u0003\u0001;\b\u0001\u0001\u0001\u0001\u0001\u0001"+ - "\u0001\u0001\u0001\u0003\u0001A\b\u0001\u0001\u0001\u0001\u0001\u0001"+ - "\u0001\u0005\u0001F\b\u0001\n\u0001\f\u0001I\t\u0001\u0001\u0001\u0001"+ - "\u0001\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0003\u0001"+ - "\u0003\u0001\u0003\u0001\u0003\u0001\u0004\u0001\u0004\u0001\u0005\u0001"+ - "\u0005\u0003\u0005Y\b\u0005\u0001\u0006\u0001\u0006\u0001\u0006\u0001"+ - "\u0006\u0003\u0006_\b\u0006\u0001\u0007\u0003\u0007b\b\u0007\u0001\u0007"+ - "\u0001\u0007\u0001\u0007\u0001\u0007\u0003\u0007h\b\u0007\u0001\u0007"+ - "\u0001\u0007\u0001\u0007\u0001\b\u0001\b\u0001\b\u0001\b\u0001\b\u0001"+ - "\b\u0001\b\u0001\b\u0001\b\u0001\t\u0003\tw\b\t\u0001\t\u0001\t\u0001"+ - "\t\u0003\t|\b\t\u0001\t\u0001\t\u0001\t\u0001\n\u0001\n\u0001\n\u0005"+ - "\n\u0084\b\n\n\n\f\n\u0087\t\n\u0001\u000b\u0001\u000b\u0001\u000b\u0001"+ - "\f\u0001\f\u0001\f\u0005\f\u008f\b\f\n\f\f\f\u0092\t\f\u0001\f\u0001\f"+ - "\u0001\r\u0001\r\u0001\r\u0001\r\u0001\r\u0001\r\u0001\r\u0003\r\u009d"+ - "\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\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\u00c6\b\r\u0001\u000e\u0001\u000e\u0001"+ - "\u000e\u0001\u000e\u0001\u000e\u0003\u000e\u00cd\b\u000e\u0001\u000e\u0001"+ - "\u000e\u0003\u000e\u00d1\b\u000e\u0001\u000f\u0001\u000f\u0001\u000f\u0001"+ - "\u000f\u0001\u000f\u0001\u000f\u0001\u000f\u0001\u000f\u0001\u000f\u0001"+ - "\u000f\u0001\u000f\u0001\u000f\u0003\u000f\u00df\b\u000f\u0001\u000f\u0001"+ - "\u000f\u0001\u000f\u0001\u000f\u0005\u000f\u00e5\b\u000f\n\u000f\f\u000f"+ - "\u00e8\t\u000f\u0001\u0010\u0001\u0010\u0001\u0011\u0001\u0011\u0001\u0012"+ - "\u0001\u0012\u0003\u0012\u00f0\b\u0012\u0001\u0012\u0001\u0012\u0001\u0012"+ - "\u0005\u0012\u00f5\b\u0012\n\u0012\f\u0012\u00f8\t\u0012\u0001\u0012\u0001"+ - "\u0012\u0001\u0013\u0001\u0013\u0001\u0013\u0001\u0013\u0001\u0014\u0001"+ - "\u0014\u0003\u0014\u0102\b\u0014\u0001\u0014\u0001\u0014\u0001\u0014\u0005"+ - "\u0014\u0107\b\u0014\n\u0014\f\u0014\u010a\t\u0014\u0001\u0014\u0001\u0014"+ - "\u0001\u0015\u0001\u0015\u0003\u0015\u0110\b\u0015\u0001\u0016\u0001\u0016"+ - "\u0001\u0016\u0003\u0016\u0115\b\u0016\u0001\u0016\u0001\u0016\u0001\u0017"+ - "\u0001\u0017\u0001\u0017\u0005\u0017\u011c\b\u0017\n\u0017\f\u0017\u011f"+ - "\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\u0018\"\u0002\u0000\u0018\u0018\'\'\u0002\u0000,-//\u0134\u0000"+ - "5\u0001\u0000\u0000\u0000\u0002:\u0001\u0000\u0000\u0000\u0004L\u0001"+ - "\u0000\u0000\u0000\u0006P\u0001\u0000\u0000\u0000\bT\u0001\u0000\u0000"+ - "\u0000\nX\u0001\u0000\u0000\u0000\f^\u0001\u0000\u0000\u0000\u000ea\u0001"+ - "\u0000\u0000\u0000\u0010l\u0001\u0000\u0000\u0000\u0012v\u0001\u0000\u0000"+ - "\u0000\u0014\u0080\u0001\u0000\u0000\u0000\u0016\u0088\u0001\u0000\u0000"+ - "\u0000\u0018\u008b\u0001\u0000\u0000\u0000\u001a\u00c5\u0001\u0000\u0000"+ - "\u0000\u001c\u00d0\u0001\u0000\u0000\u0000\u001e\u00de\u0001\u0000\u0000"+ - "\u0000 \u00e9\u0001\u0000\u0000\u0000\"\u00eb\u0001\u0000\u0000\u0000"+ - "$\u00ef\u0001\u0000\u0000\u0000&\u00fb\u0001\u0000\u0000\u0000(\u0101"+ - "\u0001\u0000\u0000\u0000*\u010f\u0001\u0000\u0000\u0000,\u0111\u0001\u0000"+ - "\u0000\u0000.\u0118\u0001\u0000\u0000\u00000\u0120\u0001\u0000\u0000\u0000"+ - "2\u0122\u0001\u0000\u0000\u000046\u0003\u0002\u0001\u000054\u0001\u0000"+ - "\u0000\u000067\u0001\u0000\u0000\u000075\u0001\u0000\u0000\u000078\u0001"+ - "\u0000\u0000\u00008\u0001\u0001\u0000\u0000\u00009;\u0005\u0014\u0000"+ - "\u0000:9\u0001\u0000\u0000\u0000:;\u0001\u0000\u0000\u0000;<\u0001\u0000"+ - "\u0000\u0000<=\u0005\u0001\u0000\u0000=>\u00032\u0019\u0000>@\u0005\u0002"+ - "\u0000\u0000?A\u0003\u0010\b\u0000@?\u0001\u0000\u0000\u0000@A\u0001\u0000"+ - "\u0000\u0000AG\u0001\u0000\u0000\u0000BF\u0003\u0004\u0002\u0000CF\u0003"+ - "\u000e\u0007\u0000DF\u0003\u0012\t\u0000EB\u0001\u0000\u0000\u0000EC\u0001"+ - "\u0000\u0000\u0000ED\u0001\u0000\u0000\u0000FI\u0001\u0000\u0000\u0000"+ - "GE\u0001\u0000\u0000\u0000GH\u0001\u0000\u0000\u0000HJ\u0001\u0000\u0000"+ - "\u0000IG\u0001\u0000\u0000\u0000JK\u0005\u0003\u0000\u0000K\u0003\u0001"+ - "\u0000\u0000\u0000LM\u0003\f\u0006\u0000MN\u00032\u0019\u0000NO\u0005"+ - "\u0004\u0000\u0000O\u0005\u0001\u0000\u0000\u0000PQ\u0003\f\u0006\u0000"+ - "QR\u00032\u0019\u0000RS\u0005\u0004\u0000\u0000S\u0007\u0001\u0000\u0000"+ - "\u0000TU\u0007\u0000\u0000\u0000U\t\u0001\u0000\u0000\u0000VY\u0003\f"+ - "\u0006\u0000WY\u0005*\u0000\u0000XV\u0001\u0000\u0000\u0000XW\u0001\u0000"+ - "\u0000\u0000Y\u000b\u0001\u0000\u0000\u0000Z_\u0005(\u0000\u0000[_\u0005"+ - ")\u0000\u0000\\_\u0005+\u0000\u0000]_\u00032\u0019\u0000^Z\u0001\u0000"+ - "\u0000\u0000^[\u0001\u0000\u0000\u0000^\\\u0001\u0000\u0000\u0000^]\u0001"+ - "\u0000\u0000\u0000_\r\u0001\u0000\u0000\u0000`b\u0005\u0014\u0000\u0000"+ - "a`\u0001\u0000\u0000\u0000ab\u0001\u0000\u0000\u0000bc\u0001\u0000\u0000"+ - "\u0000cd\u0003\n\u0005\u0000de\u00032\u0019\u0000eg\u0005\u0005\u0000"+ - "\u0000fh\u0003\u0014\n\u0000gf\u0001\u0000\u0000\u0000gh\u0001\u0000\u0000"+ - "\u0000hi\u0001\u0000\u0000\u0000ij\u0005\u0006\u0000\u0000jk\u0003\u0018"+ - "\f\u0000k\u000f\u0001\u0000\u0000\u0000lm\u0005\u0014\u0000\u0000mn\u0005"+ - "\u0007\u0000\u0000no\u0005*\u0000\u0000op\u0005\b\u0000\u0000pq\u0005"+ - "\u0005\u0000\u0000qr\u0005\t\u0000\u0000rs\u0005\u0006\u0000\u0000st\u0003"+ - "\u0018\f\u0000t\u0011\u0001\u0000\u0000\u0000uw\u0005\u0014\u0000\u0000"+ - "vu\u0001\u0000\u0000\u0000vw\u0001\u0000\u0000\u0000wx\u0001\u0000\u0000"+ - "\u0000xy\u00032\u0019\u0000y{\u0005\u0005\u0000\u0000z|\u0003\u0014\n"+ - "\u0000{z\u0001\u0000\u0000\u0000{|\u0001\u0000\u0000\u0000|}\u0001\u0000"+ - "\u0000\u0000}~\u0005\u0006\u0000\u0000~\u007f\u0003\u0018\f\u0000\u007f"+ - "\u0013\u0001\u0000\u0000\u0000\u0080\u0085\u0003\u0016\u000b\u0000\u0081"+ - "\u0082\u0005\n\u0000\u0000\u0082\u0084\u0003\u0016\u000b\u0000\u0083\u0081"+ - "\u0001\u0000\u0000\u0000\u0084\u0087\u0001\u0000\u0000\u0000\u0085\u0083"+ - "\u0001\u0000\u0000\u0000\u0085\u0086\u0001\u0000\u0000\u0000\u0086\u0015"+ - "\u0001\u0000\u0000\u0000\u0087\u0085\u0001\u0000\u0000\u0000\u0088\u0089"+ - "\u0003\f\u0006\u0000\u0089\u008a\u00032\u0019\u0000\u008a\u0017\u0001"+ - "\u0000\u0000\u0000\u008b\u0090\u0005\u0002\u0000\u0000\u008c\u008f\u0003"+ - "\u0006\u0003\u0000\u008d\u008f\u0003\u001a\r\u0000\u008e\u008c\u0001\u0000"+ - "\u0000\u0000\u008e\u008d\u0001\u0000\u0000\u0000\u008f\u0092\u0001\u0000"+ - "\u0000\u0000\u0090\u008e\u0001\u0000\u0000\u0000\u0090\u0091\u0001\u0000"+ - "\u0000\u0000\u0091\u0093\u0001\u0000\u0000\u0000\u0092\u0090\u0001\u0000"+ - "\u0000\u0000\u0093\u0094\u0005\u0003\u0000\u0000\u0094\u0019\u0001\u0000"+ - "\u0000\u0000\u0095\u0096\u0005\u000b\u0000\u0000\u0096\u0097\u0005\u0005"+ - "\u0000\u0000\u0097\u0098\u0003\u001e\u000f\u0000\u0098\u0099\u0005\u0006"+ - "\u0000\u0000\u0099\u009c\u0003\u0018\f\u0000\u009a\u009b\u0005\f\u0000"+ - "\u0000\u009b\u009d\u0003\u0018\f\u0000\u009c\u009a\u0001\u0000\u0000\u0000"+ - "\u009c\u009d\u0001\u0000\u0000\u0000\u009d\u00c6\u0001\u0000\u0000\u0000"+ - "\u009e\u009f\u0005\r\u0000\u0000\u009f\u00a0\u0005\u0005\u0000\u0000\u00a0"+ - "\u00a1\u0003&\u0013\u0000\u00a1\u00a2\u0005\u0004\u0000\u0000\u00a2\u00a3"+ - "\u0003\u001e\u000f\u0000\u00a3\u00a4\u0005\u0004\u0000\u0000\u00a4\u00a5"+ - "\u0003&\u0013\u0000\u00a5\u00a6\u0005\u0006\u0000\u0000\u00a6\u00a7\u0003"+ - "\u0018\f\u0000\u00a7\u00c6\u0001\u0000\u0000\u0000\u00a8\u00a9\u0005\u000e"+ - "\u0000\u0000\u00a9\u00aa\u0005\u0005\u0000\u0000\u00aa\u00ab\u0003\u001e"+ - "\u000f\u0000\u00ab\u00ac\u0005\u0006\u0000\u0000\u00ac\u00ad\u0003\u0018"+ - "\f\u0000\u00ad\u00c6\u0001\u0000\u0000\u0000\u00ae\u00af\u0005\u000f\u0000"+ - "\u0000\u00af\u00b0\u0003\u0018\f\u0000\u00b0\u00b1\u0005\u000e\u0000\u0000"+ - "\u00b1\u00b2\u0005\u0005\u0000\u0000\u00b2\u00b3\u0003\u001e\u000f\u0000"+ - "\u00b3\u00b4\u0005\u0006\u0000\u0000\u00b4\u00c6\u0001\u0000\u0000\u0000"+ - "\u00b5\u00b6\u0005\u0010\u0000\u0000\u00b6\u00b7\u0003\u001e\u000f\u0000"+ - "\u00b7\u00b8\u0005\u0004\u0000\u0000\u00b8\u00c6\u0001\u0000\u0000\u0000"+ - "\u00b9\u00ba\u0005\u0010\u0000\u0000\u00ba\u00c6\u0005\u0004\u0000\u0000"+ - "\u00bb\u00bc\u0005\u0011\u0000\u0000\u00bc\u00c6\u0005\u0004\u0000\u0000"+ - "\u00bd\u00be\u0005\u0012\u0000\u0000\u00be\u00c6\u0005\u0004\u0000\u0000"+ - "\u00bf\u00c0\u0003&\u0013\u0000\u00c0\u00c1\u0005\u0004\u0000\u0000\u00c1"+ - "\u00c6\u0001\u0000\u0000\u0000\u00c2\u00c3\u0003\u001c\u000e\u0000\u00c3"+ - "\u00c4\u0005\u0004\u0000\u0000\u00c4\u00c6\u0001\u0000\u0000\u0000\u00c5"+ - "\u0095\u0001\u0000\u0000\u0000\u00c5\u009e\u0001\u0000\u0000\u0000\u00c5"+ - "\u00a8\u0001\u0000\u0000\u0000\u00c5\u00ae\u0001\u0000\u0000\u0000\u00c5"+ - "\u00b5\u0001\u0000\u0000\u0000\u00c5\u00b9\u0001\u0000\u0000\u0000\u00c5"+ - "\u00bb\u0001\u0000\u0000\u0000\u00c5\u00bd\u0001\u0000\u0000\u0000\u00c5"+ - "\u00bf\u0001\u0000\u0000\u0000\u00c5\u00c2\u0001\u0000\u0000\u0000\u00c6"+ - "\u001b\u0001\u0000\u0000\u0000\u00c7\u00d1\u0003(\u0014\u0000\u00c8\u00c9"+ - "\u0005\u0015\u0000\u0000\u00c9\u00ca\u0003\f\u0006\u0000\u00ca\u00cc\u0005"+ - "\u0005\u0000\u0000\u00cb\u00cd\u0003.\u0017\u0000\u00cc\u00cb\u0001\u0000"+ - "\u0000\u0000\u00cc\u00cd\u0001\u0000\u0000\u0000\u00cd\u00ce\u0001\u0000"+ - "\u0000\u0000\u00ce\u00cf\u0005\u0006\u0000\u0000\u00cf\u00d1\u0001\u0000"+ - "\u0000\u0000\u00d0\u00c7\u0001\u0000\u0000\u0000\u00d0\u00c8\u0001\u0000"+ - "\u0000\u0000\u00d1\u001d\u0001\u0000\u0000\u0000\u00d2\u00d3\u0006\u000f"+ - "\uffff\uffff\u0000\u00d3\u00d4\u0003\"\u0011\u0000\u00d4\u00d5\u0003\u001e"+ - "\u000f\u0006\u00d5\u00df\u0001\u0000\u0000\u0000\u00d6\u00df\u00030\u0018"+ - "\u0000\u00d7\u00d8\u0005\u0005\u0000\u0000\u00d8\u00d9\u0003\u001e\u000f"+ - "\u0000\u00d9\u00da\u0005\u0006\u0000\u0000\u00da\u00df\u0001\u0000\u0000"+ - "\u0000\u00db\u00df\u0003$\u0012\u0000\u00dc\u00df\u0003\u001c\u000e\u0000"+ - "\u00dd\u00df\u0005\u0016\u0000\u0000\u00de\u00d2\u0001\u0000\u0000\u0000"+ - "\u00de\u00d6\u0001\u0000\u0000\u0000\u00de\u00d7\u0001\u0000\u0000\u0000"+ - "\u00de\u00db\u0001\u0000\u0000\u0000\u00de\u00dc\u0001\u0000\u0000\u0000"+ - "\u00de\u00dd\u0001\u0000\u0000\u0000\u00df\u00e6\u0001\u0000\u0000\u0000"+ - "\u00e0\u00e1\n\u0007\u0000\u0000\u00e1\u00e2\u0003 \u0010\u0000\u00e2"+ - "\u00e3\u0003\u001e\u000f\b\u00e3\u00e5\u0001\u0000\u0000\u0000\u00e4\u00e0"+ - "\u0001\u0000\u0000\u0000\u00e5\u00e8\u0001\u0000\u0000\u0000\u00e6\u00e4"+ - "\u0001\u0000\u0000\u0000\u00e6\u00e7\u0001\u0000\u0000\u0000\u00e7\u001f"+ - "\u0001\u0000\u0000\u0000\u00e8\u00e6\u0001\u0000\u0000\u0000\u00e9\u00ea"+ - "\u0007\u0001\u0000\u0000\u00ea!\u0001\u0000\u0000\u0000\u00eb\u00ec\u0007"+ - "\u0002\u0000\u0000\u00ec#\u0001\u0000\u0000\u0000\u00ed\u00ee\u0005\u0017"+ - "\u0000\u0000\u00ee\u00f0\u0005\u0013\u0000\u0000\u00ef\u00ed\u0001\u0000"+ - "\u0000\u0000\u00ef\u00f0\u0001\u0000\u0000\u0000\u00f0\u00f6\u0001\u0000"+ - "\u0000\u0000\u00f1\u00f2\u0003*\u0015\u0000\u00f2\u00f3\u0005\u0013\u0000"+ - "\u0000\u00f3\u00f5\u0001\u0000\u0000\u0000\u00f4\u00f1\u0001\u0000\u0000"+ - "\u0000\u00f5\u00f8\u0001\u0000\u0000\u0000\u00f6\u00f4\u0001\u0000\u0000"+ - "\u0000\u00f6\u00f7\u0001\u0000\u0000\u0000\u00f7\u00f9\u0001\u0000\u0000"+ - "\u0000\u00f8\u00f6\u0001\u0000\u0000\u0000\u00f9\u00fa\u00032\u0019\u0000"+ - "\u00fa%\u0001\u0000\u0000\u0000\u00fb\u00fc\u00032\u0019\u0000\u00fc\u00fd"+ - "\u0003\b\u0004\u0000\u00fd\u00fe\u0003\u001e\u000f\u0000\u00fe\'\u0001"+ - "\u0000\u0000\u0000\u00ff\u0100\u0005\u0017\u0000\u0000\u0100\u0102\u0005"+ - "\u0013\u0000\u0000\u0101\u00ff\u0001\u0000\u0000\u0000\u0101\u0102\u0001"+ - "\u0000\u0000\u0000\u0102\u0108\u0001\u0000\u0000\u0000\u0103\u0104\u0003"+ - "*\u0015\u0000\u0104\u0105\u0005\u0013\u0000\u0000\u0105\u0107\u0001\u0000"+ - "\u0000\u0000\u0106\u0103\u0001\u0000\u0000\u0000\u0107\u010a\u0001\u0000"+ - "\u0000\u0000\u0108\u0106\u0001\u0000\u0000\u0000\u0108\u0109\u0001\u0000"+ - "\u0000\u0000\u0109\u010b\u0001\u0000\u0000\u0000\u010a\u0108\u0001\u0000"+ - "\u0000\u0000\u010b\u010c\u0003,\u0016\u0000\u010c)\u0001\u0000\u0000\u0000"+ - "\u010d\u0110\u0003,\u0016\u0000\u010e\u0110\u00032\u0019\u0000\u010f\u010d"+ - "\u0001\u0000\u0000\u0000\u010f\u010e\u0001\u0000\u0000\u0000\u0110+\u0001"+ - "\u0000\u0000\u0000\u0111\u0112\u00032\u0019\u0000\u0112\u0114\u0005\u0005"+ - "\u0000\u0000\u0113\u0115\u0003.\u0017\u0000\u0114\u0113\u0001\u0000\u0000"+ - "\u0000\u0114\u0115\u0001\u0000\u0000\u0000\u0115\u0116\u0001\u0000\u0000"+ - "\u0000\u0116\u0117\u0005\u0006\u0000\u0000\u0117-\u0001\u0000\u0000\u0000"+ - "\u0118\u011d\u0003\u001e\u000f\u0000\u0119\u011a\u0005\n\u0000\u0000\u011a"+ - "\u011c\u0003\u001e\u000f\u0000\u011b\u0119\u0001\u0000\u0000\u0000\u011c"+ - "\u011f\u0001\u0000\u0000\u0000\u011d\u011b\u0001\u0000\u0000\u0000\u011d"+ - "\u011e\u0001\u0000\u0000\u0000\u011e/\u0001\u0000\u0000\u0000\u011f\u011d"+ - "\u0001\u0000\u0000\u0000\u0120\u0121\u0007\u0003\u0000\u0000\u01211\u0001"+ - "\u0000\u0000\u0000\u0122\u0123\u0005.\u0000\u0000\u01233\u0001\u0000\u0000"+ - "\u0000\u001b7:@EGX^agv{\u0085\u008e\u0090\u009c\u00c5\u00cc\u00d0\u00de"+ - "\u00e6\u00ef\u00f6\u0101\u0108\u010f\u0114\u011d"; + "\u0001\u0000\u0001\u0000\u0001\u0000\u0001\u0000\u0001\u0000\u0003\u0000"+ + "8\b\u0000\u0001\u0000\u0001\u0000\u0001\u0000\u0005\u0000=\b\u0000\n\u0000"+ + "\f\u0000@\t\u0000\u0001\u0000\u0001\u0000\u0001\u0001\u0001\u0001\u0001"+ + "\u0001\u0001\u0001\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0001"+ + "\u0003\u0001\u0003\u0001\u0004\u0001\u0004\u0003\u0004P\b\u0004\u0001"+ + "\u0005\u0001\u0005\u0001\u0005\u0001\u0005\u0003\u0005V\b\u0005\u0001"+ + "\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0003\u0006]\b"+ + "\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0007\u0001\u0007\u0001"+ + "\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001"+ + "\u0007\u0001\b\u0003\bl\b\b\u0001\b\u0001\b\u0001\b\u0003\bq\b\b\u0001"+ + "\b\u0001\b\u0001\b\u0001\t\u0001\t\u0001\t\u0005\ty\b\t\n\t\f\t|\t\t\u0001"+ + "\n\u0001\n\u0001\n\u0001\u000b\u0001\u000b\u0001\u000b\u0005\u000b\u0084"+ + "\b\u000b\n\u000b\f\u000b\u0087\t\u000b\u0001\u000b\u0001\u000b\u0001\f"+ + "\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f\u0003\f\u0092\b\f\u0001"+ + "\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001"+ + "\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001"+ + "\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001"+ + "\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001"+ + "\f\u0003\f\u00b9\b\f\u0001\r\u0001\r\u0001\r\u0001\r\u0001\r\u0003\r\u00c0"+ + "\b\r\u0001\r\u0001\r\u0003\r\u00c4\b\r\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\u00d2\b\u000e\u0001\u000e"+ + "\u0001\u000e\u0001\u000e\u0001\u000e\u0005\u000e\u00d8\b\u000e\n\u000e"+ + "\f\u000e\u00db\t\u000e\u0001\u000f\u0001\u000f\u0001\u0010\u0001\u0010"+ + "\u0001\u0011\u0001\u0011\u0003\u0011\u00e3\b\u0011\u0001\u0011\u0001\u0011"+ + "\u0001\u0011\u0005\u0011\u00e8\b\u0011\n\u0011\f\u0011\u00eb\t\u0011\u0001"+ + "\u0011\u0001\u0011\u0001\u0012\u0001\u0012\u0001\u0012\u0001\u0012\u0001"+ + "\u0013\u0001\u0013\u0003\u0013\u00f5\b\u0013\u0001\u0013\u0001\u0013\u0001"+ + "\u0013\u0005\u0013\u00fa\b\u0013\n\u0013\f\u0013\u00fd\t\u0013\u0001\u0013"+ + "\u0001\u0013\u0001\u0014\u0001\u0014\u0003\u0014\u0103\b\u0014\u0001\u0015"+ + "\u0001\u0015\u0001\u0015\u0003\u0015\u0108\b\u0015\u0001\u0015\u0001\u0015"+ + "\u0001\u0016\u0001\u0016\u0001\u0016\u0005\u0016\u010f\b\u0016\n\u0016"+ + "\f\u0016\u0112\t\u0016\u0001\u0017\u0001\u0017\u0001\u0018\u0001\u0018"+ + "\u0001\u0018\u0000\u0001\u001c\u0019\u0000\u0002\u0004\u0006\b\n\f\u000e"+ + "\u0010\u0012\u0014\u0016\u0018\u001a\u001c\u001e \"$&(*,.0\u0000\u0004"+ + "\u0001\u0000\"%\u0001\u0000\u0017!\u0002\u0000\u0017\u0017&&\u0002\u0000"+ + "+,..\u0124\u00002\u0001\u0000\u0000\u0000\u0002C\u0001\u0000\u0000\u0000"+ + "\u0004G\u0001\u0000\u0000\u0000\u0006K\u0001\u0000\u0000\u0000\bO\u0001"+ + "\u0000\u0000\u0000\nU\u0001\u0000\u0000\u0000\fW\u0001\u0000\u0000\u0000"+ + "\u000ea\u0001\u0000\u0000\u0000\u0010k\u0001\u0000\u0000\u0000\u0012u"+ + "\u0001\u0000\u0000\u0000\u0014}\u0001\u0000\u0000\u0000\u0016\u0080\u0001"+ + "\u0000\u0000\u0000\u0018\u00b8\u0001\u0000\u0000\u0000\u001a\u00c3\u0001"+ + "\u0000\u0000\u0000\u001c\u00d1\u0001\u0000\u0000\u0000\u001e\u00dc\u0001"+ + "\u0000\u0000\u0000 \u00de\u0001\u0000\u0000\u0000\"\u00e2\u0001\u0000"+ + "\u0000\u0000$\u00ee\u0001\u0000\u0000\u0000&\u00f4\u0001\u0000\u0000\u0000"+ + "(\u0102\u0001\u0000\u0000\u0000*\u0104\u0001\u0000\u0000\u0000,\u010b"+ + "\u0001\u0000\u0000\u0000.\u0113\u0001\u0000\u0000\u00000\u0115\u0001\u0000"+ + "\u0000\u000023\u0005\u0013\u0000\u000034\u0005\u0001\u0000\u000045\u0003"+ + "0\u0018\u000057\u0005\u0002\u0000\u000068\u0003\u000e\u0007\u000076\u0001"+ + "\u0000\u0000\u000078\u0001\u0000\u0000\u00008>\u0001\u0000\u0000\u0000"+ + "9=\u0003\u0002\u0001\u0000:=\u0003\f\u0006\u0000;=\u0003\u0010\b\u0000"+ + "<9\u0001\u0000\u0000\u0000<:\u0001\u0000\u0000\u0000<;\u0001\u0000\u0000"+ + "\u0000=@\u0001\u0000\u0000\u0000><\u0001\u0000\u0000\u0000>?\u0001\u0000"+ + "\u0000\u0000?A\u0001\u0000\u0000\u0000@>\u0001\u0000\u0000\u0000AB\u0005"+ + "\u0003\u0000\u0000B\u0001\u0001\u0000\u0000\u0000CD\u0003\n\u0005\u0000"+ + "DE\u00030\u0018\u0000EF\u0005\u0004\u0000\u0000F\u0003\u0001\u0000\u0000"+ + "\u0000GH\u0003\n\u0005\u0000HI\u00030\u0018\u0000IJ\u0005\u0004\u0000"+ + "\u0000J\u0005\u0001\u0000\u0000\u0000KL\u0007\u0000\u0000\u0000L\u0007"+ + "\u0001\u0000\u0000\u0000MP\u0003\n\u0005\u0000NP\u0005)\u0000\u0000OM"+ + "\u0001\u0000\u0000\u0000ON\u0001\u0000\u0000\u0000P\t\u0001\u0000\u0000"+ + "\u0000QV\u0005\'\u0000\u0000RV\u0005(\u0000\u0000SV\u0005*\u0000\u0000"+ + "TV\u00030\u0018\u0000UQ\u0001\u0000\u0000\u0000UR\u0001\u0000\u0000\u0000"+ + "US\u0001\u0000\u0000\u0000UT\u0001\u0000\u0000\u0000V\u000b\u0001\u0000"+ + "\u0000\u0000WX\u0005\u0013\u0000\u0000XY\u0003\b\u0004\u0000YZ\u00030"+ + "\u0018\u0000Z\\\u0005\u0005\u0000\u0000[]\u0003\u0012\t\u0000\\[\u0001"+ + "\u0000\u0000\u0000\\]\u0001\u0000\u0000\u0000]^\u0001\u0000\u0000\u0000"+ + "^_\u0005\u0006\u0000\u0000_`\u0003\u0016\u000b\u0000`\r\u0001\u0000\u0000"+ + "\u0000ab\u0005\u0013\u0000\u0000bc\u0005\u0007\u0000\u0000cd\u0005)\u0000"+ + "\u0000de\u0005\b\u0000\u0000ef\u0005\u0005\u0000\u0000fg\u0005\t\u0000"+ + "\u0000gh\u0005\u0006\u0000\u0000hi\u0003\u0016\u000b\u0000i\u000f\u0001"+ + "\u0000\u0000\u0000jl\u0005\u0013\u0000\u0000kj\u0001\u0000\u0000\u0000"+ + "kl\u0001\u0000\u0000\u0000lm\u0001\u0000\u0000\u0000mn\u00030\u0018\u0000"+ + "np\u0005\u0005\u0000\u0000oq\u0003\u0012\t\u0000po\u0001\u0000\u0000\u0000"+ + "pq\u0001\u0000\u0000\u0000qr\u0001\u0000\u0000\u0000rs\u0005\u0006\u0000"+ + "\u0000st\u0003\u0016\u000b\u0000t\u0011\u0001\u0000\u0000\u0000uz\u0003"+ + "\u0014\n\u0000vw\u0005\n\u0000\u0000wy\u0003\u0014\n\u0000xv\u0001\u0000"+ + "\u0000\u0000y|\u0001\u0000\u0000\u0000zx\u0001\u0000\u0000\u0000z{\u0001"+ + "\u0000\u0000\u0000{\u0013\u0001\u0000\u0000\u0000|z\u0001\u0000\u0000"+ + "\u0000}~\u0003\n\u0005\u0000~\u007f\u00030\u0018\u0000\u007f\u0015\u0001"+ + "\u0000\u0000\u0000\u0080\u0085\u0005\u0002\u0000\u0000\u0081\u0084\u0003"+ + "\u0004\u0002\u0000\u0082\u0084\u0003\u0018\f\u0000\u0083\u0081\u0001\u0000"+ + "\u0000\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\u0088\u0001\u0000\u0000\u0000\u0087\u0085\u0001\u0000"+ + "\u0000\u0000\u0088\u0089\u0005\u0003\u0000\u0000\u0089\u0017\u0001\u0000"+ + "\u0000\u0000\u008a\u008b\u0005\u000b\u0000\u0000\u008b\u008c\u0005\u0005"+ + "\u0000\u0000\u008c\u008d\u0003\u001c\u000e\u0000\u008d\u008e\u0005\u0006"+ + "\u0000\u0000\u008e\u0091\u0003\u0016\u000b\u0000\u008f\u0090\u0005\f\u0000"+ + "\u0000\u0090\u0092\u0003\u0016\u000b\u0000\u0091\u008f\u0001\u0000\u0000"+ + "\u0000\u0091\u0092\u0001\u0000\u0000\u0000\u0092\u00b9\u0001\u0000\u0000"+ + "\u0000\u0093\u0094\u0005\r\u0000\u0000\u0094\u0095\u0005\u0005\u0000\u0000"+ + "\u0095\u0096\u0003$\u0012\u0000\u0096\u0097\u0005\u0004\u0000\u0000\u0097"+ + "\u0098\u0003\u001c\u000e\u0000\u0098\u0099\u0005\u0004\u0000\u0000\u0099"+ + "\u009a\u0003$\u0012\u0000\u009a\u009b\u0005\u0006\u0000\u0000\u009b\u009c"+ + "\u0003\u0016\u000b\u0000\u009c\u00b9\u0001\u0000\u0000\u0000\u009d\u009e"+ + "\u0005\u000e\u0000\u0000\u009e\u009f\u0005\u0005\u0000\u0000\u009f\u00a0"+ + "\u0003\u001c\u000e\u0000\u00a0\u00a1\u0005\u0006\u0000\u0000\u00a1\u00a2"+ + "\u0003\u0016\u000b\u0000\u00a2\u00b9\u0001\u0000\u0000\u0000\u00a3\u00a4"+ + "\u0005\u000f\u0000\u0000\u00a4\u00a5\u0003\u0016\u000b\u0000\u00a5\u00a6"+ + "\u0005\u000e\u0000\u0000\u00a6\u00a7\u0005\u0005\u0000\u0000\u00a7\u00a8"+ + "\u0003\u001c\u000e\u0000\u00a8\u00a9\u0005\u0006\u0000\u0000\u00a9\u00b9"+ + "\u0001\u0000\u0000\u0000\u00aa\u00ab\u0005\u0010\u0000\u0000\u00ab\u00ac"+ + "\u0003\u001c\u000e\u0000\u00ac\u00ad\u0005\u0004\u0000\u0000\u00ad\u00b9"+ + "\u0001\u0000\u0000\u0000\u00ae\u00af\u0005\u0010\u0000\u0000\u00af\u00b9"+ + "\u0005\u0004\u0000\u0000\u00b0\u00b1\u0005\u0011\u0000\u0000\u00b1\u00b9"+ + "\u0005\u0004\u0000\u0000\u00b2\u00b3\u0003$\u0012\u0000\u00b3\u00b4\u0005"+ + "\u0004\u0000\u0000\u00b4\u00b9\u0001\u0000\u0000\u0000\u00b5\u00b6\u0003"+ + "\u001a\r\u0000\u00b6\u00b7\u0005\u0004\u0000\u0000\u00b7\u00b9\u0001\u0000"+ + "\u0000\u0000\u00b8\u008a\u0001\u0000\u0000\u0000\u00b8\u0093\u0001\u0000"+ + "\u0000\u0000\u00b8\u009d\u0001\u0000\u0000\u0000\u00b8\u00a3\u0001\u0000"+ + "\u0000\u0000\u00b8\u00aa\u0001\u0000\u0000\u0000\u00b8\u00ae\u0001\u0000"+ + "\u0000\u0000\u00b8\u00b0\u0001\u0000\u0000\u0000\u00b8\u00b2\u0001\u0000"+ + "\u0000\u0000\u00b8\u00b5\u0001\u0000\u0000\u0000\u00b9\u0019\u0001\u0000"+ + "\u0000\u0000\u00ba\u00c4\u0003&\u0013\u0000\u00bb\u00bc\u0005\u0014\u0000"+ + "\u0000\u00bc\u00bd\u0003\n\u0005\u0000\u00bd\u00bf\u0005\u0005\u0000\u0000"+ + "\u00be\u00c0\u0003,\u0016\u0000\u00bf\u00be\u0001\u0000\u0000\u0000\u00bf"+ + "\u00c0\u0001\u0000\u0000\u0000\u00c0\u00c1\u0001\u0000\u0000\u0000\u00c1"+ + "\u00c2\u0005\u0006\u0000\u0000\u00c2\u00c4\u0001\u0000\u0000\u0000\u00c3"+ + "\u00ba\u0001\u0000\u0000\u0000\u00c3\u00bb\u0001\u0000\u0000\u0000\u00c4"+ + "\u001b\u0001\u0000\u0000\u0000\u00c5\u00c6\u0006\u000e\uffff\uffff\u0000"+ + "\u00c6\u00c7\u0003 \u0010\u0000\u00c7\u00c8\u0003\u001c\u000e\u0006\u00c8"+ + "\u00d2\u0001\u0000\u0000\u0000\u00c9\u00d2\u0003.\u0017\u0000\u00ca\u00cb"+ + "\u0005\u0005\u0000\u0000\u00cb\u00cc\u0003\u001c\u000e\u0000\u00cc\u00cd"+ + "\u0005\u0006\u0000\u0000\u00cd\u00d2\u0001\u0000\u0000\u0000\u00ce\u00d2"+ + "\u0003\"\u0011\u0000\u00cf\u00d2\u0003\u001a\r\u0000\u00d0\u00d2\u0005"+ + "\u0015\u0000\u0000\u00d1\u00c5\u0001\u0000\u0000\u0000\u00d1\u00c9\u0001"+ + "\u0000\u0000\u0000\u00d1\u00ca\u0001\u0000\u0000\u0000\u00d1\u00ce\u0001"+ + "\u0000\u0000\u0000\u00d1\u00cf\u0001\u0000\u0000\u0000\u00d1\u00d0\u0001"+ + "\u0000\u0000\u0000\u00d2\u00d9\u0001\u0000\u0000\u0000\u00d3\u00d4\n\u0007"+ + "\u0000\u0000\u00d4\u00d5\u0003\u001e\u000f\u0000\u00d5\u00d6\u0003\u001c"+ + "\u000e\b\u00d6\u00d8\u0001\u0000\u0000\u0000\u00d7\u00d3\u0001\u0000\u0000"+ + "\u0000\u00d8\u00db\u0001\u0000\u0000\u0000\u00d9\u00d7\u0001\u0000\u0000"+ + "\u0000\u00d9\u00da\u0001\u0000\u0000\u0000\u00da\u001d\u0001\u0000\u0000"+ + "\u0000\u00db\u00d9\u0001\u0000\u0000\u0000\u00dc\u00dd\u0007\u0001\u0000"+ + "\u0000\u00dd\u001f\u0001\u0000\u0000\u0000\u00de\u00df\u0007\u0002\u0000"+ + "\u0000\u00df!\u0001\u0000\u0000\u0000\u00e0\u00e1\u0005\u0016\u0000\u0000"+ + "\u00e1\u00e3\u0005\u0012\u0000\u0000\u00e2\u00e0\u0001\u0000\u0000\u0000"+ + "\u00e2\u00e3\u0001\u0000\u0000\u0000\u00e3\u00e9\u0001\u0000\u0000\u0000"+ + "\u00e4\u00e5\u0003(\u0014\u0000\u00e5\u00e6\u0005\u0012\u0000\u0000\u00e6"+ + "\u00e8\u0001\u0000\u0000\u0000\u00e7\u00e4\u0001\u0000\u0000\u0000\u00e8"+ + "\u00eb\u0001\u0000\u0000\u0000\u00e9\u00e7\u0001\u0000\u0000\u0000\u00e9"+ + "\u00ea\u0001\u0000\u0000\u0000\u00ea\u00ec\u0001\u0000\u0000\u0000\u00eb"+ + "\u00e9\u0001\u0000\u0000\u0000\u00ec\u00ed\u00030\u0018\u0000\u00ed#\u0001"+ + "\u0000\u0000\u0000\u00ee\u00ef\u00030\u0018\u0000\u00ef\u00f0\u0003\u0006"+ + "\u0003\u0000\u00f0\u00f1\u0003\u001c\u000e\u0000\u00f1%\u0001\u0000\u0000"+ + "\u0000\u00f2\u00f3\u0005\u0016\u0000\u0000\u00f3\u00f5\u0005\u0012\u0000"+ + "\u0000\u00f4\u00f2\u0001\u0000\u0000\u0000\u00f4\u00f5\u0001\u0000\u0000"+ + "\u0000\u00f5\u00fb\u0001\u0000\u0000\u0000\u00f6\u00f7\u0003(\u0014\u0000"+ + "\u00f7\u00f8\u0005\u0012\u0000\u0000\u00f8\u00fa\u0001\u0000\u0000\u0000"+ + "\u00f9\u00f6\u0001\u0000\u0000\u0000\u00fa\u00fd\u0001\u0000\u0000\u0000"+ + "\u00fb\u00f9\u0001\u0000\u0000\u0000\u00fb\u00fc\u0001\u0000\u0000\u0000"+ + "\u00fc\u00fe\u0001\u0000\u0000\u0000\u00fd\u00fb\u0001\u0000\u0000\u0000"+ + "\u00fe\u00ff\u0003*\u0015\u0000\u00ff\'\u0001\u0000\u0000\u0000\u0100"+ + "\u0103\u0003*\u0015\u0000\u0101\u0103\u00030\u0018\u0000\u0102\u0100\u0001"+ + "\u0000\u0000\u0000\u0102\u0101\u0001\u0000\u0000\u0000\u0103)\u0001\u0000"+ + "\u0000\u0000\u0104\u0105\u00030\u0018\u0000\u0105\u0107\u0005\u0005\u0000"+ + "\u0000\u0106\u0108\u0003,\u0016\u0000\u0107\u0106\u0001\u0000\u0000\u0000"+ + "\u0107\u0108\u0001\u0000\u0000\u0000\u0108\u0109\u0001\u0000\u0000\u0000"+ + "\u0109\u010a\u0005\u0006\u0000\u0000\u010a+\u0001\u0000\u0000\u0000\u010b"+ + "\u0110\u0003\u001c\u000e\u0000\u010c\u010d\u0005\n\u0000\u0000\u010d\u010f"+ + "\u0003\u001c\u000e\u0000\u010e\u010c\u0001\u0000\u0000\u0000\u010f\u0112"+ + "\u0001\u0000\u0000\u0000\u0110\u010e\u0001\u0000\u0000\u0000\u0110\u0111"+ + "\u0001\u0000\u0000\u0000\u0111-\u0001\u0000\u0000\u0000\u0112\u0110\u0001"+ + "\u0000\u0000\u0000\u0113\u0114\u0007\u0003\u0000\u0000\u0114/\u0001\u0000"+ + "\u0000\u0000\u0115\u0116\u0005-\u0000\u0000\u01161\u0001\u0000\u0000\u0000"+ + "\u00187<>OU\\kpz\u0083\u0085\u0091\u00b8\u00bf\u00c3\u00d1\u00d9\u00e2"+ + "\u00e9\u00f4\u00fb\u0102\u0107\u0110"; 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 2b2d330..f17b6ba 100644 --- a/src/main/java/de/maishai/antlr/DecafVisitor.java +++ b/src/main/java/de/maishai/antlr/DecafVisitor.java @@ -10,12 +10,6 @@ import org.antlr.v4.runtime.tree.ParseTreeVisitor; * operations with no return type. */ public interface DecafVisitor extends ParseTreeVisitor { - /** - * Visit a parse tree produced by {@link DecafParser#program}. - * @param ctx the parse tree - * @return the visitor result - */ - T visitProgram(DecafParser.ProgramContext ctx); /** * Visit a parse tree produced by {@link DecafParser#class}. * @param ctx the parse tree @@ -137,13 +131,6 @@ public interface DecafVisitor extends ParseTreeVisitor { * @return the visitor result */ T visitBreak(DecafParser.BreakContext ctx); - /** - * Visit a parse tree produced by the {@code Continue} - * labeled alternative in {@link DecafParser#stmt}. - * @param ctx the parse tree - * @return the visitor result - */ - T visitContinue(DecafParser.ContinueContext 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/Class.java b/src/main/java/de/maishai/ast/records/Class.java index 8173558..f21e2e6 100644 --- a/src/main/java/de/maishai/ast/records/Class.java +++ b/src/main/java/de/maishai/ast/records/Class.java @@ -2,5 +2,5 @@ package de.maishai.ast.records; import java.util.List; -public record Class(Boolean isPublic, Id id , List fields, List methods, MainMethod mainMethod, List constructors) implements Node { +public record Class(Id id , List fields, List methods, MainMethod mainMethod, List constructors) implements Node { } diff --git a/src/main/java/de/maishai/ast/records/Continue.java b/src/main/java/de/maishai/ast/records/Continue.java deleted file mode 100644 index f7de37b..0000000 --- a/src/main/java/de/maishai/ast/records/Continue.java +++ /dev/null @@ -1,5 +0,0 @@ -package de.maishai.ast.records; - - -public record Continue() implements Statement { -} diff --git a/src/main/java/de/maishai/ast/records/Method.java b/src/main/java/de/maishai/ast/records/Method.java index 43c7f48..a11e9bc 100644 --- a/src/main/java/de/maishai/ast/records/Method.java +++ b/src/main/java/de/maishai/ast/records/Method.java @@ -6,5 +6,5 @@ import de.maishai.ast.ReturnType; import java.util.List; -public record Method(Boolean isPublic, ReturnType type, Id id, List params, Block block) implements Node { +public record Method(ReturnType type, Id id, List params, Block block) implements Node { } diff --git a/src/main/java/de/maishai/ast/records/Node.java b/src/main/java/de/maishai/ast/records/Node.java index 064f889..baf4bff 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, Expression, Field, LocalVariable, MainMethod, Method, Parameter, Program, Statement { +public sealed interface Node permits Block, Class, Constructor, Expression, Field, LocalVariable, MainMethod, Method, Parameter, Statement { } diff --git a/src/main/java/de/maishai/ast/records/Program.java b/src/main/java/de/maishai/ast/records/Program.java deleted file mode 100644 index 5b33c91..0000000 --- a/src/main/java/de/maishai/ast/records/Program.java +++ /dev/null @@ -1,7 +0,0 @@ -package de.maishai.ast.records; - - -import java.util.List; - -public record Program(List classes) implements Node { -} diff --git a/src/main/java/de/maishai/ast/records/Statement.java b/src/main/java/de/maishai/ast/records/Statement.java index a776dc9..181c398 100644 --- a/src/main/java/de/maishai/ast/records/Statement.java +++ b/src/main/java/de/maishai/ast/records/Statement.java @@ -1,16 +1,4 @@ package de.maishai.ast.records; -import de.maishai.ast.records.Break; -import de.maishai.ast.records.Continue; -import de.maishai.ast.records.DoWhile; -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.Node; -import de.maishai.ast.records.Return; -import de.maishai.ast.records.ReturnVoid; -import de.maishai.ast.records.While; - -public sealed interface Statement extends Node permits Assignment, Break, Continue, DoWhile, For, IfElse, MethodCall, New, Return, ReturnVoid, While { +public sealed interface Statement extends Node permits Assignment, Break, DoWhile, For, IfElse, MethodCall, New, Return, ReturnVoid, While { }