diff --git a/src/main/antlr/Decaf.g4 b/src/main/antlr/Decaf.g4 index 507ddba..493b7d4 100644 --- a/src/main/antlr/Decaf.g4 +++ b/src/main/antlr/Decaf.g4 @@ -3,7 +3,7 @@ grammar Decaf; class : PUBLIC 'class' id '{' mainmeth? (field | meth | constructor)* '}'; -field : type id ';'; +field : PUBLIC? type id ';'; localVar : type id ';'; assignSign : ASSIGN | ADD_ASSIGN | SUB_ASSIGN | MUL_ASSIGN; returntype : type | VOID; diff --git a/src/main/java/de/maishai/antlr/Decaf.interp b/src/main/java/de/maishai/antlr/Decaf.interp index 161958c..308d5ac 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, 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, 1, 8, 1, 8, 1, 8, 3, 8, 111, 8, 8, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 5, 9, 119, 8, 9, 10, 9, 12, 9, 122, 9, 9, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 5, 11, 130, 8, 11, 10, 11, 12, 11, 133, 9, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 3, 12, 144, 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, 169, 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, 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, 106, 1, 0, 0, 0, 18, 115, 1, 0, 0, 0, 20, 123, 1, 0, 0, 0, 22, 126, 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, 107, 5, 19, 0, 0, 107, 108, 3, 48, 24, 0, 108, 110, 5, 5, 0, 0, 109, 111, 3, 18, 9, 0, 110, 109, 1, 0, 0, 0, 110, 111, 1, 0, 0, 0, 111, 112, 1, 0, 0, 0, 112, 113, 5, 6, 0, 0, 113, 114, 3, 22, 11, 0, 114, 17, 1, 0, 0, 0, 115, 120, 3, 20, 10, 0, 116, 117, 5, 10, 0, 0, 117, 119, 3, 20, 10, 0, 118, 116, 1, 0, 0, 0, 119, 122, 1, 0, 0, 0, 120, 118, 1, 0, 0, 0, 120, 121, 1, 0, 0, 0, 121, 19, 1, 0, 0, 0, 122, 120, 1, 0, 0, 0, 123, 124, 3, 10, 5, 0, 124, 125, 3, 48, 24, 0, 125, 21, 1, 0, 0, 0, 126, 131, 5, 2, 0, 0, 127, 130, 3, 4, 2, 0, 128, 130, 3, 24, 12, 0, 129, 127, 1, 0, 0, 0, 129, 128, 1, 0, 0, 0, 130, 133, 1, 0, 0, 0, 131, 129, 1, 0, 0, 0, 131, 132, 1, 0, 0, 0, 132, 134, 1, 0, 0, 0, 133, 131, 1, 0, 0, 0, 134, 135, 5, 3, 0, 0, 135, 23, 1, 0, 0, 0, 136, 137, 5, 11, 0, 0, 137, 138, 5, 5, 0, 0, 138, 139, 3, 28, 14, 0, 139, 140, 5, 6, 0, 0, 140, 143, 3, 22, 11, 0, 141, 142, 5, 12, 0, 0, 142, 144, 3, 22, 11, 0, 143, 141, 1, 0, 0, 0, 143, 144, 1, 0, 0, 0, 144, 185, 1, 0, 0, 0, 145, 146, 5, 13, 0, 0, 146, 147, 5, 5, 0, 0, 147, 148, 3, 36, 18, 0, 148, 149, 5, 4, 0, 0, 149, 150, 3, 28, 14, 0, 150, 151, 5, 4, 0, 0, 151, 152, 3, 36, 18, 0, 152, 153, 5, 6, 0, 0, 153, 154, 3, 22, 11, 0, 154, 185, 1, 0, 0, 0, 155, 156, 5, 14, 0, 0, 156, 157, 5, 5, 0, 0, 157, 158, 3, 28, 14, 0, 158, 159, 5, 6, 0, 0, 159, 160, 3, 22, 11, 0, 160, 185, 1, 0, 0, 0, 161, 162, 5, 15, 0, 0, 162, 163, 3, 22, 11, 0, 163, 164, 5, 14, 0, 0, 164, 165, 5, 5, 0, 0, 165, 166, 3, 28, 14, 0, 166, 168, 5, 6, 0, 0, 167, 169, 5, 4, 0, 0, 168, 167, 1, 0, 0, 0, 168, 169, 1, 0, 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, 136, 1, 0, 0, 0, 184, 145, 1, 0, 0, 0, 184, 155, 1, 0, 0, 0, 184, 161, 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, 34, 17, 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, 110, 120, 129, 131, 143, 168, 184, 191, 195, 209, 217, 226, 233, 244, 251, 258, 263, 272] \ No newline at end of file +[4, 1, 49, 283, 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, 3, 14, 213, 8, 14, 1, 14, 1, 14, 1, 14, 1, 14, 5, 14, 219, 8, 14, 10, 14, 12, 14, 222, 9, 14, 1, 15, 1, 15, 1, 16, 1, 16, 1, 17, 1, 17, 3, 17, 230, 8, 17, 1, 17, 1, 17, 1, 17, 5, 17, 235, 8, 17, 10, 17, 12, 17, 238, 9, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 3, 19, 248, 8, 19, 1, 19, 1, 19, 1, 19, 5, 19, 253, 8, 19, 10, 19, 12, 19, 256, 9, 19, 1, 19, 1, 19, 1, 20, 1, 20, 3, 20, 262, 8, 20, 1, 21, 1, 21, 1, 21, 3, 21, 267, 8, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 5, 22, 274, 8, 22, 10, 22, 12, 22, 277, 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, 296, 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, 212, 1, 0, 0, 0, 30, 223, 1, 0, 0, 0, 32, 225, 1, 0, 0, 0, 34, 229, 1, 0, 0, 0, 36, 241, 1, 0, 0, 0, 38, 247, 1, 0, 0, 0, 40, 261, 1, 0, 0, 0, 42, 263, 1, 0, 0, 0, 44, 270, 1, 0, 0, 0, 46, 278, 1, 0, 0, 0, 48, 280, 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, 6, 203, 213, 1, 0, 0, 0, 204, 213, 3, 46, 23, 0, 205, 206, 5, 5, 0, 0, 206, 207, 3, 28, 14, 0, 207, 208, 5, 6, 0, 0, 208, 213, 1, 0, 0, 0, 209, 213, 3, 34, 17, 0, 210, 213, 3, 26, 13, 0, 211, 213, 5, 21, 0, 0, 212, 200, 1, 0, 0, 0, 212, 204, 1, 0, 0, 0, 212, 205, 1, 0, 0, 0, 212, 209, 1, 0, 0, 0, 212, 210, 1, 0, 0, 0, 212, 211, 1, 0, 0, 0, 213, 220, 1, 0, 0, 0, 214, 215, 10, 7, 0, 0, 215, 216, 3, 30, 15, 0, 216, 217, 3, 28, 14, 8, 217, 219, 1, 0, 0, 0, 218, 214, 1, 0, 0, 0, 219, 222, 1, 0, 0, 0, 220, 218, 1, 0, 0, 0, 220, 221, 1, 0, 0, 0, 221, 29, 1, 0, 0, 0, 222, 220, 1, 0, 0, 0, 223, 224, 7, 1, 0, 0, 224, 31, 1, 0, 0, 0, 225, 226, 7, 2, 0, 0, 226, 33, 1, 0, 0, 0, 227, 228, 5, 22, 0, 0, 228, 230, 5, 18, 0, 0, 229, 227, 1, 0, 0, 0, 229, 230, 1, 0, 0, 0, 230, 236, 1, 0, 0, 0, 231, 232, 3, 40, 20, 0, 232, 233, 5, 18, 0, 0, 233, 235, 1, 0, 0, 0, 234, 231, 1, 0, 0, 0, 235, 238, 1, 0, 0, 0, 236, 234, 1, 0, 0, 0, 236, 237, 1, 0, 0, 0, 237, 239, 1, 0, 0, 0, 238, 236, 1, 0, 0, 0, 239, 240, 3, 48, 24, 0, 240, 35, 1, 0, 0, 0, 241, 242, 3, 34, 17, 0, 242, 243, 3, 6, 3, 0, 243, 244, 3, 28, 14, 0, 244, 37, 1, 0, 0, 0, 245, 246, 5, 22, 0, 0, 246, 248, 5, 18, 0, 0, 247, 245, 1, 0, 0, 0, 247, 248, 1, 0, 0, 0, 248, 254, 1, 0, 0, 0, 249, 250, 3, 40, 20, 0, 250, 251, 5, 18, 0, 0, 251, 253, 1, 0, 0, 0, 252, 249, 1, 0, 0, 0, 253, 256, 1, 0, 0, 0, 254, 252, 1, 0, 0, 0, 254, 255, 1, 0, 0, 0, 255, 257, 1, 0, 0, 0, 256, 254, 1, 0, 0, 0, 257, 258, 3, 42, 21, 0, 258, 39, 1, 0, 0, 0, 259, 262, 3, 42, 21, 0, 260, 262, 3, 48, 24, 0, 261, 259, 1, 0, 0, 0, 261, 260, 1, 0, 0, 0, 262, 41, 1, 0, 0, 0, 263, 264, 3, 48, 24, 0, 264, 266, 5, 5, 0, 0, 265, 267, 3, 44, 22, 0, 266, 265, 1, 0, 0, 0, 266, 267, 1, 0, 0, 0, 267, 268, 1, 0, 0, 0, 268, 269, 5, 6, 0, 0, 269, 43, 1, 0, 0, 0, 270, 275, 3, 28, 14, 0, 271, 272, 5, 10, 0, 0, 272, 274, 3, 28, 14, 0, 273, 271, 1, 0, 0, 0, 274, 277, 1, 0, 0, 0, 275, 273, 1, 0, 0, 0, 275, 276, 1, 0, 0, 0, 276, 45, 1, 0, 0, 0, 277, 275, 1, 0, 0, 0, 278, 279, 7, 3, 0, 0, 279, 47, 1, 0, 0, 0, 280, 281, 5, 45, 0, 0, 281, 49, 1, 0, 0, 0, 25, 55, 60, 62, 68, 82, 88, 95, 113, 123, 132, 134, 146, 171, 187, 194, 198, 212, 220, 229, 236, 247, 254, 261, 266, 275] \ 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 c95a070..36f1ea2 100644 --- a/src/main/java/de/maishai/antlr/DecafBaseListener.java +++ b/src/main/java/de/maishai/antlr/DecafBaseListener.java @@ -1,4 +1,4 @@ -// Generated from C:/dev/Compilerbau/CompilerULTIMATE/src/main/antlr/Decaf.g4 by ANTLR 4.13.1 +// Generated from C:/dev/Pressmium/CompilerULTIMATE/src/main/antlr/Decaf.g4 by ANTLR 4.13.1 package de.maishai.antlr; import org.antlr.v4.runtime.ParserRuleContext; diff --git a/src/main/java/de/maishai/antlr/DecafBaseVisitor.java b/src/main/java/de/maishai/antlr/DecafBaseVisitor.java index c4e9f40..b568a39 100644 --- a/src/main/java/de/maishai/antlr/DecafBaseVisitor.java +++ b/src/main/java/de/maishai/antlr/DecafBaseVisitor.java @@ -1,4 +1,4 @@ -// Generated from C:/dev/Compilerbau/CompilerULTIMATE/src/main/antlr/Decaf.g4 by ANTLR 4.13.1 +// Generated from C:/dev/Pressmium/CompilerULTIMATE/src/main/antlr/Decaf.g4 by ANTLR 4.13.1 package de.maishai.antlr; import org.antlr.v4.runtime.tree.AbstractParseTreeVisitor; diff --git a/src/main/java/de/maishai/antlr/DecafLexer.java b/src/main/java/de/maishai/antlr/DecafLexer.java index 7aaed05..bb9b7e7 100644 --- a/src/main/java/de/maishai/antlr/DecafLexer.java +++ b/src/main/java/de/maishai/antlr/DecafLexer.java @@ -1,4 +1,4 @@ -// Generated from C:/dev/Compilerbau/CompilerULTIMATE/src/main/antlr/Decaf.g4 by ANTLR 4.13.1 +// Generated from C:/dev/Pressmium/CompilerULTIMATE/src/main/antlr/Decaf.g4 by ANTLR 4.13.1 package de.maishai.antlr; import org.antlr.v4.runtime.Lexer; import org.antlr.v4.runtime.CharStream; diff --git a/src/main/java/de/maishai/antlr/DecafListener.java b/src/main/java/de/maishai/antlr/DecafListener.java index 214a8cd..57dec2a 100644 --- a/src/main/java/de/maishai/antlr/DecafListener.java +++ b/src/main/java/de/maishai/antlr/DecafListener.java @@ -1,4 +1,4 @@ -// Generated from C:/dev/Compilerbau/CompilerULTIMATE/src/main/antlr/Decaf.g4 by ANTLR 4.13.1 +// Generated from C:/dev/Pressmium/CompilerULTIMATE/src/main/antlr/Decaf.g4 by ANTLR 4.13.1 package de.maishai.antlr; import org.antlr.v4.runtime.tree.ParseTreeListener; diff --git a/src/main/java/de/maishai/antlr/DecafParser.java b/src/main/java/de/maishai/antlr/DecafParser.java index e11e738..6b1f3e9 100644 --- a/src/main/java/de/maishai/antlr/DecafParser.java +++ b/src/main/java/de/maishai/antlr/DecafParser.java @@ -1,4 +1,4 @@ -// Generated from C:/dev/Compilerbau/CompilerULTIMATE/src/main/antlr/Decaf.g4 by ANTLR 4.13.1 +// Generated from C:/dev/Pressmium/CompilerULTIMATE/src/main/antlr/Decaf.g4 by ANTLR 4.13.1 package de.maishai.antlr; import org.antlr.v4.runtime.atn.*; import org.antlr.v4.runtime.dfa.DFA; @@ -240,6 +240,7 @@ public class DecafParser extends Parser { public IdContext id() { return getRuleContext(IdContext.class,0); } + public TerminalNode PUBLIC() { return getToken(DecafParser.PUBLIC, 0); } public FieldContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @@ -262,14 +263,25 @@ public class DecafParser extends Parser { public final FieldContext field() throws RecognitionException { FieldContext _localctx = new FieldContext(_ctx, getState()); enterRule(_localctx, 2, RULE_field); + int _la; try { enterOuterAlt(_localctx, 1); { - setState(67); - type(); setState(68); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==PUBLIC) { + { + setState(67); + match(PUBLIC); + } + } + + setState(70); + type(); + setState(71); id(); - setState(69); + setState(72); match(T__3); } } @@ -317,11 +329,11 @@ public class DecafParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(71); + setState(74); type(); - setState(72); + setState(75); id(); - setState(73); + setState(76); match(T__3); } } @@ -368,7 +380,7 @@ public class DecafParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(75); + setState(78); _la = _input.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 257698037760L) != 0)) ) { _errHandler.recoverInline(this); @@ -420,7 +432,7 @@ public class DecafParser extends Parser { ReturntypeContext _localctx = new ReturntypeContext(_ctx, getState()); enterRule(_localctx, 8, RULE_returntype); try { - setState(79); + setState(82); _errHandler.sync(this); switch (_input.LA(1)) { case INT: @@ -429,14 +441,14 @@ public class DecafParser extends Parser { case IDENTIFIER: enterOuterAlt(_localctx, 1); { - setState(77); + setState(80); type(); } break; case VOID: enterOuterAlt(_localctx, 2); { - setState(78); + setState(81); match(VOID); } break; @@ -486,34 +498,34 @@ public class DecafParser extends Parser { TypeContext _localctx = new TypeContext(_ctx, getState()); enterRule(_localctx, 10, RULE_type); try { - setState(85); + setState(88); _errHandler.sync(this); switch (_input.LA(1)) { case INT: enterOuterAlt(_localctx, 1); { - setState(81); + setState(84); match(INT); } break; case BOOL: enterOuterAlt(_localctx, 2); { - setState(82); + setState(85); match(BOOL); } break; case CHAR: enterOuterAlt(_localctx, 3); { - setState(83); + setState(86); match(CHAR); } break; case IDENTIFIER: enterOuterAlt(_localctx, 4); { - setState(84); + setState(87); id(); } break; @@ -573,27 +585,27 @@ public class DecafParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(87); - match(PUBLIC); - setState(88); - returntype(); - setState(89); - id(); setState(90); - match(T__4); + match(PUBLIC); + setState(91); + returntype(); setState(92); + id(); + setState(93); + match(T__4); + setState(95); _errHandler.sync(this); _la = _input.LA(1); if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 41231686041600L) != 0)) { { - setState(91); + setState(94); params(); } } - setState(94); + setState(97); match(T__5); - setState(95); + setState(98); block(); } } @@ -640,21 +652,21 @@ public class DecafParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(97); - match(PUBLIC); - setState(98); - match(T__6); - setState(99); - match(VOID); setState(100); - match(T__7); + match(PUBLIC); setState(101); - match(T__4); + match(T__6); setState(102); - match(T__8); + match(VOID); setState(103); - match(T__5); + match(T__7); setState(104); + match(T__4); + setState(105); + match(T__8); + setState(106); + match(T__5); + setState(107); block(); } } @@ -707,25 +719,25 @@ public class DecafParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(106); + setState(109); match(PUBLIC); - setState(107); - id(); - setState(108); - match(T__4); setState(110); + id(); + setState(111); + match(T__4); + setState(113); _errHandler.sync(this); _la = _input.LA(1); if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 41231686041600L) != 0)) { { - setState(109); + setState(112); params(); } } - setState(112); + setState(115); match(T__5); - setState(113); + setState(116); block(); } } @@ -774,21 +786,21 @@ public class DecafParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(115); + setState(118); param(); - setState(120); + setState(123); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__9) { { { - setState(116); + setState(119); match(T__9); - setState(117); + setState(120); param(); } } - setState(122); + setState(125); _errHandler.sync(this); _la = _input.LA(1); } @@ -838,9 +850,9 @@ public class DecafParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(123); + setState(126); type(); - setState(124); + setState(127); id(); } } @@ -895,35 +907,35 @@ public class DecafParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(126); + setState(129); match(T__1); - setState(131); + setState(134); _errHandler.sync(this); _la = _input.LA(1); while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 41231691540480L) != 0)) { { - setState(129); + setState(132); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,8,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,9,_ctx) ) { case 1: { - setState(127); + setState(130); localVar(); } break; case 2: { - setState(128); + setState(131); stmt(); } break; } } - setState(133); + setState(136); _errHandler.sync(this); _la = _input.LA(1); } - setState(134); + setState(137); match(T__2); } } @@ -1151,31 +1163,31 @@ public class DecafParser extends Parser { enterRule(_localctx, 24, RULE_stmt); int _la; try { - setState(184); + setState(187); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,12,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,13,_ctx) ) { case 1: _localctx = new IfContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(136); - match(T__10); - setState(137); - match(T__4); - setState(138); - expr(0); setState(139); - match(T__5); + match(T__10); setState(140); - block(); + match(T__4); + setState(141); + expr(0); + setState(142); + match(T__5); setState(143); + block(); + setState(146); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__11) { { - setState(141); + setState(144); match(T__11); - setState(142); + setState(145); block(); } } @@ -1186,23 +1198,23 @@ public class DecafParser extends Parser { _localctx = new ForContext(_localctx); enterOuterAlt(_localctx, 2); { - setState(145); - match(T__12); - setState(146); - match(T__4); - setState(147); - assign(); setState(148); - match(T__3); + match(T__12); setState(149); - expr(0); + match(T__4); setState(150); - match(T__3); - setState(151); assign(); + setState(151); + match(T__3); setState(152); - match(T__5); + expr(0); setState(153); + match(T__3); + setState(154); + assign(); + setState(155); + match(T__5); + setState(156); block(); } break; @@ -1210,15 +1222,15 @@ public class DecafParser extends Parser { _localctx = new WhileContext(_localctx); enterOuterAlt(_localctx, 3); { - setState(155); - match(T__13); - setState(156); - match(T__4); - setState(157); - expr(0); setState(158); - match(T__5); + match(T__13); setState(159); + match(T__4); + setState(160); + expr(0); + setState(161); + match(T__5); + setState(162); block(); } break; @@ -1226,24 +1238,24 @@ public class DecafParser extends Parser { _localctx = new DoWhileContext(_localctx); enterOuterAlt(_localctx, 4); { - setState(161); - match(T__14); - setState(162); - block(); - setState(163); - match(T__13); setState(164); - match(T__4); + match(T__14); setState(165); - expr(0); + block(); setState(166); - match(T__5); + match(T__13); + setState(167); + match(T__4); setState(168); + expr(0); + setState(169); + match(T__5); + setState(171); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__3) { { - setState(167); + setState(170); match(T__3); } } @@ -1254,11 +1266,11 @@ public class DecafParser extends Parser { _localctx = new ReturnContext(_localctx); enterOuterAlt(_localctx, 5); { - setState(170); + setState(173); match(T__15); - setState(171); + setState(174); expr(0); - setState(172); + setState(175); match(T__3); } break; @@ -1266,9 +1278,9 @@ public class DecafParser extends Parser { _localctx = new ReturnVoidContext(_localctx); enterOuterAlt(_localctx, 6); { - setState(174); + setState(177); match(T__15); - setState(175); + setState(178); match(T__3); } break; @@ -1276,9 +1288,9 @@ public class DecafParser extends Parser { _localctx = new BreakContext(_localctx); enterOuterAlt(_localctx, 7); { - setState(176); + setState(179); match(T__16); - setState(177); + setState(180); match(T__3); } break; @@ -1286,9 +1298,9 @@ public class DecafParser extends Parser { _localctx = new AssignmentContext(_localctx); enterOuterAlt(_localctx, 8); { - setState(178); + setState(181); assign(); - setState(179); + setState(182); match(T__3); } break; @@ -1296,9 +1308,9 @@ public class DecafParser extends Parser { _localctx = new StatementExpressionstmtContext(_localctx); enterOuterAlt(_localctx, 9); { - setState(181); + setState(184); stmtexpr(); - setState(182); + setState(185); match(T__3); } break; @@ -1377,7 +1389,7 @@ public class DecafParser extends Parser { enterRule(_localctx, 26, RULE_stmtexpr); int _la; try { - setState(195); + setState(198); _errHandler.sync(this); switch (_input.LA(1)) { case THIS: @@ -1385,7 +1397,7 @@ public class DecafParser extends Parser { _localctx = new MethodCallContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(186); + setState(189); methCall(); } break; @@ -1393,23 +1405,23 @@ public class DecafParser extends Parser { _localctx = new NewContext(_localctx); enterOuterAlt(_localctx, 2); { - setState(187); + setState(190); match(NEW); - setState(188); - type(); - setState(189); - match(T__4); setState(191); + type(); + setState(192); + match(T__4); + setState(194); _errHandler.sync(this); _la = _input.LA(1); if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 132216288968736L) != 0)) { { - setState(190); + setState(193); args(); } } - setState(193); + setState(196); match(T__5); } break; @@ -1603,18 +1615,18 @@ public class DecafParser extends Parser { int _alt; enterOuterAlt(_localctx, 1); { - setState(209); + setState(212); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,15,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,16,_ctx) ) { case 1: { _localctx = new UnaryOperationContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(198); + setState(201); unaryOp(); - setState(199); + setState(202); expr(6); } break; @@ -1623,7 +1635,7 @@ public class DecafParser extends Parser { _localctx = new ConstantContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(201); + setState(204); literal(); } break; @@ -1632,11 +1644,11 @@ public class DecafParser extends Parser { _localctx = new ExpressionContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(202); + setState(205); match(T__4); - setState(203); + setState(206); expr(0); - setState(204); + setState(207); match(T__5); } break; @@ -1645,7 +1657,7 @@ public class DecafParser extends Parser { _localctx = new IdentifierContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(206); + setState(209); fieldVarAccess(); } break; @@ -1654,7 +1666,7 @@ public class DecafParser extends Parser { _localctx = new StatementExpressionexprContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(207); + setState(210); stmtexpr(); } break; @@ -1663,15 +1675,15 @@ public class DecafParser extends Parser { _localctx = new NullContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(208); + setState(211); match(NULL); } break; } _ctx.stop = _input.LT(-1); - setState(217); + setState(220); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,16,_ctx); + _alt = getInterpreter().adaptivePredict(_input,17,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { if ( _parseListeners!=null ) triggerExitRuleEvent(); @@ -1680,18 +1692,18 @@ public class DecafParser extends Parser { { _localctx = new BinaryOperationContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(211); + setState(214); if (!(precpred(_ctx, 7))) throw new FailedPredicateException(this, "precpred(_ctx, 7)"); - setState(212); + setState(215); binaryOp(); - setState(213); + setState(216); expr(8); } } } - setState(219); + setState(222); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,16,_ctx); + _alt = getInterpreter().adaptivePredict(_input,17,_ctx); } } } @@ -1745,7 +1757,7 @@ public class DecafParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(220); + setState(223); _la = _input.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 17171480576L) != 0)) ) { _errHandler.recoverInline(this); @@ -1798,7 +1810,7 @@ public class DecafParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(222); + setState(225); _la = _input.LA(1); if ( !(_la==SUB || _la==NOT) ) { _errHandler.recoverInline(this); @@ -1860,37 +1872,37 @@ public class DecafParser extends Parser { int _alt; enterOuterAlt(_localctx, 1); { - setState(226); + setState(229); _errHandler.sync(this); _la = _input.LA(1); if (_la==THIS) { { - setState(224); + setState(227); match(THIS); - setState(225); + setState(228); match(T__17); } } - setState(233); + setState(236); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,18,_ctx); + _alt = getInterpreter().adaptivePredict(_input,19,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(228); + setState(231); recipient(); - setState(229); + setState(232); match(T__17); } } } - setState(235); + setState(238); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,18,_ctx); + _alt = getInterpreter().adaptivePredict(_input,19,_ctx); } - setState(236); + setState(239); id(); } } @@ -1941,11 +1953,11 @@ public class DecafParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(238); + setState(241); fieldVarAccess(); - setState(239); + setState(242); assignSign(); - setState(240); + setState(243); expr(0); } } @@ -1999,37 +2011,37 @@ public class DecafParser extends Parser { int _alt; enterOuterAlt(_localctx, 1); { - setState(244); + setState(247); _errHandler.sync(this); _la = _input.LA(1); if (_la==THIS) { { - setState(242); + setState(245); match(THIS); - setState(243); + setState(246); match(T__17); } } - setState(251); + setState(254); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,20,_ctx); + _alt = getInterpreter().adaptivePredict(_input,21,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(246); + setState(249); recipient(); - setState(247); + setState(250); match(T__17); } } } - setState(253); + setState(256); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,20,_ctx); + _alt = getInterpreter().adaptivePredict(_input,21,_ctx); } - setState(254); + setState(257); methName(); } } @@ -2075,20 +2087,20 @@ public class DecafParser extends Parser { RecipientContext _localctx = new RecipientContext(_ctx, getState()); enterRule(_localctx, 40, RULE_recipient); try { - setState(258); + setState(261); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,21,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,22,_ctx) ) { case 1: enterOuterAlt(_localctx, 1); { - setState(256); + setState(259); methName(); } break; case 2: enterOuterAlt(_localctx, 2); { - setState(257); + setState(260); id(); } break; @@ -2139,21 +2151,21 @@ public class DecafParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(260); - id(); - setState(261); - match(T__4); setState(263); + id(); + setState(264); + match(T__4); + setState(266); _errHandler.sync(this); _la = _input.LA(1); if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 132216288968736L) != 0)) { { - setState(262); + setState(265); args(); } } - setState(265); + setState(268); match(T__5); } } @@ -2202,21 +2214,21 @@ public class DecafParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(267); + setState(270); expr(0); - setState(272); + setState(275); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__9) { { { - setState(268); + setState(271); match(T__9); - setState(269); + setState(272); expr(0); } } - setState(274); + setState(277); _errHandler.sync(this); _la = _input.LA(1); } @@ -2264,7 +2276,7 @@ public class DecafParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(275); + setState(278); _la = _input.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 96757023244288L) != 0)) ) { _errHandler.recoverInline(this); @@ -2315,7 +2327,7 @@ public class DecafParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(277); + setState(280); match(IDENTIFIER); } } @@ -2346,7 +2358,7 @@ public class DecafParser extends Parser { } public static final String _serializedATN = - "\u0004\u00011\u0118\u0002\u0000\u0007\u0000\u0002\u0001\u0007\u0001\u0002"+ + "\u0004\u00011\u011b\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"+ @@ -2356,171 +2368,174 @@ public class DecafParser extends Parser { "\u0002\u0016\u0007\u0016\u0002\u0017\u0007\u0017\u0002\u0018\u0007\u0018"+ "\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\u0001\b\u0001\b\u0001\b\u0003\bo\b\b\u0001\b\u0001\b\u0001"+ - "\b\u0001\t\u0001\t\u0001\t\u0005\tw\b\t\n\t\f\tz\t\t\u0001\n\u0001\n\u0001"+ - "\n\u0001\u000b\u0001\u000b\u0001\u000b\u0005\u000b\u0082\b\u000b\n\u000b"+ - "\f\u000b\u0085\t\u000b\u0001\u000b\u0001\u000b\u0001\f\u0001\f\u0001\f"+ - "\u0001\f\u0001\f\u0001\f\u0001\f\u0003\f\u0090\b\f\u0001\f\u0001\f\u0001"+ + "\f\u0000@\t\u0000\u0001\u0000\u0001\u0000\u0001\u0001\u0003\u0001E\b\u0001"+ + "\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\u0004S\b\u0004\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005"+ + "\u0003\u0005Y\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\u0001\b\u0001\b\u0001\b\u0003"+ + "\br\b\b\u0001\b\u0001\b\u0001\b\u0001\t\u0001\t\u0001\t\u0005\tz\b\t\n"+ + "\t\f\t}\t\t\u0001\n\u0001\n\u0001\n\u0001\u000b\u0001\u000b\u0001\u000b"+ + "\u0005\u000b\u0085\b\u000b\n\u000b\f\u000b\u0088\t\u000b\u0001\u000b\u0001"+ + "\u000b\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f\u0003\f"+ + "\u0093\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\u0003\f\u00ac\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\u0003\f\u00a9\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\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"+ + "\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\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\u0010j\u0001\u0000\u0000\u0000\u0012s"+ - "\u0001\u0000\u0000\u0000\u0014{\u0001\u0000\u0000\u0000\u0016~\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\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\u0000CD\u0003\n\u0005\u0000DE\u0003"+ - "0\u0018\u0000EF\u0005\u0004\u0000\u0000F\u0003\u0001\u0000\u0000\u0000"+ - "GH\u0003\n\u0005\u0000HI\u00030\u0018\u0000IJ\u0005\u0004\u0000\u0000"+ - "J\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\u0000"+ - "QV\u0005\'\u0000\u0000RV\u0005(\u0000\u0000SV\u0005*\u0000\u0000TV\u0003"+ - "0\u0018\u0000UQ\u0001\u0000\u0000\u0000UR\u0001\u0000\u0000\u0000US\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\u0000"+ - "ab\u0005\u0013\u0000\u0000bc\u0005\u0007\u0000\u0000cd\u0005)\u0000\u0000"+ - "de\u0005\b\u0000\u0000ef\u0005\u0005\u0000\u0000fg\u0005\t\u0000\u0000"+ - "gh\u0005\u0006\u0000\u0000hi\u0003\u0016\u000b\u0000i\u000f\u0001\u0000"+ - "\u0000\u0000jk\u0005\u0013\u0000\u0000kl\u00030\u0018\u0000ln\u0005\u0005"+ - "\u0000\u0000mo\u0003\u0012\t\u0000nm\u0001\u0000\u0000\u0000no\u0001\u0000"+ - "\u0000\u0000op\u0001\u0000\u0000\u0000pq\u0005\u0006\u0000\u0000qr\u0003"+ - "\u0016\u000b\u0000r\u0011\u0001\u0000\u0000\u0000sx\u0003\u0014\n\u0000"+ - "tu\u0005\n\u0000\u0000uw\u0003\u0014\n\u0000vt\u0001\u0000\u0000\u0000"+ - "wz\u0001\u0000\u0000\u0000xv\u0001\u0000\u0000\u0000xy\u0001\u0000\u0000"+ - "\u0000y\u0013\u0001\u0000\u0000\u0000zx\u0001\u0000\u0000\u0000{|\u0003"+ - "\n\u0005\u0000|}\u00030\u0018\u0000}\u0015\u0001\u0000\u0000\u0000~\u0083"+ - "\u0005\u0002\u0000\u0000\u007f\u0082\u0003\u0004\u0002\u0000\u0080\u0082"+ - "\u0003\u0018\f\u0000\u0081\u007f\u0001\u0000\u0000\u0000\u0081\u0080\u0001"+ - "\u0000\u0000\u0000\u0082\u0085\u0001\u0000\u0000\u0000\u0083\u0081\u0001"+ - "\u0000\u0000\u0000\u0083\u0084\u0001\u0000\u0000\u0000\u0084\u0086\u0001"+ - "\u0000\u0000\u0000\u0085\u0083\u0001\u0000\u0000\u0000\u0086\u0087\u0005"+ - "\u0003\u0000\u0000\u0087\u0017\u0001\u0000\u0000\u0000\u0088\u0089\u0005"+ - "\u000b\u0000\u0000\u0089\u008a\u0005\u0005\u0000\u0000\u008a\u008b\u0003"+ - "\u001c\u000e\u0000\u008b\u008c\u0005\u0006\u0000\u0000\u008c\u008f\u0003"+ - "\u0016\u000b\u0000\u008d\u008e\u0005\f\u0000\u0000\u008e\u0090\u0003\u0016"+ - "\u000b\u0000\u008f\u008d\u0001\u0000\u0000\u0000\u008f\u0090\u0001\u0000"+ - "\u0000\u0000\u0090\u00b9\u0001\u0000\u0000\u0000\u0091\u0092\u0005\r\u0000"+ - "\u0000\u0092\u0093\u0005\u0005\u0000\u0000\u0093\u0094\u0003$\u0012\u0000"+ - "\u0094\u0095\u0005\u0004\u0000\u0000\u0095\u0096\u0003\u001c\u000e\u0000"+ - "\u0096\u0097\u0005\u0004\u0000\u0000\u0097\u0098\u0003$\u0012\u0000\u0098"+ - "\u0099\u0005\u0006\u0000\u0000\u0099\u009a\u0003\u0016\u000b\u0000\u009a"+ - "\u00b9\u0001\u0000\u0000\u0000\u009b\u009c\u0005\u000e\u0000\u0000\u009c"+ - "\u009d\u0005\u0005\u0000\u0000\u009d\u009e\u0003\u001c\u000e\u0000\u009e"+ - "\u009f\u0005\u0006\u0000\u0000\u009f\u00a0\u0003\u0016\u000b\u0000\u00a0"+ - "\u00b9\u0001\u0000\u0000\u0000\u00a1\u00a2\u0005\u000f\u0000\u0000\u00a2"+ - "\u00a3\u0003\u0016\u000b\u0000\u00a3\u00a4\u0005\u000e\u0000\u0000\u00a4"+ - "\u00a5\u0005\u0005\u0000\u0000\u00a5\u00a6\u0003\u001c\u000e\u0000\u00a6"+ - "\u00a8\u0005\u0006\u0000\u0000\u00a7\u00a9\u0005\u0004\u0000\u0000\u00a8"+ - "\u00a7\u0001\u0000\u0000\u0000\u00a8\u00a9\u0001\u0000\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\u0088\u0001\u0000\u0000\u0000\u00b8\u0091\u0001"+ - "\u0000\u0000\u0000\u00b8\u009b\u0001\u0000\u0000\u0000\u00b8\u00a1\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\u0003\"\u0011\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\\nx\u0081\u0083\u008f\u00a8\u00b8\u00bf"+ - "\u00c3\u00d1\u00d9\u00e2\u00e9\u00f4\u00fb\u0102\u0107\u0110"; + "\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e"+ + "\u0003\u000e\u00d5\b\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e"+ + "\u0005\u000e\u00db\b\u000e\n\u000e\f\u000e\u00de\t\u000e\u0001\u000f\u0001"+ + "\u000f\u0001\u0010\u0001\u0010\u0001\u0011\u0001\u0011\u0003\u0011\u00e6"+ + "\b\u0011\u0001\u0011\u0001\u0011\u0001\u0011\u0005\u0011\u00eb\b\u0011"+ + "\n\u0011\f\u0011\u00ee\t\u0011\u0001\u0011\u0001\u0011\u0001\u0012\u0001"+ + "\u0012\u0001\u0012\u0001\u0012\u0001\u0013\u0001\u0013\u0003\u0013\u00f8"+ + "\b\u0013\u0001\u0013\u0001\u0013\u0001\u0013\u0005\u0013\u00fd\b\u0013"+ + "\n\u0013\f\u0013\u0100\t\u0013\u0001\u0013\u0001\u0013\u0001\u0014\u0001"+ + "\u0014\u0003\u0014\u0106\b\u0014\u0001\u0015\u0001\u0015\u0001\u0015\u0003"+ + "\u0015\u010b\b\u0015\u0001\u0015\u0001\u0015\u0001\u0016\u0001\u0016\u0001"+ + "\u0016\u0005\u0016\u0112\b\u0016\n\u0016\f\u0016\u0115\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+,..\u0128\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\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\u00d4\u0001"+ + "\u0000\u0000\u0000\u001e\u00df\u0001\u0000\u0000\u0000 \u00e1\u0001\u0000"+ + "\u0000\u0000\"\u00e5\u0001\u0000\u0000\u0000$\u00f1\u0001\u0000\u0000"+ + "\u0000&\u00f7\u0001\u0000\u0000\u0000(\u0105\u0001\u0000\u0000\u0000*"+ + "\u0107\u0001\u0000\u0000\u0000,\u010e\u0001\u0000\u0000\u0000.\u0116\u0001"+ + "\u0000\u0000\u00000\u0118\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\u0006\u00cb\u00d5\u0001\u0000\u0000"+ + "\u0000\u00cc\u00d5\u0003.\u0017\u0000\u00cd\u00ce\u0005\u0005\u0000\u0000"+ + "\u00ce\u00cf\u0003\u001c\u000e\u0000\u00cf\u00d0\u0005\u0006\u0000\u0000"+ + "\u00d0\u00d5\u0001\u0000\u0000\u0000\u00d1\u00d5\u0003\"\u0011\u0000\u00d2"+ + "\u00d5\u0003\u001a\r\u0000\u00d3\u00d5\u0005\u0015\u0000\u0000\u00d4\u00c8"+ + "\u0001\u0000\u0000\u0000\u00d4\u00cc\u0001\u0000\u0000\u0000\u00d4\u00cd"+ + "\u0001\u0000\u0000\u0000\u00d4\u00d1\u0001\u0000\u0000\u0000\u00d4\u00d2"+ + "\u0001\u0000\u0000\u0000\u00d4\u00d3\u0001\u0000\u0000\u0000\u00d5\u00dc"+ + "\u0001\u0000\u0000\u0000\u00d6\u00d7\n\u0007\u0000\u0000\u00d7\u00d8\u0003"+ + "\u001e\u000f\u0000\u00d8\u00d9\u0003\u001c\u000e\b\u00d9\u00db\u0001\u0000"+ + "\u0000\u0000\u00da\u00d6\u0001\u0000\u0000\u0000\u00db\u00de\u0001\u0000"+ + "\u0000\u0000\u00dc\u00da\u0001\u0000\u0000\u0000\u00dc\u00dd\u0001\u0000"+ + "\u0000\u0000\u00dd\u001d\u0001\u0000\u0000\u0000\u00de\u00dc\u0001\u0000"+ + "\u0000\u0000\u00df\u00e0\u0007\u0001\u0000\u0000\u00e0\u001f\u0001\u0000"+ + "\u0000\u0000\u00e1\u00e2\u0007\u0002\u0000\u0000\u00e2!\u0001\u0000\u0000"+ + "\u0000\u00e3\u00e4\u0005\u0016\u0000\u0000\u00e4\u00e6\u0005\u0012\u0000"+ + "\u0000\u00e5\u00e3\u0001\u0000\u0000\u0000\u00e5\u00e6\u0001\u0000\u0000"+ + "\u0000\u00e6\u00ec\u0001\u0000\u0000\u0000\u00e7\u00e8\u0003(\u0014\u0000"+ + "\u00e8\u00e9\u0005\u0012\u0000\u0000\u00e9\u00eb\u0001\u0000\u0000\u0000"+ + "\u00ea\u00e7\u0001\u0000\u0000\u0000\u00eb\u00ee\u0001\u0000\u0000\u0000"+ + "\u00ec\u00ea\u0001\u0000\u0000\u0000\u00ec\u00ed\u0001\u0000\u0000\u0000"+ + "\u00ed\u00ef\u0001\u0000\u0000\u0000\u00ee\u00ec\u0001\u0000\u0000\u0000"+ + "\u00ef\u00f0\u00030\u0018\u0000\u00f0#\u0001\u0000\u0000\u0000\u00f1\u00f2"+ + "\u0003\"\u0011\u0000\u00f2\u00f3\u0003\u0006\u0003\u0000\u00f3\u00f4\u0003"+ + "\u001c\u000e\u0000\u00f4%\u0001\u0000\u0000\u0000\u00f5\u00f6\u0005\u0016"+ + "\u0000\u0000\u00f6\u00f8\u0005\u0012\u0000\u0000\u00f7\u00f5\u0001\u0000"+ + "\u0000\u0000\u00f7\u00f8\u0001\u0000\u0000\u0000\u00f8\u00fe\u0001\u0000"+ + "\u0000\u0000\u00f9\u00fa\u0003(\u0014\u0000\u00fa\u00fb\u0005\u0012\u0000"+ + "\u0000\u00fb\u00fd\u0001\u0000\u0000\u0000\u00fc\u00f9\u0001\u0000\u0000"+ + "\u0000\u00fd\u0100\u0001\u0000\u0000\u0000\u00fe\u00fc\u0001\u0000\u0000"+ + "\u0000\u00fe\u00ff\u0001\u0000\u0000\u0000\u00ff\u0101\u0001\u0000\u0000"+ + "\u0000\u0100\u00fe\u0001\u0000\u0000\u0000\u0101\u0102\u0003*\u0015\u0000"+ + "\u0102\'\u0001\u0000\u0000\u0000\u0103\u0106\u0003*\u0015\u0000\u0104"+ + "\u0106\u00030\u0018\u0000\u0105\u0103\u0001\u0000\u0000\u0000\u0105\u0104"+ + "\u0001\u0000\u0000\u0000\u0106)\u0001\u0000\u0000\u0000\u0107\u0108\u0003"+ + "0\u0018\u0000\u0108\u010a\u0005\u0005\u0000\u0000\u0109\u010b\u0003,\u0016"+ + "\u0000\u010a\u0109\u0001\u0000\u0000\u0000\u010a\u010b\u0001\u0000\u0000"+ + "\u0000\u010b\u010c\u0001\u0000\u0000\u0000\u010c\u010d\u0005\u0006\u0000"+ + "\u0000\u010d+\u0001\u0000\u0000\u0000\u010e\u0113\u0003\u001c\u000e\u0000"+ + "\u010f\u0110\u0005\n\u0000\u0000\u0110\u0112\u0003\u001c\u000e\u0000\u0111"+ + "\u010f\u0001\u0000\u0000\u0000\u0112\u0115\u0001\u0000\u0000\u0000\u0113"+ + "\u0111\u0001\u0000\u0000\u0000\u0113\u0114\u0001\u0000\u0000\u0000\u0114"+ + "-\u0001\u0000\u0000\u0000\u0115\u0113\u0001\u0000\u0000\u0000\u0116\u0117"+ + "\u0007\u0003\u0000\u0000\u0117/\u0001\u0000\u0000\u0000\u0118\u0119\u0005"+ + "-\u0000\u0000\u01191\u0001\u0000\u0000\u0000\u00197<>DRX_q{\u0084\u0086"+ + "\u0092\u00ab\u00bb\u00c2\u00c6\u00d4\u00dc\u00e5\u00ec\u00f7\u00fe\u0105"+ + "\u010a\u0113"; 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 e5231c5..e9fca28 100644 --- a/src/main/java/de/maishai/antlr/DecafVisitor.java +++ b/src/main/java/de/maishai/antlr/DecafVisitor.java @@ -1,4 +1,4 @@ -// Generated from C:/dev/Compilerbau/CompilerULTIMATE/src/main/antlr/Decaf.g4 by ANTLR 4.13.1 +// Generated from C:/dev/Pressmium/CompilerULTIMATE/src/main/antlr/Decaf.g4 by ANTLR 4.13.1 package de.maishai.antlr; import org.antlr.v4.runtime.tree.ParseTreeVisitor; diff --git a/src/main/java/de/maishai/typedast/MethodContext.java b/src/main/java/de/maishai/typedast/MethodContext.java index 6f9ad9f..b3b0832 100644 --- a/src/main/java/de/maishai/typedast/MethodContext.java +++ b/src/main/java/de/maishai/typedast/MethodContext.java @@ -3,6 +3,7 @@ package de.maishai.typedast; import lombok.*; import org.objectweb.asm.Label; import org.objectweb.asm.MethodVisitor; +import org.objectweb.asm.Opcodes; import java.util.HashMap; import java.util.Map; @@ -10,29 +11,32 @@ import java.util.Stack; @Getter public class MethodContext { - private record LocalVariable(String name, int index, Type type) {} + private record LocalVariable(String name, int index, Type type) { + } + private Label startLabel; private Label endLabel; private MethodVisitor mv; - private String classname; + private ClassContext classContext; private int localVarIndex = 0; private final Map variableIndex = new HashMap<>(); private Stack stack = new Stack<>(); private int maxStack = 0; - public MethodContext(MethodVisitor mv) { + public MethodContext(ClassContext classContext, MethodVisitor mv) { startLabel = new Label(); endLabel = new Label(); this.mv = mv; + this.classContext = classContext; + registerVariable("this", classContext.getName()); mv.visitCode(); mv.visitLabel(startLabel); } - public int addVariable(String name, Type type) { + public void registerVariable(String name, Type type) { int index = localVarIndex; localVarIndex++; variableIndex.put(name, new LocalVariable(name, index, type)); - return index; } public int getVariableIndex(String name) { @@ -43,11 +47,17 @@ public class MethodContext { return index; } - public void pushStack() { + public void pushStack(String varName) { stack.push(localVarIndex); if (stack.size() > maxStack) { maxStack = stack.size(); } + LocalVariable localVariable = variableIndex.get(varName); + if (localVariable.type.getKind() == Type.Kind.REFERENCE) { + mv.visitVarInsn(Opcodes.ALOAD, localVariable.index); + } else { + mv.visitVarInsn(Opcodes.ILOAD, localVariable.index); + } } public void popStack() { diff --git a/src/main/java/de/maishai/typedast/typedclass/TypedConstructor.java b/src/main/java/de/maishai/typedast/typedclass/TypedConstructor.java index 7f9ad38..7c53585 100644 --- a/src/main/java/de/maishai/typedast/typedclass/TypedConstructor.java +++ b/src/main/java/de/maishai/typedast/typedclass/TypedConstructor.java @@ -6,13 +6,11 @@ import de.maishai.typedast.*; import lombok.AllArgsConstructor; import lombok.Data; import lombok.RequiredArgsConstructor; -import org.objectweb.asm.ClassWriter; import org.objectweb.asm.MethodVisitor; import org.objectweb.asm.Opcodes; import java.util.ArrayList; import java.util.List; -import java.util.Map; @RequiredArgsConstructor @AllArgsConstructor @@ -68,7 +66,7 @@ public class TypedConstructor implements TypedNode { @Override public Type typeCheck(TypedClass clas) { type = typedBlock.typeCheck(clas); - if(type != Type.VOID){ + if (type != Type.VOID) { throw new RuntimeException("Constructor must not habe a return statement"); } @@ -79,11 +77,10 @@ public class TypedConstructor implements TypedNode { public void codeGen(ClassContext ctx) { int accessModifier = Opcodes.ACC_PUBLIC; // ist laut Andi ok MethodVisitor mv = ctx.getCw().visitMethod(accessModifier, "", CodeGenUtils.generateDescriptor(typedParameters, Type.VOID), null, null); - MethodContext mctx = new MethodContext(mv); - mctx.addVariable("this", ctx.getName()); - typedParameters.forEach(param -> mctx.addVariable(param.getParaName(), param.getType())); + MethodContext mctx = new MethodContext(ctx, mv); + typedParameters.forEach(param -> mctx.registerVariable(param.getParaName(), param.getType())); //super(); - mv.visitVarInsn(Opcodes.ALOAD, mctx.getVariableIndex("this")); + mctx.pushStack("this"); mv.visitMethodInsn(Opcodes.INVOKESPECIAL, "java/lang/Object", "", "()V", false); typedBlock.codeGen(mctx); diff --git a/src/main/java/de/maishai/typedast/typedclass/TypedLocalVariable.java b/src/main/java/de/maishai/typedast/typedclass/TypedLocalVariable.java index c6d8f83..692c564 100644 --- a/src/main/java/de/maishai/typedast/typedclass/TypedLocalVariable.java +++ b/src/main/java/de/maishai/typedast/typedclass/TypedLocalVariable.java @@ -1,20 +1,13 @@ package de.maishai.typedast.typedclass; import de.maishai.ast.records.Declaration; -import de.maishai.ast.records.Node; import de.maishai.typedast.MethodContext; import de.maishai.typedast.TypedNode; import de.maishai.typedast.Type; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; -import org.objectweb.asm.ClassWriter; import org.objectweb.asm.MethodVisitor; -import org.objectweb.asm.Opcodes; - -import java.util.Map; - -import static de.maishai.typedast.Type.Kind.REFERENCE; @Data @AllArgsConstructor @@ -53,6 +46,6 @@ public final class TypedLocalVariable implements TypedNode { } public void codeGen(MethodVisitor mv, MethodContext ctx) { - ctx.addVariable(name, type); + ctx.registerVariable(name, type); } } diff --git a/src/main/java/de/maishai/typedast/typedclass/TypedMethod.java b/src/main/java/de/maishai/typedast/typedclass/TypedMethod.java index cd701eb..d778edc 100644 --- a/src/main/java/de/maishai/typedast/typedclass/TypedMethod.java +++ b/src/main/java/de/maishai/typedast/typedclass/TypedMethod.java @@ -2,18 +2,14 @@ package de.maishai.typedast.typedclass; import de.maishai.ast.records.IfElse; import de.maishai.ast.records.Method; -import de.maishai.ast.records.Node; -import de.maishai.ast.records.Parameter; import de.maishai.typedast.*; import lombok.Data; import lombok.NoArgsConstructor; -import org.objectweb.asm.ClassWriter; import org.objectweb.asm.MethodVisitor; import org.objectweb.asm.Opcodes; import java.util.ArrayList; import java.util.List; -import java.util.Map; @Data @NoArgsConstructor @@ -115,9 +111,8 @@ public class TypedMethod implements TypedNode { int accessModifier = Opcodes.ACC_PUBLIC; // ist laut Andi ok MethodVisitor mv = ctx.getCw().visitMethod(accessModifier, name, CodeGenUtils.generateDescriptor(typedParameters, returnType), null, null); - MethodContext context = new MethodContext(mv); - context.addVariable("this", ctx.getName()); - typedParameters.forEach(param -> context.addVariable(param.getParaName(), param.getType())); + MethodContext context = new MethodContext(ctx, mv); + typedParameters.forEach(param -> context.registerVariable(param.getParaName(), param.getType())); typedBlock.codeGen(context); context.wrapUp();