From 2e4c0493db9b084b8c90794c1c49cb0553a29555 Mon Sep 17 00:00:00 2001 From: sabotack Date: Mon, 22 May 2023 11:34:27 +0200 Subject: [PATCH] fix: pow incorrect precedence/associativity --- src/main/interpreter/antlr/MineScript.g4 | 4 +- src/main/interpreter/antlr/MineScript.interp | 4 +- src/main/interpreter/antlr/MineScript.tokens | 6 +- .../antlr/MineScriptBaseVisitor.java | 2 +- .../interpreter/antlr/MineScriptLexer.interp | 4 +- .../interpreter/antlr/MineScriptLexer.java | 162 +++++++++--------- .../interpreter/antlr/MineScriptLexer.tokens | 6 +- .../interpreter/antlr/MineScriptParser.java | 107 ++++++------ .../interpreter/antlr/MineScriptVisitor.java | 2 +- 9 files changed, 149 insertions(+), 148 deletions(-) diff --git a/src/main/interpreter/antlr/MineScript.g4 b/src/main/interpreter/antlr/MineScript.g4 index dd3e23e..745db26 100644 --- a/src/main/interpreter/antlr/MineScript.g4 +++ b/src/main/interpreter/antlr/MineScript.g4 @@ -36,10 +36,10 @@ statement expression : ID '(' actual_parameters? ')' #FuncCall - | '-' expression #Neg - | 'not' expression #NotExpr | '(' expression ')' #ParenExpr + | 'not' expression #NotExpr | expression '^' expression #Pow + | '-' expression #Neg | expression op=('*' | '/' | '%') expression #MultDivMod | expression op=('+' | '-') expression #AddSub | expression op=('<' | '>' | '<=' | '>=') expression #Comp diff --git a/src/main/interpreter/antlr/MineScript.interp b/src/main/interpreter/antlr/MineScript.interp index 854a366..ae6a182 100644 --- a/src/main/interpreter/antlr/MineScript.interp +++ b/src/main/interpreter/antlr/MineScript.interp @@ -14,9 +14,9 @@ null 'define' 'enddefine' 'return' -'-' 'not' '^' +'-' '*' '/' '%' @@ -92,4 +92,4 @@ actual_parameters atn: -[4, 1, 39, 160, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 1, 0, 5, 0, 14, 8, 0, 10, 0, 12, 0, 17, 9, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 5, 1, 24, 8, 1, 10, 1, 12, 1, 27, 9, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 5, 2, 49, 8, 2, 10, 2, 12, 2, 52, 9, 2, 1, 2, 1, 2, 3, 2, 56, 8, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 81, 8, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 93, 8, 2, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 99, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 116, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 5, 3, 139, 8, 3, 10, 3, 12, 3, 142, 9, 3, 1, 4, 1, 4, 1, 4, 5, 4, 147, 8, 4, 10, 4, 12, 4, 150, 9, 4, 1, 5, 1, 5, 1, 5, 5, 5, 155, 8, 5, 10, 5, 12, 5, 158, 9, 5, 1, 5, 0, 1, 6, 6, 0, 2, 4, 6, 8, 10, 0, 4, 1, 0, 18, 20, 2, 0, 15, 15, 21, 21, 1, 0, 22, 25, 1, 0, 26, 27, 184, 0, 15, 1, 0, 0, 0, 2, 20, 1, 0, 0, 0, 4, 92, 1, 0, 0, 0, 6, 115, 1, 0, 0, 0, 8, 143, 1, 0, 0, 0, 10, 151, 1, 0, 0, 0, 12, 14, 3, 4, 2, 0, 13, 12, 1, 0, 0, 0, 14, 17, 1, 0, 0, 0, 15, 13, 1, 0, 0, 0, 15, 16, 1, 0, 0, 0, 16, 18, 1, 0, 0, 0, 17, 15, 1, 0, 0, 0, 18, 19, 5, 0, 0, 1, 19, 1, 1, 0, 0, 0, 20, 21, 5, 1, 0, 0, 21, 25, 5, 38, 0, 0, 22, 24, 3, 4, 2, 0, 23, 22, 1, 0, 0, 0, 24, 27, 1, 0, 0, 0, 25, 23, 1, 0, 0, 0, 25, 26, 1, 0, 0, 0, 26, 3, 1, 0, 0, 0, 27, 25, 1, 0, 0, 0, 28, 29, 3, 6, 3, 0, 29, 30, 5, 38, 0, 0, 30, 93, 1, 0, 0, 0, 31, 32, 5, 37, 0, 0, 32, 33, 5, 2, 0, 0, 33, 34, 3, 6, 3, 0, 34, 35, 5, 38, 0, 0, 35, 93, 1, 0, 0, 0, 36, 37, 5, 3, 0, 0, 37, 38, 5, 4, 0, 0, 38, 39, 3, 6, 3, 0, 39, 40, 5, 5, 0, 0, 40, 50, 3, 2, 1, 0, 41, 42, 5, 6, 0, 0, 42, 43, 5, 3, 0, 0, 43, 44, 5, 4, 0, 0, 44, 45, 3, 6, 3, 0, 45, 46, 5, 5, 0, 0, 46, 47, 3, 2, 1, 0, 47, 49, 1, 0, 0, 0, 48, 41, 1, 0, 0, 0, 49, 52, 1, 0, 0, 0, 50, 48, 1, 0, 0, 0, 50, 51, 1, 0, 0, 0, 51, 55, 1, 0, 0, 0, 52, 50, 1, 0, 0, 0, 53, 54, 5, 6, 0, 0, 54, 56, 3, 2, 1, 0, 55, 53, 1, 0, 0, 0, 55, 56, 1, 0, 0, 0, 56, 57, 1, 0, 0, 0, 57, 58, 5, 7, 0, 0, 58, 59, 5, 38, 0, 0, 59, 93, 1, 0, 0, 0, 60, 61, 5, 8, 0, 0, 61, 62, 5, 4, 0, 0, 62, 63, 3, 6, 3, 0, 63, 64, 5, 5, 0, 0, 64, 65, 3, 2, 1, 0, 65, 66, 5, 9, 0, 0, 66, 67, 5, 38, 0, 0, 67, 93, 1, 0, 0, 0, 68, 69, 5, 10, 0, 0, 69, 70, 5, 4, 0, 0, 70, 71, 3, 6, 3, 0, 71, 72, 5, 5, 0, 0, 72, 73, 3, 2, 1, 0, 73, 74, 5, 11, 0, 0, 74, 75, 5, 38, 0, 0, 75, 93, 1, 0, 0, 0, 76, 77, 5, 12, 0, 0, 77, 78, 5, 37, 0, 0, 78, 80, 5, 4, 0, 0, 79, 81, 3, 8, 4, 0, 80, 79, 1, 0, 0, 0, 80, 81, 1, 0, 0, 0, 81, 82, 1, 0, 0, 0, 82, 83, 5, 5, 0, 0, 83, 84, 3, 2, 1, 0, 84, 85, 5, 13, 0, 0, 85, 86, 5, 38, 0, 0, 86, 93, 1, 0, 0, 0, 87, 88, 5, 14, 0, 0, 88, 89, 3, 6, 3, 0, 89, 90, 5, 38, 0, 0, 90, 93, 1, 0, 0, 0, 91, 93, 5, 38, 0, 0, 92, 28, 1, 0, 0, 0, 92, 31, 1, 0, 0, 0, 92, 36, 1, 0, 0, 0, 92, 60, 1, 0, 0, 0, 92, 68, 1, 0, 0, 0, 92, 76, 1, 0, 0, 0, 92, 87, 1, 0, 0, 0, 92, 91, 1, 0, 0, 0, 93, 5, 1, 0, 0, 0, 94, 95, 6, 3, -1, 0, 95, 96, 5, 37, 0, 0, 96, 98, 5, 4, 0, 0, 97, 99, 3, 10, 5, 0, 98, 97, 1, 0, 0, 0, 98, 99, 1, 0, 0, 0, 99, 100, 1, 0, 0, 0, 100, 116, 5, 5, 0, 0, 101, 102, 5, 15, 0, 0, 102, 116, 3, 6, 3, 16, 103, 104, 5, 16, 0, 0, 104, 116, 3, 6, 3, 15, 105, 106, 5, 4, 0, 0, 106, 107, 3, 6, 3, 0, 107, 108, 5, 5, 0, 0, 108, 116, 1, 0, 0, 0, 109, 116, 5, 37, 0, 0, 110, 116, 5, 35, 0, 0, 111, 116, 5, 32, 0, 0, 112, 116, 5, 33, 0, 0, 113, 116, 5, 36, 0, 0, 114, 116, 5, 34, 0, 0, 115, 94, 1, 0, 0, 0, 115, 101, 1, 0, 0, 0, 115, 103, 1, 0, 0, 0, 115, 105, 1, 0, 0, 0, 115, 109, 1, 0, 0, 0, 115, 110, 1, 0, 0, 0, 115, 111, 1, 0, 0, 0, 115, 112, 1, 0, 0, 0, 115, 113, 1, 0, 0, 0, 115, 114, 1, 0, 0, 0, 116, 140, 1, 0, 0, 0, 117, 118, 10, 13, 0, 0, 118, 119, 5, 17, 0, 0, 119, 139, 3, 6, 3, 13, 120, 121, 10, 12, 0, 0, 121, 122, 7, 0, 0, 0, 122, 139, 3, 6, 3, 13, 123, 124, 10, 11, 0, 0, 124, 125, 7, 1, 0, 0, 125, 139, 3, 6, 3, 12, 126, 127, 10, 10, 0, 0, 127, 128, 7, 2, 0, 0, 128, 139, 3, 6, 3, 11, 129, 130, 10, 9, 0, 0, 130, 131, 7, 3, 0, 0, 131, 139, 3, 6, 3, 10, 132, 133, 10, 8, 0, 0, 133, 134, 5, 28, 0, 0, 134, 139, 3, 6, 3, 9, 135, 136, 10, 7, 0, 0, 136, 137, 5, 29, 0, 0, 137, 139, 3, 6, 3, 8, 138, 117, 1, 0, 0, 0, 138, 120, 1, 0, 0, 0, 138, 123, 1, 0, 0, 0, 138, 126, 1, 0, 0, 0, 138, 129, 1, 0, 0, 0, 138, 132, 1, 0, 0, 0, 138, 135, 1, 0, 0, 0, 139, 142, 1, 0, 0, 0, 140, 138, 1, 0, 0, 0, 140, 141, 1, 0, 0, 0, 141, 7, 1, 0, 0, 0, 142, 140, 1, 0, 0, 0, 143, 148, 5, 37, 0, 0, 144, 145, 5, 30, 0, 0, 145, 147, 5, 37, 0, 0, 146, 144, 1, 0, 0, 0, 147, 150, 1, 0, 0, 0, 148, 146, 1, 0, 0, 0, 148, 149, 1, 0, 0, 0, 149, 9, 1, 0, 0, 0, 150, 148, 1, 0, 0, 0, 151, 156, 3, 6, 3, 0, 152, 153, 5, 30, 0, 0, 153, 155, 3, 6, 3, 0, 154, 152, 1, 0, 0, 0, 155, 158, 1, 0, 0, 0, 156, 154, 1, 0, 0, 0, 156, 157, 1, 0, 0, 0, 157, 11, 1, 0, 0, 0, 158, 156, 1, 0, 0, 0, 12, 15, 25, 50, 55, 80, 92, 98, 115, 138, 140, 148, 156] \ No newline at end of file +[4, 1, 39, 160, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 1, 0, 5, 0, 14, 8, 0, 10, 0, 12, 0, 17, 9, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 5, 1, 24, 8, 1, 10, 1, 12, 1, 27, 9, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 5, 2, 49, 8, 2, 10, 2, 12, 2, 52, 9, 2, 1, 2, 1, 2, 3, 2, 56, 8, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 81, 8, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 93, 8, 2, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 99, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 3, 3, 116, 8, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 5, 3, 139, 8, 3, 10, 3, 12, 3, 142, 9, 3, 1, 4, 1, 4, 1, 4, 5, 4, 147, 8, 4, 10, 4, 12, 4, 150, 9, 4, 1, 5, 1, 5, 1, 5, 5, 5, 155, 8, 5, 10, 5, 12, 5, 158, 9, 5, 1, 5, 0, 1, 6, 6, 0, 2, 4, 6, 8, 10, 0, 4, 1, 0, 18, 20, 2, 0, 17, 17, 21, 21, 1, 0, 22, 25, 1, 0, 26, 27, 184, 0, 15, 1, 0, 0, 0, 2, 20, 1, 0, 0, 0, 4, 92, 1, 0, 0, 0, 6, 115, 1, 0, 0, 0, 8, 143, 1, 0, 0, 0, 10, 151, 1, 0, 0, 0, 12, 14, 3, 4, 2, 0, 13, 12, 1, 0, 0, 0, 14, 17, 1, 0, 0, 0, 15, 13, 1, 0, 0, 0, 15, 16, 1, 0, 0, 0, 16, 18, 1, 0, 0, 0, 17, 15, 1, 0, 0, 0, 18, 19, 5, 0, 0, 1, 19, 1, 1, 0, 0, 0, 20, 21, 5, 1, 0, 0, 21, 25, 5, 38, 0, 0, 22, 24, 3, 4, 2, 0, 23, 22, 1, 0, 0, 0, 24, 27, 1, 0, 0, 0, 25, 23, 1, 0, 0, 0, 25, 26, 1, 0, 0, 0, 26, 3, 1, 0, 0, 0, 27, 25, 1, 0, 0, 0, 28, 29, 3, 6, 3, 0, 29, 30, 5, 38, 0, 0, 30, 93, 1, 0, 0, 0, 31, 32, 5, 37, 0, 0, 32, 33, 5, 2, 0, 0, 33, 34, 3, 6, 3, 0, 34, 35, 5, 38, 0, 0, 35, 93, 1, 0, 0, 0, 36, 37, 5, 3, 0, 0, 37, 38, 5, 4, 0, 0, 38, 39, 3, 6, 3, 0, 39, 40, 5, 5, 0, 0, 40, 50, 3, 2, 1, 0, 41, 42, 5, 6, 0, 0, 42, 43, 5, 3, 0, 0, 43, 44, 5, 4, 0, 0, 44, 45, 3, 6, 3, 0, 45, 46, 5, 5, 0, 0, 46, 47, 3, 2, 1, 0, 47, 49, 1, 0, 0, 0, 48, 41, 1, 0, 0, 0, 49, 52, 1, 0, 0, 0, 50, 48, 1, 0, 0, 0, 50, 51, 1, 0, 0, 0, 51, 55, 1, 0, 0, 0, 52, 50, 1, 0, 0, 0, 53, 54, 5, 6, 0, 0, 54, 56, 3, 2, 1, 0, 55, 53, 1, 0, 0, 0, 55, 56, 1, 0, 0, 0, 56, 57, 1, 0, 0, 0, 57, 58, 5, 7, 0, 0, 58, 59, 5, 38, 0, 0, 59, 93, 1, 0, 0, 0, 60, 61, 5, 8, 0, 0, 61, 62, 5, 4, 0, 0, 62, 63, 3, 6, 3, 0, 63, 64, 5, 5, 0, 0, 64, 65, 3, 2, 1, 0, 65, 66, 5, 9, 0, 0, 66, 67, 5, 38, 0, 0, 67, 93, 1, 0, 0, 0, 68, 69, 5, 10, 0, 0, 69, 70, 5, 4, 0, 0, 70, 71, 3, 6, 3, 0, 71, 72, 5, 5, 0, 0, 72, 73, 3, 2, 1, 0, 73, 74, 5, 11, 0, 0, 74, 75, 5, 38, 0, 0, 75, 93, 1, 0, 0, 0, 76, 77, 5, 12, 0, 0, 77, 78, 5, 37, 0, 0, 78, 80, 5, 4, 0, 0, 79, 81, 3, 8, 4, 0, 80, 79, 1, 0, 0, 0, 80, 81, 1, 0, 0, 0, 81, 82, 1, 0, 0, 0, 82, 83, 5, 5, 0, 0, 83, 84, 3, 2, 1, 0, 84, 85, 5, 13, 0, 0, 85, 86, 5, 38, 0, 0, 86, 93, 1, 0, 0, 0, 87, 88, 5, 14, 0, 0, 88, 89, 3, 6, 3, 0, 89, 90, 5, 38, 0, 0, 90, 93, 1, 0, 0, 0, 91, 93, 5, 38, 0, 0, 92, 28, 1, 0, 0, 0, 92, 31, 1, 0, 0, 0, 92, 36, 1, 0, 0, 0, 92, 60, 1, 0, 0, 0, 92, 68, 1, 0, 0, 0, 92, 76, 1, 0, 0, 0, 92, 87, 1, 0, 0, 0, 92, 91, 1, 0, 0, 0, 93, 5, 1, 0, 0, 0, 94, 95, 6, 3, -1, 0, 95, 96, 5, 37, 0, 0, 96, 98, 5, 4, 0, 0, 97, 99, 3, 10, 5, 0, 98, 97, 1, 0, 0, 0, 98, 99, 1, 0, 0, 0, 99, 100, 1, 0, 0, 0, 100, 116, 5, 5, 0, 0, 101, 102, 5, 4, 0, 0, 102, 103, 3, 6, 3, 0, 103, 104, 5, 5, 0, 0, 104, 116, 1, 0, 0, 0, 105, 106, 5, 15, 0, 0, 106, 116, 3, 6, 3, 15, 107, 108, 5, 17, 0, 0, 108, 116, 3, 6, 3, 13, 109, 116, 5, 37, 0, 0, 110, 116, 5, 35, 0, 0, 111, 116, 5, 32, 0, 0, 112, 116, 5, 33, 0, 0, 113, 116, 5, 36, 0, 0, 114, 116, 5, 34, 0, 0, 115, 94, 1, 0, 0, 0, 115, 101, 1, 0, 0, 0, 115, 105, 1, 0, 0, 0, 115, 107, 1, 0, 0, 0, 115, 109, 1, 0, 0, 0, 115, 110, 1, 0, 0, 0, 115, 111, 1, 0, 0, 0, 115, 112, 1, 0, 0, 0, 115, 113, 1, 0, 0, 0, 115, 114, 1, 0, 0, 0, 116, 140, 1, 0, 0, 0, 117, 118, 10, 14, 0, 0, 118, 119, 5, 16, 0, 0, 119, 139, 3, 6, 3, 14, 120, 121, 10, 12, 0, 0, 121, 122, 7, 0, 0, 0, 122, 139, 3, 6, 3, 13, 123, 124, 10, 11, 0, 0, 124, 125, 7, 1, 0, 0, 125, 139, 3, 6, 3, 12, 126, 127, 10, 10, 0, 0, 127, 128, 7, 2, 0, 0, 128, 139, 3, 6, 3, 11, 129, 130, 10, 9, 0, 0, 130, 131, 7, 3, 0, 0, 131, 139, 3, 6, 3, 10, 132, 133, 10, 8, 0, 0, 133, 134, 5, 28, 0, 0, 134, 139, 3, 6, 3, 9, 135, 136, 10, 7, 0, 0, 136, 137, 5, 29, 0, 0, 137, 139, 3, 6, 3, 8, 138, 117, 1, 0, 0, 0, 138, 120, 1, 0, 0, 0, 138, 123, 1, 0, 0, 0, 138, 126, 1, 0, 0, 0, 138, 129, 1, 0, 0, 0, 138, 132, 1, 0, 0, 0, 138, 135, 1, 0, 0, 0, 139, 142, 1, 0, 0, 0, 140, 138, 1, 0, 0, 0, 140, 141, 1, 0, 0, 0, 141, 7, 1, 0, 0, 0, 142, 140, 1, 0, 0, 0, 143, 148, 5, 37, 0, 0, 144, 145, 5, 30, 0, 0, 145, 147, 5, 37, 0, 0, 146, 144, 1, 0, 0, 0, 147, 150, 1, 0, 0, 0, 148, 146, 1, 0, 0, 0, 148, 149, 1, 0, 0, 0, 149, 9, 1, 0, 0, 0, 150, 148, 1, 0, 0, 0, 151, 156, 3, 6, 3, 0, 152, 153, 5, 30, 0, 0, 153, 155, 3, 6, 3, 0, 154, 152, 1, 0, 0, 0, 155, 158, 1, 0, 0, 0, 156, 154, 1, 0, 0, 0, 156, 157, 1, 0, 0, 0, 157, 11, 1, 0, 0, 0, 158, 156, 1, 0, 0, 0, 12, 15, 25, 50, 55, 80, 92, 98, 115, 138, 140, 148, 156] \ No newline at end of file diff --git a/src/main/interpreter/antlr/MineScript.tokens b/src/main/interpreter/antlr/MineScript.tokens index 48dfea6..6fd3bd7 100644 --- a/src/main/interpreter/antlr/MineScript.tokens +++ b/src/main/interpreter/antlr/MineScript.tokens @@ -51,9 +51,9 @@ WS=39 'define'=12 'enddefine'=13 'return'=14 -'-'=15 -'not'=16 -'^'=17 +'not'=15 +'^'=16 +'-'=17 '*'=18 '/'=19 '%'=20 diff --git a/src/main/interpreter/antlr/MineScriptBaseVisitor.java b/src/main/interpreter/antlr/MineScriptBaseVisitor.java index 4afece6..5fd6cdb 100644 --- a/src/main/interpreter/antlr/MineScriptBaseVisitor.java +++ b/src/main/interpreter/antlr/MineScriptBaseVisitor.java @@ -1,6 +1,6 @@ package interpreter.antlr; -// Generated from MineScript.g4 by ANTLR 4.12.0 +// Generated from MineScript.g4 by ANTLR 4.13.0 import org.antlr.v4.runtime.tree.AbstractParseTreeVisitor; /** diff --git a/src/main/interpreter/antlr/MineScriptLexer.interp b/src/main/interpreter/antlr/MineScriptLexer.interp index c92f276..7ae9244 100644 --- a/src/main/interpreter/antlr/MineScriptLexer.interp +++ b/src/main/interpreter/antlr/MineScriptLexer.interp @@ -14,9 +14,9 @@ null 'define' 'enddefine' 'return' -'-' 'not' '^' +'-' '*' '/' '%' @@ -131,4 +131,4 @@ mode names: DEFAULT_MODE atn: -[4, 0, 39, 309, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 17, 1, 17, 1, 18, 1, 18, 1, 19, 1, 19, 1, 20, 1, 20, 1, 21, 1, 21, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 30, 1, 30, 5, 30, 206, 8, 30, 10, 30, 12, 30, 209, 9, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 3, 31, 228, 8, 31, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 3, 32, 257, 8, 32, 1, 33, 4, 33, 260, 8, 33, 11, 33, 12, 33, 261, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 273, 8, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 4, 35, 287, 8, 35, 11, 35, 12, 35, 288, 1, 36, 1, 36, 5, 36, 293, 8, 36, 10, 36, 12, 36, 296, 9, 36, 1, 37, 4, 37, 299, 8, 37, 11, 37, 12, 37, 300, 1, 38, 4, 38, 304, 8, 38, 11, 38, 12, 38, 305, 1, 38, 1, 38, 0, 0, 39, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, 37, 75, 38, 77, 39, 1, 0, 5, 2, 0, 10, 10, 13, 13, 1, 0, 48, 57, 4, 0, 48, 57, 65, 90, 95, 95, 97, 122, 3, 0, 65, 90, 95, 95, 97, 122, 2, 0, 9, 9, 32, 32, 323, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 1, 79, 1, 0, 0, 0, 3, 82, 1, 0, 0, 0, 5, 84, 1, 0, 0, 0, 7, 87, 1, 0, 0, 0, 9, 89, 1, 0, 0, 0, 11, 91, 1, 0, 0, 0, 13, 96, 1, 0, 0, 0, 15, 102, 1, 0, 0, 0, 17, 108, 1, 0, 0, 0, 19, 117, 1, 0, 0, 0, 21, 124, 1, 0, 0, 0, 23, 134, 1, 0, 0, 0, 25, 141, 1, 0, 0, 0, 27, 151, 1, 0, 0, 0, 29, 158, 1, 0, 0, 0, 31, 160, 1, 0, 0, 0, 33, 164, 1, 0, 0, 0, 35, 166, 1, 0, 0, 0, 37, 168, 1, 0, 0, 0, 39, 170, 1, 0, 0, 0, 41, 172, 1, 0, 0, 0, 43, 174, 1, 0, 0, 0, 45, 176, 1, 0, 0, 0, 47, 178, 1, 0, 0, 0, 49, 181, 1, 0, 0, 0, 51, 184, 1, 0, 0, 0, 53, 187, 1, 0, 0, 0, 55, 194, 1, 0, 0, 0, 57, 198, 1, 0, 0, 0, 59, 201, 1, 0, 0, 0, 61, 203, 1, 0, 0, 0, 63, 227, 1, 0, 0, 0, 65, 256, 1, 0, 0, 0, 67, 259, 1, 0, 0, 0, 69, 272, 1, 0, 0, 0, 71, 274, 1, 0, 0, 0, 73, 290, 1, 0, 0, 0, 75, 298, 1, 0, 0, 0, 77, 303, 1, 0, 0, 0, 79, 80, 5, 100, 0, 0, 80, 81, 5, 111, 0, 0, 81, 2, 1, 0, 0, 0, 82, 83, 5, 61, 0, 0, 83, 4, 1, 0, 0, 0, 84, 85, 5, 105, 0, 0, 85, 86, 5, 102, 0, 0, 86, 6, 1, 0, 0, 0, 87, 88, 5, 40, 0, 0, 88, 8, 1, 0, 0, 0, 89, 90, 5, 41, 0, 0, 90, 10, 1, 0, 0, 0, 91, 92, 5, 101, 0, 0, 92, 93, 5, 108, 0, 0, 93, 94, 5, 115, 0, 0, 94, 95, 5, 101, 0, 0, 95, 12, 1, 0, 0, 0, 96, 97, 5, 101, 0, 0, 97, 98, 5, 110, 0, 0, 98, 99, 5, 100, 0, 0, 99, 100, 5, 105, 0, 0, 100, 101, 5, 102, 0, 0, 101, 14, 1, 0, 0, 0, 102, 103, 5, 119, 0, 0, 103, 104, 5, 104, 0, 0, 104, 105, 5, 105, 0, 0, 105, 106, 5, 108, 0, 0, 106, 107, 5, 101, 0, 0, 107, 16, 1, 0, 0, 0, 108, 109, 5, 101, 0, 0, 109, 110, 5, 110, 0, 0, 110, 111, 5, 100, 0, 0, 111, 112, 5, 119, 0, 0, 112, 113, 5, 104, 0, 0, 113, 114, 5, 105, 0, 0, 114, 115, 5, 108, 0, 0, 115, 116, 5, 101, 0, 0, 116, 18, 1, 0, 0, 0, 117, 118, 5, 114, 0, 0, 118, 119, 5, 101, 0, 0, 119, 120, 5, 112, 0, 0, 120, 121, 5, 101, 0, 0, 121, 122, 5, 97, 0, 0, 122, 123, 5, 116, 0, 0, 123, 20, 1, 0, 0, 0, 124, 125, 5, 101, 0, 0, 125, 126, 5, 110, 0, 0, 126, 127, 5, 100, 0, 0, 127, 128, 5, 114, 0, 0, 128, 129, 5, 101, 0, 0, 129, 130, 5, 112, 0, 0, 130, 131, 5, 101, 0, 0, 131, 132, 5, 97, 0, 0, 132, 133, 5, 116, 0, 0, 133, 22, 1, 0, 0, 0, 134, 135, 5, 100, 0, 0, 135, 136, 5, 101, 0, 0, 136, 137, 5, 102, 0, 0, 137, 138, 5, 105, 0, 0, 138, 139, 5, 110, 0, 0, 139, 140, 5, 101, 0, 0, 140, 24, 1, 0, 0, 0, 141, 142, 5, 101, 0, 0, 142, 143, 5, 110, 0, 0, 143, 144, 5, 100, 0, 0, 144, 145, 5, 100, 0, 0, 145, 146, 5, 101, 0, 0, 146, 147, 5, 102, 0, 0, 147, 148, 5, 105, 0, 0, 148, 149, 5, 110, 0, 0, 149, 150, 5, 101, 0, 0, 150, 26, 1, 0, 0, 0, 151, 152, 5, 114, 0, 0, 152, 153, 5, 101, 0, 0, 153, 154, 5, 116, 0, 0, 154, 155, 5, 117, 0, 0, 155, 156, 5, 114, 0, 0, 156, 157, 5, 110, 0, 0, 157, 28, 1, 0, 0, 0, 158, 159, 5, 45, 0, 0, 159, 30, 1, 0, 0, 0, 160, 161, 5, 110, 0, 0, 161, 162, 5, 111, 0, 0, 162, 163, 5, 116, 0, 0, 163, 32, 1, 0, 0, 0, 164, 165, 5, 94, 0, 0, 165, 34, 1, 0, 0, 0, 166, 167, 5, 42, 0, 0, 167, 36, 1, 0, 0, 0, 168, 169, 5, 47, 0, 0, 169, 38, 1, 0, 0, 0, 170, 171, 5, 37, 0, 0, 171, 40, 1, 0, 0, 0, 172, 173, 5, 43, 0, 0, 173, 42, 1, 0, 0, 0, 174, 175, 5, 60, 0, 0, 175, 44, 1, 0, 0, 0, 176, 177, 5, 62, 0, 0, 177, 46, 1, 0, 0, 0, 178, 179, 5, 60, 0, 0, 179, 180, 5, 61, 0, 0, 180, 48, 1, 0, 0, 0, 181, 182, 5, 62, 0, 0, 182, 183, 5, 61, 0, 0, 183, 50, 1, 0, 0, 0, 184, 185, 5, 105, 0, 0, 185, 186, 5, 115, 0, 0, 186, 52, 1, 0, 0, 0, 187, 188, 5, 105, 0, 0, 188, 189, 5, 115, 0, 0, 189, 190, 5, 32, 0, 0, 190, 191, 5, 110, 0, 0, 191, 192, 5, 111, 0, 0, 192, 193, 5, 116, 0, 0, 193, 54, 1, 0, 0, 0, 194, 195, 5, 97, 0, 0, 195, 196, 5, 110, 0, 0, 196, 197, 5, 100, 0, 0, 197, 56, 1, 0, 0, 0, 198, 199, 5, 111, 0, 0, 199, 200, 5, 114, 0, 0, 200, 58, 1, 0, 0, 0, 201, 202, 5, 44, 0, 0, 202, 60, 1, 0, 0, 0, 203, 207, 5, 35, 0, 0, 204, 206, 8, 0, 0, 0, 205, 204, 1, 0, 0, 0, 206, 209, 1, 0, 0, 0, 207, 205, 1, 0, 0, 0, 207, 208, 1, 0, 0, 0, 208, 210, 1, 0, 0, 0, 209, 207, 1, 0, 0, 0, 210, 211, 6, 30, 0, 0, 211, 62, 1, 0, 0, 0, 212, 213, 5, 108, 0, 0, 213, 214, 5, 101, 0, 0, 214, 215, 5, 102, 0, 0, 215, 228, 5, 116, 0, 0, 216, 217, 5, 114, 0, 0, 217, 218, 5, 105, 0, 0, 218, 219, 5, 103, 0, 0, 219, 220, 5, 104, 0, 0, 220, 228, 5, 116, 0, 0, 221, 222, 5, 117, 0, 0, 222, 228, 5, 112, 0, 0, 223, 224, 5, 100, 0, 0, 224, 225, 5, 111, 0, 0, 225, 226, 5, 119, 0, 0, 226, 228, 5, 110, 0, 0, 227, 212, 1, 0, 0, 0, 227, 216, 1, 0, 0, 0, 227, 221, 1, 0, 0, 0, 227, 223, 1, 0, 0, 0, 228, 64, 1, 0, 0, 0, 229, 230, 5, 110, 0, 0, 230, 231, 5, 111, 0, 0, 231, 232, 5, 114, 0, 0, 232, 233, 5, 116, 0, 0, 233, 257, 5, 104, 0, 0, 234, 235, 5, 115, 0, 0, 235, 236, 5, 111, 0, 0, 236, 237, 5, 117, 0, 0, 237, 238, 5, 116, 0, 0, 238, 257, 5, 104, 0, 0, 239, 240, 5, 101, 0, 0, 240, 241, 5, 97, 0, 0, 241, 242, 5, 115, 0, 0, 242, 257, 5, 116, 0, 0, 243, 244, 5, 119, 0, 0, 244, 245, 5, 101, 0, 0, 245, 246, 5, 115, 0, 0, 246, 257, 5, 116, 0, 0, 247, 248, 5, 116, 0, 0, 248, 249, 5, 111, 0, 0, 249, 257, 5, 112, 0, 0, 250, 251, 5, 98, 0, 0, 251, 252, 5, 111, 0, 0, 252, 253, 5, 116, 0, 0, 253, 254, 5, 116, 0, 0, 254, 255, 5, 111, 0, 0, 255, 257, 5, 109, 0, 0, 256, 229, 1, 0, 0, 0, 256, 234, 1, 0, 0, 0, 256, 239, 1, 0, 0, 0, 256, 243, 1, 0, 0, 0, 256, 247, 1, 0, 0, 0, 256, 250, 1, 0, 0, 0, 257, 66, 1, 0, 0, 0, 258, 260, 7, 1, 0, 0, 259, 258, 1, 0, 0, 0, 260, 261, 1, 0, 0, 0, 261, 259, 1, 0, 0, 0, 261, 262, 1, 0, 0, 0, 262, 68, 1, 0, 0, 0, 263, 264, 5, 116, 0, 0, 264, 265, 5, 114, 0, 0, 265, 266, 5, 117, 0, 0, 266, 273, 5, 101, 0, 0, 267, 268, 5, 102, 0, 0, 268, 269, 5, 97, 0, 0, 269, 270, 5, 108, 0, 0, 270, 271, 5, 115, 0, 0, 271, 273, 5, 101, 0, 0, 272, 263, 1, 0, 0, 0, 272, 267, 1, 0, 0, 0, 273, 70, 1, 0, 0, 0, 274, 275, 5, 109, 0, 0, 275, 276, 5, 105, 0, 0, 276, 277, 5, 110, 0, 0, 277, 278, 5, 101, 0, 0, 278, 279, 5, 99, 0, 0, 279, 280, 5, 114, 0, 0, 280, 281, 5, 97, 0, 0, 281, 282, 5, 102, 0, 0, 282, 283, 5, 116, 0, 0, 283, 284, 5, 58, 0, 0, 284, 286, 1, 0, 0, 0, 285, 287, 7, 2, 0, 0, 286, 285, 1, 0, 0, 0, 287, 288, 1, 0, 0, 0, 288, 286, 1, 0, 0, 0, 288, 289, 1, 0, 0, 0, 289, 72, 1, 0, 0, 0, 290, 294, 7, 3, 0, 0, 291, 293, 7, 2, 0, 0, 292, 291, 1, 0, 0, 0, 293, 296, 1, 0, 0, 0, 294, 292, 1, 0, 0, 0, 294, 295, 1, 0, 0, 0, 295, 74, 1, 0, 0, 0, 296, 294, 1, 0, 0, 0, 297, 299, 7, 0, 0, 0, 298, 297, 1, 0, 0, 0, 299, 300, 1, 0, 0, 0, 300, 298, 1, 0, 0, 0, 300, 301, 1, 0, 0, 0, 301, 76, 1, 0, 0, 0, 302, 304, 7, 4, 0, 0, 303, 302, 1, 0, 0, 0, 304, 305, 1, 0, 0, 0, 305, 303, 1, 0, 0, 0, 305, 306, 1, 0, 0, 0, 306, 307, 1, 0, 0, 0, 307, 308, 6, 38, 0, 0, 308, 78, 1, 0, 0, 0, 10, 0, 207, 227, 256, 261, 272, 288, 294, 300, 305, 1, 6, 0, 0] \ No newline at end of file +[4, 0, 39, 309, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 16, 1, 16, 1, 17, 1, 17, 1, 18, 1, 18, 1, 19, 1, 19, 1, 20, 1, 20, 1, 21, 1, 21, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 30, 1, 30, 5, 30, 206, 8, 30, 10, 30, 12, 30, 209, 9, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 3, 31, 228, 8, 31, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 3, 32, 257, 8, 32, 1, 33, 4, 33, 260, 8, 33, 11, 33, 12, 33, 261, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 273, 8, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 4, 35, 287, 8, 35, 11, 35, 12, 35, 288, 1, 36, 1, 36, 5, 36, 293, 8, 36, 10, 36, 12, 36, 296, 9, 36, 1, 37, 4, 37, 299, 8, 37, 11, 37, 12, 37, 300, 1, 38, 4, 38, 304, 8, 38, 11, 38, 12, 38, 305, 1, 38, 1, 38, 0, 0, 39, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, 37, 75, 38, 77, 39, 1, 0, 5, 2, 0, 10, 10, 13, 13, 1, 0, 48, 57, 4, 0, 48, 57, 65, 90, 95, 95, 97, 122, 3, 0, 65, 90, 95, 95, 97, 122, 2, 0, 9, 9, 32, 32, 323, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 1, 79, 1, 0, 0, 0, 3, 82, 1, 0, 0, 0, 5, 84, 1, 0, 0, 0, 7, 87, 1, 0, 0, 0, 9, 89, 1, 0, 0, 0, 11, 91, 1, 0, 0, 0, 13, 96, 1, 0, 0, 0, 15, 102, 1, 0, 0, 0, 17, 108, 1, 0, 0, 0, 19, 117, 1, 0, 0, 0, 21, 124, 1, 0, 0, 0, 23, 134, 1, 0, 0, 0, 25, 141, 1, 0, 0, 0, 27, 151, 1, 0, 0, 0, 29, 158, 1, 0, 0, 0, 31, 162, 1, 0, 0, 0, 33, 164, 1, 0, 0, 0, 35, 166, 1, 0, 0, 0, 37, 168, 1, 0, 0, 0, 39, 170, 1, 0, 0, 0, 41, 172, 1, 0, 0, 0, 43, 174, 1, 0, 0, 0, 45, 176, 1, 0, 0, 0, 47, 178, 1, 0, 0, 0, 49, 181, 1, 0, 0, 0, 51, 184, 1, 0, 0, 0, 53, 187, 1, 0, 0, 0, 55, 194, 1, 0, 0, 0, 57, 198, 1, 0, 0, 0, 59, 201, 1, 0, 0, 0, 61, 203, 1, 0, 0, 0, 63, 227, 1, 0, 0, 0, 65, 256, 1, 0, 0, 0, 67, 259, 1, 0, 0, 0, 69, 272, 1, 0, 0, 0, 71, 274, 1, 0, 0, 0, 73, 290, 1, 0, 0, 0, 75, 298, 1, 0, 0, 0, 77, 303, 1, 0, 0, 0, 79, 80, 5, 100, 0, 0, 80, 81, 5, 111, 0, 0, 81, 2, 1, 0, 0, 0, 82, 83, 5, 61, 0, 0, 83, 4, 1, 0, 0, 0, 84, 85, 5, 105, 0, 0, 85, 86, 5, 102, 0, 0, 86, 6, 1, 0, 0, 0, 87, 88, 5, 40, 0, 0, 88, 8, 1, 0, 0, 0, 89, 90, 5, 41, 0, 0, 90, 10, 1, 0, 0, 0, 91, 92, 5, 101, 0, 0, 92, 93, 5, 108, 0, 0, 93, 94, 5, 115, 0, 0, 94, 95, 5, 101, 0, 0, 95, 12, 1, 0, 0, 0, 96, 97, 5, 101, 0, 0, 97, 98, 5, 110, 0, 0, 98, 99, 5, 100, 0, 0, 99, 100, 5, 105, 0, 0, 100, 101, 5, 102, 0, 0, 101, 14, 1, 0, 0, 0, 102, 103, 5, 119, 0, 0, 103, 104, 5, 104, 0, 0, 104, 105, 5, 105, 0, 0, 105, 106, 5, 108, 0, 0, 106, 107, 5, 101, 0, 0, 107, 16, 1, 0, 0, 0, 108, 109, 5, 101, 0, 0, 109, 110, 5, 110, 0, 0, 110, 111, 5, 100, 0, 0, 111, 112, 5, 119, 0, 0, 112, 113, 5, 104, 0, 0, 113, 114, 5, 105, 0, 0, 114, 115, 5, 108, 0, 0, 115, 116, 5, 101, 0, 0, 116, 18, 1, 0, 0, 0, 117, 118, 5, 114, 0, 0, 118, 119, 5, 101, 0, 0, 119, 120, 5, 112, 0, 0, 120, 121, 5, 101, 0, 0, 121, 122, 5, 97, 0, 0, 122, 123, 5, 116, 0, 0, 123, 20, 1, 0, 0, 0, 124, 125, 5, 101, 0, 0, 125, 126, 5, 110, 0, 0, 126, 127, 5, 100, 0, 0, 127, 128, 5, 114, 0, 0, 128, 129, 5, 101, 0, 0, 129, 130, 5, 112, 0, 0, 130, 131, 5, 101, 0, 0, 131, 132, 5, 97, 0, 0, 132, 133, 5, 116, 0, 0, 133, 22, 1, 0, 0, 0, 134, 135, 5, 100, 0, 0, 135, 136, 5, 101, 0, 0, 136, 137, 5, 102, 0, 0, 137, 138, 5, 105, 0, 0, 138, 139, 5, 110, 0, 0, 139, 140, 5, 101, 0, 0, 140, 24, 1, 0, 0, 0, 141, 142, 5, 101, 0, 0, 142, 143, 5, 110, 0, 0, 143, 144, 5, 100, 0, 0, 144, 145, 5, 100, 0, 0, 145, 146, 5, 101, 0, 0, 146, 147, 5, 102, 0, 0, 147, 148, 5, 105, 0, 0, 148, 149, 5, 110, 0, 0, 149, 150, 5, 101, 0, 0, 150, 26, 1, 0, 0, 0, 151, 152, 5, 114, 0, 0, 152, 153, 5, 101, 0, 0, 153, 154, 5, 116, 0, 0, 154, 155, 5, 117, 0, 0, 155, 156, 5, 114, 0, 0, 156, 157, 5, 110, 0, 0, 157, 28, 1, 0, 0, 0, 158, 159, 5, 110, 0, 0, 159, 160, 5, 111, 0, 0, 160, 161, 5, 116, 0, 0, 161, 30, 1, 0, 0, 0, 162, 163, 5, 94, 0, 0, 163, 32, 1, 0, 0, 0, 164, 165, 5, 45, 0, 0, 165, 34, 1, 0, 0, 0, 166, 167, 5, 42, 0, 0, 167, 36, 1, 0, 0, 0, 168, 169, 5, 47, 0, 0, 169, 38, 1, 0, 0, 0, 170, 171, 5, 37, 0, 0, 171, 40, 1, 0, 0, 0, 172, 173, 5, 43, 0, 0, 173, 42, 1, 0, 0, 0, 174, 175, 5, 60, 0, 0, 175, 44, 1, 0, 0, 0, 176, 177, 5, 62, 0, 0, 177, 46, 1, 0, 0, 0, 178, 179, 5, 60, 0, 0, 179, 180, 5, 61, 0, 0, 180, 48, 1, 0, 0, 0, 181, 182, 5, 62, 0, 0, 182, 183, 5, 61, 0, 0, 183, 50, 1, 0, 0, 0, 184, 185, 5, 105, 0, 0, 185, 186, 5, 115, 0, 0, 186, 52, 1, 0, 0, 0, 187, 188, 5, 105, 0, 0, 188, 189, 5, 115, 0, 0, 189, 190, 5, 32, 0, 0, 190, 191, 5, 110, 0, 0, 191, 192, 5, 111, 0, 0, 192, 193, 5, 116, 0, 0, 193, 54, 1, 0, 0, 0, 194, 195, 5, 97, 0, 0, 195, 196, 5, 110, 0, 0, 196, 197, 5, 100, 0, 0, 197, 56, 1, 0, 0, 0, 198, 199, 5, 111, 0, 0, 199, 200, 5, 114, 0, 0, 200, 58, 1, 0, 0, 0, 201, 202, 5, 44, 0, 0, 202, 60, 1, 0, 0, 0, 203, 207, 5, 35, 0, 0, 204, 206, 8, 0, 0, 0, 205, 204, 1, 0, 0, 0, 206, 209, 1, 0, 0, 0, 207, 205, 1, 0, 0, 0, 207, 208, 1, 0, 0, 0, 208, 210, 1, 0, 0, 0, 209, 207, 1, 0, 0, 0, 210, 211, 6, 30, 0, 0, 211, 62, 1, 0, 0, 0, 212, 213, 5, 108, 0, 0, 213, 214, 5, 101, 0, 0, 214, 215, 5, 102, 0, 0, 215, 228, 5, 116, 0, 0, 216, 217, 5, 114, 0, 0, 217, 218, 5, 105, 0, 0, 218, 219, 5, 103, 0, 0, 219, 220, 5, 104, 0, 0, 220, 228, 5, 116, 0, 0, 221, 222, 5, 117, 0, 0, 222, 228, 5, 112, 0, 0, 223, 224, 5, 100, 0, 0, 224, 225, 5, 111, 0, 0, 225, 226, 5, 119, 0, 0, 226, 228, 5, 110, 0, 0, 227, 212, 1, 0, 0, 0, 227, 216, 1, 0, 0, 0, 227, 221, 1, 0, 0, 0, 227, 223, 1, 0, 0, 0, 228, 64, 1, 0, 0, 0, 229, 230, 5, 110, 0, 0, 230, 231, 5, 111, 0, 0, 231, 232, 5, 114, 0, 0, 232, 233, 5, 116, 0, 0, 233, 257, 5, 104, 0, 0, 234, 235, 5, 115, 0, 0, 235, 236, 5, 111, 0, 0, 236, 237, 5, 117, 0, 0, 237, 238, 5, 116, 0, 0, 238, 257, 5, 104, 0, 0, 239, 240, 5, 101, 0, 0, 240, 241, 5, 97, 0, 0, 241, 242, 5, 115, 0, 0, 242, 257, 5, 116, 0, 0, 243, 244, 5, 119, 0, 0, 244, 245, 5, 101, 0, 0, 245, 246, 5, 115, 0, 0, 246, 257, 5, 116, 0, 0, 247, 248, 5, 116, 0, 0, 248, 249, 5, 111, 0, 0, 249, 257, 5, 112, 0, 0, 250, 251, 5, 98, 0, 0, 251, 252, 5, 111, 0, 0, 252, 253, 5, 116, 0, 0, 253, 254, 5, 116, 0, 0, 254, 255, 5, 111, 0, 0, 255, 257, 5, 109, 0, 0, 256, 229, 1, 0, 0, 0, 256, 234, 1, 0, 0, 0, 256, 239, 1, 0, 0, 0, 256, 243, 1, 0, 0, 0, 256, 247, 1, 0, 0, 0, 256, 250, 1, 0, 0, 0, 257, 66, 1, 0, 0, 0, 258, 260, 7, 1, 0, 0, 259, 258, 1, 0, 0, 0, 260, 261, 1, 0, 0, 0, 261, 259, 1, 0, 0, 0, 261, 262, 1, 0, 0, 0, 262, 68, 1, 0, 0, 0, 263, 264, 5, 116, 0, 0, 264, 265, 5, 114, 0, 0, 265, 266, 5, 117, 0, 0, 266, 273, 5, 101, 0, 0, 267, 268, 5, 102, 0, 0, 268, 269, 5, 97, 0, 0, 269, 270, 5, 108, 0, 0, 270, 271, 5, 115, 0, 0, 271, 273, 5, 101, 0, 0, 272, 263, 1, 0, 0, 0, 272, 267, 1, 0, 0, 0, 273, 70, 1, 0, 0, 0, 274, 275, 5, 109, 0, 0, 275, 276, 5, 105, 0, 0, 276, 277, 5, 110, 0, 0, 277, 278, 5, 101, 0, 0, 278, 279, 5, 99, 0, 0, 279, 280, 5, 114, 0, 0, 280, 281, 5, 97, 0, 0, 281, 282, 5, 102, 0, 0, 282, 283, 5, 116, 0, 0, 283, 284, 5, 58, 0, 0, 284, 286, 1, 0, 0, 0, 285, 287, 7, 2, 0, 0, 286, 285, 1, 0, 0, 0, 287, 288, 1, 0, 0, 0, 288, 286, 1, 0, 0, 0, 288, 289, 1, 0, 0, 0, 289, 72, 1, 0, 0, 0, 290, 294, 7, 3, 0, 0, 291, 293, 7, 2, 0, 0, 292, 291, 1, 0, 0, 0, 293, 296, 1, 0, 0, 0, 294, 292, 1, 0, 0, 0, 294, 295, 1, 0, 0, 0, 295, 74, 1, 0, 0, 0, 296, 294, 1, 0, 0, 0, 297, 299, 7, 0, 0, 0, 298, 297, 1, 0, 0, 0, 299, 300, 1, 0, 0, 0, 300, 298, 1, 0, 0, 0, 300, 301, 1, 0, 0, 0, 301, 76, 1, 0, 0, 0, 302, 304, 7, 4, 0, 0, 303, 302, 1, 0, 0, 0, 304, 305, 1, 0, 0, 0, 305, 303, 1, 0, 0, 0, 305, 306, 1, 0, 0, 0, 306, 307, 1, 0, 0, 0, 307, 308, 6, 38, 0, 0, 308, 78, 1, 0, 0, 0, 10, 0, 207, 227, 256, 261, 272, 288, 294, 300, 305, 1, 6, 0, 0] \ No newline at end of file diff --git a/src/main/interpreter/antlr/MineScriptLexer.java b/src/main/interpreter/antlr/MineScriptLexer.java index 22dcaa9..31ca53c 100644 --- a/src/main/interpreter/antlr/MineScriptLexer.java +++ b/src/main/interpreter/antlr/MineScriptLexer.java @@ -1,6 +1,6 @@ package interpreter.antlr; -// Generated from MineScript.g4 by ANTLR 4.12.0 +// Generated from MineScript.g4 by ANTLR 4.13.0 import org.antlr.v4.runtime.Lexer; import org.antlr.v4.runtime.CharStream; import org.antlr.v4.runtime.Token; @@ -12,7 +12,7 @@ @SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast", "CheckReturnValue"}) public class MineScriptLexer extends Lexer { - static { RuntimeMetaData.checkVersion("4.12.0", RuntimeMetaData.VERSION); } + static { RuntimeMetaData.checkVersion("4.13.0", RuntimeMetaData.VERSION); } protected static final DFA[] _decisionToDFA; protected static final PredictionContextCache _sharedContextCache = @@ -47,7 +47,7 @@ private static String[] makeLiteralNames() { return new String[] { null, "'do'", "'='", "'if'", "'('", "')'", "'else'", "'endif'", "'while'", "'endwhile'", "'repeat'", "'endrepeat'", "'define'", "'enddefine'", "'return'", - "'-'", "'not'", "'^'", "'*'", "'/'", "'%'", "'+'", "'<'", "'>'", "'<='", + "'not'", "'^'", "'-'", "'*'", "'/'", "'%'", "'+'", "'<'", "'>'", "'<='", "'>='", "'is'", "'is not'", "'and'", "'or'", "','" }; } @@ -142,7 +142,7 @@ public MineScriptLexer(CharStream input) { "\u0001\u000b\u0001\u000b\u0001\u000b\u0001\u000b\u0001\u000b\u0001\f\u0001"+ "\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001"+ "\r\u0001\r\u0001\r\u0001\r\u0001\r\u0001\r\u0001\r\u0001\u000e\u0001\u000e"+ - "\u0001\u000f\u0001\u000f\u0001\u000f\u0001\u000f\u0001\u0010\u0001\u0010"+ + "\u0001\u000e\u0001\u000e\u0001\u000f\u0001\u000f\u0001\u0010\u0001\u0010"+ "\u0001\u0011\u0001\u0011\u0001\u0012\u0001\u0012\u0001\u0013\u0001\u0013"+ "\u0001\u0014\u0001\u0014\u0001\u0015\u0001\u0015\u0001\u0016\u0001\u0016"+ "\u0001\u0017\u0001\u0017\u0001\u0017\u0001\u0018\u0001\u0018\u0001\u0018"+ @@ -192,7 +192,7 @@ public MineScriptLexer(CharStream input) { "\u0000\u0013u\u0001\u0000\u0000\u0000\u0015|\u0001\u0000\u0000\u0000\u0017"+ "\u0086\u0001\u0000\u0000\u0000\u0019\u008d\u0001\u0000\u0000\u0000\u001b"+ "\u0097\u0001\u0000\u0000\u0000\u001d\u009e\u0001\u0000\u0000\u0000\u001f"+ - "\u00a0\u0001\u0000\u0000\u0000!\u00a4\u0001\u0000\u0000\u0000#\u00a6\u0001"+ + "\u00a2\u0001\u0000\u0000\u0000!\u00a4\u0001\u0000\u0000\u0000#\u00a6\u0001"+ "\u0000\u0000\u0000%\u00a8\u0001\u0000\u0000\u0000\'\u00aa\u0001\u0000"+ "\u0000\u0000)\u00ac\u0001\u0000\u0000\u0000+\u00ae\u0001\u0000\u0000\u0000"+ "-\u00b0\u0001\u0000\u0000\u0000/\u00b2\u0001\u0000\u0000\u00001\u00b5"+ @@ -231,82 +231,82 @@ public MineScriptLexer(CharStream input) { "\u0001\u0000\u0000\u0000\u0097\u0098\u0005r\u0000\u0000\u0098\u0099\u0005"+ "e\u0000\u0000\u0099\u009a\u0005t\u0000\u0000\u009a\u009b\u0005u\u0000"+ "\u0000\u009b\u009c\u0005r\u0000\u0000\u009c\u009d\u0005n\u0000\u0000\u009d"+ - "\u001c\u0001\u0000\u0000\u0000\u009e\u009f\u0005-\u0000\u0000\u009f\u001e"+ - "\u0001\u0000\u0000\u0000\u00a0\u00a1\u0005n\u0000\u0000\u00a1\u00a2\u0005"+ - "o\u0000\u0000\u00a2\u00a3\u0005t\u0000\u0000\u00a3 \u0001\u0000\u0000"+ - "\u0000\u00a4\u00a5\u0005^\u0000\u0000\u00a5\"\u0001\u0000\u0000\u0000"+ - "\u00a6\u00a7\u0005*\u0000\u0000\u00a7$\u0001\u0000\u0000\u0000\u00a8\u00a9"+ - "\u0005/\u0000\u0000\u00a9&\u0001\u0000\u0000\u0000\u00aa\u00ab\u0005%"+ - "\u0000\u0000\u00ab(\u0001\u0000\u0000\u0000\u00ac\u00ad\u0005+\u0000\u0000"+ - "\u00ad*\u0001\u0000\u0000\u0000\u00ae\u00af\u0005<\u0000\u0000\u00af,"+ - "\u0001\u0000\u0000\u0000\u00b0\u00b1\u0005>\u0000\u0000\u00b1.\u0001\u0000"+ - "\u0000\u0000\u00b2\u00b3\u0005<\u0000\u0000\u00b3\u00b4\u0005=\u0000\u0000"+ - "\u00b40\u0001\u0000\u0000\u0000\u00b5\u00b6\u0005>\u0000\u0000\u00b6\u00b7"+ - "\u0005=\u0000\u0000\u00b72\u0001\u0000\u0000\u0000\u00b8\u00b9\u0005i"+ - "\u0000\u0000\u00b9\u00ba\u0005s\u0000\u0000\u00ba4\u0001\u0000\u0000\u0000"+ - "\u00bb\u00bc\u0005i\u0000\u0000\u00bc\u00bd\u0005s\u0000\u0000\u00bd\u00be"+ - "\u0005 \u0000\u0000\u00be\u00bf\u0005n\u0000\u0000\u00bf\u00c0\u0005o"+ - "\u0000\u0000\u00c0\u00c1\u0005t\u0000\u0000\u00c16\u0001\u0000\u0000\u0000"+ - "\u00c2\u00c3\u0005a\u0000\u0000\u00c3\u00c4\u0005n\u0000\u0000\u00c4\u00c5"+ - "\u0005d\u0000\u0000\u00c58\u0001\u0000\u0000\u0000\u00c6\u00c7\u0005o"+ - "\u0000\u0000\u00c7\u00c8\u0005r\u0000\u0000\u00c8:\u0001\u0000\u0000\u0000"+ - "\u00c9\u00ca\u0005,\u0000\u0000\u00ca<\u0001\u0000\u0000\u0000\u00cb\u00cf"+ - "\u0005#\u0000\u0000\u00cc\u00ce\b\u0000\u0000\u0000\u00cd\u00cc\u0001"+ - "\u0000\u0000\u0000\u00ce\u00d1\u0001\u0000\u0000\u0000\u00cf\u00cd\u0001"+ - "\u0000\u0000\u0000\u00cf\u00d0\u0001\u0000\u0000\u0000\u00d0\u00d2\u0001"+ - "\u0000\u0000\u0000\u00d1\u00cf\u0001\u0000\u0000\u0000\u00d2\u00d3\u0006"+ - "\u001e\u0000\u0000\u00d3>\u0001\u0000\u0000\u0000\u00d4\u00d5\u0005l\u0000"+ - "\u0000\u00d5\u00d6\u0005e\u0000\u0000\u00d6\u00d7\u0005f\u0000\u0000\u00d7"+ - "\u00e4\u0005t\u0000\u0000\u00d8\u00d9\u0005r\u0000\u0000\u00d9\u00da\u0005"+ - "i\u0000\u0000\u00da\u00db\u0005g\u0000\u0000\u00db\u00dc\u0005h\u0000"+ - "\u0000\u00dc\u00e4\u0005t\u0000\u0000\u00dd\u00de\u0005u\u0000\u0000\u00de"+ - "\u00e4\u0005p\u0000\u0000\u00df\u00e0\u0005d\u0000\u0000\u00e0\u00e1\u0005"+ - "o\u0000\u0000\u00e1\u00e2\u0005w\u0000\u0000\u00e2\u00e4\u0005n\u0000"+ - "\u0000\u00e3\u00d4\u0001\u0000\u0000\u0000\u00e3\u00d8\u0001\u0000\u0000"+ - "\u0000\u00e3\u00dd\u0001\u0000\u0000\u0000\u00e3\u00df\u0001\u0000\u0000"+ - "\u0000\u00e4@\u0001\u0000\u0000\u0000\u00e5\u00e6\u0005n\u0000\u0000\u00e6"+ - "\u00e7\u0005o\u0000\u0000\u00e7\u00e8\u0005r\u0000\u0000\u00e8\u00e9\u0005"+ - "t\u0000\u0000\u00e9\u0101\u0005h\u0000\u0000\u00ea\u00eb\u0005s\u0000"+ - "\u0000\u00eb\u00ec\u0005o\u0000\u0000\u00ec\u00ed\u0005u\u0000\u0000\u00ed"+ - "\u00ee\u0005t\u0000\u0000\u00ee\u0101\u0005h\u0000\u0000\u00ef\u00f0\u0005"+ - "e\u0000\u0000\u00f0\u00f1\u0005a\u0000\u0000\u00f1\u00f2\u0005s\u0000"+ - "\u0000\u00f2\u0101\u0005t\u0000\u0000\u00f3\u00f4\u0005w\u0000\u0000\u00f4"+ - "\u00f5\u0005e\u0000\u0000\u00f5\u00f6\u0005s\u0000\u0000\u00f6\u0101\u0005"+ - "t\u0000\u0000\u00f7\u00f8\u0005t\u0000\u0000\u00f8\u00f9\u0005o\u0000"+ - "\u0000\u00f9\u0101\u0005p\u0000\u0000\u00fa\u00fb\u0005b\u0000\u0000\u00fb"+ - "\u00fc\u0005o\u0000\u0000\u00fc\u00fd\u0005t\u0000\u0000\u00fd\u00fe\u0005"+ - "t\u0000\u0000\u00fe\u00ff\u0005o\u0000\u0000\u00ff\u0101\u0005m\u0000"+ - "\u0000\u0100\u00e5\u0001\u0000\u0000\u0000\u0100\u00ea\u0001\u0000\u0000"+ - "\u0000\u0100\u00ef\u0001\u0000\u0000\u0000\u0100\u00f3\u0001\u0000\u0000"+ - "\u0000\u0100\u00f7\u0001\u0000\u0000\u0000\u0100\u00fa\u0001\u0000\u0000"+ - "\u0000\u0101B\u0001\u0000\u0000\u0000\u0102\u0104\u0007\u0001\u0000\u0000"+ - "\u0103\u0102\u0001\u0000\u0000\u0000\u0104\u0105\u0001\u0000\u0000\u0000"+ - "\u0105\u0103\u0001\u0000\u0000\u0000\u0105\u0106\u0001\u0000\u0000\u0000"+ - "\u0106D\u0001\u0000\u0000\u0000\u0107\u0108\u0005t\u0000\u0000\u0108\u0109"+ - "\u0005r\u0000\u0000\u0109\u010a\u0005u\u0000\u0000\u010a\u0111\u0005e"+ - "\u0000\u0000\u010b\u010c\u0005f\u0000\u0000\u010c\u010d\u0005a\u0000\u0000"+ - "\u010d\u010e\u0005l\u0000\u0000\u010e\u010f\u0005s\u0000\u0000\u010f\u0111"+ - "\u0005e\u0000\u0000\u0110\u0107\u0001\u0000\u0000\u0000\u0110\u010b\u0001"+ - "\u0000\u0000\u0000\u0111F\u0001\u0000\u0000\u0000\u0112\u0113\u0005m\u0000"+ - "\u0000\u0113\u0114\u0005i\u0000\u0000\u0114\u0115\u0005n\u0000\u0000\u0115"+ - "\u0116\u0005e\u0000\u0000\u0116\u0117\u0005c\u0000\u0000\u0117\u0118\u0005"+ - "r\u0000\u0000\u0118\u0119\u0005a\u0000\u0000\u0119\u011a\u0005f\u0000"+ - "\u0000\u011a\u011b\u0005t\u0000\u0000\u011b\u011c\u0005:\u0000\u0000\u011c"+ - "\u011e\u0001\u0000\u0000\u0000\u011d\u011f\u0007\u0002\u0000\u0000\u011e"+ - "\u011d\u0001\u0000\u0000\u0000\u011f\u0120\u0001\u0000\u0000\u0000\u0120"+ - "\u011e\u0001\u0000\u0000\u0000\u0120\u0121\u0001\u0000\u0000\u0000\u0121"+ - "H\u0001\u0000\u0000\u0000\u0122\u0126\u0007\u0003\u0000\u0000\u0123\u0125"+ - "\u0007\u0002\u0000\u0000\u0124\u0123\u0001\u0000\u0000\u0000\u0125\u0128"+ - "\u0001\u0000\u0000\u0000\u0126\u0124\u0001\u0000\u0000\u0000\u0126\u0127"+ - "\u0001\u0000\u0000\u0000\u0127J\u0001\u0000\u0000\u0000\u0128\u0126\u0001"+ - "\u0000\u0000\u0000\u0129\u012b\u0007\u0000\u0000\u0000\u012a\u0129\u0001"+ - "\u0000\u0000\u0000\u012b\u012c\u0001\u0000\u0000\u0000\u012c\u012a\u0001"+ - "\u0000\u0000\u0000\u012c\u012d\u0001\u0000\u0000\u0000\u012dL\u0001\u0000"+ - "\u0000\u0000\u012e\u0130\u0007\u0004\u0000\u0000\u012f\u012e\u0001\u0000"+ - "\u0000\u0000\u0130\u0131\u0001\u0000\u0000\u0000\u0131\u012f\u0001\u0000"+ - "\u0000\u0000\u0131\u0132\u0001\u0000\u0000\u0000\u0132\u0133\u0001\u0000"+ - "\u0000\u0000\u0133\u0134\u0006&\u0000\u0000\u0134N\u0001\u0000\u0000\u0000"+ - "\n\u0000\u00cf\u00e3\u0100\u0105\u0110\u0120\u0126\u012c\u0131\u0001\u0006"+ + "\u001c\u0001\u0000\u0000\u0000\u009e\u009f\u0005n\u0000\u0000\u009f\u00a0"+ + "\u0005o\u0000\u0000\u00a0\u00a1\u0005t\u0000\u0000\u00a1\u001e\u0001\u0000"+ + "\u0000\u0000\u00a2\u00a3\u0005^\u0000\u0000\u00a3 \u0001\u0000\u0000\u0000"+ + "\u00a4\u00a5\u0005-\u0000\u0000\u00a5\"\u0001\u0000\u0000\u0000\u00a6"+ + "\u00a7\u0005*\u0000\u0000\u00a7$\u0001\u0000\u0000\u0000\u00a8\u00a9\u0005"+ + "/\u0000\u0000\u00a9&\u0001\u0000\u0000\u0000\u00aa\u00ab\u0005%\u0000"+ + "\u0000\u00ab(\u0001\u0000\u0000\u0000\u00ac\u00ad\u0005+\u0000\u0000\u00ad"+ + "*\u0001\u0000\u0000\u0000\u00ae\u00af\u0005<\u0000\u0000\u00af,\u0001"+ + "\u0000\u0000\u0000\u00b0\u00b1\u0005>\u0000\u0000\u00b1.\u0001\u0000\u0000"+ + "\u0000\u00b2\u00b3\u0005<\u0000\u0000\u00b3\u00b4\u0005=\u0000\u0000\u00b4"+ + "0\u0001\u0000\u0000\u0000\u00b5\u00b6\u0005>\u0000\u0000\u00b6\u00b7\u0005"+ + "=\u0000\u0000\u00b72\u0001\u0000\u0000\u0000\u00b8\u00b9\u0005i\u0000"+ + "\u0000\u00b9\u00ba\u0005s\u0000\u0000\u00ba4\u0001\u0000\u0000\u0000\u00bb"+ + "\u00bc\u0005i\u0000\u0000\u00bc\u00bd\u0005s\u0000\u0000\u00bd\u00be\u0005"+ + " \u0000\u0000\u00be\u00bf\u0005n\u0000\u0000\u00bf\u00c0\u0005o\u0000"+ + "\u0000\u00c0\u00c1\u0005t\u0000\u0000\u00c16\u0001\u0000\u0000\u0000\u00c2"+ + "\u00c3\u0005a\u0000\u0000\u00c3\u00c4\u0005n\u0000\u0000\u00c4\u00c5\u0005"+ + "d\u0000\u0000\u00c58\u0001\u0000\u0000\u0000\u00c6\u00c7\u0005o\u0000"+ + "\u0000\u00c7\u00c8\u0005r\u0000\u0000\u00c8:\u0001\u0000\u0000\u0000\u00c9"+ + "\u00ca\u0005,\u0000\u0000\u00ca<\u0001\u0000\u0000\u0000\u00cb\u00cf\u0005"+ + "#\u0000\u0000\u00cc\u00ce\b\u0000\u0000\u0000\u00cd\u00cc\u0001\u0000"+ + "\u0000\u0000\u00ce\u00d1\u0001\u0000\u0000\u0000\u00cf\u00cd\u0001\u0000"+ + "\u0000\u0000\u00cf\u00d0\u0001\u0000\u0000\u0000\u00d0\u00d2\u0001\u0000"+ + "\u0000\u0000\u00d1\u00cf\u0001\u0000\u0000\u0000\u00d2\u00d3\u0006\u001e"+ + "\u0000\u0000\u00d3>\u0001\u0000\u0000\u0000\u00d4\u00d5\u0005l\u0000\u0000"+ + "\u00d5\u00d6\u0005e\u0000\u0000\u00d6\u00d7\u0005f\u0000\u0000\u00d7\u00e4"+ + "\u0005t\u0000\u0000\u00d8\u00d9\u0005r\u0000\u0000\u00d9\u00da\u0005i"+ + "\u0000\u0000\u00da\u00db\u0005g\u0000\u0000\u00db\u00dc\u0005h\u0000\u0000"+ + "\u00dc\u00e4\u0005t\u0000\u0000\u00dd\u00de\u0005u\u0000\u0000\u00de\u00e4"+ + "\u0005p\u0000\u0000\u00df\u00e0\u0005d\u0000\u0000\u00e0\u00e1\u0005o"+ + "\u0000\u0000\u00e1\u00e2\u0005w\u0000\u0000\u00e2\u00e4\u0005n\u0000\u0000"+ + "\u00e3\u00d4\u0001\u0000\u0000\u0000\u00e3\u00d8\u0001\u0000\u0000\u0000"+ + "\u00e3\u00dd\u0001\u0000\u0000\u0000\u00e3\u00df\u0001\u0000\u0000\u0000"+ + "\u00e4@\u0001\u0000\u0000\u0000\u00e5\u00e6\u0005n\u0000\u0000\u00e6\u00e7"+ + "\u0005o\u0000\u0000\u00e7\u00e8\u0005r\u0000\u0000\u00e8\u00e9\u0005t"+ + "\u0000\u0000\u00e9\u0101\u0005h\u0000\u0000\u00ea\u00eb\u0005s\u0000\u0000"+ + "\u00eb\u00ec\u0005o\u0000\u0000\u00ec\u00ed\u0005u\u0000\u0000\u00ed\u00ee"+ + "\u0005t\u0000\u0000\u00ee\u0101\u0005h\u0000\u0000\u00ef\u00f0\u0005e"+ + "\u0000\u0000\u00f0\u00f1\u0005a\u0000\u0000\u00f1\u00f2\u0005s\u0000\u0000"+ + "\u00f2\u0101\u0005t\u0000\u0000\u00f3\u00f4\u0005w\u0000\u0000\u00f4\u00f5"+ + "\u0005e\u0000\u0000\u00f5\u00f6\u0005s\u0000\u0000\u00f6\u0101\u0005t"+ + "\u0000\u0000\u00f7\u00f8\u0005t\u0000\u0000\u00f8\u00f9\u0005o\u0000\u0000"+ + "\u00f9\u0101\u0005p\u0000\u0000\u00fa\u00fb\u0005b\u0000\u0000\u00fb\u00fc"+ + "\u0005o\u0000\u0000\u00fc\u00fd\u0005t\u0000\u0000\u00fd\u00fe\u0005t"+ + "\u0000\u0000\u00fe\u00ff\u0005o\u0000\u0000\u00ff\u0101\u0005m\u0000\u0000"+ + "\u0100\u00e5\u0001\u0000\u0000\u0000\u0100\u00ea\u0001\u0000\u0000\u0000"+ + "\u0100\u00ef\u0001\u0000\u0000\u0000\u0100\u00f3\u0001\u0000\u0000\u0000"+ + "\u0100\u00f7\u0001\u0000\u0000\u0000\u0100\u00fa\u0001\u0000\u0000\u0000"+ + "\u0101B\u0001\u0000\u0000\u0000\u0102\u0104\u0007\u0001\u0000\u0000\u0103"+ + "\u0102\u0001\u0000\u0000\u0000\u0104\u0105\u0001\u0000\u0000\u0000\u0105"+ + "\u0103\u0001\u0000\u0000\u0000\u0105\u0106\u0001\u0000\u0000\u0000\u0106"+ + "D\u0001\u0000\u0000\u0000\u0107\u0108\u0005t\u0000\u0000\u0108\u0109\u0005"+ + "r\u0000\u0000\u0109\u010a\u0005u\u0000\u0000\u010a\u0111\u0005e\u0000"+ + "\u0000\u010b\u010c\u0005f\u0000\u0000\u010c\u010d\u0005a\u0000\u0000\u010d"+ + "\u010e\u0005l\u0000\u0000\u010e\u010f\u0005s\u0000\u0000\u010f\u0111\u0005"+ + "e\u0000\u0000\u0110\u0107\u0001\u0000\u0000\u0000\u0110\u010b\u0001\u0000"+ + "\u0000\u0000\u0111F\u0001\u0000\u0000\u0000\u0112\u0113\u0005m\u0000\u0000"+ + "\u0113\u0114\u0005i\u0000\u0000\u0114\u0115\u0005n\u0000\u0000\u0115\u0116"+ + "\u0005e\u0000\u0000\u0116\u0117\u0005c\u0000\u0000\u0117\u0118\u0005r"+ + "\u0000\u0000\u0118\u0119\u0005a\u0000\u0000\u0119\u011a\u0005f\u0000\u0000"+ + "\u011a\u011b\u0005t\u0000\u0000\u011b\u011c\u0005:\u0000\u0000\u011c\u011e"+ + "\u0001\u0000\u0000\u0000\u011d\u011f\u0007\u0002\u0000\u0000\u011e\u011d"+ + "\u0001\u0000\u0000\u0000\u011f\u0120\u0001\u0000\u0000\u0000\u0120\u011e"+ + "\u0001\u0000\u0000\u0000\u0120\u0121\u0001\u0000\u0000\u0000\u0121H\u0001"+ + "\u0000\u0000\u0000\u0122\u0126\u0007\u0003\u0000\u0000\u0123\u0125\u0007"+ + "\u0002\u0000\u0000\u0124\u0123\u0001\u0000\u0000\u0000\u0125\u0128\u0001"+ + "\u0000\u0000\u0000\u0126\u0124\u0001\u0000\u0000\u0000\u0126\u0127\u0001"+ + "\u0000\u0000\u0000\u0127J\u0001\u0000\u0000\u0000\u0128\u0126\u0001\u0000"+ + "\u0000\u0000\u0129\u012b\u0007\u0000\u0000\u0000\u012a\u0129\u0001\u0000"+ + "\u0000\u0000\u012b\u012c\u0001\u0000\u0000\u0000\u012c\u012a\u0001\u0000"+ + "\u0000\u0000\u012c\u012d\u0001\u0000\u0000\u0000\u012dL\u0001\u0000\u0000"+ + "\u0000\u012e\u0130\u0007\u0004\u0000\u0000\u012f\u012e\u0001\u0000\u0000"+ + "\u0000\u0130\u0131\u0001\u0000\u0000\u0000\u0131\u012f\u0001\u0000\u0000"+ + "\u0000\u0131\u0132\u0001\u0000\u0000\u0000\u0132\u0133\u0001\u0000\u0000"+ + "\u0000\u0133\u0134\u0006&\u0000\u0000\u0134N\u0001\u0000\u0000\u0000\n"+ + "\u0000\u00cf\u00e3\u0100\u0105\u0110\u0120\u0126\u012c\u0131\u0001\u0006"+ "\u0000\u0000"; public static final ATN _ATN = new ATNDeserializer().deserialize(_serializedATN.toCharArray()); diff --git a/src/main/interpreter/antlr/MineScriptLexer.tokens b/src/main/interpreter/antlr/MineScriptLexer.tokens index 48dfea6..6fd3bd7 100644 --- a/src/main/interpreter/antlr/MineScriptLexer.tokens +++ b/src/main/interpreter/antlr/MineScriptLexer.tokens @@ -51,9 +51,9 @@ WS=39 'define'=12 'enddefine'=13 'return'=14 -'-'=15 -'not'=16 -'^'=17 +'not'=15 +'^'=16 +'-'=17 '*'=18 '/'=19 '%'=20 diff --git a/src/main/interpreter/antlr/MineScriptParser.java b/src/main/interpreter/antlr/MineScriptParser.java index 3c1708f..0845ec9 100644 --- a/src/main/interpreter/antlr/MineScriptParser.java +++ b/src/main/interpreter/antlr/MineScriptParser.java @@ -1,6 +1,6 @@ package interpreter.antlr; -// Generated from MineScript.g4 by ANTLR 4.12.0 +// Generated from MineScript.g4 by ANTLR 4.13.0 import org.antlr.v4.runtime.atn.*; import org.antlr.v4.runtime.dfa.DFA; import org.antlr.v4.runtime.*; @@ -12,7 +12,7 @@ @SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast", "CheckReturnValue"}) public class MineScriptParser extends Parser { - static { RuntimeMetaData.checkVersion("4.12.0", RuntimeMetaData.VERSION); } + static { RuntimeMetaData.checkVersion("4.13.0", RuntimeMetaData.VERSION); } protected static final DFA[] _decisionToDFA; protected static final PredictionContextCache _sharedContextCache = @@ -39,7 +39,7 @@ private static String[] makeLiteralNames() { return new String[] { null, "'do'", "'='", "'if'", "'('", "')'", "'else'", "'endif'", "'while'", "'endwhile'", "'repeat'", "'endrepeat'", "'define'", "'enddefine'", "'return'", - "'-'", "'not'", "'^'", "'*'", "'/'", "'%'", "'+'", "'<'", "'>'", "'<='", + "'not'", "'^'", "'-'", "'*'", "'/'", "'%'", "'+'", "'<'", "'>'", "'<='", "'>='", "'is'", "'is not'", "'and'", "'or'", "','" }; } @@ -133,7 +133,7 @@ public final ProgramContext program() throws RecognitionException { setState(15); _errHandler.sync(this); _la = _input.LA(1); - while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 545460966680L) != 0)) { + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 545461032216L) != 0)) { { { setState(12); @@ -193,7 +193,7 @@ public final StatementsContext statements() throws RecognitionException { setState(25); _errHandler.sync(this); _la = _input.LA(1); - while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 545460966680L) != 0)) { + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 545461032216L) != 0)) { { { setState(22); @@ -808,7 +808,7 @@ private ExpressionContext expression(int _p) throws RecognitionException { setState(98); _errHandler.sync(this); _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 270583037968L) != 0)) { + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 270583103504L) != 0)) { { setState(97); actual_parameters(); @@ -821,13 +821,15 @@ private ExpressionContext expression(int _p) throws RecognitionException { break; case 2: { - _localctx = new NegContext(_localctx); + _localctx = new ParenExprContext(_localctx); _ctx = _localctx; _prevctx = _localctx; setState(101); - match(T__14); + match(T__3); setState(102); - expression(16); + expression(0); + setState(103); + match(T__4); } break; case 3: @@ -835,23 +837,21 @@ private ExpressionContext expression(int _p) throws RecognitionException { _localctx = new NotExprContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(103); - match(T__15); - setState(104); + setState(105); + match(T__14); + setState(106); expression(15); } break; case 4: { - _localctx = new ParenExprContext(_localctx); + _localctx = new NegContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(105); - match(T__3); - setState(106); - expression(0); setState(107); - match(T__4); + match(T__16); + setState(108); + expression(13); } break; case 5: @@ -926,11 +926,11 @@ private ExpressionContext expression(int _p) throws RecognitionException { _localctx = new PowContext(new ExpressionContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expression); setState(117); - if (!(precpred(_ctx, 13))) throw new FailedPredicateException(this, "precpred(_ctx, 13)"); + if (!(precpred(_ctx, 14))) throw new FailedPredicateException(this, "precpred(_ctx, 14)"); setState(118); - match(T__16); + match(T__15); setState(119); - expression(13); + expression(14); } break; case 2: @@ -963,7 +963,7 @@ private ExpressionContext expression(int _p) throws RecognitionException { setState(124); ((AddSubContext)_localctx).op = _input.LT(1); _la = _input.LA(1); - if ( !(_la==T__14 || _la==T__20) ) { + if ( !(_la==T__16 || _la==T__20) ) { ((AddSubContext)_localctx).op = (Token)_errHandler.recoverInline(this); } else { @@ -1183,7 +1183,7 @@ public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) { private boolean expression_sempred(ExpressionContext _localctx, int predIndex) { switch (predIndex) { case 0: - return precpred(_ctx, 13); + return precpred(_ctx, 14); case 1: return precpred(_ctx, 12); case 2: @@ -1228,7 +1228,7 @@ private boolean expression_sempred(ExpressionContext _localctx, int predIndex) { "\u0001\u0004\u0005\u0004\u0093\b\u0004\n\u0004\f\u0004\u0096\t\u0004\u0001"+ "\u0005\u0001\u0005\u0001\u0005\u0005\u0005\u009b\b\u0005\n\u0005\f\u0005"+ "\u009e\t\u0005\u0001\u0005\u0000\u0001\u0006\u0006\u0000\u0002\u0004\u0006"+ - "\b\n\u0000\u0004\u0001\u0000\u0012\u0014\u0002\u0000\u000f\u000f\u0015"+ + "\b\n\u0000\u0004\u0001\u0000\u0012\u0014\u0002\u0000\u0011\u0011\u0015"+ "\u0015\u0001\u0000\u0016\u0019\u0001\u0000\u001a\u001b\u00b8\u0000\u000f"+ "\u0001\u0000\u0000\u0000\u0002\u0014\u0001\u0000\u0000\u0000\u0004\\\u0001"+ "\u0000\u0000\u0000\u0006s\u0001\u0000\u0000\u0000\b\u008f\u0001\u0000"+ @@ -1271,39 +1271,40 @@ private boolean expression_sempred(ExpressionContext _localctx, int predIndex) { "\u0001\u0000\u0000\u0000]\u0005\u0001\u0000\u0000\u0000^_\u0006\u0003"+ "\uffff\uffff\u0000_`\u0005%\u0000\u0000`b\u0005\u0004\u0000\u0000ac\u0003"+ "\n\u0005\u0000ba\u0001\u0000\u0000\u0000bc\u0001\u0000\u0000\u0000cd\u0001"+ - "\u0000\u0000\u0000dt\u0005\u0005\u0000\u0000ef\u0005\u000f\u0000\u0000"+ - "ft\u0003\u0006\u0003\u0010gh\u0005\u0010\u0000\u0000ht\u0003\u0006\u0003"+ - "\u000fij\u0005\u0004\u0000\u0000jk\u0003\u0006\u0003\u0000kl\u0005\u0005"+ - "\u0000\u0000lt\u0001\u0000\u0000\u0000mt\u0005%\u0000\u0000nt\u0005#\u0000"+ + "\u0000\u0000\u0000dt\u0005\u0005\u0000\u0000ef\u0005\u0004\u0000\u0000"+ + "fg\u0003\u0006\u0003\u0000gh\u0005\u0005\u0000\u0000ht\u0001\u0000\u0000"+ + "\u0000ij\u0005\u000f\u0000\u0000jt\u0003\u0006\u0003\u000fkl\u0005\u0011"+ + "\u0000\u0000lt\u0003\u0006\u0003\rmt\u0005%\u0000\u0000nt\u0005#\u0000"+ "\u0000ot\u0005 \u0000\u0000pt\u0005!\u0000\u0000qt\u0005$\u0000\u0000"+ "rt\u0005\"\u0000\u0000s^\u0001\u0000\u0000\u0000se\u0001\u0000\u0000\u0000"+ - "sg\u0001\u0000\u0000\u0000si\u0001\u0000\u0000\u0000sm\u0001\u0000\u0000"+ + "si\u0001\u0000\u0000\u0000sk\u0001\u0000\u0000\u0000sm\u0001\u0000\u0000"+ "\u0000sn\u0001\u0000\u0000\u0000so\u0001\u0000\u0000\u0000sp\u0001\u0000"+ "\u0000\u0000sq\u0001\u0000\u0000\u0000sr\u0001\u0000\u0000\u0000t\u008c"+ - "\u0001\u0000\u0000\u0000uv\n\r\u0000\u0000vw\u0005\u0011\u0000\u0000w"+ - "\u008b\u0003\u0006\u0003\rxy\n\f\u0000\u0000yz\u0007\u0000\u0000\u0000"+ - "z\u008b\u0003\u0006\u0003\r{|\n\u000b\u0000\u0000|}\u0007\u0001\u0000"+ - "\u0000}\u008b\u0003\u0006\u0003\f~\u007f\n\n\u0000\u0000\u007f\u0080\u0007"+ - "\u0002\u0000\u0000\u0080\u008b\u0003\u0006\u0003\u000b\u0081\u0082\n\t"+ - "\u0000\u0000\u0082\u0083\u0007\u0003\u0000\u0000\u0083\u008b\u0003\u0006"+ - "\u0003\n\u0084\u0085\n\b\u0000\u0000\u0085\u0086\u0005\u001c\u0000\u0000"+ - "\u0086\u008b\u0003\u0006\u0003\t\u0087\u0088\n\u0007\u0000\u0000\u0088"+ - "\u0089\u0005\u001d\u0000\u0000\u0089\u008b\u0003\u0006\u0003\b\u008au"+ - "\u0001\u0000\u0000\u0000\u008ax\u0001\u0000\u0000\u0000\u008a{\u0001\u0000"+ - "\u0000\u0000\u008a~\u0001\u0000\u0000\u0000\u008a\u0081\u0001\u0000\u0000"+ - "\u0000\u008a\u0084\u0001\u0000\u0000\u0000\u008a\u0087\u0001\u0000\u0000"+ - "\u0000\u008b\u008e\u0001\u0000\u0000\u0000\u008c\u008a\u0001\u0000\u0000"+ - "\u0000\u008c\u008d\u0001\u0000\u0000\u0000\u008d\u0007\u0001\u0000\u0000"+ - "\u0000\u008e\u008c\u0001\u0000\u0000\u0000\u008f\u0094\u0005%\u0000\u0000"+ - "\u0090\u0091\u0005\u001e\u0000\u0000\u0091\u0093\u0005%\u0000\u0000\u0092"+ - "\u0090\u0001\u0000\u0000\u0000\u0093\u0096\u0001\u0000\u0000\u0000\u0094"+ - "\u0092\u0001\u0000\u0000\u0000\u0094\u0095\u0001\u0000\u0000\u0000\u0095"+ - "\t\u0001\u0000\u0000\u0000\u0096\u0094\u0001\u0000\u0000\u0000\u0097\u009c"+ - "\u0003\u0006\u0003\u0000\u0098\u0099\u0005\u001e\u0000\u0000\u0099\u009b"+ - "\u0003\u0006\u0003\u0000\u009a\u0098\u0001\u0000\u0000\u0000\u009b\u009e"+ - "\u0001\u0000\u0000\u0000\u009c\u009a\u0001\u0000\u0000\u0000\u009c\u009d"+ - "\u0001\u0000\u0000\u0000\u009d\u000b\u0001\u0000\u0000\u0000\u009e\u009c"+ - "\u0001\u0000\u0000\u0000\f\u000f\u001927P\\bs\u008a\u008c\u0094\u009c"; + "\u0001\u0000\u0000\u0000uv\n\u000e\u0000\u0000vw\u0005\u0010\u0000\u0000"+ + "w\u008b\u0003\u0006\u0003\u000exy\n\f\u0000\u0000yz\u0007\u0000\u0000"+ + "\u0000z\u008b\u0003\u0006\u0003\r{|\n\u000b\u0000\u0000|}\u0007\u0001"+ + "\u0000\u0000}\u008b\u0003\u0006\u0003\f~\u007f\n\n\u0000\u0000\u007f\u0080"+ + "\u0007\u0002\u0000\u0000\u0080\u008b\u0003\u0006\u0003\u000b\u0081\u0082"+ + "\n\t\u0000\u0000\u0082\u0083\u0007\u0003\u0000\u0000\u0083\u008b\u0003"+ + "\u0006\u0003\n\u0084\u0085\n\b\u0000\u0000\u0085\u0086\u0005\u001c\u0000"+ + "\u0000\u0086\u008b\u0003\u0006\u0003\t\u0087\u0088\n\u0007\u0000\u0000"+ + "\u0088\u0089\u0005\u001d\u0000\u0000\u0089\u008b\u0003\u0006\u0003\b\u008a"+ + "u\u0001\u0000\u0000\u0000\u008ax\u0001\u0000\u0000\u0000\u008a{\u0001"+ + "\u0000\u0000\u0000\u008a~\u0001\u0000\u0000\u0000\u008a\u0081\u0001\u0000"+ + "\u0000\u0000\u008a\u0084\u0001\u0000\u0000\u0000\u008a\u0087\u0001\u0000"+ + "\u0000\u0000\u008b\u008e\u0001\u0000\u0000\u0000\u008c\u008a\u0001\u0000"+ + "\u0000\u0000\u008c\u008d\u0001\u0000\u0000\u0000\u008d\u0007\u0001\u0000"+ + "\u0000\u0000\u008e\u008c\u0001\u0000\u0000\u0000\u008f\u0094\u0005%\u0000"+ + "\u0000\u0090\u0091\u0005\u001e\u0000\u0000\u0091\u0093\u0005%\u0000\u0000"+ + "\u0092\u0090\u0001\u0000\u0000\u0000\u0093\u0096\u0001\u0000\u0000\u0000"+ + "\u0094\u0092\u0001\u0000\u0000\u0000\u0094\u0095\u0001\u0000\u0000\u0000"+ + "\u0095\t\u0001\u0000\u0000\u0000\u0096\u0094\u0001\u0000\u0000\u0000\u0097"+ + "\u009c\u0003\u0006\u0003\u0000\u0098\u0099\u0005\u001e\u0000\u0000\u0099"+ + "\u009b\u0003\u0006\u0003\u0000\u009a\u0098\u0001\u0000\u0000\u0000\u009b"+ + "\u009e\u0001\u0000\u0000\u0000\u009c\u009a\u0001\u0000\u0000\u0000\u009c"+ + "\u009d\u0001\u0000\u0000\u0000\u009d\u000b\u0001\u0000\u0000\u0000\u009e"+ + "\u009c\u0001\u0000\u0000\u0000\f\u000f\u001927P\\bs\u008a\u008c\u0094"+ + "\u009c"; public static final ATN _ATN = new ATNDeserializer().deserialize(_serializedATN.toCharArray()); static { diff --git a/src/main/interpreter/antlr/MineScriptVisitor.java b/src/main/interpreter/antlr/MineScriptVisitor.java index 4fcb128..c8604b4 100644 --- a/src/main/interpreter/antlr/MineScriptVisitor.java +++ b/src/main/interpreter/antlr/MineScriptVisitor.java @@ -1,6 +1,6 @@ package interpreter.antlr; -// Generated from MineScript.g4 by ANTLR 4.12.0 +// Generated from MineScript.g4 by ANTLR 4.13.0 import org.antlr.v4.runtime.tree.ParseTreeVisitor; /**