diff --git a/src/main/antlr/Decaf.g4 b/src/main/antlr/Decaf.g4 index 350b9a3..733e6b8 100644 --- a/src/main/antlr/Decaf.g4 +++ b/src/main/antlr/Decaf.g4 @@ -38,8 +38,6 @@ expr : expr binaryOp expr #BinaryOperation | '(' expr ')' #Expression | fieldVarAccess #Identifier | stmtexpr #StatementExpressionexpr - | THIS #This - | NULL #Null ; binaryOp : ADD | SUB | MUL | GT | LT | GE | LE | EQ | NE | AND | OR; diff --git a/src/main/java/de/maishai/ExpressionGenerator.java b/src/main/java/de/maishai/ExpressionGenerator.java index 394978e..7cbee59 100644 --- a/src/main/java/de/maishai/ExpressionGenerator.java +++ b/src/main/java/de/maishai/ExpressionGenerator.java @@ -121,15 +121,6 @@ public class ExpressionGenerator extends DecafBaseVisitor { return new New(type, args); } - @Override - public Expression visitNull(DecafParser.NullContext ctx){ - return new Null(); - } - - @Override - public Expression visitThis(DecafParser.ThisContext ctx){ - return new This(); - } public static Expression generateRecursiveOwnerChain(List ctxList, FieldVarAccess recipient) { if (ctxList.isEmpty()) { diff --git a/src/main/java/de/maishai/antlr/Decaf.interp b/src/main/java/de/maishai/antlr/Decaf.interp index 0cc16ed..a3eb86d 100644 --- a/src/main/java/de/maishai/antlr/Decaf.interp +++ b/src/main/java/de/maishai/antlr/Decaf.interp @@ -131,4 +131,4 @@ id atn: -[4, 1, 49, 284, 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, 3, 1, 69, 8, 1, 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, 83, 8, 4, 1, 5, 1, 5, 1, 5, 1, 5, 3, 5, 89, 8, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 3, 6, 96, 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, 1, 8, 1, 8, 1, 8, 3, 8, 114, 8, 8, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 5, 9, 122, 8, 9, 10, 9, 12, 9, 125, 9, 9, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 5, 11, 133, 8, 11, 10, 11, 12, 11, 136, 9, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 3, 12, 147, 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, 3, 12, 172, 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, 3, 12, 188, 8, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 3, 13, 195, 8, 13, 1, 13, 1, 13, 3, 13, 199, 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, 1, 14, 3, 14, 214, 8, 14, 1, 14, 1, 14, 1, 14, 1, 14, 5, 14, 220, 8, 14, 10, 14, 12, 14, 223, 9, 14, 1, 15, 1, 15, 1, 16, 1, 16, 1, 17, 1, 17, 3, 17, 231, 8, 17, 1, 17, 1, 17, 1, 17, 5, 17, 236, 8, 17, 10, 17, 12, 17, 239, 9, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 3, 19, 249, 8, 19, 1, 19, 1, 19, 1, 19, 5, 19, 254, 8, 19, 10, 19, 12, 19, 257, 9, 19, 1, 19, 1, 19, 1, 20, 1, 20, 3, 20, 263, 8, 20, 1, 21, 1, 21, 1, 21, 3, 21, 268, 8, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 5, 22, 275, 8, 22, 10, 22, 12, 22, 278, 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, 298, 0, 50, 1, 0, 0, 0, 2, 68, 1, 0, 0, 0, 4, 74, 1, 0, 0, 0, 6, 78, 1, 0, 0, 0, 8, 82, 1, 0, 0, 0, 10, 88, 1, 0, 0, 0, 12, 90, 1, 0, 0, 0, 14, 100, 1, 0, 0, 0, 16, 109, 1, 0, 0, 0, 18, 118, 1, 0, 0, 0, 20, 126, 1, 0, 0, 0, 22, 129, 1, 0, 0, 0, 24, 187, 1, 0, 0, 0, 26, 198, 1, 0, 0, 0, 28, 213, 1, 0, 0, 0, 30, 224, 1, 0, 0, 0, 32, 226, 1, 0, 0, 0, 34, 230, 1, 0, 0, 0, 36, 242, 1, 0, 0, 0, 38, 248, 1, 0, 0, 0, 40, 262, 1, 0, 0, 0, 42, 264, 1, 0, 0, 0, 44, 271, 1, 0, 0, 0, 46, 279, 1, 0, 0, 0, 48, 281, 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, 69, 5, 19, 0, 0, 68, 67, 1, 0, 0, 0, 68, 69, 1, 0, 0, 0, 69, 70, 1, 0, 0, 0, 70, 71, 3, 10, 5, 0, 71, 72, 3, 48, 24, 0, 72, 73, 5, 4, 0, 0, 73, 3, 1, 0, 0, 0, 74, 75, 3, 10, 5, 0, 75, 76, 3, 48, 24, 0, 76, 77, 5, 4, 0, 0, 77, 5, 1, 0, 0, 0, 78, 79, 7, 0, 0, 0, 79, 7, 1, 0, 0, 0, 80, 83, 3, 10, 5, 0, 81, 83, 5, 41, 0, 0, 82, 80, 1, 0, 0, 0, 82, 81, 1, 0, 0, 0, 83, 9, 1, 0, 0, 0, 84, 89, 5, 39, 0, 0, 85, 89, 5, 40, 0, 0, 86, 89, 5, 42, 0, 0, 87, 89, 3, 48, 24, 0, 88, 84, 1, 0, 0, 0, 88, 85, 1, 0, 0, 0, 88, 86, 1, 0, 0, 0, 88, 87, 1, 0, 0, 0, 89, 11, 1, 0, 0, 0, 90, 91, 5, 19, 0, 0, 91, 92, 3, 8, 4, 0, 92, 93, 3, 48, 24, 0, 93, 95, 5, 5, 0, 0, 94, 96, 3, 18, 9, 0, 95, 94, 1, 0, 0, 0, 95, 96, 1, 0, 0, 0, 96, 97, 1, 0, 0, 0, 97, 98, 5, 6, 0, 0, 98, 99, 3, 22, 11, 0, 99, 13, 1, 0, 0, 0, 100, 101, 5, 19, 0, 0, 101, 102, 5, 7, 0, 0, 102, 103, 5, 41, 0, 0, 103, 104, 5, 8, 0, 0, 104, 105, 5, 5, 0, 0, 105, 106, 5, 9, 0, 0, 106, 107, 5, 6, 0, 0, 107, 108, 3, 22, 11, 0, 108, 15, 1, 0, 0, 0, 109, 110, 5, 19, 0, 0, 110, 111, 3, 48, 24, 0, 111, 113, 5, 5, 0, 0, 112, 114, 3, 18, 9, 0, 113, 112, 1, 0, 0, 0, 113, 114, 1, 0, 0, 0, 114, 115, 1, 0, 0, 0, 115, 116, 5, 6, 0, 0, 116, 117, 3, 22, 11, 0, 117, 17, 1, 0, 0, 0, 118, 123, 3, 20, 10, 0, 119, 120, 5, 10, 0, 0, 120, 122, 3, 20, 10, 0, 121, 119, 1, 0, 0, 0, 122, 125, 1, 0, 0, 0, 123, 121, 1, 0, 0, 0, 123, 124, 1, 0, 0, 0, 124, 19, 1, 0, 0, 0, 125, 123, 1, 0, 0, 0, 126, 127, 3, 10, 5, 0, 127, 128, 3, 48, 24, 0, 128, 21, 1, 0, 0, 0, 129, 134, 5, 2, 0, 0, 130, 133, 3, 4, 2, 0, 131, 133, 3, 24, 12, 0, 132, 130, 1, 0, 0, 0, 132, 131, 1, 0, 0, 0, 133, 136, 1, 0, 0, 0, 134, 132, 1, 0, 0, 0, 134, 135, 1, 0, 0, 0, 135, 137, 1, 0, 0, 0, 136, 134, 1, 0, 0, 0, 137, 138, 5, 3, 0, 0, 138, 23, 1, 0, 0, 0, 139, 140, 5, 11, 0, 0, 140, 141, 5, 5, 0, 0, 141, 142, 3, 28, 14, 0, 142, 143, 5, 6, 0, 0, 143, 146, 3, 22, 11, 0, 144, 145, 5, 12, 0, 0, 145, 147, 3, 22, 11, 0, 146, 144, 1, 0, 0, 0, 146, 147, 1, 0, 0, 0, 147, 188, 1, 0, 0, 0, 148, 149, 5, 13, 0, 0, 149, 150, 5, 5, 0, 0, 150, 151, 3, 36, 18, 0, 151, 152, 5, 4, 0, 0, 152, 153, 3, 28, 14, 0, 153, 154, 5, 4, 0, 0, 154, 155, 3, 36, 18, 0, 155, 156, 5, 6, 0, 0, 156, 157, 3, 22, 11, 0, 157, 188, 1, 0, 0, 0, 158, 159, 5, 14, 0, 0, 159, 160, 5, 5, 0, 0, 160, 161, 3, 28, 14, 0, 161, 162, 5, 6, 0, 0, 162, 163, 3, 22, 11, 0, 163, 188, 1, 0, 0, 0, 164, 165, 5, 15, 0, 0, 165, 166, 3, 22, 11, 0, 166, 167, 5, 14, 0, 0, 167, 168, 5, 5, 0, 0, 168, 169, 3, 28, 14, 0, 169, 171, 5, 6, 0, 0, 170, 172, 5, 4, 0, 0, 171, 170, 1, 0, 0, 0, 171, 172, 1, 0, 0, 0, 172, 188, 1, 0, 0, 0, 173, 174, 5, 16, 0, 0, 174, 175, 3, 28, 14, 0, 175, 176, 5, 4, 0, 0, 176, 188, 1, 0, 0, 0, 177, 178, 5, 16, 0, 0, 178, 188, 5, 4, 0, 0, 179, 180, 5, 17, 0, 0, 180, 188, 5, 4, 0, 0, 181, 182, 3, 36, 18, 0, 182, 183, 5, 4, 0, 0, 183, 188, 1, 0, 0, 0, 184, 185, 3, 26, 13, 0, 185, 186, 5, 4, 0, 0, 186, 188, 1, 0, 0, 0, 187, 139, 1, 0, 0, 0, 187, 148, 1, 0, 0, 0, 187, 158, 1, 0, 0, 0, 187, 164, 1, 0, 0, 0, 187, 173, 1, 0, 0, 0, 187, 177, 1, 0, 0, 0, 187, 179, 1, 0, 0, 0, 187, 181, 1, 0, 0, 0, 187, 184, 1, 0, 0, 0, 188, 25, 1, 0, 0, 0, 189, 199, 3, 38, 19, 0, 190, 191, 5, 20, 0, 0, 191, 192, 3, 10, 5, 0, 192, 194, 5, 5, 0, 0, 193, 195, 3, 44, 22, 0, 194, 193, 1, 0, 0, 0, 194, 195, 1, 0, 0, 0, 195, 196, 1, 0, 0, 0, 196, 197, 5, 6, 0, 0, 197, 199, 1, 0, 0, 0, 198, 189, 1, 0, 0, 0, 198, 190, 1, 0, 0, 0, 199, 27, 1, 0, 0, 0, 200, 201, 6, 14, -1, 0, 201, 202, 3, 32, 16, 0, 202, 203, 3, 28, 14, 7, 203, 214, 1, 0, 0, 0, 204, 214, 3, 46, 23, 0, 205, 206, 5, 5, 0, 0, 206, 207, 3, 28, 14, 0, 207, 208, 5, 6, 0, 0, 208, 214, 1, 0, 0, 0, 209, 214, 3, 34, 17, 0, 210, 214, 3, 26, 13, 0, 211, 214, 5, 22, 0, 0, 212, 214, 5, 21, 0, 0, 213, 200, 1, 0, 0, 0, 213, 204, 1, 0, 0, 0, 213, 205, 1, 0, 0, 0, 213, 209, 1, 0, 0, 0, 213, 210, 1, 0, 0, 0, 213, 211, 1, 0, 0, 0, 213, 212, 1, 0, 0, 0, 214, 221, 1, 0, 0, 0, 215, 216, 10, 8, 0, 0, 216, 217, 3, 30, 15, 0, 217, 218, 3, 28, 14, 9, 218, 220, 1, 0, 0, 0, 219, 215, 1, 0, 0, 0, 220, 223, 1, 0, 0, 0, 221, 219, 1, 0, 0, 0, 221, 222, 1, 0, 0, 0, 222, 29, 1, 0, 0, 0, 223, 221, 1, 0, 0, 0, 224, 225, 7, 1, 0, 0, 225, 31, 1, 0, 0, 0, 226, 227, 7, 2, 0, 0, 227, 33, 1, 0, 0, 0, 228, 229, 5, 22, 0, 0, 229, 231, 5, 18, 0, 0, 230, 228, 1, 0, 0, 0, 230, 231, 1, 0, 0, 0, 231, 237, 1, 0, 0, 0, 232, 233, 3, 40, 20, 0, 233, 234, 5, 18, 0, 0, 234, 236, 1, 0, 0, 0, 235, 232, 1, 0, 0, 0, 236, 239, 1, 0, 0, 0, 237, 235, 1, 0, 0, 0, 237, 238, 1, 0, 0, 0, 238, 240, 1, 0, 0, 0, 239, 237, 1, 0, 0, 0, 240, 241, 3, 48, 24, 0, 241, 35, 1, 0, 0, 0, 242, 243, 3, 34, 17, 0, 243, 244, 3, 6, 3, 0, 244, 245, 3, 28, 14, 0, 245, 37, 1, 0, 0, 0, 246, 247, 5, 22, 0, 0, 247, 249, 5, 18, 0, 0, 248, 246, 1, 0, 0, 0, 248, 249, 1, 0, 0, 0, 249, 255, 1, 0, 0, 0, 250, 251, 3, 40, 20, 0, 251, 252, 5, 18, 0, 0, 252, 254, 1, 0, 0, 0, 253, 250, 1, 0, 0, 0, 254, 257, 1, 0, 0, 0, 255, 253, 1, 0, 0, 0, 255, 256, 1, 0, 0, 0, 256, 258, 1, 0, 0, 0, 257, 255, 1, 0, 0, 0, 258, 259, 3, 42, 21, 0, 259, 39, 1, 0, 0, 0, 260, 263, 3, 42, 21, 0, 261, 263, 3, 48, 24, 0, 262, 260, 1, 0, 0, 0, 262, 261, 1, 0, 0, 0, 263, 41, 1, 0, 0, 0, 264, 265, 3, 48, 24, 0, 265, 267, 5, 5, 0, 0, 266, 268, 3, 44, 22, 0, 267, 266, 1, 0, 0, 0, 267, 268, 1, 0, 0, 0, 268, 269, 1, 0, 0, 0, 269, 270, 5, 6, 0, 0, 270, 43, 1, 0, 0, 0, 271, 276, 3, 28, 14, 0, 272, 273, 5, 10, 0, 0, 273, 275, 3, 28, 14, 0, 274, 272, 1, 0, 0, 0, 275, 278, 1, 0, 0, 0, 276, 274, 1, 0, 0, 0, 276, 277, 1, 0, 0, 0, 277, 45, 1, 0, 0, 0, 278, 276, 1, 0, 0, 0, 279, 280, 7, 3, 0, 0, 280, 47, 1, 0, 0, 0, 281, 282, 5, 45, 0, 0, 282, 49, 1, 0, 0, 0, 25, 55, 60, 62, 68, 82, 88, 95, 113, 123, 132, 134, 146, 171, 187, 194, 198, 213, 221, 230, 237, 248, 255, 262, 267, 276] \ No newline at end of file +[4, 1, 49, 282, 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, 3, 1, 69, 8, 1, 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, 83, 8, 4, 1, 5, 1, 5, 1, 5, 1, 5, 3, 5, 89, 8, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 3, 6, 96, 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, 1, 8, 1, 8, 1, 8, 3, 8, 114, 8, 8, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 5, 9, 122, 8, 9, 10, 9, 12, 9, 125, 9, 9, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 5, 11, 133, 8, 11, 10, 11, 12, 11, 136, 9, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 3, 12, 147, 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, 3, 12, 172, 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, 3, 12, 188, 8, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 3, 13, 195, 8, 13, 1, 13, 1, 13, 3, 13, 199, 8, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 3, 14, 212, 8, 14, 1, 14, 1, 14, 1, 14, 1, 14, 5, 14, 218, 8, 14, 10, 14, 12, 14, 221, 9, 14, 1, 15, 1, 15, 1, 16, 1, 16, 1, 17, 1, 17, 3, 17, 229, 8, 17, 1, 17, 1, 17, 1, 17, 5, 17, 234, 8, 17, 10, 17, 12, 17, 237, 9, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 3, 19, 247, 8, 19, 1, 19, 1, 19, 1, 19, 5, 19, 252, 8, 19, 10, 19, 12, 19, 255, 9, 19, 1, 19, 1, 19, 1, 20, 1, 20, 3, 20, 261, 8, 20, 1, 21, 1, 21, 1, 21, 3, 21, 266, 8, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 5, 22, 273, 8, 22, 10, 22, 12, 22, 276, 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, 294, 0, 50, 1, 0, 0, 0, 2, 68, 1, 0, 0, 0, 4, 74, 1, 0, 0, 0, 6, 78, 1, 0, 0, 0, 8, 82, 1, 0, 0, 0, 10, 88, 1, 0, 0, 0, 12, 90, 1, 0, 0, 0, 14, 100, 1, 0, 0, 0, 16, 109, 1, 0, 0, 0, 18, 118, 1, 0, 0, 0, 20, 126, 1, 0, 0, 0, 22, 129, 1, 0, 0, 0, 24, 187, 1, 0, 0, 0, 26, 198, 1, 0, 0, 0, 28, 211, 1, 0, 0, 0, 30, 222, 1, 0, 0, 0, 32, 224, 1, 0, 0, 0, 34, 228, 1, 0, 0, 0, 36, 240, 1, 0, 0, 0, 38, 246, 1, 0, 0, 0, 40, 260, 1, 0, 0, 0, 42, 262, 1, 0, 0, 0, 44, 269, 1, 0, 0, 0, 46, 277, 1, 0, 0, 0, 48, 279, 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, 69, 5, 19, 0, 0, 68, 67, 1, 0, 0, 0, 68, 69, 1, 0, 0, 0, 69, 70, 1, 0, 0, 0, 70, 71, 3, 10, 5, 0, 71, 72, 3, 48, 24, 0, 72, 73, 5, 4, 0, 0, 73, 3, 1, 0, 0, 0, 74, 75, 3, 10, 5, 0, 75, 76, 3, 48, 24, 0, 76, 77, 5, 4, 0, 0, 77, 5, 1, 0, 0, 0, 78, 79, 7, 0, 0, 0, 79, 7, 1, 0, 0, 0, 80, 83, 3, 10, 5, 0, 81, 83, 5, 41, 0, 0, 82, 80, 1, 0, 0, 0, 82, 81, 1, 0, 0, 0, 83, 9, 1, 0, 0, 0, 84, 89, 5, 39, 0, 0, 85, 89, 5, 40, 0, 0, 86, 89, 5, 42, 0, 0, 87, 89, 3, 48, 24, 0, 88, 84, 1, 0, 0, 0, 88, 85, 1, 0, 0, 0, 88, 86, 1, 0, 0, 0, 88, 87, 1, 0, 0, 0, 89, 11, 1, 0, 0, 0, 90, 91, 5, 19, 0, 0, 91, 92, 3, 8, 4, 0, 92, 93, 3, 48, 24, 0, 93, 95, 5, 5, 0, 0, 94, 96, 3, 18, 9, 0, 95, 94, 1, 0, 0, 0, 95, 96, 1, 0, 0, 0, 96, 97, 1, 0, 0, 0, 97, 98, 5, 6, 0, 0, 98, 99, 3, 22, 11, 0, 99, 13, 1, 0, 0, 0, 100, 101, 5, 19, 0, 0, 101, 102, 5, 7, 0, 0, 102, 103, 5, 41, 0, 0, 103, 104, 5, 8, 0, 0, 104, 105, 5, 5, 0, 0, 105, 106, 5, 9, 0, 0, 106, 107, 5, 6, 0, 0, 107, 108, 3, 22, 11, 0, 108, 15, 1, 0, 0, 0, 109, 110, 5, 19, 0, 0, 110, 111, 3, 48, 24, 0, 111, 113, 5, 5, 0, 0, 112, 114, 3, 18, 9, 0, 113, 112, 1, 0, 0, 0, 113, 114, 1, 0, 0, 0, 114, 115, 1, 0, 0, 0, 115, 116, 5, 6, 0, 0, 116, 117, 3, 22, 11, 0, 117, 17, 1, 0, 0, 0, 118, 123, 3, 20, 10, 0, 119, 120, 5, 10, 0, 0, 120, 122, 3, 20, 10, 0, 121, 119, 1, 0, 0, 0, 122, 125, 1, 0, 0, 0, 123, 121, 1, 0, 0, 0, 123, 124, 1, 0, 0, 0, 124, 19, 1, 0, 0, 0, 125, 123, 1, 0, 0, 0, 126, 127, 3, 10, 5, 0, 127, 128, 3, 48, 24, 0, 128, 21, 1, 0, 0, 0, 129, 134, 5, 2, 0, 0, 130, 133, 3, 4, 2, 0, 131, 133, 3, 24, 12, 0, 132, 130, 1, 0, 0, 0, 132, 131, 1, 0, 0, 0, 133, 136, 1, 0, 0, 0, 134, 132, 1, 0, 0, 0, 134, 135, 1, 0, 0, 0, 135, 137, 1, 0, 0, 0, 136, 134, 1, 0, 0, 0, 137, 138, 5, 3, 0, 0, 138, 23, 1, 0, 0, 0, 139, 140, 5, 11, 0, 0, 140, 141, 5, 5, 0, 0, 141, 142, 3, 28, 14, 0, 142, 143, 5, 6, 0, 0, 143, 146, 3, 22, 11, 0, 144, 145, 5, 12, 0, 0, 145, 147, 3, 22, 11, 0, 146, 144, 1, 0, 0, 0, 146, 147, 1, 0, 0, 0, 147, 188, 1, 0, 0, 0, 148, 149, 5, 13, 0, 0, 149, 150, 5, 5, 0, 0, 150, 151, 3, 36, 18, 0, 151, 152, 5, 4, 0, 0, 152, 153, 3, 28, 14, 0, 153, 154, 5, 4, 0, 0, 154, 155, 3, 36, 18, 0, 155, 156, 5, 6, 0, 0, 156, 157, 3, 22, 11, 0, 157, 188, 1, 0, 0, 0, 158, 159, 5, 14, 0, 0, 159, 160, 5, 5, 0, 0, 160, 161, 3, 28, 14, 0, 161, 162, 5, 6, 0, 0, 162, 163, 3, 22, 11, 0, 163, 188, 1, 0, 0, 0, 164, 165, 5, 15, 0, 0, 165, 166, 3, 22, 11, 0, 166, 167, 5, 14, 0, 0, 167, 168, 5, 5, 0, 0, 168, 169, 3, 28, 14, 0, 169, 171, 5, 6, 0, 0, 170, 172, 5, 4, 0, 0, 171, 170, 1, 0, 0, 0, 171, 172, 1, 0, 0, 0, 172, 188, 1, 0, 0, 0, 173, 174, 5, 16, 0, 0, 174, 175, 3, 28, 14, 0, 175, 176, 5, 4, 0, 0, 176, 188, 1, 0, 0, 0, 177, 178, 5, 16, 0, 0, 178, 188, 5, 4, 0, 0, 179, 180, 5, 17, 0, 0, 180, 188, 5, 4, 0, 0, 181, 182, 3, 36, 18, 0, 182, 183, 5, 4, 0, 0, 183, 188, 1, 0, 0, 0, 184, 185, 3, 26, 13, 0, 185, 186, 5, 4, 0, 0, 186, 188, 1, 0, 0, 0, 187, 139, 1, 0, 0, 0, 187, 148, 1, 0, 0, 0, 187, 158, 1, 0, 0, 0, 187, 164, 1, 0, 0, 0, 187, 173, 1, 0, 0, 0, 187, 177, 1, 0, 0, 0, 187, 179, 1, 0, 0, 0, 187, 181, 1, 0, 0, 0, 187, 184, 1, 0, 0, 0, 188, 25, 1, 0, 0, 0, 189, 199, 3, 38, 19, 0, 190, 191, 5, 20, 0, 0, 191, 192, 3, 10, 5, 0, 192, 194, 5, 5, 0, 0, 193, 195, 3, 44, 22, 0, 194, 193, 1, 0, 0, 0, 194, 195, 1, 0, 0, 0, 195, 196, 1, 0, 0, 0, 196, 197, 5, 6, 0, 0, 197, 199, 1, 0, 0, 0, 198, 189, 1, 0, 0, 0, 198, 190, 1, 0, 0, 0, 199, 27, 1, 0, 0, 0, 200, 201, 6, 14, -1, 0, 201, 202, 3, 32, 16, 0, 202, 203, 3, 28, 14, 5, 203, 212, 1, 0, 0, 0, 204, 212, 3, 46, 23, 0, 205, 206, 5, 5, 0, 0, 206, 207, 3, 28, 14, 0, 207, 208, 5, 6, 0, 0, 208, 212, 1, 0, 0, 0, 209, 212, 3, 34, 17, 0, 210, 212, 3, 26, 13, 0, 211, 200, 1, 0, 0, 0, 211, 204, 1, 0, 0, 0, 211, 205, 1, 0, 0, 0, 211, 209, 1, 0, 0, 0, 211, 210, 1, 0, 0, 0, 212, 219, 1, 0, 0, 0, 213, 214, 10, 6, 0, 0, 214, 215, 3, 30, 15, 0, 215, 216, 3, 28, 14, 7, 216, 218, 1, 0, 0, 0, 217, 213, 1, 0, 0, 0, 218, 221, 1, 0, 0, 0, 219, 217, 1, 0, 0, 0, 219, 220, 1, 0, 0, 0, 220, 29, 1, 0, 0, 0, 221, 219, 1, 0, 0, 0, 222, 223, 7, 1, 0, 0, 223, 31, 1, 0, 0, 0, 224, 225, 7, 2, 0, 0, 225, 33, 1, 0, 0, 0, 226, 227, 5, 22, 0, 0, 227, 229, 5, 18, 0, 0, 228, 226, 1, 0, 0, 0, 228, 229, 1, 0, 0, 0, 229, 235, 1, 0, 0, 0, 230, 231, 3, 40, 20, 0, 231, 232, 5, 18, 0, 0, 232, 234, 1, 0, 0, 0, 233, 230, 1, 0, 0, 0, 234, 237, 1, 0, 0, 0, 235, 233, 1, 0, 0, 0, 235, 236, 1, 0, 0, 0, 236, 238, 1, 0, 0, 0, 237, 235, 1, 0, 0, 0, 238, 239, 3, 48, 24, 0, 239, 35, 1, 0, 0, 0, 240, 241, 3, 34, 17, 0, 241, 242, 3, 6, 3, 0, 242, 243, 3, 28, 14, 0, 243, 37, 1, 0, 0, 0, 244, 245, 5, 22, 0, 0, 245, 247, 5, 18, 0, 0, 246, 244, 1, 0, 0, 0, 246, 247, 1, 0, 0, 0, 247, 253, 1, 0, 0, 0, 248, 249, 3, 40, 20, 0, 249, 250, 5, 18, 0, 0, 250, 252, 1, 0, 0, 0, 251, 248, 1, 0, 0, 0, 252, 255, 1, 0, 0, 0, 253, 251, 1, 0, 0, 0, 253, 254, 1, 0, 0, 0, 254, 256, 1, 0, 0, 0, 255, 253, 1, 0, 0, 0, 256, 257, 3, 42, 21, 0, 257, 39, 1, 0, 0, 0, 258, 261, 3, 42, 21, 0, 259, 261, 3, 48, 24, 0, 260, 258, 1, 0, 0, 0, 260, 259, 1, 0, 0, 0, 261, 41, 1, 0, 0, 0, 262, 263, 3, 48, 24, 0, 263, 265, 5, 5, 0, 0, 264, 266, 3, 44, 22, 0, 265, 264, 1, 0, 0, 0, 265, 266, 1, 0, 0, 0, 266, 267, 1, 0, 0, 0, 267, 268, 5, 6, 0, 0, 268, 43, 1, 0, 0, 0, 269, 274, 3, 28, 14, 0, 270, 271, 5, 10, 0, 0, 271, 273, 3, 28, 14, 0, 272, 270, 1, 0, 0, 0, 273, 276, 1, 0, 0, 0, 274, 272, 1, 0, 0, 0, 274, 275, 1, 0, 0, 0, 275, 45, 1, 0, 0, 0, 276, 274, 1, 0, 0, 0, 277, 278, 7, 3, 0, 0, 278, 47, 1, 0, 0, 0, 279, 280, 5, 45, 0, 0, 280, 49, 1, 0, 0, 0, 25, 55, 60, 62, 68, 82, 88, 95, 113, 123, 132, 134, 146, 171, 187, 194, 198, 211, 219, 228, 235, 246, 253, 260, 265, 274] \ No newline at end of file diff --git a/src/main/java/de/maishai/antlr/DecafBaseListener.java b/src/main/java/de/maishai/antlr/DecafBaseListener.java index 6c5611b..75aecd2 100644 --- a/src/main/java/de/maishai/antlr/DecafBaseListener.java +++ b/src/main/java/de/maishai/antlr/DecafBaseListener.java @@ -288,18 +288,6 @@ public class DecafBaseListener implements DecafListener { *

The default implementation does nothing.

*/ @Override public void exitNew(DecafParser.NewContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterNull(DecafParser.NullContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitNull(DecafParser.NullContext ctx) { } /** * {@inheritDoc} * @@ -360,18 +348,6 @@ public class DecafBaseListener implements DecafListener { *

The default implementation does nothing.

*/ @Override public void exitBinaryOperation(DecafParser.BinaryOperationContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterThis(DecafParser.ThisContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitThis(DecafParser.ThisContext ctx) { } /** * {@inheritDoc} * diff --git a/src/main/java/de/maishai/antlr/DecafBaseVisitor.java b/src/main/java/de/maishai/antlr/DecafBaseVisitor.java index 4969a22..4931c04 100644 --- a/src/main/java/de/maishai/antlr/DecafBaseVisitor.java +++ b/src/main/java/de/maishai/antlr/DecafBaseVisitor.java @@ -173,13 +173,6 @@ public class DecafBaseVisitor extends AbstractParseTreeVisitor implements * {@link #visitChildren} on {@code ctx}.

*/ @Override public T visitNew(DecafParser.NewContext ctx) { return visitChildren(ctx); } - /** - * {@inheritDoc} - * - *

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

- */ - @Override public T visitNull(DecafParser.NullContext ctx) { return visitChildren(ctx); } /** * {@inheritDoc} * @@ -215,13 +208,6 @@ public class DecafBaseVisitor extends AbstractParseTreeVisitor implements * {@link #visitChildren} on {@code ctx}.

*/ @Override public T visitBinaryOperation(DecafParser.BinaryOperationContext ctx) { return visitChildren(ctx); } - /** - * {@inheritDoc} - * - *

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

- */ - @Override public T visitThis(DecafParser.ThisContext ctx) { return visitChildren(ctx); } /** * {@inheritDoc} * diff --git a/src/main/java/de/maishai/antlr/DecafListener.java b/src/main/java/de/maishai/antlr/DecafListener.java index 60dce28..e4a1bde 100644 --- a/src/main/java/de/maishai/antlr/DecafListener.java +++ b/src/main/java/de/maishai/antlr/DecafListener.java @@ -259,18 +259,6 @@ public interface DecafListener extends ParseTreeListener { * @param ctx the parse tree */ void exitNew(DecafParser.NewContext ctx); - /** - * Enter a parse tree produced by the {@code Null} - * labeled alternative in {@link DecafParser#expr}. - * @param ctx the parse tree - */ - void enterNull(DecafParser.NullContext ctx); - /** - * Exit a parse tree produced by the {@code Null} - * labeled alternative in {@link DecafParser#expr}. - * @param ctx the parse tree - */ - void exitNull(DecafParser.NullContext ctx); /** * Enter a parse tree produced by the {@code UnaryOperation} * labeled alternative in {@link DecafParser#expr}. @@ -331,18 +319,6 @@ public interface DecafListener extends ParseTreeListener { * @param ctx the parse tree */ void exitBinaryOperation(DecafParser.BinaryOperationContext ctx); - /** - * Enter a parse tree produced by the {@code This} - * labeled alternative in {@link DecafParser#expr}. - * @param ctx the parse tree - */ - void enterThis(DecafParser.ThisContext ctx); - /** - * Exit a parse tree produced by the {@code This} - * labeled alternative in {@link DecafParser#expr}. - * @param ctx the parse tree - */ - void exitThis(DecafParser.ThisContext ctx); /** * Enter a parse tree produced by the {@code StatementExpressionexpr} * labeled alternative in {@link DecafParser#expr}. diff --git a/src/main/java/de/maishai/antlr/DecafParser.java b/src/main/java/de/maishai/antlr/DecafParser.java index c08644c..3ec3cff 100644 --- a/src/main/java/de/maishai/antlr/DecafParser.java +++ b/src/main/java/de/maishai/antlr/DecafParser.java @@ -1414,7 +1414,7 @@ public class DecafParser extends Parser { setState(194); _errHandler.sync(this); _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 132216288968736L) != 0)) { + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 132216286871584L) != 0)) { { setState(193); args(); @@ -1453,24 +1453,6 @@ public class DecafParser extends Parser { } } @SuppressWarnings("CheckReturnValue") - public static class NullContext extends ExprContext { - public TerminalNode NULL() { return getToken(DecafParser.NULL, 0); } - public NullContext(ExprContext ctx) { copyFrom(ctx); } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof DecafListener ) ((DecafListener)listener).enterNull(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof DecafListener ) ((DecafListener)listener).exitNull(this); - } - @Override - public T accept(ParseTreeVisitor visitor) { - if ( visitor instanceof DecafVisitor ) return ((DecafVisitor)visitor).visitNull(this); - else return visitor.visitChildren(this); - } - } - @SuppressWarnings("CheckReturnValue") public static class UnaryOperationContext extends ExprContext { public UnaryOpContext unaryOp() { return getRuleContext(UnaryOpContext.class,0); @@ -1580,24 +1562,6 @@ public class DecafParser extends Parser { } } @SuppressWarnings("CheckReturnValue") - public static class ThisContext extends ExprContext { - public TerminalNode THIS() { return getToken(DecafParser.THIS, 0); } - public ThisContext(ExprContext ctx) { copyFrom(ctx); } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof DecafListener ) ((DecafListener)listener).enterThis(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof DecafListener ) ((DecafListener)listener).exitThis(this); - } - @Override - public T accept(ParseTreeVisitor visitor) { - if ( visitor instanceof DecafVisitor ) return ((DecafVisitor)visitor).visitThis(this); - else return visitor.visitChildren(this); - } - } - @SuppressWarnings("CheckReturnValue") public static class StatementExpressionexprContext extends ExprContext { public StmtexprContext stmtexpr() { return getRuleContext(StmtexprContext.class,0); @@ -1633,7 +1597,7 @@ public class DecafParser extends Parser { int _alt; enterOuterAlt(_localctx, 1); { - setState(213); + setState(211); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,16,_ctx) ) { case 1: @@ -1645,7 +1609,7 @@ public class DecafParser extends Parser { setState(201); unaryOp(); setState(202); - expr(7); + expr(5); } break; case 2: @@ -1688,27 +1652,9 @@ public class DecafParser extends Parser { stmtexpr(); } break; - case 6: - { - _localctx = new ThisContext(_localctx); - _ctx = _localctx; - _prevctx = _localctx; - setState(211); - match(THIS); - } - break; - case 7: - { - _localctx = new NullContext(_localctx); - _ctx = _localctx; - _prevctx = _localctx; - setState(212); - match(NULL); - } - break; } _ctx.stop = _input.LT(-1); - setState(221); + setState(219); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,17,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { @@ -1719,16 +1665,16 @@ public class DecafParser extends Parser { { _localctx = new BinaryOperationContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(215); - if (!(precpred(_ctx, 8))) throw new FailedPredicateException(this, "precpred(_ctx, 8)"); - setState(216); + setState(213); + if (!(precpred(_ctx, 6))) throw new FailedPredicateException(this, "precpred(_ctx, 6)"); + setState(214); binaryOp(); - setState(217); - expr(9); + setState(215); + expr(7); } } } - setState(223); + setState(221); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,17,_ctx); } @@ -1784,7 +1730,7 @@ public class DecafParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(224); + setState(222); _la = _input.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 17171480576L) != 0)) ) { _errHandler.recoverInline(this); @@ -1837,7 +1783,7 @@ public class DecafParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(226); + setState(224); _la = _input.LA(1); if ( !(_la==SUB || _la==NOT) ) { _errHandler.recoverInline(this); @@ -1899,37 +1845,37 @@ public class DecafParser extends Parser { int _alt; enterOuterAlt(_localctx, 1); { - setState(230); + setState(228); _errHandler.sync(this); _la = _input.LA(1); if (_la==THIS) { { - setState(228); + setState(226); match(THIS); - setState(229); + setState(227); match(T__17); } } - setState(237); + setState(235); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,19,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(232); + setState(230); recipient(); - setState(233); + setState(231); match(T__17); } } } - setState(239); + setState(237); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,19,_ctx); } - setState(240); + setState(238); id(); } } @@ -1980,11 +1926,11 @@ public class DecafParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(242); + setState(240); fieldVarAccess(); - setState(243); + setState(241); assignSign(); - setState(244); + setState(242); expr(0); } } @@ -2038,37 +1984,37 @@ public class DecafParser extends Parser { int _alt; enterOuterAlt(_localctx, 1); { - setState(248); + setState(246); _errHandler.sync(this); _la = _input.LA(1); if (_la==THIS) { { - setState(246); + setState(244); match(THIS); - setState(247); + setState(245); match(T__17); } } - setState(255); + setState(253); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,21,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(250); + setState(248); recipient(); - setState(251); + setState(249); match(T__17); } } } - setState(257); + setState(255); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,21,_ctx); } - setState(258); + setState(256); methName(); } } @@ -2114,20 +2060,20 @@ public class DecafParser extends Parser { RecipientContext _localctx = new RecipientContext(_ctx, getState()); enterRule(_localctx, 40, RULE_recipient); try { - setState(262); + setState(260); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,22,_ctx) ) { case 1: enterOuterAlt(_localctx, 1); { - setState(260); + setState(258); methName(); } break; case 2: enterOuterAlt(_localctx, 2); { - setState(261); + setState(259); id(); } break; @@ -2178,21 +2124,21 @@ public class DecafParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(264); + setState(262); id(); - setState(265); + setState(263); match(T__4); - setState(267); + setState(265); _errHandler.sync(this); _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 132216288968736L) != 0)) { + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 132216286871584L) != 0)) { { - setState(266); + setState(264); args(); } } - setState(269); + setState(267); match(T__5); } } @@ -2241,21 +2187,21 @@ public class DecafParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(271); + setState(269); expr(0); - setState(276); + setState(274); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__9) { { { - setState(272); + setState(270); match(T__9); - setState(273); + setState(271); expr(0); } } - setState(278); + setState(276); _errHandler.sync(this); _la = _input.LA(1); } @@ -2303,7 +2249,7 @@ public class DecafParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(279); + setState(277); _la = _input.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 96757023244288L) != 0)) ) { _errHandler.recoverInline(this); @@ -2354,7 +2300,7 @@ public class DecafParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(281); + setState(279); match(IDENTIFIER); } } @@ -2379,13 +2325,13 @@ public class DecafParser extends Parser { private boolean expr_sempred(ExprContext _localctx, int predIndex) { switch (predIndex) { case 0: - return precpred(_ctx, 8); + return precpred(_ctx, 6); } return true; } public static final String _serializedATN = - "\u0004\u00011\u011c\u0002\u0000\u0007\u0000\u0002\u0001\u0007\u0001\u0002"+ + "\u0004\u00011\u011a\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"+ @@ -2414,156 +2360,153 @@ public class DecafParser extends Parser { "\f\u0001\f\u0001\f\u0001\f\u0001\f\u0003\f\u00bc\b\f\u0001\r\u0001\r\u0001"+ "\r\u0001\r\u0001\r\u0003\r\u00c3\b\r\u0001\r\u0001\r\u0003\r\u00c7\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"+ - "\u0001\u000e\u0003\u000e\u00d6\b\u000e\u0001\u000e\u0001\u000e\u0001\u000e"+ - "\u0001\u000e\u0005\u000e\u00dc\b\u000e\n\u000e\f\u000e\u00df\t\u000e\u0001"+ - "\u000f\u0001\u000f\u0001\u0010\u0001\u0010\u0001\u0011\u0001\u0011\u0003"+ - "\u0011\u00e7\b\u0011\u0001\u0011\u0001\u0011\u0001\u0011\u0005\u0011\u00ec"+ - "\b\u0011\n\u0011\f\u0011\u00ef\t\u0011\u0001\u0011\u0001\u0011\u0001\u0012"+ - "\u0001\u0012\u0001\u0012\u0001\u0012\u0001\u0013\u0001\u0013\u0003\u0013"+ - "\u00f9\b\u0013\u0001\u0013\u0001\u0013\u0001\u0013\u0005\u0013\u00fe\b"+ - "\u0013\n\u0013\f\u0013\u0101\t\u0013\u0001\u0013\u0001\u0013\u0001\u0014"+ - "\u0001\u0014\u0003\u0014\u0107\b\u0014\u0001\u0015\u0001\u0015\u0001\u0015"+ - "\u0003\u0015\u010c\b\u0015\u0001\u0015\u0001\u0015\u0001\u0016\u0001\u0016"+ - "\u0001\u0016\u0005\u0016\u0113\b\u0016\n\u0016\f\u0016\u0116\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+,..\u012a\u00002\u0001\u0000\u0000"+ - "\u0000\u0002D\u0001\u0000\u0000\u0000\u0004J\u0001\u0000\u0000\u0000\u0006"+ - "N\u0001\u0000\u0000\u0000\bR\u0001\u0000\u0000\u0000\nX\u0001\u0000\u0000"+ - "\u0000\fZ\u0001\u0000\u0000\u0000\u000ed\u0001\u0000\u0000\u0000\u0010"+ - "m\u0001\u0000\u0000\u0000\u0012v\u0001\u0000\u0000\u0000\u0014~\u0001"+ - "\u0000\u0000\u0000\u0016\u0081\u0001\u0000\u0000\u0000\u0018\u00bb\u0001"+ - "\u0000\u0000\u0000\u001a\u00c6\u0001\u0000\u0000\u0000\u001c\u00d5\u0001"+ - "\u0000\u0000\u0000\u001e\u00e0\u0001\u0000\u0000\u0000 \u00e2\u0001\u0000"+ - "\u0000\u0000\"\u00e6\u0001\u0000\u0000\u0000$\u00f2\u0001\u0000\u0000"+ - "\u0000&\u00f8\u0001\u0000\u0000\u0000(\u0106\u0001\u0000\u0000\u0000*"+ - "\u0108\u0001\u0000\u0000\u0000,\u010f\u0001\u0000\u0000\u0000.\u0117\u0001"+ - "\u0000\u0000\u00000\u0119\u0001\u0000\u0000\u000023\u0005\u0013\u0000"+ - "\u000034\u0005\u0001\u0000\u000045\u00030\u0018\u000057\u0005\u0002\u0000"+ - "\u000068\u0003\u000e\u0007\u000076\u0001\u0000\u0000\u000078\u0001\u0000"+ - "\u0000\u00008>\u0001\u0000\u0000\u00009=\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\u0000CE\u0005\u0013\u0000\u0000DC\u0001\u0000\u0000\u0000"+ - "DE\u0001\u0000\u0000\u0000EF\u0001\u0000\u0000\u0000FG\u0003\n\u0005\u0000"+ - "GH\u00030\u0018\u0000HI\u0005\u0004\u0000\u0000I\u0003\u0001\u0000\u0000"+ - "\u0000JK\u0003\n\u0005\u0000KL\u00030\u0018\u0000LM\u0005\u0004\u0000"+ - "\u0000M\u0005\u0001\u0000\u0000\u0000NO\u0007\u0000\u0000\u0000O\u0007"+ - "\u0001\u0000\u0000\u0000PS\u0003\n\u0005\u0000QS\u0005)\u0000\u0000RP"+ - "\u0001\u0000\u0000\u0000RQ\u0001\u0000\u0000\u0000S\t\u0001\u0000\u0000"+ - "\u0000TY\u0005\'\u0000\u0000UY\u0005(\u0000\u0000VY\u0005*\u0000\u0000"+ - "WY\u00030\u0018\u0000XT\u0001\u0000\u0000\u0000XU\u0001\u0000\u0000\u0000"+ - "XV\u0001\u0000\u0000\u0000XW\u0001\u0000\u0000\u0000Y\u000b\u0001\u0000"+ - "\u0000\u0000Z[\u0005\u0013\u0000\u0000[\\\u0003\b\u0004\u0000\\]\u0003"+ - "0\u0018\u0000]_\u0005\u0005\u0000\u0000^`\u0003\u0012\t\u0000_^\u0001"+ - "\u0000\u0000\u0000_`\u0001\u0000\u0000\u0000`a\u0001\u0000\u0000\u0000"+ - "ab\u0005\u0006\u0000\u0000bc\u0003\u0016\u000b\u0000c\r\u0001\u0000\u0000"+ - "\u0000de\u0005\u0013\u0000\u0000ef\u0005\u0007\u0000\u0000fg\u0005)\u0000"+ - "\u0000gh\u0005\b\u0000\u0000hi\u0005\u0005\u0000\u0000ij\u0005\t\u0000"+ - "\u0000jk\u0005\u0006\u0000\u0000kl\u0003\u0016\u000b\u0000l\u000f\u0001"+ - "\u0000\u0000\u0000mn\u0005\u0013\u0000\u0000no\u00030\u0018\u0000oq\u0005"+ - "\u0005\u0000\u0000pr\u0003\u0012\t\u0000qp\u0001\u0000\u0000\u0000qr\u0001"+ - "\u0000\u0000\u0000rs\u0001\u0000\u0000\u0000st\u0005\u0006\u0000\u0000"+ - "tu\u0003\u0016\u000b\u0000u\u0011\u0001\u0000\u0000\u0000v{\u0003\u0014"+ - "\n\u0000wx\u0005\n\u0000\u0000xz\u0003\u0014\n\u0000yw\u0001\u0000\u0000"+ - "\u0000z}\u0001\u0000\u0000\u0000{y\u0001\u0000\u0000\u0000{|\u0001\u0000"+ - "\u0000\u0000|\u0013\u0001\u0000\u0000\u0000}{\u0001\u0000\u0000\u0000"+ - "~\u007f\u0003\n\u0005\u0000\u007f\u0080\u00030\u0018\u0000\u0080\u0015"+ - "\u0001\u0000\u0000\u0000\u0081\u0086\u0005\u0002\u0000\u0000\u0082\u0085"+ - "\u0003\u0004\u0002\u0000\u0083\u0085\u0003\u0018\f\u0000\u0084\u0082\u0001"+ - "\u0000\u0000\u0000\u0084\u0083\u0001\u0000\u0000\u0000\u0085\u0088\u0001"+ - "\u0000\u0000\u0000\u0086\u0084\u0001\u0000\u0000\u0000\u0086\u0087\u0001"+ - "\u0000\u0000\u0000\u0087\u0089\u0001\u0000\u0000\u0000\u0088\u0086\u0001"+ - "\u0000\u0000\u0000\u0089\u008a\u0005\u0003\u0000\u0000\u008a\u0017\u0001"+ - "\u0000\u0000\u0000\u008b\u008c\u0005\u000b\u0000\u0000\u008c\u008d\u0005"+ - "\u0005\u0000\u0000\u008d\u008e\u0003\u001c\u000e\u0000\u008e\u008f\u0005"+ - "\u0006\u0000\u0000\u008f\u0092\u0003\u0016\u000b\u0000\u0090\u0091\u0005"+ - "\f\u0000\u0000\u0091\u0093\u0003\u0016\u000b\u0000\u0092\u0090\u0001\u0000"+ - "\u0000\u0000\u0092\u0093\u0001\u0000\u0000\u0000\u0093\u00bc\u0001\u0000"+ - "\u0000\u0000\u0094\u0095\u0005\r\u0000\u0000\u0095\u0096\u0005\u0005\u0000"+ - "\u0000\u0096\u0097\u0003$\u0012\u0000\u0097\u0098\u0005\u0004\u0000\u0000"+ - "\u0098\u0099\u0003\u001c\u000e\u0000\u0099\u009a\u0005\u0004\u0000\u0000"+ - "\u009a\u009b\u0003$\u0012\u0000\u009b\u009c\u0005\u0006\u0000\u0000\u009c"+ - "\u009d\u0003\u0016\u000b\u0000\u009d\u00bc\u0001\u0000\u0000\u0000\u009e"+ - "\u009f\u0005\u000e\u0000\u0000\u009f\u00a0\u0005\u0005\u0000\u0000\u00a0"+ - "\u00a1\u0003\u001c\u000e\u0000\u00a1\u00a2\u0005\u0006\u0000\u0000\u00a2"+ - "\u00a3\u0003\u0016\u000b\u0000\u00a3\u00bc\u0001\u0000\u0000\u0000\u00a4"+ - "\u00a5\u0005\u000f\u0000\u0000\u00a5\u00a6\u0003\u0016\u000b\u0000\u00a6"+ - "\u00a7\u0005\u000e\u0000\u0000\u00a7\u00a8\u0005\u0005\u0000\u0000\u00a8"+ - "\u00a9\u0003\u001c\u000e\u0000\u00a9\u00ab\u0005\u0006\u0000\u0000\u00aa"+ - "\u00ac\u0005\u0004\u0000\u0000\u00ab\u00aa\u0001\u0000\u0000\u0000\u00ab"+ - "\u00ac\u0001\u0000\u0000\u0000\u00ac\u00bc\u0001\u0000\u0000\u0000\u00ad"+ - "\u00ae\u0005\u0010\u0000\u0000\u00ae\u00af\u0003\u001c\u000e\u0000\u00af"+ - "\u00b0\u0005\u0004\u0000\u0000\u00b0\u00bc\u0001\u0000\u0000\u0000\u00b1"+ - "\u00b2\u0005\u0010\u0000\u0000\u00b2\u00bc\u0005\u0004\u0000\u0000\u00b3"+ - "\u00b4\u0005\u0011\u0000\u0000\u00b4\u00bc\u0005\u0004\u0000\u0000\u00b5"+ - "\u00b6\u0003$\u0012\u0000\u00b6\u00b7\u0005\u0004\u0000\u0000\u00b7\u00bc"+ - "\u0001\u0000\u0000\u0000\u00b8\u00b9\u0003\u001a\r\u0000\u00b9\u00ba\u0005"+ - "\u0004\u0000\u0000\u00ba\u00bc\u0001\u0000\u0000\u0000\u00bb\u008b\u0001"+ - "\u0000\u0000\u0000\u00bb\u0094\u0001\u0000\u0000\u0000\u00bb\u009e\u0001"+ - "\u0000\u0000\u0000\u00bb\u00a4\u0001\u0000\u0000\u0000\u00bb\u00ad\u0001"+ - "\u0000\u0000\u0000\u00bb\u00b1\u0001\u0000\u0000\u0000\u00bb\u00b3\u0001"+ - "\u0000\u0000\u0000\u00bb\u00b5\u0001\u0000\u0000\u0000\u00bb\u00b8\u0001"+ - "\u0000\u0000\u0000\u00bc\u0019\u0001\u0000\u0000\u0000\u00bd\u00c7\u0003"+ - "&\u0013\u0000\u00be\u00bf\u0005\u0014\u0000\u0000\u00bf\u00c0\u0003\n"+ - "\u0005\u0000\u00c0\u00c2\u0005\u0005\u0000\u0000\u00c1\u00c3\u0003,\u0016"+ - "\u0000\u00c2\u00c1\u0001\u0000\u0000\u0000\u00c2\u00c3\u0001\u0000\u0000"+ - "\u0000\u00c3\u00c4\u0001\u0000\u0000\u0000\u00c4\u00c5\u0005\u0006\u0000"+ - "\u0000\u00c5\u00c7\u0001\u0000\u0000\u0000\u00c6\u00bd\u0001\u0000\u0000"+ - "\u0000\u00c6\u00be\u0001\u0000\u0000\u0000\u00c7\u001b\u0001\u0000\u0000"+ - "\u0000\u00c8\u00c9\u0006\u000e\uffff\uffff\u0000\u00c9\u00ca\u0003 \u0010"+ - "\u0000\u00ca\u00cb\u0003\u001c\u000e\u0007\u00cb\u00d6\u0001\u0000\u0000"+ - "\u0000\u00cc\u00d6\u0003.\u0017\u0000\u00cd\u00ce\u0005\u0005\u0000\u0000"+ - "\u00ce\u00cf\u0003\u001c\u000e\u0000\u00cf\u00d0\u0005\u0006\u0000\u0000"+ - "\u00d0\u00d6\u0001\u0000\u0000\u0000\u00d1\u00d6\u0003\"\u0011\u0000\u00d2"+ - "\u00d6\u0003\u001a\r\u0000\u00d3\u00d6\u0005\u0016\u0000\u0000\u00d4\u00d6"+ - "\u0005\u0015\u0000\u0000\u00d5\u00c8\u0001\u0000\u0000\u0000\u00d5\u00cc"+ - "\u0001\u0000\u0000\u0000\u00d5\u00cd\u0001\u0000\u0000\u0000\u00d5\u00d1"+ - "\u0001\u0000\u0000\u0000\u00d5\u00d2\u0001\u0000\u0000\u0000\u00d5\u00d3"+ - "\u0001\u0000\u0000\u0000\u00d5\u00d4\u0001\u0000\u0000\u0000\u00d6\u00dd"+ - "\u0001\u0000\u0000\u0000\u00d7\u00d8\n\b\u0000\u0000\u00d8\u00d9\u0003"+ - "\u001e\u000f\u0000\u00d9\u00da\u0003\u001c\u000e\t\u00da\u00dc\u0001\u0000"+ - "\u0000\u0000\u00db\u00d7\u0001\u0000\u0000\u0000\u00dc\u00df\u0001\u0000"+ - "\u0000\u0000\u00dd\u00db\u0001\u0000\u0000\u0000\u00dd\u00de\u0001\u0000"+ - "\u0000\u0000\u00de\u001d\u0001\u0000\u0000\u0000\u00df\u00dd\u0001\u0000"+ - "\u0000\u0000\u00e0\u00e1\u0007\u0001\u0000\u0000\u00e1\u001f\u0001\u0000"+ - "\u0000\u0000\u00e2\u00e3\u0007\u0002\u0000\u0000\u00e3!\u0001\u0000\u0000"+ - "\u0000\u00e4\u00e5\u0005\u0016\u0000\u0000\u00e5\u00e7\u0005\u0012\u0000"+ - "\u0000\u00e6\u00e4\u0001\u0000\u0000\u0000\u00e6\u00e7\u0001\u0000\u0000"+ - "\u0000\u00e7\u00ed\u0001\u0000\u0000\u0000\u00e8\u00e9\u0003(\u0014\u0000"+ - "\u00e9\u00ea\u0005\u0012\u0000\u0000\u00ea\u00ec\u0001\u0000\u0000\u0000"+ - "\u00eb\u00e8\u0001\u0000\u0000\u0000\u00ec\u00ef\u0001\u0000\u0000\u0000"+ - "\u00ed\u00eb\u0001\u0000\u0000\u0000\u00ed\u00ee\u0001\u0000\u0000\u0000"+ - "\u00ee\u00f0\u0001\u0000\u0000\u0000\u00ef\u00ed\u0001\u0000\u0000\u0000"+ - "\u00f0\u00f1\u00030\u0018\u0000\u00f1#\u0001\u0000\u0000\u0000\u00f2\u00f3"+ - "\u0003\"\u0011\u0000\u00f3\u00f4\u0003\u0006\u0003\u0000\u00f4\u00f5\u0003"+ - "\u001c\u000e\u0000\u00f5%\u0001\u0000\u0000\u0000\u00f6\u00f7\u0005\u0016"+ - "\u0000\u0000\u00f7\u00f9\u0005\u0012\u0000\u0000\u00f8\u00f6\u0001\u0000"+ - "\u0000\u0000\u00f8\u00f9\u0001\u0000\u0000\u0000\u00f9\u00ff\u0001\u0000"+ - "\u0000\u0000\u00fa\u00fb\u0003(\u0014\u0000\u00fb\u00fc\u0005\u0012\u0000"+ - "\u0000\u00fc\u00fe\u0001\u0000\u0000\u0000\u00fd\u00fa\u0001\u0000\u0000"+ - "\u0000\u00fe\u0101\u0001\u0000\u0000\u0000\u00ff\u00fd\u0001\u0000\u0000"+ - "\u0000\u00ff\u0100\u0001\u0000\u0000\u0000\u0100\u0102\u0001\u0000\u0000"+ - "\u0000\u0101\u00ff\u0001\u0000\u0000\u0000\u0102\u0103\u0003*\u0015\u0000"+ - "\u0103\'\u0001\u0000\u0000\u0000\u0104\u0107\u0003*\u0015\u0000\u0105"+ - "\u0107\u00030\u0018\u0000\u0106\u0104\u0001\u0000\u0000\u0000\u0106\u0105"+ - "\u0001\u0000\u0000\u0000\u0107)\u0001\u0000\u0000\u0000\u0108\u0109\u0003"+ - "0\u0018\u0000\u0109\u010b\u0005\u0005\u0000\u0000\u010a\u010c\u0003,\u0016"+ - "\u0000\u010b\u010a\u0001\u0000\u0000\u0000\u010b\u010c\u0001\u0000\u0000"+ - "\u0000\u010c\u010d\u0001\u0000\u0000\u0000\u010d\u010e\u0005\u0006\u0000"+ - "\u0000\u010e+\u0001\u0000\u0000\u0000\u010f\u0114\u0003\u001c\u000e\u0000"+ - "\u0110\u0111\u0005\n\u0000\u0000\u0111\u0113\u0003\u001c\u000e\u0000\u0112"+ - "\u0110\u0001\u0000\u0000\u0000\u0113\u0116\u0001\u0000\u0000\u0000\u0114"+ - "\u0112\u0001\u0000\u0000\u0000\u0114\u0115\u0001\u0000\u0000\u0000\u0115"+ - "-\u0001\u0000\u0000\u0000\u0116\u0114\u0001\u0000\u0000\u0000\u0117\u0118"+ - "\u0007\u0003\u0000\u0000\u0118/\u0001\u0000\u0000\u0000\u0119\u011a\u0005"+ - "-\u0000\u0000\u011a1\u0001\u0000\u0000\u0000\u00197<>DRX_q{\u0084\u0086"+ - "\u0092\u00ab\u00bb\u00c2\u00c6\u00d5\u00dd\u00e6\u00ed\u00f8\u00ff\u0106"+ - "\u010b\u0114"; + "\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0003\u000e"+ + "\u00d4\b\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0005\u000e"+ + "\u00da\b\u000e\n\u000e\f\u000e\u00dd\t\u000e\u0001\u000f\u0001\u000f\u0001"+ + "\u0010\u0001\u0010\u0001\u0011\u0001\u0011\u0003\u0011\u00e5\b\u0011\u0001"+ + "\u0011\u0001\u0011\u0001\u0011\u0005\u0011\u00ea\b\u0011\n\u0011\f\u0011"+ + "\u00ed\t\u0011\u0001\u0011\u0001\u0011\u0001\u0012\u0001\u0012\u0001\u0012"+ + "\u0001\u0012\u0001\u0013\u0001\u0013\u0003\u0013\u00f7\b\u0013\u0001\u0013"+ + "\u0001\u0013\u0001\u0013\u0005\u0013\u00fc\b\u0013\n\u0013\f\u0013\u00ff"+ + "\t\u0013\u0001\u0013\u0001\u0013\u0001\u0014\u0001\u0014\u0003\u0014\u0105"+ + "\b\u0014\u0001\u0015\u0001\u0015\u0001\u0015\u0003\u0015\u010a\b\u0015"+ + "\u0001\u0015\u0001\u0015\u0001\u0016\u0001\u0016\u0001\u0016\u0005\u0016"+ + "\u0111\b\u0016\n\u0016\f\u0016\u0114\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+,..\u0126\u00002\u0001\u0000\u0000\u0000\u0002D\u0001"+ + "\u0000\u0000\u0000\u0004J\u0001\u0000\u0000\u0000\u0006N\u0001\u0000\u0000"+ + "\u0000\bR\u0001\u0000\u0000\u0000\nX\u0001\u0000\u0000\u0000\fZ\u0001"+ + "\u0000\u0000\u0000\u000ed\u0001\u0000\u0000\u0000\u0010m\u0001\u0000\u0000"+ + "\u0000\u0012v\u0001\u0000\u0000\u0000\u0014~\u0001\u0000\u0000\u0000\u0016"+ + "\u0081\u0001\u0000\u0000\u0000\u0018\u00bb\u0001\u0000\u0000\u0000\u001a"+ + "\u00c6\u0001\u0000\u0000\u0000\u001c\u00d3\u0001\u0000\u0000\u0000\u001e"+ + "\u00de\u0001\u0000\u0000\u0000 \u00e0\u0001\u0000\u0000\u0000\"\u00e4"+ + "\u0001\u0000\u0000\u0000$\u00f0\u0001\u0000\u0000\u0000&\u00f6\u0001\u0000"+ + "\u0000\u0000(\u0104\u0001\u0000\u0000\u0000*\u0106\u0001\u0000\u0000\u0000"+ + ",\u010d\u0001\u0000\u0000\u0000.\u0115\u0001\u0000\u0000\u00000\u0117"+ + "\u0001\u0000\u0000\u000023\u0005\u0013\u0000\u000034\u0005\u0001\u0000"+ + "\u000045\u00030\u0018\u000057\u0005\u0002\u0000\u000068\u0003\u000e\u0007"+ + "\u000076\u0001\u0000\u0000\u000078\u0001\u0000\u0000\u00008>\u0001\u0000"+ + "\u0000\u00009=\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\u0000"+ + "AB\u0005\u0003\u0000\u0000B\u0001\u0001\u0000\u0000\u0000CE\u0005\u0013"+ + "\u0000\u0000DC\u0001\u0000\u0000\u0000DE\u0001\u0000\u0000\u0000EF\u0001"+ + "\u0000\u0000\u0000FG\u0003\n\u0005\u0000GH\u00030\u0018\u0000HI\u0005"+ + "\u0004\u0000\u0000I\u0003\u0001\u0000\u0000\u0000JK\u0003\n\u0005\u0000"+ + "KL\u00030\u0018\u0000LM\u0005\u0004\u0000\u0000M\u0005\u0001\u0000\u0000"+ + "\u0000NO\u0007\u0000\u0000\u0000O\u0007\u0001\u0000\u0000\u0000PS\u0003"+ + "\n\u0005\u0000QS\u0005)\u0000\u0000RP\u0001\u0000\u0000\u0000RQ\u0001"+ + "\u0000\u0000\u0000S\t\u0001\u0000\u0000\u0000TY\u0005\'\u0000\u0000UY"+ + "\u0005(\u0000\u0000VY\u0005*\u0000\u0000WY\u00030\u0018\u0000XT\u0001"+ + "\u0000\u0000\u0000XU\u0001\u0000\u0000\u0000XV\u0001\u0000\u0000\u0000"+ + "XW\u0001\u0000\u0000\u0000Y\u000b\u0001\u0000\u0000\u0000Z[\u0005\u0013"+ + "\u0000\u0000[\\\u0003\b\u0004\u0000\\]\u00030\u0018\u0000]_\u0005\u0005"+ + "\u0000\u0000^`\u0003\u0012\t\u0000_^\u0001\u0000\u0000\u0000_`\u0001\u0000"+ + "\u0000\u0000`a\u0001\u0000\u0000\u0000ab\u0005\u0006\u0000\u0000bc\u0003"+ + "\u0016\u000b\u0000c\r\u0001\u0000\u0000\u0000de\u0005\u0013\u0000\u0000"+ + "ef\u0005\u0007\u0000\u0000fg\u0005)\u0000\u0000gh\u0005\b\u0000\u0000"+ + "hi\u0005\u0005\u0000\u0000ij\u0005\t\u0000\u0000jk\u0005\u0006\u0000\u0000"+ + "kl\u0003\u0016\u000b\u0000l\u000f\u0001\u0000\u0000\u0000mn\u0005\u0013"+ + "\u0000\u0000no\u00030\u0018\u0000oq\u0005\u0005\u0000\u0000pr\u0003\u0012"+ + "\t\u0000qp\u0001\u0000\u0000\u0000qr\u0001\u0000\u0000\u0000rs\u0001\u0000"+ + "\u0000\u0000st\u0005\u0006\u0000\u0000tu\u0003\u0016\u000b\u0000u\u0011"+ + "\u0001\u0000\u0000\u0000v{\u0003\u0014\n\u0000wx\u0005\n\u0000\u0000x"+ + "z\u0003\u0014\n\u0000yw\u0001\u0000\u0000\u0000z}\u0001\u0000\u0000\u0000"+ + "{y\u0001\u0000\u0000\u0000{|\u0001\u0000\u0000\u0000|\u0013\u0001\u0000"+ + "\u0000\u0000}{\u0001\u0000\u0000\u0000~\u007f\u0003\n\u0005\u0000\u007f"+ + "\u0080\u00030\u0018\u0000\u0080\u0015\u0001\u0000\u0000\u0000\u0081\u0086"+ + "\u0005\u0002\u0000\u0000\u0082\u0085\u0003\u0004\u0002\u0000\u0083\u0085"+ + "\u0003\u0018\f\u0000\u0084\u0082\u0001\u0000\u0000\u0000\u0084\u0083\u0001"+ + "\u0000\u0000\u0000\u0085\u0088\u0001\u0000\u0000\u0000\u0086\u0084\u0001"+ + "\u0000\u0000\u0000\u0086\u0087\u0001\u0000\u0000\u0000\u0087\u0089\u0001"+ + "\u0000\u0000\u0000\u0088\u0086\u0001\u0000\u0000\u0000\u0089\u008a\u0005"+ + "\u0003\u0000\u0000\u008a\u0017\u0001\u0000\u0000\u0000\u008b\u008c\u0005"+ + "\u000b\u0000\u0000\u008c\u008d\u0005\u0005\u0000\u0000\u008d\u008e\u0003"+ + "\u001c\u000e\u0000\u008e\u008f\u0005\u0006\u0000\u0000\u008f\u0092\u0003"+ + "\u0016\u000b\u0000\u0090\u0091\u0005\f\u0000\u0000\u0091\u0093\u0003\u0016"+ + "\u000b\u0000\u0092\u0090\u0001\u0000\u0000\u0000\u0092\u0093\u0001\u0000"+ + "\u0000\u0000\u0093\u00bc\u0001\u0000\u0000\u0000\u0094\u0095\u0005\r\u0000"+ + "\u0000\u0095\u0096\u0005\u0005\u0000\u0000\u0096\u0097\u0003$\u0012\u0000"+ + "\u0097\u0098\u0005\u0004\u0000\u0000\u0098\u0099\u0003\u001c\u000e\u0000"+ + "\u0099\u009a\u0005\u0004\u0000\u0000\u009a\u009b\u0003$\u0012\u0000\u009b"+ + "\u009c\u0005\u0006\u0000\u0000\u009c\u009d\u0003\u0016\u000b\u0000\u009d"+ + "\u00bc\u0001\u0000\u0000\u0000\u009e\u009f\u0005\u000e\u0000\u0000\u009f"+ + "\u00a0\u0005\u0005\u0000\u0000\u00a0\u00a1\u0003\u001c\u000e\u0000\u00a1"+ + "\u00a2\u0005\u0006\u0000\u0000\u00a2\u00a3\u0003\u0016\u000b\u0000\u00a3"+ + "\u00bc\u0001\u0000\u0000\u0000\u00a4\u00a5\u0005\u000f\u0000\u0000\u00a5"+ + "\u00a6\u0003\u0016\u000b\u0000\u00a6\u00a7\u0005\u000e\u0000\u0000\u00a7"+ + "\u00a8\u0005\u0005\u0000\u0000\u00a8\u00a9\u0003\u001c\u000e\u0000\u00a9"+ + "\u00ab\u0005\u0006\u0000\u0000\u00aa\u00ac\u0005\u0004\u0000\u0000\u00ab"+ + "\u00aa\u0001\u0000\u0000\u0000\u00ab\u00ac\u0001\u0000\u0000\u0000\u00ac"+ + "\u00bc\u0001\u0000\u0000\u0000\u00ad\u00ae\u0005\u0010\u0000\u0000\u00ae"+ + "\u00af\u0003\u001c\u000e\u0000\u00af\u00b0\u0005\u0004\u0000\u0000\u00b0"+ + "\u00bc\u0001\u0000\u0000\u0000\u00b1\u00b2\u0005\u0010\u0000\u0000\u00b2"+ + "\u00bc\u0005\u0004\u0000\u0000\u00b3\u00b4\u0005\u0011\u0000\u0000\u00b4"+ + "\u00bc\u0005\u0004\u0000\u0000\u00b5\u00b6\u0003$\u0012\u0000\u00b6\u00b7"+ + "\u0005\u0004\u0000\u0000\u00b7\u00bc\u0001\u0000\u0000\u0000\u00b8\u00b9"+ + "\u0003\u001a\r\u0000\u00b9\u00ba\u0005\u0004\u0000\u0000\u00ba\u00bc\u0001"+ + "\u0000\u0000\u0000\u00bb\u008b\u0001\u0000\u0000\u0000\u00bb\u0094\u0001"+ + "\u0000\u0000\u0000\u00bb\u009e\u0001\u0000\u0000\u0000\u00bb\u00a4\u0001"+ + "\u0000\u0000\u0000\u00bb\u00ad\u0001\u0000\u0000\u0000\u00bb\u00b1\u0001"+ + "\u0000\u0000\u0000\u00bb\u00b3\u0001\u0000\u0000\u0000\u00bb\u00b5\u0001"+ + "\u0000\u0000\u0000\u00bb\u00b8\u0001\u0000\u0000\u0000\u00bc\u0019\u0001"+ + "\u0000\u0000\u0000\u00bd\u00c7\u0003&\u0013\u0000\u00be\u00bf\u0005\u0014"+ + "\u0000\u0000\u00bf\u00c0\u0003\n\u0005\u0000\u00c0\u00c2\u0005\u0005\u0000"+ + "\u0000\u00c1\u00c3\u0003,\u0016\u0000\u00c2\u00c1\u0001\u0000\u0000\u0000"+ + "\u00c2\u00c3\u0001\u0000\u0000\u0000\u00c3\u00c4\u0001\u0000\u0000\u0000"+ + "\u00c4\u00c5\u0005\u0006\u0000\u0000\u00c5\u00c7\u0001\u0000\u0000\u0000"+ + "\u00c6\u00bd\u0001\u0000\u0000\u0000\u00c6\u00be\u0001\u0000\u0000\u0000"+ + "\u00c7\u001b\u0001\u0000\u0000\u0000\u00c8\u00c9\u0006\u000e\uffff\uffff"+ + "\u0000\u00c9\u00ca\u0003 \u0010\u0000\u00ca\u00cb\u0003\u001c\u000e\u0005"+ + "\u00cb\u00d4\u0001\u0000\u0000\u0000\u00cc\u00d4\u0003.\u0017\u0000\u00cd"+ + "\u00ce\u0005\u0005\u0000\u0000\u00ce\u00cf\u0003\u001c\u000e\u0000\u00cf"+ + "\u00d0\u0005\u0006\u0000\u0000\u00d0\u00d4\u0001\u0000\u0000\u0000\u00d1"+ + "\u00d4\u0003\"\u0011\u0000\u00d2\u00d4\u0003\u001a\r\u0000\u00d3\u00c8"+ + "\u0001\u0000\u0000\u0000\u00d3\u00cc\u0001\u0000\u0000\u0000\u00d3\u00cd"+ + "\u0001\u0000\u0000\u0000\u00d3\u00d1\u0001\u0000\u0000\u0000\u00d3\u00d2"+ + "\u0001\u0000\u0000\u0000\u00d4\u00db\u0001\u0000\u0000\u0000\u00d5\u00d6"+ + "\n\u0006\u0000\u0000\u00d6\u00d7\u0003\u001e\u000f\u0000\u00d7\u00d8\u0003"+ + "\u001c\u000e\u0007\u00d8\u00da\u0001\u0000\u0000\u0000\u00d9\u00d5\u0001"+ + "\u0000\u0000\u0000\u00da\u00dd\u0001\u0000\u0000\u0000\u00db\u00d9\u0001"+ + "\u0000\u0000\u0000\u00db\u00dc\u0001\u0000\u0000\u0000\u00dc\u001d\u0001"+ + "\u0000\u0000\u0000\u00dd\u00db\u0001\u0000\u0000\u0000\u00de\u00df\u0007"+ + "\u0001\u0000\u0000\u00df\u001f\u0001\u0000\u0000\u0000\u00e0\u00e1\u0007"+ + "\u0002\u0000\u0000\u00e1!\u0001\u0000\u0000\u0000\u00e2\u00e3\u0005\u0016"+ + "\u0000\u0000\u00e3\u00e5\u0005\u0012\u0000\u0000\u00e4\u00e2\u0001\u0000"+ + "\u0000\u0000\u00e4\u00e5\u0001\u0000\u0000\u0000\u00e5\u00eb\u0001\u0000"+ + "\u0000\u0000\u00e6\u00e7\u0003(\u0014\u0000\u00e7\u00e8\u0005\u0012\u0000"+ + "\u0000\u00e8\u00ea\u0001\u0000\u0000\u0000\u00e9\u00e6\u0001\u0000\u0000"+ + "\u0000\u00ea\u00ed\u0001\u0000\u0000\u0000\u00eb\u00e9\u0001\u0000\u0000"+ + "\u0000\u00eb\u00ec\u0001\u0000\u0000\u0000\u00ec\u00ee\u0001\u0000\u0000"+ + "\u0000\u00ed\u00eb\u0001\u0000\u0000\u0000\u00ee\u00ef\u00030\u0018\u0000"+ + "\u00ef#\u0001\u0000\u0000\u0000\u00f0\u00f1\u0003\"\u0011\u0000\u00f1"+ + "\u00f2\u0003\u0006\u0003\u0000\u00f2\u00f3\u0003\u001c\u000e\u0000\u00f3"+ + "%\u0001\u0000\u0000\u0000\u00f4\u00f5\u0005\u0016\u0000\u0000\u00f5\u00f7"+ + "\u0005\u0012\u0000\u0000\u00f6\u00f4\u0001\u0000\u0000\u0000\u00f6\u00f7"+ + "\u0001\u0000\u0000\u0000\u00f7\u00fd\u0001\u0000\u0000\u0000\u00f8\u00f9"+ + "\u0003(\u0014\u0000\u00f9\u00fa\u0005\u0012\u0000\u0000\u00fa\u00fc\u0001"+ + "\u0000\u0000\u0000\u00fb\u00f8\u0001\u0000\u0000\u0000\u00fc\u00ff\u0001"+ + "\u0000\u0000\u0000\u00fd\u00fb\u0001\u0000\u0000\u0000\u00fd\u00fe\u0001"+ + "\u0000\u0000\u0000\u00fe\u0100\u0001\u0000\u0000\u0000\u00ff\u00fd\u0001"+ + "\u0000\u0000\u0000\u0100\u0101\u0003*\u0015\u0000\u0101\'\u0001\u0000"+ + "\u0000\u0000\u0102\u0105\u0003*\u0015\u0000\u0103\u0105\u00030\u0018\u0000"+ + "\u0104\u0102\u0001\u0000\u0000\u0000\u0104\u0103\u0001\u0000\u0000\u0000"+ + "\u0105)\u0001\u0000\u0000\u0000\u0106\u0107\u00030\u0018\u0000\u0107\u0109"+ + "\u0005\u0005\u0000\u0000\u0108\u010a\u0003,\u0016\u0000\u0109\u0108\u0001"+ + "\u0000\u0000\u0000\u0109\u010a\u0001\u0000\u0000\u0000\u010a\u010b\u0001"+ + "\u0000\u0000\u0000\u010b\u010c\u0005\u0006\u0000\u0000\u010c+\u0001\u0000"+ + "\u0000\u0000\u010d\u0112\u0003\u001c\u000e\u0000\u010e\u010f\u0005\n\u0000"+ + "\u0000\u010f\u0111\u0003\u001c\u000e\u0000\u0110\u010e\u0001\u0000\u0000"+ + "\u0000\u0111\u0114\u0001\u0000\u0000\u0000\u0112\u0110\u0001\u0000\u0000"+ + "\u0000\u0112\u0113\u0001\u0000\u0000\u0000\u0113-\u0001\u0000\u0000\u0000"+ + "\u0114\u0112\u0001\u0000\u0000\u0000\u0115\u0116\u0007\u0003\u0000\u0000"+ + "\u0116/\u0001\u0000\u0000\u0000\u0117\u0118\u0005-\u0000\u0000\u01181"+ + "\u0001\u0000\u0000\u0000\u00197<>DRX_q{\u0084\u0086\u0092\u00ab\u00bb"+ + "\u00c2\u00c6\u00d3\u00db\u00e4\u00eb\u00f6\u00fd\u0104\u0109\u0112"; 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 ba2600d..9c24df8 100644 --- a/src/main/java/de/maishai/antlr/DecafVisitor.java +++ b/src/main/java/de/maishai/antlr/DecafVisitor.java @@ -159,13 +159,6 @@ public interface DecafVisitor extends ParseTreeVisitor { * @return the visitor result */ T visitNew(DecafParser.NewContext ctx); - /** - * Visit a parse tree produced by the {@code Null} - * labeled alternative in {@link DecafParser#expr}. - * @param ctx the parse tree - * @return the visitor result - */ - T visitNull(DecafParser.NullContext ctx); /** * Visit a parse tree produced by the {@code UnaryOperation} * labeled alternative in {@link DecafParser#expr}. @@ -201,13 +194,6 @@ public interface DecafVisitor extends ParseTreeVisitor { * @return the visitor result */ T visitBinaryOperation(DecafParser.BinaryOperationContext ctx); - /** - * Visit a parse tree produced by the {@code This} - * labeled alternative in {@link DecafParser#expr}. - * @param ctx the parse tree - * @return the visitor result - */ - T visitThis(DecafParser.ThisContext ctx); /** * Visit a parse tree produced by the {@code StatementExpressionexpr} * labeled alternative in {@link DecafParser#expr}. diff --git a/src/main/java/de/maishai/ast/records/Expression.java b/src/main/java/de/maishai/ast/records/Expression.java index 974c05b..2463f86 100644 --- a/src/main/java/de/maishai/ast/records/Expression.java +++ b/src/main/java/de/maishai/ast/records/Expression.java @@ -1,5 +1,5 @@ package de.maishai.ast.records; -public sealed interface Expression extends Node permits Binary, BoolLiteral, CharLiteral, FieldVarAccess, IntLiteral, MethodCall, New, Null, This, Unary { +public sealed interface Expression extends Node permits Binary, BoolLiteral, CharLiteral, FieldVarAccess, IntLiteral, MethodCall, New, Unary { } diff --git a/src/main/java/de/maishai/ast/records/Null.java b/src/main/java/de/maishai/ast/records/Null.java deleted file mode 100644 index 5d184eb..0000000 --- a/src/main/java/de/maishai/ast/records/Null.java +++ /dev/null @@ -1,5 +0,0 @@ -package de.maishai.ast.records; - - -public record Null() implements Expression { -} diff --git a/src/main/java/de/maishai/ast/records/This.java b/src/main/java/de/maishai/ast/records/This.java deleted file mode 100644 index 38c8cc3..0000000 --- a/src/main/java/de/maishai/ast/records/This.java +++ /dev/null @@ -1,5 +0,0 @@ -package de.maishai.ast.records; - - -public record This() implements Expression { -}