From b58fa00c9a7527c434849cb1fc2dbf3bd2194529 Mon Sep 17 00:00:00 2001
From: i22007
Date: Mon, 1 Jul 2024 21:49:25 -0400
Subject: [PATCH 01/96] Fixed some problems
---
src/main/java/ast/ClassNode.java | 6 +
.../binaryexpressions/DotNode.java | 1 -
src/main/java/ast/literal/LiteralNode.java | 14 +-
.../crementexpressions/DecrementNode.java | 6 -
.../crementexpressions/IncrementNode.java | 6 -
src/main/java/bytecode/ByteCodeGenerator.java | 71 +++---
src/main/java/bytecode/ClassCodeGen.java | 15 +-
src/main/java/bytecode/Mapper.java | 12 +-
src/main/java/bytecode/MethodCodeGen.java | 221 +++++++++++-------
.../java/bytecode/visitor/MethodVisitor.java | 3 -
10 files changed, 211 insertions(+), 144 deletions(-)
diff --git a/src/main/java/ast/ClassNode.java b/src/main/java/ast/ClassNode.java
index 61134ab..6060237 100644
--- a/src/main/java/ast/ClassNode.java
+++ b/src/main/java/ast/ClassNode.java
@@ -4,6 +4,7 @@ import ast.type.AccessModifierNode;
import ast.members.ConstructorNode;
import ast.members.MemberNode;
import ast.members.MethodNode;
+import bytecode.visitor.ClassVisitor;
import semantic.SemanticVisitor;
import typechecker.TypeCheckResult;
import visitor.Visitable;
@@ -44,4 +45,9 @@ public class ClassNode implements ASTNode, Visitable {
return visitor.analyze(this);
}
+ @Override
+ public void accept(ClassVisitor classVisitor) {
+ classVisitor.visit(this);
+ }
+
}
diff --git a/src/main/java/ast/expressions/binaryexpressions/DotNode.java b/src/main/java/ast/expressions/binaryexpressions/DotNode.java
index 20b6513..8e9c183 100644
--- a/src/main/java/ast/expressions/binaryexpressions/DotNode.java
+++ b/src/main/java/ast/expressions/binaryexpressions/DotNode.java
@@ -1,6 +1,5 @@
package ast.expressions.binaryexpressions;
-import ast.type.type.*;
import bytecode.visitor.MethodVisitor;
import semantic.SemanticVisitor;
import typechecker.TypeCheckResult;
diff --git a/src/main/java/ast/literal/LiteralNode.java b/src/main/java/ast/literal/LiteralNode.java
index b3cb896..43a16f9 100644
--- a/src/main/java/ast/literal/LiteralNode.java
+++ b/src/main/java/ast/literal/LiteralNode.java
@@ -1,25 +1,25 @@
package ast.literal;
-import ast.expression.ExpressionNode;
-import ast.type.TypeNode;
+import ast.expressions.IExpressionNode;
+import ast.type.type.ITypeNode;
import semantic.SemanticVisitor;
import typechecker.TypeCheckResult;
-public class LiteralNode implements ExpressionNode {
+public class LiteralNode implements IExpressionNode {
public String value;
- private TypeNode type;
+ private ITypeNode type;
- public LiteralNode(String value, TypeNode type) {
+ public LiteralNode(String value, ITypeNode type) {
this.value = value;
this.type = type;
}
- public TypeNode getType() {
+ public ITypeNode getType() {
return type;
}
- public void setType(TypeNode type) {
+ public void setType(ITypeNode type) {
this.type = type;
}
diff --git a/src/main/java/ast/statementexpressions/crementexpressions/DecrementNode.java b/src/main/java/ast/statementexpressions/crementexpressions/DecrementNode.java
index 97a359f..8308e07 100644
--- a/src/main/java/ast/statementexpressions/crementexpressions/DecrementNode.java
+++ b/src/main/java/ast/statementexpressions/crementexpressions/DecrementNode.java
@@ -20,10 +20,4 @@ public class DecrementNode implements IStatementExpressionNode {
public TypeCheckResult accept(SemanticVisitor visitor) {
return visitor.analyze(this);
}
-
- @Override
- public void accept(MethodVisitor methodVisitor) {
- methodVisitor.visit(this);
- }
-
}
diff --git a/src/main/java/ast/statementexpressions/crementexpressions/IncrementNode.java b/src/main/java/ast/statementexpressions/crementexpressions/IncrementNode.java
index 105f11f..d736d3f 100644
--- a/src/main/java/ast/statementexpressions/crementexpressions/IncrementNode.java
+++ b/src/main/java/ast/statementexpressions/crementexpressions/IncrementNode.java
@@ -19,10 +19,4 @@ public class IncrementNode implements IStatementExpressionNode {
public TypeCheckResult accept(SemanticVisitor visitor) {
return visitor.analyze(this);
}
-
- @Override
- public void accept(MethodVisitor methodVisitor) {
- methodVisitor.visit(this);
- }
-
}
diff --git a/src/main/java/bytecode/ByteCodeGenerator.java b/src/main/java/bytecode/ByteCodeGenerator.java
index 280bda1..dc47a4f 100644
--- a/src/main/java/bytecode/ByteCodeGenerator.java
+++ b/src/main/java/bytecode/ByteCodeGenerator.java
@@ -18,49 +18,60 @@ public class ByteCodeGenerator implements ProgramVisitor {
private JarOutputStream jarOutputStream;
private ByteArrayOutputStream byteArrayOutputStream;
private String outputDirectory;
+ private boolean generateJar;
+ private boolean generateClassFiles;
- public ByteCodeGenerator(String outputDirectory) {
+ public ByteCodeGenerator(String outputDirectory, boolean generateJar, boolean generateClassFiles) {
this.outputDirectory = outputDirectory;
+ this.generateJar = generateJar;
+ this.generateClassFiles = generateClassFiles;
}
@Override
public void visit(ProgramNode programNode) {
- byteArrayOutputStream = new ByteArrayOutputStream();
- try {
- Manifest manifest = new Manifest();
- manifest.getMainAttributes().putValue("Manifest-Version", "1.0");
- boolean foundMainClass = false;
- for (ClassNode classNode : programNode.classes) {
- if (foundMainClass) {
- break;
- }
- for (MemberNode memberNode : classNode.members) {
- if (memberNode instanceof MainMethodNode) {
- manifest.getMainAttributes().putValue("Main-Class", classNode.identifier);
- foundMainClass = true;
+ if(generateJar) {
+ byteArrayOutputStream = new ByteArrayOutputStream();
+ try {
+ Manifest manifest = new Manifest();
+ manifest.getMainAttributes().putValue("Manifest-Version", "1.0");
+ boolean foundMainClass = false;
+ for (ClassNode classNode : programNode.classes) {
+ if (foundMainClass) {
break;
}
+ for (MemberNode memberNode : classNode.members) {
+ if (memberNode instanceof MainMethodNode) {
+ manifest.getMainAttributes().putValue("Main-Class", classNode.identifier);
+ foundMainClass = true;
+ break;
+ }
+ }
}
+
+
+ jarOutputStream = new JarOutputStream(byteArrayOutputStream, manifest);
+ } catch (IOException e) {
+ throw new RuntimeException(e);
}
+ for (ClassNode classDeclarationNode : programNode.classes) {
+ ClassCodeGen classCodeGen = new ClassCodeGen(jarOutputStream, outputDirectory, generateJar, generateClassFiles);
+ classDeclarationNode.accept(classCodeGen);
+ }
- jarOutputStream = new JarOutputStream(byteArrayOutputStream, manifest);
- } catch (IOException e) {
- throw new RuntimeException(e);
+ try {
+ jarOutputStream.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+ saveJarFile(byteArrayOutputStream.toByteArray(), "output.jar");
+ } else {
+ for (ClassNode classDeclarationNode : programNode.classes) {
+ ClassCodeGen classCodeGen = new ClassCodeGen(jarOutputStream, outputDirectory, generateJar, generateClassFiles);
+ classDeclarationNode.accept(classCodeGen);
+ }
}
-
- for (ClassNode classDeclarationNode : programNode.classes) {
- ClassCodeGen classCodeGen = new ClassCodeGen(jarOutputStream, outputDirectory);
- classDeclarationNode.accept(classCodeGen);
- }
-
- try {
- jarOutputStream.close();
- } catch (IOException e) {
- e.printStackTrace();
- }
-
- saveJarFile(byteArrayOutputStream.toByteArray(), "output.jar");
}
private void saveJarFile(byte[] jarBytes, String jarFileName) {
diff --git a/src/main/java/bytecode/ClassCodeGen.java b/src/main/java/bytecode/ClassCodeGen.java
index 3fec11a..e7475f1 100644
--- a/src/main/java/bytecode/ClassCodeGen.java
+++ b/src/main/java/bytecode/ClassCodeGen.java
@@ -23,11 +23,15 @@ public class ClassCodeGen implements ClassVisitor {
private ClassWriter classWriter;
private JarOutputStream jarOutputStream;
private String outputDirectory;
+ private boolean generateJar;
+ private boolean generateClassFiles;
- public ClassCodeGen(JarOutputStream jarOutputStream, String outputDirectory) {
+ public ClassCodeGen(JarOutputStream jarOutputStream, String outputDirectory, boolean generateJar, boolean generateClassFiles) {
mapper = new Mapper();
this.jarOutputStream = jarOutputStream;
this.outputDirectory = outputDirectory;
+ this.generateJar = generateJar;
+ this.generateClassFiles = generateClassFiles;
}
@Override
@@ -45,9 +49,12 @@ public class ClassCodeGen implements ClassVisitor {
}
}
- classWriter.visitEnd();
- writeToJar(classWriter.toByteArray(), classNode.identifier);
- printIntoClassFile(classWriter.toByteArray(), classNode.identifier, outputDirectory);
+ if (generateJar) {
+ writeToJar(classWriter.toByteArray(), classNode.identifier);
+ }
+ if (generateClassFiles) {
+ printIntoClassFile(classWriter.toByteArray(), classNode.identifier, outputDirectory);
+ }
classWriter.visitEnd();
}
diff --git a/src/main/java/bytecode/Mapper.java b/src/main/java/bytecode/Mapper.java
index b8170d2..0c842ba 100644
--- a/src/main/java/bytecode/Mapper.java
+++ b/src/main/java/bytecode/Mapper.java
@@ -27,18 +27,18 @@ public class Mapper {
public String generateMethodDescriptor(BaseType type, List parameters) {
String descriptor = "(";
for (ParameterNode parameterNode : parameters) {
- descriptor += getTypeChar((BaseType) parameterNode.type);
+ if(parameterNode.type instanceof BaseType) {
+ descriptor += getTypeChar((BaseType) parameterNode.type);
+ } else {
+ ReferenceType referenceType = (ReferenceType) parameterNode.type;
+ descriptor += "L" + referenceType.getIdentifier() + ";";
+ }
}
descriptor += ")";
descriptor += getTypeChar(type);
return descriptor;
}
- public String generateMethodDescriptor(ReferenceType type, List parameters) {
- String descriptor = "()V";
- return descriptor;
- }
-
public String getTypeChar(BaseType type) {
String typeChar = "";
switch (type.getTypeEnum()) {
diff --git a/src/main/java/bytecode/MethodCodeGen.java b/src/main/java/bytecode/MethodCodeGen.java
index a1776c6..ab6e8e1 100644
--- a/src/main/java/bytecode/MethodCodeGen.java
+++ b/src/main/java/bytecode/MethodCodeGen.java
@@ -1,5 +1,6 @@
package bytecode;
+import ast.expressions.IExpressionNode;
import ast.expressions.binaryexpressions.*;
import ast.expressions.unaryexpressions.MemberAccessNode;
import ast.expressions.unaryexpressions.NotNode;
@@ -10,6 +11,7 @@ import ast.members.MethodNode;
import ast.parameters.ParameterNode;
import ast.statementexpressions.AssignNode;
import ast.statementexpressions.NewDeclarationNode;
+import ast.statementexpressions.crementexpressions.CrementType;
import ast.statementexpressions.crementexpressions.DecrementNode;
import ast.statementexpressions.crementexpressions.IncrementNode;
import ast.statementexpressions.methodcallstatementnexpressions.ChainedMethodNode;
@@ -18,6 +20,7 @@ import ast.statementexpressions.methodcallstatementnexpressions.TargetNode;
import ast.statements.*;
import ast.type.ValueNode;
import ast.type.type.BaseType;
+import ast.type.type.ReferenceType;
import ast.type.type.TypeEnum;
import org.objectweb.asm.ClassWriter;
import org.objectweb.asm.Label;
@@ -68,7 +71,9 @@ public class MethodCodeGen implements bytecode.visitor.MethodVisitor {
// Visit all statements
for (IStatementNode statementNode : constructorNode.block.statements) {
- statementNode.accept(this);
+ if (statementNode != null) {
+ statementNode.accept(this);
+ }
}
methodVisitor.visitMaxs(0, 0);
@@ -130,32 +135,44 @@ public class MethodCodeGen implements bytecode.visitor.MethodVisitor {
@Override
public void visit(CalculationNode calculationNode) {
- calculationNode.dotExpression.accept(this);
- calculationNode.calculationExpression.accept(this);
- switch (calculationNode.operator) {
- case PLUS:
- methodVisitor.visitInsn(IADD);
- break;
- case MINUS:
- methodVisitor.visitInsn(ISUB);
- break;
+ if (calculationNode.dotExpression != null) {
+ calculationNode.dotExpression.accept(this);
+ }
+ if (calculationNode.calculationExpression != null) {
+ calculationNode.calculationExpression.accept(this);
+ }
+ if (calculationNode.operator != null) {
+ switch (calculationNode.operator) {
+ case PLUS:
+ methodVisitor.visitInsn(IADD);
+ break;
+ case MINUS:
+ methodVisitor.visitInsn(ISUB);
+ break;
+ }
}
}
@Override
public void visit(DotNode dotNode) {
- dotNode.dotExpression.accept(this);
- dotNode.dotSubstractionExpression.accept(this);
- switch (dotNode.operator) {
- case DIV:
- methodVisitor.visitInsn(IDIV);
- break;
- case MULT:
- methodVisitor.visitInsn(IMUL);
- break;
- case MOD:
- methodVisitor.visitInsn(IREM);
- break;
+ if (dotNode.dotExpression != null) {
+ dotNode.dotExpression.accept(this);
+ }
+ if (dotNode.dotSubstractionExpression != null) {
+ dotNode.dotSubstractionExpression.accept(this);
+ }
+ if (dotNode.operator != null) {
+ switch (dotNode.operator) {
+ case DIV:
+ methodVisitor.visitInsn(IDIV);
+ break;
+ case MULT:
+ methodVisitor.visitInsn(IMUL);
+ break;
+ case MOD:
+ methodVisitor.visitInsn(IREM);
+ break;
+ }
}
}
@@ -178,6 +195,7 @@ public class MethodCodeGen implements bytecode.visitor.MethodVisitor {
public void visit(NonCalculationNode nonCalculationNode) {
Label labelFalse = new Label();
Label labelTrue = new Label();
+ // TODO: Null check
switch (nonCalculationNode.operator) {
case AND:
nonCalculationNode.unaryExpression.accept(this);
@@ -249,7 +267,7 @@ public class MethodCodeGen implements bytecode.visitor.MethodVisitor {
@Override
public void visit(MemberAccessNode memberAccessNode) {
if (memberAccessNode.thisExpr) {
- //methodVisitor.visitFieldInsn(PUTFIELD);
+ // methodVisitor.visitFieldInsn(PUTFIELD, memberAccessNode.identifiers.get(0), memberAccessNode.identifiers.get(1), );
}
}
@@ -275,7 +293,21 @@ public class MethodCodeGen implements bytecode.visitor.MethodVisitor {
@Override
public void visit(UnaryNode unaryNode) {
-
+ if (unaryNode.thisExp != null) {
+ methodVisitor.visitVarInsn(ALOAD, 0); // this
+ } else if (unaryNode.identifier != null) {
+ methodVisitor.visitVarInsn(ILOAD, localVaribales.indexOf(unaryNode.identifier));
+ } else if (unaryNode.memberAccess != null) {
+ unaryNode.memberAccess.accept(this);
+ } else if (unaryNode.value != null) {
+ unaryNode.value.accept(this);
+ } else if (unaryNode.notExpression != null) {
+ unaryNode.notExpression.accept(this);
+ } else if (unaryNode.statement != null) {
+ unaryNode.statement.accept(this);
+ } else if (unaryNode.expression != null) {
+ unaryNode.expression.accept(this);
+ }
}
@@ -286,7 +318,7 @@ public class MethodCodeGen implements bytecode.visitor.MethodVisitor {
Label elseLabel = new Label();
Label[] elseIfLabels = new Label[ifElseNode.elseIfStatements.size()];
- for(int i = 0; i < ifElseNode.elseIfStatements.size(); i++) {
+ for (int i = 0; i < ifElseNode.elseIfStatements.size(); i++) {
elseIfLabels[i] = new Label();
}
@@ -303,12 +335,12 @@ public class MethodCodeGen implements bytecode.visitor.MethodVisitor {
Label endLabel = new Label();
methodVisitor.visitJumpInsn(GOTO, endLabel);
- for(int i = 0; i < ifElseNode.elseIfStatements.size(); i++) {
+ for (int i = 0; i < ifElseNode.elseIfStatements.size(); i++) {
methodVisitor.visitLabel(elseIfLabels[i]);
ifElseNode.elseIfStatements.get(i).expression.accept(this);
- if(i + 1 < elseIfLabels.length) {
+ if (i + 1 < elseIfLabels.length) {
// at least one more else if
- methodVisitor.visitJumpInsn(IFEQ, elseIfLabels[i+1]);
+ methodVisitor.visitJumpInsn(IFEQ, elseIfLabels[i + 1]);
} else {
methodVisitor.visitJumpInsn(IFEQ, elseLabel);
}
@@ -316,7 +348,7 @@ public class MethodCodeGen implements bytecode.visitor.MethodVisitor {
methodVisitor.visitJumpInsn(GOTO, endLabel);
}
- if(ifElseNode.elseStatement != null) {
+ if (ifElseNode.elseStatement != null) {
methodVisitor.visitLabel(elseLabel);
ifElseNode.elseStatement.block.accept(this);
}
@@ -326,29 +358,88 @@ public class MethodCodeGen implements bytecode.visitor.MethodVisitor {
@Override
public void visit(LocalVariableDeclarationNode localVariableDeclarationNode) {
- // Process expression
- localVariableDeclarationNode.expression.accept(this);
- // Store result of expression in variable
- methodVisitor.visitVarInsn(ISTORE, localVaribales.indexOf(localVariableDeclarationNode.identifier));
+ if (localVariableDeclarationNode.expression != null) {
+ // Process expression
+ localVariableDeclarationNode.expression.accept(this);
+ // Store result of expression in variable
+ if (localVaribales.contains(localVariableDeclarationNode.identifier)) {
+ if (localVariableDeclarationNode.type instanceof BaseType) {
+ methodVisitor.visitVarInsn(ISTORE, localVaribales.indexOf(localVariableDeclarationNode.identifier));
+ } else if (localVariableDeclarationNode.type instanceof ReferenceType) {
+ methodVisitor.visitVarInsn(ASTORE, localVaribales.indexOf(localVariableDeclarationNode.identifier));
+ }
+ } else {
+ localVaribales.add(localVariableDeclarationNode.identifier);
+ if (localVariableDeclarationNode.type instanceof BaseType) {
+ methodVisitor.visitVarInsn(ISTORE, localVaribales.indexOf(localVariableDeclarationNode.identifier));
+ } else if (localVariableDeclarationNode.type instanceof ReferenceType) {
+ methodVisitor.visitVarInsn(ASTORE, localVaribales.indexOf(localVariableDeclarationNode.identifier));
+ }
+ }
+ } else {
+ if (!localVaribales.contains(localVariableDeclarationNode.identifier)) {
+ localVaribales.add(localVariableDeclarationNode.identifier);
+ }
+ }
}
@Override
public void visit(AssignNode assignNode) {
// Process expression
- assignNode.expression.accept(this);
+ if (assignNode.expression instanceof IncrementNode) {
+ IncrementNode incrementNode = (IncrementNode) assignNode.expression;
+ if (incrementNode.crementType.equals(CrementType.PREFIX)) { // ++i
+ methodVisitor.visitIincInsn(localVaribales.indexOf(incrementNode.assignableExpression.identifier), 1);
+ assign(assignNode);
+ } else if (incrementNode.crementType.equals(CrementType.SUFFIX)) { // Suffix: i++
+ assign(assignNode);
+ methodVisitor.visitIincInsn(localVaribales.indexOf(incrementNode.assignableExpression.identifier), 1);
+ }
+ } else if (assignNode.expression instanceof DecrementNode) {
+ DecrementNode decrementNode = (DecrementNode) assignNode.expression;
+ if (decrementNode.crementType.equals(CrementType.PREFIX)) {
+ methodVisitor.visitIincInsn(localVaribales.indexOf(decrementNode.assignableExpression.identifier), -1);
+ assign(assignNode);
+ } else if (decrementNode.crementType.equals(CrementType.SUFFIX)) {
+ assign(assignNode);
+ methodVisitor.visitIincInsn(localVaribales.indexOf(decrementNode.assignableExpression.identifier), 1);
+ }
+ } else {
+ assignNode.expression.accept(this);
+ }
+ }
+
+ private void assign(AssignNode assignNode) {
// Store result of expression in variable
if (assignNode.assignable.memberAccess.thisExpr) {
// Global var
- // /methodVisitor.visitFieldInsn(PUTFIELD, identifierExpressionNode.name, identifierExpressionNode1.name, mapper.getTypeChar(((BaseTypeNode) type).enumType));
+ methodVisitor.visitVarInsn(ALOAD, 0);
+ if (assignNode.expression instanceof BaseType) {
+ //methodVisitor.visitFieldInsn(PUTFIELD, class name, var identifier, mapper.getTypeChar(((BaseTypeNode) type).enumType));
+ } else if (assignNode.expression instanceof ReferenceType) {
+ //methodVisitor.visitFieldInsn(PUTFIELD, class name, var identifier, "L"class name object +";");
+ }
} else {
// Local var
- methodVisitor.visitVarInsn(ISTORE, localVaribales.indexOf(assignNode.assignable.identifier));
+ if (assignNode.expression instanceof BaseType) {
+ methodVisitor.visitVarInsn(ISTORE, localVaribales.indexOf(assignNode.assignable.identifier));
+ } else if (assignNode.expression instanceof ReferenceType) {
+ methodVisitor.visitVarInsn(ASTORE, localVaribales.indexOf(assignNode.assignable.identifier));
+ }
}
}
@Override
public void visit(NewDeclarationNode newDeclarationNode) {
-
+ methodVisitor.visitTypeInsn(NEW, newDeclarationNode.identifier);
+ methodVisitor.visitInsn(DUP);
+ for (IExpressionNode expressionNode : newDeclarationNode.expressions) {
+ expressionNode.accept(this);
+ }
+ // TODO
+ //methodVisitor.visitMethodInsn(INVOKESPECIAL, class name, "", mapper.generateMethodDescriptor(), false);
+ // TODO: kann ein Field auch definiert werden? Abfrage ob local var oder field
+ localVaribales.add(newDeclarationNode.identifier);
}
@Override
@@ -395,7 +486,11 @@ public class MethodCodeGen implements bytecode.visitor.MethodVisitor {
// Process expression
returnNode.expression.accept(this);
// Return result of expression
- methodVisitor.visitInsn(IRETURN);
+ if (returnNode.expression.getType() instanceof BaseType) {
+ methodVisitor.visitInsn(IRETURN);
+ } else if (returnNode.expression.getType() instanceof ReferenceType) {
+ methodVisitor.visitInsn(ARETURN);
+ }
}
}
@@ -410,55 +505,19 @@ public class MethodCodeGen implements bytecode.visitor.MethodVisitor {
whileNode.expression.accept(this);
methodVisitor.visitJumpInsn(IFEQ, endOfLoopLabel); // if condition is false, jump out of loop
+ // TODO: Unterscheidung bei increment/decrement der for Schleife
+ if (whileNode.block.statements.size() == 2) { // For loop
+ whileNode.block.statements.get(0).accept(this);
+
+ } else {
+ whileNode.block.statements.get(0).accept(this);
+ }
whileNode.block.accept(this);
methodVisitor.visitJumpInsn(GOTO, loopLabel);
methodVisitor.visitLabel(endOfLoopLabel);
}
- @Override
- public void visit(DecrementNode decrementNode) {
- switch (decrementNode.crementType) {
- case PREFIX: // --i
- if (decrementNode.assignableExpression.memberAccess == null) { // local Var
- methodVisitor.visitIincInsn(localVaribales.indexOf(decrementNode.assignableExpression.identifier), -1);
- } else { // Field or var from other object
-
- }
- break;
- case SUFFIX: // i--
- if (decrementNode.assignableExpression.memberAccess == null) { // local Var
- methodVisitor.visitIincInsn(localVaribales.indexOf(decrementNode.assignableExpression.identifier), -1);
- } else { // Field or var from other object
-
- }
- break;
- }
- }
-
- @Override
- public void visit(IncrementNode incrementNode) {
- switch (incrementNode.crementType) {
- case PREFIX: // ++i
- if (incrementNode.assignableExpression.memberAccess == null) { // local Var
- methodVisitor.visitIincInsn(localVaribales.indexOf(incrementNode.assignableExpression.identifier), 1);
- methodVisitor.visitVarInsn(ISTORE, localVaribales.indexOf(incrementNode.assignableExpression.identifier));
-
- } else { // Field or var from other object
-
- }
- break;
- case SUFFIX: // i++
- if (incrementNode.assignableExpression.memberAccess == null) { // local Var
- methodVisitor.visitVarInsn(ISTORE, localVaribales.indexOf(incrementNode.assignableExpression.identifier));
- methodVisitor.visitIincInsn(localVaribales.indexOf(incrementNode.assignableExpression.identifier), 1);
- } else { // Field or var from other object
-
- }
- break;
- }
- }
-
@Override
public void visit(ChainedMethodNode chainedMethodNode) {
diff --git a/src/main/java/bytecode/visitor/MethodVisitor.java b/src/main/java/bytecode/visitor/MethodVisitor.java
index 8baf220..b38b210 100644
--- a/src/main/java/bytecode/visitor/MethodVisitor.java
+++ b/src/main/java/bytecode/visitor/MethodVisitor.java
@@ -44,9 +44,6 @@ public interface MethodVisitor {
void visit(WhileNode whileNode);
// statement expression
- void visit(DecrementNode decrementNode);
- void visit(IncrementNode incrementNode);
-
void visit(ChainedMethodNode chainedMethodNode);
void visit(MethodCallNode methodCallNode);
void visit(TargetNode targetNode);
--
2.34.1
From 561eafbf4c6da40f7b7553973b49017f84b2cd18 Mon Sep 17 00:00:00 2001
From: Bruder John
Date: Tue, 2 Jul 2024 08:48:37 +0200
Subject: [PATCH 02/96] fixed constructor node parameter decleration
---
.../java/ast/members/ConstructorNode.java | 5 +-
src/main/java/semantic/Scope.java | 2 +-
src/main/java/semantic/SemanticAnalyzer.java | 76 +++++++++----------
.../typedAstFeaturesTests/CorrectTest.java | 35 +--------
4 files changed, 42 insertions(+), 76 deletions(-)
diff --git a/src/main/java/ast/members/ConstructorNode.java b/src/main/java/ast/members/ConstructorNode.java
index 2d5400d..b3fda52 100644
--- a/src/main/java/ast/members/ConstructorNode.java
+++ b/src/main/java/ast/members/ConstructorNode.java
@@ -9,13 +9,10 @@ import java.util.List;
import java.util.Objects;
public class ConstructorNode extends MethodNode {
- public AccessModifierNode accessType;
public String identifier;
- public List parameters = new ArrayList<>();
- public BlockNode block;
public ConstructorNode(String accessType, String identifier, BlockNode block) {
- this.accessType = new AccessModifierNode(accessType);
+ this.accesModifier = new AccessModifierNode(accessType);
this.identifier = identifier;
this.block = block;
}
diff --git a/src/main/java/semantic/Scope.java b/src/main/java/semantic/Scope.java
index b6b40c4..cde47c0 100644
--- a/src/main/java/semantic/Scope.java
+++ b/src/main/java/semantic/Scope.java
@@ -16,7 +16,7 @@ public class Scope {
public void addLocalVar(String name, ITypeNode type) {
if (this.contains(name)) {
- throw new AlreadyDeclaredException("Variable " + name + " already exists in this scope");
+ SemanticAnalyzer.errors.add(new AlreadyDeclaredException("Duplicate local variable " + name));
}
localVars.peek().put(name, type);
}
diff --git a/src/main/java/semantic/SemanticAnalyzer.java b/src/main/java/semantic/SemanticAnalyzer.java
index 6ebd124..06fe7e4 100644
--- a/src/main/java/semantic/SemanticAnalyzer.java
+++ b/src/main/java/semantic/SemanticAnalyzer.java
@@ -112,53 +112,49 @@ public class SemanticAnalyzer implements SemanticVisitor {
@Override
public TypeCheckResult analyze(MethodNode methodNode) {
- if (methodNode instanceof ConstructorNode) {
- return new TypeCheckResult(true, new BaseType(TypeEnum.VOID));
- } else {
- var valid = true;
+ var valid = true;
- for (var otherMethod : currentClass.getMethods()) {
- if (Objects.equals(otherMethod, methodNode))
- break;
- if (otherMethod.isSame(methodNode)) {
- errors.add(new AlreadyDeclaredException(
- "Method " + methodNode.getIdentifier() + " is already defined in class "
- + currentClass.identifier));
- valid = false;
- }
+ for (var otherMethod : currentClass.getMethods()) {
+ if (Objects.equals(otherMethod, methodNode))
+ break;
+ if (otherMethod.isSame(methodNode)) {
+ errors.add(new AlreadyDeclaredException(
+ "Method " + methodNode.getIdentifier() + " is already defined in class "
+ + currentClass.identifier));
+ valid = false;
}
+ }
- currentScope.pushScope();
- for (var parameter : methodNode.getParameters()) {
- var result = parameter.accept(this);
- valid = valid && result.isValid();
- try {
- currentScope.addLocalVar(parameter.identifier, parameter.type);
- } catch (AlreadyDeclaredException e) {
- errors.add(new AlreadyDeclaredException(parameter.identifier));
- }
-
- }
-
- currentMethodReturnType = methodNode.getType();
- currentNullType = currentMethodReturnType;
-
- var result = methodNode.block.accept(this);
+ currentScope.pushScope();
+ for (var parameter : methodNode.getParameters()) {
+ var result = parameter.accept(this);
valid = valid && result.isValid();
- currentScope.popScope();
- ITypeNode resultType = result.getType();
-
- if (resultType == null) {
- resultType = new BaseType(TypeEnum.VOID);
+ try {
+ currentScope.addLocalVar(parameter.identifier, parameter.type);
+ } catch (AlreadyDeclaredException e) {
+ errors.add(new AlreadyDeclaredException(parameter.identifier));
}
- if (methodNode.getType() == null) {
- methodNode.setType(new BaseType(TypeEnum.VOID));
- }
-
- return new TypeCheckResult(valid, resultType);
}
+
+ currentMethodReturnType = methodNode.getType();
+ currentNullType = currentMethodReturnType;
+
+ var result = methodNode.block.accept(this);
+ valid = valid && result.isValid();
+ currentScope.popScope();
+ ITypeNode resultType = result.getType();
+
+ if (resultType == null) {
+ resultType = new BaseType(TypeEnum.VOID);
+ }
+ if (methodNode.getType() == null) {
+ methodNode.setType(new BaseType(TypeEnum.VOID));
+ }
+
+ return new TypeCheckResult(valid, resultType);
+
}
@Override
@@ -224,7 +220,7 @@ public class SemanticAnalyzer implements SemanticVisitor {
}
for (IStatementNode statementNode : blockNode.statements) {
var result = statementNode.accept(this);
- if(!(statementNode instanceof IncrementNode) && !(statementNode instanceof DecrementNode)){
+ if (!(statementNode instanceof IncrementNode) && !(statementNode instanceof DecrementNode)) {
if (result.getType() != null) {
if (blockReturnType == null) {
blockReturnType = result.getType();
diff --git a/src/test/resources/input/typedAstFeaturesTests/CorrectTest.java b/src/test/resources/input/typedAstFeaturesTests/CorrectTest.java
index 5ef0b26..828f6f3 100644
--- a/src/test/resources/input/typedAstFeaturesTests/CorrectTest.java
+++ b/src/test/resources/input/typedAstFeaturesTests/CorrectTest.java
@@ -1,38 +1,11 @@
public class AllFeaturesClassExample {
- int a;
- boolean b;
- char c;
-
- public void controlStructures(int adf, boolean bool) {
- if (a > (10 + 8)) {
- } else {
- }
-
-
- while (a > adf) {
- a--;
- }
-
- for (int i = 0; i < 5; i++) {
- }
+ public void controlStructures(int a, boolean b) {
}
-// void logicalOperations() {
- // Logische UND-Operation
-// if (b && a > 5) {
-// System.out.println("a ist größer als 5 und b ist wahr");
-// }
+ public AllFeaturesClassExample(boolean b){
+
+ }
- // Logische ODER-Operation
-// if (b || a < 5) {
-// System.out.println("b ist wahr oder a ist kleiner als 5");
-// }
-// }
-
-// public static void main(String[] args) {
-// AllFeaturesClassExample obj = new AllFeaturesClassExample(12, true, 'a');
-// obj.controlStructures();
-// }
}
--
2.34.1
From 82356ec189ee94936c41b2442bfa9ef6d5d8664e Mon Sep 17 00:00:00 2001
From: Bruder John
Date: Tue, 2 Jul 2024 10:36:22 +0200
Subject: [PATCH 03/96] set types of expressions
---
.../java/ast/members/ConstructorNode.java | 1 -
src/main/java/ast/members/MethodNode.java | 2 +-
src/main/java/semantic/SemanticAnalyzer.java | 18 +++++-
.../DuplicatedConstructor.java | 12 ++++
.../ConstructorOverloading.java | 11 ++++
.../typedAstFeaturesTests/CorrectTest.java | 61 +++++++++++++++++--
6 files changed, 97 insertions(+), 8 deletions(-)
create mode 100644 src/test/resources/input/typedAstExceptionsTests/DuplicatedConstructor.java
create mode 100644 src/test/resources/input/typedAstFeaturesTests/ConstructorOverloading.java
diff --git a/src/main/java/ast/members/ConstructorNode.java b/src/main/java/ast/members/ConstructorNode.java
index b3fda52..71e6d89 100644
--- a/src/main/java/ast/members/ConstructorNode.java
+++ b/src/main/java/ast/members/ConstructorNode.java
@@ -9,7 +9,6 @@ import java.util.List;
import java.util.Objects;
public class ConstructorNode extends MethodNode {
- public String identifier;
public ConstructorNode(String accessType, String identifier, BlockNode block) {
this.accesModifier = new AccessModifierNode(accessType);
diff --git a/src/main/java/ast/members/MethodNode.java b/src/main/java/ast/members/MethodNode.java
index 1345508..a083ca4 100644
--- a/src/main/java/ast/members/MethodNode.java
+++ b/src/main/java/ast/members/MethodNode.java
@@ -17,7 +17,7 @@ public class MethodNode implements MemberNode, Visitable {
public AccessModifierNode accesModifier;
private ITypeNode type;
public Boolean voidType;
- private String identifier;
+ protected String identifier;
public List parameters = new ArrayList<>();
public BlockNode block;
diff --git a/src/main/java/semantic/SemanticAnalyzer.java b/src/main/java/semantic/SemanticAnalyzer.java
index 06fe7e4..5906d16 100644
--- a/src/main/java/semantic/SemanticAnalyzer.java
+++ b/src/main/java/semantic/SemanticAnalyzer.java
@@ -405,6 +405,7 @@ public class SemanticAnalyzer implements SemanticVisitor {
case PLUS, MINUS:
if (calcRes.getType() instanceof BaseType calcType && dotRes.getType() instanceof BaseType dotType &&
calcType.getTypeEnum().equals(TypeEnum.INT) && dotType.getTypeEnum().equals(TypeEnum.INT)) {
+ calcNode.setType(new BaseType(TypeEnum.INT));
return new TypeCheckResult(true, new BaseType(TypeEnum.INT));
}
break;
@@ -412,10 +413,12 @@ public class SemanticAnalyzer implements SemanticVisitor {
}
} else {
+ calcNode.setType(calcRes.getType());
return new TypeCheckResult(calcRes.isValid(), calcRes.getType());
}
} else if (calcNode.dotExpression != null) {
var dotRes = calcNode.dotExpression.accept(this);
+ calcNode.setType(dotRes.getType());
return new TypeCheckResult(dotRes.isValid(), dotRes.getType());
}
return new TypeCheckResult(false, null);
@@ -458,6 +461,7 @@ public class SemanticAnalyzer implements SemanticVisitor {
case LESS, LESS_EQUAL, GREATER, GREATER_EQUAL:
if (expResult.getType() instanceof BaseType expResultType && expResultType.getTypeEnum().equals(TypeEnum.INT) &&
unaryResult.getType() instanceof BaseType unaryResultType && unaryResultType.getTypeEnum().equals(TypeEnum.INT)) {
+ nonCalculationNode.setType(new BaseType(TypeEnum.BOOL));
return new TypeCheckResult(true, new BaseType(TypeEnum.BOOL));
} else {
errors.add(new TypeMismatchException("Both types must be Integer"));
@@ -466,6 +470,7 @@ public class SemanticAnalyzer implements SemanticVisitor {
case OR, AND:
if (expResult.getType() instanceof BaseType expResultType && expResultType.getTypeEnum().equals(TypeEnum.INT) &&
unaryResult.getType() instanceof BaseType unaryResultType && unaryResultType.getTypeEnum().equals(TypeEnum.INT)) {
+ nonCalculationNode.setType(new BaseType(TypeEnum.BOOL));
return new TypeCheckResult(true, new BaseType(TypeEnum.BOOL));
} else {
errors.add(new TypeMismatchException("Both types must be Boolean"));
@@ -474,6 +479,7 @@ public class SemanticAnalyzer implements SemanticVisitor {
case EQUAL, NOT_EQUAL:
if (expResult.getType() instanceof BaseType expResultType && unaryResult.getType() instanceof BaseType unaryResultType
&& Objects.equals(expResultType, unaryResultType)) {
+ nonCalculationNode.setType(new BaseType(TypeEnum.BOOL));
return new TypeCheckResult(true, new BaseType(TypeEnum.BOOL));
} else {
errors.add(new TypeMismatchException("Both types must be the same"));
@@ -489,9 +495,13 @@ public class SemanticAnalyzer implements SemanticVisitor {
if (unary.identifier != null) {
if (currentScope.contains(unary.identifier)) {
- return new TypeCheckResult(valid, currentScope.getLocalVar(unary.identifier));
+ var type = currentScope.getLocalVar(unary.identifier);
+ unary.setType(type);
+ return new TypeCheckResult(valid, type);
} else if (currentFields.get(unary.identifier) != null) {
- return new TypeCheckResult(valid, currentFields.get(unary.identifier));
+ var type = currentFields.get(unary.identifier);
+ unary.setType(type);
+ return new TypeCheckResult(valid, type);
} else if (unary.statement != null) {
var result = unary.statement.accept(this);
unary.setType(result.getType());
@@ -501,15 +511,19 @@ public class SemanticAnalyzer implements SemanticVisitor {
}
} else if (unary.statement != null) {
var result = unary.statement.accept(this);
+ unary.setType(result.getType());
return new TypeCheckResult(result.isValid(), result.getType());
} else if (unary.value != null) {
var result = unary.value.accept(this);
+ unary.setType(result.getType());
return new TypeCheckResult(result.isValid(), result.getType());
} else if (unary.memberAccess != null) {
var result = unary.memberAccess.accept(this);
+ unary.setType(result.getType());
return new TypeCheckResult(result.isValid(), result.getType());
} else if (unary.expression != null) {
var result = unary.expression.accept(this);
+ unary.setType(result.getType());
return new TypeCheckResult(result.isValid(), result.getType());
}
diff --git a/src/test/resources/input/typedAstExceptionsTests/DuplicatedConstructor.java b/src/test/resources/input/typedAstExceptionsTests/DuplicatedConstructor.java
new file mode 100644
index 0000000..3d877a3
--- /dev/null
+++ b/src/test/resources/input/typedAstExceptionsTests/DuplicatedConstructor.java
@@ -0,0 +1,12 @@
+// @expected: AlreadyDeclaredException
+public class AllFeaturesClassExample {
+
+ public AllFeaturesClassExample(boolean b){
+
+ }
+
+ public AllFeaturesClassExample(boolean b){
+
+ }
+
+}
diff --git a/src/test/resources/input/typedAstFeaturesTests/ConstructorOverloading.java b/src/test/resources/input/typedAstFeaturesTests/ConstructorOverloading.java
new file mode 100644
index 0000000..1e0bc49
--- /dev/null
+++ b/src/test/resources/input/typedAstFeaturesTests/ConstructorOverloading.java
@@ -0,0 +1,11 @@
+public class AllFeaturesClassExample {
+
+ public AllFeaturesClassExample(boolean b){
+
+ }
+
+ public AllFeaturesClassExample(boolean b, int a){
+
+ }
+
+}
diff --git a/src/test/resources/input/typedAstFeaturesTests/CorrectTest.java b/src/test/resources/input/typedAstFeaturesTests/CorrectTest.java
index 828f6f3..5c3a97b 100644
--- a/src/test/resources/input/typedAstFeaturesTests/CorrectTest.java
+++ b/src/test/resources/input/typedAstFeaturesTests/CorrectTest.java
@@ -1,11 +1,64 @@
-public class AllFeaturesClassExample {
- public void controlStructures(int a, boolean b) {
+public class AllFeaturesClassExample {
+ int a;
+ boolean b;
+ char c;
+
+ public void controlStructures(int adf, boolean bool) {
+ if (a > (10 + 8)) {
+ } else {
+ }
+
+
+ while (a > adf) {
+ a--;
+ }
+
+ for (int i = 0; i < 5; i++) {
+ }
+
}
- public AllFeaturesClassExample(boolean b){
-
+// void logicalOperations() {
+// // Logische UND-Operation
+// if (b && a > 5) {
+//// System.out.println("a ist größer als 5 und b ist wahr");
+// }
+//
+// // Logische ODER-Operation
+// if (b || a < 5) {
+//// System.out.println("b ist wahr oder a ist kleiner als 5");
+// }
+// }
+
+// public static void main(String[] args) {
+// AllFeaturesClassExample obj = new AllFeaturesClassExample(12, true, 'a');
+// obj.controlStructures();
+// }
+}
+
+public class Test {
+
+ public Car c;
+
+ public int test(boolean b, int x) {
+ if (b == true) {
+ return c.getSpeed();
+ } else {
+ return x;
+ }
}
}
+
+public class Car {
+
+ private int speed;
+
+ public int getSpeed() {
+ return speed;
+ }
+
+}
+
--
2.34.1
From 2537051668229b108fb02b8b490d8cd8f0cc86bb Mon Sep 17 00:00:00 2001
From: Bruder John
Date: Tue, 2 Jul 2024 14:31:44 +0200
Subject: [PATCH 04/96] fix if field and parameter have same identifier
---
src/main/java/semantic/SemanticAnalyzer.java | 6 +-
.../java/semantic/context/FieldContext.java | 4 +-
.../typedAstFeaturesTests/CorrectTest.java | 60 +------------------
3 files changed, 11 insertions(+), 59 deletions(-)
diff --git a/src/main/java/semantic/SemanticAnalyzer.java b/src/main/java/semantic/SemanticAnalyzer.java
index 5906d16..c849067 100644
--- a/src/main/java/semantic/SemanticAnalyzer.java
+++ b/src/main/java/semantic/SemanticAnalyzer.java
@@ -535,6 +535,10 @@ public class SemanticAnalyzer implements SemanticVisitor {
ITypeNode currentType = null;
+ if (memberAccessNode.thisExpr) {
+ currentType = new ReferenceType(currentClass.identifier);
+ }
+
for (String s : memberAccessNode.identifiers) {
if (currentType == null) {
if (currentScope.getLocalVar(s) != null) {
@@ -552,7 +556,7 @@ public class SemanticAnalyzer implements SemanticVisitor {
var currentTypeClass = context.getClass(reference.getIdentifier());
var currentField = currentTypeClass.getField(s);
- if (currentField.getAccessModifier().accessType == EnumAccessModifierNode.PUBLIC) {
+ if (currentField.getAccessModifier().accessType == EnumAccessModifierNode.PUBLIC || memberAccessNode.thisExpr) {
currentType = currentField.getType();
} else {
errors.add(new NotVisibleException("This field is not visible"));
diff --git a/src/main/java/semantic/context/FieldContext.java b/src/main/java/semantic/context/FieldContext.java
index aba5ba0..3869bb1 100644
--- a/src/main/java/semantic/context/FieldContext.java
+++ b/src/main/java/semantic/context/FieldContext.java
@@ -4,13 +4,15 @@ import ast.members.FieldNode;
import ast.type.*;
import ast.type.type.*;
+import java.util.Objects;
+
public class FieldContext {
private AccessModifierNode accessModifier;
private ITypeNode type;
public FieldContext(FieldNode field) {
- accessModifier = field.accessTypeNode;
+ accessModifier = Objects.requireNonNullElseGet(field.accessTypeNode, () -> new AccessModifierNode("private"));
type = field.type;
}
diff --git a/src/test/resources/input/typedAstFeaturesTests/CorrectTest.java b/src/test/resources/input/typedAstFeaturesTests/CorrectTest.java
index 5c3a97b..c6d54fb 100644
--- a/src/test/resources/input/typedAstFeaturesTests/CorrectTest.java
+++ b/src/test/resources/input/typedAstFeaturesTests/CorrectTest.java
@@ -1,63 +1,9 @@
public class AllFeaturesClassExample {
- int a;
- boolean b;
- char c;
+ int x;
- public void controlStructures(int adf, boolean bool) {
- if (a > (10 + 8)) {
- } else {
- }
-
-
- while (a > adf) {
- a--;
- }
-
- for (int i = 0; i < 5; i++) {
- }
-
-
- }
-
-// void logicalOperations() {
-// // Logische UND-Operation
-// if (b && a > 5) {
-//// System.out.println("a ist größer als 5 und b ist wahr");
-// }
-//
-// // Logische ODER-Operation
-// if (b || a < 5) {
-//// System.out.println("b ist wahr oder a ist kleiner als 5");
-// }
-// }
-
-// public static void main(String[] args) {
-// AllFeaturesClassExample obj = new AllFeaturesClassExample(12, true, 'a');
-// obj.controlStructures();
-// }
-}
-
-public class Test {
-
- public Car c;
-
- public int test(boolean b, int x) {
- if (b == true) {
- return c.getSpeed();
- } else {
- return x;
- }
- }
-
-}
-
-public class Car {
-
- private int speed;
-
- public int getSpeed() {
- return speed;
+ public boolean test(boolean x){
+ return x;
}
}
--
2.34.1
From f7338a06b39782a46ae9c2280390a62b562a8c69 Mon Sep 17 00:00:00 2001
From: Bruder John
Date: Tue, 2 Jul 2024 15:47:33 +0200
Subject: [PATCH 05/96] added MemberAccess to Assignable
---
src/main/java/bytecode/MethodCodeGen.java | 2 +-
src/main/java/semantic/SemanticAnalyzer.java | 3 +++
.../FieldOrParameterTypeMismatch.java | 10 ++++++++++
.../input/typedAstFeaturesTests/CorrectTest.java | 4 ++--
4 files changed, 16 insertions(+), 3 deletions(-)
create mode 100644 src/test/resources/input/typedAstExceptionsTests/FieldOrParameterTypeMismatch.java
diff --git a/src/main/java/bytecode/MethodCodeGen.java b/src/main/java/bytecode/MethodCodeGen.java
index a1776c6..0999f48 100644
--- a/src/main/java/bytecode/MethodCodeGen.java
+++ b/src/main/java/bytecode/MethodCodeGen.java
@@ -50,7 +50,7 @@ public class MethodCodeGen implements bytecode.visitor.MethodVisitor {
@Override
public void visit(ConstructorNode constructorNode) {
methodVisitor =
- classWriter.visitMethod(mapper.mapAccessTypeToOpcode(constructorNode.accessType),
+ classWriter.visitMethod(mapper.mapAccessTypeToOpcode(constructorNode.accesModifier),
"",
mapper.generateMethodDescriptor(new BaseType(TypeEnum.VOID), constructorNode.parameters),
null,
diff --git a/src/main/java/semantic/SemanticAnalyzer.java b/src/main/java/semantic/SemanticAnalyzer.java
index c849067..110effd 100644
--- a/src/main/java/semantic/SemanticAnalyzer.java
+++ b/src/main/java/semantic/SemanticAnalyzer.java
@@ -246,6 +246,9 @@ public class SemanticAnalyzer implements SemanticVisitor {
if (currentFields.get(toCheck.identifier) != null) {
var type = currentFields.get(toCheck.identifier);
toCheck.setTypeNode(type);
+ MemberAccessNode memberAccessNode = new MemberAccessNode(false);
+ memberAccessNode.identifiers.add(currentClass.identifier);
+ toCheck.memberAccess = memberAccessNode;
return new TypeCheckResult(true, type);
} else if (currentScope.getLocalVar(toCheck.identifier) != null) {
var type = currentScope.getLocalVar(toCheck.identifier);
diff --git a/src/test/resources/input/typedAstExceptionsTests/FieldOrParameterTypeMismatch.java b/src/test/resources/input/typedAstExceptionsTests/FieldOrParameterTypeMismatch.java
new file mode 100644
index 0000000..0a9c17c
--- /dev/null
+++ b/src/test/resources/input/typedAstExceptionsTests/FieldOrParameterTypeMismatch.java
@@ -0,0 +1,10 @@
+// @expected: TypeMismatchException
+public class AllFeaturesClassExample {
+ int x;
+
+ public boolean test(boolean x){
+ return this.x;
+ }
+
+}
+
diff --git a/src/test/resources/input/typedAstFeaturesTests/CorrectTest.java b/src/test/resources/input/typedAstFeaturesTests/CorrectTest.java
index c6d54fb..4d27ecd 100644
--- a/src/test/resources/input/typedAstFeaturesTests/CorrectTest.java
+++ b/src/test/resources/input/typedAstFeaturesTests/CorrectTest.java
@@ -2,8 +2,8 @@
public class AllFeaturesClassExample {
int x;
- public boolean test(boolean x){
- return x;
+ public void test(){
+ x = 1;
}
}
--
2.34.1
From 02e5f3a7296b5daff50fdbd87559d35676fd91b1 Mon Sep 17 00:00:00 2001
From: Maximilian Stahl
Date: Tue, 2 Jul 2024 17:36:48 +0200
Subject: [PATCH 06/96] Fixes and changed For Builder
---
src/main/java/ast/statements/WhileNode.java | 6 --
.../java/parser/astBuilder/ASTBuilder.java | 69 +++++++++++++------
2 files changed, 47 insertions(+), 28 deletions(-)
diff --git a/src/main/java/ast/statements/WhileNode.java b/src/main/java/ast/statements/WhileNode.java
index 01c1160..b4a4a86 100644
--- a/src/main/java/ast/statements/WhileNode.java
+++ b/src/main/java/ast/statements/WhileNode.java
@@ -1,6 +1,5 @@
package ast.statements;
-import ast.ASTNode;
import ast.expressions.IExpressionNode;
import semantic.SemanticVisitor;
import typechecker.TypeCheckResult;
@@ -14,11 +13,6 @@ public class WhileNode implements IStatementNode {
this.block = block;
}
- public void test() {
- return;
-
- }
-
@Override
public TypeCheckResult accept(SemanticVisitor visitor) {
return null;
diff --git a/src/main/java/parser/astBuilder/ASTBuilder.java b/src/main/java/parser/astBuilder/ASTBuilder.java
index 7ee199b..c23a010 100644
--- a/src/main/java/parser/astBuilder/ASTBuilder.java
+++ b/src/main/java/parser/astBuilder/ASTBuilder.java
@@ -14,6 +14,7 @@ import ast.members.*;
import ast.parameters.ParameterNode;
import ast.statementexpressions.AssignNode;
import ast.statementexpressions.AssignableNode;
+import ast.statementexpressions.IStatementExpressionNode;
import ast.statementexpressions.NewDeclarationNode;
import ast.statementexpressions.crementexpressions.CrementType;
import ast.statementexpressions.crementexpressions.DecrementNode;
@@ -75,7 +76,12 @@ public class ASTBuilder extends SimpleJavaBaseVisitor {
@Override
public ASTNode visitConstructorDeclaration(SimpleJavaParser.ConstructorDeclarationContext ctx) {
- ConstructorNode constructorNode = new ConstructorNode(ctx.AccessModifier().getText(), ctx.Identifier().getText(), (BlockNode) visit(ctx.blockStatement()));
+ ConstructorNode constructorNode;
+ if(ctx.AccessModifier() != null) {
+ constructorNode = new ConstructorNode(ctx.AccessModifier().getText(), ctx.Identifier().getText(), (BlockNode) visit(ctx.blockStatement()));
+ } else {
+ constructorNode = new ConstructorNode("public", ctx.Identifier().getText(), (BlockNode) visit(ctx.blockStatement()));
+ }
if(ctx.parameterList() != null) {
for(SimpleJavaParser.ParameterContext parameter : ctx.parameterList().parameter()) {
constructorNode.addParameter((ParameterNode) visit(parameter));
@@ -177,7 +183,12 @@ public class ASTBuilder extends SimpleJavaBaseVisitor {
@Override
public ASTNode visitLocalVariableDeclaration(SimpleJavaParser.LocalVariableDeclarationContext ctx) {
- return new LocalVariableDeclarationNode(createTypeNode(ctx.type().getText()), ctx.Identifier().getText(), ctx.Assign().getText(), (IExpressionNode) visit(ctx.expression()));
+ if(ctx.Assign() != null) {
+ return new LocalVariableDeclarationNode(createTypeNode(ctx.type().getText()), ctx.Identifier().getText(), ctx.Assign().getText(), (IExpressionNode) visit(ctx.expression()));
+ } else {
+ return new LocalVariableDeclarationNode(createTypeNode(ctx.type().getText()), ctx.Identifier().getText(), null, null);
+ }
+
}
@Override
@@ -209,46 +220,60 @@ public class ASTBuilder extends SimpleJavaBaseVisitor {
@Override
public ASTNode visitForStatement(SimpleJavaParser.ForStatementContext ctx) {
-
List statements = new ArrayList<>();
- //init
+ // Initialisierung
int i = 0;
- if(ctx.localVariableDeclaration() != null) {
+ if (ctx.localVariableDeclaration() != null) {
statements.add((IStatementNode) visit(ctx.localVariableDeclaration()));
- } else if(ctx.statementExpression(i) != null){
+ } else if (ctx.statementExpression(i) != null) {
statements.add((IStatementNode) visit(ctx.statementExpression(i)));
i++;
}
- //condition
+ // Bedingung
IExpressionNode condition = (IExpressionNode) visit(ctx.expression());
- //ink
- IStatementNode crement = null;
- if(ctx.statementExpression(i) != null){
- crement = (IStatementNode) visit(ctx.statementExpression(i));
+ // Inkrement
+ IStatementExpressionNode crement = null;
+ boolean isPrefix = false;
+ if (ctx.statementExpression(i) != null) {
+ crement = (IStatementExpressionNode) visit(ctx.statementExpression(i));
+
+ if (crement instanceof IncrementNode) {
+ isPrefix = ((IncrementNode) crement).crementType == CrementType.PREFIX;
+ } else if (crement instanceof DecrementNode) {
+ isPrefix = ((DecrementNode) crement).crementType == CrementType.PREFIX;
+ }
}
- BlockNode forBlock = new BlockNode();
+ BlockNode forBlock = (BlockNode) visit(ctx.blockStatement());
- BlockNode forStatements = (BlockNode) visit(ctx.blockStatement());
- if(forStatements != null) {
- forBlock.addStatement((IStatementNode) forStatements);
+ // While-Schleife
+ BlockNode whileBody = new BlockNode();
+
+ // Prä-Inkrement: Das Inkrement kommt vor dem Block
+ if (crement != null && isPrefix) {
+ whileBody.addStatement((IStatementNode) crement);
}
- if(crement != null){
- BlockNode forCrement = new BlockNode();
- forCrement.addStatement((crement));
- forBlock.addStatement(forCrement);
+ // Block Statements der For-Schleife in den While-Block kopieren
+ for (IStatementNode statement : forBlock.statements) {
+ whileBody.addStatement(statement);
}
- WhileNode While = new WhileNode(condition, forBlock);
+ // Post-Inkrement: Das Inkrement kommt nach dem Block
+ if (crement != null && !isPrefix) {
+ whileBody.addStatement((IStatementNode) crement);
+ }
- statements.add(While);
+ // Bedingung der While-Schleife
+ WhileNode whileNode = new WhileNode(condition, whileBody);
+
+ statements.add(whileNode);
BlockNode resultBlock = new BlockNode();
- for(IStatementNode statement : statements) {
+ for (IStatementNode statement : statements) {
resultBlock.addStatement((IStatementNode) statement);
}
--
2.34.1
From f414e278bbee6f5733aede6bdcd61d077cfc966c Mon Sep 17 00:00:00 2001
From: Purplumbi504
Date: Tue, 2 Jul 2024 17:50:58 +0200
Subject: [PATCH 07/96] Adding Test Cases
---
src/test/java/parser/AstBuilderTest.java | 51 ++++++++++++++-----
.../input/javaCases/SelfReference.java | 4 +-
2 files changed, 39 insertions(+), 16 deletions(-)
diff --git a/src/test/java/parser/AstBuilderTest.java b/src/test/java/parser/AstBuilderTest.java
index b163a2a..365f97c 100644
--- a/src/test/java/parser/AstBuilderTest.java
+++ b/src/test/java/parser/AstBuilderTest.java
@@ -14,29 +14,21 @@ import ast.members.MethodNode;
import ast.parameters.ParameterNode;
import ast.statementexpressions.AssignNode;
import ast.statementexpressions.AssignableNode;
+import ast.statementexpressions.NewDeclarationNode;
import ast.statementexpressions.methodcallstatementnexpressions.MethodCallNode;
+import ast.statementexpressions.methodcallstatementnexpressions.TargetNode;
import ast.statements.BlockNode;
-import ast.statements.IStatementNode;
+import ast.statements.LocalVariableDeclarationNode;
import ast.statements.ReturnNode;
import ast.type.AccessModifierNode;
import ast.type.EnumValueNode;
import ast.type.ValueNode;
import ast.type.type.BaseType;
-import ast.type.type.ITypeNode;
+import ast.type.type.ReferenceType;
import ast.type.type.TypeEnum;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import org.antlr.v4.runtime.CharStream;
-import org.antlr.v4.runtime.CharStreams;
-import org.antlr.v4.runtime.CommonTokenStream;
-import org.antlr.v4.runtime.tree.ParseTree;
+
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
-import parser.astBuilder.ASTBuilder;
-import parser.generated.SimpleJavaLexer;
-import parser.generated.SimpleJavaParser;
-
-import java.io.IOException;
-import java.lang.reflect.Member;
import static org.assertj.core.api.Assertions.assertThat;
@@ -343,7 +335,38 @@ class AstBuilderTest {
@DisplayName("Self Reference Test")
public void selfReferneceTest(){
- //assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
+ ClassNode testClass = Helper.generateEmptyClass("TestClass");
+
+ MemberNode testClassObject = new FieldNode(new AccessModifierNode("public"), new ReferenceType("TestClass"),"testClass");
+
+ BlockNode testMethod1Block = new BlockNode();
+ testMethod1Block.addStatement(new ReturnNode(new UnaryNode(new MethodCallNode(new TargetNode(true), "testMethod2"))));
+ MethodNode testMethod1 = new MethodNode("public", new BaseType(TypeEnum.INT), false, "testMethod1", testMethod1Block);
+
+ BlockNode testMethod2Block = new BlockNode();
+ testMethod2Block.addStatement(new ReturnNode(new UnaryNode(new ValueNode(EnumValueNode.INT_VALUE,"1"))));
+ MethodNode testMethod2 = new MethodNode("public", new BaseType(TypeEnum.INT), false, "testMethod2", testMethod2Block);
+
+ BlockNode testMethod3Block = new BlockNode();
+ testMethod3Block.addStatement(new LocalVariableDeclarationNode(new ReferenceType("TestClass"),"testClass1", "=", new UnaryNode(new NewDeclarationNode("TestClass")))); // Assing einfach "=" ?
+ MemberAccessNode methodAccess = new MemberAccessNode(false);
+ methodAccess.addIdentifier("testClass1");
+ methodAccess.addIdentifier("testClass");
+ TargetNode methodTarget = new TargetNode(methodAccess);
+ testMethod3Block.addStatement(new ReturnNode(new UnaryNode(new MethodCallNode(methodTarget,"testMethod1"))));
+ MethodNode testMethod3 = new MethodNode("public", new BaseType(TypeEnum.INT), false, "testMethod3", testMethod3Block);
+
+ testClass.addMember(testClassObject);
+ testClass.addMember(testMethod1);
+ testClass.addMember(testMethod2);
+ testClass.addMember(testMethod3);
+
+ ProgramNode expected = new ProgramNode();
+ expected.addClass(testClass);
+
+ ASTNode actual = Helper.generateAST("src/test/resources/input/javaCases/SelfReference.java");
+
+ assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
}
@Test
diff --git a/src/test/resources/input/javaCases/SelfReference.java b/src/test/resources/input/javaCases/SelfReference.java
index cbe6e25..a1709f5 100644
--- a/src/test/resources/input/javaCases/SelfReference.java
+++ b/src/test/resources/input/javaCases/SelfReference.java
@@ -3,14 +3,14 @@ class TestClass{
TestClass testClass;
int testMethod1() {
- return this.testMethod2()
+ return this.testMethod2();
}
int testMethod2() {
return 1;
}
- int testMehtod3(){
+ int testMethod3(){
TestClass testClass1 = new TestClass();
return testClass1.testClass.testMethod1();
}
--
2.34.1
From d26cd0c13a86c6c0507cadebce909debdf10156a Mon Sep 17 00:00:00 2001
From: i22035
Date: Tue, 2 Jul 2024 17:57:48 +0200
Subject: [PATCH 08/96] For Test
---
src/test/java/parser/AstBuilderTest.java | 45 +++++++++++++++++-------
1 file changed, 32 insertions(+), 13 deletions(-)
diff --git a/src/test/java/parser/AstBuilderTest.java b/src/test/java/parser/AstBuilderTest.java
index b163a2a..0d00bde 100644
--- a/src/test/java/parser/AstBuilderTest.java
+++ b/src/test/java/parser/AstBuilderTest.java
@@ -5,6 +5,8 @@ import ast.ASTNode;
import ast.ClassNode;
import ast.ProgramNode;
import ast.expressions.IExpressionNode;
+import ast.expressions.binaryexpressions.EnumNonCalculationOperator;
+import ast.expressions.binaryexpressions.NonCalculationNode;
import ast.expressions.unaryexpressions.MemberAccessNode;
import ast.expressions.unaryexpressions.UnaryNode;
import ast.members.ConstructorNode;
@@ -14,10 +16,10 @@ import ast.members.MethodNode;
import ast.parameters.ParameterNode;
import ast.statementexpressions.AssignNode;
import ast.statementexpressions.AssignableNode;
+import ast.statementexpressions.crementexpressions.CrementType;
+import ast.statementexpressions.crementexpressions.IncrementNode;
import ast.statementexpressions.methodcallstatementnexpressions.MethodCallNode;
-import ast.statements.BlockNode;
-import ast.statements.IStatementNode;
-import ast.statements.ReturnNode;
+import ast.statements.*;
import ast.type.AccessModifierNode;
import ast.type.EnumValueNode;
import ast.type.ValueNode;
@@ -384,21 +386,37 @@ class AstBuilderTest {
@Test
@DisplayName("For Test")
public void forTest(){
+ LocalVariableDeclarationNode forDeclaration = new LocalVariableDeclarationNode(new BaseType(TypeEnum.INT), "i", "=", new UnaryNode(new ValueNode(EnumValueNode.INT_VALUE, "0")));
- //assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
- }
+ NonCalculationNode condition = new NonCalculationNode(new UnaryNode("i"), "<", new UnaryNode(new ValueNode(EnumValueNode.INT_VALUE, "10")));
+ AssignableNode assignable = new AssignableNode("i");
+ IncrementNode increment = new IncrementNode(CrementType.SUFFIX, assignable);
- //Noch nicht speziell Increment nur zum Development Testen per Debug
- @Test
- @DisplayName("Increment Test")
- public void incrementTest(){
- ClassNode classNode = Helper.generateEmptyClass("TestClass");
- classNode.addMember(new FieldNode(new AccessModifierNode("public"), new BaseType(TypeEnum.INT), "a"));
+ LocalVariableDeclarationNode declaration = new LocalVariableDeclarationNode(new BaseType(TypeEnum.INT), "a", null, null);
+
+ BlockNode whileBlock = new BlockNode();
+ whileBlock.addStatement(declaration);
+ whileBlock.addStatement(increment);
+
+ WhileNode whileStatement = new WhileNode(condition, whileBlock);
+
+ BlockNode forStatement = new BlockNode();
+ forStatement.addStatement(forDeclaration);
+ forStatement.addStatement(whileStatement);
+
+ BlockNode blockCon = new BlockNode();
+ blockCon.addStatement(forStatement);
+ blockCon.addStatement(new ReturnNode(null));
+ ConstructorNode constructor = new ConstructorNode("public", "TestClass", blockCon);
+
+ ClassNode class1 = new ClassNode("public", "TestClass");
+ class1.addMember(constructor);
ProgramNode expected = new ProgramNode();
- expected.addClass(classNode);
+ expected.addClass(class1);
+
+ ASTNode actual = Helper.generateAST("src/test/resources/input/javaCases/For.java");
- ASTNode actual = Helper.generateAST("src/test/resources/input/javaCases/Increment.java");
assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
}
@@ -413,4 +431,5 @@ class AstBuilderTest {
+
}
\ No newline at end of file
--
2.34.1
From 5f4613043914c44b56d700a9a22613acbb97ee34 Mon Sep 17 00:00:00 2001
From: Purplumbi504
Date: Tue, 2 Jul 2024 19:12:19 +0200
Subject: [PATCH 09/96] Adding Switch Case AST
---
.../java/parser/astBuilder/ASTBuilder.java | 50 +-
.../java/parser/generated/SimpleJava.interp | 159 -
.../java/parser/generated/SimpleJava.tokens | 90 -
.../generated/SimpleJavaBaseListener.java | 592 ---
.../generated/SimpleJavaBaseVisitor.java | 337 --
.../parser/generated/SimpleJavaLexer.interp | 173 -
.../parser/generated/SimpleJavaLexer.java | 397 --
.../parser/generated/SimpleJavaLexer.tokens | 90 -
.../parser/generated/SimpleJavaListener.java | 470 ---
.../parser/generated/SimpleJavaParser.java | 3628 -----------------
.../parser/generated/SimpleJavaVisitor.java | 289 --
src/main/java/parser/grammar/SimpleJava.g4 | 11 +-
.../resources/input/javaCases/SwitchCase.java | 10 +
13 files changed, 66 insertions(+), 6230 deletions(-)
delete mode 100644 src/main/java/parser/generated/SimpleJava.interp
delete mode 100644 src/main/java/parser/generated/SimpleJava.tokens
delete mode 100644 src/main/java/parser/generated/SimpleJavaBaseListener.java
delete mode 100644 src/main/java/parser/generated/SimpleJavaBaseVisitor.java
delete mode 100644 src/main/java/parser/generated/SimpleJavaLexer.interp
delete mode 100644 src/main/java/parser/generated/SimpleJavaLexer.java
delete mode 100644 src/main/java/parser/generated/SimpleJavaLexer.tokens
delete mode 100644 src/main/java/parser/generated/SimpleJavaListener.java
delete mode 100644 src/main/java/parser/generated/SimpleJavaParser.java
delete mode 100644 src/main/java/parser/generated/SimpleJavaVisitor.java
create mode 100644 src/test/resources/input/javaCases/SwitchCase.java
diff --git a/src/main/java/parser/astBuilder/ASTBuilder.java b/src/main/java/parser/astBuilder/ASTBuilder.java
index c23a010..0b574fc 100644
--- a/src/main/java/parser/astBuilder/ASTBuilder.java
+++ b/src/main/java/parser/astBuilder/ASTBuilder.java
@@ -3,10 +3,7 @@ package parser.astBuilder;
import ast.*;
import ast.expressions.IExpressionNode;
-import ast.expressions.binaryexpressions.CalculationNode;
-import ast.expressions.binaryexpressions.DotNode;
-import ast.expressions.binaryexpressions.DotSubstractionNode;
-import ast.expressions.binaryexpressions.NonCalculationNode;
+import ast.expressions.binaryexpressions.*;
import ast.expressions.unaryexpressions.MemberAccessNode;
import ast.expressions.unaryexpressions.NotNode;
import ast.expressions.unaryexpressions.UnaryNode;
@@ -170,6 +167,8 @@ public class ASTBuilder extends SimpleJavaBaseVisitor {
return visitForStatement(ctx.forStatement());
} else if(ctx.ifElseStatement() != null) {
return visitIfElseStatement(ctx.ifElseStatement());
+ } else if(ctx.switchStatement() != null) {
+ return visitSwitchStatement(ctx.switchStatement());
} else if(ctx.statementExpression() != null) {
return visitStatementExpression(ctx.statementExpression());
}
@@ -321,6 +320,49 @@ public class ASTBuilder extends SimpleJavaBaseVisitor {
return null;
}
+ @Override
+ public ASTNode visitSwitchStatement(SimpleJavaParser.SwitchStatementContext ctx) {
+ UnaryNode switchExpression = (UnaryNode) visit(ctx.expression());
+
+ List ifNodes = new ArrayList<>();
+
+ for (SimpleJavaParser.CaseStatementContext caseCtx : ctx.caseStatement()) {
+ IExpressionNode caseExpression = (IExpressionNode) visit(caseCtx.value());
+
+ // Condition as NonCalculationNode -> Equals Expression
+ NonCalculationNode condition = new NonCalculationNode(switchExpression, "==", caseExpression);
+
+ BlockNode caseBlock = new BlockNode();
+ for (SimpleJavaParser.StatementContext stmtCtx : caseCtx.statement()) {
+ caseBlock.addStatement((IStatementNode) visit(stmtCtx));
+ }
+
+ // Each case as if
+ IfNode ifNode = new IfNode(condition, caseBlock);
+ ifNodes.add(ifNode);
+ }
+
+ // Check if has Default
+ ElseNode defaulElseNode = null;
+ if (ctx.defaultStatement() != null) {
+ BlockNode defaultBlock = new BlockNode();
+ for (SimpleJavaParser.StatementContext stmtCtx : ctx.defaultStatement().statement()) {
+ defaultBlock.addStatement((IStatementNode) visit(stmtCtx));
+ }
+ // Default als letztes Else Statement
+ defaulElseNode = new ElseNode(defaultBlock);
+ }
+
+ IfElseNode ifElseNode = new IfElseNode(ifNodes.getFirst(),defaulElseNode);
+ ifNodes.removeFirst();
+
+ for (IfNode ifNode : ifNodes){
+ ifElseNode.addElseIfStatement(ifNode);
+ }
+
+ return ifElseNode;
+ }
+
@Override
public ASTNode visitAssign(SimpleJavaParser.AssignContext ctx) {
return new AssignNode((AssignableNode) visit(ctx.assignableExpression()), (IExpressionNode) visit(ctx.expression()));
diff --git a/src/main/java/parser/generated/SimpleJava.interp b/src/main/java/parser/generated/SimpleJava.interp
deleted file mode 100644
index aca42bf..0000000
--- a/src/main/java/parser/generated/SimpleJava.interp
+++ /dev/null
@@ -1,159 +0,0 @@
-token literal names:
-null
-'++'
-'--'
-'void'
-'boolean'
-'char'
-'int'
-null
-'public static void main(String[] args)'
-null
-null
-null
-null
-'='
-'+'
-'-'
-'*'
-'%'
-'/'
-'>'
-'<'
-'>='
-'<='
-'=='
-'!='
-'!'
-'&&'
-'||'
-'.'
-'('
-')'
-'{'
-'}'
-';'
-','
-'class'
-'this'
-'while'
-'do'
-'if'
-'else'
-'for'
-'return'
-'new'
-null
-null
-null
-'null'
-null
-null
-null
-null
-
-token symbolic names:
-null
-null
-null
-Void
-Boolean
-Char
-Int
-AccessModifier
-MainMethodDeclaration
-DotOperator
-LineOperator
-ComparisonOperator
-LogicalOperator
-Assign
-Plus
-Minus
-Mult
-Modulo
-Div
-Greater
-Less
-GreaterEqual
-LessEqual
-Equal
-NotEqual
-Not
-And
-Or
-Dot
-OpenRoundBracket
-ClosedRoundBracket
-OpenCurlyBracket
-ClosedCurlyBracket
-Semicolon
-Comma
-Class
-This
-While
-Do
-If
-Else
-For
-Return
-New
-CharValue
-IntValue
-BooleanValue
-NullValue
-Identifier
-WS
-InlineComment
-MultilineComment
-
-rule names:
-program
-classDeclaration
-memberDeclaration
-constructorDeclaration
-fieldDeclaration
-methodDeclaration
-parameterList
-parameter
-argumentList
-statement
-blockStatement
-returnStatement
-localVariableDeclaration
-whileStatement
-doWhileStatement
-forStatement
-ifElseStatement
-ifStatement
-elseIfStatement
-elseStatement
-statementExpression
-assign
-newDeclaration
-expression
-unaryExpression
-notExpression
-crementExpression
-incrementExpression
-prefixIncrementExpression
-suffixIncrementExpression
-decrementExpression
-prefixDecrementExpression
-suffixDecrementExpression
-assignableExpression
-memberAccess
-binaryExpression
-calculationExpression
-dotExpression
-dotSubtractionExpression
-nonCalculationExpression
-methodCall
-target
-chainedMethod
-type
-value
-nonCalculationOperator
-
-
-atn:
-[4, 1, 51, 419, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 1, 0, 4, 0, 94, 8, 0, 11, 0, 12, 0, 95, 1, 1, 3, 1, 99, 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 105, 8, 1, 10, 1, 12, 1, 108, 9, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 3, 2, 115, 8, 2, 1, 3, 3, 3, 118, 8, 3, 1, 3, 1, 3, 1, 3, 3, 3, 123, 8, 3, 1, 3, 1, 3, 1, 3, 1, 4, 3, 4, 129, 8, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 3, 5, 138, 8, 5, 1, 5, 1, 5, 3, 5, 142, 8, 5, 1, 5, 1, 5, 1, 5, 3, 5, 147, 8, 5, 1, 5, 1, 5, 3, 5, 151, 8, 5, 1, 6, 1, 6, 1, 6, 5, 6, 156, 8, 6, 10, 6, 12, 6, 159, 9, 6, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 5, 8, 167, 8, 8, 10, 8, 12, 8, 170, 9, 8, 3, 8, 172, 8, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 3, 9, 188, 8, 9, 1, 10, 1, 10, 5, 10, 192, 8, 10, 10, 10, 12, 10, 195, 9, 10, 1, 10, 1, 10, 1, 11, 1, 11, 3, 11, 201, 8, 11, 1, 12, 1, 12, 1, 12, 1, 12, 3, 12, 207, 8, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 3, 15, 227, 8, 15, 1, 15, 1, 15, 3, 15, 231, 8, 15, 1, 15, 1, 15, 3, 15, 235, 8, 15, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 5, 16, 242, 8, 16, 10, 16, 12, 16, 245, 9, 16, 1, 16, 3, 16, 248, 8, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, 3, 20, 270, 8, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 3, 23, 284, 8, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 3, 24, 296, 8, 24, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 3, 26, 303, 8, 26, 1, 27, 1, 27, 3, 27, 307, 8, 27, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 3, 30, 317, 8, 30, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 3, 33, 327, 8, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 334, 8, 34, 1, 34, 1, 34, 4, 34, 338, 8, 34, 11, 34, 12, 34, 339, 1, 34, 3, 34, 343, 8, 34, 1, 35, 1, 35, 3, 35, 347, 8, 35, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 5, 36, 355, 8, 36, 10, 36, 12, 36, 358, 9, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 5, 37, 366, 8, 37, 10, 37, 12, 37, 369, 9, 37, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 3, 38, 379, 8, 38, 1, 39, 1, 39, 1, 39, 1, 39, 1, 40, 3, 40, 386, 8, 40, 1, 40, 5, 40, 389, 8, 40, 10, 40, 12, 40, 392, 9, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 41, 1, 41, 1, 41, 1, 41, 3, 41, 403, 8, 41, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 43, 1, 43, 1, 44, 1, 44, 1, 45, 1, 45, 1, 45, 0, 2, 72, 74, 46, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 0, 3, 2, 0, 4, 6, 48, 48, 1, 0, 44, 47, 1, 0, 11, 12, 430, 0, 93, 1, 0, 0, 0, 2, 98, 1, 0, 0, 0, 4, 114, 1, 0, 0, 0, 6, 117, 1, 0, 0, 0, 8, 128, 1, 0, 0, 0, 10, 150, 1, 0, 0, 0, 12, 152, 1, 0, 0, 0, 14, 160, 1, 0, 0, 0, 16, 171, 1, 0, 0, 0, 18, 187, 1, 0, 0, 0, 20, 189, 1, 0, 0, 0, 22, 198, 1, 0, 0, 0, 24, 202, 1, 0, 0, 0, 26, 208, 1, 0, 0, 0, 28, 214, 1, 0, 0, 0, 30, 222, 1, 0, 0, 0, 32, 239, 1, 0, 0, 0, 34, 249, 1, 0, 0, 0, 36, 255, 1, 0, 0, 0, 38, 262, 1, 0, 0, 0, 40, 269, 1, 0, 0, 0, 42, 271, 1, 0, 0, 0, 44, 275, 1, 0, 0, 0, 46, 283, 1, 0, 0, 0, 48, 295, 1, 0, 0, 0, 50, 297, 1, 0, 0, 0, 52, 302, 1, 0, 0, 0, 54, 306, 1, 0, 0, 0, 56, 308, 1, 0, 0, 0, 58, 311, 1, 0, 0, 0, 60, 316, 1, 0, 0, 0, 62, 318, 1, 0, 0, 0, 64, 321, 1, 0, 0, 0, 66, 326, 1, 0, 0, 0, 68, 342, 1, 0, 0, 0, 70, 346, 1, 0, 0, 0, 72, 348, 1, 0, 0, 0, 74, 359, 1, 0, 0, 0, 76, 378, 1, 0, 0, 0, 78, 380, 1, 0, 0, 0, 80, 385, 1, 0, 0, 0, 82, 402, 1, 0, 0, 0, 84, 406, 1, 0, 0, 0, 86, 412, 1, 0, 0, 0, 88, 414, 1, 0, 0, 0, 90, 416, 1, 0, 0, 0, 92, 94, 3, 2, 1, 0, 93, 92, 1, 0, 0, 0, 94, 95, 1, 0, 0, 0, 95, 93, 1, 0, 0, 0, 95, 96, 1, 0, 0, 0, 96, 1, 1, 0, 0, 0, 97, 99, 5, 7, 0, 0, 98, 97, 1, 0, 0, 0, 98, 99, 1, 0, 0, 0, 99, 100, 1, 0, 0, 0, 100, 101, 5, 35, 0, 0, 101, 102, 5, 48, 0, 0, 102, 106, 5, 31, 0, 0, 103, 105, 3, 4, 2, 0, 104, 103, 1, 0, 0, 0, 105, 108, 1, 0, 0, 0, 106, 104, 1, 0, 0, 0, 106, 107, 1, 0, 0, 0, 107, 109, 1, 0, 0, 0, 108, 106, 1, 0, 0, 0, 109, 110, 5, 32, 0, 0, 110, 3, 1, 0, 0, 0, 111, 115, 3, 6, 3, 0, 112, 115, 3, 8, 4, 0, 113, 115, 3, 10, 5, 0, 114, 111, 1, 0, 0, 0, 114, 112, 1, 0, 0, 0, 114, 113, 1, 0, 0, 0, 115, 5, 1, 0, 0, 0, 116, 118, 5, 7, 0, 0, 117, 116, 1, 0, 0, 0, 117, 118, 1, 0, 0, 0, 118, 119, 1, 0, 0, 0, 119, 120, 5, 48, 0, 0, 120, 122, 5, 29, 0, 0, 121, 123, 3, 12, 6, 0, 122, 121, 1, 0, 0, 0, 122, 123, 1, 0, 0, 0, 123, 124, 1, 0, 0, 0, 124, 125, 5, 30, 0, 0, 125, 126, 3, 20, 10, 0, 126, 7, 1, 0, 0, 0, 127, 129, 5, 7, 0, 0, 128, 127, 1, 0, 0, 0, 128, 129, 1, 0, 0, 0, 129, 130, 1, 0, 0, 0, 130, 131, 3, 86, 43, 0, 131, 132, 5, 48, 0, 0, 132, 133, 5, 33, 0, 0, 133, 9, 1, 0, 0, 0, 134, 135, 5, 8, 0, 0, 135, 151, 3, 20, 10, 0, 136, 138, 5, 7, 0, 0, 137, 136, 1, 0, 0, 0, 137, 138, 1, 0, 0, 0, 138, 141, 1, 0, 0, 0, 139, 142, 3, 86, 43, 0, 140, 142, 5, 3, 0, 0, 141, 139, 1, 0, 0, 0, 141, 140, 1, 0, 0, 0, 142, 143, 1, 0, 0, 0, 143, 144, 5, 48, 0, 0, 144, 146, 5, 29, 0, 0, 145, 147, 3, 12, 6, 0, 146, 145, 1, 0, 0, 0, 146, 147, 1, 0, 0, 0, 147, 148, 1, 0, 0, 0, 148, 149, 5, 30, 0, 0, 149, 151, 3, 20, 10, 0, 150, 134, 1, 0, 0, 0, 150, 137, 1, 0, 0, 0, 151, 11, 1, 0, 0, 0, 152, 157, 3, 14, 7, 0, 153, 154, 5, 34, 0, 0, 154, 156, 3, 14, 7, 0, 155, 153, 1, 0, 0, 0, 156, 159, 1, 0, 0, 0, 157, 155, 1, 0, 0, 0, 157, 158, 1, 0, 0, 0, 158, 13, 1, 0, 0, 0, 159, 157, 1, 0, 0, 0, 160, 161, 3, 86, 43, 0, 161, 162, 5, 48, 0, 0, 162, 15, 1, 0, 0, 0, 163, 168, 3, 46, 23, 0, 164, 165, 5, 34, 0, 0, 165, 167, 3, 46, 23, 0, 166, 164, 1, 0, 0, 0, 167, 170, 1, 0, 0, 0, 168, 166, 1, 0, 0, 0, 168, 169, 1, 0, 0, 0, 169, 172, 1, 0, 0, 0, 170, 168, 1, 0, 0, 0, 171, 163, 1, 0, 0, 0, 171, 172, 1, 0, 0, 0, 172, 17, 1, 0, 0, 0, 173, 174, 3, 22, 11, 0, 174, 175, 5, 33, 0, 0, 175, 188, 1, 0, 0, 0, 176, 177, 3, 24, 12, 0, 177, 178, 5, 33, 0, 0, 178, 188, 1, 0, 0, 0, 179, 188, 3, 20, 10, 0, 180, 188, 3, 26, 13, 0, 181, 188, 3, 28, 14, 0, 182, 188, 3, 30, 15, 0, 183, 188, 3, 32, 16, 0, 184, 185, 3, 40, 20, 0, 185, 186, 5, 33, 0, 0, 186, 188, 1, 0, 0, 0, 187, 173, 1, 0, 0, 0, 187, 176, 1, 0, 0, 0, 187, 179, 1, 0, 0, 0, 187, 180, 1, 0, 0, 0, 187, 181, 1, 0, 0, 0, 187, 182, 1, 0, 0, 0, 187, 183, 1, 0, 0, 0, 187, 184, 1, 0, 0, 0, 188, 19, 1, 0, 0, 0, 189, 193, 5, 31, 0, 0, 190, 192, 3, 18, 9, 0, 191, 190, 1, 0, 0, 0, 192, 195, 1, 0, 0, 0, 193, 191, 1, 0, 0, 0, 193, 194, 1, 0, 0, 0, 194, 196, 1, 0, 0, 0, 195, 193, 1, 0, 0, 0, 196, 197, 5, 32, 0, 0, 197, 21, 1, 0, 0, 0, 198, 200, 5, 42, 0, 0, 199, 201, 3, 46, 23, 0, 200, 199, 1, 0, 0, 0, 200, 201, 1, 0, 0, 0, 201, 23, 1, 0, 0, 0, 202, 203, 3, 86, 43, 0, 203, 206, 5, 48, 0, 0, 204, 205, 5, 13, 0, 0, 205, 207, 3, 46, 23, 0, 206, 204, 1, 0, 0, 0, 206, 207, 1, 0, 0, 0, 207, 25, 1, 0, 0, 0, 208, 209, 5, 37, 0, 0, 209, 210, 5, 29, 0, 0, 210, 211, 3, 46, 23, 0, 211, 212, 5, 30, 0, 0, 212, 213, 3, 20, 10, 0, 213, 27, 1, 0, 0, 0, 214, 215, 5, 38, 0, 0, 215, 216, 3, 20, 10, 0, 216, 217, 5, 37, 0, 0, 217, 218, 5, 29, 0, 0, 218, 219, 3, 46, 23, 0, 219, 220, 5, 30, 0, 0, 220, 221, 5, 33, 0, 0, 221, 29, 1, 0, 0, 0, 222, 223, 5, 41, 0, 0, 223, 226, 5, 29, 0, 0, 224, 227, 3, 40, 20, 0, 225, 227, 3, 24, 12, 0, 226, 224, 1, 0, 0, 0, 226, 225, 1, 0, 0, 0, 227, 228, 1, 0, 0, 0, 228, 230, 5, 33, 0, 0, 229, 231, 3, 46, 23, 0, 230, 229, 1, 0, 0, 0, 230, 231, 1, 0, 0, 0, 231, 232, 1, 0, 0, 0, 232, 234, 5, 33, 0, 0, 233, 235, 3, 40, 20, 0, 234, 233, 1, 0, 0, 0, 234, 235, 1, 0, 0, 0, 235, 236, 1, 0, 0, 0, 236, 237, 5, 30, 0, 0, 237, 238, 3, 20, 10, 0, 238, 31, 1, 0, 0, 0, 239, 243, 3, 34, 17, 0, 240, 242, 3, 36, 18, 0, 241, 240, 1, 0, 0, 0, 242, 245, 1, 0, 0, 0, 243, 241, 1, 0, 0, 0, 243, 244, 1, 0, 0, 0, 244, 247, 1, 0, 0, 0, 245, 243, 1, 0, 0, 0, 246, 248, 3, 38, 19, 0, 247, 246, 1, 0, 0, 0, 247, 248, 1, 0, 0, 0, 248, 33, 1, 0, 0, 0, 249, 250, 5, 39, 0, 0, 250, 251, 5, 29, 0, 0, 251, 252, 3, 46, 23, 0, 252, 253, 5, 30, 0, 0, 253, 254, 3, 20, 10, 0, 254, 35, 1, 0, 0, 0, 255, 256, 5, 40, 0, 0, 256, 257, 5, 39, 0, 0, 257, 258, 5, 29, 0, 0, 258, 259, 3, 46, 23, 0, 259, 260, 5, 30, 0, 0, 260, 261, 3, 20, 10, 0, 261, 37, 1, 0, 0, 0, 262, 263, 5, 40, 0, 0, 263, 264, 3, 20, 10, 0, 264, 39, 1, 0, 0, 0, 265, 270, 3, 42, 21, 0, 266, 270, 3, 44, 22, 0, 267, 270, 3, 80, 40, 0, 268, 270, 3, 52, 26, 0, 269, 265, 1, 0, 0, 0, 269, 266, 1, 0, 0, 0, 269, 267, 1, 0, 0, 0, 269, 268, 1, 0, 0, 0, 270, 41, 1, 0, 0, 0, 271, 272, 3, 66, 33, 0, 272, 273, 5, 13, 0, 0, 273, 274, 3, 46, 23, 0, 274, 43, 1, 0, 0, 0, 275, 276, 5, 43, 0, 0, 276, 277, 5, 48, 0, 0, 277, 278, 5, 29, 0, 0, 278, 279, 3, 16, 8, 0, 279, 280, 5, 30, 0, 0, 280, 45, 1, 0, 0, 0, 281, 284, 3, 48, 24, 0, 282, 284, 3, 70, 35, 0, 283, 281, 1, 0, 0, 0, 283, 282, 1, 0, 0, 0, 284, 47, 1, 0, 0, 0, 285, 296, 5, 36, 0, 0, 286, 296, 5, 48, 0, 0, 287, 296, 3, 68, 34, 0, 288, 296, 3, 88, 44, 0, 289, 296, 3, 50, 25, 0, 290, 296, 3, 40, 20, 0, 291, 292, 5, 29, 0, 0, 292, 293, 3, 46, 23, 0, 293, 294, 5, 30, 0, 0, 294, 296, 1, 0, 0, 0, 295, 285, 1, 0, 0, 0, 295, 286, 1, 0, 0, 0, 295, 287, 1, 0, 0, 0, 295, 288, 1, 0, 0, 0, 295, 289, 1, 0, 0, 0, 295, 290, 1, 0, 0, 0, 295, 291, 1, 0, 0, 0, 296, 49, 1, 0, 0, 0, 297, 298, 5, 25, 0, 0, 298, 299, 3, 46, 23, 0, 299, 51, 1, 0, 0, 0, 300, 303, 3, 54, 27, 0, 301, 303, 3, 60, 30, 0, 302, 300, 1, 0, 0, 0, 302, 301, 1, 0, 0, 0, 303, 53, 1, 0, 0, 0, 304, 307, 3, 56, 28, 0, 305, 307, 3, 58, 29, 0, 306, 304, 1, 0, 0, 0, 306, 305, 1, 0, 0, 0, 307, 55, 1, 0, 0, 0, 308, 309, 5, 1, 0, 0, 309, 310, 3, 66, 33, 0, 310, 57, 1, 0, 0, 0, 311, 312, 3, 66, 33, 0, 312, 313, 5, 1, 0, 0, 313, 59, 1, 0, 0, 0, 314, 317, 3, 62, 31, 0, 315, 317, 3, 64, 32, 0, 316, 314, 1, 0, 0, 0, 316, 315, 1, 0, 0, 0, 317, 61, 1, 0, 0, 0, 318, 319, 5, 2, 0, 0, 319, 320, 3, 66, 33, 0, 320, 63, 1, 0, 0, 0, 321, 322, 3, 66, 33, 0, 322, 323, 5, 2, 0, 0, 323, 65, 1, 0, 0, 0, 324, 327, 5, 48, 0, 0, 325, 327, 3, 68, 34, 0, 326, 324, 1, 0, 0, 0, 326, 325, 1, 0, 0, 0, 327, 67, 1, 0, 0, 0, 328, 329, 5, 36, 0, 0, 329, 330, 5, 28, 0, 0, 330, 343, 5, 48, 0, 0, 331, 332, 5, 36, 0, 0, 332, 334, 5, 28, 0, 0, 333, 331, 1, 0, 0, 0, 333, 334, 1, 0, 0, 0, 334, 337, 1, 0, 0, 0, 335, 336, 5, 48, 0, 0, 336, 338, 5, 28, 0, 0, 337, 335, 1, 0, 0, 0, 338, 339, 1, 0, 0, 0, 339, 337, 1, 0, 0, 0, 339, 340, 1, 0, 0, 0, 340, 341, 1, 0, 0, 0, 341, 343, 5, 48, 0, 0, 342, 328, 1, 0, 0, 0, 342, 333, 1, 0, 0, 0, 343, 69, 1, 0, 0, 0, 344, 347, 3, 72, 36, 0, 345, 347, 3, 78, 39, 0, 346, 344, 1, 0, 0, 0, 346, 345, 1, 0, 0, 0, 347, 71, 1, 0, 0, 0, 348, 349, 6, 36, -1, 0, 349, 350, 3, 74, 37, 0, 350, 356, 1, 0, 0, 0, 351, 352, 10, 2, 0, 0, 352, 353, 5, 10, 0, 0, 353, 355, 3, 74, 37, 0, 354, 351, 1, 0, 0, 0, 355, 358, 1, 0, 0, 0, 356, 354, 1, 0, 0, 0, 356, 357, 1, 0, 0, 0, 357, 73, 1, 0, 0, 0, 358, 356, 1, 0, 0, 0, 359, 360, 6, 37, -1, 0, 360, 361, 3, 76, 38, 0, 361, 367, 1, 0, 0, 0, 362, 363, 10, 2, 0, 0, 363, 364, 5, 9, 0, 0, 364, 366, 3, 76, 38, 0, 365, 362, 1, 0, 0, 0, 366, 369, 1, 0, 0, 0, 367, 365, 1, 0, 0, 0, 367, 368, 1, 0, 0, 0, 368, 75, 1, 0, 0, 0, 369, 367, 1, 0, 0, 0, 370, 379, 5, 45, 0, 0, 371, 379, 5, 48, 0, 0, 372, 379, 3, 68, 34, 0, 373, 374, 3, 80, 40, 0, 374, 375, 5, 29, 0, 0, 375, 376, 3, 72, 36, 0, 376, 377, 5, 30, 0, 0, 377, 379, 1, 0, 0, 0, 378, 370, 1, 0, 0, 0, 378, 371, 1, 0, 0, 0, 378, 372, 1, 0, 0, 0, 378, 373, 1, 0, 0, 0, 379, 77, 1, 0, 0, 0, 380, 381, 3, 48, 24, 0, 381, 382, 3, 90, 45, 0, 382, 383, 3, 46, 23, 0, 383, 79, 1, 0, 0, 0, 384, 386, 3, 82, 41, 0, 385, 384, 1, 0, 0, 0, 385, 386, 1, 0, 0, 0, 386, 390, 1, 0, 0, 0, 387, 389, 3, 84, 42, 0, 388, 387, 1, 0, 0, 0, 389, 392, 1, 0, 0, 0, 390, 388, 1, 0, 0, 0, 390, 391, 1, 0, 0, 0, 391, 393, 1, 0, 0, 0, 392, 390, 1, 0, 0, 0, 393, 394, 5, 48, 0, 0, 394, 395, 5, 29, 0, 0, 395, 396, 3, 16, 8, 0, 396, 397, 5, 30, 0, 0, 397, 81, 1, 0, 0, 0, 398, 403, 5, 36, 0, 0, 399, 403, 3, 68, 34, 0, 400, 403, 3, 44, 22, 0, 401, 403, 5, 48, 0, 0, 402, 398, 1, 0, 0, 0, 402, 399, 1, 0, 0, 0, 402, 400, 1, 0, 0, 0, 402, 401, 1, 0, 0, 0, 403, 404, 1, 0, 0, 0, 404, 405, 5, 28, 0, 0, 405, 83, 1, 0, 0, 0, 406, 407, 5, 48, 0, 0, 407, 408, 5, 29, 0, 0, 408, 409, 3, 16, 8, 0, 409, 410, 5, 30, 0, 0, 410, 411, 5, 28, 0, 0, 411, 85, 1, 0, 0, 0, 412, 413, 7, 0, 0, 0, 413, 87, 1, 0, 0, 0, 414, 415, 7, 1, 0, 0, 415, 89, 1, 0, 0, 0, 416, 417, 7, 2, 0, 0, 417, 91, 1, 0, 0, 0, 40, 95, 98, 106, 114, 117, 122, 128, 137, 141, 146, 150, 157, 168, 171, 187, 193, 200, 206, 226, 230, 234, 243, 247, 269, 283, 295, 302, 306, 316, 326, 333, 339, 342, 346, 356, 367, 378, 385, 390, 402]
\ No newline at end of file
diff --git a/src/main/java/parser/generated/SimpleJava.tokens b/src/main/java/parser/generated/SimpleJava.tokens
deleted file mode 100644
index 71246c8..0000000
--- a/src/main/java/parser/generated/SimpleJava.tokens
+++ /dev/null
@@ -1,90 +0,0 @@
-T__0=1
-T__1=2
-Void=3
-Boolean=4
-Char=5
-Int=6
-AccessModifier=7
-MainMethodDeclaration=8
-DotOperator=9
-LineOperator=10
-ComparisonOperator=11
-LogicalOperator=12
-Assign=13
-Plus=14
-Minus=15
-Mult=16
-Modulo=17
-Div=18
-Greater=19
-Less=20
-GreaterEqual=21
-LessEqual=22
-Equal=23
-NotEqual=24
-Not=25
-And=26
-Or=27
-Dot=28
-OpenRoundBracket=29
-ClosedRoundBracket=30
-OpenCurlyBracket=31
-ClosedCurlyBracket=32
-Semicolon=33
-Comma=34
-Class=35
-This=36
-While=37
-Do=38
-If=39
-Else=40
-For=41
-Return=42
-New=43
-CharValue=44
-IntValue=45
-BooleanValue=46
-NullValue=47
-Identifier=48
-WS=49
-InlineComment=50
-MultilineComment=51
-'++'=1
-'--'=2
-'void'=3
-'boolean'=4
-'char'=5
-'int'=6
-'public static void main(String[] args)'=8
-'='=13
-'+'=14
-'-'=15
-'*'=16
-'%'=17
-'/'=18
-'>'=19
-'<'=20
-'>='=21
-'<='=22
-'=='=23
-'!='=24
-'!'=25
-'&&'=26
-'||'=27
-'.'=28
-'('=29
-')'=30
-'{'=31
-'}'=32
-';'=33
-','=34
-'class'=35
-'this'=36
-'while'=37
-'do'=38
-'if'=39
-'else'=40
-'for'=41
-'return'=42
-'new'=43
-'null'=47
diff --git a/src/main/java/parser/generated/SimpleJavaBaseListener.java b/src/main/java/parser/generated/SimpleJavaBaseListener.java
deleted file mode 100644
index eecc12f..0000000
--- a/src/main/java/parser/generated/SimpleJavaBaseListener.java
+++ /dev/null
@@ -1,592 +0,0 @@
-// Generated from C:/Users/janni/Desktop/NichtHaskell2.0/src/main/java/parser/grammar/SimpleJava.g4 by ANTLR 4.13.1
-package parser.generated;
-
-import org.antlr.v4.runtime.ParserRuleContext;
-import org.antlr.v4.runtime.tree.ErrorNode;
-import org.antlr.v4.runtime.tree.TerminalNode;
-
-/**
- * This class provides an empty implementation of {@link SimpleJavaListener},
- * which can be extended to create a listener which only needs to handle a subset
- * of the available methods.
- */
-@SuppressWarnings("CheckReturnValue")
-public class SimpleJavaBaseListener implements SimpleJavaListener {
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterProgram(SimpleJavaParser.ProgramContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitProgram(SimpleJavaParser.ProgramContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterClassDeclaration(SimpleJavaParser.ClassDeclarationContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitClassDeclaration(SimpleJavaParser.ClassDeclarationContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterMemberDeclaration(SimpleJavaParser.MemberDeclarationContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitMemberDeclaration(SimpleJavaParser.MemberDeclarationContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterConstructorDeclaration(SimpleJavaParser.ConstructorDeclarationContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitConstructorDeclaration(SimpleJavaParser.ConstructorDeclarationContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterFieldDeclaration(SimpleJavaParser.FieldDeclarationContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitFieldDeclaration(SimpleJavaParser.FieldDeclarationContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterMethodDeclaration(SimpleJavaParser.MethodDeclarationContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitMethodDeclaration(SimpleJavaParser.MethodDeclarationContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterParameterList(SimpleJavaParser.ParameterListContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitParameterList(SimpleJavaParser.ParameterListContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterParameter(SimpleJavaParser.ParameterContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitParameter(SimpleJavaParser.ParameterContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterArgumentList(SimpleJavaParser.ArgumentListContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitArgumentList(SimpleJavaParser.ArgumentListContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterStatement(SimpleJavaParser.StatementContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitStatement(SimpleJavaParser.StatementContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterBlockStatement(SimpleJavaParser.BlockStatementContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitBlockStatement(SimpleJavaParser.BlockStatementContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterReturnStatement(SimpleJavaParser.ReturnStatementContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitReturnStatement(SimpleJavaParser.ReturnStatementContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterLocalVariableDeclaration(SimpleJavaParser.LocalVariableDeclarationContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitLocalVariableDeclaration(SimpleJavaParser.LocalVariableDeclarationContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterWhileStatement(SimpleJavaParser.WhileStatementContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitWhileStatement(SimpleJavaParser.WhileStatementContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterDoWhileStatement(SimpleJavaParser.DoWhileStatementContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitDoWhileStatement(SimpleJavaParser.DoWhileStatementContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterForStatement(SimpleJavaParser.ForStatementContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitForStatement(SimpleJavaParser.ForStatementContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterIfElseStatement(SimpleJavaParser.IfElseStatementContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitIfElseStatement(SimpleJavaParser.IfElseStatementContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterIfStatement(SimpleJavaParser.IfStatementContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitIfStatement(SimpleJavaParser.IfStatementContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterElseIfStatement(SimpleJavaParser.ElseIfStatementContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitElseIfStatement(SimpleJavaParser.ElseIfStatementContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterElseStatement(SimpleJavaParser.ElseStatementContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitElseStatement(SimpleJavaParser.ElseStatementContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterStatementExpression(SimpleJavaParser.StatementExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitStatementExpression(SimpleJavaParser.StatementExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterAssign(SimpleJavaParser.AssignContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitAssign(SimpleJavaParser.AssignContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterNewDeclaration(SimpleJavaParser.NewDeclarationContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitNewDeclaration(SimpleJavaParser.NewDeclarationContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterExpression(SimpleJavaParser.ExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitExpression(SimpleJavaParser.ExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterUnaryExpression(SimpleJavaParser.UnaryExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitUnaryExpression(SimpleJavaParser.UnaryExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterNotExpression(SimpleJavaParser.NotExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitNotExpression(SimpleJavaParser.NotExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterCrementExpression(SimpleJavaParser.CrementExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitCrementExpression(SimpleJavaParser.CrementExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterIncrementExpression(SimpleJavaParser.IncrementExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitIncrementExpression(SimpleJavaParser.IncrementExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterPrefixIncrementExpression(SimpleJavaParser.PrefixIncrementExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitPrefixIncrementExpression(SimpleJavaParser.PrefixIncrementExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterSuffixIncrementExpression(SimpleJavaParser.SuffixIncrementExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitSuffixIncrementExpression(SimpleJavaParser.SuffixIncrementExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterDecrementExpression(SimpleJavaParser.DecrementExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitDecrementExpression(SimpleJavaParser.DecrementExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterPrefixDecrementExpression(SimpleJavaParser.PrefixDecrementExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitPrefixDecrementExpression(SimpleJavaParser.PrefixDecrementExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterSuffixDecrementExpression(SimpleJavaParser.SuffixDecrementExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitSuffixDecrementExpression(SimpleJavaParser.SuffixDecrementExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterAssignableExpression(SimpleJavaParser.AssignableExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitAssignableExpression(SimpleJavaParser.AssignableExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterMemberAccess(SimpleJavaParser.MemberAccessContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitMemberAccess(SimpleJavaParser.MemberAccessContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterBinaryExpression(SimpleJavaParser.BinaryExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitBinaryExpression(SimpleJavaParser.BinaryExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterCalculationExpression(SimpleJavaParser.CalculationExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitCalculationExpression(SimpleJavaParser.CalculationExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterDotExpression(SimpleJavaParser.DotExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitDotExpression(SimpleJavaParser.DotExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterDotSubtractionExpression(SimpleJavaParser.DotSubtractionExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitDotSubtractionExpression(SimpleJavaParser.DotSubtractionExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterNonCalculationExpression(SimpleJavaParser.NonCalculationExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitNonCalculationExpression(SimpleJavaParser.NonCalculationExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterMethodCall(SimpleJavaParser.MethodCallContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitMethodCall(SimpleJavaParser.MethodCallContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterTarget(SimpleJavaParser.TargetContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitTarget(SimpleJavaParser.TargetContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterChainedMethod(SimpleJavaParser.ChainedMethodContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitChainedMethod(SimpleJavaParser.ChainedMethodContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterType(SimpleJavaParser.TypeContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitType(SimpleJavaParser.TypeContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterValue(SimpleJavaParser.ValueContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitValue(SimpleJavaParser.ValueContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterNonCalculationOperator(SimpleJavaParser.NonCalculationOperatorContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitNonCalculationOperator(SimpleJavaParser.NonCalculationOperatorContext ctx) { }
-
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterEveryRule(ParserRuleContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitEveryRule(ParserRuleContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void visitTerminal(TerminalNode node) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void visitErrorNode(ErrorNode node) { }
-}
\ No newline at end of file
diff --git a/src/main/java/parser/generated/SimpleJavaBaseVisitor.java b/src/main/java/parser/generated/SimpleJavaBaseVisitor.java
deleted file mode 100644
index b3a6029..0000000
--- a/src/main/java/parser/generated/SimpleJavaBaseVisitor.java
+++ /dev/null
@@ -1,337 +0,0 @@
-// Generated from C:/Users/janni/Desktop/NichtHaskell2.0/src/main/java/parser/grammar/SimpleJava.g4 by ANTLR 4.13.1
-package parser.generated;
-import org.antlr.v4.runtime.tree.AbstractParseTreeVisitor;
-
-/**
- * This class provides an empty implementation of {@link SimpleJavaVisitor},
- * which can be extended to create a visitor which only needs to handle a subset
- * of the available methods.
- *
- * @param The return type of the visit operation. Use {@link Void} for
- * operations with no return type.
- */
-@SuppressWarnings("CheckReturnValue")
-public class SimpleJavaBaseVisitor extends AbstractParseTreeVisitor implements SimpleJavaVisitor {
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitProgram(SimpleJavaParser.ProgramContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitClassDeclaration(SimpleJavaParser.ClassDeclarationContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitMemberDeclaration(SimpleJavaParser.MemberDeclarationContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitConstructorDeclaration(SimpleJavaParser.ConstructorDeclarationContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitFieldDeclaration(SimpleJavaParser.FieldDeclarationContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitMethodDeclaration(SimpleJavaParser.MethodDeclarationContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitParameterList(SimpleJavaParser.ParameterListContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitParameter(SimpleJavaParser.ParameterContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitArgumentList(SimpleJavaParser.ArgumentListContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitStatement(SimpleJavaParser.StatementContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitBlockStatement(SimpleJavaParser.BlockStatementContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitReturnStatement(SimpleJavaParser.ReturnStatementContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitLocalVariableDeclaration(SimpleJavaParser.LocalVariableDeclarationContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitWhileStatement(SimpleJavaParser.WhileStatementContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitDoWhileStatement(SimpleJavaParser.DoWhileStatementContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitForStatement(SimpleJavaParser.ForStatementContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitIfElseStatement(SimpleJavaParser.IfElseStatementContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitIfStatement(SimpleJavaParser.IfStatementContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitElseIfStatement(SimpleJavaParser.ElseIfStatementContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitElseStatement(SimpleJavaParser.ElseStatementContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitStatementExpression(SimpleJavaParser.StatementExpressionContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitAssign(SimpleJavaParser.AssignContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitNewDeclaration(SimpleJavaParser.NewDeclarationContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitExpression(SimpleJavaParser.ExpressionContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitUnaryExpression(SimpleJavaParser.UnaryExpressionContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitNotExpression(SimpleJavaParser.NotExpressionContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitCrementExpression(SimpleJavaParser.CrementExpressionContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitIncrementExpression(SimpleJavaParser.IncrementExpressionContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitPrefixIncrementExpression(SimpleJavaParser.PrefixIncrementExpressionContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitSuffixIncrementExpression(SimpleJavaParser.SuffixIncrementExpressionContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitDecrementExpression(SimpleJavaParser.DecrementExpressionContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitPrefixDecrementExpression(SimpleJavaParser.PrefixDecrementExpressionContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitSuffixDecrementExpression(SimpleJavaParser.SuffixDecrementExpressionContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitAssignableExpression(SimpleJavaParser.AssignableExpressionContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitMemberAccess(SimpleJavaParser.MemberAccessContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitBinaryExpression(SimpleJavaParser.BinaryExpressionContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitCalculationExpression(SimpleJavaParser.CalculationExpressionContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitDotExpression(SimpleJavaParser.DotExpressionContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitDotSubtractionExpression(SimpleJavaParser.DotSubtractionExpressionContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitNonCalculationExpression(SimpleJavaParser.NonCalculationExpressionContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitMethodCall(SimpleJavaParser.MethodCallContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitTarget(SimpleJavaParser.TargetContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitChainedMethod(SimpleJavaParser.ChainedMethodContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitType(SimpleJavaParser.TypeContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitValue(SimpleJavaParser.ValueContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitNonCalculationOperator(SimpleJavaParser.NonCalculationOperatorContext ctx) { return visitChildren(ctx); }
-}
\ No newline at end of file
diff --git a/src/main/java/parser/generated/SimpleJavaLexer.interp b/src/main/java/parser/generated/SimpleJavaLexer.interp
deleted file mode 100644
index 61f0ce5..0000000
--- a/src/main/java/parser/generated/SimpleJavaLexer.interp
+++ /dev/null
@@ -1,173 +0,0 @@
-token literal names:
-null
-'++'
-'--'
-'void'
-'boolean'
-'char'
-'int'
-null
-'public static void main(String[] args)'
-null
-null
-null
-null
-'='
-'+'
-'-'
-'*'
-'%'
-'/'
-'>'
-'<'
-'>='
-'<='
-'=='
-'!='
-'!'
-'&&'
-'||'
-'.'
-'('
-')'
-'{'
-'}'
-';'
-','
-'class'
-'this'
-'while'
-'do'
-'if'
-'else'
-'for'
-'return'
-'new'
-null
-null
-null
-'null'
-null
-null
-null
-null
-
-token symbolic names:
-null
-null
-null
-Void
-Boolean
-Char
-Int
-AccessModifier
-MainMethodDeclaration
-DotOperator
-LineOperator
-ComparisonOperator
-LogicalOperator
-Assign
-Plus
-Minus
-Mult
-Modulo
-Div
-Greater
-Less
-GreaterEqual
-LessEqual
-Equal
-NotEqual
-Not
-And
-Or
-Dot
-OpenRoundBracket
-ClosedRoundBracket
-OpenCurlyBracket
-ClosedCurlyBracket
-Semicolon
-Comma
-Class
-This
-While
-Do
-If
-Else
-For
-Return
-New
-CharValue
-IntValue
-BooleanValue
-NullValue
-Identifier
-WS
-InlineComment
-MultilineComment
-
-rule names:
-T__0
-T__1
-Void
-Boolean
-Char
-Int
-AccessModifier
-MainMethodDeclaration
-DotOperator
-LineOperator
-ComparisonOperator
-LogicalOperator
-Assign
-Plus
-Minus
-Mult
-Modulo
-Div
-Greater
-Less
-GreaterEqual
-LessEqual
-Equal
-NotEqual
-Not
-And
-Or
-Dot
-OpenRoundBracket
-ClosedRoundBracket
-OpenCurlyBracket
-ClosedCurlyBracket
-Semicolon
-Comma
-Class
-This
-While
-Do
-If
-Else
-For
-Return
-New
-CharValue
-IntValue
-BooleanValue
-NullValue
-Alphabetic
-Numeric
-ValidIdentSymbols
-Identifier
-WS
-InlineComment
-MultilineComment
-
-channel names:
-DEFAULT_TOKEN_CHANNEL
-HIDDEN
-
-mode names:
-DEFAULT_MODE
-
-atn:
-[4, 0, 51, 413, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 3, 6, 178, 8, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 3, 8, 222, 8, 8, 1, 9, 1, 9, 3, 9, 226, 8, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 3, 10, 234, 8, 10, 1, 11, 1, 11, 3, 11, 238, 8, 11, 1, 12, 1, 12, 1, 13, 1, 13, 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, 20, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 28, 1, 28, 1, 29, 1, 29, 1, 30, 1, 30, 1, 31, 1, 31, 1, 32, 1, 32, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 40, 1, 40, 1, 40, 1, 40, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 1, 42, 1, 43, 1, 43, 5, 43, 335, 8, 43, 10, 43, 12, 43, 338, 9, 43, 1, 43, 1, 43, 1, 44, 3, 44, 343, 8, 44, 1, 44, 4, 44, 346, 8, 44, 11, 44, 12, 44, 347, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 3, 45, 359, 8, 45, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 47, 1, 47, 1, 48, 1, 48, 1, 49, 1, 49, 1, 49, 3, 49, 373, 8, 49, 1, 50, 1, 50, 5, 50, 377, 8, 50, 10, 50, 12, 50, 380, 9, 50, 1, 51, 4, 51, 383, 8, 51, 11, 51, 12, 51, 384, 1, 51, 1, 51, 1, 52, 1, 52, 1, 52, 1, 52, 5, 52, 393, 8, 52, 10, 52, 12, 52, 396, 9, 52, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 1, 53, 5, 53, 404, 8, 53, 10, 53, 12, 53, 407, 9, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 405, 0, 54, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, 37, 75, 38, 77, 39, 79, 40, 81, 41, 83, 42, 85, 43, 87, 44, 89, 45, 91, 46, 93, 47, 95, 0, 97, 0, 99, 0, 101, 48, 103, 49, 105, 50, 107, 51, 1, 0, 5, 2, 0, 10, 10, 13, 13, 2, 0, 65, 90, 97, 122, 1, 0, 48, 57, 2, 0, 36, 36, 95, 95, 3, 0, 9, 10, 13, 13, 32, 32, 431, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 101, 1, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 105, 1, 0, 0, 0, 0, 107, 1, 0, 0, 0, 1, 109, 1, 0, 0, 0, 3, 112, 1, 0, 0, 0, 5, 115, 1, 0, 0, 0, 7, 120, 1, 0, 0, 0, 9, 128, 1, 0, 0, 0, 11, 133, 1, 0, 0, 0, 13, 177, 1, 0, 0, 0, 15, 179, 1, 0, 0, 0, 17, 221, 1, 0, 0, 0, 19, 225, 1, 0, 0, 0, 21, 233, 1, 0, 0, 0, 23, 237, 1, 0, 0, 0, 25, 239, 1, 0, 0, 0, 27, 241, 1, 0, 0, 0, 29, 243, 1, 0, 0, 0, 31, 245, 1, 0, 0, 0, 33, 247, 1, 0, 0, 0, 35, 249, 1, 0, 0, 0, 37, 251, 1, 0, 0, 0, 39, 253, 1, 0, 0, 0, 41, 255, 1, 0, 0, 0, 43, 258, 1, 0, 0, 0, 45, 261, 1, 0, 0, 0, 47, 264, 1, 0, 0, 0, 49, 267, 1, 0, 0, 0, 51, 269, 1, 0, 0, 0, 53, 272, 1, 0, 0, 0, 55, 275, 1, 0, 0, 0, 57, 277, 1, 0, 0, 0, 59, 279, 1, 0, 0, 0, 61, 281, 1, 0, 0, 0, 63, 283, 1, 0, 0, 0, 65, 285, 1, 0, 0, 0, 67, 287, 1, 0, 0, 0, 69, 289, 1, 0, 0, 0, 71, 295, 1, 0, 0, 0, 73, 300, 1, 0, 0, 0, 75, 306, 1, 0, 0, 0, 77, 309, 1, 0, 0, 0, 79, 312, 1, 0, 0, 0, 81, 317, 1, 0, 0, 0, 83, 321, 1, 0, 0, 0, 85, 328, 1, 0, 0, 0, 87, 332, 1, 0, 0, 0, 89, 342, 1, 0, 0, 0, 91, 358, 1, 0, 0, 0, 93, 360, 1, 0, 0, 0, 95, 365, 1, 0, 0, 0, 97, 367, 1, 0, 0, 0, 99, 372, 1, 0, 0, 0, 101, 374, 1, 0, 0, 0, 103, 382, 1, 0, 0, 0, 105, 388, 1, 0, 0, 0, 107, 399, 1, 0, 0, 0, 109, 110, 5, 43, 0, 0, 110, 111, 5, 43, 0, 0, 111, 2, 1, 0, 0, 0, 112, 113, 5, 45, 0, 0, 113, 114, 5, 45, 0, 0, 114, 4, 1, 0, 0, 0, 115, 116, 5, 118, 0, 0, 116, 117, 5, 111, 0, 0, 117, 118, 5, 105, 0, 0, 118, 119, 5, 100, 0, 0, 119, 6, 1, 0, 0, 0, 120, 121, 5, 98, 0, 0, 121, 122, 5, 111, 0, 0, 122, 123, 5, 111, 0, 0, 123, 124, 5, 108, 0, 0, 124, 125, 5, 101, 0, 0, 125, 126, 5, 97, 0, 0, 126, 127, 5, 110, 0, 0, 127, 8, 1, 0, 0, 0, 128, 129, 5, 99, 0, 0, 129, 130, 5, 104, 0, 0, 130, 131, 5, 97, 0, 0, 131, 132, 5, 114, 0, 0, 132, 10, 1, 0, 0, 0, 133, 134, 5, 105, 0, 0, 134, 135, 5, 110, 0, 0, 135, 136, 5, 116, 0, 0, 136, 12, 1, 0, 0, 0, 137, 138, 5, 112, 0, 0, 138, 139, 5, 117, 0, 0, 139, 140, 5, 98, 0, 0, 140, 141, 5, 108, 0, 0, 141, 142, 5, 105, 0, 0, 142, 178, 5, 99, 0, 0, 143, 144, 5, 112, 0, 0, 144, 145, 5, 114, 0, 0, 145, 146, 5, 105, 0, 0, 146, 147, 5, 118, 0, 0, 147, 148, 5, 97, 0, 0, 148, 149, 5, 116, 0, 0, 149, 178, 5, 101, 0, 0, 150, 151, 5, 112, 0, 0, 151, 152, 5, 117, 0, 0, 152, 153, 5, 98, 0, 0, 153, 154, 5, 108, 0, 0, 154, 155, 5, 105, 0, 0, 155, 156, 5, 99, 0, 0, 156, 157, 5, 32, 0, 0, 157, 158, 5, 115, 0, 0, 158, 159, 5, 116, 0, 0, 159, 160, 5, 97, 0, 0, 160, 161, 5, 116, 0, 0, 161, 162, 5, 105, 0, 0, 162, 178, 5, 99, 0, 0, 163, 164, 5, 112, 0, 0, 164, 165, 5, 114, 0, 0, 165, 166, 5, 105, 0, 0, 166, 167, 5, 118, 0, 0, 167, 168, 5, 97, 0, 0, 168, 169, 5, 116, 0, 0, 169, 170, 5, 101, 0, 0, 170, 171, 5, 32, 0, 0, 171, 172, 5, 115, 0, 0, 172, 173, 5, 116, 0, 0, 173, 174, 5, 97, 0, 0, 174, 175, 5, 116, 0, 0, 175, 176, 5, 105, 0, 0, 176, 178, 5, 99, 0, 0, 177, 137, 1, 0, 0, 0, 177, 143, 1, 0, 0, 0, 177, 150, 1, 0, 0, 0, 177, 163, 1, 0, 0, 0, 178, 14, 1, 0, 0, 0, 179, 180, 5, 112, 0, 0, 180, 181, 5, 117, 0, 0, 181, 182, 5, 98, 0, 0, 182, 183, 5, 108, 0, 0, 183, 184, 5, 105, 0, 0, 184, 185, 5, 99, 0, 0, 185, 186, 5, 32, 0, 0, 186, 187, 5, 115, 0, 0, 187, 188, 5, 116, 0, 0, 188, 189, 5, 97, 0, 0, 189, 190, 5, 116, 0, 0, 190, 191, 5, 105, 0, 0, 191, 192, 5, 99, 0, 0, 192, 193, 5, 32, 0, 0, 193, 194, 5, 118, 0, 0, 194, 195, 5, 111, 0, 0, 195, 196, 5, 105, 0, 0, 196, 197, 5, 100, 0, 0, 197, 198, 5, 32, 0, 0, 198, 199, 5, 109, 0, 0, 199, 200, 5, 97, 0, 0, 200, 201, 5, 105, 0, 0, 201, 202, 5, 110, 0, 0, 202, 203, 5, 40, 0, 0, 203, 204, 5, 83, 0, 0, 204, 205, 5, 116, 0, 0, 205, 206, 5, 114, 0, 0, 206, 207, 5, 105, 0, 0, 207, 208, 5, 110, 0, 0, 208, 209, 5, 103, 0, 0, 209, 210, 5, 91, 0, 0, 210, 211, 5, 93, 0, 0, 211, 212, 5, 32, 0, 0, 212, 213, 5, 97, 0, 0, 213, 214, 5, 114, 0, 0, 214, 215, 5, 103, 0, 0, 215, 216, 5, 115, 0, 0, 216, 217, 5, 41, 0, 0, 217, 16, 1, 0, 0, 0, 218, 222, 3, 31, 15, 0, 219, 222, 3, 35, 17, 0, 220, 222, 3, 33, 16, 0, 221, 218, 1, 0, 0, 0, 221, 219, 1, 0, 0, 0, 221, 220, 1, 0, 0, 0, 222, 18, 1, 0, 0, 0, 223, 226, 3, 27, 13, 0, 224, 226, 3, 29, 14, 0, 225, 223, 1, 0, 0, 0, 225, 224, 1, 0, 0, 0, 226, 20, 1, 0, 0, 0, 227, 234, 3, 37, 18, 0, 228, 234, 3, 39, 19, 0, 229, 234, 3, 41, 20, 0, 230, 234, 3, 43, 21, 0, 231, 234, 3, 45, 22, 0, 232, 234, 3, 47, 23, 0, 233, 227, 1, 0, 0, 0, 233, 228, 1, 0, 0, 0, 233, 229, 1, 0, 0, 0, 233, 230, 1, 0, 0, 0, 233, 231, 1, 0, 0, 0, 233, 232, 1, 0, 0, 0, 234, 22, 1, 0, 0, 0, 235, 238, 3, 51, 25, 0, 236, 238, 3, 53, 26, 0, 237, 235, 1, 0, 0, 0, 237, 236, 1, 0, 0, 0, 238, 24, 1, 0, 0, 0, 239, 240, 5, 61, 0, 0, 240, 26, 1, 0, 0, 0, 241, 242, 5, 43, 0, 0, 242, 28, 1, 0, 0, 0, 243, 244, 5, 45, 0, 0, 244, 30, 1, 0, 0, 0, 245, 246, 5, 42, 0, 0, 246, 32, 1, 0, 0, 0, 247, 248, 5, 37, 0, 0, 248, 34, 1, 0, 0, 0, 249, 250, 5, 47, 0, 0, 250, 36, 1, 0, 0, 0, 251, 252, 5, 62, 0, 0, 252, 38, 1, 0, 0, 0, 253, 254, 5, 60, 0, 0, 254, 40, 1, 0, 0, 0, 255, 256, 5, 62, 0, 0, 256, 257, 5, 61, 0, 0, 257, 42, 1, 0, 0, 0, 258, 259, 5, 60, 0, 0, 259, 260, 5, 61, 0, 0, 260, 44, 1, 0, 0, 0, 261, 262, 5, 61, 0, 0, 262, 263, 5, 61, 0, 0, 263, 46, 1, 0, 0, 0, 264, 265, 5, 33, 0, 0, 265, 266, 5, 61, 0, 0, 266, 48, 1, 0, 0, 0, 267, 268, 5, 33, 0, 0, 268, 50, 1, 0, 0, 0, 269, 270, 5, 38, 0, 0, 270, 271, 5, 38, 0, 0, 271, 52, 1, 0, 0, 0, 272, 273, 5, 124, 0, 0, 273, 274, 5, 124, 0, 0, 274, 54, 1, 0, 0, 0, 275, 276, 5, 46, 0, 0, 276, 56, 1, 0, 0, 0, 277, 278, 5, 40, 0, 0, 278, 58, 1, 0, 0, 0, 279, 280, 5, 41, 0, 0, 280, 60, 1, 0, 0, 0, 281, 282, 5, 123, 0, 0, 282, 62, 1, 0, 0, 0, 283, 284, 5, 125, 0, 0, 284, 64, 1, 0, 0, 0, 285, 286, 5, 59, 0, 0, 286, 66, 1, 0, 0, 0, 287, 288, 5, 44, 0, 0, 288, 68, 1, 0, 0, 0, 289, 290, 5, 99, 0, 0, 290, 291, 5, 108, 0, 0, 291, 292, 5, 97, 0, 0, 292, 293, 5, 115, 0, 0, 293, 294, 5, 115, 0, 0, 294, 70, 1, 0, 0, 0, 295, 296, 5, 116, 0, 0, 296, 297, 5, 104, 0, 0, 297, 298, 5, 105, 0, 0, 298, 299, 5, 115, 0, 0, 299, 72, 1, 0, 0, 0, 300, 301, 5, 119, 0, 0, 301, 302, 5, 104, 0, 0, 302, 303, 5, 105, 0, 0, 303, 304, 5, 108, 0, 0, 304, 305, 5, 101, 0, 0, 305, 74, 1, 0, 0, 0, 306, 307, 5, 100, 0, 0, 307, 308, 5, 111, 0, 0, 308, 76, 1, 0, 0, 0, 309, 310, 5, 105, 0, 0, 310, 311, 5, 102, 0, 0, 311, 78, 1, 0, 0, 0, 312, 313, 5, 101, 0, 0, 313, 314, 5, 108, 0, 0, 314, 315, 5, 115, 0, 0, 315, 316, 5, 101, 0, 0, 316, 80, 1, 0, 0, 0, 317, 318, 5, 102, 0, 0, 318, 319, 5, 111, 0, 0, 319, 320, 5, 114, 0, 0, 320, 82, 1, 0, 0, 0, 321, 322, 5, 114, 0, 0, 322, 323, 5, 101, 0, 0, 323, 324, 5, 116, 0, 0, 324, 325, 5, 117, 0, 0, 325, 326, 5, 114, 0, 0, 326, 327, 5, 110, 0, 0, 327, 84, 1, 0, 0, 0, 328, 329, 5, 110, 0, 0, 329, 330, 5, 101, 0, 0, 330, 331, 5, 119, 0, 0, 331, 86, 1, 0, 0, 0, 332, 336, 5, 39, 0, 0, 333, 335, 8, 0, 0, 0, 334, 333, 1, 0, 0, 0, 335, 338, 1, 0, 0, 0, 336, 334, 1, 0, 0, 0, 336, 337, 1, 0, 0, 0, 337, 339, 1, 0, 0, 0, 338, 336, 1, 0, 0, 0, 339, 340, 5, 39, 0, 0, 340, 88, 1, 0, 0, 0, 341, 343, 3, 29, 14, 0, 342, 341, 1, 0, 0, 0, 342, 343, 1, 0, 0, 0, 343, 345, 1, 0, 0, 0, 344, 346, 3, 97, 48, 0, 345, 344, 1, 0, 0, 0, 346, 347, 1, 0, 0, 0, 347, 345, 1, 0, 0, 0, 347, 348, 1, 0, 0, 0, 348, 90, 1, 0, 0, 0, 349, 350, 5, 116, 0, 0, 350, 351, 5, 114, 0, 0, 351, 352, 5, 117, 0, 0, 352, 359, 5, 101, 0, 0, 353, 354, 5, 102, 0, 0, 354, 355, 5, 97, 0, 0, 355, 356, 5, 108, 0, 0, 356, 357, 5, 115, 0, 0, 357, 359, 5, 101, 0, 0, 358, 349, 1, 0, 0, 0, 358, 353, 1, 0, 0, 0, 359, 92, 1, 0, 0, 0, 360, 361, 5, 110, 0, 0, 361, 362, 5, 117, 0, 0, 362, 363, 5, 108, 0, 0, 363, 364, 5, 108, 0, 0, 364, 94, 1, 0, 0, 0, 365, 366, 7, 1, 0, 0, 366, 96, 1, 0, 0, 0, 367, 368, 7, 2, 0, 0, 368, 98, 1, 0, 0, 0, 369, 373, 3, 95, 47, 0, 370, 373, 3, 97, 48, 0, 371, 373, 7, 3, 0, 0, 372, 369, 1, 0, 0, 0, 372, 370, 1, 0, 0, 0, 372, 371, 1, 0, 0, 0, 373, 100, 1, 0, 0, 0, 374, 378, 3, 95, 47, 0, 375, 377, 3, 99, 49, 0, 376, 375, 1, 0, 0, 0, 377, 380, 1, 0, 0, 0, 378, 376, 1, 0, 0, 0, 378, 379, 1, 0, 0, 0, 379, 102, 1, 0, 0, 0, 380, 378, 1, 0, 0, 0, 381, 383, 7, 4, 0, 0, 382, 381, 1, 0, 0, 0, 383, 384, 1, 0, 0, 0, 384, 382, 1, 0, 0, 0, 384, 385, 1, 0, 0, 0, 385, 386, 1, 0, 0, 0, 386, 387, 6, 51, 0, 0, 387, 104, 1, 0, 0, 0, 388, 389, 5, 47, 0, 0, 389, 390, 5, 47, 0, 0, 390, 394, 1, 0, 0, 0, 391, 393, 8, 0, 0, 0, 392, 391, 1, 0, 0, 0, 393, 396, 1, 0, 0, 0, 394, 392, 1, 0, 0, 0, 394, 395, 1, 0, 0, 0, 395, 397, 1, 0, 0, 0, 396, 394, 1, 0, 0, 0, 397, 398, 6, 52, 0, 0, 398, 106, 1, 0, 0, 0, 399, 400, 5, 47, 0, 0, 400, 401, 5, 42, 0, 0, 401, 405, 1, 0, 0, 0, 402, 404, 9, 0, 0, 0, 403, 402, 1, 0, 0, 0, 404, 407, 1, 0, 0, 0, 405, 406, 1, 0, 0, 0, 405, 403, 1, 0, 0, 0, 406, 408, 1, 0, 0, 0, 407, 405, 1, 0, 0, 0, 408, 409, 5, 42, 0, 0, 409, 410, 5, 47, 0, 0, 410, 411, 1, 0, 0, 0, 411, 412, 6, 53, 0, 0, 412, 108, 1, 0, 0, 0, 15, 0, 177, 221, 225, 233, 237, 336, 342, 347, 358, 372, 378, 384, 394, 405, 1, 6, 0, 0]
\ No newline at end of file
diff --git a/src/main/java/parser/generated/SimpleJavaLexer.java b/src/main/java/parser/generated/SimpleJavaLexer.java
deleted file mode 100644
index 23296ee..0000000
--- a/src/main/java/parser/generated/SimpleJavaLexer.java
+++ /dev/null
@@ -1,397 +0,0 @@
-// Generated from C:/Users/janni/Desktop/NichtHaskell2.0/src/main/java/parser/grammar/SimpleJava.g4 by ANTLR 4.13.1
-package parser.generated;
-import org.antlr.v4.runtime.Lexer;
-import org.antlr.v4.runtime.CharStream;
-import org.antlr.v4.runtime.Token;
-import org.antlr.v4.runtime.TokenStream;
-import org.antlr.v4.runtime.*;
-import org.antlr.v4.runtime.atn.*;
-import org.antlr.v4.runtime.dfa.DFA;
-import org.antlr.v4.runtime.misc.*;
-
-@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast", "CheckReturnValue", "this-escape"})
-public class SimpleJavaLexer extends Lexer {
- static { RuntimeMetaData.checkVersion("4.13.1", RuntimeMetaData.VERSION); }
-
- protected static final DFA[] _decisionToDFA;
- protected static final PredictionContextCache _sharedContextCache =
- new PredictionContextCache();
- public static final int
- T__0=1, T__1=2, Void=3, Boolean=4, Char=5, Int=6, AccessModifier=7, MainMethodDeclaration=8,
- DotOperator=9, LineOperator=10, ComparisonOperator=11, LogicalOperator=12,
- Assign=13, Plus=14, Minus=15, Mult=16, Modulo=17, Div=18, Greater=19,
- Less=20, GreaterEqual=21, LessEqual=22, Equal=23, NotEqual=24, Not=25,
- And=26, Or=27, Dot=28, OpenRoundBracket=29, ClosedRoundBracket=30, OpenCurlyBracket=31,
- ClosedCurlyBracket=32, Semicolon=33, Comma=34, Class=35, This=36, While=37,
- Do=38, If=39, Else=40, For=41, Return=42, New=43, CharValue=44, IntValue=45,
- BooleanValue=46, NullValue=47, Identifier=48, WS=49, InlineComment=50,
- MultilineComment=51;
- public static String[] channelNames = {
- "DEFAULT_TOKEN_CHANNEL", "HIDDEN"
- };
-
- public static String[] modeNames = {
- "DEFAULT_MODE"
- };
-
- private static String[] makeRuleNames() {
- return new String[] {
- "T__0", "T__1", "Void", "Boolean", "Char", "Int", "AccessModifier", "MainMethodDeclaration",
- "DotOperator", "LineOperator", "ComparisonOperator", "LogicalOperator",
- "Assign", "Plus", "Minus", "Mult", "Modulo", "Div", "Greater", "Less",
- "GreaterEqual", "LessEqual", "Equal", "NotEqual", "Not", "And", "Or",
- "Dot", "OpenRoundBracket", "ClosedRoundBracket", "OpenCurlyBracket",
- "ClosedCurlyBracket", "Semicolon", "Comma", "Class", "This", "While",
- "Do", "If", "Else", "For", "Return", "New", "CharValue", "IntValue",
- "BooleanValue", "NullValue", "Alphabetic", "Numeric", "ValidIdentSymbols",
- "Identifier", "WS", "InlineComment", "MultilineComment"
- };
- }
- public static final String[] ruleNames = makeRuleNames();
-
- private static String[] makeLiteralNames() {
- return new String[] {
- null, "'++'", "'--'", "'void'", "'boolean'", "'char'", "'int'", null,
- "'public static void main(String[] args)'", null, null, null, null, "'='",
- "'+'", "'-'", "'*'", "'%'", "'/'", "'>'", "'<'", "'>='", "'<='", "'=='",
- "'!='", "'!'", "'&&'", "'||'", "'.'", "'('", "')'", "'{'", "'}'", "';'",
- "','", "'class'", "'this'", "'while'", "'do'", "'if'", "'else'", "'for'",
- "'return'", "'new'", null, null, null, "'null'"
- };
- }
- private static final String[] _LITERAL_NAMES = makeLiteralNames();
- private static String[] makeSymbolicNames() {
- return new String[] {
- null, null, null, "Void", "Boolean", "Char", "Int", "AccessModifier",
- "MainMethodDeclaration", "DotOperator", "LineOperator", "ComparisonOperator",
- "LogicalOperator", "Assign", "Plus", "Minus", "Mult", "Modulo", "Div",
- "Greater", "Less", "GreaterEqual", "LessEqual", "Equal", "NotEqual",
- "Not", "And", "Or", "Dot", "OpenRoundBracket", "ClosedRoundBracket",
- "OpenCurlyBracket", "ClosedCurlyBracket", "Semicolon", "Comma", "Class",
- "This", "While", "Do", "If", "Else", "For", "Return", "New", "CharValue",
- "IntValue", "BooleanValue", "NullValue", "Identifier", "WS", "InlineComment",
- "MultilineComment"
- };
- }
- private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames();
- public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
-
- /**
- * @deprecated Use {@link #VOCABULARY} instead.
- */
- @Deprecated
- public static final String[] tokenNames;
- static {
- tokenNames = new String[_SYMBOLIC_NAMES.length];
- for (int i = 0; i < tokenNames.length; i++) {
- tokenNames[i] = VOCABULARY.getLiteralName(i);
- if (tokenNames[i] == null) {
- tokenNames[i] = VOCABULARY.getSymbolicName(i);
- }
-
- if (tokenNames[i] == null) {
- tokenNames[i] = "";
- }
- }
- }
-
- @Override
- @Deprecated
- public String[] getTokenNames() {
- return tokenNames;
- }
-
- @Override
-
- public Vocabulary getVocabulary() {
- return VOCABULARY;
- }
-
-
- public SimpleJavaLexer(CharStream input) {
- super(input);
- _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
- }
-
- @Override
- public String getGrammarFileName() { return "SimpleJava.g4"; }
-
- @Override
- public String[] getRuleNames() { return ruleNames; }
-
- @Override
- public String getSerializedATN() { return _serializedATN; }
-
- @Override
- public String[] getChannelNames() { return channelNames; }
-
- @Override
- public String[] getModeNames() { return modeNames; }
-
- @Override
- public ATN getATN() { return _ATN; }
-
- public static final String _serializedATN =
- "\u0004\u00003\u019d\u0006\uffff\uffff\u0002\u0000\u0007\u0000\u0002\u0001"+
- "\u0007\u0001\u0002\u0002\u0007\u0002\u0002\u0003\u0007\u0003\u0002\u0004"+
- "\u0007\u0004\u0002\u0005\u0007\u0005\u0002\u0006\u0007\u0006\u0002\u0007"+
- "\u0007\u0007\u0002\b\u0007\b\u0002\t\u0007\t\u0002\n\u0007\n\u0002\u000b"+
- "\u0007\u000b\u0002\f\u0007\f\u0002\r\u0007\r\u0002\u000e\u0007\u000e\u0002"+
- "\u000f\u0007\u000f\u0002\u0010\u0007\u0010\u0002\u0011\u0007\u0011\u0002"+
- "\u0012\u0007\u0012\u0002\u0013\u0007\u0013\u0002\u0014\u0007\u0014\u0002"+
- "\u0015\u0007\u0015\u0002\u0016\u0007\u0016\u0002\u0017\u0007\u0017\u0002"+
- "\u0018\u0007\u0018\u0002\u0019\u0007\u0019\u0002\u001a\u0007\u001a\u0002"+
- "\u001b\u0007\u001b\u0002\u001c\u0007\u001c\u0002\u001d\u0007\u001d\u0002"+
- "\u001e\u0007\u001e\u0002\u001f\u0007\u001f\u0002 \u0007 \u0002!\u0007"+
- "!\u0002\"\u0007\"\u0002#\u0007#\u0002$\u0007$\u0002%\u0007%\u0002&\u0007"+
- "&\u0002\'\u0007\'\u0002(\u0007(\u0002)\u0007)\u0002*\u0007*\u0002+\u0007"+
- "+\u0002,\u0007,\u0002-\u0007-\u0002.\u0007.\u0002/\u0007/\u00020\u0007"+
- "0\u00021\u00071\u00022\u00072\u00023\u00073\u00024\u00074\u00025\u0007"+
- "5\u0001\u0000\u0001\u0000\u0001\u0000\u0001\u0001\u0001\u0001\u0001\u0001"+
- "\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0003"+
- "\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003"+
- "\u0001\u0003\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004"+
- "\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0006\u0001\u0006"+
- "\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006"+
- "\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006"+
- "\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006"+
- "\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006"+
- "\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006"+
- "\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006"+
- "\u0001\u0006\u0001\u0006\u0003\u0006\u00b2\b\u0006\u0001\u0007\u0001\u0007"+
- "\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007"+
- "\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007"+
- "\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007"+
- "\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007"+
- "\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007"+
- "\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007"+
- "\u0001\u0007\u0001\b\u0001\b\u0001\b\u0003\b\u00de\b\b\u0001\t\u0001\t"+
- "\u0003\t\u00e2\b\t\u0001\n\u0001\n\u0001\n\u0001\n\u0001\n\u0001\n\u0003"+
- "\n\u00ea\b\n\u0001\u000b\u0001\u000b\u0003\u000b\u00ee\b\u000b\u0001\f"+
- "\u0001\f\u0001\r\u0001\r\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\u0014\u0001\u0015"+
- "\u0001\u0015\u0001\u0015\u0001\u0016\u0001\u0016\u0001\u0016\u0001\u0017"+
- "\u0001\u0017\u0001\u0017\u0001\u0018\u0001\u0018\u0001\u0019\u0001\u0019"+
- "\u0001\u0019\u0001\u001a\u0001\u001a\u0001\u001a\u0001\u001b\u0001\u001b"+
- "\u0001\u001c\u0001\u001c\u0001\u001d\u0001\u001d\u0001\u001e\u0001\u001e"+
- "\u0001\u001f\u0001\u001f\u0001 \u0001 \u0001!\u0001!\u0001\"\u0001\"\u0001"+
- "\"\u0001\"\u0001\"\u0001\"\u0001#\u0001#\u0001#\u0001#\u0001#\u0001$\u0001"+
- "$\u0001$\u0001$\u0001$\u0001$\u0001%\u0001%\u0001%\u0001&\u0001&\u0001"+
- "&\u0001\'\u0001\'\u0001\'\u0001\'\u0001\'\u0001(\u0001(\u0001(\u0001("+
- "\u0001)\u0001)\u0001)\u0001)\u0001)\u0001)\u0001)\u0001*\u0001*\u0001"+
- "*\u0001*\u0001+\u0001+\u0005+\u014f\b+\n+\f+\u0152\t+\u0001+\u0001+\u0001"+
- ",\u0003,\u0157\b,\u0001,\u0004,\u015a\b,\u000b,\f,\u015b\u0001-\u0001"+
- "-\u0001-\u0001-\u0001-\u0001-\u0001-\u0001-\u0001-\u0003-\u0167\b-\u0001"+
- ".\u0001.\u0001.\u0001.\u0001.\u0001/\u0001/\u00010\u00010\u00011\u0001"+
- "1\u00011\u00031\u0175\b1\u00012\u00012\u00052\u0179\b2\n2\f2\u017c\t2"+
- "\u00013\u00043\u017f\b3\u000b3\f3\u0180\u00013\u00013\u00014\u00014\u0001"+
- "4\u00014\u00054\u0189\b4\n4\f4\u018c\t4\u00014\u00014\u00015\u00015\u0001"+
- "5\u00015\u00055\u0194\b5\n5\f5\u0197\t5\u00015\u00015\u00015\u00015\u0001"+
- "5\u0001\u0195\u00006\u0001\u0001\u0003\u0002\u0005\u0003\u0007\u0004\t"+
- "\u0005\u000b\u0006\r\u0007\u000f\b\u0011\t\u0013\n\u0015\u000b\u0017\f"+
- "\u0019\r\u001b\u000e\u001d\u000f\u001f\u0010!\u0011#\u0012%\u0013\'\u0014"+
- ")\u0015+\u0016-\u0017/\u00181\u00193\u001a5\u001b7\u001c9\u001d;\u001e"+
- "=\u001f? A!C\"E#G$I%K&M\'O(Q)S*U+W,Y-[.]/_\u0000a\u0000c\u0000e0g1i2k"+
- "3\u0001\u0000\u0005\u0002\u0000\n\n\r\r\u0002\u0000AZaz\u0001\u000009"+
- "\u0002\u0000$$__\u0003\u0000\t\n\r\r \u01af\u0000\u0001\u0001\u0000\u0000"+
- "\u0000\u0000\u0003\u0001\u0000\u0000\u0000\u0000\u0005\u0001\u0000\u0000"+
- "\u0000\u0000\u0007\u0001\u0000\u0000\u0000\u0000\t\u0001\u0000\u0000\u0000"+
- "\u0000\u000b\u0001\u0000\u0000\u0000\u0000\r\u0001\u0000\u0000\u0000\u0000"+
- "\u000f\u0001\u0000\u0000\u0000\u0000\u0011\u0001\u0000\u0000\u0000\u0000"+
- "\u0013\u0001\u0000\u0000\u0000\u0000\u0015\u0001\u0000\u0000\u0000\u0000"+
- "\u0017\u0001\u0000\u0000\u0000\u0000\u0019\u0001\u0000\u0000\u0000\u0000"+
- "\u001b\u0001\u0000\u0000\u0000\u0000\u001d\u0001\u0000\u0000\u0000\u0000"+
- "\u001f\u0001\u0000\u0000\u0000\u0000!\u0001\u0000\u0000\u0000\u0000#\u0001"+
- "\u0000\u0000\u0000\u0000%\u0001\u0000\u0000\u0000\u0000\'\u0001\u0000"+
- "\u0000\u0000\u0000)\u0001\u0000\u0000\u0000\u0000+\u0001\u0000\u0000\u0000"+
- "\u0000-\u0001\u0000\u0000\u0000\u0000/\u0001\u0000\u0000\u0000\u00001"+
- "\u0001\u0000\u0000\u0000\u00003\u0001\u0000\u0000\u0000\u00005\u0001\u0000"+
- "\u0000\u0000\u00007\u0001\u0000\u0000\u0000\u00009\u0001\u0000\u0000\u0000"+
- "\u0000;\u0001\u0000\u0000\u0000\u0000=\u0001\u0000\u0000\u0000\u0000?"+
- "\u0001\u0000\u0000\u0000\u0000A\u0001\u0000\u0000\u0000\u0000C\u0001\u0000"+
- "\u0000\u0000\u0000E\u0001\u0000\u0000\u0000\u0000G\u0001\u0000\u0000\u0000"+
- "\u0000I\u0001\u0000\u0000\u0000\u0000K\u0001\u0000\u0000\u0000\u0000M"+
- "\u0001\u0000\u0000\u0000\u0000O\u0001\u0000\u0000\u0000\u0000Q\u0001\u0000"+
- "\u0000\u0000\u0000S\u0001\u0000\u0000\u0000\u0000U\u0001\u0000\u0000\u0000"+
- "\u0000W\u0001\u0000\u0000\u0000\u0000Y\u0001\u0000\u0000\u0000\u0000["+
- "\u0001\u0000\u0000\u0000\u0000]\u0001\u0000\u0000\u0000\u0000e\u0001\u0000"+
- "\u0000\u0000\u0000g\u0001\u0000\u0000\u0000\u0000i\u0001\u0000\u0000\u0000"+
- "\u0000k\u0001\u0000\u0000\u0000\u0001m\u0001\u0000\u0000\u0000\u0003p"+
- "\u0001\u0000\u0000\u0000\u0005s\u0001\u0000\u0000\u0000\u0007x\u0001\u0000"+
- "\u0000\u0000\t\u0080\u0001\u0000\u0000\u0000\u000b\u0085\u0001\u0000\u0000"+
- "\u0000\r\u00b1\u0001\u0000\u0000\u0000\u000f\u00b3\u0001\u0000\u0000\u0000"+
- "\u0011\u00dd\u0001\u0000\u0000\u0000\u0013\u00e1\u0001\u0000\u0000\u0000"+
- "\u0015\u00e9\u0001\u0000\u0000\u0000\u0017\u00ed\u0001\u0000\u0000\u0000"+
- "\u0019\u00ef\u0001\u0000\u0000\u0000\u001b\u00f1\u0001\u0000\u0000\u0000"+
- "\u001d\u00f3\u0001\u0000\u0000\u0000\u001f\u00f5\u0001\u0000\u0000\u0000"+
- "!\u00f7\u0001\u0000\u0000\u0000#\u00f9\u0001\u0000\u0000\u0000%\u00fb"+
- "\u0001\u0000\u0000\u0000\'\u00fd\u0001\u0000\u0000\u0000)\u00ff\u0001"+
- "\u0000\u0000\u0000+\u0102\u0001\u0000\u0000\u0000-\u0105\u0001\u0000\u0000"+
- "\u0000/\u0108\u0001\u0000\u0000\u00001\u010b\u0001\u0000\u0000\u00003"+
- "\u010d\u0001\u0000\u0000\u00005\u0110\u0001\u0000\u0000\u00007\u0113\u0001"+
- "\u0000\u0000\u00009\u0115\u0001\u0000\u0000\u0000;\u0117\u0001\u0000\u0000"+
- "\u0000=\u0119\u0001\u0000\u0000\u0000?\u011b\u0001\u0000\u0000\u0000A"+
- "\u011d\u0001\u0000\u0000\u0000C\u011f\u0001\u0000\u0000\u0000E\u0121\u0001"+
- "\u0000\u0000\u0000G\u0127\u0001\u0000\u0000\u0000I\u012c\u0001\u0000\u0000"+
- "\u0000K\u0132\u0001\u0000\u0000\u0000M\u0135\u0001\u0000\u0000\u0000O"+
- "\u0138\u0001\u0000\u0000\u0000Q\u013d\u0001\u0000\u0000\u0000S\u0141\u0001"+
- "\u0000\u0000\u0000U\u0148\u0001\u0000\u0000\u0000W\u014c\u0001\u0000\u0000"+
- "\u0000Y\u0156\u0001\u0000\u0000\u0000[\u0166\u0001\u0000\u0000\u0000]"+
- "\u0168\u0001\u0000\u0000\u0000_\u016d\u0001\u0000\u0000\u0000a\u016f\u0001"+
- "\u0000\u0000\u0000c\u0174\u0001\u0000\u0000\u0000e\u0176\u0001\u0000\u0000"+
- "\u0000g\u017e\u0001\u0000\u0000\u0000i\u0184\u0001\u0000\u0000\u0000k"+
- "\u018f\u0001\u0000\u0000\u0000mn\u0005+\u0000\u0000no\u0005+\u0000\u0000"+
- "o\u0002\u0001\u0000\u0000\u0000pq\u0005-\u0000\u0000qr\u0005-\u0000\u0000"+
- "r\u0004\u0001\u0000\u0000\u0000st\u0005v\u0000\u0000tu\u0005o\u0000\u0000"+
- "uv\u0005i\u0000\u0000vw\u0005d\u0000\u0000w\u0006\u0001\u0000\u0000\u0000"+
- "xy\u0005b\u0000\u0000yz\u0005o\u0000\u0000z{\u0005o\u0000\u0000{|\u0005"+
- "l\u0000\u0000|}\u0005e\u0000\u0000}~\u0005a\u0000\u0000~\u007f\u0005n"+
- "\u0000\u0000\u007f\b\u0001\u0000\u0000\u0000\u0080\u0081\u0005c\u0000"+
- "\u0000\u0081\u0082\u0005h\u0000\u0000\u0082\u0083\u0005a\u0000\u0000\u0083"+
- "\u0084\u0005r\u0000\u0000\u0084\n\u0001\u0000\u0000\u0000\u0085\u0086"+
- "\u0005i\u0000\u0000\u0086\u0087\u0005n\u0000\u0000\u0087\u0088\u0005t"+
- "\u0000\u0000\u0088\f\u0001\u0000\u0000\u0000\u0089\u008a\u0005p\u0000"+
- "\u0000\u008a\u008b\u0005u\u0000\u0000\u008b\u008c\u0005b\u0000\u0000\u008c"+
- "\u008d\u0005l\u0000\u0000\u008d\u008e\u0005i\u0000\u0000\u008e\u00b2\u0005"+
- "c\u0000\u0000\u008f\u0090\u0005p\u0000\u0000\u0090\u0091\u0005r\u0000"+
- "\u0000\u0091\u0092\u0005i\u0000\u0000\u0092\u0093\u0005v\u0000\u0000\u0093"+
- "\u0094\u0005a\u0000\u0000\u0094\u0095\u0005t\u0000\u0000\u0095\u00b2\u0005"+
- "e\u0000\u0000\u0096\u0097\u0005p\u0000\u0000\u0097\u0098\u0005u\u0000"+
- "\u0000\u0098\u0099\u0005b\u0000\u0000\u0099\u009a\u0005l\u0000\u0000\u009a"+
- "\u009b\u0005i\u0000\u0000\u009b\u009c\u0005c\u0000\u0000\u009c\u009d\u0005"+
- " \u0000\u0000\u009d\u009e\u0005s\u0000\u0000\u009e\u009f\u0005t\u0000"+
- "\u0000\u009f\u00a0\u0005a\u0000\u0000\u00a0\u00a1\u0005t\u0000\u0000\u00a1"+
- "\u00a2\u0005i\u0000\u0000\u00a2\u00b2\u0005c\u0000\u0000\u00a3\u00a4\u0005"+
- "p\u0000\u0000\u00a4\u00a5\u0005r\u0000\u0000\u00a5\u00a6\u0005i\u0000"+
- "\u0000\u00a6\u00a7\u0005v\u0000\u0000\u00a7\u00a8\u0005a\u0000\u0000\u00a8"+
- "\u00a9\u0005t\u0000\u0000\u00a9\u00aa\u0005e\u0000\u0000\u00aa\u00ab\u0005"+
- " \u0000\u0000\u00ab\u00ac\u0005s\u0000\u0000\u00ac\u00ad\u0005t\u0000"+
- "\u0000\u00ad\u00ae\u0005a\u0000\u0000\u00ae\u00af\u0005t\u0000\u0000\u00af"+
- "\u00b0\u0005i\u0000\u0000\u00b0\u00b2\u0005c\u0000\u0000\u00b1\u0089\u0001"+
- "\u0000\u0000\u0000\u00b1\u008f\u0001\u0000\u0000\u0000\u00b1\u0096\u0001"+
- "\u0000\u0000\u0000\u00b1\u00a3\u0001\u0000\u0000\u0000\u00b2\u000e\u0001"+
- "\u0000\u0000\u0000\u00b3\u00b4\u0005p\u0000\u0000\u00b4\u00b5\u0005u\u0000"+
- "\u0000\u00b5\u00b6\u0005b\u0000\u0000\u00b6\u00b7\u0005l\u0000\u0000\u00b7"+
- "\u00b8\u0005i\u0000\u0000\u00b8\u00b9\u0005c\u0000\u0000\u00b9\u00ba\u0005"+
- " \u0000\u0000\u00ba\u00bb\u0005s\u0000\u0000\u00bb\u00bc\u0005t\u0000"+
- "\u0000\u00bc\u00bd\u0005a\u0000\u0000\u00bd\u00be\u0005t\u0000\u0000\u00be"+
- "\u00bf\u0005i\u0000\u0000\u00bf\u00c0\u0005c\u0000\u0000\u00c0\u00c1\u0005"+
- " \u0000\u0000\u00c1\u00c2\u0005v\u0000\u0000\u00c2\u00c3\u0005o\u0000"+
- "\u0000\u00c3\u00c4\u0005i\u0000\u0000\u00c4\u00c5\u0005d\u0000\u0000\u00c5"+
- "\u00c6\u0005 \u0000\u0000\u00c6\u00c7\u0005m\u0000\u0000\u00c7\u00c8\u0005"+
- "a\u0000\u0000\u00c8\u00c9\u0005i\u0000\u0000\u00c9\u00ca\u0005n\u0000"+
- "\u0000\u00ca\u00cb\u0005(\u0000\u0000\u00cb\u00cc\u0005S\u0000\u0000\u00cc"+
- "\u00cd\u0005t\u0000\u0000\u00cd\u00ce\u0005r\u0000\u0000\u00ce\u00cf\u0005"+
- "i\u0000\u0000\u00cf\u00d0\u0005n\u0000\u0000\u00d0\u00d1\u0005g\u0000"+
- "\u0000\u00d1\u00d2\u0005[\u0000\u0000\u00d2\u00d3\u0005]\u0000\u0000\u00d3"+
- "\u00d4\u0005 \u0000\u0000\u00d4\u00d5\u0005a\u0000\u0000\u00d5\u00d6\u0005"+
- "r\u0000\u0000\u00d6\u00d7\u0005g\u0000\u0000\u00d7\u00d8\u0005s\u0000"+
- "\u0000\u00d8\u00d9\u0005)\u0000\u0000\u00d9\u0010\u0001\u0000\u0000\u0000"+
- "\u00da\u00de\u0003\u001f\u000f\u0000\u00db\u00de\u0003#\u0011\u0000\u00dc"+
- "\u00de\u0003!\u0010\u0000\u00dd\u00da\u0001\u0000\u0000\u0000\u00dd\u00db"+
- "\u0001\u0000\u0000\u0000\u00dd\u00dc\u0001\u0000\u0000\u0000\u00de\u0012"+
- "\u0001\u0000\u0000\u0000\u00df\u00e2\u0003\u001b\r\u0000\u00e0\u00e2\u0003"+
- "\u001d\u000e\u0000\u00e1\u00df\u0001\u0000\u0000\u0000\u00e1\u00e0\u0001"+
- "\u0000\u0000\u0000\u00e2\u0014\u0001\u0000\u0000\u0000\u00e3\u00ea\u0003"+
- "%\u0012\u0000\u00e4\u00ea\u0003\'\u0013\u0000\u00e5\u00ea\u0003)\u0014"+
- "\u0000\u00e6\u00ea\u0003+\u0015\u0000\u00e7\u00ea\u0003-\u0016\u0000\u00e8"+
- "\u00ea\u0003/\u0017\u0000\u00e9\u00e3\u0001\u0000\u0000\u0000\u00e9\u00e4"+
- "\u0001\u0000\u0000\u0000\u00e9\u00e5\u0001\u0000\u0000\u0000\u00e9\u00e6"+
- "\u0001\u0000\u0000\u0000\u00e9\u00e7\u0001\u0000\u0000\u0000\u00e9\u00e8"+
- "\u0001\u0000\u0000\u0000\u00ea\u0016\u0001\u0000\u0000\u0000\u00eb\u00ee"+
- "\u00033\u0019\u0000\u00ec\u00ee\u00035\u001a\u0000\u00ed\u00eb\u0001\u0000"+
- "\u0000\u0000\u00ed\u00ec\u0001\u0000\u0000\u0000\u00ee\u0018\u0001\u0000"+
- "\u0000\u0000\u00ef\u00f0\u0005=\u0000\u0000\u00f0\u001a\u0001\u0000\u0000"+
- "\u0000\u00f1\u00f2\u0005+\u0000\u0000\u00f2\u001c\u0001\u0000\u0000\u0000"+
- "\u00f3\u00f4\u0005-\u0000\u0000\u00f4\u001e\u0001\u0000\u0000\u0000\u00f5"+
- "\u00f6\u0005*\u0000\u0000\u00f6 \u0001\u0000\u0000\u0000\u00f7\u00f8\u0005"+
- "%\u0000\u0000\u00f8\"\u0001\u0000\u0000\u0000\u00f9\u00fa\u0005/\u0000"+
- "\u0000\u00fa$\u0001\u0000\u0000\u0000\u00fb\u00fc\u0005>\u0000\u0000\u00fc"+
- "&\u0001\u0000\u0000\u0000\u00fd\u00fe\u0005<\u0000\u0000\u00fe(\u0001"+
- "\u0000\u0000\u0000\u00ff\u0100\u0005>\u0000\u0000\u0100\u0101\u0005=\u0000"+
- "\u0000\u0101*\u0001\u0000\u0000\u0000\u0102\u0103\u0005<\u0000\u0000\u0103"+
- "\u0104\u0005=\u0000\u0000\u0104,\u0001\u0000\u0000\u0000\u0105\u0106\u0005"+
- "=\u0000\u0000\u0106\u0107\u0005=\u0000\u0000\u0107.\u0001\u0000\u0000"+
- "\u0000\u0108\u0109\u0005!\u0000\u0000\u0109\u010a\u0005=\u0000\u0000\u010a"+
- "0\u0001\u0000\u0000\u0000\u010b\u010c\u0005!\u0000\u0000\u010c2\u0001"+
- "\u0000\u0000\u0000\u010d\u010e\u0005&\u0000\u0000\u010e\u010f\u0005&\u0000"+
- "\u0000\u010f4\u0001\u0000\u0000\u0000\u0110\u0111\u0005|\u0000\u0000\u0111"+
- "\u0112\u0005|\u0000\u0000\u01126\u0001\u0000\u0000\u0000\u0113\u0114\u0005"+
- ".\u0000\u0000\u01148\u0001\u0000\u0000\u0000\u0115\u0116\u0005(\u0000"+
- "\u0000\u0116:\u0001\u0000\u0000\u0000\u0117\u0118\u0005)\u0000\u0000\u0118"+
- "<\u0001\u0000\u0000\u0000\u0119\u011a\u0005{\u0000\u0000\u011a>\u0001"+
- "\u0000\u0000\u0000\u011b\u011c\u0005}\u0000\u0000\u011c@\u0001\u0000\u0000"+
- "\u0000\u011d\u011e\u0005;\u0000\u0000\u011eB\u0001\u0000\u0000\u0000\u011f"+
- "\u0120\u0005,\u0000\u0000\u0120D\u0001\u0000\u0000\u0000\u0121\u0122\u0005"+
- "c\u0000\u0000\u0122\u0123\u0005l\u0000\u0000\u0123\u0124\u0005a\u0000"+
- "\u0000\u0124\u0125\u0005s\u0000\u0000\u0125\u0126\u0005s\u0000\u0000\u0126"+
- "F\u0001\u0000\u0000\u0000\u0127\u0128\u0005t\u0000\u0000\u0128\u0129\u0005"+
- "h\u0000\u0000\u0129\u012a\u0005i\u0000\u0000\u012a\u012b\u0005s\u0000"+
- "\u0000\u012bH\u0001\u0000\u0000\u0000\u012c\u012d\u0005w\u0000\u0000\u012d"+
- "\u012e\u0005h\u0000\u0000\u012e\u012f\u0005i\u0000\u0000\u012f\u0130\u0005"+
- "l\u0000\u0000\u0130\u0131\u0005e\u0000\u0000\u0131J\u0001\u0000\u0000"+
- "\u0000\u0132\u0133\u0005d\u0000\u0000\u0133\u0134\u0005o\u0000\u0000\u0134"+
- "L\u0001\u0000\u0000\u0000\u0135\u0136\u0005i\u0000\u0000\u0136\u0137\u0005"+
- "f\u0000\u0000\u0137N\u0001\u0000\u0000\u0000\u0138\u0139\u0005e\u0000"+
- "\u0000\u0139\u013a\u0005l\u0000\u0000\u013a\u013b\u0005s\u0000\u0000\u013b"+
- "\u013c\u0005e\u0000\u0000\u013cP\u0001\u0000\u0000\u0000\u013d\u013e\u0005"+
- "f\u0000\u0000\u013e\u013f\u0005o\u0000\u0000\u013f\u0140\u0005r\u0000"+
- "\u0000\u0140R\u0001\u0000\u0000\u0000\u0141\u0142\u0005r\u0000\u0000\u0142"+
- "\u0143\u0005e\u0000\u0000\u0143\u0144\u0005t\u0000\u0000\u0144\u0145\u0005"+
- "u\u0000\u0000\u0145\u0146\u0005r\u0000\u0000\u0146\u0147\u0005n\u0000"+
- "\u0000\u0147T\u0001\u0000\u0000\u0000\u0148\u0149\u0005n\u0000\u0000\u0149"+
- "\u014a\u0005e\u0000\u0000\u014a\u014b\u0005w\u0000\u0000\u014bV\u0001"+
- "\u0000\u0000\u0000\u014c\u0150\u0005\'\u0000\u0000\u014d\u014f\b\u0000"+
- "\u0000\u0000\u014e\u014d\u0001\u0000\u0000\u0000\u014f\u0152\u0001\u0000"+
- "\u0000\u0000\u0150\u014e\u0001\u0000\u0000\u0000\u0150\u0151\u0001\u0000"+
- "\u0000\u0000\u0151\u0153\u0001\u0000\u0000\u0000\u0152\u0150\u0001\u0000"+
- "\u0000\u0000\u0153\u0154\u0005\'\u0000\u0000\u0154X\u0001\u0000\u0000"+
- "\u0000\u0155\u0157\u0003\u001d\u000e\u0000\u0156\u0155\u0001\u0000\u0000"+
- "\u0000\u0156\u0157\u0001\u0000\u0000\u0000\u0157\u0159\u0001\u0000\u0000"+
- "\u0000\u0158\u015a\u0003a0\u0000\u0159\u0158\u0001\u0000\u0000\u0000\u015a"+
- "\u015b\u0001\u0000\u0000\u0000\u015b\u0159\u0001\u0000\u0000\u0000\u015b"+
- "\u015c\u0001\u0000\u0000\u0000\u015cZ\u0001\u0000\u0000\u0000\u015d\u015e"+
- "\u0005t\u0000\u0000\u015e\u015f\u0005r\u0000\u0000\u015f\u0160\u0005u"+
- "\u0000\u0000\u0160\u0167\u0005e\u0000\u0000\u0161\u0162\u0005f\u0000\u0000"+
- "\u0162\u0163\u0005a\u0000\u0000\u0163\u0164\u0005l\u0000\u0000\u0164\u0165"+
- "\u0005s\u0000\u0000\u0165\u0167\u0005e\u0000\u0000\u0166\u015d\u0001\u0000"+
- "\u0000\u0000\u0166\u0161\u0001\u0000\u0000\u0000\u0167\\\u0001\u0000\u0000"+
- "\u0000\u0168\u0169\u0005n\u0000\u0000\u0169\u016a\u0005u\u0000\u0000\u016a"+
- "\u016b\u0005l\u0000\u0000\u016b\u016c\u0005l\u0000\u0000\u016c^\u0001"+
- "\u0000\u0000\u0000\u016d\u016e\u0007\u0001\u0000\u0000\u016e`\u0001\u0000"+
- "\u0000\u0000\u016f\u0170\u0007\u0002\u0000\u0000\u0170b\u0001\u0000\u0000"+
- "\u0000\u0171\u0175\u0003_/\u0000\u0172\u0175\u0003a0\u0000\u0173\u0175"+
- "\u0007\u0003\u0000\u0000\u0174\u0171\u0001\u0000\u0000\u0000\u0174\u0172"+
- "\u0001\u0000\u0000\u0000\u0174\u0173\u0001\u0000\u0000\u0000\u0175d\u0001"+
- "\u0000\u0000\u0000\u0176\u017a\u0003_/\u0000\u0177\u0179\u0003c1\u0000"+
- "\u0178\u0177\u0001\u0000\u0000\u0000\u0179\u017c\u0001\u0000\u0000\u0000"+
- "\u017a\u0178\u0001\u0000\u0000\u0000\u017a\u017b\u0001\u0000\u0000\u0000"+
- "\u017bf\u0001\u0000\u0000\u0000\u017c\u017a\u0001\u0000\u0000\u0000\u017d"+
- "\u017f\u0007\u0004\u0000\u0000\u017e\u017d\u0001\u0000\u0000\u0000\u017f"+
- "\u0180\u0001\u0000\u0000\u0000\u0180\u017e\u0001\u0000\u0000\u0000\u0180"+
- "\u0181\u0001\u0000\u0000\u0000\u0181\u0182\u0001\u0000\u0000\u0000\u0182"+
- "\u0183\u00063\u0000\u0000\u0183h\u0001\u0000\u0000\u0000\u0184\u0185\u0005"+
- "/\u0000\u0000\u0185\u0186\u0005/\u0000\u0000\u0186\u018a\u0001\u0000\u0000"+
- "\u0000\u0187\u0189\b\u0000\u0000\u0000\u0188\u0187\u0001\u0000\u0000\u0000"+
- "\u0189\u018c\u0001\u0000\u0000\u0000\u018a\u0188\u0001\u0000\u0000\u0000"+
- "\u018a\u018b\u0001\u0000\u0000\u0000\u018b\u018d\u0001\u0000\u0000\u0000"+
- "\u018c\u018a\u0001\u0000\u0000\u0000\u018d\u018e\u00064\u0000\u0000\u018e"+
- "j\u0001\u0000\u0000\u0000\u018f\u0190\u0005/\u0000\u0000\u0190\u0191\u0005"+
- "*\u0000\u0000\u0191\u0195\u0001\u0000\u0000\u0000\u0192\u0194\t\u0000"+
- "\u0000\u0000\u0193\u0192\u0001\u0000\u0000\u0000\u0194\u0197\u0001\u0000"+
- "\u0000\u0000\u0195\u0196\u0001\u0000\u0000\u0000\u0195\u0193\u0001\u0000"+
- "\u0000\u0000\u0196\u0198\u0001\u0000\u0000\u0000\u0197\u0195\u0001\u0000"+
- "\u0000\u0000\u0198\u0199\u0005*\u0000\u0000\u0199\u019a\u0005/\u0000\u0000"+
- "\u019a\u019b\u0001\u0000\u0000\u0000\u019b\u019c\u00065\u0000\u0000\u019c"+
- "l\u0001\u0000\u0000\u0000\u000f\u0000\u00b1\u00dd\u00e1\u00e9\u00ed\u0150"+
- "\u0156\u015b\u0166\u0174\u017a\u0180\u018a\u0195\u0001\u0006\u0000\u0000";
- public static final ATN _ATN =
- new ATNDeserializer().deserialize(_serializedATN.toCharArray());
- static {
- _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()];
- for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) {
- _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i);
- }
- }
-}
\ No newline at end of file
diff --git a/src/main/java/parser/generated/SimpleJavaLexer.tokens b/src/main/java/parser/generated/SimpleJavaLexer.tokens
deleted file mode 100644
index 71246c8..0000000
--- a/src/main/java/parser/generated/SimpleJavaLexer.tokens
+++ /dev/null
@@ -1,90 +0,0 @@
-T__0=1
-T__1=2
-Void=3
-Boolean=4
-Char=5
-Int=6
-AccessModifier=7
-MainMethodDeclaration=8
-DotOperator=9
-LineOperator=10
-ComparisonOperator=11
-LogicalOperator=12
-Assign=13
-Plus=14
-Minus=15
-Mult=16
-Modulo=17
-Div=18
-Greater=19
-Less=20
-GreaterEqual=21
-LessEqual=22
-Equal=23
-NotEqual=24
-Not=25
-And=26
-Or=27
-Dot=28
-OpenRoundBracket=29
-ClosedRoundBracket=30
-OpenCurlyBracket=31
-ClosedCurlyBracket=32
-Semicolon=33
-Comma=34
-Class=35
-This=36
-While=37
-Do=38
-If=39
-Else=40
-For=41
-Return=42
-New=43
-CharValue=44
-IntValue=45
-BooleanValue=46
-NullValue=47
-Identifier=48
-WS=49
-InlineComment=50
-MultilineComment=51
-'++'=1
-'--'=2
-'void'=3
-'boolean'=4
-'char'=5
-'int'=6
-'public static void main(String[] args)'=8
-'='=13
-'+'=14
-'-'=15
-'*'=16
-'%'=17
-'/'=18
-'>'=19
-'<'=20
-'>='=21
-'<='=22
-'=='=23
-'!='=24
-'!'=25
-'&&'=26
-'||'=27
-'.'=28
-'('=29
-')'=30
-'{'=31
-'}'=32
-';'=33
-','=34
-'class'=35
-'this'=36
-'while'=37
-'do'=38
-'if'=39
-'else'=40
-'for'=41
-'return'=42
-'new'=43
-'null'=47
diff --git a/src/main/java/parser/generated/SimpleJavaListener.java b/src/main/java/parser/generated/SimpleJavaListener.java
deleted file mode 100644
index 580bfe1..0000000
--- a/src/main/java/parser/generated/SimpleJavaListener.java
+++ /dev/null
@@ -1,470 +0,0 @@
-// Generated from C:/Users/janni/Desktop/NichtHaskell2.0/src/main/java/parser/grammar/SimpleJava.g4 by ANTLR 4.13.1
-package parser.generated;
-import org.antlr.v4.runtime.tree.ParseTreeListener;
-
-/**
- * This interface defines a complete listener for a parse tree produced by
- * {@link SimpleJavaParser}.
- */
-public interface SimpleJavaListener extends ParseTreeListener {
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#program}.
- * @param ctx the parse tree
- */
- void enterProgram(SimpleJavaParser.ProgramContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#program}.
- * @param ctx the parse tree
- */
- void exitProgram(SimpleJavaParser.ProgramContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#classDeclaration}.
- * @param ctx the parse tree
- */
- void enterClassDeclaration(SimpleJavaParser.ClassDeclarationContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#classDeclaration}.
- * @param ctx the parse tree
- */
- void exitClassDeclaration(SimpleJavaParser.ClassDeclarationContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#memberDeclaration}.
- * @param ctx the parse tree
- */
- void enterMemberDeclaration(SimpleJavaParser.MemberDeclarationContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#memberDeclaration}.
- * @param ctx the parse tree
- */
- void exitMemberDeclaration(SimpleJavaParser.MemberDeclarationContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#constructorDeclaration}.
- * @param ctx the parse tree
- */
- void enterConstructorDeclaration(SimpleJavaParser.ConstructorDeclarationContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#constructorDeclaration}.
- * @param ctx the parse tree
- */
- void exitConstructorDeclaration(SimpleJavaParser.ConstructorDeclarationContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#fieldDeclaration}.
- * @param ctx the parse tree
- */
- void enterFieldDeclaration(SimpleJavaParser.FieldDeclarationContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#fieldDeclaration}.
- * @param ctx the parse tree
- */
- void exitFieldDeclaration(SimpleJavaParser.FieldDeclarationContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#methodDeclaration}.
- * @param ctx the parse tree
- */
- void enterMethodDeclaration(SimpleJavaParser.MethodDeclarationContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#methodDeclaration}.
- * @param ctx the parse tree
- */
- void exitMethodDeclaration(SimpleJavaParser.MethodDeclarationContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#parameterList}.
- * @param ctx the parse tree
- */
- void enterParameterList(SimpleJavaParser.ParameterListContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#parameterList}.
- * @param ctx the parse tree
- */
- void exitParameterList(SimpleJavaParser.ParameterListContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#parameter}.
- * @param ctx the parse tree
- */
- void enterParameter(SimpleJavaParser.ParameterContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#parameter}.
- * @param ctx the parse tree
- */
- void exitParameter(SimpleJavaParser.ParameterContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#argumentList}.
- * @param ctx the parse tree
- */
- void enterArgumentList(SimpleJavaParser.ArgumentListContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#argumentList}.
- * @param ctx the parse tree
- */
- void exitArgumentList(SimpleJavaParser.ArgumentListContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#statement}.
- * @param ctx the parse tree
- */
- void enterStatement(SimpleJavaParser.StatementContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#statement}.
- * @param ctx the parse tree
- */
- void exitStatement(SimpleJavaParser.StatementContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#blockStatement}.
- * @param ctx the parse tree
- */
- void enterBlockStatement(SimpleJavaParser.BlockStatementContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#blockStatement}.
- * @param ctx the parse tree
- */
- void exitBlockStatement(SimpleJavaParser.BlockStatementContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#returnStatement}.
- * @param ctx the parse tree
- */
- void enterReturnStatement(SimpleJavaParser.ReturnStatementContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#returnStatement}.
- * @param ctx the parse tree
- */
- void exitReturnStatement(SimpleJavaParser.ReturnStatementContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#localVariableDeclaration}.
- * @param ctx the parse tree
- */
- void enterLocalVariableDeclaration(SimpleJavaParser.LocalVariableDeclarationContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#localVariableDeclaration}.
- * @param ctx the parse tree
- */
- void exitLocalVariableDeclaration(SimpleJavaParser.LocalVariableDeclarationContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#whileStatement}.
- * @param ctx the parse tree
- */
- void enterWhileStatement(SimpleJavaParser.WhileStatementContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#whileStatement}.
- * @param ctx the parse tree
- */
- void exitWhileStatement(SimpleJavaParser.WhileStatementContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#doWhileStatement}.
- * @param ctx the parse tree
- */
- void enterDoWhileStatement(SimpleJavaParser.DoWhileStatementContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#doWhileStatement}.
- * @param ctx the parse tree
- */
- void exitDoWhileStatement(SimpleJavaParser.DoWhileStatementContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#forStatement}.
- * @param ctx the parse tree
- */
- void enterForStatement(SimpleJavaParser.ForStatementContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#forStatement}.
- * @param ctx the parse tree
- */
- void exitForStatement(SimpleJavaParser.ForStatementContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#ifElseStatement}.
- * @param ctx the parse tree
- */
- void enterIfElseStatement(SimpleJavaParser.IfElseStatementContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#ifElseStatement}.
- * @param ctx the parse tree
- */
- void exitIfElseStatement(SimpleJavaParser.IfElseStatementContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#ifStatement}.
- * @param ctx the parse tree
- */
- void enterIfStatement(SimpleJavaParser.IfStatementContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#ifStatement}.
- * @param ctx the parse tree
- */
- void exitIfStatement(SimpleJavaParser.IfStatementContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#elseIfStatement}.
- * @param ctx the parse tree
- */
- void enterElseIfStatement(SimpleJavaParser.ElseIfStatementContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#elseIfStatement}.
- * @param ctx the parse tree
- */
- void exitElseIfStatement(SimpleJavaParser.ElseIfStatementContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#elseStatement}.
- * @param ctx the parse tree
- */
- void enterElseStatement(SimpleJavaParser.ElseStatementContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#elseStatement}.
- * @param ctx the parse tree
- */
- void exitElseStatement(SimpleJavaParser.ElseStatementContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#statementExpression}.
- * @param ctx the parse tree
- */
- void enterStatementExpression(SimpleJavaParser.StatementExpressionContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#statementExpression}.
- * @param ctx the parse tree
- */
- void exitStatementExpression(SimpleJavaParser.StatementExpressionContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#assign}.
- * @param ctx the parse tree
- */
- void enterAssign(SimpleJavaParser.AssignContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#assign}.
- * @param ctx the parse tree
- */
- void exitAssign(SimpleJavaParser.AssignContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#newDeclaration}.
- * @param ctx the parse tree
- */
- void enterNewDeclaration(SimpleJavaParser.NewDeclarationContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#newDeclaration}.
- * @param ctx the parse tree
- */
- void exitNewDeclaration(SimpleJavaParser.NewDeclarationContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#expression}.
- * @param ctx the parse tree
- */
- void enterExpression(SimpleJavaParser.ExpressionContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#expression}.
- * @param ctx the parse tree
- */
- void exitExpression(SimpleJavaParser.ExpressionContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#unaryExpression}.
- * @param ctx the parse tree
- */
- void enterUnaryExpression(SimpleJavaParser.UnaryExpressionContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#unaryExpression}.
- * @param ctx the parse tree
- */
- void exitUnaryExpression(SimpleJavaParser.UnaryExpressionContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#notExpression}.
- * @param ctx the parse tree
- */
- void enterNotExpression(SimpleJavaParser.NotExpressionContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#notExpression}.
- * @param ctx the parse tree
- */
- void exitNotExpression(SimpleJavaParser.NotExpressionContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#crementExpression}.
- * @param ctx the parse tree
- */
- void enterCrementExpression(SimpleJavaParser.CrementExpressionContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#crementExpression}.
- * @param ctx the parse tree
- */
- void exitCrementExpression(SimpleJavaParser.CrementExpressionContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#incrementExpression}.
- * @param ctx the parse tree
- */
- void enterIncrementExpression(SimpleJavaParser.IncrementExpressionContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#incrementExpression}.
- * @param ctx the parse tree
- */
- void exitIncrementExpression(SimpleJavaParser.IncrementExpressionContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#prefixIncrementExpression}.
- * @param ctx the parse tree
- */
- void enterPrefixIncrementExpression(SimpleJavaParser.PrefixIncrementExpressionContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#prefixIncrementExpression}.
- * @param ctx the parse tree
- */
- void exitPrefixIncrementExpression(SimpleJavaParser.PrefixIncrementExpressionContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#suffixIncrementExpression}.
- * @param ctx the parse tree
- */
- void enterSuffixIncrementExpression(SimpleJavaParser.SuffixIncrementExpressionContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#suffixIncrementExpression}.
- * @param ctx the parse tree
- */
- void exitSuffixIncrementExpression(SimpleJavaParser.SuffixIncrementExpressionContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#decrementExpression}.
- * @param ctx the parse tree
- */
- void enterDecrementExpression(SimpleJavaParser.DecrementExpressionContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#decrementExpression}.
- * @param ctx the parse tree
- */
- void exitDecrementExpression(SimpleJavaParser.DecrementExpressionContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#prefixDecrementExpression}.
- * @param ctx the parse tree
- */
- void enterPrefixDecrementExpression(SimpleJavaParser.PrefixDecrementExpressionContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#prefixDecrementExpression}.
- * @param ctx the parse tree
- */
- void exitPrefixDecrementExpression(SimpleJavaParser.PrefixDecrementExpressionContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#suffixDecrementExpression}.
- * @param ctx the parse tree
- */
- void enterSuffixDecrementExpression(SimpleJavaParser.SuffixDecrementExpressionContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#suffixDecrementExpression}.
- * @param ctx the parse tree
- */
- void exitSuffixDecrementExpression(SimpleJavaParser.SuffixDecrementExpressionContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#assignableExpression}.
- * @param ctx the parse tree
- */
- void enterAssignableExpression(SimpleJavaParser.AssignableExpressionContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#assignableExpression}.
- * @param ctx the parse tree
- */
- void exitAssignableExpression(SimpleJavaParser.AssignableExpressionContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#memberAccess}.
- * @param ctx the parse tree
- */
- void enterMemberAccess(SimpleJavaParser.MemberAccessContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#memberAccess}.
- * @param ctx the parse tree
- */
- void exitMemberAccess(SimpleJavaParser.MemberAccessContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#binaryExpression}.
- * @param ctx the parse tree
- */
- void enterBinaryExpression(SimpleJavaParser.BinaryExpressionContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#binaryExpression}.
- * @param ctx the parse tree
- */
- void exitBinaryExpression(SimpleJavaParser.BinaryExpressionContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#calculationExpression}.
- * @param ctx the parse tree
- */
- void enterCalculationExpression(SimpleJavaParser.CalculationExpressionContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#calculationExpression}.
- * @param ctx the parse tree
- */
- void exitCalculationExpression(SimpleJavaParser.CalculationExpressionContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#dotExpression}.
- * @param ctx the parse tree
- */
- void enterDotExpression(SimpleJavaParser.DotExpressionContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#dotExpression}.
- * @param ctx the parse tree
- */
- void exitDotExpression(SimpleJavaParser.DotExpressionContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#dotSubtractionExpression}.
- * @param ctx the parse tree
- */
- void enterDotSubtractionExpression(SimpleJavaParser.DotSubtractionExpressionContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#dotSubtractionExpression}.
- * @param ctx the parse tree
- */
- void exitDotSubtractionExpression(SimpleJavaParser.DotSubtractionExpressionContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#nonCalculationExpression}.
- * @param ctx the parse tree
- */
- void enterNonCalculationExpression(SimpleJavaParser.NonCalculationExpressionContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#nonCalculationExpression}.
- * @param ctx the parse tree
- */
- void exitNonCalculationExpression(SimpleJavaParser.NonCalculationExpressionContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#methodCall}.
- * @param ctx the parse tree
- */
- void enterMethodCall(SimpleJavaParser.MethodCallContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#methodCall}.
- * @param ctx the parse tree
- */
- void exitMethodCall(SimpleJavaParser.MethodCallContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#target}.
- * @param ctx the parse tree
- */
- void enterTarget(SimpleJavaParser.TargetContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#target}.
- * @param ctx the parse tree
- */
- void exitTarget(SimpleJavaParser.TargetContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#chainedMethod}.
- * @param ctx the parse tree
- */
- void enterChainedMethod(SimpleJavaParser.ChainedMethodContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#chainedMethod}.
- * @param ctx the parse tree
- */
- void exitChainedMethod(SimpleJavaParser.ChainedMethodContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#type}.
- * @param ctx the parse tree
- */
- void enterType(SimpleJavaParser.TypeContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#type}.
- * @param ctx the parse tree
- */
- void exitType(SimpleJavaParser.TypeContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#value}.
- * @param ctx the parse tree
- */
- void enterValue(SimpleJavaParser.ValueContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#value}.
- * @param ctx the parse tree
- */
- void exitValue(SimpleJavaParser.ValueContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#nonCalculationOperator}.
- * @param ctx the parse tree
- */
- void enterNonCalculationOperator(SimpleJavaParser.NonCalculationOperatorContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#nonCalculationOperator}.
- * @param ctx the parse tree
- */
- void exitNonCalculationOperator(SimpleJavaParser.NonCalculationOperatorContext ctx);
-}
\ No newline at end of file
diff --git a/src/main/java/parser/generated/SimpleJavaParser.java b/src/main/java/parser/generated/SimpleJavaParser.java
deleted file mode 100644
index 3a80a6a..0000000
--- a/src/main/java/parser/generated/SimpleJavaParser.java
+++ /dev/null
@@ -1,3628 +0,0 @@
-// Generated from C:/Users/janni/Desktop/NichtHaskell2.0/src/main/java/parser/grammar/SimpleJava.g4 by ANTLR 4.13.1
-package parser.generated;
-import org.antlr.v4.runtime.atn.*;
-import org.antlr.v4.runtime.dfa.DFA;
-import org.antlr.v4.runtime.*;
-import org.antlr.v4.runtime.misc.*;
-import org.antlr.v4.runtime.tree.*;
-import java.util.List;
-import java.util.Iterator;
-import java.util.ArrayList;
-
-@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast", "CheckReturnValue"})
-public class SimpleJavaParser extends Parser {
- static { RuntimeMetaData.checkVersion("4.13.1", RuntimeMetaData.VERSION); }
-
- protected static final DFA[] _decisionToDFA;
- protected static final PredictionContextCache _sharedContextCache =
- new PredictionContextCache();
- public static final int
- T__0=1, T__1=2, Void=3, Boolean=4, Char=5, Int=6, AccessModifier=7, MainMethodDeclaration=8,
- DotOperator=9, LineOperator=10, ComparisonOperator=11, LogicalOperator=12,
- Assign=13, Plus=14, Minus=15, Mult=16, Modulo=17, Div=18, Greater=19,
- Less=20, GreaterEqual=21, LessEqual=22, Equal=23, NotEqual=24, Not=25,
- And=26, Or=27, Dot=28, OpenRoundBracket=29, ClosedRoundBracket=30, OpenCurlyBracket=31,
- ClosedCurlyBracket=32, Semicolon=33, Comma=34, Class=35, This=36, While=37,
- Do=38, If=39, Else=40, For=41, Return=42, New=43, CharValue=44, IntValue=45,
- BooleanValue=46, NullValue=47, Identifier=48, WS=49, InlineComment=50,
- MultilineComment=51;
- public static final int
- RULE_program = 0, RULE_classDeclaration = 1, RULE_memberDeclaration = 2,
- RULE_constructorDeclaration = 3, RULE_fieldDeclaration = 4, RULE_methodDeclaration = 5,
- RULE_parameterList = 6, RULE_parameter = 7, RULE_argumentList = 8, RULE_statement = 9,
- RULE_blockStatement = 10, RULE_returnStatement = 11, RULE_localVariableDeclaration = 12,
- RULE_whileStatement = 13, RULE_doWhileStatement = 14, RULE_forStatement = 15,
- RULE_ifElseStatement = 16, RULE_ifStatement = 17, RULE_elseIfStatement = 18,
- RULE_elseStatement = 19, RULE_statementExpression = 20, RULE_assign = 21,
- RULE_newDeclaration = 22, RULE_expression = 23, RULE_unaryExpression = 24,
- RULE_notExpression = 25, RULE_crementExpression = 26, RULE_incrementExpression = 27,
- RULE_prefixIncrementExpression = 28, RULE_suffixIncrementExpression = 29,
- RULE_decrementExpression = 30, RULE_prefixDecrementExpression = 31, RULE_suffixDecrementExpression = 32,
- RULE_assignableExpression = 33, RULE_memberAccess = 34, RULE_binaryExpression = 35,
- RULE_calculationExpression = 36, RULE_dotExpression = 37, RULE_dotSubtractionExpression = 38,
- RULE_nonCalculationExpression = 39, RULE_methodCall = 40, RULE_target = 41,
- RULE_chainedMethod = 42, RULE_type = 43, RULE_value = 44, RULE_nonCalculationOperator = 45;
- private static String[] makeRuleNames() {
- return new String[] {
- "program", "classDeclaration", "memberDeclaration", "constructorDeclaration",
- "fieldDeclaration", "methodDeclaration", "parameterList", "parameter",
- "argumentList", "statement", "blockStatement", "returnStatement", "localVariableDeclaration",
- "whileStatement", "doWhileStatement", "forStatement", "ifElseStatement",
- "ifStatement", "elseIfStatement", "elseStatement", "statementExpression",
- "assign", "newDeclaration", "expression", "unaryExpression", "notExpression",
- "crementExpression", "incrementExpression", "prefixIncrementExpression",
- "suffixIncrementExpression", "decrementExpression", "prefixDecrementExpression",
- "suffixDecrementExpression", "assignableExpression", "memberAccess",
- "binaryExpression", "calculationExpression", "dotExpression", "dotSubtractionExpression",
- "nonCalculationExpression", "methodCall", "target", "chainedMethod",
- "type", "value", "nonCalculationOperator"
- };
- }
- public static final String[] ruleNames = makeRuleNames();
-
- private static String[] makeLiteralNames() {
- return new String[] {
- null, "'++'", "'--'", "'void'", "'boolean'", "'char'", "'int'", null,
- "'public static void main(String[] args)'", null, null, null, null, "'='",
- "'+'", "'-'", "'*'", "'%'", "'/'", "'>'", "'<'", "'>='", "'<='", "'=='",
- "'!='", "'!'", "'&&'", "'||'", "'.'", "'('", "')'", "'{'", "'}'", "';'",
- "','", "'class'", "'this'", "'while'", "'do'", "'if'", "'else'", "'for'",
- "'return'", "'new'", null, null, null, "'null'"
- };
- }
- private static final String[] _LITERAL_NAMES = makeLiteralNames();
- private static String[] makeSymbolicNames() {
- return new String[] {
- null, null, null, "Void", "Boolean", "Char", "Int", "AccessModifier",
- "MainMethodDeclaration", "DotOperator", "LineOperator", "ComparisonOperator",
- "LogicalOperator", "Assign", "Plus", "Minus", "Mult", "Modulo", "Div",
- "Greater", "Less", "GreaterEqual", "LessEqual", "Equal", "NotEqual",
- "Not", "And", "Or", "Dot", "OpenRoundBracket", "ClosedRoundBracket",
- "OpenCurlyBracket", "ClosedCurlyBracket", "Semicolon", "Comma", "Class",
- "This", "While", "Do", "If", "Else", "For", "Return", "New", "CharValue",
- "IntValue", "BooleanValue", "NullValue", "Identifier", "WS", "InlineComment",
- "MultilineComment"
- };
- }
- private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames();
- public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
-
- /**
- * @deprecated Use {@link #VOCABULARY} instead.
- */
- @Deprecated
- public static final String[] tokenNames;
- static {
- tokenNames = new String[_SYMBOLIC_NAMES.length];
- for (int i = 0; i < tokenNames.length; i++) {
- tokenNames[i] = VOCABULARY.getLiteralName(i);
- if (tokenNames[i] == null) {
- tokenNames[i] = VOCABULARY.getSymbolicName(i);
- }
-
- if (tokenNames[i] == null) {
- tokenNames[i] = "";
- }
- }
- }
-
- @Override
- @Deprecated
- public String[] getTokenNames() {
- return tokenNames;
- }
-
- @Override
-
- public Vocabulary getVocabulary() {
- return VOCABULARY;
- }
-
- @Override
- public String getGrammarFileName() { return "SimpleJava.g4"; }
-
- @Override
- public String[] getRuleNames() { return ruleNames; }
-
- @Override
- public String getSerializedATN() { return _serializedATN; }
-
- @Override
- public ATN getATN() { return _ATN; }
-
- public SimpleJavaParser(TokenStream input) {
- super(input);
- _interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class ProgramContext extends ParserRuleContext {
- public List classDeclaration() {
- return getRuleContexts(ClassDeclarationContext.class);
- }
- public ClassDeclarationContext classDeclaration(int i) {
- return getRuleContext(ClassDeclarationContext.class,i);
- }
- public ProgramContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_program; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterProgram(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitProgram(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitProgram(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final ProgramContext program() throws RecognitionException {
- ProgramContext _localctx = new ProgramContext(_ctx, getState());
- enterRule(_localctx, 0, RULE_program);
- int _la;
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(93);
- _errHandler.sync(this);
- _la = _input.LA(1);
- do {
- {
- {
- setState(92);
- classDeclaration();
- }
- }
- setState(95);
- _errHandler.sync(this);
- _la = _input.LA(1);
- } while ( _la==AccessModifier || _la==Class );
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class ClassDeclarationContext extends ParserRuleContext {
- public TerminalNode Class() { return getToken(SimpleJavaParser.Class, 0); }
- public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
- public TerminalNode OpenCurlyBracket() { return getToken(SimpleJavaParser.OpenCurlyBracket, 0); }
- public TerminalNode ClosedCurlyBracket() { return getToken(SimpleJavaParser.ClosedCurlyBracket, 0); }
- public TerminalNode AccessModifier() { return getToken(SimpleJavaParser.AccessModifier, 0); }
- public List memberDeclaration() {
- return getRuleContexts(MemberDeclarationContext.class);
- }
- public MemberDeclarationContext memberDeclaration(int i) {
- return getRuleContext(MemberDeclarationContext.class,i);
- }
- public ClassDeclarationContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_classDeclaration; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterClassDeclaration(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitClassDeclaration(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitClassDeclaration(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final ClassDeclarationContext classDeclaration() throws RecognitionException {
- ClassDeclarationContext _localctx = new ClassDeclarationContext(_ctx, getState());
- enterRule(_localctx, 2, RULE_classDeclaration);
- int _la;
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(98);
- _errHandler.sync(this);
- _la = _input.LA(1);
- if (_la==AccessModifier) {
- {
- setState(97);
- match(AccessModifier);
- }
- }
-
- setState(100);
- match(Class);
- setState(101);
- match(Identifier);
- setState(102);
- match(OpenCurlyBracket);
- setState(106);
- _errHandler.sync(this);
- _la = _input.LA(1);
- while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 281474976711160L) != 0)) {
- {
- {
- setState(103);
- memberDeclaration();
- }
- }
- setState(108);
- _errHandler.sync(this);
- _la = _input.LA(1);
- }
- setState(109);
- match(ClosedCurlyBracket);
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class MemberDeclarationContext extends ParserRuleContext {
- public ConstructorDeclarationContext constructorDeclaration() {
- return getRuleContext(ConstructorDeclarationContext.class,0);
- }
- public FieldDeclarationContext fieldDeclaration() {
- return getRuleContext(FieldDeclarationContext.class,0);
- }
- public MethodDeclarationContext methodDeclaration() {
- return getRuleContext(MethodDeclarationContext.class,0);
- }
- public MemberDeclarationContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_memberDeclaration; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterMemberDeclaration(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitMemberDeclaration(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitMemberDeclaration(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final MemberDeclarationContext memberDeclaration() throws RecognitionException {
- MemberDeclarationContext _localctx = new MemberDeclarationContext(_ctx, getState());
- enterRule(_localctx, 4, RULE_memberDeclaration);
- try {
- setState(114);
- _errHandler.sync(this);
- switch ( getInterpreter().adaptivePredict(_input,3,_ctx) ) {
- case 1:
- enterOuterAlt(_localctx, 1);
- {
- setState(111);
- constructorDeclaration();
- }
- break;
- case 2:
- enterOuterAlt(_localctx, 2);
- {
- setState(112);
- fieldDeclaration();
- }
- break;
- case 3:
- enterOuterAlt(_localctx, 3);
- {
- setState(113);
- methodDeclaration();
- }
- break;
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class ConstructorDeclarationContext extends ParserRuleContext {
- public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
- public TerminalNode OpenRoundBracket() { return getToken(SimpleJavaParser.OpenRoundBracket, 0); }
- public TerminalNode ClosedRoundBracket() { return getToken(SimpleJavaParser.ClosedRoundBracket, 0); }
- public BlockStatementContext blockStatement() {
- return getRuleContext(BlockStatementContext.class,0);
- }
- public TerminalNode AccessModifier() { return getToken(SimpleJavaParser.AccessModifier, 0); }
- public ParameterListContext parameterList() {
- return getRuleContext(ParameterListContext.class,0);
- }
- public ConstructorDeclarationContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_constructorDeclaration; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterConstructorDeclaration(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitConstructorDeclaration(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitConstructorDeclaration(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final ConstructorDeclarationContext constructorDeclaration() throws RecognitionException {
- ConstructorDeclarationContext _localctx = new ConstructorDeclarationContext(_ctx, getState());
- enterRule(_localctx, 6, RULE_constructorDeclaration);
- int _la;
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(117);
- _errHandler.sync(this);
- _la = _input.LA(1);
- if (_la==AccessModifier) {
- {
- setState(116);
- match(AccessModifier);
- }
- }
-
- setState(119);
- match(Identifier);
- setState(120);
- match(OpenRoundBracket);
- setState(122);
- _errHandler.sync(this);
- _la = _input.LA(1);
- if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 281474976710768L) != 0)) {
- {
- setState(121);
- parameterList();
- }
- }
-
- setState(124);
- match(ClosedRoundBracket);
- setState(125);
- blockStatement();
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class FieldDeclarationContext extends ParserRuleContext {
- public TypeContext type() {
- return getRuleContext(TypeContext.class,0);
- }
- public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
- public TerminalNode Semicolon() { return getToken(SimpleJavaParser.Semicolon, 0); }
- public TerminalNode AccessModifier() { return getToken(SimpleJavaParser.AccessModifier, 0); }
- public FieldDeclarationContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_fieldDeclaration; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterFieldDeclaration(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitFieldDeclaration(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitFieldDeclaration(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final FieldDeclarationContext fieldDeclaration() throws RecognitionException {
- FieldDeclarationContext _localctx = new FieldDeclarationContext(_ctx, getState());
- enterRule(_localctx, 8, RULE_fieldDeclaration);
- int _la;
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(128);
- _errHandler.sync(this);
- _la = _input.LA(1);
- if (_la==AccessModifier) {
- {
- setState(127);
- match(AccessModifier);
- }
- }
-
- setState(130);
- type();
- setState(131);
- match(Identifier);
- setState(132);
- match(Semicolon);
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class MethodDeclarationContext extends ParserRuleContext {
- public TerminalNode MainMethodDeclaration() { return getToken(SimpleJavaParser.MainMethodDeclaration, 0); }
- public BlockStatementContext blockStatement() {
- return getRuleContext(BlockStatementContext.class,0);
- }
- public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
- public TerminalNode OpenRoundBracket() { return getToken(SimpleJavaParser.OpenRoundBracket, 0); }
- public TerminalNode ClosedRoundBracket() { return getToken(SimpleJavaParser.ClosedRoundBracket, 0); }
- public TypeContext type() {
- return getRuleContext(TypeContext.class,0);
- }
- public TerminalNode Void() { return getToken(SimpleJavaParser.Void, 0); }
- public TerminalNode AccessModifier() { return getToken(SimpleJavaParser.AccessModifier, 0); }
- public ParameterListContext parameterList() {
- return getRuleContext(ParameterListContext.class,0);
- }
- public MethodDeclarationContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_methodDeclaration; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterMethodDeclaration(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitMethodDeclaration(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitMethodDeclaration(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final MethodDeclarationContext methodDeclaration() throws RecognitionException {
- MethodDeclarationContext _localctx = new MethodDeclarationContext(_ctx, getState());
- enterRule(_localctx, 10, RULE_methodDeclaration);
- int _la;
- try {
- setState(150);
- _errHandler.sync(this);
- switch (_input.LA(1)) {
- case MainMethodDeclaration:
- enterOuterAlt(_localctx, 1);
- {
- setState(134);
- match(MainMethodDeclaration);
- setState(135);
- blockStatement();
- }
- break;
- case Void:
- case Boolean:
- case Char:
- case Int:
- case AccessModifier:
- case Identifier:
- enterOuterAlt(_localctx, 2);
- {
- setState(137);
- _errHandler.sync(this);
- _la = _input.LA(1);
- if (_la==AccessModifier) {
- {
- setState(136);
- match(AccessModifier);
- }
- }
-
- setState(141);
- _errHandler.sync(this);
- switch (_input.LA(1)) {
- case Boolean:
- case Char:
- case Int:
- case Identifier:
- {
- setState(139);
- type();
- }
- break;
- case Void:
- {
- setState(140);
- match(Void);
- }
- break;
- default:
- throw new NoViableAltException(this);
- }
- setState(143);
- match(Identifier);
- setState(144);
- match(OpenRoundBracket);
- setState(146);
- _errHandler.sync(this);
- _la = _input.LA(1);
- if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 281474976710768L) != 0)) {
- {
- setState(145);
- parameterList();
- }
- }
-
- setState(148);
- match(ClosedRoundBracket);
- setState(149);
- blockStatement();
- }
- break;
- default:
- throw new NoViableAltException(this);
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class ParameterListContext extends ParserRuleContext {
- public List parameter() {
- return getRuleContexts(ParameterContext.class);
- }
- public ParameterContext parameter(int i) {
- return getRuleContext(ParameterContext.class,i);
- }
- public List Comma() { return getTokens(SimpleJavaParser.Comma); }
- public TerminalNode Comma(int i) {
- return getToken(SimpleJavaParser.Comma, i);
- }
- public ParameterListContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_parameterList; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterParameterList(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitParameterList(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitParameterList(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final ParameterListContext parameterList() throws RecognitionException {
- ParameterListContext _localctx = new ParameterListContext(_ctx, getState());
- enterRule(_localctx, 12, RULE_parameterList);
- int _la;
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(152);
- parameter();
- setState(157);
- _errHandler.sync(this);
- _la = _input.LA(1);
- while (_la==Comma) {
- {
- {
- setState(153);
- match(Comma);
- setState(154);
- parameter();
- }
- }
- setState(159);
- _errHandler.sync(this);
- _la = _input.LA(1);
- }
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class ParameterContext extends ParserRuleContext {
- public TypeContext type() {
- return getRuleContext(TypeContext.class,0);
- }
- public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
- public ParameterContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_parameter; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterParameter(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitParameter(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitParameter(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final ParameterContext parameter() throws RecognitionException {
- ParameterContext _localctx = new ParameterContext(_ctx, getState());
- enterRule(_localctx, 14, RULE_parameter);
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(160);
- type();
- setState(161);
- match(Identifier);
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class ArgumentListContext extends ParserRuleContext {
- public List expression() {
- return getRuleContexts(ExpressionContext.class);
- }
- public ExpressionContext expression(int i) {
- return getRuleContext(ExpressionContext.class,i);
- }
- public List Comma() { return getTokens(SimpleJavaParser.Comma); }
- public TerminalNode Comma(int i) {
- return getToken(SimpleJavaParser.Comma, i);
- }
- public ArgumentListContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_argumentList; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterArgumentList(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitArgumentList(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitArgumentList(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final ArgumentListContext argumentList() throws RecognitionException {
- ArgumentListContext _localctx = new ArgumentListContext(_ctx, getState());
- enterRule(_localctx, 16, RULE_argumentList);
- int _la;
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(171);
- _errHandler.sync(this);
- _la = _input.LA(1);
- if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 554223150301190L) != 0)) {
- {
- setState(163);
- expression();
- setState(168);
- _errHandler.sync(this);
- _la = _input.LA(1);
- while (_la==Comma) {
- {
- {
- setState(164);
- match(Comma);
- setState(165);
- expression();
- }
- }
- setState(170);
- _errHandler.sync(this);
- _la = _input.LA(1);
- }
- }
- }
-
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class StatementContext extends ParserRuleContext {
- public ReturnStatementContext returnStatement() {
- return getRuleContext(ReturnStatementContext.class,0);
- }
- public TerminalNode Semicolon() { return getToken(SimpleJavaParser.Semicolon, 0); }
- public LocalVariableDeclarationContext localVariableDeclaration() {
- return getRuleContext(LocalVariableDeclarationContext.class,0);
- }
- public BlockStatementContext blockStatement() {
- return getRuleContext(BlockStatementContext.class,0);
- }
- public WhileStatementContext whileStatement() {
- return getRuleContext(WhileStatementContext.class,0);
- }
- public DoWhileStatementContext doWhileStatement() {
- return getRuleContext(DoWhileStatementContext.class,0);
- }
- public ForStatementContext forStatement() {
- return getRuleContext(ForStatementContext.class,0);
- }
- public IfElseStatementContext ifElseStatement() {
- return getRuleContext(IfElseStatementContext.class,0);
- }
- public StatementExpressionContext statementExpression() {
- return getRuleContext(StatementExpressionContext.class,0);
- }
- public StatementContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_statement; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterStatement(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitStatement(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitStatement(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final StatementContext statement() throws RecognitionException {
- StatementContext _localctx = new StatementContext(_ctx, getState());
- enterRule(_localctx, 18, RULE_statement);
- try {
- setState(187);
- _errHandler.sync(this);
- switch ( getInterpreter().adaptivePredict(_input,14,_ctx) ) {
- case 1:
- enterOuterAlt(_localctx, 1);
- {
- setState(173);
- returnStatement();
- setState(174);
- match(Semicolon);
- }
- break;
- case 2:
- enterOuterAlt(_localctx, 2);
- {
- setState(176);
- localVariableDeclaration();
- setState(177);
- match(Semicolon);
- }
- break;
- case 3:
- enterOuterAlt(_localctx, 3);
- {
- setState(179);
- blockStatement();
- }
- break;
- case 4:
- enterOuterAlt(_localctx, 4);
- {
- setState(180);
- whileStatement();
- }
- break;
- case 5:
- enterOuterAlt(_localctx, 5);
- {
- setState(181);
- doWhileStatement();
- }
- break;
- case 6:
- enterOuterAlt(_localctx, 6);
- {
- setState(182);
- forStatement();
- }
- break;
- case 7:
- enterOuterAlt(_localctx, 7);
- {
- setState(183);
- ifElseStatement();
- }
- break;
- case 8:
- enterOuterAlt(_localctx, 8);
- {
- setState(184);
- statementExpression();
- setState(185);
- match(Semicolon);
- }
- break;
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class BlockStatementContext extends ParserRuleContext {
- public TerminalNode OpenCurlyBracket() { return getToken(SimpleJavaParser.OpenCurlyBracket, 0); }
- public TerminalNode ClosedCurlyBracket() { return getToken(SimpleJavaParser.ClosedCurlyBracket, 0); }
- public List statement() {
- return getRuleContexts(StatementContext.class);
- }
- public StatementContext statement(int i) {
- return getRuleContext(StatementContext.class,i);
- }
- public BlockStatementContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_blockStatement; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterBlockStatement(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitBlockStatement(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitBlockStatement(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final BlockStatementContext blockStatement() throws RecognitionException {
- BlockStatementContext _localctx = new BlockStatementContext(_ctx, getState());
- enterRule(_localctx, 20, RULE_blockStatement);
- int _la;
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(189);
- match(OpenCurlyBracket);
- setState(193);
- _errHandler.sync(this);
- _la = _input.LA(1);
- while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 297901079134326L) != 0)) {
- {
- {
- setState(190);
- statement();
- }
- }
- setState(195);
- _errHandler.sync(this);
- _la = _input.LA(1);
- }
- setState(196);
- match(ClosedCurlyBracket);
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class ReturnStatementContext extends ParserRuleContext {
- public TerminalNode Return() { return getToken(SimpleJavaParser.Return, 0); }
- public ExpressionContext expression() {
- return getRuleContext(ExpressionContext.class,0);
- }
- public ReturnStatementContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_returnStatement; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterReturnStatement(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitReturnStatement(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitReturnStatement(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final ReturnStatementContext returnStatement() throws RecognitionException {
- ReturnStatementContext _localctx = new ReturnStatementContext(_ctx, getState());
- enterRule(_localctx, 22, RULE_returnStatement);
- int _la;
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(198);
- match(Return);
- setState(200);
- _errHandler.sync(this);
- _la = _input.LA(1);
- if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 554223150301190L) != 0)) {
- {
- setState(199);
- expression();
- }
- }
-
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class LocalVariableDeclarationContext extends ParserRuleContext {
- public TypeContext type() {
- return getRuleContext(TypeContext.class,0);
- }
- public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
- public TerminalNode Assign() { return getToken(SimpleJavaParser.Assign, 0); }
- public ExpressionContext expression() {
- return getRuleContext(ExpressionContext.class,0);
- }
- public LocalVariableDeclarationContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_localVariableDeclaration; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterLocalVariableDeclaration(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitLocalVariableDeclaration(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitLocalVariableDeclaration(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final LocalVariableDeclarationContext localVariableDeclaration() throws RecognitionException {
- LocalVariableDeclarationContext _localctx = new LocalVariableDeclarationContext(_ctx, getState());
- enterRule(_localctx, 24, RULE_localVariableDeclaration);
- int _la;
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(202);
- type();
- setState(203);
- match(Identifier);
- setState(206);
- _errHandler.sync(this);
- _la = _input.LA(1);
- if (_la==Assign) {
- {
- setState(204);
- match(Assign);
- setState(205);
- expression();
- }
- }
-
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class WhileStatementContext extends ParserRuleContext {
- public TerminalNode While() { return getToken(SimpleJavaParser.While, 0); }
- public TerminalNode OpenRoundBracket() { return getToken(SimpleJavaParser.OpenRoundBracket, 0); }
- public ExpressionContext expression() {
- return getRuleContext(ExpressionContext.class,0);
- }
- public TerminalNode ClosedRoundBracket() { return getToken(SimpleJavaParser.ClosedRoundBracket, 0); }
- public BlockStatementContext blockStatement() {
- return getRuleContext(BlockStatementContext.class,0);
- }
- public WhileStatementContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_whileStatement; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterWhileStatement(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitWhileStatement(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitWhileStatement(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final WhileStatementContext whileStatement() throws RecognitionException {
- WhileStatementContext _localctx = new WhileStatementContext(_ctx, getState());
- enterRule(_localctx, 26, RULE_whileStatement);
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(208);
- match(While);
- setState(209);
- match(OpenRoundBracket);
- setState(210);
- expression();
- setState(211);
- match(ClosedRoundBracket);
- setState(212);
- blockStatement();
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class DoWhileStatementContext extends ParserRuleContext {
- public TerminalNode Do() { return getToken(SimpleJavaParser.Do, 0); }
- public BlockStatementContext blockStatement() {
- return getRuleContext(BlockStatementContext.class,0);
- }
- public TerminalNode While() { return getToken(SimpleJavaParser.While, 0); }
- public TerminalNode OpenRoundBracket() { return getToken(SimpleJavaParser.OpenRoundBracket, 0); }
- public ExpressionContext expression() {
- return getRuleContext(ExpressionContext.class,0);
- }
- public TerminalNode ClosedRoundBracket() { return getToken(SimpleJavaParser.ClosedRoundBracket, 0); }
- public TerminalNode Semicolon() { return getToken(SimpleJavaParser.Semicolon, 0); }
- public DoWhileStatementContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_doWhileStatement; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterDoWhileStatement(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitDoWhileStatement(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitDoWhileStatement(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final DoWhileStatementContext doWhileStatement() throws RecognitionException {
- DoWhileStatementContext _localctx = new DoWhileStatementContext(_ctx, getState());
- enterRule(_localctx, 28, RULE_doWhileStatement);
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(214);
- match(Do);
- setState(215);
- blockStatement();
- setState(216);
- match(While);
- setState(217);
- match(OpenRoundBracket);
- setState(218);
- expression();
- setState(219);
- match(ClosedRoundBracket);
- setState(220);
- match(Semicolon);
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class ForStatementContext extends ParserRuleContext {
- public TerminalNode For() { return getToken(SimpleJavaParser.For, 0); }
- public TerminalNode OpenRoundBracket() { return getToken(SimpleJavaParser.OpenRoundBracket, 0); }
- public List Semicolon() { return getTokens(SimpleJavaParser.Semicolon); }
- public TerminalNode Semicolon(int i) {
- return getToken(SimpleJavaParser.Semicolon, i);
- }
- public TerminalNode ClosedRoundBracket() { return getToken(SimpleJavaParser.ClosedRoundBracket, 0); }
- public BlockStatementContext blockStatement() {
- return getRuleContext(BlockStatementContext.class,0);
- }
- public List statementExpression() {
- return getRuleContexts(StatementExpressionContext.class);
- }
- public StatementExpressionContext statementExpression(int i) {
- return getRuleContext(StatementExpressionContext.class,i);
- }
- public LocalVariableDeclarationContext localVariableDeclaration() {
- return getRuleContext(LocalVariableDeclarationContext.class,0);
- }
- public ExpressionContext expression() {
- return getRuleContext(ExpressionContext.class,0);
- }
- public ForStatementContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_forStatement; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterForStatement(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitForStatement(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitForStatement(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final ForStatementContext forStatement() throws RecognitionException {
- ForStatementContext _localctx = new ForStatementContext(_ctx, getState());
- enterRule(_localctx, 30, RULE_forStatement);
- int _la;
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(222);
- match(For);
- setState(223);
- match(OpenRoundBracket);
- setState(226);
- _errHandler.sync(this);
- switch ( getInterpreter().adaptivePredict(_input,18,_ctx) ) {
- case 1:
- {
- setState(224);
- statementExpression();
- }
- break;
- case 2:
- {
- setState(225);
- localVariableDeclaration();
- }
- break;
- }
- setState(228);
- match(Semicolon);
- setState(230);
- _errHandler.sync(this);
- _la = _input.LA(1);
- if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 554223150301190L) != 0)) {
- {
- setState(229);
- expression();
- }
- }
-
- setState(232);
- match(Semicolon);
- setState(234);
- _errHandler.sync(this);
- _la = _input.LA(1);
- if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 290339789209606L) != 0)) {
- {
- setState(233);
- statementExpression();
- }
- }
-
- setState(236);
- match(ClosedRoundBracket);
- setState(237);
- blockStatement();
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class IfElseStatementContext extends ParserRuleContext {
- public IfStatementContext ifStatement() {
- return getRuleContext(IfStatementContext.class,0);
- }
- public List elseIfStatement() {
- return getRuleContexts(ElseIfStatementContext.class);
- }
- public ElseIfStatementContext elseIfStatement(int i) {
- return getRuleContext(ElseIfStatementContext.class,i);
- }
- public ElseStatementContext elseStatement() {
- return getRuleContext(ElseStatementContext.class,0);
- }
- public IfElseStatementContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_ifElseStatement; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterIfElseStatement(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitIfElseStatement(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitIfElseStatement(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final IfElseStatementContext ifElseStatement() throws RecognitionException {
- IfElseStatementContext _localctx = new IfElseStatementContext(_ctx, getState());
- enterRule(_localctx, 32, RULE_ifElseStatement);
- int _la;
- try {
- int _alt;
- enterOuterAlt(_localctx, 1);
- {
- setState(239);
- ifStatement();
- setState(243);
- _errHandler.sync(this);
- _alt = getInterpreter().adaptivePredict(_input,21,_ctx);
- while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
- if ( _alt==1 ) {
- {
- {
- setState(240);
- elseIfStatement();
- }
- }
- }
- setState(245);
- _errHandler.sync(this);
- _alt = getInterpreter().adaptivePredict(_input,21,_ctx);
- }
- setState(247);
- _errHandler.sync(this);
- _la = _input.LA(1);
- if (_la==Else) {
- {
- setState(246);
- elseStatement();
- }
- }
-
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class IfStatementContext extends ParserRuleContext {
- public TerminalNode If() { return getToken(SimpleJavaParser.If, 0); }
- public TerminalNode OpenRoundBracket() { return getToken(SimpleJavaParser.OpenRoundBracket, 0); }
- public ExpressionContext expression() {
- return getRuleContext(ExpressionContext.class,0);
- }
- public TerminalNode ClosedRoundBracket() { return getToken(SimpleJavaParser.ClosedRoundBracket, 0); }
- public BlockStatementContext blockStatement() {
- return getRuleContext(BlockStatementContext.class,0);
- }
- public IfStatementContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_ifStatement; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterIfStatement(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitIfStatement(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitIfStatement(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final IfStatementContext ifStatement() throws RecognitionException {
- IfStatementContext _localctx = new IfStatementContext(_ctx, getState());
- enterRule(_localctx, 34, RULE_ifStatement);
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(249);
- match(If);
- setState(250);
- match(OpenRoundBracket);
- setState(251);
- expression();
- setState(252);
- match(ClosedRoundBracket);
- setState(253);
- blockStatement();
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class ElseIfStatementContext extends ParserRuleContext {
- public TerminalNode Else() { return getToken(SimpleJavaParser.Else, 0); }
- public TerminalNode If() { return getToken(SimpleJavaParser.If, 0); }
- public TerminalNode OpenRoundBracket() { return getToken(SimpleJavaParser.OpenRoundBracket, 0); }
- public ExpressionContext expression() {
- return getRuleContext(ExpressionContext.class,0);
- }
- public TerminalNode ClosedRoundBracket() { return getToken(SimpleJavaParser.ClosedRoundBracket, 0); }
- public BlockStatementContext blockStatement() {
- return getRuleContext(BlockStatementContext.class,0);
- }
- public ElseIfStatementContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_elseIfStatement; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterElseIfStatement(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitElseIfStatement(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitElseIfStatement(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final ElseIfStatementContext elseIfStatement() throws RecognitionException {
- ElseIfStatementContext _localctx = new ElseIfStatementContext(_ctx, getState());
- enterRule(_localctx, 36, RULE_elseIfStatement);
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(255);
- match(Else);
- setState(256);
- match(If);
- setState(257);
- match(OpenRoundBracket);
- setState(258);
- expression();
- setState(259);
- match(ClosedRoundBracket);
- setState(260);
- blockStatement();
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class ElseStatementContext extends ParserRuleContext {
- public TerminalNode Else() { return getToken(SimpleJavaParser.Else, 0); }
- public BlockStatementContext blockStatement() {
- return getRuleContext(BlockStatementContext.class,0);
- }
- public ElseStatementContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_elseStatement; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterElseStatement(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitElseStatement(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitElseStatement(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final ElseStatementContext elseStatement() throws RecognitionException {
- ElseStatementContext _localctx = new ElseStatementContext(_ctx, getState());
- enterRule(_localctx, 38, RULE_elseStatement);
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(262);
- match(Else);
- setState(263);
- blockStatement();
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class StatementExpressionContext extends ParserRuleContext {
- public AssignContext assign() {
- return getRuleContext(AssignContext.class,0);
- }
- public NewDeclarationContext newDeclaration() {
- return getRuleContext(NewDeclarationContext.class,0);
- }
- public MethodCallContext methodCall() {
- return getRuleContext(MethodCallContext.class,0);
- }
- public CrementExpressionContext crementExpression() {
- return getRuleContext(CrementExpressionContext.class,0);
- }
- public StatementExpressionContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_statementExpression; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterStatementExpression(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitStatementExpression(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitStatementExpression(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final StatementExpressionContext statementExpression() throws RecognitionException {
- StatementExpressionContext _localctx = new StatementExpressionContext(_ctx, getState());
- enterRule(_localctx, 40, RULE_statementExpression);
- try {
- setState(269);
- _errHandler.sync(this);
- switch ( getInterpreter().adaptivePredict(_input,23,_ctx) ) {
- case 1:
- enterOuterAlt(_localctx, 1);
- {
- setState(265);
- assign();
- }
- break;
- case 2:
- enterOuterAlt(_localctx, 2);
- {
- setState(266);
- newDeclaration();
- }
- break;
- case 3:
- enterOuterAlt(_localctx, 3);
- {
- setState(267);
- methodCall();
- }
- break;
- case 4:
- enterOuterAlt(_localctx, 4);
- {
- setState(268);
- crementExpression();
- }
- break;
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class AssignContext extends ParserRuleContext {
- public AssignableExpressionContext assignableExpression() {
- return getRuleContext(AssignableExpressionContext.class,0);
- }
- public TerminalNode Assign() { return getToken(SimpleJavaParser.Assign, 0); }
- public ExpressionContext expression() {
- return getRuleContext(ExpressionContext.class,0);
- }
- public AssignContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_assign; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterAssign(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitAssign(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitAssign(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final AssignContext assign() throws RecognitionException {
- AssignContext _localctx = new AssignContext(_ctx, getState());
- enterRule(_localctx, 42, RULE_assign);
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(271);
- assignableExpression();
- setState(272);
- match(Assign);
- setState(273);
- expression();
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class NewDeclarationContext extends ParserRuleContext {
- public TerminalNode New() { return getToken(SimpleJavaParser.New, 0); }
- public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
- public TerminalNode OpenRoundBracket() { return getToken(SimpleJavaParser.OpenRoundBracket, 0); }
- public ArgumentListContext argumentList() {
- return getRuleContext(ArgumentListContext.class,0);
- }
- public TerminalNode ClosedRoundBracket() { return getToken(SimpleJavaParser.ClosedRoundBracket, 0); }
- public NewDeclarationContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_newDeclaration; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterNewDeclaration(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitNewDeclaration(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitNewDeclaration(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final NewDeclarationContext newDeclaration() throws RecognitionException {
- NewDeclarationContext _localctx = new NewDeclarationContext(_ctx, getState());
- enterRule(_localctx, 44, RULE_newDeclaration);
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(275);
- match(New);
- setState(276);
- match(Identifier);
- setState(277);
- match(OpenRoundBracket);
- setState(278);
- argumentList();
- setState(279);
- match(ClosedRoundBracket);
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class ExpressionContext extends ParserRuleContext {
- public UnaryExpressionContext unaryExpression() {
- return getRuleContext(UnaryExpressionContext.class,0);
- }
- public BinaryExpressionContext binaryExpression() {
- return getRuleContext(BinaryExpressionContext.class,0);
- }
- public ExpressionContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_expression; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterExpression(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitExpression(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitExpression(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final ExpressionContext expression() throws RecognitionException {
- ExpressionContext _localctx = new ExpressionContext(_ctx, getState());
- enterRule(_localctx, 46, RULE_expression);
- try {
- setState(283);
- _errHandler.sync(this);
- switch ( getInterpreter().adaptivePredict(_input,24,_ctx) ) {
- case 1:
- enterOuterAlt(_localctx, 1);
- {
- setState(281);
- unaryExpression();
- }
- break;
- case 2:
- enterOuterAlt(_localctx, 2);
- {
- setState(282);
- binaryExpression();
- }
- break;
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class UnaryExpressionContext extends ParserRuleContext {
- public TerminalNode This() { return getToken(SimpleJavaParser.This, 0); }
- public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
- public MemberAccessContext memberAccess() {
- return getRuleContext(MemberAccessContext.class,0);
- }
- public ValueContext value() {
- return getRuleContext(ValueContext.class,0);
- }
- public NotExpressionContext notExpression() {
- return getRuleContext(NotExpressionContext.class,0);
- }
- public StatementExpressionContext statementExpression() {
- return getRuleContext(StatementExpressionContext.class,0);
- }
- public TerminalNode OpenRoundBracket() { return getToken(SimpleJavaParser.OpenRoundBracket, 0); }
- public ExpressionContext expression() {
- return getRuleContext(ExpressionContext.class,0);
- }
- public TerminalNode ClosedRoundBracket() { return getToken(SimpleJavaParser.ClosedRoundBracket, 0); }
- public UnaryExpressionContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_unaryExpression; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterUnaryExpression(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitUnaryExpression(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitUnaryExpression(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final UnaryExpressionContext unaryExpression() throws RecognitionException {
- UnaryExpressionContext _localctx = new UnaryExpressionContext(_ctx, getState());
- enterRule(_localctx, 48, RULE_unaryExpression);
- try {
- setState(295);
- _errHandler.sync(this);
- switch ( getInterpreter().adaptivePredict(_input,25,_ctx) ) {
- case 1:
- enterOuterAlt(_localctx, 1);
- {
- setState(285);
- match(This);
- }
- break;
- case 2:
- enterOuterAlt(_localctx, 2);
- {
- setState(286);
- match(Identifier);
- }
- break;
- case 3:
- enterOuterAlt(_localctx, 3);
- {
- setState(287);
- memberAccess();
- }
- break;
- case 4:
- enterOuterAlt(_localctx, 4);
- {
- setState(288);
- value();
- }
- break;
- case 5:
- enterOuterAlt(_localctx, 5);
- {
- setState(289);
- notExpression();
- }
- break;
- case 6:
- enterOuterAlt(_localctx, 6);
- {
- setState(290);
- statementExpression();
- }
- break;
- case 7:
- enterOuterAlt(_localctx, 7);
- {
- setState(291);
- match(OpenRoundBracket);
- setState(292);
- expression();
- setState(293);
- match(ClosedRoundBracket);
- }
- break;
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class NotExpressionContext extends ParserRuleContext {
- public TerminalNode Not() { return getToken(SimpleJavaParser.Not, 0); }
- public ExpressionContext expression() {
- return getRuleContext(ExpressionContext.class,0);
- }
- public NotExpressionContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_notExpression; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterNotExpression(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitNotExpression(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitNotExpression(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final NotExpressionContext notExpression() throws RecognitionException {
- NotExpressionContext _localctx = new NotExpressionContext(_ctx, getState());
- enterRule(_localctx, 50, RULE_notExpression);
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(297);
- match(Not);
- setState(298);
- expression();
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class CrementExpressionContext extends ParserRuleContext {
- public IncrementExpressionContext incrementExpression() {
- return getRuleContext(IncrementExpressionContext.class,0);
- }
- public DecrementExpressionContext decrementExpression() {
- return getRuleContext(DecrementExpressionContext.class,0);
- }
- public CrementExpressionContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_crementExpression; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterCrementExpression(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitCrementExpression(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitCrementExpression(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final CrementExpressionContext crementExpression() throws RecognitionException {
- CrementExpressionContext _localctx = new CrementExpressionContext(_ctx, getState());
- enterRule(_localctx, 52, RULE_crementExpression);
- try {
- setState(302);
- _errHandler.sync(this);
- switch ( getInterpreter().adaptivePredict(_input,26,_ctx) ) {
- case 1:
- enterOuterAlt(_localctx, 1);
- {
- setState(300);
- incrementExpression();
- }
- break;
- case 2:
- enterOuterAlt(_localctx, 2);
- {
- setState(301);
- decrementExpression();
- }
- break;
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class IncrementExpressionContext extends ParserRuleContext {
- public PrefixIncrementExpressionContext prefixIncrementExpression() {
- return getRuleContext(PrefixIncrementExpressionContext.class,0);
- }
- public SuffixIncrementExpressionContext suffixIncrementExpression() {
- return getRuleContext(SuffixIncrementExpressionContext.class,0);
- }
- public IncrementExpressionContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_incrementExpression; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterIncrementExpression(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitIncrementExpression(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitIncrementExpression(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final IncrementExpressionContext incrementExpression() throws RecognitionException {
- IncrementExpressionContext _localctx = new IncrementExpressionContext(_ctx, getState());
- enterRule(_localctx, 54, RULE_incrementExpression);
- try {
- setState(306);
- _errHandler.sync(this);
- switch (_input.LA(1)) {
- case T__0:
- enterOuterAlt(_localctx, 1);
- {
- setState(304);
- prefixIncrementExpression();
- }
- break;
- case This:
- case Identifier:
- enterOuterAlt(_localctx, 2);
- {
- setState(305);
- suffixIncrementExpression();
- }
- break;
- default:
- throw new NoViableAltException(this);
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class PrefixIncrementExpressionContext extends ParserRuleContext {
- public AssignableExpressionContext assignableExpression() {
- return getRuleContext(AssignableExpressionContext.class,0);
- }
- public PrefixIncrementExpressionContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_prefixIncrementExpression; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterPrefixIncrementExpression(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitPrefixIncrementExpression(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitPrefixIncrementExpression(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final PrefixIncrementExpressionContext prefixIncrementExpression() throws RecognitionException {
- PrefixIncrementExpressionContext _localctx = new PrefixIncrementExpressionContext(_ctx, getState());
- enterRule(_localctx, 56, RULE_prefixIncrementExpression);
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(308);
- match(T__0);
- setState(309);
- assignableExpression();
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class SuffixIncrementExpressionContext extends ParserRuleContext {
- public AssignableExpressionContext assignableExpression() {
- return getRuleContext(AssignableExpressionContext.class,0);
- }
- public SuffixIncrementExpressionContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_suffixIncrementExpression; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterSuffixIncrementExpression(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitSuffixIncrementExpression(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitSuffixIncrementExpression(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final SuffixIncrementExpressionContext suffixIncrementExpression() throws RecognitionException {
- SuffixIncrementExpressionContext _localctx = new SuffixIncrementExpressionContext(_ctx, getState());
- enterRule(_localctx, 58, RULE_suffixIncrementExpression);
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(311);
- assignableExpression();
- setState(312);
- match(T__0);
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class DecrementExpressionContext extends ParserRuleContext {
- public PrefixDecrementExpressionContext prefixDecrementExpression() {
- return getRuleContext(PrefixDecrementExpressionContext.class,0);
- }
- public SuffixDecrementExpressionContext suffixDecrementExpression() {
- return getRuleContext(SuffixDecrementExpressionContext.class,0);
- }
- public DecrementExpressionContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_decrementExpression; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterDecrementExpression(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitDecrementExpression(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitDecrementExpression(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final DecrementExpressionContext decrementExpression() throws RecognitionException {
- DecrementExpressionContext _localctx = new DecrementExpressionContext(_ctx, getState());
- enterRule(_localctx, 60, RULE_decrementExpression);
- try {
- setState(316);
- _errHandler.sync(this);
- switch (_input.LA(1)) {
- case T__1:
- enterOuterAlt(_localctx, 1);
- {
- setState(314);
- prefixDecrementExpression();
- }
- break;
- case This:
- case Identifier:
- enterOuterAlt(_localctx, 2);
- {
- setState(315);
- suffixDecrementExpression();
- }
- break;
- default:
- throw new NoViableAltException(this);
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class PrefixDecrementExpressionContext extends ParserRuleContext {
- public AssignableExpressionContext assignableExpression() {
- return getRuleContext(AssignableExpressionContext.class,0);
- }
- public PrefixDecrementExpressionContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_prefixDecrementExpression; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterPrefixDecrementExpression(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitPrefixDecrementExpression(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitPrefixDecrementExpression(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final PrefixDecrementExpressionContext prefixDecrementExpression() throws RecognitionException {
- PrefixDecrementExpressionContext _localctx = new PrefixDecrementExpressionContext(_ctx, getState());
- enterRule(_localctx, 62, RULE_prefixDecrementExpression);
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(318);
- match(T__1);
- setState(319);
- assignableExpression();
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class SuffixDecrementExpressionContext extends ParserRuleContext {
- public AssignableExpressionContext assignableExpression() {
- return getRuleContext(AssignableExpressionContext.class,0);
- }
- public SuffixDecrementExpressionContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_suffixDecrementExpression; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterSuffixDecrementExpression(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitSuffixDecrementExpression(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitSuffixDecrementExpression(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final SuffixDecrementExpressionContext suffixDecrementExpression() throws RecognitionException {
- SuffixDecrementExpressionContext _localctx = new SuffixDecrementExpressionContext(_ctx, getState());
- enterRule(_localctx, 64, RULE_suffixDecrementExpression);
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(321);
- assignableExpression();
- setState(322);
- match(T__1);
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class AssignableExpressionContext extends ParserRuleContext {
- public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
- public MemberAccessContext memberAccess() {
- return getRuleContext(MemberAccessContext.class,0);
- }
- public AssignableExpressionContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_assignableExpression; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterAssignableExpression(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitAssignableExpression(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitAssignableExpression(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final AssignableExpressionContext assignableExpression() throws RecognitionException {
- AssignableExpressionContext _localctx = new AssignableExpressionContext(_ctx, getState());
- enterRule(_localctx, 66, RULE_assignableExpression);
- try {
- setState(326);
- _errHandler.sync(this);
- switch ( getInterpreter().adaptivePredict(_input,29,_ctx) ) {
- case 1:
- enterOuterAlt(_localctx, 1);
- {
- setState(324);
- match(Identifier);
- }
- break;
- case 2:
- enterOuterAlt(_localctx, 2);
- {
- setState(325);
- memberAccess();
- }
- break;
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class MemberAccessContext extends ParserRuleContext {
- public TerminalNode This() { return getToken(SimpleJavaParser.This, 0); }
- public List Dot() { return getTokens(SimpleJavaParser.Dot); }
- public TerminalNode Dot(int i) {
- return getToken(SimpleJavaParser.Dot, i);
- }
- public List Identifier() { return getTokens(SimpleJavaParser.Identifier); }
- public TerminalNode Identifier(int i) {
- return getToken(SimpleJavaParser.Identifier, i);
- }
- public MemberAccessContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_memberAccess; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterMemberAccess(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitMemberAccess(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitMemberAccess(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final MemberAccessContext memberAccess() throws RecognitionException {
- MemberAccessContext _localctx = new MemberAccessContext(_ctx, getState());
- enterRule(_localctx, 68, RULE_memberAccess);
- int _la;
- try {
- int _alt;
- setState(342);
- _errHandler.sync(this);
- switch ( getInterpreter().adaptivePredict(_input,32,_ctx) ) {
- case 1:
- enterOuterAlt(_localctx, 1);
- {
- setState(328);
- match(This);
- setState(329);
- match(Dot);
- setState(330);
- match(Identifier);
- }
- break;
- case 2:
- enterOuterAlt(_localctx, 2);
- {
- setState(333);
- _errHandler.sync(this);
- _la = _input.LA(1);
- if (_la==This) {
- {
- setState(331);
- match(This);
- setState(332);
- match(Dot);
- }
- }
-
- setState(337);
- _errHandler.sync(this);
- _alt = 1;
- do {
- switch (_alt) {
- case 1:
- {
- {
- setState(335);
- match(Identifier);
- setState(336);
- match(Dot);
- }
- }
- break;
- default:
- throw new NoViableAltException(this);
- }
- setState(339);
- _errHandler.sync(this);
- _alt = getInterpreter().adaptivePredict(_input,31,_ctx);
- } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER );
- setState(341);
- match(Identifier);
- }
- break;
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class BinaryExpressionContext extends ParserRuleContext {
- public CalculationExpressionContext calculationExpression() {
- return getRuleContext(CalculationExpressionContext.class,0);
- }
- public NonCalculationExpressionContext nonCalculationExpression() {
- return getRuleContext(NonCalculationExpressionContext.class,0);
- }
- public BinaryExpressionContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_binaryExpression; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterBinaryExpression(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitBinaryExpression(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitBinaryExpression(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final BinaryExpressionContext binaryExpression() throws RecognitionException {
- BinaryExpressionContext _localctx = new BinaryExpressionContext(_ctx, getState());
- enterRule(_localctx, 70, RULE_binaryExpression);
- try {
- setState(346);
- _errHandler.sync(this);
- switch ( getInterpreter().adaptivePredict(_input,33,_ctx) ) {
- case 1:
- enterOuterAlt(_localctx, 1);
- {
- setState(344);
- calculationExpression(0);
- }
- break;
- case 2:
- enterOuterAlt(_localctx, 2);
- {
- setState(345);
- nonCalculationExpression();
- }
- break;
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class CalculationExpressionContext extends ParserRuleContext {
- public DotExpressionContext dotExpression() {
- return getRuleContext(DotExpressionContext.class,0);
- }
- public CalculationExpressionContext calculationExpression() {
- return getRuleContext(CalculationExpressionContext.class,0);
- }
- public TerminalNode LineOperator() { return getToken(SimpleJavaParser.LineOperator, 0); }
- public CalculationExpressionContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_calculationExpression; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterCalculationExpression(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitCalculationExpression(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitCalculationExpression(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final CalculationExpressionContext calculationExpression() throws RecognitionException {
- return calculationExpression(0);
- }
-
- private CalculationExpressionContext calculationExpression(int _p) throws RecognitionException {
- ParserRuleContext _parentctx = _ctx;
- int _parentState = getState();
- CalculationExpressionContext _localctx = new CalculationExpressionContext(_ctx, _parentState);
- CalculationExpressionContext _prevctx = _localctx;
- int _startState = 72;
- enterRecursionRule(_localctx, 72, RULE_calculationExpression, _p);
- try {
- int _alt;
- enterOuterAlt(_localctx, 1);
- {
- {
- setState(349);
- dotExpression(0);
- }
- _ctx.stop = _input.LT(-1);
- setState(356);
- _errHandler.sync(this);
- _alt = getInterpreter().adaptivePredict(_input,34,_ctx);
- while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
- if ( _alt==1 ) {
- if ( _parseListeners!=null ) triggerExitRuleEvent();
- _prevctx = _localctx;
- {
- {
- _localctx = new CalculationExpressionContext(_parentctx, _parentState);
- pushNewRecursionContext(_localctx, _startState, RULE_calculationExpression);
- setState(351);
- if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)");
- setState(352);
- match(LineOperator);
- setState(353);
- dotExpression(0);
- }
- }
- }
- setState(358);
- _errHandler.sync(this);
- _alt = getInterpreter().adaptivePredict(_input,34,_ctx);
- }
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- unrollRecursionContexts(_parentctx);
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class DotExpressionContext extends ParserRuleContext {
- public DotSubtractionExpressionContext dotSubtractionExpression() {
- return getRuleContext(DotSubtractionExpressionContext.class,0);
- }
- public DotExpressionContext dotExpression() {
- return getRuleContext(DotExpressionContext.class,0);
- }
- public TerminalNode DotOperator() { return getToken(SimpleJavaParser.DotOperator, 0); }
- public DotExpressionContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_dotExpression; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterDotExpression(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitDotExpression(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitDotExpression(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final DotExpressionContext dotExpression() throws RecognitionException {
- return dotExpression(0);
- }
-
- private DotExpressionContext dotExpression(int _p) throws RecognitionException {
- ParserRuleContext _parentctx = _ctx;
- int _parentState = getState();
- DotExpressionContext _localctx = new DotExpressionContext(_ctx, _parentState);
- DotExpressionContext _prevctx = _localctx;
- int _startState = 74;
- enterRecursionRule(_localctx, 74, RULE_dotExpression, _p);
- try {
- int _alt;
- enterOuterAlt(_localctx, 1);
- {
- {
- setState(360);
- dotSubtractionExpression();
- }
- _ctx.stop = _input.LT(-1);
- setState(367);
- _errHandler.sync(this);
- _alt = getInterpreter().adaptivePredict(_input,35,_ctx);
- while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
- if ( _alt==1 ) {
- if ( _parseListeners!=null ) triggerExitRuleEvent();
- _prevctx = _localctx;
- {
- {
- _localctx = new DotExpressionContext(_parentctx, _parentState);
- pushNewRecursionContext(_localctx, _startState, RULE_dotExpression);
- setState(362);
- if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)");
- setState(363);
- match(DotOperator);
- setState(364);
- dotSubtractionExpression();
- }
- }
- }
- setState(369);
- _errHandler.sync(this);
- _alt = getInterpreter().adaptivePredict(_input,35,_ctx);
- }
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- unrollRecursionContexts(_parentctx);
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class DotSubtractionExpressionContext extends ParserRuleContext {
- public TerminalNode IntValue() { return getToken(SimpleJavaParser.IntValue, 0); }
- public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
- public MemberAccessContext memberAccess() {
- return getRuleContext(MemberAccessContext.class,0);
- }
- public MethodCallContext methodCall() {
- return getRuleContext(MethodCallContext.class,0);
- }
- public TerminalNode OpenRoundBracket() { return getToken(SimpleJavaParser.OpenRoundBracket, 0); }
- public CalculationExpressionContext calculationExpression() {
- return getRuleContext(CalculationExpressionContext.class,0);
- }
- public TerminalNode ClosedRoundBracket() { return getToken(SimpleJavaParser.ClosedRoundBracket, 0); }
- public DotSubtractionExpressionContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_dotSubtractionExpression; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterDotSubtractionExpression(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitDotSubtractionExpression(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitDotSubtractionExpression(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final DotSubtractionExpressionContext dotSubtractionExpression() throws RecognitionException {
- DotSubtractionExpressionContext _localctx = new DotSubtractionExpressionContext(_ctx, getState());
- enterRule(_localctx, 76, RULE_dotSubtractionExpression);
- try {
- setState(378);
- _errHandler.sync(this);
- switch ( getInterpreter().adaptivePredict(_input,36,_ctx) ) {
- case 1:
- enterOuterAlt(_localctx, 1);
- {
- setState(370);
- match(IntValue);
- }
- break;
- case 2:
- enterOuterAlt(_localctx, 2);
- {
- setState(371);
- match(Identifier);
- }
- break;
- case 3:
- enterOuterAlt(_localctx, 3);
- {
- setState(372);
- memberAccess();
- }
- break;
- case 4:
- enterOuterAlt(_localctx, 4);
- {
- setState(373);
- methodCall();
- setState(374);
- match(OpenRoundBracket);
- setState(375);
- calculationExpression(0);
- setState(376);
- match(ClosedRoundBracket);
- }
- break;
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class NonCalculationExpressionContext extends ParserRuleContext {
- public UnaryExpressionContext unaryExpression() {
- return getRuleContext(UnaryExpressionContext.class,0);
- }
- public NonCalculationOperatorContext nonCalculationOperator() {
- return getRuleContext(NonCalculationOperatorContext.class,0);
- }
- public ExpressionContext expression() {
- return getRuleContext(ExpressionContext.class,0);
- }
- public NonCalculationExpressionContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_nonCalculationExpression; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterNonCalculationExpression(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitNonCalculationExpression(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitNonCalculationExpression(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final NonCalculationExpressionContext nonCalculationExpression() throws RecognitionException {
- NonCalculationExpressionContext _localctx = new NonCalculationExpressionContext(_ctx, getState());
- enterRule(_localctx, 78, RULE_nonCalculationExpression);
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(380);
- unaryExpression();
- setState(381);
- nonCalculationOperator();
- setState(382);
- expression();
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class MethodCallContext extends ParserRuleContext {
- public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
- public TerminalNode OpenRoundBracket() { return getToken(SimpleJavaParser.OpenRoundBracket, 0); }
- public ArgumentListContext argumentList() {
- return getRuleContext(ArgumentListContext.class,0);
- }
- public TerminalNode ClosedRoundBracket() { return getToken(SimpleJavaParser.ClosedRoundBracket, 0); }
- public TargetContext target() {
- return getRuleContext(TargetContext.class,0);
- }
- public List chainedMethod() {
- return getRuleContexts(ChainedMethodContext.class);
- }
- public ChainedMethodContext chainedMethod(int i) {
- return getRuleContext(ChainedMethodContext.class,i);
- }
- public MethodCallContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_methodCall; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterMethodCall(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitMethodCall(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitMethodCall(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final MethodCallContext methodCall() throws RecognitionException {
- MethodCallContext _localctx = new MethodCallContext(_ctx, getState());
- enterRule(_localctx, 80, RULE_methodCall);
- try {
- int _alt;
- enterOuterAlt(_localctx, 1);
- {
- setState(385);
- _errHandler.sync(this);
- switch ( getInterpreter().adaptivePredict(_input,37,_ctx) ) {
- case 1:
- {
- setState(384);
- target();
- }
- break;
- }
- setState(390);
- _errHandler.sync(this);
- _alt = getInterpreter().adaptivePredict(_input,38,_ctx);
- while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
- if ( _alt==1 ) {
- {
- {
- setState(387);
- chainedMethod();
- }
- }
- }
- setState(392);
- _errHandler.sync(this);
- _alt = getInterpreter().adaptivePredict(_input,38,_ctx);
- }
- setState(393);
- match(Identifier);
- setState(394);
- match(OpenRoundBracket);
- setState(395);
- argumentList();
- setState(396);
- match(ClosedRoundBracket);
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class TargetContext extends ParserRuleContext {
- public TerminalNode Dot() { return getToken(SimpleJavaParser.Dot, 0); }
- public TerminalNode This() { return getToken(SimpleJavaParser.This, 0); }
- public MemberAccessContext memberAccess() {
- return getRuleContext(MemberAccessContext.class,0);
- }
- public NewDeclarationContext newDeclaration() {
- return getRuleContext(NewDeclarationContext.class,0);
- }
- public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
- public TargetContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_target; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterTarget(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitTarget(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitTarget(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final TargetContext target() throws RecognitionException {
- TargetContext _localctx = new TargetContext(_ctx, getState());
- enterRule(_localctx, 82, RULE_target);
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(402);
- _errHandler.sync(this);
- switch ( getInterpreter().adaptivePredict(_input,39,_ctx) ) {
- case 1:
- {
- setState(398);
- match(This);
- }
- break;
- case 2:
- {
- setState(399);
- memberAccess();
- }
- break;
- case 3:
- {
- setState(400);
- newDeclaration();
- }
- break;
- case 4:
- {
- setState(401);
- match(Identifier);
- }
- break;
- }
- setState(404);
- match(Dot);
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class ChainedMethodContext extends ParserRuleContext {
- public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
- public TerminalNode OpenRoundBracket() { return getToken(SimpleJavaParser.OpenRoundBracket, 0); }
- public ArgumentListContext argumentList() {
- return getRuleContext(ArgumentListContext.class,0);
- }
- public TerminalNode ClosedRoundBracket() { return getToken(SimpleJavaParser.ClosedRoundBracket, 0); }
- public TerminalNode Dot() { return getToken(SimpleJavaParser.Dot, 0); }
- public ChainedMethodContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_chainedMethod; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterChainedMethod(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitChainedMethod(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitChainedMethod(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final ChainedMethodContext chainedMethod() throws RecognitionException {
- ChainedMethodContext _localctx = new ChainedMethodContext(_ctx, getState());
- enterRule(_localctx, 84, RULE_chainedMethod);
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(406);
- match(Identifier);
- setState(407);
- match(OpenRoundBracket);
- setState(408);
- argumentList();
- setState(409);
- match(ClosedRoundBracket);
- setState(410);
- match(Dot);
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class TypeContext extends ParserRuleContext {
- public TerminalNode Int() { return getToken(SimpleJavaParser.Int, 0); }
- public TerminalNode Boolean() { return getToken(SimpleJavaParser.Boolean, 0); }
- public TerminalNode Char() { return getToken(SimpleJavaParser.Char, 0); }
- public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
- public TypeContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_type; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterType(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitType(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitType(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final TypeContext type() throws RecognitionException {
- TypeContext _localctx = new TypeContext(_ctx, getState());
- enterRule(_localctx, 86, RULE_type);
- int _la;
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(412);
- _la = _input.LA(1);
- if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 281474976710768L) != 0)) ) {
- _errHandler.recoverInline(this);
- }
- else {
- if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
- _errHandler.reportMatch(this);
- consume();
- }
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class ValueContext extends ParserRuleContext {
- public TerminalNode IntValue() { return getToken(SimpleJavaParser.IntValue, 0); }
- public TerminalNode BooleanValue() { return getToken(SimpleJavaParser.BooleanValue, 0); }
- public TerminalNode CharValue() { return getToken(SimpleJavaParser.CharValue, 0); }
- public TerminalNode NullValue() { return getToken(SimpleJavaParser.NullValue, 0); }
- public ValueContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_value; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterValue(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitValue(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitValue(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final ValueContext value() throws RecognitionException {
- ValueContext _localctx = new ValueContext(_ctx, getState());
- enterRule(_localctx, 88, RULE_value);
- int _la;
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(414);
- _la = _input.LA(1);
- if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 263882790666240L) != 0)) ) {
- _errHandler.recoverInline(this);
- }
- else {
- if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
- _errHandler.reportMatch(this);
- consume();
- }
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class NonCalculationOperatorContext extends ParserRuleContext {
- public TerminalNode LogicalOperator() { return getToken(SimpleJavaParser.LogicalOperator, 0); }
- public TerminalNode ComparisonOperator() { return getToken(SimpleJavaParser.ComparisonOperator, 0); }
- public NonCalculationOperatorContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_nonCalculationOperator; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterNonCalculationOperator(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitNonCalculationOperator(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitNonCalculationOperator(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final NonCalculationOperatorContext nonCalculationOperator() throws RecognitionException {
- NonCalculationOperatorContext _localctx = new NonCalculationOperatorContext(_ctx, getState());
- enterRule(_localctx, 90, RULE_nonCalculationOperator);
- int _la;
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(416);
- _la = _input.LA(1);
- if ( !(_la==ComparisonOperator || _la==LogicalOperator) ) {
- _errHandler.recoverInline(this);
- }
- else {
- if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
- _errHandler.reportMatch(this);
- consume();
- }
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) {
- switch (ruleIndex) {
- case 36:
- return calculationExpression_sempred((CalculationExpressionContext)_localctx, predIndex);
- case 37:
- return dotExpression_sempred((DotExpressionContext)_localctx, predIndex);
- }
- return true;
- }
- private boolean calculationExpression_sempred(CalculationExpressionContext _localctx, int predIndex) {
- switch (predIndex) {
- case 0:
- return precpred(_ctx, 2);
- }
- return true;
- }
- private boolean dotExpression_sempred(DotExpressionContext _localctx, int predIndex) {
- switch (predIndex) {
- case 1:
- return precpred(_ctx, 2);
- }
- return true;
- }
-
- public static final String _serializedATN =
- "\u0004\u00013\u01a3\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"+
- "\f\u0007\f\u0002\r\u0007\r\u0002\u000e\u0007\u000e\u0002\u000f\u0007\u000f"+
- "\u0002\u0010\u0007\u0010\u0002\u0011\u0007\u0011\u0002\u0012\u0007\u0012"+
- "\u0002\u0013\u0007\u0013\u0002\u0014\u0007\u0014\u0002\u0015\u0007\u0015"+
- "\u0002\u0016\u0007\u0016\u0002\u0017\u0007\u0017\u0002\u0018\u0007\u0018"+
- "\u0002\u0019\u0007\u0019\u0002\u001a\u0007\u001a\u0002\u001b\u0007\u001b"+
- "\u0002\u001c\u0007\u001c\u0002\u001d\u0007\u001d\u0002\u001e\u0007\u001e"+
- "\u0002\u001f\u0007\u001f\u0002 \u0007 \u0002!\u0007!\u0002\"\u0007\"\u0002"+
- "#\u0007#\u0002$\u0007$\u0002%\u0007%\u0002&\u0007&\u0002\'\u0007\'\u0002"+
- "(\u0007(\u0002)\u0007)\u0002*\u0007*\u0002+\u0007+\u0002,\u0007,\u0002"+
- "-\u0007-\u0001\u0000\u0004\u0000^\b\u0000\u000b\u0000\f\u0000_\u0001\u0001"+
- "\u0003\u0001c\b\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001"+
- "\u0005\u0001i\b\u0001\n\u0001\f\u0001l\t\u0001\u0001\u0001\u0001\u0001"+
- "\u0001\u0002\u0001\u0002\u0001\u0002\u0003\u0002s\b\u0002\u0001\u0003"+
- "\u0003\u0003v\b\u0003\u0001\u0003\u0001\u0003\u0001\u0003\u0003\u0003"+
- "{\b\u0003\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0004\u0003\u0004"+
- "\u0081\b\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0005"+
- "\u0001\u0005\u0001\u0005\u0003\u0005\u008a\b\u0005\u0001\u0005\u0001\u0005"+
- "\u0003\u0005\u008e\b\u0005\u0001\u0005\u0001\u0005\u0001\u0005\u0003\u0005"+
- "\u0093\b\u0005\u0001\u0005\u0001\u0005\u0003\u0005\u0097\b\u0005\u0001"+
- "\u0006\u0001\u0006\u0001\u0006\u0005\u0006\u009c\b\u0006\n\u0006\f\u0006"+
- "\u009f\t\u0006\u0001\u0007\u0001\u0007\u0001\u0007\u0001\b\u0001\b\u0001"+
- "\b\u0005\b\u00a7\b\b\n\b\f\b\u00aa\t\b\u0003\b\u00ac\b\b\u0001\t\u0001"+
- "\t\u0001\t\u0001\t\u0001\t\u0001\t\u0001\t\u0001\t\u0001\t\u0001\t\u0001"+
- "\t\u0001\t\u0001\t\u0001\t\u0003\t\u00bc\b\t\u0001\n\u0001\n\u0005\n\u00c0"+
- "\b\n\n\n\f\n\u00c3\t\n\u0001\n\u0001\n\u0001\u000b\u0001\u000b\u0003\u000b"+
- "\u00c9\b\u000b\u0001\f\u0001\f\u0001\f\u0001\f\u0003\f\u00cf\b\f\u0001"+
- "\r\u0001\r\u0001\r\u0001\r\u0001\r\u0001\r\u0001\u000e\u0001\u000e\u0001"+
- "\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0001"+
- "\u000f\u0001\u000f\u0001\u000f\u0001\u000f\u0003\u000f\u00e3\b\u000f\u0001"+
- "\u000f\u0001\u000f\u0003\u000f\u00e7\b\u000f\u0001\u000f\u0001\u000f\u0003"+
- "\u000f\u00eb\b\u000f\u0001\u000f\u0001\u000f\u0001\u000f\u0001\u0010\u0001"+
- "\u0010\u0005\u0010\u00f2\b\u0010\n\u0010\f\u0010\u00f5\t\u0010\u0001\u0010"+
- "\u0003\u0010\u00f8\b\u0010\u0001\u0011\u0001\u0011\u0001\u0011\u0001\u0011"+
- "\u0001\u0011\u0001\u0011\u0001\u0012\u0001\u0012\u0001\u0012\u0001\u0012"+
- "\u0001\u0012\u0001\u0012\u0001\u0012\u0001\u0013\u0001\u0013\u0001\u0013"+
- "\u0001\u0014\u0001\u0014\u0001\u0014\u0001\u0014\u0003\u0014\u010e\b\u0014"+
- "\u0001\u0015\u0001\u0015\u0001\u0015\u0001\u0015\u0001\u0016\u0001\u0016"+
- "\u0001\u0016\u0001\u0016\u0001\u0016\u0001\u0016\u0001\u0017\u0001\u0017"+
- "\u0003\u0017\u011c\b\u0017\u0001\u0018\u0001\u0018\u0001\u0018\u0001\u0018"+
- "\u0001\u0018\u0001\u0018\u0001\u0018\u0001\u0018\u0001\u0018\u0001\u0018"+
- "\u0003\u0018\u0128\b\u0018\u0001\u0019\u0001\u0019\u0001\u0019\u0001\u001a"+
- "\u0001\u001a\u0003\u001a\u012f\b\u001a\u0001\u001b\u0001\u001b\u0003\u001b"+
- "\u0133\b\u001b\u0001\u001c\u0001\u001c\u0001\u001c\u0001\u001d\u0001\u001d"+
- "\u0001\u001d\u0001\u001e\u0001\u001e\u0003\u001e\u013d\b\u001e\u0001\u001f"+
- "\u0001\u001f\u0001\u001f\u0001 \u0001 \u0001 \u0001!\u0001!\u0003!\u0147"+
- "\b!\u0001\"\u0001\"\u0001\"\u0001\"\u0001\"\u0003\"\u014e\b\"\u0001\""+
- "\u0001\"\u0004\"\u0152\b\"\u000b\"\f\"\u0153\u0001\"\u0003\"\u0157\b\""+
- "\u0001#\u0001#\u0003#\u015b\b#\u0001$\u0001$\u0001$\u0001$\u0001$\u0001"+
- "$\u0005$\u0163\b$\n$\f$\u0166\t$\u0001%\u0001%\u0001%\u0001%\u0001%\u0001"+
- "%\u0005%\u016e\b%\n%\f%\u0171\t%\u0001&\u0001&\u0001&\u0001&\u0001&\u0001"+
- "&\u0001&\u0001&\u0003&\u017b\b&\u0001\'\u0001\'\u0001\'\u0001\'\u0001"+
- "(\u0003(\u0182\b(\u0001(\u0005(\u0185\b(\n(\f(\u0188\t(\u0001(\u0001("+
- "\u0001(\u0001(\u0001(\u0001)\u0001)\u0001)\u0001)\u0003)\u0193\b)\u0001"+
- ")\u0001)\u0001*\u0001*\u0001*\u0001*\u0001*\u0001*\u0001+\u0001+\u0001"+
- ",\u0001,\u0001-\u0001-\u0001-\u0000\u0002HJ.\u0000\u0002\u0004\u0006\b"+
- "\n\f\u000e\u0010\u0012\u0014\u0016\u0018\u001a\u001c\u001e \"$&(*,.02"+
- "468:<>@BDFHJLNPRTVXZ\u0000\u0003\u0002\u0000\u0004\u000600\u0001\u0000"+
- ",/\u0001\u0000\u000b\f\u01ae\u0000]\u0001\u0000\u0000\u0000\u0002b\u0001"+
- "\u0000\u0000\u0000\u0004r\u0001\u0000\u0000\u0000\u0006u\u0001\u0000\u0000"+
- "\u0000\b\u0080\u0001\u0000\u0000\u0000\n\u0096\u0001\u0000\u0000\u0000"+
- "\f\u0098\u0001\u0000\u0000\u0000\u000e\u00a0\u0001\u0000\u0000\u0000\u0010"+
- "\u00ab\u0001\u0000\u0000\u0000\u0012\u00bb\u0001\u0000\u0000\u0000\u0014"+
- "\u00bd\u0001\u0000\u0000\u0000\u0016\u00c6\u0001\u0000\u0000\u0000\u0018"+
- "\u00ca\u0001\u0000\u0000\u0000\u001a\u00d0\u0001\u0000\u0000\u0000\u001c"+
- "\u00d6\u0001\u0000\u0000\u0000\u001e\u00de\u0001\u0000\u0000\u0000 \u00ef"+
- "\u0001\u0000\u0000\u0000\"\u00f9\u0001\u0000\u0000\u0000$\u00ff\u0001"+
- "\u0000\u0000\u0000&\u0106\u0001\u0000\u0000\u0000(\u010d\u0001\u0000\u0000"+
- "\u0000*\u010f\u0001\u0000\u0000\u0000,\u0113\u0001\u0000\u0000\u0000."+
- "\u011b\u0001\u0000\u0000\u00000\u0127\u0001\u0000\u0000\u00002\u0129\u0001"+
- "\u0000\u0000\u00004\u012e\u0001\u0000\u0000\u00006\u0132\u0001\u0000\u0000"+
- "\u00008\u0134\u0001\u0000\u0000\u0000:\u0137\u0001\u0000\u0000\u0000<"+
- "\u013c\u0001\u0000\u0000\u0000>\u013e\u0001\u0000\u0000\u0000@\u0141\u0001"+
- "\u0000\u0000\u0000B\u0146\u0001\u0000\u0000\u0000D\u0156\u0001\u0000\u0000"+
- "\u0000F\u015a\u0001\u0000\u0000\u0000H\u015c\u0001\u0000\u0000\u0000J"+
- "\u0167\u0001\u0000\u0000\u0000L\u017a\u0001\u0000\u0000\u0000N\u017c\u0001"+
- "\u0000\u0000\u0000P\u0181\u0001\u0000\u0000\u0000R\u0192\u0001\u0000\u0000"+
- "\u0000T\u0196\u0001\u0000\u0000\u0000V\u019c\u0001\u0000\u0000\u0000X"+
- "\u019e\u0001\u0000\u0000\u0000Z\u01a0\u0001\u0000\u0000\u0000\\^\u0003"+
- "\u0002\u0001\u0000]\\\u0001\u0000\u0000\u0000^_\u0001\u0000\u0000\u0000"+
- "_]\u0001\u0000\u0000\u0000_`\u0001\u0000\u0000\u0000`\u0001\u0001\u0000"+
- "\u0000\u0000ac\u0005\u0007\u0000\u0000ba\u0001\u0000\u0000\u0000bc\u0001"+
- "\u0000\u0000\u0000cd\u0001\u0000\u0000\u0000de\u0005#\u0000\u0000ef\u0005"+
- "0\u0000\u0000fj\u0005\u001f\u0000\u0000gi\u0003\u0004\u0002\u0000hg\u0001"+
- "\u0000\u0000\u0000il\u0001\u0000\u0000\u0000jh\u0001\u0000\u0000\u0000"+
- "jk\u0001\u0000\u0000\u0000km\u0001\u0000\u0000\u0000lj\u0001\u0000\u0000"+
- "\u0000mn\u0005 \u0000\u0000n\u0003\u0001\u0000\u0000\u0000os\u0003\u0006"+
- "\u0003\u0000ps\u0003\b\u0004\u0000qs\u0003\n\u0005\u0000ro\u0001\u0000"+
- "\u0000\u0000rp\u0001\u0000\u0000\u0000rq\u0001\u0000\u0000\u0000s\u0005"+
- "\u0001\u0000\u0000\u0000tv\u0005\u0007\u0000\u0000ut\u0001\u0000\u0000"+
- "\u0000uv\u0001\u0000\u0000\u0000vw\u0001\u0000\u0000\u0000wx\u00050\u0000"+
- "\u0000xz\u0005\u001d\u0000\u0000y{\u0003\f\u0006\u0000zy\u0001\u0000\u0000"+
- "\u0000z{\u0001\u0000\u0000\u0000{|\u0001\u0000\u0000\u0000|}\u0005\u001e"+
- "\u0000\u0000}~\u0003\u0014\n\u0000~\u0007\u0001\u0000\u0000\u0000\u007f"+
- "\u0081\u0005\u0007\u0000\u0000\u0080\u007f\u0001\u0000\u0000\u0000\u0080"+
- "\u0081\u0001\u0000\u0000\u0000\u0081\u0082\u0001\u0000\u0000\u0000\u0082"+
- "\u0083\u0003V+\u0000\u0083\u0084\u00050\u0000\u0000\u0084\u0085\u0005"+
- "!\u0000\u0000\u0085\t\u0001\u0000\u0000\u0000\u0086\u0087\u0005\b\u0000"+
- "\u0000\u0087\u0097\u0003\u0014\n\u0000\u0088\u008a\u0005\u0007\u0000\u0000"+
- "\u0089\u0088\u0001\u0000\u0000\u0000\u0089\u008a\u0001\u0000\u0000\u0000"+
- "\u008a\u008d\u0001\u0000\u0000\u0000\u008b\u008e\u0003V+\u0000\u008c\u008e"+
- "\u0005\u0003\u0000\u0000\u008d\u008b\u0001\u0000\u0000\u0000\u008d\u008c"+
- "\u0001\u0000\u0000\u0000\u008e\u008f\u0001\u0000\u0000\u0000\u008f\u0090"+
- "\u00050\u0000\u0000\u0090\u0092\u0005\u001d\u0000\u0000\u0091\u0093\u0003"+
- "\f\u0006\u0000\u0092\u0091\u0001\u0000\u0000\u0000\u0092\u0093\u0001\u0000"+
- "\u0000\u0000\u0093\u0094\u0001\u0000\u0000\u0000\u0094\u0095\u0005\u001e"+
- "\u0000\u0000\u0095\u0097\u0003\u0014\n\u0000\u0096\u0086\u0001\u0000\u0000"+
- "\u0000\u0096\u0089\u0001\u0000\u0000\u0000\u0097\u000b\u0001\u0000\u0000"+
- "\u0000\u0098\u009d\u0003\u000e\u0007\u0000\u0099\u009a\u0005\"\u0000\u0000"+
- "\u009a\u009c\u0003\u000e\u0007\u0000\u009b\u0099\u0001\u0000\u0000\u0000"+
- "\u009c\u009f\u0001\u0000\u0000\u0000\u009d\u009b\u0001\u0000\u0000\u0000"+
- "\u009d\u009e\u0001\u0000\u0000\u0000\u009e\r\u0001\u0000\u0000\u0000\u009f"+
- "\u009d\u0001\u0000\u0000\u0000\u00a0\u00a1\u0003V+\u0000\u00a1\u00a2\u0005"+
- "0\u0000\u0000\u00a2\u000f\u0001\u0000\u0000\u0000\u00a3\u00a8\u0003.\u0017"+
- "\u0000\u00a4\u00a5\u0005\"\u0000\u0000\u00a5\u00a7\u0003.\u0017\u0000"+
- "\u00a6\u00a4\u0001\u0000\u0000\u0000\u00a7\u00aa\u0001\u0000\u0000\u0000"+
- "\u00a8\u00a6\u0001\u0000\u0000\u0000\u00a8\u00a9\u0001\u0000\u0000\u0000"+
- "\u00a9\u00ac\u0001\u0000\u0000\u0000\u00aa\u00a8\u0001\u0000\u0000\u0000"+
- "\u00ab\u00a3\u0001\u0000\u0000\u0000\u00ab\u00ac\u0001\u0000\u0000\u0000"+
- "\u00ac\u0011\u0001\u0000\u0000\u0000\u00ad\u00ae\u0003\u0016\u000b\u0000"+
- "\u00ae\u00af\u0005!\u0000\u0000\u00af\u00bc\u0001\u0000\u0000\u0000\u00b0"+
- "\u00b1\u0003\u0018\f\u0000\u00b1\u00b2\u0005!\u0000\u0000\u00b2\u00bc"+
- "\u0001\u0000\u0000\u0000\u00b3\u00bc\u0003\u0014\n\u0000\u00b4\u00bc\u0003"+
- "\u001a\r\u0000\u00b5\u00bc\u0003\u001c\u000e\u0000\u00b6\u00bc\u0003\u001e"+
- "\u000f\u0000\u00b7\u00bc\u0003 \u0010\u0000\u00b8\u00b9\u0003(\u0014\u0000"+
- "\u00b9\u00ba\u0005!\u0000\u0000\u00ba\u00bc\u0001\u0000\u0000\u0000\u00bb"+
- "\u00ad\u0001\u0000\u0000\u0000\u00bb\u00b0\u0001\u0000\u0000\u0000\u00bb"+
- "\u00b3\u0001\u0000\u0000\u0000\u00bb\u00b4\u0001\u0000\u0000\u0000\u00bb"+
- "\u00b5\u0001\u0000\u0000\u0000\u00bb\u00b6\u0001\u0000\u0000\u0000\u00bb"+
- "\u00b7\u0001\u0000\u0000\u0000\u00bb\u00b8\u0001\u0000\u0000\u0000\u00bc"+
- "\u0013\u0001\u0000\u0000\u0000\u00bd\u00c1\u0005\u001f\u0000\u0000\u00be"+
- "\u00c0\u0003\u0012\t\u0000\u00bf\u00be\u0001\u0000\u0000\u0000\u00c0\u00c3"+
- "\u0001\u0000\u0000\u0000\u00c1\u00bf\u0001\u0000\u0000\u0000\u00c1\u00c2"+
- "\u0001\u0000\u0000\u0000\u00c2\u00c4\u0001\u0000\u0000\u0000\u00c3\u00c1"+
- "\u0001\u0000\u0000\u0000\u00c4\u00c5\u0005 \u0000\u0000\u00c5\u0015\u0001"+
- "\u0000\u0000\u0000\u00c6\u00c8\u0005*\u0000\u0000\u00c7\u00c9\u0003.\u0017"+
- "\u0000\u00c8\u00c7\u0001\u0000\u0000\u0000\u00c8\u00c9\u0001\u0000\u0000"+
- "\u0000\u00c9\u0017\u0001\u0000\u0000\u0000\u00ca\u00cb\u0003V+\u0000\u00cb"+
- "\u00ce\u00050\u0000\u0000\u00cc\u00cd\u0005\r\u0000\u0000\u00cd\u00cf"+
- "\u0003.\u0017\u0000\u00ce\u00cc\u0001\u0000\u0000\u0000\u00ce\u00cf\u0001"+
- "\u0000\u0000\u0000\u00cf\u0019\u0001\u0000\u0000\u0000\u00d0\u00d1\u0005"+
- "%\u0000\u0000\u00d1\u00d2\u0005\u001d\u0000\u0000\u00d2\u00d3\u0003.\u0017"+
- "\u0000\u00d3\u00d4\u0005\u001e\u0000\u0000\u00d4\u00d5\u0003\u0014\n\u0000"+
- "\u00d5\u001b\u0001\u0000\u0000\u0000\u00d6\u00d7\u0005&\u0000\u0000\u00d7"+
- "\u00d8\u0003\u0014\n\u0000\u00d8\u00d9\u0005%\u0000\u0000\u00d9\u00da"+
- "\u0005\u001d\u0000\u0000\u00da\u00db\u0003.\u0017\u0000\u00db\u00dc\u0005"+
- "\u001e\u0000\u0000\u00dc\u00dd\u0005!\u0000\u0000\u00dd\u001d\u0001\u0000"+
- "\u0000\u0000\u00de\u00df\u0005)\u0000\u0000\u00df\u00e2\u0005\u001d\u0000"+
- "\u0000\u00e0\u00e3\u0003(\u0014\u0000\u00e1\u00e3\u0003\u0018\f\u0000"+
- "\u00e2\u00e0\u0001\u0000\u0000\u0000\u00e2\u00e1\u0001\u0000\u0000\u0000"+
- "\u00e3\u00e4\u0001\u0000\u0000\u0000\u00e4\u00e6\u0005!\u0000\u0000\u00e5"+
- "\u00e7\u0003.\u0017\u0000\u00e6\u00e5\u0001\u0000\u0000\u0000\u00e6\u00e7"+
- "\u0001\u0000\u0000\u0000\u00e7\u00e8\u0001\u0000\u0000\u0000\u00e8\u00ea"+
- "\u0005!\u0000\u0000\u00e9\u00eb\u0003(\u0014\u0000\u00ea\u00e9\u0001\u0000"+
- "\u0000\u0000\u00ea\u00eb\u0001\u0000\u0000\u0000\u00eb\u00ec\u0001\u0000"+
- "\u0000\u0000\u00ec\u00ed\u0005\u001e\u0000\u0000\u00ed\u00ee\u0003\u0014"+
- "\n\u0000\u00ee\u001f\u0001\u0000\u0000\u0000\u00ef\u00f3\u0003\"\u0011"+
- "\u0000\u00f0\u00f2\u0003$\u0012\u0000\u00f1\u00f0\u0001\u0000\u0000\u0000"+
- "\u00f2\u00f5\u0001\u0000\u0000\u0000\u00f3\u00f1\u0001\u0000\u0000\u0000"+
- "\u00f3\u00f4\u0001\u0000\u0000\u0000\u00f4\u00f7\u0001\u0000\u0000\u0000"+
- "\u00f5\u00f3\u0001\u0000\u0000\u0000\u00f6\u00f8\u0003&\u0013\u0000\u00f7"+
- "\u00f6\u0001\u0000\u0000\u0000\u00f7\u00f8\u0001\u0000\u0000\u0000\u00f8"+
- "!\u0001\u0000\u0000\u0000\u00f9\u00fa\u0005\'\u0000\u0000\u00fa\u00fb"+
- "\u0005\u001d\u0000\u0000\u00fb\u00fc\u0003.\u0017\u0000\u00fc\u00fd\u0005"+
- "\u001e\u0000\u0000\u00fd\u00fe\u0003\u0014\n\u0000\u00fe#\u0001\u0000"+
- "\u0000\u0000\u00ff\u0100\u0005(\u0000\u0000\u0100\u0101\u0005\'\u0000"+
- "\u0000\u0101\u0102\u0005\u001d\u0000\u0000\u0102\u0103\u0003.\u0017\u0000"+
- "\u0103\u0104\u0005\u001e\u0000\u0000\u0104\u0105\u0003\u0014\n\u0000\u0105"+
- "%\u0001\u0000\u0000\u0000\u0106\u0107\u0005(\u0000\u0000\u0107\u0108\u0003"+
- "\u0014\n\u0000\u0108\'\u0001\u0000\u0000\u0000\u0109\u010e\u0003*\u0015"+
- "\u0000\u010a\u010e\u0003,\u0016\u0000\u010b\u010e\u0003P(\u0000\u010c"+
- "\u010e\u00034\u001a\u0000\u010d\u0109\u0001\u0000\u0000\u0000\u010d\u010a"+
- "\u0001\u0000\u0000\u0000\u010d\u010b\u0001\u0000\u0000\u0000\u010d\u010c"+
- "\u0001\u0000\u0000\u0000\u010e)\u0001\u0000\u0000\u0000\u010f\u0110\u0003"+
- "B!\u0000\u0110\u0111\u0005\r\u0000\u0000\u0111\u0112\u0003.\u0017\u0000"+
- "\u0112+\u0001\u0000\u0000\u0000\u0113\u0114\u0005+\u0000\u0000\u0114\u0115"+
- "\u00050\u0000\u0000\u0115\u0116\u0005\u001d\u0000\u0000\u0116\u0117\u0003"+
- "\u0010\b\u0000\u0117\u0118\u0005\u001e\u0000\u0000\u0118-\u0001\u0000"+
- "\u0000\u0000\u0119\u011c\u00030\u0018\u0000\u011a\u011c\u0003F#\u0000"+
- "\u011b\u0119\u0001\u0000\u0000\u0000\u011b\u011a\u0001\u0000\u0000\u0000"+
- "\u011c/\u0001\u0000\u0000\u0000\u011d\u0128\u0005$\u0000\u0000\u011e\u0128"+
- "\u00050\u0000\u0000\u011f\u0128\u0003D\"\u0000\u0120\u0128\u0003X,\u0000"+
- "\u0121\u0128\u00032\u0019\u0000\u0122\u0128\u0003(\u0014\u0000\u0123\u0124"+
- "\u0005\u001d\u0000\u0000\u0124\u0125\u0003.\u0017\u0000\u0125\u0126\u0005"+
- "\u001e\u0000\u0000\u0126\u0128\u0001\u0000\u0000\u0000\u0127\u011d\u0001"+
- "\u0000\u0000\u0000\u0127\u011e\u0001\u0000\u0000\u0000\u0127\u011f\u0001"+
- "\u0000\u0000\u0000\u0127\u0120\u0001\u0000\u0000\u0000\u0127\u0121\u0001"+
- "\u0000\u0000\u0000\u0127\u0122\u0001\u0000\u0000\u0000\u0127\u0123\u0001"+
- "\u0000\u0000\u0000\u01281\u0001\u0000\u0000\u0000\u0129\u012a\u0005\u0019"+
- "\u0000\u0000\u012a\u012b\u0003.\u0017\u0000\u012b3\u0001\u0000\u0000\u0000"+
- "\u012c\u012f\u00036\u001b\u0000\u012d\u012f\u0003<\u001e\u0000\u012e\u012c"+
- "\u0001\u0000\u0000\u0000\u012e\u012d\u0001\u0000\u0000\u0000\u012f5\u0001"+
- "\u0000\u0000\u0000\u0130\u0133\u00038\u001c\u0000\u0131\u0133\u0003:\u001d"+
- "\u0000\u0132\u0130\u0001\u0000\u0000\u0000\u0132\u0131\u0001\u0000\u0000"+
- "\u0000\u01337\u0001\u0000\u0000\u0000\u0134\u0135\u0005\u0001\u0000\u0000"+
- "\u0135\u0136\u0003B!\u0000\u01369\u0001\u0000\u0000\u0000\u0137\u0138"+
- "\u0003B!\u0000\u0138\u0139\u0005\u0001\u0000\u0000\u0139;\u0001\u0000"+
- "\u0000\u0000\u013a\u013d\u0003>\u001f\u0000\u013b\u013d\u0003@ \u0000"+
- "\u013c\u013a\u0001\u0000\u0000\u0000\u013c\u013b\u0001\u0000\u0000\u0000"+
- "\u013d=\u0001\u0000\u0000\u0000\u013e\u013f\u0005\u0002\u0000\u0000\u013f"+
- "\u0140\u0003B!\u0000\u0140?\u0001\u0000\u0000\u0000\u0141\u0142\u0003"+
- "B!\u0000\u0142\u0143\u0005\u0002\u0000\u0000\u0143A\u0001\u0000\u0000"+
- "\u0000\u0144\u0147\u00050\u0000\u0000\u0145\u0147\u0003D\"\u0000\u0146"+
- "\u0144\u0001\u0000\u0000\u0000\u0146\u0145\u0001\u0000\u0000\u0000\u0147"+
- "C\u0001\u0000\u0000\u0000\u0148\u0149\u0005$\u0000\u0000\u0149\u014a\u0005"+
- "\u001c\u0000\u0000\u014a\u0157\u00050\u0000\u0000\u014b\u014c\u0005$\u0000"+
- "\u0000\u014c\u014e\u0005\u001c\u0000\u0000\u014d\u014b\u0001\u0000\u0000"+
- "\u0000\u014d\u014e\u0001\u0000\u0000\u0000\u014e\u0151\u0001\u0000\u0000"+
- "\u0000\u014f\u0150\u00050\u0000\u0000\u0150\u0152\u0005\u001c\u0000\u0000"+
- "\u0151\u014f\u0001\u0000\u0000\u0000\u0152\u0153\u0001\u0000\u0000\u0000"+
- "\u0153\u0151\u0001\u0000\u0000\u0000\u0153\u0154\u0001\u0000\u0000\u0000"+
- "\u0154\u0155\u0001\u0000\u0000\u0000\u0155\u0157\u00050\u0000\u0000\u0156"+
- "\u0148\u0001\u0000\u0000\u0000\u0156\u014d\u0001\u0000\u0000\u0000\u0157"+
- "E\u0001\u0000\u0000\u0000\u0158\u015b\u0003H$\u0000\u0159\u015b\u0003"+
- "N\'\u0000\u015a\u0158\u0001\u0000\u0000\u0000\u015a\u0159\u0001\u0000"+
- "\u0000\u0000\u015bG\u0001\u0000\u0000\u0000\u015c\u015d\u0006$\uffff\uffff"+
- "\u0000\u015d\u015e\u0003J%\u0000\u015e\u0164\u0001\u0000\u0000\u0000\u015f"+
- "\u0160\n\u0002\u0000\u0000\u0160\u0161\u0005\n\u0000\u0000\u0161\u0163"+
- "\u0003J%\u0000\u0162\u015f\u0001\u0000\u0000\u0000\u0163\u0166\u0001\u0000"+
- "\u0000\u0000\u0164\u0162\u0001\u0000\u0000\u0000\u0164\u0165\u0001\u0000"+
- "\u0000\u0000\u0165I\u0001\u0000\u0000\u0000\u0166\u0164\u0001\u0000\u0000"+
- "\u0000\u0167\u0168\u0006%\uffff\uffff\u0000\u0168\u0169\u0003L&\u0000"+
- "\u0169\u016f\u0001\u0000\u0000\u0000\u016a\u016b\n\u0002\u0000\u0000\u016b"+
- "\u016c\u0005\t\u0000\u0000\u016c\u016e\u0003L&\u0000\u016d\u016a\u0001"+
- "\u0000\u0000\u0000\u016e\u0171\u0001\u0000\u0000\u0000\u016f\u016d\u0001"+
- "\u0000\u0000\u0000\u016f\u0170\u0001\u0000\u0000\u0000\u0170K\u0001\u0000"+
- "\u0000\u0000\u0171\u016f\u0001\u0000\u0000\u0000\u0172\u017b\u0005-\u0000"+
- "\u0000\u0173\u017b\u00050\u0000\u0000\u0174\u017b\u0003D\"\u0000\u0175"+
- "\u0176\u0003P(\u0000\u0176\u0177\u0005\u001d\u0000\u0000\u0177\u0178\u0003"+
- "H$\u0000\u0178\u0179\u0005\u001e\u0000\u0000\u0179\u017b\u0001\u0000\u0000"+
- "\u0000\u017a\u0172\u0001\u0000\u0000\u0000\u017a\u0173\u0001\u0000\u0000"+
- "\u0000\u017a\u0174\u0001\u0000\u0000\u0000\u017a\u0175\u0001\u0000\u0000"+
- "\u0000\u017bM\u0001\u0000\u0000\u0000\u017c\u017d\u00030\u0018\u0000\u017d"+
- "\u017e\u0003Z-\u0000\u017e\u017f\u0003.\u0017\u0000\u017fO\u0001\u0000"+
- "\u0000\u0000\u0180\u0182\u0003R)\u0000\u0181\u0180\u0001\u0000\u0000\u0000"+
- "\u0181\u0182\u0001\u0000\u0000\u0000\u0182\u0186\u0001\u0000\u0000\u0000"+
- "\u0183\u0185\u0003T*\u0000\u0184\u0183\u0001\u0000\u0000\u0000\u0185\u0188"+
- "\u0001\u0000\u0000\u0000\u0186\u0184\u0001\u0000\u0000\u0000\u0186\u0187"+
- "\u0001\u0000\u0000\u0000\u0187\u0189\u0001\u0000\u0000\u0000\u0188\u0186"+
- "\u0001\u0000\u0000\u0000\u0189\u018a\u00050\u0000\u0000\u018a\u018b\u0005"+
- "\u001d\u0000\u0000\u018b\u018c\u0003\u0010\b\u0000\u018c\u018d\u0005\u001e"+
- "\u0000\u0000\u018dQ\u0001\u0000\u0000\u0000\u018e\u0193\u0005$\u0000\u0000"+
- "\u018f\u0193\u0003D\"\u0000\u0190\u0193\u0003,\u0016\u0000\u0191\u0193"+
- "\u00050\u0000\u0000\u0192\u018e\u0001\u0000\u0000\u0000\u0192\u018f\u0001"+
- "\u0000\u0000\u0000\u0192\u0190\u0001\u0000\u0000\u0000\u0192\u0191\u0001"+
- "\u0000\u0000\u0000\u0193\u0194\u0001\u0000\u0000\u0000\u0194\u0195\u0005"+
- "\u001c\u0000\u0000\u0195S\u0001\u0000\u0000\u0000\u0196\u0197\u00050\u0000"+
- "\u0000\u0197\u0198\u0005\u001d\u0000\u0000\u0198\u0199\u0003\u0010\b\u0000"+
- "\u0199\u019a\u0005\u001e\u0000\u0000\u019a\u019b\u0005\u001c\u0000\u0000"+
- "\u019bU\u0001\u0000\u0000\u0000\u019c\u019d\u0007\u0000\u0000\u0000\u019d"+
- "W\u0001\u0000\u0000\u0000\u019e\u019f\u0007\u0001\u0000\u0000\u019fY\u0001"+
- "\u0000\u0000\u0000\u01a0\u01a1\u0007\u0002\u0000\u0000\u01a1[\u0001\u0000"+
- "\u0000\u0000(_bjruz\u0080\u0089\u008d\u0092\u0096\u009d\u00a8\u00ab\u00bb"+
- "\u00c1\u00c8\u00ce\u00e2\u00e6\u00ea\u00f3\u00f7\u010d\u011b\u0127\u012e"+
- "\u0132\u013c\u0146\u014d\u0153\u0156\u015a\u0164\u016f\u017a\u0181\u0186"+
- "\u0192";
- public static final ATN _ATN =
- new ATNDeserializer().deserialize(_serializedATN.toCharArray());
- static {
- _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()];
- for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) {
- _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i);
- }
- }
-}
\ No newline at end of file
diff --git a/src/main/java/parser/generated/SimpleJavaVisitor.java b/src/main/java/parser/generated/SimpleJavaVisitor.java
deleted file mode 100644
index beefef9..0000000
--- a/src/main/java/parser/generated/SimpleJavaVisitor.java
+++ /dev/null
@@ -1,289 +0,0 @@
-// Generated from C:/Users/janni/Desktop/NichtHaskell2.0/src/main/java/parser/grammar/SimpleJava.g4 by ANTLR 4.13.1
-package parser.generated;
-import org.antlr.v4.runtime.tree.ParseTreeVisitor;
-
-/**
- * This interface defines a complete generic visitor for a parse tree produced
- * by {@link SimpleJavaParser}.
- *
- * @param The return type of the visit operation. Use {@link Void} for
- * operations with no return type.
- */
-public interface SimpleJavaVisitor extends ParseTreeVisitor {
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#program}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitProgram(SimpleJavaParser.ProgramContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#classDeclaration}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitClassDeclaration(SimpleJavaParser.ClassDeclarationContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#memberDeclaration}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitMemberDeclaration(SimpleJavaParser.MemberDeclarationContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#constructorDeclaration}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitConstructorDeclaration(SimpleJavaParser.ConstructorDeclarationContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#fieldDeclaration}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitFieldDeclaration(SimpleJavaParser.FieldDeclarationContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#methodDeclaration}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitMethodDeclaration(SimpleJavaParser.MethodDeclarationContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#parameterList}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitParameterList(SimpleJavaParser.ParameterListContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#parameter}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitParameter(SimpleJavaParser.ParameterContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#argumentList}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitArgumentList(SimpleJavaParser.ArgumentListContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#statement}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitStatement(SimpleJavaParser.StatementContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#blockStatement}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitBlockStatement(SimpleJavaParser.BlockStatementContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#returnStatement}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitReturnStatement(SimpleJavaParser.ReturnStatementContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#localVariableDeclaration}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitLocalVariableDeclaration(SimpleJavaParser.LocalVariableDeclarationContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#whileStatement}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitWhileStatement(SimpleJavaParser.WhileStatementContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#doWhileStatement}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitDoWhileStatement(SimpleJavaParser.DoWhileStatementContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#forStatement}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitForStatement(SimpleJavaParser.ForStatementContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#ifElseStatement}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitIfElseStatement(SimpleJavaParser.IfElseStatementContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#ifStatement}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitIfStatement(SimpleJavaParser.IfStatementContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#elseIfStatement}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitElseIfStatement(SimpleJavaParser.ElseIfStatementContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#elseStatement}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitElseStatement(SimpleJavaParser.ElseStatementContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#statementExpression}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitStatementExpression(SimpleJavaParser.StatementExpressionContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#assign}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitAssign(SimpleJavaParser.AssignContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#newDeclaration}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitNewDeclaration(SimpleJavaParser.NewDeclarationContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#expression}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitExpression(SimpleJavaParser.ExpressionContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#unaryExpression}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitUnaryExpression(SimpleJavaParser.UnaryExpressionContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#notExpression}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitNotExpression(SimpleJavaParser.NotExpressionContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#crementExpression}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitCrementExpression(SimpleJavaParser.CrementExpressionContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#incrementExpression}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitIncrementExpression(SimpleJavaParser.IncrementExpressionContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#prefixIncrementExpression}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitPrefixIncrementExpression(SimpleJavaParser.PrefixIncrementExpressionContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#suffixIncrementExpression}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitSuffixIncrementExpression(SimpleJavaParser.SuffixIncrementExpressionContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#decrementExpression}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitDecrementExpression(SimpleJavaParser.DecrementExpressionContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#prefixDecrementExpression}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitPrefixDecrementExpression(SimpleJavaParser.PrefixDecrementExpressionContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#suffixDecrementExpression}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitSuffixDecrementExpression(SimpleJavaParser.SuffixDecrementExpressionContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#assignableExpression}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitAssignableExpression(SimpleJavaParser.AssignableExpressionContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#memberAccess}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitMemberAccess(SimpleJavaParser.MemberAccessContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#binaryExpression}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitBinaryExpression(SimpleJavaParser.BinaryExpressionContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#calculationExpression}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitCalculationExpression(SimpleJavaParser.CalculationExpressionContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#dotExpression}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitDotExpression(SimpleJavaParser.DotExpressionContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#dotSubtractionExpression}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitDotSubtractionExpression(SimpleJavaParser.DotSubtractionExpressionContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#nonCalculationExpression}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitNonCalculationExpression(SimpleJavaParser.NonCalculationExpressionContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#methodCall}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitMethodCall(SimpleJavaParser.MethodCallContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#target}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitTarget(SimpleJavaParser.TargetContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#chainedMethod}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitChainedMethod(SimpleJavaParser.ChainedMethodContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#type}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitType(SimpleJavaParser.TypeContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#value}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitValue(SimpleJavaParser.ValueContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#nonCalculationOperator}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitNonCalculationOperator(SimpleJavaParser.NonCalculationOperatorContext ctx);
-}
\ No newline at end of file
diff --git a/src/main/java/parser/grammar/SimpleJava.g4 b/src/main/java/parser/grammar/SimpleJava.g4
index 51b7bc1..91b8920 100644
--- a/src/main/java/parser/grammar/SimpleJava.g4
+++ b/src/main/java/parser/grammar/SimpleJava.g4
@@ -7,7 +7,7 @@ classDeclaration: AccessModifier? 'class' Identifier OpenCurlyBracket memberDecl
memberDeclaration: constructorDeclaration | fieldDeclaration | methodDeclaration;
constructorDeclaration: AccessModifier? Identifier OpenRoundBracket parameterList? ClosedRoundBracket blockStatement;
-fieldDeclaration: AccessModifier? type Identifier Semicolon;
+fieldDeclaration: AccessModifier? type Identifier (Assign expression)? Semicolon;
methodDeclaration: MainMethodDeclaration blockStatement | AccessModifier? (type | Void) Identifier OpenRoundBracket parameterList? ClosedRoundBracket blockStatement;
parameterList: parameter (Comma parameter)*;
@@ -22,6 +22,7 @@ statement: returnStatement Semicolon
| doWhileStatement
| forStatement
| ifElseStatement
+ | switchStatement
| statementExpression Semicolon;
blockStatement: OpenCurlyBracket statement* ClosedCurlyBracket;
@@ -38,6 +39,10 @@ ifStatement: If OpenRoundBracket expression ClosedRoundBracket blockStatement;
elseIfStatement: Else If OpenRoundBracket expression ClosedRoundBracket blockStatement;
elseStatement: Else blockStatement;
+switchStatement: Switch OpenRoundBracket expression ClosedRoundBracket OpenCurlyBracket caseStatement+ defaultStatement? ClosedCurlyBracket;
+caseStatement: Case value Colon statement*;
+defaultStatement: Default Colon statement*;
+
statementExpression: assign | newDeclaration | methodCall | crementExpression;
assign: assignableExpression Assign expression;
newDeclaration: New Identifier OpenRoundBracket argumentList ClosedRoundBracket;
@@ -153,6 +158,10 @@ Else: 'else';
For: 'for';
Return: 'return';
New: 'new';
+Switch: 'switch';
+Case: 'case';
+Default: 'default';
+Colon: ':';
// Werte
CharValue: '\'' ~[\r\n]* '\'';
diff --git a/src/test/resources/input/javaCases/SwitchCase.java b/src/test/resources/input/javaCases/SwitchCase.java
new file mode 100644
index 0000000..124c521
--- /dev/null
+++ b/src/test/resources/input/javaCases/SwitchCase.java
@@ -0,0 +1,10 @@
+class TestClass{
+
+ TestClasd (){
+ switch (a){
+ case 1:
+ b = 1;
+
+ }
+ }
+}
\ No newline at end of file
--
2.34.1
From 437de74cc6f6a2db00f0bd1ce22d46108dc849d3 Mon Sep 17 00:00:00 2001
From: Purplumbi504
Date: Tue, 2 Jul 2024 19:13:59 +0200
Subject: [PATCH 10/96] New Grammer
---
.../java/parser/generated/SimpleJava.interp | 170 +
.../java/parser/generated/SimpleJava.tokens | 98 +
.../generated/SimpleJavaBaseListener.java | 628 +++
.../generated/SimpleJavaBaseVisitor.java | 358 ++
.../parser/generated/SimpleJavaLexer.interp | 185 +
.../parser/generated/SimpleJavaLexer.java | 417 ++
.../parser/generated/SimpleJavaLexer.tokens | 98 +
.../parser/generated/SimpleJavaListener.java | 500 +++
.../parser/generated/SimpleJavaParser.java | 3899 +++++++++++++++++
.../parser/generated/SimpleJavaVisitor.java | 307 ++
10 files changed, 6660 insertions(+)
create mode 100644 src/main/java/parser/generated/SimpleJava.interp
create mode 100644 src/main/java/parser/generated/SimpleJava.tokens
create mode 100644 src/main/java/parser/generated/SimpleJavaBaseListener.java
create mode 100644 src/main/java/parser/generated/SimpleJavaBaseVisitor.java
create mode 100644 src/main/java/parser/generated/SimpleJavaLexer.interp
create mode 100644 src/main/java/parser/generated/SimpleJavaLexer.java
create mode 100644 src/main/java/parser/generated/SimpleJavaLexer.tokens
create mode 100644 src/main/java/parser/generated/SimpleJavaListener.java
create mode 100644 src/main/java/parser/generated/SimpleJavaParser.java
create mode 100644 src/main/java/parser/generated/SimpleJavaVisitor.java
diff --git a/src/main/java/parser/generated/SimpleJava.interp b/src/main/java/parser/generated/SimpleJava.interp
new file mode 100644
index 0000000..1426547
--- /dev/null
+++ b/src/main/java/parser/generated/SimpleJava.interp
@@ -0,0 +1,170 @@
+token literal names:
+null
+'++'
+'--'
+'void'
+'boolean'
+'char'
+'int'
+null
+'public static void main(String[] args)'
+null
+null
+null
+null
+'='
+'+'
+'-'
+'*'
+'%'
+'/'
+'>'
+'<'
+'>='
+'<='
+'=='
+'!='
+'!'
+'&&'
+'||'
+'.'
+'('
+')'
+'{'
+'}'
+';'
+','
+'class'
+'this'
+'while'
+'do'
+'if'
+'else'
+'for'
+'return'
+'new'
+'switch'
+'case'
+'default'
+':'
+null
+null
+null
+'null'
+null
+null
+null
+null
+
+token symbolic names:
+null
+null
+null
+Void
+Boolean
+Char
+Int
+AccessModifier
+MainMethodDeclaration
+DotOperator
+LineOperator
+ComparisonOperator
+LogicalOperator
+Assign
+Plus
+Minus
+Mult
+Modulo
+Div
+Greater
+Less
+GreaterEqual
+LessEqual
+Equal
+NotEqual
+Not
+And
+Or
+Dot
+OpenRoundBracket
+ClosedRoundBracket
+OpenCurlyBracket
+ClosedCurlyBracket
+Semicolon
+Comma
+Class
+This
+While
+Do
+If
+Else
+For
+Return
+New
+Switch
+Case
+Default
+Colon
+CharValue
+IntValue
+BooleanValue
+NullValue
+Identifier
+WS
+InlineComment
+MultilineComment
+
+rule names:
+program
+classDeclaration
+memberDeclaration
+constructorDeclaration
+fieldDeclaration
+methodDeclaration
+parameterList
+parameter
+argumentList
+statement
+blockStatement
+returnStatement
+localVariableDeclaration
+whileStatement
+doWhileStatement
+forStatement
+ifElseStatement
+ifStatement
+elseIfStatement
+elseStatement
+switchStatement
+caseStatement
+defaultStatement
+statementExpression
+assign
+newDeclaration
+expression
+unaryExpression
+notExpression
+crementExpression
+incrementExpression
+prefixIncrementExpression
+suffixIncrementExpression
+decrementExpression
+prefixDecrementExpression
+suffixDecrementExpression
+assignableExpression
+memberAccess
+binaryExpression
+calculationExpression
+dotExpression
+dotSubtractionExpression
+nonCalculationExpression
+methodCall
+target
+chainedMethod
+type
+value
+nonCalculationOperator
+
+
+atn:
+[4, 1, 55, 458, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 1, 0, 4, 0, 100, 8, 0, 11, 0, 12, 0, 101, 1, 1, 3, 1, 105, 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 111, 8, 1, 10, 1, 12, 1, 114, 9, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 3, 2, 121, 8, 2, 1, 3, 3, 3, 124, 8, 3, 1, 3, 1, 3, 1, 3, 3, 3, 129, 8, 3, 1, 3, 1, 3, 1, 3, 1, 4, 3, 4, 135, 8, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 3, 5, 144, 8, 5, 1, 5, 1, 5, 3, 5, 148, 8, 5, 1, 5, 1, 5, 1, 5, 3, 5, 153, 8, 5, 1, 5, 1, 5, 3, 5, 157, 8, 5, 1, 6, 1, 6, 1, 6, 5, 6, 162, 8, 6, 10, 6, 12, 6, 165, 9, 6, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 5, 8, 173, 8, 8, 10, 8, 12, 8, 176, 9, 8, 3, 8, 178, 8, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 3, 9, 195, 8, 9, 1, 10, 1, 10, 5, 10, 199, 8, 10, 10, 10, 12, 10, 202, 9, 10, 1, 10, 1, 10, 1, 11, 1, 11, 3, 11, 208, 8, 11, 1, 12, 1, 12, 1, 12, 1, 12, 3, 12, 214, 8, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 3, 15, 234, 8, 15, 1, 15, 1, 15, 3, 15, 238, 8, 15, 1, 15, 1, 15, 3, 15, 242, 8, 15, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 5, 16, 249, 8, 16, 10, 16, 12, 16, 252, 9, 16, 1, 16, 3, 16, 255, 8, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 4, 20, 279, 8, 20, 11, 20, 12, 20, 280, 1, 20, 3, 20, 284, 8, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 21, 5, 21, 292, 8, 21, 10, 21, 12, 21, 295, 9, 21, 1, 22, 1, 22, 1, 22, 5, 22, 300, 8, 22, 10, 22, 12, 22, 303, 9, 22, 1, 23, 1, 23, 1, 23, 1, 23, 3, 23, 309, 8, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 3, 26, 323, 8, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 3, 27, 335, 8, 27, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 3, 29, 342, 8, 29, 1, 30, 1, 30, 3, 30, 346, 8, 30, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 3, 33, 356, 8, 33, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 36, 1, 36, 3, 36, 366, 8, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 3, 37, 373, 8, 37, 1, 37, 1, 37, 4, 37, 377, 8, 37, 11, 37, 12, 37, 378, 1, 37, 3, 37, 382, 8, 37, 1, 38, 1, 38, 3, 38, 386, 8, 38, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 5, 39, 394, 8, 39, 10, 39, 12, 39, 397, 9, 39, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 5, 40, 405, 8, 40, 10, 40, 12, 40, 408, 9, 40, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 3, 41, 418, 8, 41, 1, 42, 1, 42, 1, 42, 1, 42, 1, 43, 3, 43, 425, 8, 43, 1, 43, 5, 43, 428, 8, 43, 10, 43, 12, 43, 431, 9, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 44, 1, 44, 1, 44, 1, 44, 3, 44, 442, 8, 44, 1, 44, 1, 44, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 46, 1, 46, 1, 47, 1, 47, 1, 48, 1, 48, 1, 48, 0, 2, 78, 80, 49, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 0, 3, 2, 0, 4, 6, 52, 52, 1, 0, 48, 51, 1, 0, 11, 12, 471, 0, 99, 1, 0, 0, 0, 2, 104, 1, 0, 0, 0, 4, 120, 1, 0, 0, 0, 6, 123, 1, 0, 0, 0, 8, 134, 1, 0, 0, 0, 10, 156, 1, 0, 0, 0, 12, 158, 1, 0, 0, 0, 14, 166, 1, 0, 0, 0, 16, 177, 1, 0, 0, 0, 18, 194, 1, 0, 0, 0, 20, 196, 1, 0, 0, 0, 22, 205, 1, 0, 0, 0, 24, 209, 1, 0, 0, 0, 26, 215, 1, 0, 0, 0, 28, 221, 1, 0, 0, 0, 30, 229, 1, 0, 0, 0, 32, 246, 1, 0, 0, 0, 34, 256, 1, 0, 0, 0, 36, 262, 1, 0, 0, 0, 38, 269, 1, 0, 0, 0, 40, 272, 1, 0, 0, 0, 42, 287, 1, 0, 0, 0, 44, 296, 1, 0, 0, 0, 46, 308, 1, 0, 0, 0, 48, 310, 1, 0, 0, 0, 50, 314, 1, 0, 0, 0, 52, 322, 1, 0, 0, 0, 54, 334, 1, 0, 0, 0, 56, 336, 1, 0, 0, 0, 58, 341, 1, 0, 0, 0, 60, 345, 1, 0, 0, 0, 62, 347, 1, 0, 0, 0, 64, 350, 1, 0, 0, 0, 66, 355, 1, 0, 0, 0, 68, 357, 1, 0, 0, 0, 70, 360, 1, 0, 0, 0, 72, 365, 1, 0, 0, 0, 74, 381, 1, 0, 0, 0, 76, 385, 1, 0, 0, 0, 78, 387, 1, 0, 0, 0, 80, 398, 1, 0, 0, 0, 82, 417, 1, 0, 0, 0, 84, 419, 1, 0, 0, 0, 86, 424, 1, 0, 0, 0, 88, 441, 1, 0, 0, 0, 90, 445, 1, 0, 0, 0, 92, 451, 1, 0, 0, 0, 94, 453, 1, 0, 0, 0, 96, 455, 1, 0, 0, 0, 98, 100, 3, 2, 1, 0, 99, 98, 1, 0, 0, 0, 100, 101, 1, 0, 0, 0, 101, 99, 1, 0, 0, 0, 101, 102, 1, 0, 0, 0, 102, 1, 1, 0, 0, 0, 103, 105, 5, 7, 0, 0, 104, 103, 1, 0, 0, 0, 104, 105, 1, 0, 0, 0, 105, 106, 1, 0, 0, 0, 106, 107, 5, 35, 0, 0, 107, 108, 5, 52, 0, 0, 108, 112, 5, 31, 0, 0, 109, 111, 3, 4, 2, 0, 110, 109, 1, 0, 0, 0, 111, 114, 1, 0, 0, 0, 112, 110, 1, 0, 0, 0, 112, 113, 1, 0, 0, 0, 113, 115, 1, 0, 0, 0, 114, 112, 1, 0, 0, 0, 115, 116, 5, 32, 0, 0, 116, 3, 1, 0, 0, 0, 117, 121, 3, 6, 3, 0, 118, 121, 3, 8, 4, 0, 119, 121, 3, 10, 5, 0, 120, 117, 1, 0, 0, 0, 120, 118, 1, 0, 0, 0, 120, 119, 1, 0, 0, 0, 121, 5, 1, 0, 0, 0, 122, 124, 5, 7, 0, 0, 123, 122, 1, 0, 0, 0, 123, 124, 1, 0, 0, 0, 124, 125, 1, 0, 0, 0, 125, 126, 5, 52, 0, 0, 126, 128, 5, 29, 0, 0, 127, 129, 3, 12, 6, 0, 128, 127, 1, 0, 0, 0, 128, 129, 1, 0, 0, 0, 129, 130, 1, 0, 0, 0, 130, 131, 5, 30, 0, 0, 131, 132, 3, 20, 10, 0, 132, 7, 1, 0, 0, 0, 133, 135, 5, 7, 0, 0, 134, 133, 1, 0, 0, 0, 134, 135, 1, 0, 0, 0, 135, 136, 1, 0, 0, 0, 136, 137, 3, 92, 46, 0, 137, 138, 5, 52, 0, 0, 138, 139, 5, 33, 0, 0, 139, 9, 1, 0, 0, 0, 140, 141, 5, 8, 0, 0, 141, 157, 3, 20, 10, 0, 142, 144, 5, 7, 0, 0, 143, 142, 1, 0, 0, 0, 143, 144, 1, 0, 0, 0, 144, 147, 1, 0, 0, 0, 145, 148, 3, 92, 46, 0, 146, 148, 5, 3, 0, 0, 147, 145, 1, 0, 0, 0, 147, 146, 1, 0, 0, 0, 148, 149, 1, 0, 0, 0, 149, 150, 5, 52, 0, 0, 150, 152, 5, 29, 0, 0, 151, 153, 3, 12, 6, 0, 152, 151, 1, 0, 0, 0, 152, 153, 1, 0, 0, 0, 153, 154, 1, 0, 0, 0, 154, 155, 5, 30, 0, 0, 155, 157, 3, 20, 10, 0, 156, 140, 1, 0, 0, 0, 156, 143, 1, 0, 0, 0, 157, 11, 1, 0, 0, 0, 158, 163, 3, 14, 7, 0, 159, 160, 5, 34, 0, 0, 160, 162, 3, 14, 7, 0, 161, 159, 1, 0, 0, 0, 162, 165, 1, 0, 0, 0, 163, 161, 1, 0, 0, 0, 163, 164, 1, 0, 0, 0, 164, 13, 1, 0, 0, 0, 165, 163, 1, 0, 0, 0, 166, 167, 3, 92, 46, 0, 167, 168, 5, 52, 0, 0, 168, 15, 1, 0, 0, 0, 169, 174, 3, 52, 26, 0, 170, 171, 5, 34, 0, 0, 171, 173, 3, 52, 26, 0, 172, 170, 1, 0, 0, 0, 173, 176, 1, 0, 0, 0, 174, 172, 1, 0, 0, 0, 174, 175, 1, 0, 0, 0, 175, 178, 1, 0, 0, 0, 176, 174, 1, 0, 0, 0, 177, 169, 1, 0, 0, 0, 177, 178, 1, 0, 0, 0, 178, 17, 1, 0, 0, 0, 179, 180, 3, 22, 11, 0, 180, 181, 5, 33, 0, 0, 181, 195, 1, 0, 0, 0, 182, 183, 3, 24, 12, 0, 183, 184, 5, 33, 0, 0, 184, 195, 1, 0, 0, 0, 185, 195, 3, 20, 10, 0, 186, 195, 3, 26, 13, 0, 187, 195, 3, 28, 14, 0, 188, 195, 3, 30, 15, 0, 189, 195, 3, 32, 16, 0, 190, 195, 3, 40, 20, 0, 191, 192, 3, 46, 23, 0, 192, 193, 5, 33, 0, 0, 193, 195, 1, 0, 0, 0, 194, 179, 1, 0, 0, 0, 194, 182, 1, 0, 0, 0, 194, 185, 1, 0, 0, 0, 194, 186, 1, 0, 0, 0, 194, 187, 1, 0, 0, 0, 194, 188, 1, 0, 0, 0, 194, 189, 1, 0, 0, 0, 194, 190, 1, 0, 0, 0, 194, 191, 1, 0, 0, 0, 195, 19, 1, 0, 0, 0, 196, 200, 5, 31, 0, 0, 197, 199, 3, 18, 9, 0, 198, 197, 1, 0, 0, 0, 199, 202, 1, 0, 0, 0, 200, 198, 1, 0, 0, 0, 200, 201, 1, 0, 0, 0, 201, 203, 1, 0, 0, 0, 202, 200, 1, 0, 0, 0, 203, 204, 5, 32, 0, 0, 204, 21, 1, 0, 0, 0, 205, 207, 5, 42, 0, 0, 206, 208, 3, 52, 26, 0, 207, 206, 1, 0, 0, 0, 207, 208, 1, 0, 0, 0, 208, 23, 1, 0, 0, 0, 209, 210, 3, 92, 46, 0, 210, 213, 5, 52, 0, 0, 211, 212, 5, 13, 0, 0, 212, 214, 3, 52, 26, 0, 213, 211, 1, 0, 0, 0, 213, 214, 1, 0, 0, 0, 214, 25, 1, 0, 0, 0, 215, 216, 5, 37, 0, 0, 216, 217, 5, 29, 0, 0, 217, 218, 3, 52, 26, 0, 218, 219, 5, 30, 0, 0, 219, 220, 3, 20, 10, 0, 220, 27, 1, 0, 0, 0, 221, 222, 5, 38, 0, 0, 222, 223, 3, 20, 10, 0, 223, 224, 5, 37, 0, 0, 224, 225, 5, 29, 0, 0, 225, 226, 3, 52, 26, 0, 226, 227, 5, 30, 0, 0, 227, 228, 5, 33, 0, 0, 228, 29, 1, 0, 0, 0, 229, 230, 5, 41, 0, 0, 230, 233, 5, 29, 0, 0, 231, 234, 3, 46, 23, 0, 232, 234, 3, 24, 12, 0, 233, 231, 1, 0, 0, 0, 233, 232, 1, 0, 0, 0, 234, 235, 1, 0, 0, 0, 235, 237, 5, 33, 0, 0, 236, 238, 3, 52, 26, 0, 237, 236, 1, 0, 0, 0, 237, 238, 1, 0, 0, 0, 238, 239, 1, 0, 0, 0, 239, 241, 5, 33, 0, 0, 240, 242, 3, 46, 23, 0, 241, 240, 1, 0, 0, 0, 241, 242, 1, 0, 0, 0, 242, 243, 1, 0, 0, 0, 243, 244, 5, 30, 0, 0, 244, 245, 3, 20, 10, 0, 245, 31, 1, 0, 0, 0, 246, 250, 3, 34, 17, 0, 247, 249, 3, 36, 18, 0, 248, 247, 1, 0, 0, 0, 249, 252, 1, 0, 0, 0, 250, 248, 1, 0, 0, 0, 250, 251, 1, 0, 0, 0, 251, 254, 1, 0, 0, 0, 252, 250, 1, 0, 0, 0, 253, 255, 3, 38, 19, 0, 254, 253, 1, 0, 0, 0, 254, 255, 1, 0, 0, 0, 255, 33, 1, 0, 0, 0, 256, 257, 5, 39, 0, 0, 257, 258, 5, 29, 0, 0, 258, 259, 3, 52, 26, 0, 259, 260, 5, 30, 0, 0, 260, 261, 3, 20, 10, 0, 261, 35, 1, 0, 0, 0, 262, 263, 5, 40, 0, 0, 263, 264, 5, 39, 0, 0, 264, 265, 5, 29, 0, 0, 265, 266, 3, 52, 26, 0, 266, 267, 5, 30, 0, 0, 267, 268, 3, 20, 10, 0, 268, 37, 1, 0, 0, 0, 269, 270, 5, 40, 0, 0, 270, 271, 3, 20, 10, 0, 271, 39, 1, 0, 0, 0, 272, 273, 5, 44, 0, 0, 273, 274, 5, 29, 0, 0, 274, 275, 3, 52, 26, 0, 275, 276, 5, 30, 0, 0, 276, 278, 5, 31, 0, 0, 277, 279, 3, 42, 21, 0, 278, 277, 1, 0, 0, 0, 279, 280, 1, 0, 0, 0, 280, 278, 1, 0, 0, 0, 280, 281, 1, 0, 0, 0, 281, 283, 1, 0, 0, 0, 282, 284, 3, 44, 22, 0, 283, 282, 1, 0, 0, 0, 283, 284, 1, 0, 0, 0, 284, 285, 1, 0, 0, 0, 285, 286, 5, 32, 0, 0, 286, 41, 1, 0, 0, 0, 287, 288, 5, 45, 0, 0, 288, 289, 3, 94, 47, 0, 289, 293, 5, 47, 0, 0, 290, 292, 3, 18, 9, 0, 291, 290, 1, 0, 0, 0, 292, 295, 1, 0, 0, 0, 293, 291, 1, 0, 0, 0, 293, 294, 1, 0, 0, 0, 294, 43, 1, 0, 0, 0, 295, 293, 1, 0, 0, 0, 296, 297, 5, 46, 0, 0, 297, 301, 5, 47, 0, 0, 298, 300, 3, 18, 9, 0, 299, 298, 1, 0, 0, 0, 300, 303, 1, 0, 0, 0, 301, 299, 1, 0, 0, 0, 301, 302, 1, 0, 0, 0, 302, 45, 1, 0, 0, 0, 303, 301, 1, 0, 0, 0, 304, 309, 3, 48, 24, 0, 305, 309, 3, 50, 25, 0, 306, 309, 3, 86, 43, 0, 307, 309, 3, 58, 29, 0, 308, 304, 1, 0, 0, 0, 308, 305, 1, 0, 0, 0, 308, 306, 1, 0, 0, 0, 308, 307, 1, 0, 0, 0, 309, 47, 1, 0, 0, 0, 310, 311, 3, 72, 36, 0, 311, 312, 5, 13, 0, 0, 312, 313, 3, 52, 26, 0, 313, 49, 1, 0, 0, 0, 314, 315, 5, 43, 0, 0, 315, 316, 5, 52, 0, 0, 316, 317, 5, 29, 0, 0, 317, 318, 3, 16, 8, 0, 318, 319, 5, 30, 0, 0, 319, 51, 1, 0, 0, 0, 320, 323, 3, 54, 27, 0, 321, 323, 3, 76, 38, 0, 322, 320, 1, 0, 0, 0, 322, 321, 1, 0, 0, 0, 323, 53, 1, 0, 0, 0, 324, 335, 5, 36, 0, 0, 325, 335, 5, 52, 0, 0, 326, 335, 3, 74, 37, 0, 327, 335, 3, 94, 47, 0, 328, 335, 3, 56, 28, 0, 329, 335, 3, 46, 23, 0, 330, 331, 5, 29, 0, 0, 331, 332, 3, 52, 26, 0, 332, 333, 5, 30, 0, 0, 333, 335, 1, 0, 0, 0, 334, 324, 1, 0, 0, 0, 334, 325, 1, 0, 0, 0, 334, 326, 1, 0, 0, 0, 334, 327, 1, 0, 0, 0, 334, 328, 1, 0, 0, 0, 334, 329, 1, 0, 0, 0, 334, 330, 1, 0, 0, 0, 335, 55, 1, 0, 0, 0, 336, 337, 5, 25, 0, 0, 337, 338, 3, 52, 26, 0, 338, 57, 1, 0, 0, 0, 339, 342, 3, 60, 30, 0, 340, 342, 3, 66, 33, 0, 341, 339, 1, 0, 0, 0, 341, 340, 1, 0, 0, 0, 342, 59, 1, 0, 0, 0, 343, 346, 3, 62, 31, 0, 344, 346, 3, 64, 32, 0, 345, 343, 1, 0, 0, 0, 345, 344, 1, 0, 0, 0, 346, 61, 1, 0, 0, 0, 347, 348, 5, 1, 0, 0, 348, 349, 3, 72, 36, 0, 349, 63, 1, 0, 0, 0, 350, 351, 3, 72, 36, 0, 351, 352, 5, 1, 0, 0, 352, 65, 1, 0, 0, 0, 353, 356, 3, 68, 34, 0, 354, 356, 3, 70, 35, 0, 355, 353, 1, 0, 0, 0, 355, 354, 1, 0, 0, 0, 356, 67, 1, 0, 0, 0, 357, 358, 5, 2, 0, 0, 358, 359, 3, 72, 36, 0, 359, 69, 1, 0, 0, 0, 360, 361, 3, 72, 36, 0, 361, 362, 5, 2, 0, 0, 362, 71, 1, 0, 0, 0, 363, 366, 5, 52, 0, 0, 364, 366, 3, 74, 37, 0, 365, 363, 1, 0, 0, 0, 365, 364, 1, 0, 0, 0, 366, 73, 1, 0, 0, 0, 367, 368, 5, 36, 0, 0, 368, 369, 5, 28, 0, 0, 369, 382, 5, 52, 0, 0, 370, 371, 5, 36, 0, 0, 371, 373, 5, 28, 0, 0, 372, 370, 1, 0, 0, 0, 372, 373, 1, 0, 0, 0, 373, 376, 1, 0, 0, 0, 374, 375, 5, 52, 0, 0, 375, 377, 5, 28, 0, 0, 376, 374, 1, 0, 0, 0, 377, 378, 1, 0, 0, 0, 378, 376, 1, 0, 0, 0, 378, 379, 1, 0, 0, 0, 379, 380, 1, 0, 0, 0, 380, 382, 5, 52, 0, 0, 381, 367, 1, 0, 0, 0, 381, 372, 1, 0, 0, 0, 382, 75, 1, 0, 0, 0, 383, 386, 3, 78, 39, 0, 384, 386, 3, 84, 42, 0, 385, 383, 1, 0, 0, 0, 385, 384, 1, 0, 0, 0, 386, 77, 1, 0, 0, 0, 387, 388, 6, 39, -1, 0, 388, 389, 3, 80, 40, 0, 389, 395, 1, 0, 0, 0, 390, 391, 10, 2, 0, 0, 391, 392, 5, 10, 0, 0, 392, 394, 3, 80, 40, 0, 393, 390, 1, 0, 0, 0, 394, 397, 1, 0, 0, 0, 395, 393, 1, 0, 0, 0, 395, 396, 1, 0, 0, 0, 396, 79, 1, 0, 0, 0, 397, 395, 1, 0, 0, 0, 398, 399, 6, 40, -1, 0, 399, 400, 3, 82, 41, 0, 400, 406, 1, 0, 0, 0, 401, 402, 10, 2, 0, 0, 402, 403, 5, 9, 0, 0, 403, 405, 3, 82, 41, 0, 404, 401, 1, 0, 0, 0, 405, 408, 1, 0, 0, 0, 406, 404, 1, 0, 0, 0, 406, 407, 1, 0, 0, 0, 407, 81, 1, 0, 0, 0, 408, 406, 1, 0, 0, 0, 409, 418, 5, 49, 0, 0, 410, 418, 5, 52, 0, 0, 411, 418, 3, 74, 37, 0, 412, 413, 3, 86, 43, 0, 413, 414, 5, 29, 0, 0, 414, 415, 3, 78, 39, 0, 415, 416, 5, 30, 0, 0, 416, 418, 1, 0, 0, 0, 417, 409, 1, 0, 0, 0, 417, 410, 1, 0, 0, 0, 417, 411, 1, 0, 0, 0, 417, 412, 1, 0, 0, 0, 418, 83, 1, 0, 0, 0, 419, 420, 3, 54, 27, 0, 420, 421, 3, 96, 48, 0, 421, 422, 3, 52, 26, 0, 422, 85, 1, 0, 0, 0, 423, 425, 3, 88, 44, 0, 424, 423, 1, 0, 0, 0, 424, 425, 1, 0, 0, 0, 425, 429, 1, 0, 0, 0, 426, 428, 3, 90, 45, 0, 427, 426, 1, 0, 0, 0, 428, 431, 1, 0, 0, 0, 429, 427, 1, 0, 0, 0, 429, 430, 1, 0, 0, 0, 430, 432, 1, 0, 0, 0, 431, 429, 1, 0, 0, 0, 432, 433, 5, 52, 0, 0, 433, 434, 5, 29, 0, 0, 434, 435, 3, 16, 8, 0, 435, 436, 5, 30, 0, 0, 436, 87, 1, 0, 0, 0, 437, 442, 5, 36, 0, 0, 438, 442, 3, 74, 37, 0, 439, 442, 3, 50, 25, 0, 440, 442, 5, 52, 0, 0, 441, 437, 1, 0, 0, 0, 441, 438, 1, 0, 0, 0, 441, 439, 1, 0, 0, 0, 441, 440, 1, 0, 0, 0, 442, 443, 1, 0, 0, 0, 443, 444, 5, 28, 0, 0, 444, 89, 1, 0, 0, 0, 445, 446, 5, 52, 0, 0, 446, 447, 5, 29, 0, 0, 447, 448, 3, 16, 8, 0, 448, 449, 5, 30, 0, 0, 449, 450, 5, 28, 0, 0, 450, 91, 1, 0, 0, 0, 451, 452, 7, 0, 0, 0, 452, 93, 1, 0, 0, 0, 453, 454, 7, 1, 0, 0, 454, 95, 1, 0, 0, 0, 455, 456, 7, 2, 0, 0, 456, 97, 1, 0, 0, 0, 44, 101, 104, 112, 120, 123, 128, 134, 143, 147, 152, 156, 163, 174, 177, 194, 200, 207, 213, 233, 237, 241, 250, 254, 280, 283, 293, 301, 308, 322, 334, 341, 345, 355, 365, 372, 378, 381, 385, 395, 406, 417, 424, 429, 441]
\ No newline at end of file
diff --git a/src/main/java/parser/generated/SimpleJava.tokens b/src/main/java/parser/generated/SimpleJava.tokens
new file mode 100644
index 0000000..ffe0902
--- /dev/null
+++ b/src/main/java/parser/generated/SimpleJava.tokens
@@ -0,0 +1,98 @@
+T__0=1
+T__1=2
+Void=3
+Boolean=4
+Char=5
+Int=6
+AccessModifier=7
+MainMethodDeclaration=8
+DotOperator=9
+LineOperator=10
+ComparisonOperator=11
+LogicalOperator=12
+Assign=13
+Plus=14
+Minus=15
+Mult=16
+Modulo=17
+Div=18
+Greater=19
+Less=20
+GreaterEqual=21
+LessEqual=22
+Equal=23
+NotEqual=24
+Not=25
+And=26
+Or=27
+Dot=28
+OpenRoundBracket=29
+ClosedRoundBracket=30
+OpenCurlyBracket=31
+ClosedCurlyBracket=32
+Semicolon=33
+Comma=34
+Class=35
+This=36
+While=37
+Do=38
+If=39
+Else=40
+For=41
+Return=42
+New=43
+Switch=44
+Case=45
+Default=46
+Colon=47
+CharValue=48
+IntValue=49
+BooleanValue=50
+NullValue=51
+Identifier=52
+WS=53
+InlineComment=54
+MultilineComment=55
+'++'=1
+'--'=2
+'void'=3
+'boolean'=4
+'char'=5
+'int'=6
+'public static void main(String[] args)'=8
+'='=13
+'+'=14
+'-'=15
+'*'=16
+'%'=17
+'/'=18
+'>'=19
+'<'=20
+'>='=21
+'<='=22
+'=='=23
+'!='=24
+'!'=25
+'&&'=26
+'||'=27
+'.'=28
+'('=29
+')'=30
+'{'=31
+'}'=32
+';'=33
+','=34
+'class'=35
+'this'=36
+'while'=37
+'do'=38
+'if'=39
+'else'=40
+'for'=41
+'return'=42
+'new'=43
+'switch'=44
+'case'=45
+'default'=46
+':'=47
+'null'=51
diff --git a/src/main/java/parser/generated/SimpleJavaBaseListener.java b/src/main/java/parser/generated/SimpleJavaBaseListener.java
new file mode 100644
index 0000000..52e183c
--- /dev/null
+++ b/src/main/java/parser/generated/SimpleJavaBaseListener.java
@@ -0,0 +1,628 @@
+// Generated from C:/Users/janni/Desktop/NichtHaskell2.0/src/main/java/parser/grammar/SimpleJava.g4 by ANTLR 4.13.1
+package parser.generated;
+
+import org.antlr.v4.runtime.ParserRuleContext;
+import org.antlr.v4.runtime.tree.ErrorNode;
+import org.antlr.v4.runtime.tree.TerminalNode;
+
+/**
+ * This class provides an empty implementation of {@link SimpleJavaListener},
+ * which can be extended to create a listener which only needs to handle a subset
+ * of the available methods.
+ */
+@SuppressWarnings("CheckReturnValue")
+public class SimpleJavaBaseListener implements SimpleJavaListener {
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterProgram(SimpleJavaParser.ProgramContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitProgram(SimpleJavaParser.ProgramContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterClassDeclaration(SimpleJavaParser.ClassDeclarationContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitClassDeclaration(SimpleJavaParser.ClassDeclarationContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterMemberDeclaration(SimpleJavaParser.MemberDeclarationContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitMemberDeclaration(SimpleJavaParser.MemberDeclarationContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterConstructorDeclaration(SimpleJavaParser.ConstructorDeclarationContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitConstructorDeclaration(SimpleJavaParser.ConstructorDeclarationContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterFieldDeclaration(SimpleJavaParser.FieldDeclarationContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitFieldDeclaration(SimpleJavaParser.FieldDeclarationContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterMethodDeclaration(SimpleJavaParser.MethodDeclarationContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitMethodDeclaration(SimpleJavaParser.MethodDeclarationContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterParameterList(SimpleJavaParser.ParameterListContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitParameterList(SimpleJavaParser.ParameterListContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterParameter(SimpleJavaParser.ParameterContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitParameter(SimpleJavaParser.ParameterContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterArgumentList(SimpleJavaParser.ArgumentListContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitArgumentList(SimpleJavaParser.ArgumentListContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterStatement(SimpleJavaParser.StatementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitStatement(SimpleJavaParser.StatementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterBlockStatement(SimpleJavaParser.BlockStatementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitBlockStatement(SimpleJavaParser.BlockStatementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterReturnStatement(SimpleJavaParser.ReturnStatementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitReturnStatement(SimpleJavaParser.ReturnStatementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterLocalVariableDeclaration(SimpleJavaParser.LocalVariableDeclarationContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitLocalVariableDeclaration(SimpleJavaParser.LocalVariableDeclarationContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterWhileStatement(SimpleJavaParser.WhileStatementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitWhileStatement(SimpleJavaParser.WhileStatementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterDoWhileStatement(SimpleJavaParser.DoWhileStatementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitDoWhileStatement(SimpleJavaParser.DoWhileStatementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterForStatement(SimpleJavaParser.ForStatementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitForStatement(SimpleJavaParser.ForStatementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterIfElseStatement(SimpleJavaParser.IfElseStatementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitIfElseStatement(SimpleJavaParser.IfElseStatementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterIfStatement(SimpleJavaParser.IfStatementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitIfStatement(SimpleJavaParser.IfStatementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterElseIfStatement(SimpleJavaParser.ElseIfStatementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitElseIfStatement(SimpleJavaParser.ElseIfStatementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterElseStatement(SimpleJavaParser.ElseStatementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitElseStatement(SimpleJavaParser.ElseStatementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterSwitchStatement(SimpleJavaParser.SwitchStatementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitSwitchStatement(SimpleJavaParser.SwitchStatementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterCaseStatement(SimpleJavaParser.CaseStatementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitCaseStatement(SimpleJavaParser.CaseStatementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterDefaultStatement(SimpleJavaParser.DefaultStatementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitDefaultStatement(SimpleJavaParser.DefaultStatementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterStatementExpression(SimpleJavaParser.StatementExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitStatementExpression(SimpleJavaParser.StatementExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterAssign(SimpleJavaParser.AssignContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitAssign(SimpleJavaParser.AssignContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterNewDeclaration(SimpleJavaParser.NewDeclarationContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitNewDeclaration(SimpleJavaParser.NewDeclarationContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterExpression(SimpleJavaParser.ExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitExpression(SimpleJavaParser.ExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterUnaryExpression(SimpleJavaParser.UnaryExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitUnaryExpression(SimpleJavaParser.UnaryExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterNotExpression(SimpleJavaParser.NotExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitNotExpression(SimpleJavaParser.NotExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterCrementExpression(SimpleJavaParser.CrementExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitCrementExpression(SimpleJavaParser.CrementExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterIncrementExpression(SimpleJavaParser.IncrementExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitIncrementExpression(SimpleJavaParser.IncrementExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterPrefixIncrementExpression(SimpleJavaParser.PrefixIncrementExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitPrefixIncrementExpression(SimpleJavaParser.PrefixIncrementExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterSuffixIncrementExpression(SimpleJavaParser.SuffixIncrementExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitSuffixIncrementExpression(SimpleJavaParser.SuffixIncrementExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterDecrementExpression(SimpleJavaParser.DecrementExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitDecrementExpression(SimpleJavaParser.DecrementExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterPrefixDecrementExpression(SimpleJavaParser.PrefixDecrementExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitPrefixDecrementExpression(SimpleJavaParser.PrefixDecrementExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterSuffixDecrementExpression(SimpleJavaParser.SuffixDecrementExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitSuffixDecrementExpression(SimpleJavaParser.SuffixDecrementExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterAssignableExpression(SimpleJavaParser.AssignableExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitAssignableExpression(SimpleJavaParser.AssignableExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterMemberAccess(SimpleJavaParser.MemberAccessContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitMemberAccess(SimpleJavaParser.MemberAccessContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterBinaryExpression(SimpleJavaParser.BinaryExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitBinaryExpression(SimpleJavaParser.BinaryExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterCalculationExpression(SimpleJavaParser.CalculationExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitCalculationExpression(SimpleJavaParser.CalculationExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterDotExpression(SimpleJavaParser.DotExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitDotExpression(SimpleJavaParser.DotExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterDotSubtractionExpression(SimpleJavaParser.DotSubtractionExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitDotSubtractionExpression(SimpleJavaParser.DotSubtractionExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterNonCalculationExpression(SimpleJavaParser.NonCalculationExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitNonCalculationExpression(SimpleJavaParser.NonCalculationExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterMethodCall(SimpleJavaParser.MethodCallContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitMethodCall(SimpleJavaParser.MethodCallContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterTarget(SimpleJavaParser.TargetContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitTarget(SimpleJavaParser.TargetContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterChainedMethod(SimpleJavaParser.ChainedMethodContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitChainedMethod(SimpleJavaParser.ChainedMethodContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterType(SimpleJavaParser.TypeContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitType(SimpleJavaParser.TypeContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterValue(SimpleJavaParser.ValueContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitValue(SimpleJavaParser.ValueContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterNonCalculationOperator(SimpleJavaParser.NonCalculationOperatorContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitNonCalculationOperator(SimpleJavaParser.NonCalculationOperatorContext ctx) { }
+
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterEveryRule(ParserRuleContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitEveryRule(ParserRuleContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void visitTerminal(TerminalNode node) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void visitErrorNode(ErrorNode node) { }
+}
\ No newline at end of file
diff --git a/src/main/java/parser/generated/SimpleJavaBaseVisitor.java b/src/main/java/parser/generated/SimpleJavaBaseVisitor.java
new file mode 100644
index 0000000..9eb8ace
--- /dev/null
+++ b/src/main/java/parser/generated/SimpleJavaBaseVisitor.java
@@ -0,0 +1,358 @@
+// Generated from C:/Users/janni/Desktop/NichtHaskell2.0/src/main/java/parser/grammar/SimpleJava.g4 by ANTLR 4.13.1
+package parser.generated;
+import org.antlr.v4.runtime.tree.AbstractParseTreeVisitor;
+
+/**
+ * This class provides an empty implementation of {@link SimpleJavaVisitor},
+ * which can be extended to create a visitor which only needs to handle a subset
+ * of the available methods.
+ *
+ * @param The return type of the visit operation. Use {@link Void} for
+ * operations with no return type.
+ */
+@SuppressWarnings("CheckReturnValue")
+public class SimpleJavaBaseVisitor extends AbstractParseTreeVisitor implements SimpleJavaVisitor {
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitProgram(SimpleJavaParser.ProgramContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitClassDeclaration(SimpleJavaParser.ClassDeclarationContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitMemberDeclaration(SimpleJavaParser.MemberDeclarationContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitConstructorDeclaration(SimpleJavaParser.ConstructorDeclarationContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitFieldDeclaration(SimpleJavaParser.FieldDeclarationContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitMethodDeclaration(SimpleJavaParser.MethodDeclarationContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitParameterList(SimpleJavaParser.ParameterListContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitParameter(SimpleJavaParser.ParameterContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitArgumentList(SimpleJavaParser.ArgumentListContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitStatement(SimpleJavaParser.StatementContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitBlockStatement(SimpleJavaParser.BlockStatementContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitReturnStatement(SimpleJavaParser.ReturnStatementContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitLocalVariableDeclaration(SimpleJavaParser.LocalVariableDeclarationContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitWhileStatement(SimpleJavaParser.WhileStatementContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitDoWhileStatement(SimpleJavaParser.DoWhileStatementContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitForStatement(SimpleJavaParser.ForStatementContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitIfElseStatement(SimpleJavaParser.IfElseStatementContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitIfStatement(SimpleJavaParser.IfStatementContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitElseIfStatement(SimpleJavaParser.ElseIfStatementContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitElseStatement(SimpleJavaParser.ElseStatementContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitSwitchStatement(SimpleJavaParser.SwitchStatementContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitCaseStatement(SimpleJavaParser.CaseStatementContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitDefaultStatement(SimpleJavaParser.DefaultStatementContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitStatementExpression(SimpleJavaParser.StatementExpressionContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitAssign(SimpleJavaParser.AssignContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitNewDeclaration(SimpleJavaParser.NewDeclarationContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitExpression(SimpleJavaParser.ExpressionContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitUnaryExpression(SimpleJavaParser.UnaryExpressionContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitNotExpression(SimpleJavaParser.NotExpressionContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitCrementExpression(SimpleJavaParser.CrementExpressionContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitIncrementExpression(SimpleJavaParser.IncrementExpressionContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitPrefixIncrementExpression(SimpleJavaParser.PrefixIncrementExpressionContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitSuffixIncrementExpression(SimpleJavaParser.SuffixIncrementExpressionContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitDecrementExpression(SimpleJavaParser.DecrementExpressionContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitPrefixDecrementExpression(SimpleJavaParser.PrefixDecrementExpressionContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitSuffixDecrementExpression(SimpleJavaParser.SuffixDecrementExpressionContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitAssignableExpression(SimpleJavaParser.AssignableExpressionContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitMemberAccess(SimpleJavaParser.MemberAccessContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitBinaryExpression(SimpleJavaParser.BinaryExpressionContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitCalculationExpression(SimpleJavaParser.CalculationExpressionContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitDotExpression(SimpleJavaParser.DotExpressionContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitDotSubtractionExpression(SimpleJavaParser.DotSubtractionExpressionContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitNonCalculationExpression(SimpleJavaParser.NonCalculationExpressionContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitMethodCall(SimpleJavaParser.MethodCallContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitTarget(SimpleJavaParser.TargetContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitChainedMethod(SimpleJavaParser.ChainedMethodContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitType(SimpleJavaParser.TypeContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitValue(SimpleJavaParser.ValueContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitNonCalculationOperator(SimpleJavaParser.NonCalculationOperatorContext ctx) { return visitChildren(ctx); }
+}
\ No newline at end of file
diff --git a/src/main/java/parser/generated/SimpleJavaLexer.interp b/src/main/java/parser/generated/SimpleJavaLexer.interp
new file mode 100644
index 0000000..3338105
--- /dev/null
+++ b/src/main/java/parser/generated/SimpleJavaLexer.interp
@@ -0,0 +1,185 @@
+token literal names:
+null
+'++'
+'--'
+'void'
+'boolean'
+'char'
+'int'
+null
+'public static void main(String[] args)'
+null
+null
+null
+null
+'='
+'+'
+'-'
+'*'
+'%'
+'/'
+'>'
+'<'
+'>='
+'<='
+'=='
+'!='
+'!'
+'&&'
+'||'
+'.'
+'('
+')'
+'{'
+'}'
+';'
+','
+'class'
+'this'
+'while'
+'do'
+'if'
+'else'
+'for'
+'return'
+'new'
+'switch'
+'case'
+'default'
+':'
+null
+null
+null
+'null'
+null
+null
+null
+null
+
+token symbolic names:
+null
+null
+null
+Void
+Boolean
+Char
+Int
+AccessModifier
+MainMethodDeclaration
+DotOperator
+LineOperator
+ComparisonOperator
+LogicalOperator
+Assign
+Plus
+Minus
+Mult
+Modulo
+Div
+Greater
+Less
+GreaterEqual
+LessEqual
+Equal
+NotEqual
+Not
+And
+Or
+Dot
+OpenRoundBracket
+ClosedRoundBracket
+OpenCurlyBracket
+ClosedCurlyBracket
+Semicolon
+Comma
+Class
+This
+While
+Do
+If
+Else
+For
+Return
+New
+Switch
+Case
+Default
+Colon
+CharValue
+IntValue
+BooleanValue
+NullValue
+Identifier
+WS
+InlineComment
+MultilineComment
+
+rule names:
+T__0
+T__1
+Void
+Boolean
+Char
+Int
+AccessModifier
+MainMethodDeclaration
+DotOperator
+LineOperator
+ComparisonOperator
+LogicalOperator
+Assign
+Plus
+Minus
+Mult
+Modulo
+Div
+Greater
+Less
+GreaterEqual
+LessEqual
+Equal
+NotEqual
+Not
+And
+Or
+Dot
+OpenRoundBracket
+ClosedRoundBracket
+OpenCurlyBracket
+ClosedCurlyBracket
+Semicolon
+Comma
+Class
+This
+While
+Do
+If
+Else
+For
+Return
+New
+Switch
+Case
+Default
+Colon
+CharValue
+IntValue
+BooleanValue
+NullValue
+Alphabetic
+Numeric
+ValidIdentSymbols
+Identifier
+WS
+InlineComment
+MultilineComment
+
+channel names:
+DEFAULT_TOKEN_CHANNEL
+HIDDEN
+
+mode names:
+DEFAULT_MODE
+
+atn:
+[4, 0, 55, 443, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 3, 6, 186, 8, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 3, 8, 230, 8, 8, 1, 9, 1, 9, 3, 9, 234, 8, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 3, 10, 242, 8, 10, 1, 11, 1, 11, 3, 11, 246, 8, 11, 1, 12, 1, 12, 1, 13, 1, 13, 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, 20, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 28, 1, 28, 1, 29, 1, 29, 1, 30, 1, 30, 1, 31, 1, 31, 1, 32, 1, 32, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 40, 1, 40, 1, 40, 1, 40, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 1, 42, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 46, 1, 46, 1, 47, 1, 47, 5, 47, 365, 8, 47, 10, 47, 12, 47, 368, 9, 47, 1, 47, 1, 47, 1, 48, 3, 48, 373, 8, 48, 1, 48, 4, 48, 376, 8, 48, 11, 48, 12, 48, 377, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 3, 49, 389, 8, 49, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 51, 1, 51, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 3, 53, 403, 8, 53, 1, 54, 1, 54, 5, 54, 407, 8, 54, 10, 54, 12, 54, 410, 9, 54, 1, 55, 4, 55, 413, 8, 55, 11, 55, 12, 55, 414, 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 1, 56, 5, 56, 423, 8, 56, 10, 56, 12, 56, 426, 9, 56, 1, 56, 1, 56, 1, 57, 1, 57, 1, 57, 1, 57, 5, 57, 434, 8, 57, 10, 57, 12, 57, 437, 9, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 435, 0, 58, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, 37, 75, 38, 77, 39, 79, 40, 81, 41, 83, 42, 85, 43, 87, 44, 89, 45, 91, 46, 93, 47, 95, 48, 97, 49, 99, 50, 101, 51, 103, 0, 105, 0, 107, 0, 109, 52, 111, 53, 113, 54, 115, 55, 1, 0, 5, 2, 0, 10, 10, 13, 13, 2, 0, 65, 90, 97, 122, 1, 0, 48, 57, 2, 0, 36, 36, 95, 95, 3, 0, 9, 10, 13, 13, 32, 32, 461, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 95, 1, 0, 0, 0, 0, 97, 1, 0, 0, 0, 0, 99, 1, 0, 0, 0, 0, 101, 1, 0, 0, 0, 0, 109, 1, 0, 0, 0, 0, 111, 1, 0, 0, 0, 0, 113, 1, 0, 0, 0, 0, 115, 1, 0, 0, 0, 1, 117, 1, 0, 0, 0, 3, 120, 1, 0, 0, 0, 5, 123, 1, 0, 0, 0, 7, 128, 1, 0, 0, 0, 9, 136, 1, 0, 0, 0, 11, 141, 1, 0, 0, 0, 13, 185, 1, 0, 0, 0, 15, 187, 1, 0, 0, 0, 17, 229, 1, 0, 0, 0, 19, 233, 1, 0, 0, 0, 21, 241, 1, 0, 0, 0, 23, 245, 1, 0, 0, 0, 25, 247, 1, 0, 0, 0, 27, 249, 1, 0, 0, 0, 29, 251, 1, 0, 0, 0, 31, 253, 1, 0, 0, 0, 33, 255, 1, 0, 0, 0, 35, 257, 1, 0, 0, 0, 37, 259, 1, 0, 0, 0, 39, 261, 1, 0, 0, 0, 41, 263, 1, 0, 0, 0, 43, 266, 1, 0, 0, 0, 45, 269, 1, 0, 0, 0, 47, 272, 1, 0, 0, 0, 49, 275, 1, 0, 0, 0, 51, 277, 1, 0, 0, 0, 53, 280, 1, 0, 0, 0, 55, 283, 1, 0, 0, 0, 57, 285, 1, 0, 0, 0, 59, 287, 1, 0, 0, 0, 61, 289, 1, 0, 0, 0, 63, 291, 1, 0, 0, 0, 65, 293, 1, 0, 0, 0, 67, 295, 1, 0, 0, 0, 69, 297, 1, 0, 0, 0, 71, 303, 1, 0, 0, 0, 73, 308, 1, 0, 0, 0, 75, 314, 1, 0, 0, 0, 77, 317, 1, 0, 0, 0, 79, 320, 1, 0, 0, 0, 81, 325, 1, 0, 0, 0, 83, 329, 1, 0, 0, 0, 85, 336, 1, 0, 0, 0, 87, 340, 1, 0, 0, 0, 89, 347, 1, 0, 0, 0, 91, 352, 1, 0, 0, 0, 93, 360, 1, 0, 0, 0, 95, 362, 1, 0, 0, 0, 97, 372, 1, 0, 0, 0, 99, 388, 1, 0, 0, 0, 101, 390, 1, 0, 0, 0, 103, 395, 1, 0, 0, 0, 105, 397, 1, 0, 0, 0, 107, 402, 1, 0, 0, 0, 109, 404, 1, 0, 0, 0, 111, 412, 1, 0, 0, 0, 113, 418, 1, 0, 0, 0, 115, 429, 1, 0, 0, 0, 117, 118, 5, 43, 0, 0, 118, 119, 5, 43, 0, 0, 119, 2, 1, 0, 0, 0, 120, 121, 5, 45, 0, 0, 121, 122, 5, 45, 0, 0, 122, 4, 1, 0, 0, 0, 123, 124, 5, 118, 0, 0, 124, 125, 5, 111, 0, 0, 125, 126, 5, 105, 0, 0, 126, 127, 5, 100, 0, 0, 127, 6, 1, 0, 0, 0, 128, 129, 5, 98, 0, 0, 129, 130, 5, 111, 0, 0, 130, 131, 5, 111, 0, 0, 131, 132, 5, 108, 0, 0, 132, 133, 5, 101, 0, 0, 133, 134, 5, 97, 0, 0, 134, 135, 5, 110, 0, 0, 135, 8, 1, 0, 0, 0, 136, 137, 5, 99, 0, 0, 137, 138, 5, 104, 0, 0, 138, 139, 5, 97, 0, 0, 139, 140, 5, 114, 0, 0, 140, 10, 1, 0, 0, 0, 141, 142, 5, 105, 0, 0, 142, 143, 5, 110, 0, 0, 143, 144, 5, 116, 0, 0, 144, 12, 1, 0, 0, 0, 145, 146, 5, 112, 0, 0, 146, 147, 5, 117, 0, 0, 147, 148, 5, 98, 0, 0, 148, 149, 5, 108, 0, 0, 149, 150, 5, 105, 0, 0, 150, 186, 5, 99, 0, 0, 151, 152, 5, 112, 0, 0, 152, 153, 5, 114, 0, 0, 153, 154, 5, 105, 0, 0, 154, 155, 5, 118, 0, 0, 155, 156, 5, 97, 0, 0, 156, 157, 5, 116, 0, 0, 157, 186, 5, 101, 0, 0, 158, 159, 5, 112, 0, 0, 159, 160, 5, 117, 0, 0, 160, 161, 5, 98, 0, 0, 161, 162, 5, 108, 0, 0, 162, 163, 5, 105, 0, 0, 163, 164, 5, 99, 0, 0, 164, 165, 5, 32, 0, 0, 165, 166, 5, 115, 0, 0, 166, 167, 5, 116, 0, 0, 167, 168, 5, 97, 0, 0, 168, 169, 5, 116, 0, 0, 169, 170, 5, 105, 0, 0, 170, 186, 5, 99, 0, 0, 171, 172, 5, 112, 0, 0, 172, 173, 5, 114, 0, 0, 173, 174, 5, 105, 0, 0, 174, 175, 5, 118, 0, 0, 175, 176, 5, 97, 0, 0, 176, 177, 5, 116, 0, 0, 177, 178, 5, 101, 0, 0, 178, 179, 5, 32, 0, 0, 179, 180, 5, 115, 0, 0, 180, 181, 5, 116, 0, 0, 181, 182, 5, 97, 0, 0, 182, 183, 5, 116, 0, 0, 183, 184, 5, 105, 0, 0, 184, 186, 5, 99, 0, 0, 185, 145, 1, 0, 0, 0, 185, 151, 1, 0, 0, 0, 185, 158, 1, 0, 0, 0, 185, 171, 1, 0, 0, 0, 186, 14, 1, 0, 0, 0, 187, 188, 5, 112, 0, 0, 188, 189, 5, 117, 0, 0, 189, 190, 5, 98, 0, 0, 190, 191, 5, 108, 0, 0, 191, 192, 5, 105, 0, 0, 192, 193, 5, 99, 0, 0, 193, 194, 5, 32, 0, 0, 194, 195, 5, 115, 0, 0, 195, 196, 5, 116, 0, 0, 196, 197, 5, 97, 0, 0, 197, 198, 5, 116, 0, 0, 198, 199, 5, 105, 0, 0, 199, 200, 5, 99, 0, 0, 200, 201, 5, 32, 0, 0, 201, 202, 5, 118, 0, 0, 202, 203, 5, 111, 0, 0, 203, 204, 5, 105, 0, 0, 204, 205, 5, 100, 0, 0, 205, 206, 5, 32, 0, 0, 206, 207, 5, 109, 0, 0, 207, 208, 5, 97, 0, 0, 208, 209, 5, 105, 0, 0, 209, 210, 5, 110, 0, 0, 210, 211, 5, 40, 0, 0, 211, 212, 5, 83, 0, 0, 212, 213, 5, 116, 0, 0, 213, 214, 5, 114, 0, 0, 214, 215, 5, 105, 0, 0, 215, 216, 5, 110, 0, 0, 216, 217, 5, 103, 0, 0, 217, 218, 5, 91, 0, 0, 218, 219, 5, 93, 0, 0, 219, 220, 5, 32, 0, 0, 220, 221, 5, 97, 0, 0, 221, 222, 5, 114, 0, 0, 222, 223, 5, 103, 0, 0, 223, 224, 5, 115, 0, 0, 224, 225, 5, 41, 0, 0, 225, 16, 1, 0, 0, 0, 226, 230, 3, 31, 15, 0, 227, 230, 3, 35, 17, 0, 228, 230, 3, 33, 16, 0, 229, 226, 1, 0, 0, 0, 229, 227, 1, 0, 0, 0, 229, 228, 1, 0, 0, 0, 230, 18, 1, 0, 0, 0, 231, 234, 3, 27, 13, 0, 232, 234, 3, 29, 14, 0, 233, 231, 1, 0, 0, 0, 233, 232, 1, 0, 0, 0, 234, 20, 1, 0, 0, 0, 235, 242, 3, 37, 18, 0, 236, 242, 3, 39, 19, 0, 237, 242, 3, 41, 20, 0, 238, 242, 3, 43, 21, 0, 239, 242, 3, 45, 22, 0, 240, 242, 3, 47, 23, 0, 241, 235, 1, 0, 0, 0, 241, 236, 1, 0, 0, 0, 241, 237, 1, 0, 0, 0, 241, 238, 1, 0, 0, 0, 241, 239, 1, 0, 0, 0, 241, 240, 1, 0, 0, 0, 242, 22, 1, 0, 0, 0, 243, 246, 3, 51, 25, 0, 244, 246, 3, 53, 26, 0, 245, 243, 1, 0, 0, 0, 245, 244, 1, 0, 0, 0, 246, 24, 1, 0, 0, 0, 247, 248, 5, 61, 0, 0, 248, 26, 1, 0, 0, 0, 249, 250, 5, 43, 0, 0, 250, 28, 1, 0, 0, 0, 251, 252, 5, 45, 0, 0, 252, 30, 1, 0, 0, 0, 253, 254, 5, 42, 0, 0, 254, 32, 1, 0, 0, 0, 255, 256, 5, 37, 0, 0, 256, 34, 1, 0, 0, 0, 257, 258, 5, 47, 0, 0, 258, 36, 1, 0, 0, 0, 259, 260, 5, 62, 0, 0, 260, 38, 1, 0, 0, 0, 261, 262, 5, 60, 0, 0, 262, 40, 1, 0, 0, 0, 263, 264, 5, 62, 0, 0, 264, 265, 5, 61, 0, 0, 265, 42, 1, 0, 0, 0, 266, 267, 5, 60, 0, 0, 267, 268, 5, 61, 0, 0, 268, 44, 1, 0, 0, 0, 269, 270, 5, 61, 0, 0, 270, 271, 5, 61, 0, 0, 271, 46, 1, 0, 0, 0, 272, 273, 5, 33, 0, 0, 273, 274, 5, 61, 0, 0, 274, 48, 1, 0, 0, 0, 275, 276, 5, 33, 0, 0, 276, 50, 1, 0, 0, 0, 277, 278, 5, 38, 0, 0, 278, 279, 5, 38, 0, 0, 279, 52, 1, 0, 0, 0, 280, 281, 5, 124, 0, 0, 281, 282, 5, 124, 0, 0, 282, 54, 1, 0, 0, 0, 283, 284, 5, 46, 0, 0, 284, 56, 1, 0, 0, 0, 285, 286, 5, 40, 0, 0, 286, 58, 1, 0, 0, 0, 287, 288, 5, 41, 0, 0, 288, 60, 1, 0, 0, 0, 289, 290, 5, 123, 0, 0, 290, 62, 1, 0, 0, 0, 291, 292, 5, 125, 0, 0, 292, 64, 1, 0, 0, 0, 293, 294, 5, 59, 0, 0, 294, 66, 1, 0, 0, 0, 295, 296, 5, 44, 0, 0, 296, 68, 1, 0, 0, 0, 297, 298, 5, 99, 0, 0, 298, 299, 5, 108, 0, 0, 299, 300, 5, 97, 0, 0, 300, 301, 5, 115, 0, 0, 301, 302, 5, 115, 0, 0, 302, 70, 1, 0, 0, 0, 303, 304, 5, 116, 0, 0, 304, 305, 5, 104, 0, 0, 305, 306, 5, 105, 0, 0, 306, 307, 5, 115, 0, 0, 307, 72, 1, 0, 0, 0, 308, 309, 5, 119, 0, 0, 309, 310, 5, 104, 0, 0, 310, 311, 5, 105, 0, 0, 311, 312, 5, 108, 0, 0, 312, 313, 5, 101, 0, 0, 313, 74, 1, 0, 0, 0, 314, 315, 5, 100, 0, 0, 315, 316, 5, 111, 0, 0, 316, 76, 1, 0, 0, 0, 317, 318, 5, 105, 0, 0, 318, 319, 5, 102, 0, 0, 319, 78, 1, 0, 0, 0, 320, 321, 5, 101, 0, 0, 321, 322, 5, 108, 0, 0, 322, 323, 5, 115, 0, 0, 323, 324, 5, 101, 0, 0, 324, 80, 1, 0, 0, 0, 325, 326, 5, 102, 0, 0, 326, 327, 5, 111, 0, 0, 327, 328, 5, 114, 0, 0, 328, 82, 1, 0, 0, 0, 329, 330, 5, 114, 0, 0, 330, 331, 5, 101, 0, 0, 331, 332, 5, 116, 0, 0, 332, 333, 5, 117, 0, 0, 333, 334, 5, 114, 0, 0, 334, 335, 5, 110, 0, 0, 335, 84, 1, 0, 0, 0, 336, 337, 5, 110, 0, 0, 337, 338, 5, 101, 0, 0, 338, 339, 5, 119, 0, 0, 339, 86, 1, 0, 0, 0, 340, 341, 5, 115, 0, 0, 341, 342, 5, 119, 0, 0, 342, 343, 5, 105, 0, 0, 343, 344, 5, 116, 0, 0, 344, 345, 5, 99, 0, 0, 345, 346, 5, 104, 0, 0, 346, 88, 1, 0, 0, 0, 347, 348, 5, 99, 0, 0, 348, 349, 5, 97, 0, 0, 349, 350, 5, 115, 0, 0, 350, 351, 5, 101, 0, 0, 351, 90, 1, 0, 0, 0, 352, 353, 5, 100, 0, 0, 353, 354, 5, 101, 0, 0, 354, 355, 5, 102, 0, 0, 355, 356, 5, 97, 0, 0, 356, 357, 5, 117, 0, 0, 357, 358, 5, 108, 0, 0, 358, 359, 5, 116, 0, 0, 359, 92, 1, 0, 0, 0, 360, 361, 5, 58, 0, 0, 361, 94, 1, 0, 0, 0, 362, 366, 5, 39, 0, 0, 363, 365, 8, 0, 0, 0, 364, 363, 1, 0, 0, 0, 365, 368, 1, 0, 0, 0, 366, 364, 1, 0, 0, 0, 366, 367, 1, 0, 0, 0, 367, 369, 1, 0, 0, 0, 368, 366, 1, 0, 0, 0, 369, 370, 5, 39, 0, 0, 370, 96, 1, 0, 0, 0, 371, 373, 3, 29, 14, 0, 372, 371, 1, 0, 0, 0, 372, 373, 1, 0, 0, 0, 373, 375, 1, 0, 0, 0, 374, 376, 3, 105, 52, 0, 375, 374, 1, 0, 0, 0, 376, 377, 1, 0, 0, 0, 377, 375, 1, 0, 0, 0, 377, 378, 1, 0, 0, 0, 378, 98, 1, 0, 0, 0, 379, 380, 5, 116, 0, 0, 380, 381, 5, 114, 0, 0, 381, 382, 5, 117, 0, 0, 382, 389, 5, 101, 0, 0, 383, 384, 5, 102, 0, 0, 384, 385, 5, 97, 0, 0, 385, 386, 5, 108, 0, 0, 386, 387, 5, 115, 0, 0, 387, 389, 5, 101, 0, 0, 388, 379, 1, 0, 0, 0, 388, 383, 1, 0, 0, 0, 389, 100, 1, 0, 0, 0, 390, 391, 5, 110, 0, 0, 391, 392, 5, 117, 0, 0, 392, 393, 5, 108, 0, 0, 393, 394, 5, 108, 0, 0, 394, 102, 1, 0, 0, 0, 395, 396, 7, 1, 0, 0, 396, 104, 1, 0, 0, 0, 397, 398, 7, 2, 0, 0, 398, 106, 1, 0, 0, 0, 399, 403, 3, 103, 51, 0, 400, 403, 3, 105, 52, 0, 401, 403, 7, 3, 0, 0, 402, 399, 1, 0, 0, 0, 402, 400, 1, 0, 0, 0, 402, 401, 1, 0, 0, 0, 403, 108, 1, 0, 0, 0, 404, 408, 3, 103, 51, 0, 405, 407, 3, 107, 53, 0, 406, 405, 1, 0, 0, 0, 407, 410, 1, 0, 0, 0, 408, 406, 1, 0, 0, 0, 408, 409, 1, 0, 0, 0, 409, 110, 1, 0, 0, 0, 410, 408, 1, 0, 0, 0, 411, 413, 7, 4, 0, 0, 412, 411, 1, 0, 0, 0, 413, 414, 1, 0, 0, 0, 414, 412, 1, 0, 0, 0, 414, 415, 1, 0, 0, 0, 415, 416, 1, 0, 0, 0, 416, 417, 6, 55, 0, 0, 417, 112, 1, 0, 0, 0, 418, 419, 5, 47, 0, 0, 419, 420, 5, 47, 0, 0, 420, 424, 1, 0, 0, 0, 421, 423, 8, 0, 0, 0, 422, 421, 1, 0, 0, 0, 423, 426, 1, 0, 0, 0, 424, 422, 1, 0, 0, 0, 424, 425, 1, 0, 0, 0, 425, 427, 1, 0, 0, 0, 426, 424, 1, 0, 0, 0, 427, 428, 6, 56, 0, 0, 428, 114, 1, 0, 0, 0, 429, 430, 5, 47, 0, 0, 430, 431, 5, 42, 0, 0, 431, 435, 1, 0, 0, 0, 432, 434, 9, 0, 0, 0, 433, 432, 1, 0, 0, 0, 434, 437, 1, 0, 0, 0, 435, 436, 1, 0, 0, 0, 435, 433, 1, 0, 0, 0, 436, 438, 1, 0, 0, 0, 437, 435, 1, 0, 0, 0, 438, 439, 5, 42, 0, 0, 439, 440, 5, 47, 0, 0, 440, 441, 1, 0, 0, 0, 441, 442, 6, 57, 0, 0, 442, 116, 1, 0, 0, 0, 15, 0, 185, 229, 233, 241, 245, 366, 372, 377, 388, 402, 408, 414, 424, 435, 1, 6, 0, 0]
\ No newline at end of file
diff --git a/src/main/java/parser/generated/SimpleJavaLexer.java b/src/main/java/parser/generated/SimpleJavaLexer.java
new file mode 100644
index 0000000..2b893af
--- /dev/null
+++ b/src/main/java/parser/generated/SimpleJavaLexer.java
@@ -0,0 +1,417 @@
+// Generated from C:/Users/janni/Desktop/NichtHaskell2.0/src/main/java/parser/grammar/SimpleJava.g4 by ANTLR 4.13.1
+package parser.generated;
+import org.antlr.v4.runtime.Lexer;
+import org.antlr.v4.runtime.CharStream;
+import org.antlr.v4.runtime.Token;
+import org.antlr.v4.runtime.TokenStream;
+import org.antlr.v4.runtime.*;
+import org.antlr.v4.runtime.atn.*;
+import org.antlr.v4.runtime.dfa.DFA;
+import org.antlr.v4.runtime.misc.*;
+
+@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast", "CheckReturnValue", "this-escape"})
+public class SimpleJavaLexer extends Lexer {
+ static { RuntimeMetaData.checkVersion("4.13.1", RuntimeMetaData.VERSION); }
+
+ protected static final DFA[] _decisionToDFA;
+ protected static final PredictionContextCache _sharedContextCache =
+ new PredictionContextCache();
+ public static final int
+ T__0=1, T__1=2, Void=3, Boolean=4, Char=5, Int=6, AccessModifier=7, MainMethodDeclaration=8,
+ DotOperator=9, LineOperator=10, ComparisonOperator=11, LogicalOperator=12,
+ Assign=13, Plus=14, Minus=15, Mult=16, Modulo=17, Div=18, Greater=19,
+ Less=20, GreaterEqual=21, LessEqual=22, Equal=23, NotEqual=24, Not=25,
+ And=26, Or=27, Dot=28, OpenRoundBracket=29, ClosedRoundBracket=30, OpenCurlyBracket=31,
+ ClosedCurlyBracket=32, Semicolon=33, Comma=34, Class=35, This=36, While=37,
+ Do=38, If=39, Else=40, For=41, Return=42, New=43, Switch=44, Case=45,
+ Default=46, Colon=47, CharValue=48, IntValue=49, BooleanValue=50, NullValue=51,
+ Identifier=52, WS=53, InlineComment=54, MultilineComment=55;
+ public static String[] channelNames = {
+ "DEFAULT_TOKEN_CHANNEL", "HIDDEN"
+ };
+
+ public static String[] modeNames = {
+ "DEFAULT_MODE"
+ };
+
+ private static String[] makeRuleNames() {
+ return new String[] {
+ "T__0", "T__1", "Void", "Boolean", "Char", "Int", "AccessModifier", "MainMethodDeclaration",
+ "DotOperator", "LineOperator", "ComparisonOperator", "LogicalOperator",
+ "Assign", "Plus", "Minus", "Mult", "Modulo", "Div", "Greater", "Less",
+ "GreaterEqual", "LessEqual", "Equal", "NotEqual", "Not", "And", "Or",
+ "Dot", "OpenRoundBracket", "ClosedRoundBracket", "OpenCurlyBracket",
+ "ClosedCurlyBracket", "Semicolon", "Comma", "Class", "This", "While",
+ "Do", "If", "Else", "For", "Return", "New", "Switch", "Case", "Default",
+ "Colon", "CharValue", "IntValue", "BooleanValue", "NullValue", "Alphabetic",
+ "Numeric", "ValidIdentSymbols", "Identifier", "WS", "InlineComment",
+ "MultilineComment"
+ };
+ }
+ public static final String[] ruleNames = makeRuleNames();
+
+ private static String[] makeLiteralNames() {
+ return new String[] {
+ null, "'++'", "'--'", "'void'", "'boolean'", "'char'", "'int'", null,
+ "'public static void main(String[] args)'", null, null, null, null, "'='",
+ "'+'", "'-'", "'*'", "'%'", "'/'", "'>'", "'<'", "'>='", "'<='", "'=='",
+ "'!='", "'!'", "'&&'", "'||'", "'.'", "'('", "')'", "'{'", "'}'", "';'",
+ "','", "'class'", "'this'", "'while'", "'do'", "'if'", "'else'", "'for'",
+ "'return'", "'new'", "'switch'", "'case'", "'default'", "':'", null,
+ null, null, "'null'"
+ };
+ }
+ private static final String[] _LITERAL_NAMES = makeLiteralNames();
+ private static String[] makeSymbolicNames() {
+ return new String[] {
+ null, null, null, "Void", "Boolean", "Char", "Int", "AccessModifier",
+ "MainMethodDeclaration", "DotOperator", "LineOperator", "ComparisonOperator",
+ "LogicalOperator", "Assign", "Plus", "Minus", "Mult", "Modulo", "Div",
+ "Greater", "Less", "GreaterEqual", "LessEqual", "Equal", "NotEqual",
+ "Not", "And", "Or", "Dot", "OpenRoundBracket", "ClosedRoundBracket",
+ "OpenCurlyBracket", "ClosedCurlyBracket", "Semicolon", "Comma", "Class",
+ "This", "While", "Do", "If", "Else", "For", "Return", "New", "Switch",
+ "Case", "Default", "Colon", "CharValue", "IntValue", "BooleanValue",
+ "NullValue", "Identifier", "WS", "InlineComment", "MultilineComment"
+ };
+ }
+ private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames();
+ public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
+
+ /**
+ * @deprecated Use {@link #VOCABULARY} instead.
+ */
+ @Deprecated
+ public static final String[] tokenNames;
+ static {
+ tokenNames = new String[_SYMBOLIC_NAMES.length];
+ for (int i = 0; i < tokenNames.length; i++) {
+ tokenNames[i] = VOCABULARY.getLiteralName(i);
+ if (tokenNames[i] == null) {
+ tokenNames[i] = VOCABULARY.getSymbolicName(i);
+ }
+
+ if (tokenNames[i] == null) {
+ tokenNames[i] = "";
+ }
+ }
+ }
+
+ @Override
+ @Deprecated
+ public String[] getTokenNames() {
+ return tokenNames;
+ }
+
+ @Override
+
+ public Vocabulary getVocabulary() {
+ return VOCABULARY;
+ }
+
+
+ public SimpleJavaLexer(CharStream input) {
+ super(input);
+ _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
+ }
+
+ @Override
+ public String getGrammarFileName() { return "SimpleJava.g4"; }
+
+ @Override
+ public String[] getRuleNames() { return ruleNames; }
+
+ @Override
+ public String getSerializedATN() { return _serializedATN; }
+
+ @Override
+ public String[] getChannelNames() { return channelNames; }
+
+ @Override
+ public String[] getModeNames() { return modeNames; }
+
+ @Override
+ public ATN getATN() { return _ATN; }
+
+ public static final String _serializedATN =
+ "\u0004\u00007\u01bb\u0006\uffff\uffff\u0002\u0000\u0007\u0000\u0002\u0001"+
+ "\u0007\u0001\u0002\u0002\u0007\u0002\u0002\u0003\u0007\u0003\u0002\u0004"+
+ "\u0007\u0004\u0002\u0005\u0007\u0005\u0002\u0006\u0007\u0006\u0002\u0007"+
+ "\u0007\u0007\u0002\b\u0007\b\u0002\t\u0007\t\u0002\n\u0007\n\u0002\u000b"+
+ "\u0007\u000b\u0002\f\u0007\f\u0002\r\u0007\r\u0002\u000e\u0007\u000e\u0002"+
+ "\u000f\u0007\u000f\u0002\u0010\u0007\u0010\u0002\u0011\u0007\u0011\u0002"+
+ "\u0012\u0007\u0012\u0002\u0013\u0007\u0013\u0002\u0014\u0007\u0014\u0002"+
+ "\u0015\u0007\u0015\u0002\u0016\u0007\u0016\u0002\u0017\u0007\u0017\u0002"+
+ "\u0018\u0007\u0018\u0002\u0019\u0007\u0019\u0002\u001a\u0007\u001a\u0002"+
+ "\u001b\u0007\u001b\u0002\u001c\u0007\u001c\u0002\u001d\u0007\u001d\u0002"+
+ "\u001e\u0007\u001e\u0002\u001f\u0007\u001f\u0002 \u0007 \u0002!\u0007"+
+ "!\u0002\"\u0007\"\u0002#\u0007#\u0002$\u0007$\u0002%\u0007%\u0002&\u0007"+
+ "&\u0002\'\u0007\'\u0002(\u0007(\u0002)\u0007)\u0002*\u0007*\u0002+\u0007"+
+ "+\u0002,\u0007,\u0002-\u0007-\u0002.\u0007.\u0002/\u0007/\u00020\u0007"+
+ "0\u00021\u00071\u00022\u00072\u00023\u00073\u00024\u00074\u00025\u0007"+
+ "5\u00026\u00076\u00027\u00077\u00028\u00078\u00029\u00079\u0001\u0000"+
+ "\u0001\u0000\u0001\u0000\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0002"+
+ "\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0003\u0001\u0003"+
+ "\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003"+
+ "\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0005"+
+ "\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0006\u0001\u0006\u0001\u0006"+
+ "\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006"+
+ "\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006"+
+ "\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006"+
+ "\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006"+
+ "\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006"+
+ "\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006"+
+ "\u0001\u0006\u0003\u0006\u00ba\b\u0006\u0001\u0007\u0001\u0007\u0001\u0007"+
+ "\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007"+
+ "\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007"+
+ "\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007"+
+ "\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007"+
+ "\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007"+
+ "\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007"+
+ "\u0001\b\u0001\b\u0001\b\u0003\b\u00e6\b\b\u0001\t\u0001\t\u0003\t\u00ea"+
+ "\b\t\u0001\n\u0001\n\u0001\n\u0001\n\u0001\n\u0001\n\u0003\n\u00f2\b\n"+
+ "\u0001\u000b\u0001\u000b\u0003\u000b\u00f6\b\u000b\u0001\f\u0001\f\u0001"+
+ "\r\u0001\r\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\u0014\u0001\u0015\u0001\u0015"+
+ "\u0001\u0015\u0001\u0016\u0001\u0016\u0001\u0016\u0001\u0017\u0001\u0017"+
+ "\u0001\u0017\u0001\u0018\u0001\u0018\u0001\u0019\u0001\u0019\u0001\u0019"+
+ "\u0001\u001a\u0001\u001a\u0001\u001a\u0001\u001b\u0001\u001b\u0001\u001c"+
+ "\u0001\u001c\u0001\u001d\u0001\u001d\u0001\u001e\u0001\u001e\u0001\u001f"+
+ "\u0001\u001f\u0001 \u0001 \u0001!\u0001!\u0001\"\u0001\"\u0001\"\u0001"+
+ "\"\u0001\"\u0001\"\u0001#\u0001#\u0001#\u0001#\u0001#\u0001$\u0001$\u0001"+
+ "$\u0001$\u0001$\u0001$\u0001%\u0001%\u0001%\u0001&\u0001&\u0001&\u0001"+
+ "\'\u0001\'\u0001\'\u0001\'\u0001\'\u0001(\u0001(\u0001(\u0001(\u0001)"+
+ "\u0001)\u0001)\u0001)\u0001)\u0001)\u0001)\u0001*\u0001*\u0001*\u0001"+
+ "*\u0001+\u0001+\u0001+\u0001+\u0001+\u0001+\u0001+\u0001,\u0001,\u0001"+
+ ",\u0001,\u0001,\u0001-\u0001-\u0001-\u0001-\u0001-\u0001-\u0001-\u0001"+
+ "-\u0001.\u0001.\u0001/\u0001/\u0005/\u016d\b/\n/\f/\u0170\t/\u0001/\u0001"+
+ "/\u00010\u00030\u0175\b0\u00010\u00040\u0178\b0\u000b0\f0\u0179\u0001"+
+ "1\u00011\u00011\u00011\u00011\u00011\u00011\u00011\u00011\u00031\u0185"+
+ "\b1\u00012\u00012\u00012\u00012\u00012\u00013\u00013\u00014\u00014\u0001"+
+ "5\u00015\u00015\u00035\u0193\b5\u00016\u00016\u00056\u0197\b6\n6\f6\u019a"+
+ "\t6\u00017\u00047\u019d\b7\u000b7\f7\u019e\u00017\u00017\u00018\u0001"+
+ "8\u00018\u00018\u00058\u01a7\b8\n8\f8\u01aa\t8\u00018\u00018\u00019\u0001"+
+ "9\u00019\u00019\u00059\u01b2\b9\n9\f9\u01b5\t9\u00019\u00019\u00019\u0001"+
+ "9\u00019\u0001\u01b3\u0000:\u0001\u0001\u0003\u0002\u0005\u0003\u0007"+
+ "\u0004\t\u0005\u000b\u0006\r\u0007\u000f\b\u0011\t\u0013\n\u0015\u000b"+
+ "\u0017\f\u0019\r\u001b\u000e\u001d\u000f\u001f\u0010!\u0011#\u0012%\u0013"+
+ "\'\u0014)\u0015+\u0016-\u0017/\u00181\u00193\u001a5\u001b7\u001c9\u001d"+
+ ";\u001e=\u001f? A!C\"E#G$I%K&M\'O(Q)S*U+W,Y-[.]/_0a1c2e3g\u0000i\u0000"+
+ "k\u0000m4o5q6s7\u0001\u0000\u0005\u0002\u0000\n\n\r\r\u0002\u0000AZaz"+
+ "\u0001\u000009\u0002\u0000$$__\u0003\u0000\t\n\r\r \u01cd\u0000\u0001"+
+ "\u0001\u0000\u0000\u0000\u0000\u0003\u0001\u0000\u0000\u0000\u0000\u0005"+
+ "\u0001\u0000\u0000\u0000\u0000\u0007\u0001\u0000\u0000\u0000\u0000\t\u0001"+
+ "\u0000\u0000\u0000\u0000\u000b\u0001\u0000\u0000\u0000\u0000\r\u0001\u0000"+
+ "\u0000\u0000\u0000\u000f\u0001\u0000\u0000\u0000\u0000\u0011\u0001\u0000"+
+ "\u0000\u0000\u0000\u0013\u0001\u0000\u0000\u0000\u0000\u0015\u0001\u0000"+
+ "\u0000\u0000\u0000\u0017\u0001\u0000\u0000\u0000\u0000\u0019\u0001\u0000"+
+ "\u0000\u0000\u0000\u001b\u0001\u0000\u0000\u0000\u0000\u001d\u0001\u0000"+
+ "\u0000\u0000\u0000\u001f\u0001\u0000\u0000\u0000\u0000!\u0001\u0000\u0000"+
+ "\u0000\u0000#\u0001\u0000\u0000\u0000\u0000%\u0001\u0000\u0000\u0000\u0000"+
+ "\'\u0001\u0000\u0000\u0000\u0000)\u0001\u0000\u0000\u0000\u0000+\u0001"+
+ "\u0000\u0000\u0000\u0000-\u0001\u0000\u0000\u0000\u0000/\u0001\u0000\u0000"+
+ "\u0000\u00001\u0001\u0000\u0000\u0000\u00003\u0001\u0000\u0000\u0000\u0000"+
+ "5\u0001\u0000\u0000\u0000\u00007\u0001\u0000\u0000\u0000\u00009\u0001"+
+ "\u0000\u0000\u0000\u0000;\u0001\u0000\u0000\u0000\u0000=\u0001\u0000\u0000"+
+ "\u0000\u0000?\u0001\u0000\u0000\u0000\u0000A\u0001\u0000\u0000\u0000\u0000"+
+ "C\u0001\u0000\u0000\u0000\u0000E\u0001\u0000\u0000\u0000\u0000G\u0001"+
+ "\u0000\u0000\u0000\u0000I\u0001\u0000\u0000\u0000\u0000K\u0001\u0000\u0000"+
+ "\u0000\u0000M\u0001\u0000\u0000\u0000\u0000O\u0001\u0000\u0000\u0000\u0000"+
+ "Q\u0001\u0000\u0000\u0000\u0000S\u0001\u0000\u0000\u0000\u0000U\u0001"+
+ "\u0000\u0000\u0000\u0000W\u0001\u0000\u0000\u0000\u0000Y\u0001\u0000\u0000"+
+ "\u0000\u0000[\u0001\u0000\u0000\u0000\u0000]\u0001\u0000\u0000\u0000\u0000"+
+ "_\u0001\u0000\u0000\u0000\u0000a\u0001\u0000\u0000\u0000\u0000c\u0001"+
+ "\u0000\u0000\u0000\u0000e\u0001\u0000\u0000\u0000\u0000m\u0001\u0000\u0000"+
+ "\u0000\u0000o\u0001\u0000\u0000\u0000\u0000q\u0001\u0000\u0000\u0000\u0000"+
+ "s\u0001\u0000\u0000\u0000\u0001u\u0001\u0000\u0000\u0000\u0003x\u0001"+
+ "\u0000\u0000\u0000\u0005{\u0001\u0000\u0000\u0000\u0007\u0080\u0001\u0000"+
+ "\u0000\u0000\t\u0088\u0001\u0000\u0000\u0000\u000b\u008d\u0001\u0000\u0000"+
+ "\u0000\r\u00b9\u0001\u0000\u0000\u0000\u000f\u00bb\u0001\u0000\u0000\u0000"+
+ "\u0011\u00e5\u0001\u0000\u0000\u0000\u0013\u00e9\u0001\u0000\u0000\u0000"+
+ "\u0015\u00f1\u0001\u0000\u0000\u0000\u0017\u00f5\u0001\u0000\u0000\u0000"+
+ "\u0019\u00f7\u0001\u0000\u0000\u0000\u001b\u00f9\u0001\u0000\u0000\u0000"+
+ "\u001d\u00fb\u0001\u0000\u0000\u0000\u001f\u00fd\u0001\u0000\u0000\u0000"+
+ "!\u00ff\u0001\u0000\u0000\u0000#\u0101\u0001\u0000\u0000\u0000%\u0103"+
+ "\u0001\u0000\u0000\u0000\'\u0105\u0001\u0000\u0000\u0000)\u0107\u0001"+
+ "\u0000\u0000\u0000+\u010a\u0001\u0000\u0000\u0000-\u010d\u0001\u0000\u0000"+
+ "\u0000/\u0110\u0001\u0000\u0000\u00001\u0113\u0001\u0000\u0000\u00003"+
+ "\u0115\u0001\u0000\u0000\u00005\u0118\u0001\u0000\u0000\u00007\u011b\u0001"+
+ "\u0000\u0000\u00009\u011d\u0001\u0000\u0000\u0000;\u011f\u0001\u0000\u0000"+
+ "\u0000=\u0121\u0001\u0000\u0000\u0000?\u0123\u0001\u0000\u0000\u0000A"+
+ "\u0125\u0001\u0000\u0000\u0000C\u0127\u0001\u0000\u0000\u0000E\u0129\u0001"+
+ "\u0000\u0000\u0000G\u012f\u0001\u0000\u0000\u0000I\u0134\u0001\u0000\u0000"+
+ "\u0000K\u013a\u0001\u0000\u0000\u0000M\u013d\u0001\u0000\u0000\u0000O"+
+ "\u0140\u0001\u0000\u0000\u0000Q\u0145\u0001\u0000\u0000\u0000S\u0149\u0001"+
+ "\u0000\u0000\u0000U\u0150\u0001\u0000\u0000\u0000W\u0154\u0001\u0000\u0000"+
+ "\u0000Y\u015b\u0001\u0000\u0000\u0000[\u0160\u0001\u0000\u0000\u0000]"+
+ "\u0168\u0001\u0000\u0000\u0000_\u016a\u0001\u0000\u0000\u0000a\u0174\u0001"+
+ "\u0000\u0000\u0000c\u0184\u0001\u0000\u0000\u0000e\u0186\u0001\u0000\u0000"+
+ "\u0000g\u018b\u0001\u0000\u0000\u0000i\u018d\u0001\u0000\u0000\u0000k"+
+ "\u0192\u0001\u0000\u0000\u0000m\u0194\u0001\u0000\u0000\u0000o\u019c\u0001"+
+ "\u0000\u0000\u0000q\u01a2\u0001\u0000\u0000\u0000s\u01ad\u0001\u0000\u0000"+
+ "\u0000uv\u0005+\u0000\u0000vw\u0005+\u0000\u0000w\u0002\u0001\u0000\u0000"+
+ "\u0000xy\u0005-\u0000\u0000yz\u0005-\u0000\u0000z\u0004\u0001\u0000\u0000"+
+ "\u0000{|\u0005v\u0000\u0000|}\u0005o\u0000\u0000}~\u0005i\u0000\u0000"+
+ "~\u007f\u0005d\u0000\u0000\u007f\u0006\u0001\u0000\u0000\u0000\u0080\u0081"+
+ "\u0005b\u0000\u0000\u0081\u0082\u0005o\u0000\u0000\u0082\u0083\u0005o"+
+ "\u0000\u0000\u0083\u0084\u0005l\u0000\u0000\u0084\u0085\u0005e\u0000\u0000"+
+ "\u0085\u0086\u0005a\u0000\u0000\u0086\u0087\u0005n\u0000\u0000\u0087\b"+
+ "\u0001\u0000\u0000\u0000\u0088\u0089\u0005c\u0000\u0000\u0089\u008a\u0005"+
+ "h\u0000\u0000\u008a\u008b\u0005a\u0000\u0000\u008b\u008c\u0005r\u0000"+
+ "\u0000\u008c\n\u0001\u0000\u0000\u0000\u008d\u008e\u0005i\u0000\u0000"+
+ "\u008e\u008f\u0005n\u0000\u0000\u008f\u0090\u0005t\u0000\u0000\u0090\f"+
+ "\u0001\u0000\u0000\u0000\u0091\u0092\u0005p\u0000\u0000\u0092\u0093\u0005"+
+ "u\u0000\u0000\u0093\u0094\u0005b\u0000\u0000\u0094\u0095\u0005l\u0000"+
+ "\u0000\u0095\u0096\u0005i\u0000\u0000\u0096\u00ba\u0005c\u0000\u0000\u0097"+
+ "\u0098\u0005p\u0000\u0000\u0098\u0099\u0005r\u0000\u0000\u0099\u009a\u0005"+
+ "i\u0000\u0000\u009a\u009b\u0005v\u0000\u0000\u009b\u009c\u0005a\u0000"+
+ "\u0000\u009c\u009d\u0005t\u0000\u0000\u009d\u00ba\u0005e\u0000\u0000\u009e"+
+ "\u009f\u0005p\u0000\u0000\u009f\u00a0\u0005u\u0000\u0000\u00a0\u00a1\u0005"+
+ "b\u0000\u0000\u00a1\u00a2\u0005l\u0000\u0000\u00a2\u00a3\u0005i\u0000"+
+ "\u0000\u00a3\u00a4\u0005c\u0000\u0000\u00a4\u00a5\u0005 \u0000\u0000\u00a5"+
+ "\u00a6\u0005s\u0000\u0000\u00a6\u00a7\u0005t\u0000\u0000\u00a7\u00a8\u0005"+
+ "a\u0000\u0000\u00a8\u00a9\u0005t\u0000\u0000\u00a9\u00aa\u0005i\u0000"+
+ "\u0000\u00aa\u00ba\u0005c\u0000\u0000\u00ab\u00ac\u0005p\u0000\u0000\u00ac"+
+ "\u00ad\u0005r\u0000\u0000\u00ad\u00ae\u0005i\u0000\u0000\u00ae\u00af\u0005"+
+ "v\u0000\u0000\u00af\u00b0\u0005a\u0000\u0000\u00b0\u00b1\u0005t\u0000"+
+ "\u0000\u00b1\u00b2\u0005e\u0000\u0000\u00b2\u00b3\u0005 \u0000\u0000\u00b3"+
+ "\u00b4\u0005s\u0000\u0000\u00b4\u00b5\u0005t\u0000\u0000\u00b5\u00b6\u0005"+
+ "a\u0000\u0000\u00b6\u00b7\u0005t\u0000\u0000\u00b7\u00b8\u0005i\u0000"+
+ "\u0000\u00b8\u00ba\u0005c\u0000\u0000\u00b9\u0091\u0001\u0000\u0000\u0000"+
+ "\u00b9\u0097\u0001\u0000\u0000\u0000\u00b9\u009e\u0001\u0000\u0000\u0000"+
+ "\u00b9\u00ab\u0001\u0000\u0000\u0000\u00ba\u000e\u0001\u0000\u0000\u0000"+
+ "\u00bb\u00bc\u0005p\u0000\u0000\u00bc\u00bd\u0005u\u0000\u0000\u00bd\u00be"+
+ "\u0005b\u0000\u0000\u00be\u00bf\u0005l\u0000\u0000\u00bf\u00c0\u0005i"+
+ "\u0000\u0000\u00c0\u00c1\u0005c\u0000\u0000\u00c1\u00c2\u0005 \u0000\u0000"+
+ "\u00c2\u00c3\u0005s\u0000\u0000\u00c3\u00c4\u0005t\u0000\u0000\u00c4\u00c5"+
+ "\u0005a\u0000\u0000\u00c5\u00c6\u0005t\u0000\u0000\u00c6\u00c7\u0005i"+
+ "\u0000\u0000\u00c7\u00c8\u0005c\u0000\u0000\u00c8\u00c9\u0005 \u0000\u0000"+
+ "\u00c9\u00ca\u0005v\u0000\u0000\u00ca\u00cb\u0005o\u0000\u0000\u00cb\u00cc"+
+ "\u0005i\u0000\u0000\u00cc\u00cd\u0005d\u0000\u0000\u00cd\u00ce\u0005 "+
+ "\u0000\u0000\u00ce\u00cf\u0005m\u0000\u0000\u00cf\u00d0\u0005a\u0000\u0000"+
+ "\u00d0\u00d1\u0005i\u0000\u0000\u00d1\u00d2\u0005n\u0000\u0000\u00d2\u00d3"+
+ "\u0005(\u0000\u0000\u00d3\u00d4\u0005S\u0000\u0000\u00d4\u00d5\u0005t"+
+ "\u0000\u0000\u00d5\u00d6\u0005r\u0000\u0000\u00d6\u00d7\u0005i\u0000\u0000"+
+ "\u00d7\u00d8\u0005n\u0000\u0000\u00d8\u00d9\u0005g\u0000\u0000\u00d9\u00da"+
+ "\u0005[\u0000\u0000\u00da\u00db\u0005]\u0000\u0000\u00db\u00dc\u0005 "+
+ "\u0000\u0000\u00dc\u00dd\u0005a\u0000\u0000\u00dd\u00de\u0005r\u0000\u0000"+
+ "\u00de\u00df\u0005g\u0000\u0000\u00df\u00e0\u0005s\u0000\u0000\u00e0\u00e1"+
+ "\u0005)\u0000\u0000\u00e1\u0010\u0001\u0000\u0000\u0000\u00e2\u00e6\u0003"+
+ "\u001f\u000f\u0000\u00e3\u00e6\u0003#\u0011\u0000\u00e4\u00e6\u0003!\u0010"+
+ "\u0000\u00e5\u00e2\u0001\u0000\u0000\u0000\u00e5\u00e3\u0001\u0000\u0000"+
+ "\u0000\u00e5\u00e4\u0001\u0000\u0000\u0000\u00e6\u0012\u0001\u0000\u0000"+
+ "\u0000\u00e7\u00ea\u0003\u001b\r\u0000\u00e8\u00ea\u0003\u001d\u000e\u0000"+
+ "\u00e9\u00e7\u0001\u0000\u0000\u0000\u00e9\u00e8\u0001\u0000\u0000\u0000"+
+ "\u00ea\u0014\u0001\u0000\u0000\u0000\u00eb\u00f2\u0003%\u0012\u0000\u00ec"+
+ "\u00f2\u0003\'\u0013\u0000\u00ed\u00f2\u0003)\u0014\u0000\u00ee\u00f2"+
+ "\u0003+\u0015\u0000\u00ef\u00f2\u0003-\u0016\u0000\u00f0\u00f2\u0003/"+
+ "\u0017\u0000\u00f1\u00eb\u0001\u0000\u0000\u0000\u00f1\u00ec\u0001\u0000"+
+ "\u0000\u0000\u00f1\u00ed\u0001\u0000\u0000\u0000\u00f1\u00ee\u0001\u0000"+
+ "\u0000\u0000\u00f1\u00ef\u0001\u0000\u0000\u0000\u00f1\u00f0\u0001\u0000"+
+ "\u0000\u0000\u00f2\u0016\u0001\u0000\u0000\u0000\u00f3\u00f6\u00033\u0019"+
+ "\u0000\u00f4\u00f6\u00035\u001a\u0000\u00f5\u00f3\u0001\u0000\u0000\u0000"+
+ "\u00f5\u00f4\u0001\u0000\u0000\u0000\u00f6\u0018\u0001\u0000\u0000\u0000"+
+ "\u00f7\u00f8\u0005=\u0000\u0000\u00f8\u001a\u0001\u0000\u0000\u0000\u00f9"+
+ "\u00fa\u0005+\u0000\u0000\u00fa\u001c\u0001\u0000\u0000\u0000\u00fb\u00fc"+
+ "\u0005-\u0000\u0000\u00fc\u001e\u0001\u0000\u0000\u0000\u00fd\u00fe\u0005"+
+ "*\u0000\u0000\u00fe \u0001\u0000\u0000\u0000\u00ff\u0100\u0005%\u0000"+
+ "\u0000\u0100\"\u0001\u0000\u0000\u0000\u0101\u0102\u0005/\u0000\u0000"+
+ "\u0102$\u0001\u0000\u0000\u0000\u0103\u0104\u0005>\u0000\u0000\u0104&"+
+ "\u0001\u0000\u0000\u0000\u0105\u0106\u0005<\u0000\u0000\u0106(\u0001\u0000"+
+ "\u0000\u0000\u0107\u0108\u0005>\u0000\u0000\u0108\u0109\u0005=\u0000\u0000"+
+ "\u0109*\u0001\u0000\u0000\u0000\u010a\u010b\u0005<\u0000\u0000\u010b\u010c"+
+ "\u0005=\u0000\u0000\u010c,\u0001\u0000\u0000\u0000\u010d\u010e\u0005="+
+ "\u0000\u0000\u010e\u010f\u0005=\u0000\u0000\u010f.\u0001\u0000\u0000\u0000"+
+ "\u0110\u0111\u0005!\u0000\u0000\u0111\u0112\u0005=\u0000\u0000\u01120"+
+ "\u0001\u0000\u0000\u0000\u0113\u0114\u0005!\u0000\u0000\u01142\u0001\u0000"+
+ "\u0000\u0000\u0115\u0116\u0005&\u0000\u0000\u0116\u0117\u0005&\u0000\u0000"+
+ "\u01174\u0001\u0000\u0000\u0000\u0118\u0119\u0005|\u0000\u0000\u0119\u011a"+
+ "\u0005|\u0000\u0000\u011a6\u0001\u0000\u0000\u0000\u011b\u011c\u0005."+
+ "\u0000\u0000\u011c8\u0001\u0000\u0000\u0000\u011d\u011e\u0005(\u0000\u0000"+
+ "\u011e:\u0001\u0000\u0000\u0000\u011f\u0120\u0005)\u0000\u0000\u0120<"+
+ "\u0001\u0000\u0000\u0000\u0121\u0122\u0005{\u0000\u0000\u0122>\u0001\u0000"+
+ "\u0000\u0000\u0123\u0124\u0005}\u0000\u0000\u0124@\u0001\u0000\u0000\u0000"+
+ "\u0125\u0126\u0005;\u0000\u0000\u0126B\u0001\u0000\u0000\u0000\u0127\u0128"+
+ "\u0005,\u0000\u0000\u0128D\u0001\u0000\u0000\u0000\u0129\u012a\u0005c"+
+ "\u0000\u0000\u012a\u012b\u0005l\u0000\u0000\u012b\u012c\u0005a\u0000\u0000"+
+ "\u012c\u012d\u0005s\u0000\u0000\u012d\u012e\u0005s\u0000\u0000\u012eF"+
+ "\u0001\u0000\u0000\u0000\u012f\u0130\u0005t\u0000\u0000\u0130\u0131\u0005"+
+ "h\u0000\u0000\u0131\u0132\u0005i\u0000\u0000\u0132\u0133\u0005s\u0000"+
+ "\u0000\u0133H\u0001\u0000\u0000\u0000\u0134\u0135\u0005w\u0000\u0000\u0135"+
+ "\u0136\u0005h\u0000\u0000\u0136\u0137\u0005i\u0000\u0000\u0137\u0138\u0005"+
+ "l\u0000\u0000\u0138\u0139\u0005e\u0000\u0000\u0139J\u0001\u0000\u0000"+
+ "\u0000\u013a\u013b\u0005d\u0000\u0000\u013b\u013c\u0005o\u0000\u0000\u013c"+
+ "L\u0001\u0000\u0000\u0000\u013d\u013e\u0005i\u0000\u0000\u013e\u013f\u0005"+
+ "f\u0000\u0000\u013fN\u0001\u0000\u0000\u0000\u0140\u0141\u0005e\u0000"+
+ "\u0000\u0141\u0142\u0005l\u0000\u0000\u0142\u0143\u0005s\u0000\u0000\u0143"+
+ "\u0144\u0005e\u0000\u0000\u0144P\u0001\u0000\u0000\u0000\u0145\u0146\u0005"+
+ "f\u0000\u0000\u0146\u0147\u0005o\u0000\u0000\u0147\u0148\u0005r\u0000"+
+ "\u0000\u0148R\u0001\u0000\u0000\u0000\u0149\u014a\u0005r\u0000\u0000\u014a"+
+ "\u014b\u0005e\u0000\u0000\u014b\u014c\u0005t\u0000\u0000\u014c\u014d\u0005"+
+ "u\u0000\u0000\u014d\u014e\u0005r\u0000\u0000\u014e\u014f\u0005n\u0000"+
+ "\u0000\u014fT\u0001\u0000\u0000\u0000\u0150\u0151\u0005n\u0000\u0000\u0151"+
+ "\u0152\u0005e\u0000\u0000\u0152\u0153\u0005w\u0000\u0000\u0153V\u0001"+
+ "\u0000\u0000\u0000\u0154\u0155\u0005s\u0000\u0000\u0155\u0156\u0005w\u0000"+
+ "\u0000\u0156\u0157\u0005i\u0000\u0000\u0157\u0158\u0005t\u0000\u0000\u0158"+
+ "\u0159\u0005c\u0000\u0000\u0159\u015a\u0005h\u0000\u0000\u015aX\u0001"+
+ "\u0000\u0000\u0000\u015b\u015c\u0005c\u0000\u0000\u015c\u015d\u0005a\u0000"+
+ "\u0000\u015d\u015e\u0005s\u0000\u0000\u015e\u015f\u0005e\u0000\u0000\u015f"+
+ "Z\u0001\u0000\u0000\u0000\u0160\u0161\u0005d\u0000\u0000\u0161\u0162\u0005"+
+ "e\u0000\u0000\u0162\u0163\u0005f\u0000\u0000\u0163\u0164\u0005a\u0000"+
+ "\u0000\u0164\u0165\u0005u\u0000\u0000\u0165\u0166\u0005l\u0000\u0000\u0166"+
+ "\u0167\u0005t\u0000\u0000\u0167\\\u0001\u0000\u0000\u0000\u0168\u0169"+
+ "\u0005:\u0000\u0000\u0169^\u0001\u0000\u0000\u0000\u016a\u016e\u0005\'"+
+ "\u0000\u0000\u016b\u016d\b\u0000\u0000\u0000\u016c\u016b\u0001\u0000\u0000"+
+ "\u0000\u016d\u0170\u0001\u0000\u0000\u0000\u016e\u016c\u0001\u0000\u0000"+
+ "\u0000\u016e\u016f\u0001\u0000\u0000\u0000\u016f\u0171\u0001\u0000\u0000"+
+ "\u0000\u0170\u016e\u0001\u0000\u0000\u0000\u0171\u0172\u0005\'\u0000\u0000"+
+ "\u0172`\u0001\u0000\u0000\u0000\u0173\u0175\u0003\u001d\u000e\u0000\u0174"+
+ "\u0173\u0001\u0000\u0000\u0000\u0174\u0175\u0001\u0000\u0000\u0000\u0175"+
+ "\u0177\u0001\u0000\u0000\u0000\u0176\u0178\u0003i4\u0000\u0177\u0176\u0001"+
+ "\u0000\u0000\u0000\u0178\u0179\u0001\u0000\u0000\u0000\u0179\u0177\u0001"+
+ "\u0000\u0000\u0000\u0179\u017a\u0001\u0000\u0000\u0000\u017ab\u0001\u0000"+
+ "\u0000\u0000\u017b\u017c\u0005t\u0000\u0000\u017c\u017d\u0005r\u0000\u0000"+
+ "\u017d\u017e\u0005u\u0000\u0000\u017e\u0185\u0005e\u0000\u0000\u017f\u0180"+
+ "\u0005f\u0000\u0000\u0180\u0181\u0005a\u0000\u0000\u0181\u0182\u0005l"+
+ "\u0000\u0000\u0182\u0183\u0005s\u0000\u0000\u0183\u0185\u0005e\u0000\u0000"+
+ "\u0184\u017b\u0001\u0000\u0000\u0000\u0184\u017f\u0001\u0000\u0000\u0000"+
+ "\u0185d\u0001\u0000\u0000\u0000\u0186\u0187\u0005n\u0000\u0000\u0187\u0188"+
+ "\u0005u\u0000\u0000\u0188\u0189\u0005l\u0000\u0000\u0189\u018a\u0005l"+
+ "\u0000\u0000\u018af\u0001\u0000\u0000\u0000\u018b\u018c\u0007\u0001\u0000"+
+ "\u0000\u018ch\u0001\u0000\u0000\u0000\u018d\u018e\u0007\u0002\u0000\u0000"+
+ "\u018ej\u0001\u0000\u0000\u0000\u018f\u0193\u0003g3\u0000\u0190\u0193"+
+ "\u0003i4\u0000\u0191\u0193\u0007\u0003\u0000\u0000\u0192\u018f\u0001\u0000"+
+ "\u0000\u0000\u0192\u0190\u0001\u0000\u0000\u0000\u0192\u0191\u0001\u0000"+
+ "\u0000\u0000\u0193l\u0001\u0000\u0000\u0000\u0194\u0198\u0003g3\u0000"+
+ "\u0195\u0197\u0003k5\u0000\u0196\u0195\u0001\u0000\u0000\u0000\u0197\u019a"+
+ "\u0001\u0000\u0000\u0000\u0198\u0196\u0001\u0000\u0000\u0000\u0198\u0199"+
+ "\u0001\u0000\u0000\u0000\u0199n\u0001\u0000\u0000\u0000\u019a\u0198\u0001"+
+ "\u0000\u0000\u0000\u019b\u019d\u0007\u0004\u0000\u0000\u019c\u019b\u0001"+
+ "\u0000\u0000\u0000\u019d\u019e\u0001\u0000\u0000\u0000\u019e\u019c\u0001"+
+ "\u0000\u0000\u0000\u019e\u019f\u0001\u0000\u0000\u0000\u019f\u01a0\u0001"+
+ "\u0000\u0000\u0000\u01a0\u01a1\u00067\u0000\u0000\u01a1p\u0001\u0000\u0000"+
+ "\u0000\u01a2\u01a3\u0005/\u0000\u0000\u01a3\u01a4\u0005/\u0000\u0000\u01a4"+
+ "\u01a8\u0001\u0000\u0000\u0000\u01a5\u01a7\b\u0000\u0000\u0000\u01a6\u01a5"+
+ "\u0001\u0000\u0000\u0000\u01a7\u01aa\u0001\u0000\u0000\u0000\u01a8\u01a6"+
+ "\u0001\u0000\u0000\u0000\u01a8\u01a9\u0001\u0000\u0000\u0000\u01a9\u01ab"+
+ "\u0001\u0000\u0000\u0000\u01aa\u01a8\u0001\u0000\u0000\u0000\u01ab\u01ac"+
+ "\u00068\u0000\u0000\u01acr\u0001\u0000\u0000\u0000\u01ad\u01ae\u0005/"+
+ "\u0000\u0000\u01ae\u01af\u0005*\u0000\u0000\u01af\u01b3\u0001\u0000\u0000"+
+ "\u0000\u01b0\u01b2\t\u0000\u0000\u0000\u01b1\u01b0\u0001\u0000\u0000\u0000"+
+ "\u01b2\u01b5\u0001\u0000\u0000\u0000\u01b3\u01b4\u0001\u0000\u0000\u0000"+
+ "\u01b3\u01b1\u0001\u0000\u0000\u0000\u01b4\u01b6\u0001\u0000\u0000\u0000"+
+ "\u01b5\u01b3\u0001\u0000\u0000\u0000\u01b6\u01b7\u0005*\u0000\u0000\u01b7"+
+ "\u01b8\u0005/\u0000\u0000\u01b8\u01b9\u0001\u0000\u0000\u0000\u01b9\u01ba"+
+ "\u00069\u0000\u0000\u01bat\u0001\u0000\u0000\u0000\u000f\u0000\u00b9\u00e5"+
+ "\u00e9\u00f1\u00f5\u016e\u0174\u0179\u0184\u0192\u0198\u019e\u01a8\u01b3"+
+ "\u0001\u0006\u0000\u0000";
+ public static final ATN _ATN =
+ new ATNDeserializer().deserialize(_serializedATN.toCharArray());
+ static {
+ _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()];
+ for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) {
+ _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/parser/generated/SimpleJavaLexer.tokens b/src/main/java/parser/generated/SimpleJavaLexer.tokens
new file mode 100644
index 0000000..ffe0902
--- /dev/null
+++ b/src/main/java/parser/generated/SimpleJavaLexer.tokens
@@ -0,0 +1,98 @@
+T__0=1
+T__1=2
+Void=3
+Boolean=4
+Char=5
+Int=6
+AccessModifier=7
+MainMethodDeclaration=8
+DotOperator=9
+LineOperator=10
+ComparisonOperator=11
+LogicalOperator=12
+Assign=13
+Plus=14
+Minus=15
+Mult=16
+Modulo=17
+Div=18
+Greater=19
+Less=20
+GreaterEqual=21
+LessEqual=22
+Equal=23
+NotEqual=24
+Not=25
+And=26
+Or=27
+Dot=28
+OpenRoundBracket=29
+ClosedRoundBracket=30
+OpenCurlyBracket=31
+ClosedCurlyBracket=32
+Semicolon=33
+Comma=34
+Class=35
+This=36
+While=37
+Do=38
+If=39
+Else=40
+For=41
+Return=42
+New=43
+Switch=44
+Case=45
+Default=46
+Colon=47
+CharValue=48
+IntValue=49
+BooleanValue=50
+NullValue=51
+Identifier=52
+WS=53
+InlineComment=54
+MultilineComment=55
+'++'=1
+'--'=2
+'void'=3
+'boolean'=4
+'char'=5
+'int'=6
+'public static void main(String[] args)'=8
+'='=13
+'+'=14
+'-'=15
+'*'=16
+'%'=17
+'/'=18
+'>'=19
+'<'=20
+'>='=21
+'<='=22
+'=='=23
+'!='=24
+'!'=25
+'&&'=26
+'||'=27
+'.'=28
+'('=29
+')'=30
+'{'=31
+'}'=32
+';'=33
+','=34
+'class'=35
+'this'=36
+'while'=37
+'do'=38
+'if'=39
+'else'=40
+'for'=41
+'return'=42
+'new'=43
+'switch'=44
+'case'=45
+'default'=46
+':'=47
+'null'=51
diff --git a/src/main/java/parser/generated/SimpleJavaListener.java b/src/main/java/parser/generated/SimpleJavaListener.java
new file mode 100644
index 0000000..e5d9ce1
--- /dev/null
+++ b/src/main/java/parser/generated/SimpleJavaListener.java
@@ -0,0 +1,500 @@
+// Generated from C:/Users/janni/Desktop/NichtHaskell2.0/src/main/java/parser/grammar/SimpleJava.g4 by ANTLR 4.13.1
+package parser.generated;
+import org.antlr.v4.runtime.tree.ParseTreeListener;
+
+/**
+ * This interface defines a complete listener for a parse tree produced by
+ * {@link SimpleJavaParser}.
+ */
+public interface SimpleJavaListener extends ParseTreeListener {
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#program}.
+ * @param ctx the parse tree
+ */
+ void enterProgram(SimpleJavaParser.ProgramContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#program}.
+ * @param ctx the parse tree
+ */
+ void exitProgram(SimpleJavaParser.ProgramContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#classDeclaration}.
+ * @param ctx the parse tree
+ */
+ void enterClassDeclaration(SimpleJavaParser.ClassDeclarationContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#classDeclaration}.
+ * @param ctx the parse tree
+ */
+ void exitClassDeclaration(SimpleJavaParser.ClassDeclarationContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#memberDeclaration}.
+ * @param ctx the parse tree
+ */
+ void enterMemberDeclaration(SimpleJavaParser.MemberDeclarationContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#memberDeclaration}.
+ * @param ctx the parse tree
+ */
+ void exitMemberDeclaration(SimpleJavaParser.MemberDeclarationContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#constructorDeclaration}.
+ * @param ctx the parse tree
+ */
+ void enterConstructorDeclaration(SimpleJavaParser.ConstructorDeclarationContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#constructorDeclaration}.
+ * @param ctx the parse tree
+ */
+ void exitConstructorDeclaration(SimpleJavaParser.ConstructorDeclarationContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#fieldDeclaration}.
+ * @param ctx the parse tree
+ */
+ void enterFieldDeclaration(SimpleJavaParser.FieldDeclarationContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#fieldDeclaration}.
+ * @param ctx the parse tree
+ */
+ void exitFieldDeclaration(SimpleJavaParser.FieldDeclarationContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#methodDeclaration}.
+ * @param ctx the parse tree
+ */
+ void enterMethodDeclaration(SimpleJavaParser.MethodDeclarationContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#methodDeclaration}.
+ * @param ctx the parse tree
+ */
+ void exitMethodDeclaration(SimpleJavaParser.MethodDeclarationContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#parameterList}.
+ * @param ctx the parse tree
+ */
+ void enterParameterList(SimpleJavaParser.ParameterListContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#parameterList}.
+ * @param ctx the parse tree
+ */
+ void exitParameterList(SimpleJavaParser.ParameterListContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#parameter}.
+ * @param ctx the parse tree
+ */
+ void enterParameter(SimpleJavaParser.ParameterContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#parameter}.
+ * @param ctx the parse tree
+ */
+ void exitParameter(SimpleJavaParser.ParameterContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#argumentList}.
+ * @param ctx the parse tree
+ */
+ void enterArgumentList(SimpleJavaParser.ArgumentListContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#argumentList}.
+ * @param ctx the parse tree
+ */
+ void exitArgumentList(SimpleJavaParser.ArgumentListContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#statement}.
+ * @param ctx the parse tree
+ */
+ void enterStatement(SimpleJavaParser.StatementContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#statement}.
+ * @param ctx the parse tree
+ */
+ void exitStatement(SimpleJavaParser.StatementContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#blockStatement}.
+ * @param ctx the parse tree
+ */
+ void enterBlockStatement(SimpleJavaParser.BlockStatementContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#blockStatement}.
+ * @param ctx the parse tree
+ */
+ void exitBlockStatement(SimpleJavaParser.BlockStatementContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#returnStatement}.
+ * @param ctx the parse tree
+ */
+ void enterReturnStatement(SimpleJavaParser.ReturnStatementContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#returnStatement}.
+ * @param ctx the parse tree
+ */
+ void exitReturnStatement(SimpleJavaParser.ReturnStatementContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#localVariableDeclaration}.
+ * @param ctx the parse tree
+ */
+ void enterLocalVariableDeclaration(SimpleJavaParser.LocalVariableDeclarationContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#localVariableDeclaration}.
+ * @param ctx the parse tree
+ */
+ void exitLocalVariableDeclaration(SimpleJavaParser.LocalVariableDeclarationContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#whileStatement}.
+ * @param ctx the parse tree
+ */
+ void enterWhileStatement(SimpleJavaParser.WhileStatementContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#whileStatement}.
+ * @param ctx the parse tree
+ */
+ void exitWhileStatement(SimpleJavaParser.WhileStatementContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#doWhileStatement}.
+ * @param ctx the parse tree
+ */
+ void enterDoWhileStatement(SimpleJavaParser.DoWhileStatementContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#doWhileStatement}.
+ * @param ctx the parse tree
+ */
+ void exitDoWhileStatement(SimpleJavaParser.DoWhileStatementContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#forStatement}.
+ * @param ctx the parse tree
+ */
+ void enterForStatement(SimpleJavaParser.ForStatementContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#forStatement}.
+ * @param ctx the parse tree
+ */
+ void exitForStatement(SimpleJavaParser.ForStatementContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#ifElseStatement}.
+ * @param ctx the parse tree
+ */
+ void enterIfElseStatement(SimpleJavaParser.IfElseStatementContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#ifElseStatement}.
+ * @param ctx the parse tree
+ */
+ void exitIfElseStatement(SimpleJavaParser.IfElseStatementContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#ifStatement}.
+ * @param ctx the parse tree
+ */
+ void enterIfStatement(SimpleJavaParser.IfStatementContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#ifStatement}.
+ * @param ctx the parse tree
+ */
+ void exitIfStatement(SimpleJavaParser.IfStatementContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#elseIfStatement}.
+ * @param ctx the parse tree
+ */
+ void enterElseIfStatement(SimpleJavaParser.ElseIfStatementContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#elseIfStatement}.
+ * @param ctx the parse tree
+ */
+ void exitElseIfStatement(SimpleJavaParser.ElseIfStatementContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#elseStatement}.
+ * @param ctx the parse tree
+ */
+ void enterElseStatement(SimpleJavaParser.ElseStatementContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#elseStatement}.
+ * @param ctx the parse tree
+ */
+ void exitElseStatement(SimpleJavaParser.ElseStatementContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#switchStatement}.
+ * @param ctx the parse tree
+ */
+ void enterSwitchStatement(SimpleJavaParser.SwitchStatementContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#switchStatement}.
+ * @param ctx the parse tree
+ */
+ void exitSwitchStatement(SimpleJavaParser.SwitchStatementContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#caseStatement}.
+ * @param ctx the parse tree
+ */
+ void enterCaseStatement(SimpleJavaParser.CaseStatementContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#caseStatement}.
+ * @param ctx the parse tree
+ */
+ void exitCaseStatement(SimpleJavaParser.CaseStatementContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#defaultStatement}.
+ * @param ctx the parse tree
+ */
+ void enterDefaultStatement(SimpleJavaParser.DefaultStatementContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#defaultStatement}.
+ * @param ctx the parse tree
+ */
+ void exitDefaultStatement(SimpleJavaParser.DefaultStatementContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#statementExpression}.
+ * @param ctx the parse tree
+ */
+ void enterStatementExpression(SimpleJavaParser.StatementExpressionContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#statementExpression}.
+ * @param ctx the parse tree
+ */
+ void exitStatementExpression(SimpleJavaParser.StatementExpressionContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#assign}.
+ * @param ctx the parse tree
+ */
+ void enterAssign(SimpleJavaParser.AssignContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#assign}.
+ * @param ctx the parse tree
+ */
+ void exitAssign(SimpleJavaParser.AssignContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#newDeclaration}.
+ * @param ctx the parse tree
+ */
+ void enterNewDeclaration(SimpleJavaParser.NewDeclarationContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#newDeclaration}.
+ * @param ctx the parse tree
+ */
+ void exitNewDeclaration(SimpleJavaParser.NewDeclarationContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#expression}.
+ * @param ctx the parse tree
+ */
+ void enterExpression(SimpleJavaParser.ExpressionContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#expression}.
+ * @param ctx the parse tree
+ */
+ void exitExpression(SimpleJavaParser.ExpressionContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#unaryExpression}.
+ * @param ctx the parse tree
+ */
+ void enterUnaryExpression(SimpleJavaParser.UnaryExpressionContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#unaryExpression}.
+ * @param ctx the parse tree
+ */
+ void exitUnaryExpression(SimpleJavaParser.UnaryExpressionContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#notExpression}.
+ * @param ctx the parse tree
+ */
+ void enterNotExpression(SimpleJavaParser.NotExpressionContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#notExpression}.
+ * @param ctx the parse tree
+ */
+ void exitNotExpression(SimpleJavaParser.NotExpressionContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#crementExpression}.
+ * @param ctx the parse tree
+ */
+ void enterCrementExpression(SimpleJavaParser.CrementExpressionContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#crementExpression}.
+ * @param ctx the parse tree
+ */
+ void exitCrementExpression(SimpleJavaParser.CrementExpressionContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#incrementExpression}.
+ * @param ctx the parse tree
+ */
+ void enterIncrementExpression(SimpleJavaParser.IncrementExpressionContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#incrementExpression}.
+ * @param ctx the parse tree
+ */
+ void exitIncrementExpression(SimpleJavaParser.IncrementExpressionContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#prefixIncrementExpression}.
+ * @param ctx the parse tree
+ */
+ void enterPrefixIncrementExpression(SimpleJavaParser.PrefixIncrementExpressionContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#prefixIncrementExpression}.
+ * @param ctx the parse tree
+ */
+ void exitPrefixIncrementExpression(SimpleJavaParser.PrefixIncrementExpressionContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#suffixIncrementExpression}.
+ * @param ctx the parse tree
+ */
+ void enterSuffixIncrementExpression(SimpleJavaParser.SuffixIncrementExpressionContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#suffixIncrementExpression}.
+ * @param ctx the parse tree
+ */
+ void exitSuffixIncrementExpression(SimpleJavaParser.SuffixIncrementExpressionContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#decrementExpression}.
+ * @param ctx the parse tree
+ */
+ void enterDecrementExpression(SimpleJavaParser.DecrementExpressionContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#decrementExpression}.
+ * @param ctx the parse tree
+ */
+ void exitDecrementExpression(SimpleJavaParser.DecrementExpressionContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#prefixDecrementExpression}.
+ * @param ctx the parse tree
+ */
+ void enterPrefixDecrementExpression(SimpleJavaParser.PrefixDecrementExpressionContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#prefixDecrementExpression}.
+ * @param ctx the parse tree
+ */
+ void exitPrefixDecrementExpression(SimpleJavaParser.PrefixDecrementExpressionContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#suffixDecrementExpression}.
+ * @param ctx the parse tree
+ */
+ void enterSuffixDecrementExpression(SimpleJavaParser.SuffixDecrementExpressionContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#suffixDecrementExpression}.
+ * @param ctx the parse tree
+ */
+ void exitSuffixDecrementExpression(SimpleJavaParser.SuffixDecrementExpressionContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#assignableExpression}.
+ * @param ctx the parse tree
+ */
+ void enterAssignableExpression(SimpleJavaParser.AssignableExpressionContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#assignableExpression}.
+ * @param ctx the parse tree
+ */
+ void exitAssignableExpression(SimpleJavaParser.AssignableExpressionContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#memberAccess}.
+ * @param ctx the parse tree
+ */
+ void enterMemberAccess(SimpleJavaParser.MemberAccessContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#memberAccess}.
+ * @param ctx the parse tree
+ */
+ void exitMemberAccess(SimpleJavaParser.MemberAccessContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#binaryExpression}.
+ * @param ctx the parse tree
+ */
+ void enterBinaryExpression(SimpleJavaParser.BinaryExpressionContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#binaryExpression}.
+ * @param ctx the parse tree
+ */
+ void exitBinaryExpression(SimpleJavaParser.BinaryExpressionContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#calculationExpression}.
+ * @param ctx the parse tree
+ */
+ void enterCalculationExpression(SimpleJavaParser.CalculationExpressionContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#calculationExpression}.
+ * @param ctx the parse tree
+ */
+ void exitCalculationExpression(SimpleJavaParser.CalculationExpressionContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#dotExpression}.
+ * @param ctx the parse tree
+ */
+ void enterDotExpression(SimpleJavaParser.DotExpressionContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#dotExpression}.
+ * @param ctx the parse tree
+ */
+ void exitDotExpression(SimpleJavaParser.DotExpressionContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#dotSubtractionExpression}.
+ * @param ctx the parse tree
+ */
+ void enterDotSubtractionExpression(SimpleJavaParser.DotSubtractionExpressionContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#dotSubtractionExpression}.
+ * @param ctx the parse tree
+ */
+ void exitDotSubtractionExpression(SimpleJavaParser.DotSubtractionExpressionContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#nonCalculationExpression}.
+ * @param ctx the parse tree
+ */
+ void enterNonCalculationExpression(SimpleJavaParser.NonCalculationExpressionContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#nonCalculationExpression}.
+ * @param ctx the parse tree
+ */
+ void exitNonCalculationExpression(SimpleJavaParser.NonCalculationExpressionContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#methodCall}.
+ * @param ctx the parse tree
+ */
+ void enterMethodCall(SimpleJavaParser.MethodCallContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#methodCall}.
+ * @param ctx the parse tree
+ */
+ void exitMethodCall(SimpleJavaParser.MethodCallContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#target}.
+ * @param ctx the parse tree
+ */
+ void enterTarget(SimpleJavaParser.TargetContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#target}.
+ * @param ctx the parse tree
+ */
+ void exitTarget(SimpleJavaParser.TargetContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#chainedMethod}.
+ * @param ctx the parse tree
+ */
+ void enterChainedMethod(SimpleJavaParser.ChainedMethodContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#chainedMethod}.
+ * @param ctx the parse tree
+ */
+ void exitChainedMethod(SimpleJavaParser.ChainedMethodContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#type}.
+ * @param ctx the parse tree
+ */
+ void enterType(SimpleJavaParser.TypeContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#type}.
+ * @param ctx the parse tree
+ */
+ void exitType(SimpleJavaParser.TypeContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#value}.
+ * @param ctx the parse tree
+ */
+ void enterValue(SimpleJavaParser.ValueContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#value}.
+ * @param ctx the parse tree
+ */
+ void exitValue(SimpleJavaParser.ValueContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#nonCalculationOperator}.
+ * @param ctx the parse tree
+ */
+ void enterNonCalculationOperator(SimpleJavaParser.NonCalculationOperatorContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#nonCalculationOperator}.
+ * @param ctx the parse tree
+ */
+ void exitNonCalculationOperator(SimpleJavaParser.NonCalculationOperatorContext ctx);
+}
\ No newline at end of file
diff --git a/src/main/java/parser/generated/SimpleJavaParser.java b/src/main/java/parser/generated/SimpleJavaParser.java
new file mode 100644
index 0000000..f294da5
--- /dev/null
+++ b/src/main/java/parser/generated/SimpleJavaParser.java
@@ -0,0 +1,3899 @@
+// Generated from C:/Users/janni/Desktop/NichtHaskell2.0/src/main/java/parser/grammar/SimpleJava.g4 by ANTLR 4.13.1
+package parser.generated;
+import org.antlr.v4.runtime.atn.*;
+import org.antlr.v4.runtime.dfa.DFA;
+import org.antlr.v4.runtime.*;
+import org.antlr.v4.runtime.misc.*;
+import org.antlr.v4.runtime.tree.*;
+import java.util.List;
+import java.util.Iterator;
+import java.util.ArrayList;
+
+@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast", "CheckReturnValue"})
+public class SimpleJavaParser extends Parser {
+ static { RuntimeMetaData.checkVersion("4.13.1", RuntimeMetaData.VERSION); }
+
+ protected static final DFA[] _decisionToDFA;
+ protected static final PredictionContextCache _sharedContextCache =
+ new PredictionContextCache();
+ public static final int
+ T__0=1, T__1=2, Void=3, Boolean=4, Char=5, Int=6, AccessModifier=7, MainMethodDeclaration=8,
+ DotOperator=9, LineOperator=10, ComparisonOperator=11, LogicalOperator=12,
+ Assign=13, Plus=14, Minus=15, Mult=16, Modulo=17, Div=18, Greater=19,
+ Less=20, GreaterEqual=21, LessEqual=22, Equal=23, NotEqual=24, Not=25,
+ And=26, Or=27, Dot=28, OpenRoundBracket=29, ClosedRoundBracket=30, OpenCurlyBracket=31,
+ ClosedCurlyBracket=32, Semicolon=33, Comma=34, Class=35, This=36, While=37,
+ Do=38, If=39, Else=40, For=41, Return=42, New=43, Switch=44, Case=45,
+ Default=46, Colon=47, CharValue=48, IntValue=49, BooleanValue=50, NullValue=51,
+ Identifier=52, WS=53, InlineComment=54, MultilineComment=55;
+ public static final int
+ RULE_program = 0, RULE_classDeclaration = 1, RULE_memberDeclaration = 2,
+ RULE_constructorDeclaration = 3, RULE_fieldDeclaration = 4, RULE_methodDeclaration = 5,
+ RULE_parameterList = 6, RULE_parameter = 7, RULE_argumentList = 8, RULE_statement = 9,
+ RULE_blockStatement = 10, RULE_returnStatement = 11, RULE_localVariableDeclaration = 12,
+ RULE_whileStatement = 13, RULE_doWhileStatement = 14, RULE_forStatement = 15,
+ RULE_ifElseStatement = 16, RULE_ifStatement = 17, RULE_elseIfStatement = 18,
+ RULE_elseStatement = 19, RULE_switchStatement = 20, RULE_caseStatement = 21,
+ RULE_defaultStatement = 22, RULE_statementExpression = 23, RULE_assign = 24,
+ RULE_newDeclaration = 25, RULE_expression = 26, RULE_unaryExpression = 27,
+ RULE_notExpression = 28, RULE_crementExpression = 29, RULE_incrementExpression = 30,
+ RULE_prefixIncrementExpression = 31, RULE_suffixIncrementExpression = 32,
+ RULE_decrementExpression = 33, RULE_prefixDecrementExpression = 34, RULE_suffixDecrementExpression = 35,
+ RULE_assignableExpression = 36, RULE_memberAccess = 37, RULE_binaryExpression = 38,
+ RULE_calculationExpression = 39, RULE_dotExpression = 40, RULE_dotSubtractionExpression = 41,
+ RULE_nonCalculationExpression = 42, RULE_methodCall = 43, RULE_target = 44,
+ RULE_chainedMethod = 45, RULE_type = 46, RULE_value = 47, RULE_nonCalculationOperator = 48;
+ private static String[] makeRuleNames() {
+ return new String[] {
+ "program", "classDeclaration", "memberDeclaration", "constructorDeclaration",
+ "fieldDeclaration", "methodDeclaration", "parameterList", "parameter",
+ "argumentList", "statement", "blockStatement", "returnStatement", "localVariableDeclaration",
+ "whileStatement", "doWhileStatement", "forStatement", "ifElseStatement",
+ "ifStatement", "elseIfStatement", "elseStatement", "switchStatement",
+ "caseStatement", "defaultStatement", "statementExpression", "assign",
+ "newDeclaration", "expression", "unaryExpression", "notExpression", "crementExpression",
+ "incrementExpression", "prefixIncrementExpression", "suffixIncrementExpression",
+ "decrementExpression", "prefixDecrementExpression", "suffixDecrementExpression",
+ "assignableExpression", "memberAccess", "binaryExpression", "calculationExpression",
+ "dotExpression", "dotSubtractionExpression", "nonCalculationExpression",
+ "methodCall", "target", "chainedMethod", "type", "value", "nonCalculationOperator"
+ };
+ }
+ public static final String[] ruleNames = makeRuleNames();
+
+ private static String[] makeLiteralNames() {
+ return new String[] {
+ null, "'++'", "'--'", "'void'", "'boolean'", "'char'", "'int'", null,
+ "'public static void main(String[] args)'", null, null, null, null, "'='",
+ "'+'", "'-'", "'*'", "'%'", "'/'", "'>'", "'<'", "'>='", "'<='", "'=='",
+ "'!='", "'!'", "'&&'", "'||'", "'.'", "'('", "')'", "'{'", "'}'", "';'",
+ "','", "'class'", "'this'", "'while'", "'do'", "'if'", "'else'", "'for'",
+ "'return'", "'new'", "'switch'", "'case'", "'default'", "':'", null,
+ null, null, "'null'"
+ };
+ }
+ private static final String[] _LITERAL_NAMES = makeLiteralNames();
+ private static String[] makeSymbolicNames() {
+ return new String[] {
+ null, null, null, "Void", "Boolean", "Char", "Int", "AccessModifier",
+ "MainMethodDeclaration", "DotOperator", "LineOperator", "ComparisonOperator",
+ "LogicalOperator", "Assign", "Plus", "Minus", "Mult", "Modulo", "Div",
+ "Greater", "Less", "GreaterEqual", "LessEqual", "Equal", "NotEqual",
+ "Not", "And", "Or", "Dot", "OpenRoundBracket", "ClosedRoundBracket",
+ "OpenCurlyBracket", "ClosedCurlyBracket", "Semicolon", "Comma", "Class",
+ "This", "While", "Do", "If", "Else", "For", "Return", "New", "Switch",
+ "Case", "Default", "Colon", "CharValue", "IntValue", "BooleanValue",
+ "NullValue", "Identifier", "WS", "InlineComment", "MultilineComment"
+ };
+ }
+ private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames();
+ public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
+
+ /**
+ * @deprecated Use {@link #VOCABULARY} instead.
+ */
+ @Deprecated
+ public static final String[] tokenNames;
+ static {
+ tokenNames = new String[_SYMBOLIC_NAMES.length];
+ for (int i = 0; i < tokenNames.length; i++) {
+ tokenNames[i] = VOCABULARY.getLiteralName(i);
+ if (tokenNames[i] == null) {
+ tokenNames[i] = VOCABULARY.getSymbolicName(i);
+ }
+
+ if (tokenNames[i] == null) {
+ tokenNames[i] = "";
+ }
+ }
+ }
+
+ @Override
+ @Deprecated
+ public String[] getTokenNames() {
+ return tokenNames;
+ }
+
+ @Override
+
+ public Vocabulary getVocabulary() {
+ return VOCABULARY;
+ }
+
+ @Override
+ public String getGrammarFileName() { return "SimpleJava.g4"; }
+
+ @Override
+ public String[] getRuleNames() { return ruleNames; }
+
+ @Override
+ public String getSerializedATN() { return _serializedATN; }
+
+ @Override
+ public ATN getATN() { return _ATN; }
+
+ public SimpleJavaParser(TokenStream input) {
+ super(input);
+ _interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class ProgramContext extends ParserRuleContext {
+ public List classDeclaration() {
+ return getRuleContexts(ClassDeclarationContext.class);
+ }
+ public ClassDeclarationContext classDeclaration(int i) {
+ return getRuleContext(ClassDeclarationContext.class,i);
+ }
+ public ProgramContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_program; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterProgram(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitProgram(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitProgram(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final ProgramContext program() throws RecognitionException {
+ ProgramContext _localctx = new ProgramContext(_ctx, getState());
+ enterRule(_localctx, 0, RULE_program);
+ int _la;
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(99);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ do {
+ {
+ {
+ setState(98);
+ classDeclaration();
+ }
+ }
+ setState(101);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ } while ( _la==AccessModifier || _la==Class );
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class ClassDeclarationContext extends ParserRuleContext {
+ public TerminalNode Class() { return getToken(SimpleJavaParser.Class, 0); }
+ public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
+ public TerminalNode OpenCurlyBracket() { return getToken(SimpleJavaParser.OpenCurlyBracket, 0); }
+ public TerminalNode ClosedCurlyBracket() { return getToken(SimpleJavaParser.ClosedCurlyBracket, 0); }
+ public TerminalNode AccessModifier() { return getToken(SimpleJavaParser.AccessModifier, 0); }
+ public List memberDeclaration() {
+ return getRuleContexts(MemberDeclarationContext.class);
+ }
+ public MemberDeclarationContext memberDeclaration(int i) {
+ return getRuleContext(MemberDeclarationContext.class,i);
+ }
+ public ClassDeclarationContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_classDeclaration; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterClassDeclaration(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitClassDeclaration(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitClassDeclaration(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final ClassDeclarationContext classDeclaration() throws RecognitionException {
+ ClassDeclarationContext _localctx = new ClassDeclarationContext(_ctx, getState());
+ enterRule(_localctx, 2, RULE_classDeclaration);
+ int _la;
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(104);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ if (_la==AccessModifier) {
+ {
+ setState(103);
+ match(AccessModifier);
+ }
+ }
+
+ setState(106);
+ match(Class);
+ setState(107);
+ match(Identifier);
+ setState(108);
+ match(OpenCurlyBracket);
+ setState(112);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 4503599627371000L) != 0)) {
+ {
+ {
+ setState(109);
+ memberDeclaration();
+ }
+ }
+ setState(114);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ }
+ setState(115);
+ match(ClosedCurlyBracket);
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class MemberDeclarationContext extends ParserRuleContext {
+ public ConstructorDeclarationContext constructorDeclaration() {
+ return getRuleContext(ConstructorDeclarationContext.class,0);
+ }
+ public FieldDeclarationContext fieldDeclaration() {
+ return getRuleContext(FieldDeclarationContext.class,0);
+ }
+ public MethodDeclarationContext methodDeclaration() {
+ return getRuleContext(MethodDeclarationContext.class,0);
+ }
+ public MemberDeclarationContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_memberDeclaration; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterMemberDeclaration(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitMemberDeclaration(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitMemberDeclaration(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final MemberDeclarationContext memberDeclaration() throws RecognitionException {
+ MemberDeclarationContext _localctx = new MemberDeclarationContext(_ctx, getState());
+ enterRule(_localctx, 4, RULE_memberDeclaration);
+ try {
+ setState(120);
+ _errHandler.sync(this);
+ switch ( getInterpreter().adaptivePredict(_input,3,_ctx) ) {
+ case 1:
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(117);
+ constructorDeclaration();
+ }
+ break;
+ case 2:
+ enterOuterAlt(_localctx, 2);
+ {
+ setState(118);
+ fieldDeclaration();
+ }
+ break;
+ case 3:
+ enterOuterAlt(_localctx, 3);
+ {
+ setState(119);
+ methodDeclaration();
+ }
+ break;
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class ConstructorDeclarationContext extends ParserRuleContext {
+ public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
+ public TerminalNode OpenRoundBracket() { return getToken(SimpleJavaParser.OpenRoundBracket, 0); }
+ public TerminalNode ClosedRoundBracket() { return getToken(SimpleJavaParser.ClosedRoundBracket, 0); }
+ public BlockStatementContext blockStatement() {
+ return getRuleContext(BlockStatementContext.class,0);
+ }
+ public TerminalNode AccessModifier() { return getToken(SimpleJavaParser.AccessModifier, 0); }
+ public ParameterListContext parameterList() {
+ return getRuleContext(ParameterListContext.class,0);
+ }
+ public ConstructorDeclarationContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_constructorDeclaration; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterConstructorDeclaration(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitConstructorDeclaration(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitConstructorDeclaration(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final ConstructorDeclarationContext constructorDeclaration() throws RecognitionException {
+ ConstructorDeclarationContext _localctx = new ConstructorDeclarationContext(_ctx, getState());
+ enterRule(_localctx, 6, RULE_constructorDeclaration);
+ int _la;
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(123);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ if (_la==AccessModifier) {
+ {
+ setState(122);
+ match(AccessModifier);
+ }
+ }
+
+ setState(125);
+ match(Identifier);
+ setState(126);
+ match(OpenRoundBracket);
+ setState(128);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 4503599627370608L) != 0)) {
+ {
+ setState(127);
+ parameterList();
+ }
+ }
+
+ setState(130);
+ match(ClosedRoundBracket);
+ setState(131);
+ blockStatement();
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class FieldDeclarationContext extends ParserRuleContext {
+ public TypeContext type() {
+ return getRuleContext(TypeContext.class,0);
+ }
+ public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
+ public TerminalNode Semicolon() { return getToken(SimpleJavaParser.Semicolon, 0); }
+ public TerminalNode AccessModifier() { return getToken(SimpleJavaParser.AccessModifier, 0); }
+ public FieldDeclarationContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_fieldDeclaration; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterFieldDeclaration(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitFieldDeclaration(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitFieldDeclaration(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final FieldDeclarationContext fieldDeclaration() throws RecognitionException {
+ FieldDeclarationContext _localctx = new FieldDeclarationContext(_ctx, getState());
+ enterRule(_localctx, 8, RULE_fieldDeclaration);
+ int _la;
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(134);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ if (_la==AccessModifier) {
+ {
+ setState(133);
+ match(AccessModifier);
+ }
+ }
+
+ setState(136);
+ type();
+ setState(137);
+ match(Identifier);
+ setState(138);
+ match(Semicolon);
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class MethodDeclarationContext extends ParserRuleContext {
+ public TerminalNode MainMethodDeclaration() { return getToken(SimpleJavaParser.MainMethodDeclaration, 0); }
+ public BlockStatementContext blockStatement() {
+ return getRuleContext(BlockStatementContext.class,0);
+ }
+ public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
+ public TerminalNode OpenRoundBracket() { return getToken(SimpleJavaParser.OpenRoundBracket, 0); }
+ public TerminalNode ClosedRoundBracket() { return getToken(SimpleJavaParser.ClosedRoundBracket, 0); }
+ public TypeContext type() {
+ return getRuleContext(TypeContext.class,0);
+ }
+ public TerminalNode Void() { return getToken(SimpleJavaParser.Void, 0); }
+ public TerminalNode AccessModifier() { return getToken(SimpleJavaParser.AccessModifier, 0); }
+ public ParameterListContext parameterList() {
+ return getRuleContext(ParameterListContext.class,0);
+ }
+ public MethodDeclarationContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_methodDeclaration; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterMethodDeclaration(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitMethodDeclaration(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitMethodDeclaration(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final MethodDeclarationContext methodDeclaration() throws RecognitionException {
+ MethodDeclarationContext _localctx = new MethodDeclarationContext(_ctx, getState());
+ enterRule(_localctx, 10, RULE_methodDeclaration);
+ int _la;
+ try {
+ setState(156);
+ _errHandler.sync(this);
+ switch (_input.LA(1)) {
+ case MainMethodDeclaration:
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(140);
+ match(MainMethodDeclaration);
+ setState(141);
+ blockStatement();
+ }
+ break;
+ case Void:
+ case Boolean:
+ case Char:
+ case Int:
+ case AccessModifier:
+ case Identifier:
+ enterOuterAlt(_localctx, 2);
+ {
+ setState(143);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ if (_la==AccessModifier) {
+ {
+ setState(142);
+ match(AccessModifier);
+ }
+ }
+
+ setState(147);
+ _errHandler.sync(this);
+ switch (_input.LA(1)) {
+ case Boolean:
+ case Char:
+ case Int:
+ case Identifier:
+ {
+ setState(145);
+ type();
+ }
+ break;
+ case Void:
+ {
+ setState(146);
+ match(Void);
+ }
+ break;
+ default:
+ throw new NoViableAltException(this);
+ }
+ setState(149);
+ match(Identifier);
+ setState(150);
+ match(OpenRoundBracket);
+ setState(152);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 4503599627370608L) != 0)) {
+ {
+ setState(151);
+ parameterList();
+ }
+ }
+
+ setState(154);
+ match(ClosedRoundBracket);
+ setState(155);
+ blockStatement();
+ }
+ break;
+ default:
+ throw new NoViableAltException(this);
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class ParameterListContext extends ParserRuleContext {
+ public List parameter() {
+ return getRuleContexts(ParameterContext.class);
+ }
+ public ParameterContext parameter(int i) {
+ return getRuleContext(ParameterContext.class,i);
+ }
+ public List Comma() { return getTokens(SimpleJavaParser.Comma); }
+ public TerminalNode Comma(int i) {
+ return getToken(SimpleJavaParser.Comma, i);
+ }
+ public ParameterListContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_parameterList; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterParameterList(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitParameterList(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitParameterList(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final ParameterListContext parameterList() throws RecognitionException {
+ ParameterListContext _localctx = new ParameterListContext(_ctx, getState());
+ enterRule(_localctx, 12, RULE_parameterList);
+ int _la;
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(158);
+ parameter();
+ setState(163);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ while (_la==Comma) {
+ {
+ {
+ setState(159);
+ match(Comma);
+ setState(160);
+ parameter();
+ }
+ }
+ setState(165);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ }
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class ParameterContext extends ParserRuleContext {
+ public TypeContext type() {
+ return getRuleContext(TypeContext.class,0);
+ }
+ public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
+ public ParameterContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_parameter; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterParameter(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitParameter(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitParameter(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final ParameterContext parameter() throws RecognitionException {
+ ParameterContext _localctx = new ParameterContext(_ctx, getState());
+ enterRule(_localctx, 14, RULE_parameter);
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(166);
+ type();
+ setState(167);
+ match(Identifier);
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class ArgumentListContext extends ParserRuleContext {
+ public List expression() {
+ return getRuleContexts(ExpressionContext.class);
+ }
+ public ExpressionContext expression(int i) {
+ return getRuleContext(ExpressionContext.class,i);
+ }
+ public List Comma() { return getTokens(SimpleJavaParser.Comma); }
+ public TerminalNode Comma(int i) {
+ return getToken(SimpleJavaParser.Comma, i);
+ }
+ public ArgumentListContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_argumentList; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterArgumentList(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitArgumentList(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitArgumentList(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final ArgumentListContext argumentList() throws RecognitionException {
+ ArgumentListContext _localctx = new ArgumentListContext(_ctx, getState());
+ enterRule(_localctx, 16, RULE_argumentList);
+ int _la;
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(177);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 8734589660954630L) != 0)) {
+ {
+ setState(169);
+ expression();
+ setState(174);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ while (_la==Comma) {
+ {
+ {
+ setState(170);
+ match(Comma);
+ setState(171);
+ expression();
+ }
+ }
+ setState(176);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ }
+ }
+ }
+
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class StatementContext extends ParserRuleContext {
+ public ReturnStatementContext returnStatement() {
+ return getRuleContext(ReturnStatementContext.class,0);
+ }
+ public TerminalNode Semicolon() { return getToken(SimpleJavaParser.Semicolon, 0); }
+ public LocalVariableDeclarationContext localVariableDeclaration() {
+ return getRuleContext(LocalVariableDeclarationContext.class,0);
+ }
+ public BlockStatementContext blockStatement() {
+ return getRuleContext(BlockStatementContext.class,0);
+ }
+ public WhileStatementContext whileStatement() {
+ return getRuleContext(WhileStatementContext.class,0);
+ }
+ public DoWhileStatementContext doWhileStatement() {
+ return getRuleContext(DoWhileStatementContext.class,0);
+ }
+ public ForStatementContext forStatement() {
+ return getRuleContext(ForStatementContext.class,0);
+ }
+ public IfElseStatementContext ifElseStatement() {
+ return getRuleContext(IfElseStatementContext.class,0);
+ }
+ public SwitchStatementContext switchStatement() {
+ return getRuleContext(SwitchStatementContext.class,0);
+ }
+ public StatementExpressionContext statementExpression() {
+ return getRuleContext(StatementExpressionContext.class,0);
+ }
+ public StatementContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_statement; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterStatement(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitStatement(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitStatement(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final StatementContext statement() throws RecognitionException {
+ StatementContext _localctx = new StatementContext(_ctx, getState());
+ enterRule(_localctx, 18, RULE_statement);
+ try {
+ setState(194);
+ _errHandler.sync(this);
+ switch ( getInterpreter().adaptivePredict(_input,14,_ctx) ) {
+ case 1:
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(179);
+ returnStatement();
+ setState(180);
+ match(Semicolon);
+ }
+ break;
+ case 2:
+ enterOuterAlt(_localctx, 2);
+ {
+ setState(182);
+ localVariableDeclaration();
+ setState(183);
+ match(Semicolon);
+ }
+ break;
+ case 3:
+ enterOuterAlt(_localctx, 3);
+ {
+ setState(185);
+ blockStatement();
+ }
+ break;
+ case 4:
+ enterOuterAlt(_localctx, 4);
+ {
+ setState(186);
+ whileStatement();
+ }
+ break;
+ case 5:
+ enterOuterAlt(_localctx, 5);
+ {
+ setState(187);
+ doWhileStatement();
+ }
+ break;
+ case 6:
+ enterOuterAlt(_localctx, 6);
+ {
+ setState(188);
+ forStatement();
+ }
+ break;
+ case 7:
+ enterOuterAlt(_localctx, 7);
+ {
+ setState(189);
+ ifElseStatement();
+ }
+ break;
+ case 8:
+ enterOuterAlt(_localctx, 8);
+ {
+ setState(190);
+ switchStatement();
+ }
+ break;
+ case 9:
+ enterOuterAlt(_localctx, 9);
+ {
+ setState(191);
+ statementExpression();
+ setState(192);
+ match(Semicolon);
+ }
+ break;
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class BlockStatementContext extends ParserRuleContext {
+ public TerminalNode OpenCurlyBracket() { return getToken(SimpleJavaParser.OpenCurlyBracket, 0); }
+ public TerminalNode ClosedCurlyBracket() { return getToken(SimpleJavaParser.ClosedCurlyBracket, 0); }
+ public List statement() {
+ return getRuleContexts(StatementContext.class);
+ }
+ public StatementContext statement(int i) {
+ return getRuleContext(StatementContext.class,i);
+ }
+ public BlockStatementContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_blockStatement; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterBlockStatement(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitBlockStatement(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitBlockStatement(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final BlockStatementContext blockStatement() throws RecognitionException {
+ BlockStatementContext _localctx = new BlockStatementContext(_ctx, getState());
+ enterRule(_localctx, 20, RULE_blockStatement);
+ int _la;
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(196);
+ match(OpenCurlyBracket);
+ setState(200);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 4537617915838582L) != 0)) {
+ {
+ {
+ setState(197);
+ statement();
+ }
+ }
+ setState(202);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ }
+ setState(203);
+ match(ClosedCurlyBracket);
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class ReturnStatementContext extends ParserRuleContext {
+ public TerminalNode Return() { return getToken(SimpleJavaParser.Return, 0); }
+ public ExpressionContext expression() {
+ return getRuleContext(ExpressionContext.class,0);
+ }
+ public ReturnStatementContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_returnStatement; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterReturnStatement(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitReturnStatement(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitReturnStatement(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final ReturnStatementContext returnStatement() throws RecognitionException {
+ ReturnStatementContext _localctx = new ReturnStatementContext(_ctx, getState());
+ enterRule(_localctx, 22, RULE_returnStatement);
+ int _la;
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(205);
+ match(Return);
+ setState(207);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 8734589660954630L) != 0)) {
+ {
+ setState(206);
+ expression();
+ }
+ }
+
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class LocalVariableDeclarationContext extends ParserRuleContext {
+ public TypeContext type() {
+ return getRuleContext(TypeContext.class,0);
+ }
+ public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
+ public TerminalNode Assign() { return getToken(SimpleJavaParser.Assign, 0); }
+ public ExpressionContext expression() {
+ return getRuleContext(ExpressionContext.class,0);
+ }
+ public LocalVariableDeclarationContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_localVariableDeclaration; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterLocalVariableDeclaration(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitLocalVariableDeclaration(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitLocalVariableDeclaration(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final LocalVariableDeclarationContext localVariableDeclaration() throws RecognitionException {
+ LocalVariableDeclarationContext _localctx = new LocalVariableDeclarationContext(_ctx, getState());
+ enterRule(_localctx, 24, RULE_localVariableDeclaration);
+ int _la;
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(209);
+ type();
+ setState(210);
+ match(Identifier);
+ setState(213);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ if (_la==Assign) {
+ {
+ setState(211);
+ match(Assign);
+ setState(212);
+ expression();
+ }
+ }
+
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class WhileStatementContext extends ParserRuleContext {
+ public TerminalNode While() { return getToken(SimpleJavaParser.While, 0); }
+ public TerminalNode OpenRoundBracket() { return getToken(SimpleJavaParser.OpenRoundBracket, 0); }
+ public ExpressionContext expression() {
+ return getRuleContext(ExpressionContext.class,0);
+ }
+ public TerminalNode ClosedRoundBracket() { return getToken(SimpleJavaParser.ClosedRoundBracket, 0); }
+ public BlockStatementContext blockStatement() {
+ return getRuleContext(BlockStatementContext.class,0);
+ }
+ public WhileStatementContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_whileStatement; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterWhileStatement(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitWhileStatement(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitWhileStatement(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final WhileStatementContext whileStatement() throws RecognitionException {
+ WhileStatementContext _localctx = new WhileStatementContext(_ctx, getState());
+ enterRule(_localctx, 26, RULE_whileStatement);
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(215);
+ match(While);
+ setState(216);
+ match(OpenRoundBracket);
+ setState(217);
+ expression();
+ setState(218);
+ match(ClosedRoundBracket);
+ setState(219);
+ blockStatement();
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class DoWhileStatementContext extends ParserRuleContext {
+ public TerminalNode Do() { return getToken(SimpleJavaParser.Do, 0); }
+ public BlockStatementContext blockStatement() {
+ return getRuleContext(BlockStatementContext.class,0);
+ }
+ public TerminalNode While() { return getToken(SimpleJavaParser.While, 0); }
+ public TerminalNode OpenRoundBracket() { return getToken(SimpleJavaParser.OpenRoundBracket, 0); }
+ public ExpressionContext expression() {
+ return getRuleContext(ExpressionContext.class,0);
+ }
+ public TerminalNode ClosedRoundBracket() { return getToken(SimpleJavaParser.ClosedRoundBracket, 0); }
+ public TerminalNode Semicolon() { return getToken(SimpleJavaParser.Semicolon, 0); }
+ public DoWhileStatementContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_doWhileStatement; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterDoWhileStatement(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitDoWhileStatement(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitDoWhileStatement(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final DoWhileStatementContext doWhileStatement() throws RecognitionException {
+ DoWhileStatementContext _localctx = new DoWhileStatementContext(_ctx, getState());
+ enterRule(_localctx, 28, RULE_doWhileStatement);
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(221);
+ match(Do);
+ setState(222);
+ blockStatement();
+ setState(223);
+ match(While);
+ setState(224);
+ match(OpenRoundBracket);
+ setState(225);
+ expression();
+ setState(226);
+ match(ClosedRoundBracket);
+ setState(227);
+ match(Semicolon);
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class ForStatementContext extends ParserRuleContext {
+ public TerminalNode For() { return getToken(SimpleJavaParser.For, 0); }
+ public TerminalNode OpenRoundBracket() { return getToken(SimpleJavaParser.OpenRoundBracket, 0); }
+ public List Semicolon() { return getTokens(SimpleJavaParser.Semicolon); }
+ public TerminalNode Semicolon(int i) {
+ return getToken(SimpleJavaParser.Semicolon, i);
+ }
+ public TerminalNode ClosedRoundBracket() { return getToken(SimpleJavaParser.ClosedRoundBracket, 0); }
+ public BlockStatementContext blockStatement() {
+ return getRuleContext(BlockStatementContext.class,0);
+ }
+ public List statementExpression() {
+ return getRuleContexts(StatementExpressionContext.class);
+ }
+ public StatementExpressionContext statementExpression(int i) {
+ return getRuleContext(StatementExpressionContext.class,i);
+ }
+ public LocalVariableDeclarationContext localVariableDeclaration() {
+ return getRuleContext(LocalVariableDeclarationContext.class,0);
+ }
+ public ExpressionContext expression() {
+ return getRuleContext(ExpressionContext.class,0);
+ }
+ public ForStatementContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_forStatement; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterForStatement(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitForStatement(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitForStatement(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final ForStatementContext forStatement() throws RecognitionException {
+ ForStatementContext _localctx = new ForStatementContext(_ctx, getState());
+ enterRule(_localctx, 30, RULE_forStatement);
+ int _la;
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(229);
+ match(For);
+ setState(230);
+ match(OpenRoundBracket);
+ setState(233);
+ _errHandler.sync(this);
+ switch ( getInterpreter().adaptivePredict(_input,18,_ctx) ) {
+ case 1:
+ {
+ setState(231);
+ statementExpression();
+ }
+ break;
+ case 2:
+ {
+ setState(232);
+ localVariableDeclaration();
+ }
+ break;
+ }
+ setState(235);
+ match(Semicolon);
+ setState(237);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 8734589660954630L) != 0)) {
+ {
+ setState(236);
+ expression();
+ }
+ }
+
+ setState(239);
+ match(Semicolon);
+ setState(241);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 4512464439869446L) != 0)) {
+ {
+ setState(240);
+ statementExpression();
+ }
+ }
+
+ setState(243);
+ match(ClosedRoundBracket);
+ setState(244);
+ blockStatement();
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class IfElseStatementContext extends ParserRuleContext {
+ public IfStatementContext ifStatement() {
+ return getRuleContext(IfStatementContext.class,0);
+ }
+ public List elseIfStatement() {
+ return getRuleContexts(ElseIfStatementContext.class);
+ }
+ public ElseIfStatementContext elseIfStatement(int i) {
+ return getRuleContext(ElseIfStatementContext.class,i);
+ }
+ public ElseStatementContext elseStatement() {
+ return getRuleContext(ElseStatementContext.class,0);
+ }
+ public IfElseStatementContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_ifElseStatement; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterIfElseStatement(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitIfElseStatement(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitIfElseStatement(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final IfElseStatementContext ifElseStatement() throws RecognitionException {
+ IfElseStatementContext _localctx = new IfElseStatementContext(_ctx, getState());
+ enterRule(_localctx, 32, RULE_ifElseStatement);
+ int _la;
+ try {
+ int _alt;
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(246);
+ ifStatement();
+ setState(250);
+ _errHandler.sync(this);
+ _alt = getInterpreter().adaptivePredict(_input,21,_ctx);
+ while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
+ if ( _alt==1 ) {
+ {
+ {
+ setState(247);
+ elseIfStatement();
+ }
+ }
+ }
+ setState(252);
+ _errHandler.sync(this);
+ _alt = getInterpreter().adaptivePredict(_input,21,_ctx);
+ }
+ setState(254);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ if (_la==Else) {
+ {
+ setState(253);
+ elseStatement();
+ }
+ }
+
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class IfStatementContext extends ParserRuleContext {
+ public TerminalNode If() { return getToken(SimpleJavaParser.If, 0); }
+ public TerminalNode OpenRoundBracket() { return getToken(SimpleJavaParser.OpenRoundBracket, 0); }
+ public ExpressionContext expression() {
+ return getRuleContext(ExpressionContext.class,0);
+ }
+ public TerminalNode ClosedRoundBracket() { return getToken(SimpleJavaParser.ClosedRoundBracket, 0); }
+ public BlockStatementContext blockStatement() {
+ return getRuleContext(BlockStatementContext.class,0);
+ }
+ public IfStatementContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_ifStatement; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterIfStatement(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitIfStatement(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitIfStatement(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final IfStatementContext ifStatement() throws RecognitionException {
+ IfStatementContext _localctx = new IfStatementContext(_ctx, getState());
+ enterRule(_localctx, 34, RULE_ifStatement);
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(256);
+ match(If);
+ setState(257);
+ match(OpenRoundBracket);
+ setState(258);
+ expression();
+ setState(259);
+ match(ClosedRoundBracket);
+ setState(260);
+ blockStatement();
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class ElseIfStatementContext extends ParserRuleContext {
+ public TerminalNode Else() { return getToken(SimpleJavaParser.Else, 0); }
+ public TerminalNode If() { return getToken(SimpleJavaParser.If, 0); }
+ public TerminalNode OpenRoundBracket() { return getToken(SimpleJavaParser.OpenRoundBracket, 0); }
+ public ExpressionContext expression() {
+ return getRuleContext(ExpressionContext.class,0);
+ }
+ public TerminalNode ClosedRoundBracket() { return getToken(SimpleJavaParser.ClosedRoundBracket, 0); }
+ public BlockStatementContext blockStatement() {
+ return getRuleContext(BlockStatementContext.class,0);
+ }
+ public ElseIfStatementContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_elseIfStatement; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterElseIfStatement(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitElseIfStatement(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitElseIfStatement(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final ElseIfStatementContext elseIfStatement() throws RecognitionException {
+ ElseIfStatementContext _localctx = new ElseIfStatementContext(_ctx, getState());
+ enterRule(_localctx, 36, RULE_elseIfStatement);
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(262);
+ match(Else);
+ setState(263);
+ match(If);
+ setState(264);
+ match(OpenRoundBracket);
+ setState(265);
+ expression();
+ setState(266);
+ match(ClosedRoundBracket);
+ setState(267);
+ blockStatement();
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class ElseStatementContext extends ParserRuleContext {
+ public TerminalNode Else() { return getToken(SimpleJavaParser.Else, 0); }
+ public BlockStatementContext blockStatement() {
+ return getRuleContext(BlockStatementContext.class,0);
+ }
+ public ElseStatementContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_elseStatement; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterElseStatement(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitElseStatement(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitElseStatement(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final ElseStatementContext elseStatement() throws RecognitionException {
+ ElseStatementContext _localctx = new ElseStatementContext(_ctx, getState());
+ enterRule(_localctx, 38, RULE_elseStatement);
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(269);
+ match(Else);
+ setState(270);
+ blockStatement();
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class SwitchStatementContext extends ParserRuleContext {
+ public TerminalNode Switch() { return getToken(SimpleJavaParser.Switch, 0); }
+ public TerminalNode OpenRoundBracket() { return getToken(SimpleJavaParser.OpenRoundBracket, 0); }
+ public ExpressionContext expression() {
+ return getRuleContext(ExpressionContext.class,0);
+ }
+ public TerminalNode ClosedRoundBracket() { return getToken(SimpleJavaParser.ClosedRoundBracket, 0); }
+ public TerminalNode OpenCurlyBracket() { return getToken(SimpleJavaParser.OpenCurlyBracket, 0); }
+ public TerminalNode ClosedCurlyBracket() { return getToken(SimpleJavaParser.ClosedCurlyBracket, 0); }
+ public List caseStatement() {
+ return getRuleContexts(CaseStatementContext.class);
+ }
+ public CaseStatementContext caseStatement(int i) {
+ return getRuleContext(CaseStatementContext.class,i);
+ }
+ public DefaultStatementContext defaultStatement() {
+ return getRuleContext(DefaultStatementContext.class,0);
+ }
+ public SwitchStatementContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_switchStatement; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterSwitchStatement(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitSwitchStatement(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitSwitchStatement(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final SwitchStatementContext switchStatement() throws RecognitionException {
+ SwitchStatementContext _localctx = new SwitchStatementContext(_ctx, getState());
+ enterRule(_localctx, 40, RULE_switchStatement);
+ int _la;
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(272);
+ match(Switch);
+ setState(273);
+ match(OpenRoundBracket);
+ setState(274);
+ expression();
+ setState(275);
+ match(ClosedRoundBracket);
+ setState(276);
+ match(OpenCurlyBracket);
+ setState(278);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ do {
+ {
+ {
+ setState(277);
+ caseStatement();
+ }
+ }
+ setState(280);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ } while ( _la==Case );
+ setState(283);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ if (_la==Default) {
+ {
+ setState(282);
+ defaultStatement();
+ }
+ }
+
+ setState(285);
+ match(ClosedCurlyBracket);
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class CaseStatementContext extends ParserRuleContext {
+ public TerminalNode Case() { return getToken(SimpleJavaParser.Case, 0); }
+ public ValueContext value() {
+ return getRuleContext(ValueContext.class,0);
+ }
+ public TerminalNode Colon() { return getToken(SimpleJavaParser.Colon, 0); }
+ public List statement() {
+ return getRuleContexts(StatementContext.class);
+ }
+ public StatementContext statement(int i) {
+ return getRuleContext(StatementContext.class,i);
+ }
+ public CaseStatementContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_caseStatement; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterCaseStatement(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitCaseStatement(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitCaseStatement(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final CaseStatementContext caseStatement() throws RecognitionException {
+ CaseStatementContext _localctx = new CaseStatementContext(_ctx, getState());
+ enterRule(_localctx, 42, RULE_caseStatement);
+ int _la;
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(287);
+ match(Case);
+ setState(288);
+ value();
+ setState(289);
+ match(Colon);
+ setState(293);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 4537617915838582L) != 0)) {
+ {
+ {
+ setState(290);
+ statement();
+ }
+ }
+ setState(295);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ }
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class DefaultStatementContext extends ParserRuleContext {
+ public TerminalNode Default() { return getToken(SimpleJavaParser.Default, 0); }
+ public TerminalNode Colon() { return getToken(SimpleJavaParser.Colon, 0); }
+ public List statement() {
+ return getRuleContexts(StatementContext.class);
+ }
+ public StatementContext statement(int i) {
+ return getRuleContext(StatementContext.class,i);
+ }
+ public DefaultStatementContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_defaultStatement; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterDefaultStatement(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitDefaultStatement(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitDefaultStatement(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final DefaultStatementContext defaultStatement() throws RecognitionException {
+ DefaultStatementContext _localctx = new DefaultStatementContext(_ctx, getState());
+ enterRule(_localctx, 44, RULE_defaultStatement);
+ int _la;
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(296);
+ match(Default);
+ setState(297);
+ match(Colon);
+ setState(301);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 4537617915838582L) != 0)) {
+ {
+ {
+ setState(298);
+ statement();
+ }
+ }
+ setState(303);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ }
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class StatementExpressionContext extends ParserRuleContext {
+ public AssignContext assign() {
+ return getRuleContext(AssignContext.class,0);
+ }
+ public NewDeclarationContext newDeclaration() {
+ return getRuleContext(NewDeclarationContext.class,0);
+ }
+ public MethodCallContext methodCall() {
+ return getRuleContext(MethodCallContext.class,0);
+ }
+ public CrementExpressionContext crementExpression() {
+ return getRuleContext(CrementExpressionContext.class,0);
+ }
+ public StatementExpressionContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_statementExpression; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterStatementExpression(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitStatementExpression(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitStatementExpression(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final StatementExpressionContext statementExpression() throws RecognitionException {
+ StatementExpressionContext _localctx = new StatementExpressionContext(_ctx, getState());
+ enterRule(_localctx, 46, RULE_statementExpression);
+ try {
+ setState(308);
+ _errHandler.sync(this);
+ switch ( getInterpreter().adaptivePredict(_input,27,_ctx) ) {
+ case 1:
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(304);
+ assign();
+ }
+ break;
+ case 2:
+ enterOuterAlt(_localctx, 2);
+ {
+ setState(305);
+ newDeclaration();
+ }
+ break;
+ case 3:
+ enterOuterAlt(_localctx, 3);
+ {
+ setState(306);
+ methodCall();
+ }
+ break;
+ case 4:
+ enterOuterAlt(_localctx, 4);
+ {
+ setState(307);
+ crementExpression();
+ }
+ break;
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class AssignContext extends ParserRuleContext {
+ public AssignableExpressionContext assignableExpression() {
+ return getRuleContext(AssignableExpressionContext.class,0);
+ }
+ public TerminalNode Assign() { return getToken(SimpleJavaParser.Assign, 0); }
+ public ExpressionContext expression() {
+ return getRuleContext(ExpressionContext.class,0);
+ }
+ public AssignContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_assign; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterAssign(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitAssign(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitAssign(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final AssignContext assign() throws RecognitionException {
+ AssignContext _localctx = new AssignContext(_ctx, getState());
+ enterRule(_localctx, 48, RULE_assign);
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(310);
+ assignableExpression();
+ setState(311);
+ match(Assign);
+ setState(312);
+ expression();
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class NewDeclarationContext extends ParserRuleContext {
+ public TerminalNode New() { return getToken(SimpleJavaParser.New, 0); }
+ public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
+ public TerminalNode OpenRoundBracket() { return getToken(SimpleJavaParser.OpenRoundBracket, 0); }
+ public ArgumentListContext argumentList() {
+ return getRuleContext(ArgumentListContext.class,0);
+ }
+ public TerminalNode ClosedRoundBracket() { return getToken(SimpleJavaParser.ClosedRoundBracket, 0); }
+ public NewDeclarationContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_newDeclaration; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterNewDeclaration(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitNewDeclaration(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitNewDeclaration(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final NewDeclarationContext newDeclaration() throws RecognitionException {
+ NewDeclarationContext _localctx = new NewDeclarationContext(_ctx, getState());
+ enterRule(_localctx, 50, RULE_newDeclaration);
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(314);
+ match(New);
+ setState(315);
+ match(Identifier);
+ setState(316);
+ match(OpenRoundBracket);
+ setState(317);
+ argumentList();
+ setState(318);
+ match(ClosedRoundBracket);
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class ExpressionContext extends ParserRuleContext {
+ public UnaryExpressionContext unaryExpression() {
+ return getRuleContext(UnaryExpressionContext.class,0);
+ }
+ public BinaryExpressionContext binaryExpression() {
+ return getRuleContext(BinaryExpressionContext.class,0);
+ }
+ public ExpressionContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_expression; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterExpression(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitExpression(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitExpression(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final ExpressionContext expression() throws RecognitionException {
+ ExpressionContext _localctx = new ExpressionContext(_ctx, getState());
+ enterRule(_localctx, 52, RULE_expression);
+ try {
+ setState(322);
+ _errHandler.sync(this);
+ switch ( getInterpreter().adaptivePredict(_input,28,_ctx) ) {
+ case 1:
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(320);
+ unaryExpression();
+ }
+ break;
+ case 2:
+ enterOuterAlt(_localctx, 2);
+ {
+ setState(321);
+ binaryExpression();
+ }
+ break;
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class UnaryExpressionContext extends ParserRuleContext {
+ public TerminalNode This() { return getToken(SimpleJavaParser.This, 0); }
+ public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
+ public MemberAccessContext memberAccess() {
+ return getRuleContext(MemberAccessContext.class,0);
+ }
+ public ValueContext value() {
+ return getRuleContext(ValueContext.class,0);
+ }
+ public NotExpressionContext notExpression() {
+ return getRuleContext(NotExpressionContext.class,0);
+ }
+ public StatementExpressionContext statementExpression() {
+ return getRuleContext(StatementExpressionContext.class,0);
+ }
+ public TerminalNode OpenRoundBracket() { return getToken(SimpleJavaParser.OpenRoundBracket, 0); }
+ public ExpressionContext expression() {
+ return getRuleContext(ExpressionContext.class,0);
+ }
+ public TerminalNode ClosedRoundBracket() { return getToken(SimpleJavaParser.ClosedRoundBracket, 0); }
+ public UnaryExpressionContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_unaryExpression; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterUnaryExpression(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitUnaryExpression(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitUnaryExpression(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final UnaryExpressionContext unaryExpression() throws RecognitionException {
+ UnaryExpressionContext _localctx = new UnaryExpressionContext(_ctx, getState());
+ enterRule(_localctx, 54, RULE_unaryExpression);
+ try {
+ setState(334);
+ _errHandler.sync(this);
+ switch ( getInterpreter().adaptivePredict(_input,29,_ctx) ) {
+ case 1:
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(324);
+ match(This);
+ }
+ break;
+ case 2:
+ enterOuterAlt(_localctx, 2);
+ {
+ setState(325);
+ match(Identifier);
+ }
+ break;
+ case 3:
+ enterOuterAlt(_localctx, 3);
+ {
+ setState(326);
+ memberAccess();
+ }
+ break;
+ case 4:
+ enterOuterAlt(_localctx, 4);
+ {
+ setState(327);
+ value();
+ }
+ break;
+ case 5:
+ enterOuterAlt(_localctx, 5);
+ {
+ setState(328);
+ notExpression();
+ }
+ break;
+ case 6:
+ enterOuterAlt(_localctx, 6);
+ {
+ setState(329);
+ statementExpression();
+ }
+ break;
+ case 7:
+ enterOuterAlt(_localctx, 7);
+ {
+ setState(330);
+ match(OpenRoundBracket);
+ setState(331);
+ expression();
+ setState(332);
+ match(ClosedRoundBracket);
+ }
+ break;
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class NotExpressionContext extends ParserRuleContext {
+ public TerminalNode Not() { return getToken(SimpleJavaParser.Not, 0); }
+ public ExpressionContext expression() {
+ return getRuleContext(ExpressionContext.class,0);
+ }
+ public NotExpressionContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_notExpression; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterNotExpression(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitNotExpression(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitNotExpression(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final NotExpressionContext notExpression() throws RecognitionException {
+ NotExpressionContext _localctx = new NotExpressionContext(_ctx, getState());
+ enterRule(_localctx, 56, RULE_notExpression);
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(336);
+ match(Not);
+ setState(337);
+ expression();
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class CrementExpressionContext extends ParserRuleContext {
+ public IncrementExpressionContext incrementExpression() {
+ return getRuleContext(IncrementExpressionContext.class,0);
+ }
+ public DecrementExpressionContext decrementExpression() {
+ return getRuleContext(DecrementExpressionContext.class,0);
+ }
+ public CrementExpressionContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_crementExpression; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterCrementExpression(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitCrementExpression(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitCrementExpression(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final CrementExpressionContext crementExpression() throws RecognitionException {
+ CrementExpressionContext _localctx = new CrementExpressionContext(_ctx, getState());
+ enterRule(_localctx, 58, RULE_crementExpression);
+ try {
+ setState(341);
+ _errHandler.sync(this);
+ switch ( getInterpreter().adaptivePredict(_input,30,_ctx) ) {
+ case 1:
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(339);
+ incrementExpression();
+ }
+ break;
+ case 2:
+ enterOuterAlt(_localctx, 2);
+ {
+ setState(340);
+ decrementExpression();
+ }
+ break;
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class IncrementExpressionContext extends ParserRuleContext {
+ public PrefixIncrementExpressionContext prefixIncrementExpression() {
+ return getRuleContext(PrefixIncrementExpressionContext.class,0);
+ }
+ public SuffixIncrementExpressionContext suffixIncrementExpression() {
+ return getRuleContext(SuffixIncrementExpressionContext.class,0);
+ }
+ public IncrementExpressionContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_incrementExpression; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterIncrementExpression(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitIncrementExpression(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitIncrementExpression(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final IncrementExpressionContext incrementExpression() throws RecognitionException {
+ IncrementExpressionContext _localctx = new IncrementExpressionContext(_ctx, getState());
+ enterRule(_localctx, 60, RULE_incrementExpression);
+ try {
+ setState(345);
+ _errHandler.sync(this);
+ switch (_input.LA(1)) {
+ case T__0:
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(343);
+ prefixIncrementExpression();
+ }
+ break;
+ case This:
+ case Identifier:
+ enterOuterAlt(_localctx, 2);
+ {
+ setState(344);
+ suffixIncrementExpression();
+ }
+ break;
+ default:
+ throw new NoViableAltException(this);
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class PrefixIncrementExpressionContext extends ParserRuleContext {
+ public AssignableExpressionContext assignableExpression() {
+ return getRuleContext(AssignableExpressionContext.class,0);
+ }
+ public PrefixIncrementExpressionContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_prefixIncrementExpression; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterPrefixIncrementExpression(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitPrefixIncrementExpression(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitPrefixIncrementExpression(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final PrefixIncrementExpressionContext prefixIncrementExpression() throws RecognitionException {
+ PrefixIncrementExpressionContext _localctx = new PrefixIncrementExpressionContext(_ctx, getState());
+ enterRule(_localctx, 62, RULE_prefixIncrementExpression);
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(347);
+ match(T__0);
+ setState(348);
+ assignableExpression();
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class SuffixIncrementExpressionContext extends ParserRuleContext {
+ public AssignableExpressionContext assignableExpression() {
+ return getRuleContext(AssignableExpressionContext.class,0);
+ }
+ public SuffixIncrementExpressionContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_suffixIncrementExpression; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterSuffixIncrementExpression(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitSuffixIncrementExpression(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitSuffixIncrementExpression(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final SuffixIncrementExpressionContext suffixIncrementExpression() throws RecognitionException {
+ SuffixIncrementExpressionContext _localctx = new SuffixIncrementExpressionContext(_ctx, getState());
+ enterRule(_localctx, 64, RULE_suffixIncrementExpression);
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(350);
+ assignableExpression();
+ setState(351);
+ match(T__0);
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class DecrementExpressionContext extends ParserRuleContext {
+ public PrefixDecrementExpressionContext prefixDecrementExpression() {
+ return getRuleContext(PrefixDecrementExpressionContext.class,0);
+ }
+ public SuffixDecrementExpressionContext suffixDecrementExpression() {
+ return getRuleContext(SuffixDecrementExpressionContext.class,0);
+ }
+ public DecrementExpressionContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_decrementExpression; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterDecrementExpression(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitDecrementExpression(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitDecrementExpression(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final DecrementExpressionContext decrementExpression() throws RecognitionException {
+ DecrementExpressionContext _localctx = new DecrementExpressionContext(_ctx, getState());
+ enterRule(_localctx, 66, RULE_decrementExpression);
+ try {
+ setState(355);
+ _errHandler.sync(this);
+ switch (_input.LA(1)) {
+ case T__1:
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(353);
+ prefixDecrementExpression();
+ }
+ break;
+ case This:
+ case Identifier:
+ enterOuterAlt(_localctx, 2);
+ {
+ setState(354);
+ suffixDecrementExpression();
+ }
+ break;
+ default:
+ throw new NoViableAltException(this);
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class PrefixDecrementExpressionContext extends ParserRuleContext {
+ public AssignableExpressionContext assignableExpression() {
+ return getRuleContext(AssignableExpressionContext.class,0);
+ }
+ public PrefixDecrementExpressionContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_prefixDecrementExpression; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterPrefixDecrementExpression(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitPrefixDecrementExpression(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitPrefixDecrementExpression(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final PrefixDecrementExpressionContext prefixDecrementExpression() throws RecognitionException {
+ PrefixDecrementExpressionContext _localctx = new PrefixDecrementExpressionContext(_ctx, getState());
+ enterRule(_localctx, 68, RULE_prefixDecrementExpression);
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(357);
+ match(T__1);
+ setState(358);
+ assignableExpression();
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class SuffixDecrementExpressionContext extends ParserRuleContext {
+ public AssignableExpressionContext assignableExpression() {
+ return getRuleContext(AssignableExpressionContext.class,0);
+ }
+ public SuffixDecrementExpressionContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_suffixDecrementExpression; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterSuffixDecrementExpression(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitSuffixDecrementExpression(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitSuffixDecrementExpression(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final SuffixDecrementExpressionContext suffixDecrementExpression() throws RecognitionException {
+ SuffixDecrementExpressionContext _localctx = new SuffixDecrementExpressionContext(_ctx, getState());
+ enterRule(_localctx, 70, RULE_suffixDecrementExpression);
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(360);
+ assignableExpression();
+ setState(361);
+ match(T__1);
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class AssignableExpressionContext extends ParserRuleContext {
+ public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
+ public MemberAccessContext memberAccess() {
+ return getRuleContext(MemberAccessContext.class,0);
+ }
+ public AssignableExpressionContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_assignableExpression; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterAssignableExpression(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitAssignableExpression(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitAssignableExpression(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final AssignableExpressionContext assignableExpression() throws RecognitionException {
+ AssignableExpressionContext _localctx = new AssignableExpressionContext(_ctx, getState());
+ enterRule(_localctx, 72, RULE_assignableExpression);
+ try {
+ setState(365);
+ _errHandler.sync(this);
+ switch ( getInterpreter().adaptivePredict(_input,33,_ctx) ) {
+ case 1:
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(363);
+ match(Identifier);
+ }
+ break;
+ case 2:
+ enterOuterAlt(_localctx, 2);
+ {
+ setState(364);
+ memberAccess();
+ }
+ break;
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class MemberAccessContext extends ParserRuleContext {
+ public TerminalNode This() { return getToken(SimpleJavaParser.This, 0); }
+ public List Dot() { return getTokens(SimpleJavaParser.Dot); }
+ public TerminalNode Dot(int i) {
+ return getToken(SimpleJavaParser.Dot, i);
+ }
+ public List Identifier() { return getTokens(SimpleJavaParser.Identifier); }
+ public TerminalNode Identifier(int i) {
+ return getToken(SimpleJavaParser.Identifier, i);
+ }
+ public MemberAccessContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_memberAccess; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterMemberAccess(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitMemberAccess(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitMemberAccess(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final MemberAccessContext memberAccess() throws RecognitionException {
+ MemberAccessContext _localctx = new MemberAccessContext(_ctx, getState());
+ enterRule(_localctx, 74, RULE_memberAccess);
+ int _la;
+ try {
+ int _alt;
+ setState(381);
+ _errHandler.sync(this);
+ switch ( getInterpreter().adaptivePredict(_input,36,_ctx) ) {
+ case 1:
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(367);
+ match(This);
+ setState(368);
+ match(Dot);
+ setState(369);
+ match(Identifier);
+ }
+ break;
+ case 2:
+ enterOuterAlt(_localctx, 2);
+ {
+ setState(372);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ if (_la==This) {
+ {
+ setState(370);
+ match(This);
+ setState(371);
+ match(Dot);
+ }
+ }
+
+ setState(376);
+ _errHandler.sync(this);
+ _alt = 1;
+ do {
+ switch (_alt) {
+ case 1:
+ {
+ {
+ setState(374);
+ match(Identifier);
+ setState(375);
+ match(Dot);
+ }
+ }
+ break;
+ default:
+ throw new NoViableAltException(this);
+ }
+ setState(378);
+ _errHandler.sync(this);
+ _alt = getInterpreter().adaptivePredict(_input,35,_ctx);
+ } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER );
+ setState(380);
+ match(Identifier);
+ }
+ break;
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class BinaryExpressionContext extends ParserRuleContext {
+ public CalculationExpressionContext calculationExpression() {
+ return getRuleContext(CalculationExpressionContext.class,0);
+ }
+ public NonCalculationExpressionContext nonCalculationExpression() {
+ return getRuleContext(NonCalculationExpressionContext.class,0);
+ }
+ public BinaryExpressionContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_binaryExpression; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterBinaryExpression(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitBinaryExpression(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitBinaryExpression(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final BinaryExpressionContext binaryExpression() throws RecognitionException {
+ BinaryExpressionContext _localctx = new BinaryExpressionContext(_ctx, getState());
+ enterRule(_localctx, 76, RULE_binaryExpression);
+ try {
+ setState(385);
+ _errHandler.sync(this);
+ switch ( getInterpreter().adaptivePredict(_input,37,_ctx) ) {
+ case 1:
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(383);
+ calculationExpression(0);
+ }
+ break;
+ case 2:
+ enterOuterAlt(_localctx, 2);
+ {
+ setState(384);
+ nonCalculationExpression();
+ }
+ break;
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class CalculationExpressionContext extends ParserRuleContext {
+ public DotExpressionContext dotExpression() {
+ return getRuleContext(DotExpressionContext.class,0);
+ }
+ public CalculationExpressionContext calculationExpression() {
+ return getRuleContext(CalculationExpressionContext.class,0);
+ }
+ public TerminalNode LineOperator() { return getToken(SimpleJavaParser.LineOperator, 0); }
+ public CalculationExpressionContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_calculationExpression; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterCalculationExpression(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitCalculationExpression(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitCalculationExpression(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final CalculationExpressionContext calculationExpression() throws RecognitionException {
+ return calculationExpression(0);
+ }
+
+ private CalculationExpressionContext calculationExpression(int _p) throws RecognitionException {
+ ParserRuleContext _parentctx = _ctx;
+ int _parentState = getState();
+ CalculationExpressionContext _localctx = new CalculationExpressionContext(_ctx, _parentState);
+ CalculationExpressionContext _prevctx = _localctx;
+ int _startState = 78;
+ enterRecursionRule(_localctx, 78, RULE_calculationExpression, _p);
+ try {
+ int _alt;
+ enterOuterAlt(_localctx, 1);
+ {
+ {
+ setState(388);
+ dotExpression(0);
+ }
+ _ctx.stop = _input.LT(-1);
+ setState(395);
+ _errHandler.sync(this);
+ _alt = getInterpreter().adaptivePredict(_input,38,_ctx);
+ while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
+ if ( _alt==1 ) {
+ if ( _parseListeners!=null ) triggerExitRuleEvent();
+ _prevctx = _localctx;
+ {
+ {
+ _localctx = new CalculationExpressionContext(_parentctx, _parentState);
+ pushNewRecursionContext(_localctx, _startState, RULE_calculationExpression);
+ setState(390);
+ if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)");
+ setState(391);
+ match(LineOperator);
+ setState(392);
+ dotExpression(0);
+ }
+ }
+ }
+ setState(397);
+ _errHandler.sync(this);
+ _alt = getInterpreter().adaptivePredict(_input,38,_ctx);
+ }
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ unrollRecursionContexts(_parentctx);
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class DotExpressionContext extends ParserRuleContext {
+ public DotSubtractionExpressionContext dotSubtractionExpression() {
+ return getRuleContext(DotSubtractionExpressionContext.class,0);
+ }
+ public DotExpressionContext dotExpression() {
+ return getRuleContext(DotExpressionContext.class,0);
+ }
+ public TerminalNode DotOperator() { return getToken(SimpleJavaParser.DotOperator, 0); }
+ public DotExpressionContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_dotExpression; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterDotExpression(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitDotExpression(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitDotExpression(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final DotExpressionContext dotExpression() throws RecognitionException {
+ return dotExpression(0);
+ }
+
+ private DotExpressionContext dotExpression(int _p) throws RecognitionException {
+ ParserRuleContext _parentctx = _ctx;
+ int _parentState = getState();
+ DotExpressionContext _localctx = new DotExpressionContext(_ctx, _parentState);
+ DotExpressionContext _prevctx = _localctx;
+ int _startState = 80;
+ enterRecursionRule(_localctx, 80, RULE_dotExpression, _p);
+ try {
+ int _alt;
+ enterOuterAlt(_localctx, 1);
+ {
+ {
+ setState(399);
+ dotSubtractionExpression();
+ }
+ _ctx.stop = _input.LT(-1);
+ setState(406);
+ _errHandler.sync(this);
+ _alt = getInterpreter().adaptivePredict(_input,39,_ctx);
+ while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
+ if ( _alt==1 ) {
+ if ( _parseListeners!=null ) triggerExitRuleEvent();
+ _prevctx = _localctx;
+ {
+ {
+ _localctx = new DotExpressionContext(_parentctx, _parentState);
+ pushNewRecursionContext(_localctx, _startState, RULE_dotExpression);
+ setState(401);
+ if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)");
+ setState(402);
+ match(DotOperator);
+ setState(403);
+ dotSubtractionExpression();
+ }
+ }
+ }
+ setState(408);
+ _errHandler.sync(this);
+ _alt = getInterpreter().adaptivePredict(_input,39,_ctx);
+ }
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ unrollRecursionContexts(_parentctx);
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class DotSubtractionExpressionContext extends ParserRuleContext {
+ public TerminalNode IntValue() { return getToken(SimpleJavaParser.IntValue, 0); }
+ public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
+ public MemberAccessContext memberAccess() {
+ return getRuleContext(MemberAccessContext.class,0);
+ }
+ public MethodCallContext methodCall() {
+ return getRuleContext(MethodCallContext.class,0);
+ }
+ public TerminalNode OpenRoundBracket() { return getToken(SimpleJavaParser.OpenRoundBracket, 0); }
+ public CalculationExpressionContext calculationExpression() {
+ return getRuleContext(CalculationExpressionContext.class,0);
+ }
+ public TerminalNode ClosedRoundBracket() { return getToken(SimpleJavaParser.ClosedRoundBracket, 0); }
+ public DotSubtractionExpressionContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_dotSubtractionExpression; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterDotSubtractionExpression(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitDotSubtractionExpression(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitDotSubtractionExpression(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final DotSubtractionExpressionContext dotSubtractionExpression() throws RecognitionException {
+ DotSubtractionExpressionContext _localctx = new DotSubtractionExpressionContext(_ctx, getState());
+ enterRule(_localctx, 82, RULE_dotSubtractionExpression);
+ try {
+ setState(417);
+ _errHandler.sync(this);
+ switch ( getInterpreter().adaptivePredict(_input,40,_ctx) ) {
+ case 1:
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(409);
+ match(IntValue);
+ }
+ break;
+ case 2:
+ enterOuterAlt(_localctx, 2);
+ {
+ setState(410);
+ match(Identifier);
+ }
+ break;
+ case 3:
+ enterOuterAlt(_localctx, 3);
+ {
+ setState(411);
+ memberAccess();
+ }
+ break;
+ case 4:
+ enterOuterAlt(_localctx, 4);
+ {
+ setState(412);
+ methodCall();
+ setState(413);
+ match(OpenRoundBracket);
+ setState(414);
+ calculationExpression(0);
+ setState(415);
+ match(ClosedRoundBracket);
+ }
+ break;
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class NonCalculationExpressionContext extends ParserRuleContext {
+ public UnaryExpressionContext unaryExpression() {
+ return getRuleContext(UnaryExpressionContext.class,0);
+ }
+ public NonCalculationOperatorContext nonCalculationOperator() {
+ return getRuleContext(NonCalculationOperatorContext.class,0);
+ }
+ public ExpressionContext expression() {
+ return getRuleContext(ExpressionContext.class,0);
+ }
+ public NonCalculationExpressionContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_nonCalculationExpression; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterNonCalculationExpression(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitNonCalculationExpression(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitNonCalculationExpression(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final NonCalculationExpressionContext nonCalculationExpression() throws RecognitionException {
+ NonCalculationExpressionContext _localctx = new NonCalculationExpressionContext(_ctx, getState());
+ enterRule(_localctx, 84, RULE_nonCalculationExpression);
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(419);
+ unaryExpression();
+ setState(420);
+ nonCalculationOperator();
+ setState(421);
+ expression();
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class MethodCallContext extends ParserRuleContext {
+ public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
+ public TerminalNode OpenRoundBracket() { return getToken(SimpleJavaParser.OpenRoundBracket, 0); }
+ public ArgumentListContext argumentList() {
+ return getRuleContext(ArgumentListContext.class,0);
+ }
+ public TerminalNode ClosedRoundBracket() { return getToken(SimpleJavaParser.ClosedRoundBracket, 0); }
+ public TargetContext target() {
+ return getRuleContext(TargetContext.class,0);
+ }
+ public List chainedMethod() {
+ return getRuleContexts(ChainedMethodContext.class);
+ }
+ public ChainedMethodContext chainedMethod(int i) {
+ return getRuleContext(ChainedMethodContext.class,i);
+ }
+ public MethodCallContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_methodCall; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterMethodCall(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitMethodCall(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitMethodCall(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final MethodCallContext methodCall() throws RecognitionException {
+ MethodCallContext _localctx = new MethodCallContext(_ctx, getState());
+ enterRule(_localctx, 86, RULE_methodCall);
+ try {
+ int _alt;
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(424);
+ _errHandler.sync(this);
+ switch ( getInterpreter().adaptivePredict(_input,41,_ctx) ) {
+ case 1:
+ {
+ setState(423);
+ target();
+ }
+ break;
+ }
+ setState(429);
+ _errHandler.sync(this);
+ _alt = getInterpreter().adaptivePredict(_input,42,_ctx);
+ while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
+ if ( _alt==1 ) {
+ {
+ {
+ setState(426);
+ chainedMethod();
+ }
+ }
+ }
+ setState(431);
+ _errHandler.sync(this);
+ _alt = getInterpreter().adaptivePredict(_input,42,_ctx);
+ }
+ setState(432);
+ match(Identifier);
+ setState(433);
+ match(OpenRoundBracket);
+ setState(434);
+ argumentList();
+ setState(435);
+ match(ClosedRoundBracket);
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class TargetContext extends ParserRuleContext {
+ public TerminalNode Dot() { return getToken(SimpleJavaParser.Dot, 0); }
+ public TerminalNode This() { return getToken(SimpleJavaParser.This, 0); }
+ public MemberAccessContext memberAccess() {
+ return getRuleContext(MemberAccessContext.class,0);
+ }
+ public NewDeclarationContext newDeclaration() {
+ return getRuleContext(NewDeclarationContext.class,0);
+ }
+ public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
+ public TargetContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_target; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterTarget(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitTarget(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitTarget(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final TargetContext target() throws RecognitionException {
+ TargetContext _localctx = new TargetContext(_ctx, getState());
+ enterRule(_localctx, 88, RULE_target);
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(441);
+ _errHandler.sync(this);
+ switch ( getInterpreter().adaptivePredict(_input,43,_ctx) ) {
+ case 1:
+ {
+ setState(437);
+ match(This);
+ }
+ break;
+ case 2:
+ {
+ setState(438);
+ memberAccess();
+ }
+ break;
+ case 3:
+ {
+ setState(439);
+ newDeclaration();
+ }
+ break;
+ case 4:
+ {
+ setState(440);
+ match(Identifier);
+ }
+ break;
+ }
+ setState(443);
+ match(Dot);
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class ChainedMethodContext extends ParserRuleContext {
+ public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
+ public TerminalNode OpenRoundBracket() { return getToken(SimpleJavaParser.OpenRoundBracket, 0); }
+ public ArgumentListContext argumentList() {
+ return getRuleContext(ArgumentListContext.class,0);
+ }
+ public TerminalNode ClosedRoundBracket() { return getToken(SimpleJavaParser.ClosedRoundBracket, 0); }
+ public TerminalNode Dot() { return getToken(SimpleJavaParser.Dot, 0); }
+ public ChainedMethodContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_chainedMethod; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterChainedMethod(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitChainedMethod(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitChainedMethod(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final ChainedMethodContext chainedMethod() throws RecognitionException {
+ ChainedMethodContext _localctx = new ChainedMethodContext(_ctx, getState());
+ enterRule(_localctx, 90, RULE_chainedMethod);
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(445);
+ match(Identifier);
+ setState(446);
+ match(OpenRoundBracket);
+ setState(447);
+ argumentList();
+ setState(448);
+ match(ClosedRoundBracket);
+ setState(449);
+ match(Dot);
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class TypeContext extends ParserRuleContext {
+ public TerminalNode Int() { return getToken(SimpleJavaParser.Int, 0); }
+ public TerminalNode Boolean() { return getToken(SimpleJavaParser.Boolean, 0); }
+ public TerminalNode Char() { return getToken(SimpleJavaParser.Char, 0); }
+ public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
+ public TypeContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_type; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterType(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitType(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitType(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final TypeContext type() throws RecognitionException {
+ TypeContext _localctx = new TypeContext(_ctx, getState());
+ enterRule(_localctx, 92, RULE_type);
+ int _la;
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(451);
+ _la = _input.LA(1);
+ if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 4503599627370608L) != 0)) ) {
+ _errHandler.recoverInline(this);
+ }
+ else {
+ if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
+ _errHandler.reportMatch(this);
+ consume();
+ }
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class ValueContext extends ParserRuleContext {
+ public TerminalNode IntValue() { return getToken(SimpleJavaParser.IntValue, 0); }
+ public TerminalNode BooleanValue() { return getToken(SimpleJavaParser.BooleanValue, 0); }
+ public TerminalNode CharValue() { return getToken(SimpleJavaParser.CharValue, 0); }
+ public TerminalNode NullValue() { return getToken(SimpleJavaParser.NullValue, 0); }
+ public ValueContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_value; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterValue(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitValue(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitValue(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final ValueContext value() throws RecognitionException {
+ ValueContext _localctx = new ValueContext(_ctx, getState());
+ enterRule(_localctx, 94, RULE_value);
+ int _la;
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(453);
+ _la = _input.LA(1);
+ if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 4222124650659840L) != 0)) ) {
+ _errHandler.recoverInline(this);
+ }
+ else {
+ if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
+ _errHandler.reportMatch(this);
+ consume();
+ }
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class NonCalculationOperatorContext extends ParserRuleContext {
+ public TerminalNode LogicalOperator() { return getToken(SimpleJavaParser.LogicalOperator, 0); }
+ public TerminalNode ComparisonOperator() { return getToken(SimpleJavaParser.ComparisonOperator, 0); }
+ public NonCalculationOperatorContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_nonCalculationOperator; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterNonCalculationOperator(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitNonCalculationOperator(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitNonCalculationOperator(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final NonCalculationOperatorContext nonCalculationOperator() throws RecognitionException {
+ NonCalculationOperatorContext _localctx = new NonCalculationOperatorContext(_ctx, getState());
+ enterRule(_localctx, 96, RULE_nonCalculationOperator);
+ int _la;
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(455);
+ _la = _input.LA(1);
+ if ( !(_la==ComparisonOperator || _la==LogicalOperator) ) {
+ _errHandler.recoverInline(this);
+ }
+ else {
+ if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
+ _errHandler.reportMatch(this);
+ consume();
+ }
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) {
+ switch (ruleIndex) {
+ case 39:
+ return calculationExpression_sempred((CalculationExpressionContext)_localctx, predIndex);
+ case 40:
+ return dotExpression_sempred((DotExpressionContext)_localctx, predIndex);
+ }
+ return true;
+ }
+ private boolean calculationExpression_sempred(CalculationExpressionContext _localctx, int predIndex) {
+ switch (predIndex) {
+ case 0:
+ return precpred(_ctx, 2);
+ }
+ return true;
+ }
+ private boolean dotExpression_sempred(DotExpressionContext _localctx, int predIndex) {
+ switch (predIndex) {
+ case 1:
+ return precpred(_ctx, 2);
+ }
+ return true;
+ }
+
+ public static final String _serializedATN =
+ "\u0004\u00017\u01ca\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"+
+ "\f\u0007\f\u0002\r\u0007\r\u0002\u000e\u0007\u000e\u0002\u000f\u0007\u000f"+
+ "\u0002\u0010\u0007\u0010\u0002\u0011\u0007\u0011\u0002\u0012\u0007\u0012"+
+ "\u0002\u0013\u0007\u0013\u0002\u0014\u0007\u0014\u0002\u0015\u0007\u0015"+
+ "\u0002\u0016\u0007\u0016\u0002\u0017\u0007\u0017\u0002\u0018\u0007\u0018"+
+ "\u0002\u0019\u0007\u0019\u0002\u001a\u0007\u001a\u0002\u001b\u0007\u001b"+
+ "\u0002\u001c\u0007\u001c\u0002\u001d\u0007\u001d\u0002\u001e\u0007\u001e"+
+ "\u0002\u001f\u0007\u001f\u0002 \u0007 \u0002!\u0007!\u0002\"\u0007\"\u0002"+
+ "#\u0007#\u0002$\u0007$\u0002%\u0007%\u0002&\u0007&\u0002\'\u0007\'\u0002"+
+ "(\u0007(\u0002)\u0007)\u0002*\u0007*\u0002+\u0007+\u0002,\u0007,\u0002"+
+ "-\u0007-\u0002.\u0007.\u0002/\u0007/\u00020\u00070\u0001\u0000\u0004\u0000"+
+ "d\b\u0000\u000b\u0000\f\u0000e\u0001\u0001\u0003\u0001i\b\u0001\u0001"+
+ "\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0005\u0001o\b\u0001\n\u0001"+
+ "\f\u0001r\t\u0001\u0001\u0001\u0001\u0001\u0001\u0002\u0001\u0002\u0001"+
+ "\u0002\u0003\u0002y\b\u0002\u0001\u0003\u0003\u0003|\b\u0003\u0001\u0003"+
+ "\u0001\u0003\u0001\u0003\u0003\u0003\u0081\b\u0003\u0001\u0003\u0001\u0003"+
+ "\u0001\u0003\u0001\u0004\u0003\u0004\u0087\b\u0004\u0001\u0004\u0001\u0004"+
+ "\u0001\u0004\u0001\u0004\u0001\u0005\u0001\u0005\u0001\u0005\u0003\u0005"+
+ "\u0090\b\u0005\u0001\u0005\u0001\u0005\u0003\u0005\u0094\b\u0005\u0001"+
+ "\u0005\u0001\u0005\u0001\u0005\u0003\u0005\u0099\b\u0005\u0001\u0005\u0001"+
+ "\u0005\u0003\u0005\u009d\b\u0005\u0001\u0006\u0001\u0006\u0001\u0006\u0005"+
+ "\u0006\u00a2\b\u0006\n\u0006\f\u0006\u00a5\t\u0006\u0001\u0007\u0001\u0007"+
+ "\u0001\u0007\u0001\b\u0001\b\u0001\b\u0005\b\u00ad\b\b\n\b\f\b\u00b0\t"+
+ "\b\u0003\b\u00b2\b\b\u0001\t\u0001\t\u0001\t\u0001\t\u0001\t\u0001\t\u0001"+
+ "\t\u0001\t\u0001\t\u0001\t\u0001\t\u0001\t\u0001\t\u0001\t\u0001\t\u0003"+
+ "\t\u00c3\b\t\u0001\n\u0001\n\u0005\n\u00c7\b\n\n\n\f\n\u00ca\t\n\u0001"+
+ "\n\u0001\n\u0001\u000b\u0001\u000b\u0003\u000b\u00d0\b\u000b\u0001\f\u0001"+
+ "\f\u0001\f\u0001\f\u0003\f\u00d6\b\f\u0001\r\u0001\r\u0001\r\u0001\r\u0001"+
+ "\r\u0001\r\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e"+
+ "\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000f\u0001\u000f\u0001\u000f"+
+ "\u0001\u000f\u0003\u000f\u00ea\b\u000f\u0001\u000f\u0001\u000f\u0003\u000f"+
+ "\u00ee\b\u000f\u0001\u000f\u0001\u000f\u0003\u000f\u00f2\b\u000f\u0001"+
+ "\u000f\u0001\u000f\u0001\u000f\u0001\u0010\u0001\u0010\u0005\u0010\u00f9"+
+ "\b\u0010\n\u0010\f\u0010\u00fc\t\u0010\u0001\u0010\u0003\u0010\u00ff\b"+
+ "\u0010\u0001\u0011\u0001\u0011\u0001\u0011\u0001\u0011\u0001\u0011\u0001"+
+ "\u0011\u0001\u0012\u0001\u0012\u0001\u0012\u0001\u0012\u0001\u0012\u0001"+
+ "\u0012\u0001\u0012\u0001\u0013\u0001\u0013\u0001\u0013\u0001\u0014\u0001"+
+ "\u0014\u0001\u0014\u0001\u0014\u0001\u0014\u0001\u0014\u0004\u0014\u0117"+
+ "\b\u0014\u000b\u0014\f\u0014\u0118\u0001\u0014\u0003\u0014\u011c\b\u0014"+
+ "\u0001\u0014\u0001\u0014\u0001\u0015\u0001\u0015\u0001\u0015\u0001\u0015"+
+ "\u0005\u0015\u0124\b\u0015\n\u0015\f\u0015\u0127\t\u0015\u0001\u0016\u0001"+
+ "\u0016\u0001\u0016\u0005\u0016\u012c\b\u0016\n\u0016\f\u0016\u012f\t\u0016"+
+ "\u0001\u0017\u0001\u0017\u0001\u0017\u0001\u0017\u0003\u0017\u0135\b\u0017"+
+ "\u0001\u0018\u0001\u0018\u0001\u0018\u0001\u0018\u0001\u0019\u0001\u0019"+
+ "\u0001\u0019\u0001\u0019\u0001\u0019\u0001\u0019\u0001\u001a\u0001\u001a"+
+ "\u0003\u001a\u0143\b\u001a\u0001\u001b\u0001\u001b\u0001\u001b\u0001\u001b"+
+ "\u0001\u001b\u0001\u001b\u0001\u001b\u0001\u001b\u0001\u001b\u0001\u001b"+
+ "\u0003\u001b\u014f\b\u001b\u0001\u001c\u0001\u001c\u0001\u001c\u0001\u001d"+
+ "\u0001\u001d\u0003\u001d\u0156\b\u001d\u0001\u001e\u0001\u001e\u0003\u001e"+
+ "\u015a\b\u001e\u0001\u001f\u0001\u001f\u0001\u001f\u0001 \u0001 \u0001"+
+ " \u0001!\u0001!\u0003!\u0164\b!\u0001\"\u0001\"\u0001\"\u0001#\u0001#"+
+ "\u0001#\u0001$\u0001$\u0003$\u016e\b$\u0001%\u0001%\u0001%\u0001%\u0001"+
+ "%\u0003%\u0175\b%\u0001%\u0001%\u0004%\u0179\b%\u000b%\f%\u017a\u0001"+
+ "%\u0003%\u017e\b%\u0001&\u0001&\u0003&\u0182\b&\u0001\'\u0001\'\u0001"+
+ "\'\u0001\'\u0001\'\u0001\'\u0005\'\u018a\b\'\n\'\f\'\u018d\t\'\u0001("+
+ "\u0001(\u0001(\u0001(\u0001(\u0001(\u0005(\u0195\b(\n(\f(\u0198\t(\u0001"+
+ ")\u0001)\u0001)\u0001)\u0001)\u0001)\u0001)\u0001)\u0003)\u01a2\b)\u0001"+
+ "*\u0001*\u0001*\u0001*\u0001+\u0003+\u01a9\b+\u0001+\u0005+\u01ac\b+\n"+
+ "+\f+\u01af\t+\u0001+\u0001+\u0001+\u0001+\u0001+\u0001,\u0001,\u0001,"+
+ "\u0001,\u0003,\u01ba\b,\u0001,\u0001,\u0001-\u0001-\u0001-\u0001-\u0001"+
+ "-\u0001-\u0001.\u0001.\u0001/\u0001/\u00010\u00010\u00010\u0000\u0002"+
+ "NP1\u0000\u0002\u0004\u0006\b\n\f\u000e\u0010\u0012\u0014\u0016\u0018"+
+ "\u001a\u001c\u001e \"$&(*,.02468:<>@BDFHJLNPRTVXZ\\^`\u0000\u0003\u0002"+
+ "\u0000\u0004\u000644\u0001\u000003\u0001\u0000\u000b\f\u01d7\u0000c\u0001"+
+ "\u0000\u0000\u0000\u0002h\u0001\u0000\u0000\u0000\u0004x\u0001\u0000\u0000"+
+ "\u0000\u0006{\u0001\u0000\u0000\u0000\b\u0086\u0001\u0000\u0000\u0000"+
+ "\n\u009c\u0001\u0000\u0000\u0000\f\u009e\u0001\u0000\u0000\u0000\u000e"+
+ "\u00a6\u0001\u0000\u0000\u0000\u0010\u00b1\u0001\u0000\u0000\u0000\u0012"+
+ "\u00c2\u0001\u0000\u0000\u0000\u0014\u00c4\u0001\u0000\u0000\u0000\u0016"+
+ "\u00cd\u0001\u0000\u0000\u0000\u0018\u00d1\u0001\u0000\u0000\u0000\u001a"+
+ "\u00d7\u0001\u0000\u0000\u0000\u001c\u00dd\u0001\u0000\u0000\u0000\u001e"+
+ "\u00e5\u0001\u0000\u0000\u0000 \u00f6\u0001\u0000\u0000\u0000\"\u0100"+
+ "\u0001\u0000\u0000\u0000$\u0106\u0001\u0000\u0000\u0000&\u010d\u0001\u0000"+
+ "\u0000\u0000(\u0110\u0001\u0000\u0000\u0000*\u011f\u0001\u0000\u0000\u0000"+
+ ",\u0128\u0001\u0000\u0000\u0000.\u0134\u0001\u0000\u0000\u00000\u0136"+
+ "\u0001\u0000\u0000\u00002\u013a\u0001\u0000\u0000\u00004\u0142\u0001\u0000"+
+ "\u0000\u00006\u014e\u0001\u0000\u0000\u00008\u0150\u0001\u0000\u0000\u0000"+
+ ":\u0155\u0001\u0000\u0000\u0000<\u0159\u0001\u0000\u0000\u0000>\u015b"+
+ "\u0001\u0000\u0000\u0000@\u015e\u0001\u0000\u0000\u0000B\u0163\u0001\u0000"+
+ "\u0000\u0000D\u0165\u0001\u0000\u0000\u0000F\u0168\u0001\u0000\u0000\u0000"+
+ "H\u016d\u0001\u0000\u0000\u0000J\u017d\u0001\u0000\u0000\u0000L\u0181"+
+ "\u0001\u0000\u0000\u0000N\u0183\u0001\u0000\u0000\u0000P\u018e\u0001\u0000"+
+ "\u0000\u0000R\u01a1\u0001\u0000\u0000\u0000T\u01a3\u0001\u0000\u0000\u0000"+
+ "V\u01a8\u0001\u0000\u0000\u0000X\u01b9\u0001\u0000\u0000\u0000Z\u01bd"+
+ "\u0001\u0000\u0000\u0000\\\u01c3\u0001\u0000\u0000\u0000^\u01c5\u0001"+
+ "\u0000\u0000\u0000`\u01c7\u0001\u0000\u0000\u0000bd\u0003\u0002\u0001"+
+ "\u0000cb\u0001\u0000\u0000\u0000de\u0001\u0000\u0000\u0000ec\u0001\u0000"+
+ "\u0000\u0000ef\u0001\u0000\u0000\u0000f\u0001\u0001\u0000\u0000\u0000"+
+ "gi\u0005\u0007\u0000\u0000hg\u0001\u0000\u0000\u0000hi\u0001\u0000\u0000"+
+ "\u0000ij\u0001\u0000\u0000\u0000jk\u0005#\u0000\u0000kl\u00054\u0000\u0000"+
+ "lp\u0005\u001f\u0000\u0000mo\u0003\u0004\u0002\u0000nm\u0001\u0000\u0000"+
+ "\u0000or\u0001\u0000\u0000\u0000pn\u0001\u0000\u0000\u0000pq\u0001\u0000"+
+ "\u0000\u0000qs\u0001\u0000\u0000\u0000rp\u0001\u0000\u0000\u0000st\u0005"+
+ " \u0000\u0000t\u0003\u0001\u0000\u0000\u0000uy\u0003\u0006\u0003\u0000"+
+ "vy\u0003\b\u0004\u0000wy\u0003\n\u0005\u0000xu\u0001\u0000\u0000\u0000"+
+ "xv\u0001\u0000\u0000\u0000xw\u0001\u0000\u0000\u0000y\u0005\u0001\u0000"+
+ "\u0000\u0000z|\u0005\u0007\u0000\u0000{z\u0001\u0000\u0000\u0000{|\u0001"+
+ "\u0000\u0000\u0000|}\u0001\u0000\u0000\u0000}~\u00054\u0000\u0000~\u0080"+
+ "\u0005\u001d\u0000\u0000\u007f\u0081\u0003\f\u0006\u0000\u0080\u007f\u0001"+
+ "\u0000\u0000\u0000\u0080\u0081\u0001\u0000\u0000\u0000\u0081\u0082\u0001"+
+ "\u0000\u0000\u0000\u0082\u0083\u0005\u001e\u0000\u0000\u0083\u0084\u0003"+
+ "\u0014\n\u0000\u0084\u0007\u0001\u0000\u0000\u0000\u0085\u0087\u0005\u0007"+
+ "\u0000\u0000\u0086\u0085\u0001\u0000\u0000\u0000\u0086\u0087\u0001\u0000"+
+ "\u0000\u0000\u0087\u0088\u0001\u0000\u0000\u0000\u0088\u0089\u0003\\."+
+ "\u0000\u0089\u008a\u00054\u0000\u0000\u008a\u008b\u0005!\u0000\u0000\u008b"+
+ "\t\u0001\u0000\u0000\u0000\u008c\u008d\u0005\b\u0000\u0000\u008d\u009d"+
+ "\u0003\u0014\n\u0000\u008e\u0090\u0005\u0007\u0000\u0000\u008f\u008e\u0001"+
+ "\u0000\u0000\u0000\u008f\u0090\u0001\u0000\u0000\u0000\u0090\u0093\u0001"+
+ "\u0000\u0000\u0000\u0091\u0094\u0003\\.\u0000\u0092\u0094\u0005\u0003"+
+ "\u0000\u0000\u0093\u0091\u0001\u0000\u0000\u0000\u0093\u0092\u0001\u0000"+
+ "\u0000\u0000\u0094\u0095\u0001\u0000\u0000\u0000\u0095\u0096\u00054\u0000"+
+ "\u0000\u0096\u0098\u0005\u001d\u0000\u0000\u0097\u0099\u0003\f\u0006\u0000"+
+ "\u0098\u0097\u0001\u0000\u0000\u0000\u0098\u0099\u0001\u0000\u0000\u0000"+
+ "\u0099\u009a\u0001\u0000\u0000\u0000\u009a\u009b\u0005\u001e\u0000\u0000"+
+ "\u009b\u009d\u0003\u0014\n\u0000\u009c\u008c\u0001\u0000\u0000\u0000\u009c"+
+ "\u008f\u0001\u0000\u0000\u0000\u009d\u000b\u0001\u0000\u0000\u0000\u009e"+
+ "\u00a3\u0003\u000e\u0007\u0000\u009f\u00a0\u0005\"\u0000\u0000\u00a0\u00a2"+
+ "\u0003\u000e\u0007\u0000\u00a1\u009f\u0001\u0000\u0000\u0000\u00a2\u00a5"+
+ "\u0001\u0000\u0000\u0000\u00a3\u00a1\u0001\u0000\u0000\u0000\u00a3\u00a4"+
+ "\u0001\u0000\u0000\u0000\u00a4\r\u0001\u0000\u0000\u0000\u00a5\u00a3\u0001"+
+ "\u0000\u0000\u0000\u00a6\u00a7\u0003\\.\u0000\u00a7\u00a8\u00054\u0000"+
+ "\u0000\u00a8\u000f\u0001\u0000\u0000\u0000\u00a9\u00ae\u00034\u001a\u0000"+
+ "\u00aa\u00ab\u0005\"\u0000\u0000\u00ab\u00ad\u00034\u001a\u0000\u00ac"+
+ "\u00aa\u0001\u0000\u0000\u0000\u00ad\u00b0\u0001\u0000\u0000\u0000\u00ae"+
+ "\u00ac\u0001\u0000\u0000\u0000\u00ae\u00af\u0001\u0000\u0000\u0000\u00af"+
+ "\u00b2\u0001\u0000\u0000\u0000\u00b0\u00ae\u0001\u0000\u0000\u0000\u00b1"+
+ "\u00a9\u0001\u0000\u0000\u0000\u00b1\u00b2\u0001\u0000\u0000\u0000\u00b2"+
+ "\u0011\u0001\u0000\u0000\u0000\u00b3\u00b4\u0003\u0016\u000b\u0000\u00b4"+
+ "\u00b5\u0005!\u0000\u0000\u00b5\u00c3\u0001\u0000\u0000\u0000\u00b6\u00b7"+
+ "\u0003\u0018\f\u0000\u00b7\u00b8\u0005!\u0000\u0000\u00b8\u00c3\u0001"+
+ "\u0000\u0000\u0000\u00b9\u00c3\u0003\u0014\n\u0000\u00ba\u00c3\u0003\u001a"+
+ "\r\u0000\u00bb\u00c3\u0003\u001c\u000e\u0000\u00bc\u00c3\u0003\u001e\u000f"+
+ "\u0000\u00bd\u00c3\u0003 \u0010\u0000\u00be\u00c3\u0003(\u0014\u0000\u00bf"+
+ "\u00c0\u0003.\u0017\u0000\u00c0\u00c1\u0005!\u0000\u0000\u00c1\u00c3\u0001"+
+ "\u0000\u0000\u0000\u00c2\u00b3\u0001\u0000\u0000\u0000\u00c2\u00b6\u0001"+
+ "\u0000\u0000\u0000\u00c2\u00b9\u0001\u0000\u0000\u0000\u00c2\u00ba\u0001"+
+ "\u0000\u0000\u0000\u00c2\u00bb\u0001\u0000\u0000\u0000\u00c2\u00bc\u0001"+
+ "\u0000\u0000\u0000\u00c2\u00bd\u0001\u0000\u0000\u0000\u00c2\u00be\u0001"+
+ "\u0000\u0000\u0000\u00c2\u00bf\u0001\u0000\u0000\u0000\u00c3\u0013\u0001"+
+ "\u0000\u0000\u0000\u00c4\u00c8\u0005\u001f\u0000\u0000\u00c5\u00c7\u0003"+
+ "\u0012\t\u0000\u00c6\u00c5\u0001\u0000\u0000\u0000\u00c7\u00ca\u0001\u0000"+
+ "\u0000\u0000\u00c8\u00c6\u0001\u0000\u0000\u0000\u00c8\u00c9\u0001\u0000"+
+ "\u0000\u0000\u00c9\u00cb\u0001\u0000\u0000\u0000\u00ca\u00c8\u0001\u0000"+
+ "\u0000\u0000\u00cb\u00cc\u0005 \u0000\u0000\u00cc\u0015\u0001\u0000\u0000"+
+ "\u0000\u00cd\u00cf\u0005*\u0000\u0000\u00ce\u00d0\u00034\u001a\u0000\u00cf"+
+ "\u00ce\u0001\u0000\u0000\u0000\u00cf\u00d0\u0001\u0000\u0000\u0000\u00d0"+
+ "\u0017\u0001\u0000\u0000\u0000\u00d1\u00d2\u0003\\.\u0000\u00d2\u00d5"+
+ "\u00054\u0000\u0000\u00d3\u00d4\u0005\r\u0000\u0000\u00d4\u00d6\u0003"+
+ "4\u001a\u0000\u00d5\u00d3\u0001\u0000\u0000\u0000\u00d5\u00d6\u0001\u0000"+
+ "\u0000\u0000\u00d6\u0019\u0001\u0000\u0000\u0000\u00d7\u00d8\u0005%\u0000"+
+ "\u0000\u00d8\u00d9\u0005\u001d\u0000\u0000\u00d9\u00da\u00034\u001a\u0000"+
+ "\u00da\u00db\u0005\u001e\u0000\u0000\u00db\u00dc\u0003\u0014\n\u0000\u00dc"+
+ "\u001b\u0001\u0000\u0000\u0000\u00dd\u00de\u0005&\u0000\u0000\u00de\u00df"+
+ "\u0003\u0014\n\u0000\u00df\u00e0\u0005%\u0000\u0000\u00e0\u00e1\u0005"+
+ "\u001d\u0000\u0000\u00e1\u00e2\u00034\u001a\u0000\u00e2\u00e3\u0005\u001e"+
+ "\u0000\u0000\u00e3\u00e4\u0005!\u0000\u0000\u00e4\u001d\u0001\u0000\u0000"+
+ "\u0000\u00e5\u00e6\u0005)\u0000\u0000\u00e6\u00e9\u0005\u001d\u0000\u0000"+
+ "\u00e7\u00ea\u0003.\u0017\u0000\u00e8\u00ea\u0003\u0018\f\u0000\u00e9"+
+ "\u00e7\u0001\u0000\u0000\u0000\u00e9\u00e8\u0001\u0000\u0000\u0000\u00ea"+
+ "\u00eb\u0001\u0000\u0000\u0000\u00eb\u00ed\u0005!\u0000\u0000\u00ec\u00ee"+
+ "\u00034\u001a\u0000\u00ed\u00ec\u0001\u0000\u0000\u0000\u00ed\u00ee\u0001"+
+ "\u0000\u0000\u0000\u00ee\u00ef\u0001\u0000\u0000\u0000\u00ef\u00f1\u0005"+
+ "!\u0000\u0000\u00f0\u00f2\u0003.\u0017\u0000\u00f1\u00f0\u0001\u0000\u0000"+
+ "\u0000\u00f1\u00f2\u0001\u0000\u0000\u0000\u00f2\u00f3\u0001\u0000\u0000"+
+ "\u0000\u00f3\u00f4\u0005\u001e\u0000\u0000\u00f4\u00f5\u0003\u0014\n\u0000"+
+ "\u00f5\u001f\u0001\u0000\u0000\u0000\u00f6\u00fa\u0003\"\u0011\u0000\u00f7"+
+ "\u00f9\u0003$\u0012\u0000\u00f8\u00f7\u0001\u0000\u0000\u0000\u00f9\u00fc"+
+ "\u0001\u0000\u0000\u0000\u00fa\u00f8\u0001\u0000\u0000\u0000\u00fa\u00fb"+
+ "\u0001\u0000\u0000\u0000\u00fb\u00fe\u0001\u0000\u0000\u0000\u00fc\u00fa"+
+ "\u0001\u0000\u0000\u0000\u00fd\u00ff\u0003&\u0013\u0000\u00fe\u00fd\u0001"+
+ "\u0000\u0000\u0000\u00fe\u00ff\u0001\u0000\u0000\u0000\u00ff!\u0001\u0000"+
+ "\u0000\u0000\u0100\u0101\u0005\'\u0000\u0000\u0101\u0102\u0005\u001d\u0000"+
+ "\u0000\u0102\u0103\u00034\u001a\u0000\u0103\u0104\u0005\u001e\u0000\u0000"+
+ "\u0104\u0105\u0003\u0014\n\u0000\u0105#\u0001\u0000\u0000\u0000\u0106"+
+ "\u0107\u0005(\u0000\u0000\u0107\u0108\u0005\'\u0000\u0000\u0108\u0109"+
+ "\u0005\u001d\u0000\u0000\u0109\u010a\u00034\u001a\u0000\u010a\u010b\u0005"+
+ "\u001e\u0000\u0000\u010b\u010c\u0003\u0014\n\u0000\u010c%\u0001\u0000"+
+ "\u0000\u0000\u010d\u010e\u0005(\u0000\u0000\u010e\u010f\u0003\u0014\n"+
+ "\u0000\u010f\'\u0001\u0000\u0000\u0000\u0110\u0111\u0005,\u0000\u0000"+
+ "\u0111\u0112\u0005\u001d\u0000\u0000\u0112\u0113\u00034\u001a\u0000\u0113"+
+ "\u0114\u0005\u001e\u0000\u0000\u0114\u0116\u0005\u001f\u0000\u0000\u0115"+
+ "\u0117\u0003*\u0015\u0000\u0116\u0115\u0001\u0000\u0000\u0000\u0117\u0118"+
+ "\u0001\u0000\u0000\u0000\u0118\u0116\u0001\u0000\u0000\u0000\u0118\u0119"+
+ "\u0001\u0000\u0000\u0000\u0119\u011b\u0001\u0000\u0000\u0000\u011a\u011c"+
+ "\u0003,\u0016\u0000\u011b\u011a\u0001\u0000\u0000\u0000\u011b\u011c\u0001"+
+ "\u0000\u0000\u0000\u011c\u011d\u0001\u0000\u0000\u0000\u011d\u011e\u0005"+
+ " \u0000\u0000\u011e)\u0001\u0000\u0000\u0000\u011f\u0120\u0005-\u0000"+
+ "\u0000\u0120\u0121\u0003^/\u0000\u0121\u0125\u0005/\u0000\u0000\u0122"+
+ "\u0124\u0003\u0012\t\u0000\u0123\u0122\u0001\u0000\u0000\u0000\u0124\u0127"+
+ "\u0001\u0000\u0000\u0000\u0125\u0123\u0001\u0000\u0000\u0000\u0125\u0126"+
+ "\u0001\u0000\u0000\u0000\u0126+\u0001\u0000\u0000\u0000\u0127\u0125\u0001"+
+ "\u0000\u0000\u0000\u0128\u0129\u0005.\u0000\u0000\u0129\u012d\u0005/\u0000"+
+ "\u0000\u012a\u012c\u0003\u0012\t\u0000\u012b\u012a\u0001\u0000\u0000\u0000"+
+ "\u012c\u012f\u0001\u0000\u0000\u0000\u012d\u012b\u0001\u0000\u0000\u0000"+
+ "\u012d\u012e\u0001\u0000\u0000\u0000\u012e-\u0001\u0000\u0000\u0000\u012f"+
+ "\u012d\u0001\u0000\u0000\u0000\u0130\u0135\u00030\u0018\u0000\u0131\u0135"+
+ "\u00032\u0019\u0000\u0132\u0135\u0003V+\u0000\u0133\u0135\u0003:\u001d"+
+ "\u0000\u0134\u0130\u0001\u0000\u0000\u0000\u0134\u0131\u0001\u0000\u0000"+
+ "\u0000\u0134\u0132\u0001\u0000\u0000\u0000\u0134\u0133\u0001\u0000\u0000"+
+ "\u0000\u0135/\u0001\u0000\u0000\u0000\u0136\u0137\u0003H$\u0000\u0137"+
+ "\u0138\u0005\r\u0000\u0000\u0138\u0139\u00034\u001a\u0000\u01391\u0001"+
+ "\u0000\u0000\u0000\u013a\u013b\u0005+\u0000\u0000\u013b\u013c\u00054\u0000"+
+ "\u0000\u013c\u013d\u0005\u001d\u0000\u0000\u013d\u013e\u0003\u0010\b\u0000"+
+ "\u013e\u013f\u0005\u001e\u0000\u0000\u013f3\u0001\u0000\u0000\u0000\u0140"+
+ "\u0143\u00036\u001b\u0000\u0141\u0143\u0003L&\u0000\u0142\u0140\u0001"+
+ "\u0000\u0000\u0000\u0142\u0141\u0001\u0000\u0000\u0000\u01435\u0001\u0000"+
+ "\u0000\u0000\u0144\u014f\u0005$\u0000\u0000\u0145\u014f\u00054\u0000\u0000"+
+ "\u0146\u014f\u0003J%\u0000\u0147\u014f\u0003^/\u0000\u0148\u014f\u0003"+
+ "8\u001c\u0000\u0149\u014f\u0003.\u0017\u0000\u014a\u014b\u0005\u001d\u0000"+
+ "\u0000\u014b\u014c\u00034\u001a\u0000\u014c\u014d\u0005\u001e\u0000\u0000"+
+ "\u014d\u014f\u0001\u0000\u0000\u0000\u014e\u0144\u0001\u0000\u0000\u0000"+
+ "\u014e\u0145\u0001\u0000\u0000\u0000\u014e\u0146\u0001\u0000\u0000\u0000"+
+ "\u014e\u0147\u0001\u0000\u0000\u0000\u014e\u0148\u0001\u0000\u0000\u0000"+
+ "\u014e\u0149\u0001\u0000\u0000\u0000\u014e\u014a\u0001\u0000\u0000\u0000"+
+ "\u014f7\u0001\u0000\u0000\u0000\u0150\u0151\u0005\u0019\u0000\u0000\u0151"+
+ "\u0152\u00034\u001a\u0000\u01529\u0001\u0000\u0000\u0000\u0153\u0156\u0003"+
+ "<\u001e\u0000\u0154\u0156\u0003B!\u0000\u0155\u0153\u0001\u0000\u0000"+
+ "\u0000\u0155\u0154\u0001\u0000\u0000\u0000\u0156;\u0001\u0000\u0000\u0000"+
+ "\u0157\u015a\u0003>\u001f\u0000\u0158\u015a\u0003@ \u0000\u0159\u0157"+
+ "\u0001\u0000\u0000\u0000\u0159\u0158\u0001\u0000\u0000\u0000\u015a=\u0001"+
+ "\u0000\u0000\u0000\u015b\u015c\u0005\u0001\u0000\u0000\u015c\u015d\u0003"+
+ "H$\u0000\u015d?\u0001\u0000\u0000\u0000\u015e\u015f\u0003H$\u0000\u015f"+
+ "\u0160\u0005\u0001\u0000\u0000\u0160A\u0001\u0000\u0000\u0000\u0161\u0164"+
+ "\u0003D\"\u0000\u0162\u0164\u0003F#\u0000\u0163\u0161\u0001\u0000\u0000"+
+ "\u0000\u0163\u0162\u0001\u0000\u0000\u0000\u0164C\u0001\u0000\u0000\u0000"+
+ "\u0165\u0166\u0005\u0002\u0000\u0000\u0166\u0167\u0003H$\u0000\u0167E"+
+ "\u0001\u0000\u0000\u0000\u0168\u0169\u0003H$\u0000\u0169\u016a\u0005\u0002"+
+ "\u0000\u0000\u016aG\u0001\u0000\u0000\u0000\u016b\u016e\u00054\u0000\u0000"+
+ "\u016c\u016e\u0003J%\u0000\u016d\u016b\u0001\u0000\u0000\u0000\u016d\u016c"+
+ "\u0001\u0000\u0000\u0000\u016eI\u0001\u0000\u0000\u0000\u016f\u0170\u0005"+
+ "$\u0000\u0000\u0170\u0171\u0005\u001c\u0000\u0000\u0171\u017e\u00054\u0000"+
+ "\u0000\u0172\u0173\u0005$\u0000\u0000\u0173\u0175\u0005\u001c\u0000\u0000"+
+ "\u0174\u0172\u0001\u0000\u0000\u0000\u0174\u0175\u0001\u0000\u0000\u0000"+
+ "\u0175\u0178\u0001\u0000\u0000\u0000\u0176\u0177\u00054\u0000\u0000\u0177"+
+ "\u0179\u0005\u001c\u0000\u0000\u0178\u0176\u0001\u0000\u0000\u0000\u0179"+
+ "\u017a\u0001\u0000\u0000\u0000\u017a\u0178\u0001\u0000\u0000\u0000\u017a"+
+ "\u017b\u0001\u0000\u0000\u0000\u017b\u017c\u0001\u0000\u0000\u0000\u017c"+
+ "\u017e\u00054\u0000\u0000\u017d\u016f\u0001\u0000\u0000\u0000\u017d\u0174"+
+ "\u0001\u0000\u0000\u0000\u017eK\u0001\u0000\u0000\u0000\u017f\u0182\u0003"+
+ "N\'\u0000\u0180\u0182\u0003T*\u0000\u0181\u017f\u0001\u0000\u0000\u0000"+
+ "\u0181\u0180\u0001\u0000\u0000\u0000\u0182M\u0001\u0000\u0000\u0000\u0183"+
+ "\u0184\u0006\'\uffff\uffff\u0000\u0184\u0185\u0003P(\u0000\u0185\u018b"+
+ "\u0001\u0000\u0000\u0000\u0186\u0187\n\u0002\u0000\u0000\u0187\u0188\u0005"+
+ "\n\u0000\u0000\u0188\u018a\u0003P(\u0000\u0189\u0186\u0001\u0000\u0000"+
+ "\u0000\u018a\u018d\u0001\u0000\u0000\u0000\u018b\u0189\u0001\u0000\u0000"+
+ "\u0000\u018b\u018c\u0001\u0000\u0000\u0000\u018cO\u0001\u0000\u0000\u0000"+
+ "\u018d\u018b\u0001\u0000\u0000\u0000\u018e\u018f\u0006(\uffff\uffff\u0000"+
+ "\u018f\u0190\u0003R)\u0000\u0190\u0196\u0001\u0000\u0000\u0000\u0191\u0192"+
+ "\n\u0002\u0000\u0000\u0192\u0193\u0005\t\u0000\u0000\u0193\u0195\u0003"+
+ "R)\u0000\u0194\u0191\u0001\u0000\u0000\u0000\u0195\u0198\u0001\u0000\u0000"+
+ "\u0000\u0196\u0194\u0001\u0000\u0000\u0000\u0196\u0197\u0001\u0000\u0000"+
+ "\u0000\u0197Q\u0001\u0000\u0000\u0000\u0198\u0196\u0001\u0000\u0000\u0000"+
+ "\u0199\u01a2\u00051\u0000\u0000\u019a\u01a2\u00054\u0000\u0000\u019b\u01a2"+
+ "\u0003J%\u0000\u019c\u019d\u0003V+\u0000\u019d\u019e\u0005\u001d\u0000"+
+ "\u0000\u019e\u019f\u0003N\'\u0000\u019f\u01a0\u0005\u001e\u0000\u0000"+
+ "\u01a0\u01a2\u0001\u0000\u0000\u0000\u01a1\u0199\u0001\u0000\u0000\u0000"+
+ "\u01a1\u019a\u0001\u0000\u0000\u0000\u01a1\u019b\u0001\u0000\u0000\u0000"+
+ "\u01a1\u019c\u0001\u0000\u0000\u0000\u01a2S\u0001\u0000\u0000\u0000\u01a3"+
+ "\u01a4\u00036\u001b\u0000\u01a4\u01a5\u0003`0\u0000\u01a5\u01a6\u0003"+
+ "4\u001a\u0000\u01a6U\u0001\u0000\u0000\u0000\u01a7\u01a9\u0003X,\u0000"+
+ "\u01a8\u01a7\u0001\u0000\u0000\u0000\u01a8\u01a9\u0001\u0000\u0000\u0000"+
+ "\u01a9\u01ad\u0001\u0000\u0000\u0000\u01aa\u01ac\u0003Z-\u0000\u01ab\u01aa"+
+ "\u0001\u0000\u0000\u0000\u01ac\u01af\u0001\u0000\u0000\u0000\u01ad\u01ab"+
+ "\u0001\u0000\u0000\u0000\u01ad\u01ae\u0001\u0000\u0000\u0000\u01ae\u01b0"+
+ "\u0001\u0000\u0000\u0000\u01af\u01ad\u0001\u0000\u0000\u0000\u01b0\u01b1"+
+ "\u00054\u0000\u0000\u01b1\u01b2\u0005\u001d\u0000\u0000\u01b2\u01b3\u0003"+
+ "\u0010\b\u0000\u01b3\u01b4\u0005\u001e\u0000\u0000\u01b4W\u0001\u0000"+
+ "\u0000\u0000\u01b5\u01ba\u0005$\u0000\u0000\u01b6\u01ba\u0003J%\u0000"+
+ "\u01b7\u01ba\u00032\u0019\u0000\u01b8\u01ba\u00054\u0000\u0000\u01b9\u01b5"+
+ "\u0001\u0000\u0000\u0000\u01b9\u01b6\u0001\u0000\u0000\u0000\u01b9\u01b7"+
+ "\u0001\u0000\u0000\u0000\u01b9\u01b8\u0001\u0000\u0000\u0000\u01ba\u01bb"+
+ "\u0001\u0000\u0000\u0000\u01bb\u01bc\u0005\u001c\u0000\u0000\u01bcY\u0001"+
+ "\u0000\u0000\u0000\u01bd\u01be\u00054\u0000\u0000\u01be\u01bf\u0005\u001d"+
+ "\u0000\u0000\u01bf\u01c0\u0003\u0010\b\u0000\u01c0\u01c1\u0005\u001e\u0000"+
+ "\u0000\u01c1\u01c2\u0005\u001c\u0000\u0000\u01c2[\u0001\u0000\u0000\u0000"+
+ "\u01c3\u01c4\u0007\u0000\u0000\u0000\u01c4]\u0001\u0000\u0000\u0000\u01c5"+
+ "\u01c6\u0007\u0001\u0000\u0000\u01c6_\u0001\u0000\u0000\u0000\u01c7\u01c8"+
+ "\u0007\u0002\u0000\u0000\u01c8a\u0001\u0000\u0000\u0000,ehpx{\u0080\u0086"+
+ "\u008f\u0093\u0098\u009c\u00a3\u00ae\u00b1\u00c2\u00c8\u00cf\u00d5\u00e9"+
+ "\u00ed\u00f1\u00fa\u00fe\u0118\u011b\u0125\u012d\u0134\u0142\u014e\u0155"+
+ "\u0159\u0163\u016d\u0174\u017a\u017d\u0181\u018b\u0196\u01a1\u01a8\u01ad"+
+ "\u01b9";
+ public static final ATN _ATN =
+ new ATNDeserializer().deserialize(_serializedATN.toCharArray());
+ static {
+ _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()];
+ for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) {
+ _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/parser/generated/SimpleJavaVisitor.java b/src/main/java/parser/generated/SimpleJavaVisitor.java
new file mode 100644
index 0000000..4cb1f4b
--- /dev/null
+++ b/src/main/java/parser/generated/SimpleJavaVisitor.java
@@ -0,0 +1,307 @@
+// Generated from C:/Users/janni/Desktop/NichtHaskell2.0/src/main/java/parser/grammar/SimpleJava.g4 by ANTLR 4.13.1
+package parser.generated;
+import org.antlr.v4.runtime.tree.ParseTreeVisitor;
+
+/**
+ * This interface defines a complete generic visitor for a parse tree produced
+ * by {@link SimpleJavaParser}.
+ *
+ * @param The return type of the visit operation. Use {@link Void} for
+ * operations with no return type.
+ */
+public interface SimpleJavaVisitor extends ParseTreeVisitor {
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#program}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitProgram(SimpleJavaParser.ProgramContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#classDeclaration}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitClassDeclaration(SimpleJavaParser.ClassDeclarationContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#memberDeclaration}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitMemberDeclaration(SimpleJavaParser.MemberDeclarationContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#constructorDeclaration}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitConstructorDeclaration(SimpleJavaParser.ConstructorDeclarationContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#fieldDeclaration}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitFieldDeclaration(SimpleJavaParser.FieldDeclarationContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#methodDeclaration}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitMethodDeclaration(SimpleJavaParser.MethodDeclarationContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#parameterList}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitParameterList(SimpleJavaParser.ParameterListContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#parameter}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitParameter(SimpleJavaParser.ParameterContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#argumentList}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitArgumentList(SimpleJavaParser.ArgumentListContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#statement}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitStatement(SimpleJavaParser.StatementContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#blockStatement}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitBlockStatement(SimpleJavaParser.BlockStatementContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#returnStatement}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitReturnStatement(SimpleJavaParser.ReturnStatementContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#localVariableDeclaration}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitLocalVariableDeclaration(SimpleJavaParser.LocalVariableDeclarationContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#whileStatement}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitWhileStatement(SimpleJavaParser.WhileStatementContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#doWhileStatement}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitDoWhileStatement(SimpleJavaParser.DoWhileStatementContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#forStatement}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitForStatement(SimpleJavaParser.ForStatementContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#ifElseStatement}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitIfElseStatement(SimpleJavaParser.IfElseStatementContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#ifStatement}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitIfStatement(SimpleJavaParser.IfStatementContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#elseIfStatement}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitElseIfStatement(SimpleJavaParser.ElseIfStatementContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#elseStatement}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitElseStatement(SimpleJavaParser.ElseStatementContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#switchStatement}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitSwitchStatement(SimpleJavaParser.SwitchStatementContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#caseStatement}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitCaseStatement(SimpleJavaParser.CaseStatementContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#defaultStatement}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitDefaultStatement(SimpleJavaParser.DefaultStatementContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#statementExpression}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitStatementExpression(SimpleJavaParser.StatementExpressionContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#assign}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitAssign(SimpleJavaParser.AssignContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#newDeclaration}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitNewDeclaration(SimpleJavaParser.NewDeclarationContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#expression}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitExpression(SimpleJavaParser.ExpressionContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#unaryExpression}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitUnaryExpression(SimpleJavaParser.UnaryExpressionContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#notExpression}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitNotExpression(SimpleJavaParser.NotExpressionContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#crementExpression}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitCrementExpression(SimpleJavaParser.CrementExpressionContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#incrementExpression}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitIncrementExpression(SimpleJavaParser.IncrementExpressionContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#prefixIncrementExpression}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitPrefixIncrementExpression(SimpleJavaParser.PrefixIncrementExpressionContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#suffixIncrementExpression}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitSuffixIncrementExpression(SimpleJavaParser.SuffixIncrementExpressionContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#decrementExpression}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitDecrementExpression(SimpleJavaParser.DecrementExpressionContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#prefixDecrementExpression}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitPrefixDecrementExpression(SimpleJavaParser.PrefixDecrementExpressionContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#suffixDecrementExpression}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitSuffixDecrementExpression(SimpleJavaParser.SuffixDecrementExpressionContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#assignableExpression}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitAssignableExpression(SimpleJavaParser.AssignableExpressionContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#memberAccess}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitMemberAccess(SimpleJavaParser.MemberAccessContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#binaryExpression}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitBinaryExpression(SimpleJavaParser.BinaryExpressionContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#calculationExpression}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitCalculationExpression(SimpleJavaParser.CalculationExpressionContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#dotExpression}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitDotExpression(SimpleJavaParser.DotExpressionContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#dotSubtractionExpression}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitDotSubtractionExpression(SimpleJavaParser.DotSubtractionExpressionContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#nonCalculationExpression}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitNonCalculationExpression(SimpleJavaParser.NonCalculationExpressionContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#methodCall}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitMethodCall(SimpleJavaParser.MethodCallContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#target}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitTarget(SimpleJavaParser.TargetContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#chainedMethod}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitChainedMethod(SimpleJavaParser.ChainedMethodContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#type}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitType(SimpleJavaParser.TypeContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#value}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitValue(SimpleJavaParser.ValueContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#nonCalculationOperator}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitNonCalculationOperator(SimpleJavaParser.NonCalculationOperatorContext ctx);
+}
\ No newline at end of file
--
2.34.1
From 88ce9e52f0011b74d4f0e5ce681bf7a0c447cb2f Mon Sep 17 00:00:00 2001
From: i22035
Date: Tue, 2 Jul 2024 20:08:08 +0200
Subject: [PATCH 11/96] More Tests for ASTBuilder
---
.../binaryexpressions/CalculationNode.java | 10 +-
src/test/java/parser/AstBuilderTest.java | 201 +++++++++++++++---
.../resources/input/javaCases/DoWhile.java | 2 +-
.../{MainMehod.java => MainMethod.java} | 0
...tionTest.java => variableCalculation.java} | 4 +-
.../input/javaCases/variableCompare.java | 30 +++
.../input/javaCases/variableCompareTest.java | 30 ---
7 files changed, 213 insertions(+), 64 deletions(-)
rename src/test/resources/input/javaCases/{MainMehod.java => MainMethod.java} (100%)
rename src/test/resources/input/javaCases/{variableCalculationTest.java => variableCalculation.java} (87%)
create mode 100644 src/test/resources/input/javaCases/variableCompare.java
delete mode 100644 src/test/resources/input/javaCases/variableCompareTest.java
diff --git a/src/main/java/ast/expressions/binaryexpressions/CalculationNode.java b/src/main/java/ast/expressions/binaryexpressions/CalculationNode.java
index 4dec81a..d8b2dbf 100644
--- a/src/main/java/ast/expressions/binaryexpressions/CalculationNode.java
+++ b/src/main/java/ast/expressions/binaryexpressions/CalculationNode.java
@@ -20,10 +20,12 @@ public class CalculationNode extends BinaryNode {
}
private void setOperator(String operator) {
- if(operator.equals("+")) {
- this.operator = EnumLineOperator.PLUS;
- } else if(operator.equals("-")) {
- this.operator = EnumLineOperator.MINUS;
+ if(operator != null) {
+ if(operator.equals("+")) {
+ this.operator = EnumLineOperator.PLUS;
+ } else if(operator.equals("-")) {
+ this.operator = EnumLineOperator.MINUS;
+ }
}
}
diff --git a/src/test/java/parser/AstBuilderTest.java b/src/test/java/parser/AstBuilderTest.java
index fa51567..7018f8f 100644
--- a/src/test/java/parser/AstBuilderTest.java
+++ b/src/test/java/parser/AstBuilderTest.java
@@ -1,22 +1,21 @@
package parser;
-
import ast.ASTNode;
import ast.ClassNode;
import ast.ProgramNode;
import ast.expressions.IExpressionNode;
-import ast.expressions.binaryexpressions.EnumNonCalculationOperator;
+import ast.expressions.binaryexpressions.CalculationNode;
+import ast.expressions.binaryexpressions.DotNode;
+import ast.expressions.binaryexpressions.DotSubstractionNode;
import ast.expressions.binaryexpressions.NonCalculationNode;
import ast.expressions.unaryexpressions.MemberAccessNode;
import ast.expressions.unaryexpressions.UnaryNode;
-import ast.members.ConstructorNode;
-import ast.members.FieldNode;
-import ast.members.MemberNode;
-import ast.members.MethodNode;
+import ast.members.*;
import ast.parameters.ParameterNode;
import ast.statementexpressions.AssignNode;
import ast.statementexpressions.AssignableNode;
import ast.statementexpressions.crementexpressions.CrementType;
+import ast.statementexpressions.crementexpressions.DecrementNode;
import ast.statementexpressions.crementexpressions.IncrementNode;
import ast.statementexpressions.NewDeclarationNode;
import ast.statementexpressions.methodcallstatementnexpressions.MethodCallNode;
@@ -79,7 +78,7 @@ class AstBuilderTest {
@DisplayName("Field Test")
public void fieldTest() {
ClassNode class1 = Helper.generateEmptyClass("TestClass");
- class1.addMember(new FieldNode(null, new BaseType(TypeEnum.INT), "a"));
+ class1.addMember(new FieldNode(new AccessModifierNode("public"), new BaseType(TypeEnum.INT), "a"));
ProgramNode expected = new ProgramNode();
expected.addClass(class1);
@@ -377,36 +376,198 @@ class AstBuilderTest {
@Test
@DisplayName("Variable Compare Test")
public void variableCompareTest(){
+ ClassNode class1 = Helper.generateEmptyClass("TestClass");
+ UnaryNode trueValue = new UnaryNode(new ValueNode(EnumValueNode.BOOLEAN_VALUE,"true"));
+ UnaryNode falseValue = new UnaryNode(new ValueNode(EnumValueNode.BOOLEAN_VALUE,"false"));
- //assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
+ BlockNode trueBlock = new BlockNode();
+ trueBlock.addStatement(new ReturnNode(trueValue));
+ MethodNode trueMethod = new MethodNode("public", new BaseType(TypeEnum.BOOL), false, "trueMethod", trueBlock);
+
+ BlockNode falseBlock = new BlockNode();
+ falseBlock.addStatement(new ReturnNode(falseValue));
+ MethodNode falseMethod = new MethodNode("public", new BaseType(TypeEnum.BOOL), false, "falseMethod", falseBlock);
+
+ BlockNode trueAndTrueBlock = new BlockNode();
+ trueAndTrueBlock.addStatement(new ReturnNode(new NonCalculationNode(trueValue, "&&", trueValue)));
+ MethodNode trueAndTrueMethod = new MethodNode("public", new BaseType(TypeEnum.BOOL), false, "trueAndTrueMethod", trueAndTrueBlock);
+
+ BlockNode trueAndFalseBlock = new BlockNode();
+ trueAndFalseBlock.addStatement(new ReturnNode(new NonCalculationNode(trueValue, "&&", falseValue)));
+ MethodNode trueAndFalseMethod = new MethodNode("public", new BaseType(TypeEnum.BOOL), false, "trueAndFalseMethod", trueAndFalseBlock);
+
+ BlockNode falseAndFalseBlock = new BlockNode();
+ falseAndFalseBlock.addStatement(new ReturnNode(new NonCalculationNode(falseValue, "&&", falseValue)));
+ MethodNode falseAndFalseMethod = new MethodNode("public", new BaseType(TypeEnum.BOOL), false, "falseAndFalseMethod", falseAndFalseBlock);
+
+ BlockNode trueOrTrueBlock = new BlockNode();
+ trueOrTrueBlock.addStatement(new ReturnNode(new NonCalculationNode(trueValue, "||", trueValue)));
+ MethodNode trueOrFalseMethod = new MethodNode("public", new BaseType(TypeEnum.BOOL), false, "trueOrTrueMethod", trueOrTrueBlock);
+
+ BlockNode falseOrFalseBlock = new BlockNode();
+ falseOrFalseBlock.addStatement(new ReturnNode(new NonCalculationNode(falseValue, "||", falseValue)));
+ MethodNode falseOrFalseMethod = new MethodNode("public", new BaseType(TypeEnum.BOOL), false, "falseOrFalseMethod", falseOrFalseBlock);
+
+ class1.addMember(trueMethod);
+ class1.addMember(falseMethod);
+ class1.addMember(trueAndTrueMethod);
+ class1.addMember(trueAndFalseMethod);
+ class1.addMember(falseAndFalseMethod);
+ class1.addMember(trueOrFalseMethod);
+ class1.addMember(falseOrFalseMethod);
+
+ ProgramNode expected = new ProgramNode();
+ expected.addClass(class1);
+
+ ASTNode actual = Helper.generateAST("src/test/resources/input/javaCases/variableCompare.java");
+
+ assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
}
@Test
@DisplayName("Variable Calculation Test")
public void variableCalculationTest(){
+ ClassNode class1 = Helper.generateEmptyClass("TestClass");
- //assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
+ BlockNode aPlusBBlock = new BlockNode();
+ aPlusBBlock.addStatement(new ReturnNode(new CalculationNode(new CalculationNode(new DotNode(new DotSubstractionNode("a"))), "+", new DotNode(new DotSubstractionNode("b")))));
+ MethodNode aPlusBMethod = new MethodNode("public", new BaseType(TypeEnum.INT), false, "aPlusB", aPlusBBlock);
+ aPlusBMethod.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "a"));
+ aPlusBMethod.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "b"));
+
+ BlockNode aMinusBBlock = new BlockNode();
+ aMinusBBlock.addStatement(new ReturnNode(new CalculationNode(new CalculationNode(new DotNode(new DotSubstractionNode("a"))), "-", new DotNode(new DotSubstractionNode("b")))));
+ MethodNode aMinusBMethod = new MethodNode("public", new BaseType(TypeEnum.INT), false, "aMinusB", aMinusBBlock);
+ aMinusBMethod.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "a"));
+ aMinusBMethod.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "b"));
+
+ BlockNode aTimeBBlock = new BlockNode();
+ aTimeBBlock.addStatement(new ReturnNode(new CalculationNode(new DotNode(new DotNode(new DotSubstractionNode("a")), "*", new DotSubstractionNode("b")))));
+ MethodNode aTimeBMethod = new MethodNode("public", new BaseType(TypeEnum.INT), false, "aTimeB", aTimeBBlock);
+ aTimeBMethod.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "a"));
+ aTimeBMethod.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "b"));
+
+ BlockNode aDivBBlock = new BlockNode();
+ aDivBBlock.addStatement(new ReturnNode(new CalculationNode(new DotNode(new DotNode(new DotSubstractionNode("a")), "/", new DotSubstractionNode("b")))));
+ MethodNode aDivBMethod = new MethodNode("public", new BaseType(TypeEnum.INT), false, "aDivB", aDivBBlock);
+ aDivBMethod.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "a"));
+ aDivBMethod.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "b"));
+
+ BlockNode complexCalcBlock = new BlockNode();
+ complexCalcBlock.addStatement(new ReturnNode(new CalculationNode(null, null, new DotNode(new DotNode(new DotNode(new DotNode(new DotSubstractionNode("a")), "*", new DotSubstractionNode("b")), "/", new DotSubstractionNode(new ValueNode(EnumValueNode.INT_VALUE, "1"))), "*", new DotSubstractionNode(new ValueNode(EnumValueNode.INT_VALUE, "3"))))));
+ MethodNode complexCalcMethod = new MethodNode("public", new BaseType(TypeEnum.INT), false, "complexCalc", complexCalcBlock);
+ complexCalcMethod.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "a"));
+ complexCalcMethod.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "b"));
+
+ BlockNode aSmallerBBlock = new BlockNode();
+ aSmallerBBlock.addStatement(new ReturnNode(new NonCalculationNode(new UnaryNode("a"), "<", new UnaryNode("b"))));
+ MethodNode aSmallerBMethod = new MethodNode("public", new BaseType(TypeEnum.BOOL), false, "aSmallerB", aSmallerBBlock);
+ aSmallerBMethod.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "a"));
+ aSmallerBMethod.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "b"));
+
+ BlockNode aGreaterBBlock = new BlockNode();
+ aGreaterBBlock.addStatement(new ReturnNode(new NonCalculationNode(new UnaryNode("a"), ">", new UnaryNode("b"))));
+ MethodNode aGreaterBMethod = new MethodNode("public", new BaseType(TypeEnum.BOOL), false, "aGreaterB", aGreaterBBlock);
+ aGreaterBMethod.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "a"));
+ aGreaterBMethod.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "b"));
+
+ BlockNode aEqualsBBlock = new BlockNode();
+ aEqualsBBlock.addStatement(new ReturnNode(new NonCalculationNode(new UnaryNode("a"), "==", new UnaryNode("b"))));
+ MethodNode aEqualsBMethod = new MethodNode("public", new BaseType(TypeEnum.BOOL), false, "aEqualsB", aEqualsBBlock);
+ aEqualsBMethod.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "a"));
+ aEqualsBMethod.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "b"));
+
+ class1.addMember(aPlusBMethod);
+ class1.addMember(aMinusBMethod);
+ class1.addMember(aTimeBMethod);
+ class1.addMember(aDivBMethod);
+ class1.addMember(complexCalcMethod);
+ class1.addMember(aSmallerBMethod);
+ class1.addMember(aGreaterBMethod);
+ class1.addMember(aEqualsBMethod);
+
+ ProgramNode expected = new ProgramNode();
+ expected.addClass(class1);
+
+ ASTNode actual = Helper.generateAST("src/test/resources/input/javaCases/variableCalculation.java");
+
+ assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
}
@Test
@DisplayName("Main Method Test")
public void mainMethodTest(){
+ ClassNode class1 = Helper.generateEmptyClass("TestClass");
- //assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
+ BlockNode block = new BlockNode();
+ block.addStatement(new ReturnNode(null));
+
+ class1.addMember(new MainMethodNode(block));
+
+ ProgramNode expected = new ProgramNode();
+ expected.addClass(class1);
+
+ ASTNode actual = Helper.generateAST("src/test/resources/input/javaCases/MainMethod.java");
+
+ assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
}
@Test
@DisplayName("While Test")
public void whileTest(){
+ NonCalculationNode condition = new NonCalculationNode(new UnaryNode("i"), ">", new UnaryNode(new ValueNode(EnumValueNode.INT_VALUE, "0")));
- //assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
+ BlockNode whileBlock = new BlockNode();
+ whileBlock.addStatement(new DecrementNode(CrementType.SUFFIX, new AssignableNode("i")));
+
+ WhileNode whileStatement = new WhileNode(condition, whileBlock);
+
+ BlockNode blockCon = new BlockNode();
+ blockCon.addStatement(new LocalVariableDeclarationNode(new BaseType(TypeEnum.INT), "i", "=", new UnaryNode(new ValueNode(EnumValueNode.INT_VALUE, "10"))));
+ blockCon.addStatement(whileStatement);
+ blockCon.addStatement(new ReturnNode(null));
+ ConstructorNode constructor = new ConstructorNode("public", "TestClass", blockCon);
+
+ ClassNode class1 = new ClassNode("public", "TestClass");
+ class1.addMember(constructor);
+
+ ProgramNode expected = new ProgramNode();
+ expected.addClass(class1);
+
+ ASTNode actual = Helper.generateAST("src/test/resources/input/javaCases/While.java");
+
+ assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
}
@Test
@DisplayName("Do While Test")
public void doWhileTest(){
+ NonCalculationNode condition = new NonCalculationNode(new UnaryNode("i"), "<", new UnaryNode(new ValueNode(EnumValueNode.INT_VALUE, "10")));
- //assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
+ BlockNode whileBlock = new BlockNode();
+ whileBlock.addStatement(new IncrementNode(CrementType.SUFFIX, new AssignableNode("i")));
+
+ WhileNode whileStatement = new WhileNode(condition, whileBlock);
+
+ BlockNode blockDoWhile = new BlockNode();
+ blockDoWhile.addStatement(whileBlock);
+ blockDoWhile.addStatement(whileStatement);
+
+ BlockNode blockCon = new BlockNode();
+ blockCon.addStatement(new LocalVariableDeclarationNode(new BaseType(TypeEnum.INT), "i", "=", new UnaryNode(new ValueNode(EnumValueNode.INT_VALUE, "0"))));
+ blockCon.addStatement(blockDoWhile);
+ blockCon.addStatement(new ReturnNode(null));
+ ConstructorNode constructor = new ConstructorNode("public", "TestClass", blockCon);
+
+ ClassNode class1 = new ClassNode("public", "TestClass");
+ class1.addMember(constructor);
+
+ ProgramNode expected = new ProgramNode();
+ expected.addClass(class1);
+
+ ASTNode actual = Helper.generateAST("src/test/resources/input/javaCases/DoWhile.java");
+
+ assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
}
@Test
@@ -414,7 +575,6 @@ class AstBuilderTest {
public void forTest(){
LocalVariableDeclarationNode forDeclaration = new LocalVariableDeclarationNode(new BaseType(TypeEnum.INT), "i", "=", new UnaryNode(new ValueNode(EnumValueNode.INT_VALUE, "0")));
- NonCalculationNode condition = new NonCalculationNode(new UnaryNode("i"), "<", new UnaryNode(new ValueNode(EnumValueNode.INT_VALUE, "10")));
AssignableNode assignable = new AssignableNode("i");
IncrementNode increment = new IncrementNode(CrementType.SUFFIX, assignable);
@@ -424,7 +584,7 @@ class AstBuilderTest {
whileBlock.addStatement(declaration);
whileBlock.addStatement(increment);
- WhileNode whileStatement = new WhileNode(condition, whileBlock);
+ WhileNode whileStatement = new WhileNode(new NonCalculationNode(new UnaryNode("i"), "<", new UnaryNode(new ValueNode(EnumValueNode.INT_VALUE, "10"))), whileBlock);
BlockNode forStatement = new BlockNode();
forStatement.addStatement(forDeclaration);
@@ -445,17 +605,4 @@ class AstBuilderTest {
assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
}
-
-
-
-
-
-
-
-
-
-
-
-
-
}
\ No newline at end of file
diff --git a/src/test/resources/input/javaCases/DoWhile.java b/src/test/resources/input/javaCases/DoWhile.java
index 65c25de..3ca1b24 100644
--- a/src/test/resources/input/javaCases/DoWhile.java
+++ b/src/test/resources/input/javaCases/DoWhile.java
@@ -4,7 +4,7 @@ class TestClass{
int i = 0;
do{
- i++
+ i++;
}while(i < 10);
}
}
\ No newline at end of file
diff --git a/src/test/resources/input/javaCases/MainMehod.java b/src/test/resources/input/javaCases/MainMethod.java
similarity index 100%
rename from src/test/resources/input/javaCases/MainMehod.java
rename to src/test/resources/input/javaCases/MainMethod.java
diff --git a/src/test/resources/input/javaCases/variableCalculationTest.java b/src/test/resources/input/javaCases/variableCalculation.java
similarity index 87%
rename from src/test/resources/input/javaCases/variableCalculationTest.java
rename to src/test/resources/input/javaCases/variableCalculation.java
index 7708811..f1b79d8 100644
--- a/src/test/resources/input/javaCases/variableCalculationTest.java
+++ b/src/test/resources/input/javaCases/variableCalculation.java
@@ -16,8 +16,8 @@ class TestClass{
return a / b;
}
- int colmplexCalc (int a, int b){
- return a * (b / 1);
+ int complexCalc (int a, int b){
+ return a * b / 1 * 3;
}
boolean aSmallerB (int a, int b){
diff --git a/src/test/resources/input/javaCases/variableCompare.java b/src/test/resources/input/javaCases/variableCompare.java
new file mode 100644
index 0000000..81ed8f5
--- /dev/null
+++ b/src/test/resources/input/javaCases/variableCompare.java
@@ -0,0 +1,30 @@
+class TestClass{
+
+ boolean trueMethod() {
+ return true;
+ }
+
+ boolean falseMethod(){
+ return false;
+ }
+
+ boolean trueAndTrueMethod(){
+ return true && true;
+ }
+
+ boolean trueAndFalseMethod(){
+ return true && false;
+ }
+
+ boolean falseAndFalseMethod(){
+ return false && false;
+ }
+
+ boolean trueOrTrueMethod(){
+ return true || true;
+ }
+
+ boolean falseOrFalseMethod(){
+ return false || false;
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/input/javaCases/variableCompareTest.java b/src/test/resources/input/javaCases/variableCompareTest.java
deleted file mode 100644
index dc01954..0000000
--- a/src/test/resources/input/javaCases/variableCompareTest.java
+++ /dev/null
@@ -1,30 +0,0 @@
-class TestClass{
-
- boolean true(){
- return true;
- }
-
- boolean false(){
- return false();
- }
-
- boolean trueAndTrue(){
- return true && true;
- }
-
- boolean trueAndFalse(){
- return true && true;
- }
-
- boolean falseAndFalse(){
- return false && false;
- }
-
- boolean trueOrFalse(){
- return true || false;
- }
-
- boolean falseOrFalse(){
- return false || false;
- }
-}
\ No newline at end of file
--
2.34.1
From 671317f28be27026842c39765ac98fa476468d1e Mon Sep 17 00:00:00 2001
From: Lucas <89882946+notbad3500@users.noreply.github.com>
Date: Tue, 2 Jul 2024 23:45:54 +0200
Subject: [PATCH 12/96] Merged Code Gen!!!
---
src/main/resources/output/output.jar | Bin 211 -> 211 bytes
src/test/Makefile | 2 +-
.../input/featureTests/BooleanOperations.class | Bin 686 -> 0 bytes
.../input/featureTests/CharManipulation.class | Bin 638 -> 0 bytes
.../featureTests/ConditionalStatements.class | Bin 780 -> 0 bytes
.../input/featureTests/EmptyClassExample.class | Bin 208 -> 0 bytes
.../input/featureTests/LoopExamples.class | Bin 1004 -> 0 bytes
.../input/featureTests/MethodOverloading.class | Bin 1083 -> 0 bytes
8 files changed, 1 insertion(+), 1 deletion(-)
delete mode 100644 src/test/resources/input/featureTests/BooleanOperations.class
delete mode 100644 src/test/resources/input/featureTests/CharManipulation.class
delete mode 100644 src/test/resources/input/featureTests/ConditionalStatements.class
delete mode 100644 src/test/resources/input/featureTests/EmptyClassExample.class
delete mode 100644 src/test/resources/input/featureTests/LoopExamples.class
delete mode 100644 src/test/resources/input/featureTests/MethodOverloading.class
diff --git a/src/main/resources/output/output.jar b/src/main/resources/output/output.jar
index 5749e1bdd41b7eec182fc508e7cfebfb99fd14d5..ead4c29da9658fb74f993c6f8d612b2c65e2f288 100644
GIT binary patch
delta 28
hcmcc2c$twmz?+#xgn@&DgJI6@M-zF=m_byVF930532^`b
delta 28
hcmcc2c$twmz?+#xgn@&DgMnq=!->3Q%pj`G7XW5J2t@z@
diff --git a/src/test/Makefile b/src/test/Makefile
index 1464161..126646e 100644
--- a/src/test/Makefile
+++ b/src/test/Makefile
@@ -36,7 +36,7 @@ clean:
rm -f ./resources/output/raupenpiler/*.class
# clean logs
rm -f ../main/resources/logs/*.log
- # clean test/main folders from .class files for End-to-End tests
+ # clean test/java/main folders from .class files for End-to-End tests
rm -f ./java/main/*.class
# clean javac output from featureTests
rm -f ./resources/input/featureTests/*.class
diff --git a/src/test/resources/input/featureTests/BooleanOperations.class b/src/test/resources/input/featureTests/BooleanOperations.class
deleted file mode 100644
index cd8092afc9340340c3c834d5302392425b071189..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 686
zcmZuv(P|Sx6g{)qWRi8$CQXy7wQ5^!lNHPdRD7sVL828R1>2`d9G7V~vthF-^jG`=
zUwl!t1qDCAk5bR1!6M4A_s+d@?>XmQ_Q%h!-vR8R6Tm}3!VghINuYMDPE|KiHty~Z
zj`c7XC_OUPrS&$@Pd7>6DDk-b{r_yDu|i^M0ObHQI4-DuN
z=bfvf-Cz{))x8JN1w^#^1@a>!flb;46li^(A}S~`%bm>o*61B(G5QSo;ZKVz0*i$k
zoYql1C4tMokpHO>nj@CJD(%rd=uI6cR4$2_T5*j=!D3<6--2f20OR
zpzu-0+I$koHJXPWitt?c0p<~q-Z_@(fsFM@7D=O%nDj^)qf!CU@kuUO;Y9(b(XrJp
zu;ii=U>Vha%zEdiMvdu_WVEbyAKTDL`&+7G(=(}(<6SHFGQbL633x+gx>F)8Z+-)8T_`M`c2kNu7Xt;kUWf-h%BbokHN5H}fx%-Xyk-a>?H
zH*hZ*32YHd$Ppbrd3Y#rl|z`;t@CR&^Winzi>DGx0?EQ|lV~kArxt~0^7ak@3luN0
zqK@q;|A4kOv;7OjALYGUEOf6>ZcR{|V6|1=pI~Da&$_Kq2s~*YOFZWaR*7{~Df*u4
HbJ+OR=|(Sh3MEvQIh;9X&i6ZWW`F(p{u96})RKrGYQu67LtG$pPh>=!bG3bvR~?o($S@Bp^-`
zNMqSX#>EP0?)XZ~=$w+6mq
zn``B(MSTh+o55t%k*}30E-jq=kr@GY*h_@ZE4cVfv{Cx(mG(JzRc1{-S$%-0ZhV9N
znLB|!+BDAs7QYx0h%?G7&Fi|XGMb0gudqKN{RK3hnG-MBjm1>u2b@di0Z$sn$^52wX1pk!
m^MiXlt#KW4{kzCEIY5qbtF(D+q5u!;Bo+xM5m045f`h-jQ=H!b
diff --git a/src/test/resources/input/featureTests/EmptyClassExample.class b/src/test/resources/input/featureTests/EmptyClassExample.class
deleted file mode 100644
index a6a129d83eb7b7fa699093038b18c5956b9ac7cc..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 208
zcmX^0Z`VEs1_mbvUM>bE24;2!79Ivx1~x_pfvm)`ME#t^ymWp4q^#8B5=I6#o6Nk-
z5<5l)W)00Sb_Nbc20_={f|5$-oW$Z{*NVj4f}B)F1{UZ16d=X#lbM(5SDKrYS`?C)
z1d`wi&Mz%WPIb!!al|lm>VYg|P-I{Sx&s6lfe`2tAjt{j$%6R|46It)85lQ$rMZA4
ONE)J)8%Q%T@BjcvAt~Pg
diff --git a/src/test/resources/input/featureTests/LoopExamples.class b/src/test/resources/input/featureTests/LoopExamples.class
deleted file mode 100644
index 2a398c6e58dba159bd89b9357647b2657cb08f32..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 1004
zcmaJ=L2nX46#fP%3+onI5GtY-D^;jkwBDrgP$IEOt0pwvpX~rul@+n
zUOekTlOFs5{uY0MY1FqsA_U?dW@h(&?|a|-=IxK)7vBNwVaG%SQ3EjxONcY9obhvB
zbGSUMy=tF{j%JAO+S1m~7^0QxaS{n64VV_Lz?y-#hJh9?q11qqat9+KTh(6sw$v@{
z3+~o4R5N8EjTMG9m-j_O$qv^iw(ij>&|K<(ax44Qar#IH<=XPJZX$!MfvXmB$TMUY
z@G}@*Sj~|k$vj2%I0J^1fdYedpp^IgEq6UfP|a9Fbp=EEz?S0Wz-LiRtaF^t5jMg$`f;bo+
JqK3yP`~|8~{Zs$|
diff --git a/src/test/resources/input/featureTests/MethodOverloading.class b/src/test/resources/input/featureTests/MethodOverloading.class
deleted file mode 100644
index 2357744da74e54140524878508a87dd6fe8f3e92..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 1083
zcmaJ=T~8B16g@+?-L@>>0wM)g1#M}i0)E%{Koeq89(PmmwPA0
zgZi0hD2Bvq$8*#hhFCUtY$C}p^G>K!**rKGzAJgt@lMh(5ldklmWc@qlbE_eRqF*x
zw247>iEzFeHgRO}(04plQ@-HslBSrkFpD|D@n(}Do~=}Jm08j`Z(#w842x~v5@qQ%
zxccCzQ(6UzdnzE#Y$X@bhT4gfR1xPA?wDA%kiiPW+=#vmW=E@VJxwx9kvrDH*0eC2
zydX)TCIT}UW!V%AQ&q!@A;qEmu79#CFa+Qz<
zArgdK8N!-KVI3QN>>-KK!U{iOe!N7g`UB~FJaK{PE8GGua9bA)U0J=NF?8ix=WN(#
q97$O8I3|#%#~Q-};v2(5WGPS5>JjzIg)xs^s-@}s37+8vmi_{y1Na&M
--
2.34.1
From 6760a17f00c72e393f710de2687bb7a6474830ef Mon Sep 17 00:00:00 2001
From: Lucas <89882946+notbad3500@users.noreply.github.com>
Date: Tue, 2 Jul 2024 23:49:44 +0200
Subject: [PATCH 13/96] Revert "Merged Code Gen!!!"
This reverts commit 671317f28be27026842c39765ac98fa476468d1e.
---
src/main/resources/output/output.jar | Bin 211 -> 211 bytes
src/test/Makefile | 2 +-
.../input/featureTests/BooleanOperations.class | Bin 0 -> 686 bytes
.../input/featureTests/CharManipulation.class | Bin 0 -> 638 bytes
.../featureTests/ConditionalStatements.class | Bin 0 -> 780 bytes
.../input/featureTests/EmptyClassExample.class | Bin 0 -> 208 bytes
.../input/featureTests/LoopExamples.class | Bin 0 -> 1004 bytes
.../input/featureTests/MethodOverloading.class | Bin 0 -> 1083 bytes
8 files changed, 1 insertion(+), 1 deletion(-)
create mode 100644 src/test/resources/input/featureTests/BooleanOperations.class
create mode 100644 src/test/resources/input/featureTests/CharManipulation.class
create mode 100644 src/test/resources/input/featureTests/ConditionalStatements.class
create mode 100644 src/test/resources/input/featureTests/EmptyClassExample.class
create mode 100644 src/test/resources/input/featureTests/LoopExamples.class
create mode 100644 src/test/resources/input/featureTests/MethodOverloading.class
diff --git a/src/main/resources/output/output.jar b/src/main/resources/output/output.jar
index ead4c29da9658fb74f993c6f8d612b2c65e2f288..5749e1bdd41b7eec182fc508e7cfebfb99fd14d5 100644
GIT binary patch
delta 28
hcmcc2c$twmz?+#xgn@&DgMnq=!->3Q%pj`G7XW5J2t@z@
delta 28
hcmcc2c$twmz?+#xgn@&DgJI6@M-zF=m_byVF930532^`b
diff --git a/src/test/Makefile b/src/test/Makefile
index 126646e..1464161 100644
--- a/src/test/Makefile
+++ b/src/test/Makefile
@@ -36,7 +36,7 @@ clean:
rm -f ./resources/output/raupenpiler/*.class
# clean logs
rm -f ../main/resources/logs/*.log
- # clean test/java/main folders from .class files for End-to-End tests
+ # clean test/main folders from .class files for End-to-End tests
rm -f ./java/main/*.class
# clean javac output from featureTests
rm -f ./resources/input/featureTests/*.class
diff --git a/src/test/resources/input/featureTests/BooleanOperations.class b/src/test/resources/input/featureTests/BooleanOperations.class
new file mode 100644
index 0000000000000000000000000000000000000000..cd8092afc9340340c3c834d5302392425b071189
GIT binary patch
literal 686
zcmZuv(P|Sx6g{)qWRi8$CQXy7wQ5^!lNHPdRD7sVL828R1>2`d9G7V~vthF-^jG`=
zUwl!t1qDCAk5bR1!6M4A_s+d@?>XmQ_Q%h!-vR8R6Tm}3!VghINuYMDPE|KiHty~Z
zj`c7XC_OUPrS&$@Pd7>6DDk-b{r_yDu|i^M0ObHQI4-DuN
z=bfvf-Cz{))x8JN1w^#^1@a>!flb;46li^(A}S~`%bm>o*61B(G5QSo;ZKVz0*i$k
zoYql1C4tMokpHO>nj@CJD(%rd=uI6cR4$2_T5*j=!D3<6--2f20OR
zpzu-0+I$koHJXPWitt?c0p<~q-Z_@(fsFM@7D=O%nDj^)qf!CU@kuUO;Y9(b(XrJp
zu;ii=U>Vha%zEdiMvdu_WVEbyAKTDL`&+7G(=(}(<6SHFGQbL633x+gx>F)8Z+-)8T_`M`c2kNu7Xt;kUWf-h%BbokHN5H}fx%-Xyk-a>?H
zH*hZ*32YHd$Ppbrd3Y#rl|z`;t@CR&^Winzi>DGx0?EQ|lV~kArxt~0^7ak@3luN0
zqK@q;|A4kOv;7OjALYGUEOf6>ZcR{|V6|1=pI~Da&$_Kq2s~*YOFZWaR*7{~Df*u4
HbJ+OR=|(Sh3MEvQIh;9X&i6ZWW`F(p{u96})RKrGYQu67LtG$pPh>=!bG3bvR~?o($S@Bp^-`
zNMqSX#>EP0?)XZ~=$w+6mq
zn``B(MSTh+o55t%k*}30E-jq=kr@GY*h_@ZE4cVfv{Cx(mG(JzRc1{-S$%-0ZhV9N
znLB|!+BDAs7QYx0h%?G7&Fi|XGMb0gudqKN{RK3hnG-MBjm1>u2b@di0Z$sn$^52wX1pk!
m^MiXlt#KW4{kzCEIY5qbtF(D+q5u!;Bo+xM5m045f`h-jQ=H!b
literal 0
HcmV?d00001
diff --git a/src/test/resources/input/featureTests/EmptyClassExample.class b/src/test/resources/input/featureTests/EmptyClassExample.class
new file mode 100644
index 0000000000000000000000000000000000000000..a6a129d83eb7b7fa699093038b18c5956b9ac7cc
GIT binary patch
literal 208
zcmX^0Z`VEs1_mbvUM>bE24;2!79Ivx1~x_pfvm)`ME#t^ymWp4q^#8B5=I6#o6Nk-
z5<5l)W)00Sb_Nbc20_={f|5$-oW$Z{*NVj4f}B)F1{UZ16d=X#lbM(5SDKrYS`?C)
z1d`wi&Mz%WPIb!!al|lm>VYg|P-I{Sx&s6lfe`2tAjt{j$%6R|46It)85lQ$rMZA4
ONE)J)8%Q%T@BjcvAt~Pg
literal 0
HcmV?d00001
diff --git a/src/test/resources/input/featureTests/LoopExamples.class b/src/test/resources/input/featureTests/LoopExamples.class
new file mode 100644
index 0000000000000000000000000000000000000000..2a398c6e58dba159bd89b9357647b2657cb08f32
GIT binary patch
literal 1004
zcmaJ=L2nX46#fP%3+onI5GtY-D^;jkwBDrgP$IEOt0pwvpX~rul@+n
zUOekTlOFs5{uY0MY1FqsA_U?dW@h(&?|a|-=IxK)7vBNwVaG%SQ3EjxONcY9obhvB
zbGSUMy=tF{j%JAO+S1m~7^0QxaS{n64VV_Lz?y-#hJh9?q11qqat9+KTh(6sw$v@{
z3+~o4R5N8EjTMG9m-j_O$qv^iw(ij>&|K<(ax44Qar#IH<=XPJZX$!MfvXmB$TMUY
z@G}@*Sj~|k$vj2%I0J^1fdYedpp^IgEq6UfP|a9Fbp=EEz?S0Wz-LiRtaF^t5jMg$`f;bo+
JqK3yP`~|8~{Zs$|
literal 0
HcmV?d00001
diff --git a/src/test/resources/input/featureTests/MethodOverloading.class b/src/test/resources/input/featureTests/MethodOverloading.class
new file mode 100644
index 0000000000000000000000000000000000000000..2357744da74e54140524878508a87dd6fe8f3e92
GIT binary patch
literal 1083
zcmaJ=T~8B16g@+?-L@>>0wM)g1#M}i0)E%{Koeq89(PmmwPA0
zgZi0hD2Bvq$8*#hhFCUtY$C}p^G>K!**rKGzAJgt@lMh(5ldklmWc@qlbE_eRqF*x
zw247>iEzFeHgRO}(04plQ@-HslBSrkFpD|D@n(}Do~=}Jm08j`Z(#w842x~v5@qQ%
zxccCzQ(6UzdnzE#Y$X@bhT4gfR1xPA?wDA%kiiPW+=#vmW=E@VJxwx9kvrDH*0eC2
zydX)TCIT}UW!V%AQ&q!@A;qEmu79#CFa+Qz<
zArgdK8N!-KVI3QN>>-KK!U{iOe!N7g`UB~FJaK{PE8GGua9bA)U0J=NF?8ix=WN(#
q97$O8I3|#%#~Q-};v2(5WGPS5>JjzIg)xs^s-@}s37+8vmi_{y1Na&M
literal 0
HcmV?d00001
--
2.34.1
From ed4aa2d59bcfd8bc21b77c48054045f688429a8b Mon Sep 17 00:00:00 2001
From: Lucas <89882946+notbad3500@users.noreply.github.com>
Date: Tue, 2 Jul 2024 23:51:06 +0200
Subject: [PATCH 14/96] small changes
---
src/test/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/test/Makefile b/src/test/Makefile
index 1464161..126646e 100644
--- a/src/test/Makefile
+++ b/src/test/Makefile
@@ -36,7 +36,7 @@ clean:
rm -f ./resources/output/raupenpiler/*.class
# clean logs
rm -f ../main/resources/logs/*.log
- # clean test/main folders from .class files for End-to-End tests
+ # clean test/java/main folders from .class files for End-to-End tests
rm -f ./java/main/*.class
# clean javac output from featureTests
rm -f ./resources/input/featureTests/*.class
--
2.34.1
From 7419953510a6b5ea29af80e214360c68d3aabb8a Mon Sep 17 00:00:00 2001
From: i22007
Date: Tue, 2 Jul 2024 18:07:26 -0400
Subject: [PATCH 15/96] Revert "Merge branch 'johns-branch' into
code-generator"
This reverts commit 449b895d20c966f47dd869a48f15a5d62a611513, reversing
changes made to f0dd6d5eb6ecc582024328e7d68ff48196dced31.
---
.../java/ast/members/ConstructorNode.java | 8 +-
src/main/java/ast/members/MethodNode.java | 2 +-
src/main/java/bytecode/MethodCodeGen.java | 2 +-
src/main/java/semantic/Scope.java | 2 +-
src/main/java/semantic/SemanticAnalyzer.java | 103 ++++++++----------
.../java/semantic/context/FieldContext.java | 4 +-
.../DuplicatedConstructor.java | 12 --
.../FieldOrParameterTypeMismatch.java | 10 --
.../ConstructorOverloading.java | 11 --
.../typedAstFeaturesTests/CorrectTest.java | 38 ++++++-
10 files changed, 86 insertions(+), 106 deletions(-)
delete mode 100644 src/test/resources/input/typedAstExceptionsTests/DuplicatedConstructor.java
delete mode 100644 src/test/resources/input/typedAstExceptionsTests/FieldOrParameterTypeMismatch.java
delete mode 100644 src/test/resources/input/typedAstFeaturesTests/ConstructorOverloading.java
diff --git a/src/main/java/ast/members/ConstructorNode.java b/src/main/java/ast/members/ConstructorNode.java
index 4e19933..2ff9f94 100644
--- a/src/main/java/ast/members/ConstructorNode.java
+++ b/src/main/java/ast/members/ConstructorNode.java
@@ -10,10 +10,14 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
-public class ConstructorNode extends MethodNode {
+public class ConstructorNode extends MethodNode implements Visitable {
+ public AccessModifierNode accessType;
+ public String identifier;
+ public List parameters = new ArrayList<>();
+ public BlockNode block;
public ConstructorNode(String accessType, String identifier, BlockNode block) {
- this.accesModifier = new AccessModifierNode(accessType);
+ this.accessType = new AccessModifierNode(accessType);
this.identifier = identifier;
this.block = block;
}
diff --git a/src/main/java/ast/members/MethodNode.java b/src/main/java/ast/members/MethodNode.java
index 3661fb2..46a654d 100644
--- a/src/main/java/ast/members/MethodNode.java
+++ b/src/main/java/ast/members/MethodNode.java
@@ -17,7 +17,7 @@ public class MethodNode implements MemberNode, Visitable {
public AccessModifierNode accesModifier;
private ITypeNode type;
public Boolean voidType;
- protected String identifier;
+ private String identifier;
public List parameters = new ArrayList<>();
public BlockNode block;
diff --git a/src/main/java/bytecode/MethodCodeGen.java b/src/main/java/bytecode/MethodCodeGen.java
index 02cf267..ab6e8e1 100644
--- a/src/main/java/bytecode/MethodCodeGen.java
+++ b/src/main/java/bytecode/MethodCodeGen.java
@@ -53,7 +53,7 @@ public class MethodCodeGen implements bytecode.visitor.MethodVisitor {
@Override
public void visit(ConstructorNode constructorNode) {
methodVisitor =
- classWriter.visitMethod(mapper.mapAccessTypeToOpcode(constructorNode.accesModifier),
+ classWriter.visitMethod(mapper.mapAccessTypeToOpcode(constructorNode.accessType),
"",
mapper.generateMethodDescriptor(new BaseType(TypeEnum.VOID), constructorNode.parameters),
null,
diff --git a/src/main/java/semantic/Scope.java b/src/main/java/semantic/Scope.java
index cde47c0..b6b40c4 100644
--- a/src/main/java/semantic/Scope.java
+++ b/src/main/java/semantic/Scope.java
@@ -16,7 +16,7 @@ public class Scope {
public void addLocalVar(String name, ITypeNode type) {
if (this.contains(name)) {
- SemanticAnalyzer.errors.add(new AlreadyDeclaredException("Duplicate local variable " + name));
+ throw new AlreadyDeclaredException("Variable " + name + " already exists in this scope");
}
localVars.peek().put(name, type);
}
diff --git a/src/main/java/semantic/SemanticAnalyzer.java b/src/main/java/semantic/SemanticAnalyzer.java
index 110effd..6ebd124 100644
--- a/src/main/java/semantic/SemanticAnalyzer.java
+++ b/src/main/java/semantic/SemanticAnalyzer.java
@@ -112,49 +112,53 @@ public class SemanticAnalyzer implements SemanticVisitor {
@Override
public TypeCheckResult analyze(MethodNode methodNode) {
+ if (methodNode instanceof ConstructorNode) {
+ return new TypeCheckResult(true, new BaseType(TypeEnum.VOID));
+ } else {
- var valid = true;
+ var valid = true;
- for (var otherMethod : currentClass.getMethods()) {
- if (Objects.equals(otherMethod, methodNode))
- break;
- if (otherMethod.isSame(methodNode)) {
- errors.add(new AlreadyDeclaredException(
- "Method " + methodNode.getIdentifier() + " is already defined in class "
- + currentClass.identifier));
- valid = false;
+ for (var otherMethod : currentClass.getMethods()) {
+ if (Objects.equals(otherMethod, methodNode))
+ break;
+ if (otherMethod.isSame(methodNode)) {
+ errors.add(new AlreadyDeclaredException(
+ "Method " + methodNode.getIdentifier() + " is already defined in class "
+ + currentClass.identifier));
+ valid = false;
+ }
}
- }
- currentScope.pushScope();
- for (var parameter : methodNode.getParameters()) {
- var result = parameter.accept(this);
+ currentScope.pushScope();
+ for (var parameter : methodNode.getParameters()) {
+ var result = parameter.accept(this);
+ valid = valid && result.isValid();
+ try {
+ currentScope.addLocalVar(parameter.identifier, parameter.type);
+ } catch (AlreadyDeclaredException e) {
+ errors.add(new AlreadyDeclaredException(parameter.identifier));
+ }
+
+ }
+
+ currentMethodReturnType = methodNode.getType();
+ currentNullType = currentMethodReturnType;
+
+ var result = methodNode.block.accept(this);
valid = valid && result.isValid();
- try {
- currentScope.addLocalVar(parameter.identifier, parameter.type);
- } catch (AlreadyDeclaredException e) {
- errors.add(new AlreadyDeclaredException(parameter.identifier));
+ currentScope.popScope();
+ ITypeNode resultType = result.getType();
+
+ if (resultType == null) {
+ resultType = new BaseType(TypeEnum.VOID);
+ }
+ if (methodNode.getType() == null) {
+ methodNode.setType(new BaseType(TypeEnum.VOID));
}
+ return new TypeCheckResult(valid, resultType);
+
}
-
- currentMethodReturnType = methodNode.getType();
- currentNullType = currentMethodReturnType;
-
- var result = methodNode.block.accept(this);
- valid = valid && result.isValid();
- currentScope.popScope();
- ITypeNode resultType = result.getType();
-
- if (resultType == null) {
- resultType = new BaseType(TypeEnum.VOID);
- }
- if (methodNode.getType() == null) {
- methodNode.setType(new BaseType(TypeEnum.VOID));
- }
-
- return new TypeCheckResult(valid, resultType);
-
}
@Override
@@ -220,7 +224,7 @@ public class SemanticAnalyzer implements SemanticVisitor {
}
for (IStatementNode statementNode : blockNode.statements) {
var result = statementNode.accept(this);
- if (!(statementNode instanceof IncrementNode) && !(statementNode instanceof DecrementNode)) {
+ if(!(statementNode instanceof IncrementNode) && !(statementNode instanceof DecrementNode)){
if (result.getType() != null) {
if (blockReturnType == null) {
blockReturnType = result.getType();
@@ -246,9 +250,6 @@ public class SemanticAnalyzer implements SemanticVisitor {
if (currentFields.get(toCheck.identifier) != null) {
var type = currentFields.get(toCheck.identifier);
toCheck.setTypeNode(type);
- MemberAccessNode memberAccessNode = new MemberAccessNode(false);
- memberAccessNode.identifiers.add(currentClass.identifier);
- toCheck.memberAccess = memberAccessNode;
return new TypeCheckResult(true, type);
} else if (currentScope.getLocalVar(toCheck.identifier) != null) {
var type = currentScope.getLocalVar(toCheck.identifier);
@@ -408,7 +409,6 @@ public class SemanticAnalyzer implements SemanticVisitor {
case PLUS, MINUS:
if (calcRes.getType() instanceof BaseType calcType && dotRes.getType() instanceof BaseType dotType &&
calcType.getTypeEnum().equals(TypeEnum.INT) && dotType.getTypeEnum().equals(TypeEnum.INT)) {
- calcNode.setType(new BaseType(TypeEnum.INT));
return new TypeCheckResult(true, new BaseType(TypeEnum.INT));
}
break;
@@ -416,12 +416,10 @@ public class SemanticAnalyzer implements SemanticVisitor {
}
} else {
- calcNode.setType(calcRes.getType());
return new TypeCheckResult(calcRes.isValid(), calcRes.getType());
}
} else if (calcNode.dotExpression != null) {
var dotRes = calcNode.dotExpression.accept(this);
- calcNode.setType(dotRes.getType());
return new TypeCheckResult(dotRes.isValid(), dotRes.getType());
}
return new TypeCheckResult(false, null);
@@ -464,7 +462,6 @@ public class SemanticAnalyzer implements SemanticVisitor {
case LESS, LESS_EQUAL, GREATER, GREATER_EQUAL:
if (expResult.getType() instanceof BaseType expResultType && expResultType.getTypeEnum().equals(TypeEnum.INT) &&
unaryResult.getType() instanceof BaseType unaryResultType && unaryResultType.getTypeEnum().equals(TypeEnum.INT)) {
- nonCalculationNode.setType(new BaseType(TypeEnum.BOOL));
return new TypeCheckResult(true, new BaseType(TypeEnum.BOOL));
} else {
errors.add(new TypeMismatchException("Both types must be Integer"));
@@ -473,7 +470,6 @@ public class SemanticAnalyzer implements SemanticVisitor {
case OR, AND:
if (expResult.getType() instanceof BaseType expResultType && expResultType.getTypeEnum().equals(TypeEnum.INT) &&
unaryResult.getType() instanceof BaseType unaryResultType && unaryResultType.getTypeEnum().equals(TypeEnum.INT)) {
- nonCalculationNode.setType(new BaseType(TypeEnum.BOOL));
return new TypeCheckResult(true, new BaseType(TypeEnum.BOOL));
} else {
errors.add(new TypeMismatchException("Both types must be Boolean"));
@@ -482,7 +478,6 @@ public class SemanticAnalyzer implements SemanticVisitor {
case EQUAL, NOT_EQUAL:
if (expResult.getType() instanceof BaseType expResultType && unaryResult.getType() instanceof BaseType unaryResultType
&& Objects.equals(expResultType, unaryResultType)) {
- nonCalculationNode.setType(new BaseType(TypeEnum.BOOL));
return new TypeCheckResult(true, new BaseType(TypeEnum.BOOL));
} else {
errors.add(new TypeMismatchException("Both types must be the same"));
@@ -498,13 +493,9 @@ public class SemanticAnalyzer implements SemanticVisitor {
if (unary.identifier != null) {
if (currentScope.contains(unary.identifier)) {
- var type = currentScope.getLocalVar(unary.identifier);
- unary.setType(type);
- return new TypeCheckResult(valid, type);
+ return new TypeCheckResult(valid, currentScope.getLocalVar(unary.identifier));
} else if (currentFields.get(unary.identifier) != null) {
- var type = currentFields.get(unary.identifier);
- unary.setType(type);
- return new TypeCheckResult(valid, type);
+ return new TypeCheckResult(valid, currentFields.get(unary.identifier));
} else if (unary.statement != null) {
var result = unary.statement.accept(this);
unary.setType(result.getType());
@@ -514,19 +505,15 @@ public class SemanticAnalyzer implements SemanticVisitor {
}
} else if (unary.statement != null) {
var result = unary.statement.accept(this);
- unary.setType(result.getType());
return new TypeCheckResult(result.isValid(), result.getType());
} else if (unary.value != null) {
var result = unary.value.accept(this);
- unary.setType(result.getType());
return new TypeCheckResult(result.isValid(), result.getType());
} else if (unary.memberAccess != null) {
var result = unary.memberAccess.accept(this);
- unary.setType(result.getType());
return new TypeCheckResult(result.isValid(), result.getType());
} else if (unary.expression != null) {
var result = unary.expression.accept(this);
- unary.setType(result.getType());
return new TypeCheckResult(result.isValid(), result.getType());
}
@@ -538,10 +525,6 @@ public class SemanticAnalyzer implements SemanticVisitor {
ITypeNode currentType = null;
- if (memberAccessNode.thisExpr) {
- currentType = new ReferenceType(currentClass.identifier);
- }
-
for (String s : memberAccessNode.identifiers) {
if (currentType == null) {
if (currentScope.getLocalVar(s) != null) {
@@ -559,7 +542,7 @@ public class SemanticAnalyzer implements SemanticVisitor {
var currentTypeClass = context.getClass(reference.getIdentifier());
var currentField = currentTypeClass.getField(s);
- if (currentField.getAccessModifier().accessType == EnumAccessModifierNode.PUBLIC || memberAccessNode.thisExpr) {
+ if (currentField.getAccessModifier().accessType == EnumAccessModifierNode.PUBLIC) {
currentType = currentField.getType();
} else {
errors.add(new NotVisibleException("This field is not visible"));
diff --git a/src/main/java/semantic/context/FieldContext.java b/src/main/java/semantic/context/FieldContext.java
index 3869bb1..aba5ba0 100644
--- a/src/main/java/semantic/context/FieldContext.java
+++ b/src/main/java/semantic/context/FieldContext.java
@@ -4,15 +4,13 @@ import ast.members.FieldNode;
import ast.type.*;
import ast.type.type.*;
-import java.util.Objects;
-
public class FieldContext {
private AccessModifierNode accessModifier;
private ITypeNode type;
public FieldContext(FieldNode field) {
- accessModifier = Objects.requireNonNullElseGet(field.accessTypeNode, () -> new AccessModifierNode("private"));
+ accessModifier = field.accessTypeNode;
type = field.type;
}
diff --git a/src/test/resources/input/typedAstExceptionsTests/DuplicatedConstructor.java b/src/test/resources/input/typedAstExceptionsTests/DuplicatedConstructor.java
deleted file mode 100644
index 3d877a3..0000000
--- a/src/test/resources/input/typedAstExceptionsTests/DuplicatedConstructor.java
+++ /dev/null
@@ -1,12 +0,0 @@
-// @expected: AlreadyDeclaredException
-public class AllFeaturesClassExample {
-
- public AllFeaturesClassExample(boolean b){
-
- }
-
- public AllFeaturesClassExample(boolean b){
-
- }
-
-}
diff --git a/src/test/resources/input/typedAstExceptionsTests/FieldOrParameterTypeMismatch.java b/src/test/resources/input/typedAstExceptionsTests/FieldOrParameterTypeMismatch.java
deleted file mode 100644
index 0a9c17c..0000000
--- a/src/test/resources/input/typedAstExceptionsTests/FieldOrParameterTypeMismatch.java
+++ /dev/null
@@ -1,10 +0,0 @@
-// @expected: TypeMismatchException
-public class AllFeaturesClassExample {
- int x;
-
- public boolean test(boolean x){
- return this.x;
- }
-
-}
-
diff --git a/src/test/resources/input/typedAstFeaturesTests/ConstructorOverloading.java b/src/test/resources/input/typedAstFeaturesTests/ConstructorOverloading.java
deleted file mode 100644
index 1e0bc49..0000000
--- a/src/test/resources/input/typedAstFeaturesTests/ConstructorOverloading.java
+++ /dev/null
@@ -1,11 +0,0 @@
-public class AllFeaturesClassExample {
-
- public AllFeaturesClassExample(boolean b){
-
- }
-
- public AllFeaturesClassExample(boolean b, int a){
-
- }
-
-}
diff --git a/src/test/resources/input/typedAstFeaturesTests/CorrectTest.java b/src/test/resources/input/typedAstFeaturesTests/CorrectTest.java
index 4d27ecd..5ef0b26 100644
--- a/src/test/resources/input/typedAstFeaturesTests/CorrectTest.java
+++ b/src/test/resources/input/typedAstFeaturesTests/CorrectTest.java
@@ -1,10 +1,38 @@
-
public class AllFeaturesClassExample {
- int x;
+ int a;
+ boolean b;
+ char c;
+
+ public void controlStructures(int adf, boolean bool) {
+ if (a > (10 + 8)) {
+ } else {
+ }
+
+
+ while (a > adf) {
+ a--;
+ }
+
+ for (int i = 0; i < 5; i++) {
+ }
+
- public void test(){
- x = 1;
}
-}
+// void logicalOperations() {
+ // Logische UND-Operation
+// if (b && a > 5) {
+// System.out.println("a ist größer als 5 und b ist wahr");
+// }
+ // Logische ODER-Operation
+// if (b || a < 5) {
+// System.out.println("b ist wahr oder a ist kleiner als 5");
+// }
+// }
+
+// public static void main(String[] args) {
+// AllFeaturesClassExample obj = new AllFeaturesClassExample(12, true, 'a');
+// obj.controlStructures();
+// }
+}
--
2.34.1
From 72f82ff86313123173ebba6b7dcccf9b654cc750 Mon Sep 17 00:00:00 2001
From: i22007
Date: Tue, 2 Jul 2024 18:07:42 -0400
Subject: [PATCH 16/96] Revert "Merge branch 'NewParser' into code-generator"
This reverts commit f0dd6d5eb6ecc582024328e7d68ff48196dced31, reversing
changes made to 895636203384d015cd90c724cd4e9f3bb72ab9bd.
---
.../binaryexpressions/CalculationNode.java | 10 +-
src/main/java/ast/statements/WhileNode.java | 5 +
src/main/java/main/Main.java | 2 +-
.../java/parser/astBuilder/ASTBuilder.java | 114 +-
.../java/parser/generated/SimpleJava.interp | 13 +-
.../java/parser/generated/SimpleJava.tokens | 26 +-
.../generated/SimpleJavaBaseListener.java | 36 -
.../generated/SimpleJavaBaseVisitor.java | 21 -
.../parser/generated/SimpleJavaLexer.interp | 14 +-
.../parser/generated/SimpleJavaLexer.java | 494 +++---
.../parser/generated/SimpleJavaLexer.tokens | 26 +-
.../parser/generated/SimpleJavaListener.java | 30 -
.../parser/generated/SimpleJavaParser.java | 1395 +++++++----------
.../parser/generated/SimpleJavaVisitor.java | 18 -
src/main/java/parser/grammar/SimpleJava.g4 | 11 +-
src/test/java/main/E2EReflectionsTest.java | 2 +-
src/test/java/parser/AstBuilderTest.java | 286 +---
.../resources/input/javaCases/DoWhile.java | 2 +-
.../{MainMethod.java => MainMehod.java} | 0
.../input/javaCases/SelfReference.java | 4 +-
.../resources/input/javaCases/SwitchCase.java | 10 -
...tion.java => variableCalculationTest.java} | 4 +-
.../input/javaCases/variableCompare.java | 30 -
.../input/javaCases/variableCompareTest.java | 30 +
24 files changed, 939 insertions(+), 1644 deletions(-)
rename src/test/resources/input/javaCases/{MainMethod.java => MainMehod.java} (100%)
delete mode 100644 src/test/resources/input/javaCases/SwitchCase.java
rename src/test/resources/input/javaCases/{variableCalculation.java => variableCalculationTest.java} (87%)
delete mode 100644 src/test/resources/input/javaCases/variableCompare.java
create mode 100644 src/test/resources/input/javaCases/variableCompareTest.java
diff --git a/src/main/java/ast/expressions/binaryexpressions/CalculationNode.java b/src/main/java/ast/expressions/binaryexpressions/CalculationNode.java
index 1c8bc63..78c059d 100644
--- a/src/main/java/ast/expressions/binaryexpressions/CalculationNode.java
+++ b/src/main/java/ast/expressions/binaryexpressions/CalculationNode.java
@@ -22,12 +22,10 @@ public class CalculationNode extends BinaryNode {
}
private void setOperator(String operator) {
- if(operator != null) {
- if(operator.equals("+")) {
- this.operator = EnumLineOperator.PLUS;
- } else if(operator.equals("-")) {
- this.operator = EnumLineOperator.MINUS;
- }
+ if(operator.equals("+")) {
+ this.operator = EnumLineOperator.PLUS;
+ } else if(operator.equals("-")) {
+ this.operator = EnumLineOperator.MINUS;
}
}
diff --git a/src/main/java/ast/statements/WhileNode.java b/src/main/java/ast/statements/WhileNode.java
index 73b2c67..6ac7f1f 100644
--- a/src/main/java/ast/statements/WhileNode.java
+++ b/src/main/java/ast/statements/WhileNode.java
@@ -13,6 +13,11 @@ public class WhileNode implements IStatementNode {
this.block = block;
}
+ public void test() {
+ return;
+
+ }
+
@Override
public TypeCheckResult accept(SemanticVisitor visitor) {
return visitor.analyze(this);
diff --git a/src/main/java/main/Main.java b/src/main/java/main/Main.java
index 632154e..c365050 100644
--- a/src/main/java/main/Main.java
+++ b/src/main/java/main/Main.java
@@ -97,7 +97,7 @@ public class Main {
/*------------------------- Bytecode Generator -> Bytecode -------------------------*/
// Use the ByteCodeGenerator to generate bytecode from the typed AST and output it to the specified directory
- ByteCodeGenerator byteCodeGenerator = new ByteCodeGenerator(outputDirectoryPath, true, true);
+ ByteCodeGenerator byteCodeGenerator = new ByteCodeGenerator(outputDirectoryPath);
assert abstractSyntaxTree != null;
byteCodeGenerator.visit((ProgramNode) abstractSyntaxTree);
// Log the bytecode generation
diff --git a/src/main/java/parser/astBuilder/ASTBuilder.java b/src/main/java/parser/astBuilder/ASTBuilder.java
index 0b574fc..db153db 100644
--- a/src/main/java/parser/astBuilder/ASTBuilder.java
+++ b/src/main/java/parser/astBuilder/ASTBuilder.java
@@ -3,7 +3,10 @@ package parser.astBuilder;
import ast.*;
import ast.expressions.IExpressionNode;
-import ast.expressions.binaryexpressions.*;
+import ast.expressions.binaryexpressions.CalculationNode;
+import ast.expressions.binaryexpressions.DotNode;
+import ast.expressions.binaryexpressions.DotSubstractionNode;
+import ast.expressions.binaryexpressions.NonCalculationNode;
import ast.expressions.unaryexpressions.MemberAccessNode;
import ast.expressions.unaryexpressions.NotNode;
import ast.expressions.unaryexpressions.UnaryNode;
@@ -11,7 +14,6 @@ import ast.members.*;
import ast.parameters.ParameterNode;
import ast.statementexpressions.AssignNode;
import ast.statementexpressions.AssignableNode;
-import ast.statementexpressions.IStatementExpressionNode;
import ast.statementexpressions.NewDeclarationNode;
import ast.statementexpressions.crementexpressions.CrementType;
import ast.statementexpressions.crementexpressions.DecrementNode;
@@ -77,7 +79,7 @@ public class ASTBuilder extends SimpleJavaBaseVisitor {
if(ctx.AccessModifier() != null) {
constructorNode = new ConstructorNode(ctx.AccessModifier().getText(), ctx.Identifier().getText(), (BlockNode) visit(ctx.blockStatement()));
} else {
- constructorNode = new ConstructorNode("public", ctx.Identifier().getText(), (BlockNode) visit(ctx.blockStatement()));
+ constructorNode = new ConstructorNode(null, ctx.Identifier().getText(), (BlockNode) visit(ctx.blockStatement()));
}
if(ctx.parameterList() != null) {
for(SimpleJavaParser.ParameterContext parameter : ctx.parameterList().parameter()) {
@@ -167,8 +169,6 @@ public class ASTBuilder extends SimpleJavaBaseVisitor {
return visitForStatement(ctx.forStatement());
} else if(ctx.ifElseStatement() != null) {
return visitIfElseStatement(ctx.ifElseStatement());
- } else if(ctx.switchStatement() != null) {
- return visitSwitchStatement(ctx.switchStatement());
} else if(ctx.statementExpression() != null) {
return visitStatementExpression(ctx.statementExpression());
}
@@ -182,12 +182,7 @@ public class ASTBuilder extends SimpleJavaBaseVisitor {
@Override
public ASTNode visitLocalVariableDeclaration(SimpleJavaParser.LocalVariableDeclarationContext ctx) {
- if(ctx.Assign() != null) {
- return new LocalVariableDeclarationNode(createTypeNode(ctx.type().getText()), ctx.Identifier().getText(), ctx.Assign().getText(), (IExpressionNode) visit(ctx.expression()));
- } else {
- return new LocalVariableDeclarationNode(createTypeNode(ctx.type().getText()), ctx.Identifier().getText(), null, null);
- }
-
+ return new LocalVariableDeclarationNode(createTypeNode(ctx.type().getText()), ctx.Identifier().getText(), ctx.Assign().getText(), (IExpressionNode) visit(ctx.expression()));
}
@Override
@@ -219,60 +214,46 @@ public class ASTBuilder extends SimpleJavaBaseVisitor {
@Override
public ASTNode visitForStatement(SimpleJavaParser.ForStatementContext ctx) {
+
List statements = new ArrayList<>();
- // Initialisierung
+ //init
int i = 0;
- if (ctx.localVariableDeclaration() != null) {
+ if(ctx.localVariableDeclaration() != null) {
statements.add((IStatementNode) visit(ctx.localVariableDeclaration()));
- } else if (ctx.statementExpression(i) != null) {
+ } else if(ctx.statementExpression(i) != null){
statements.add((IStatementNode) visit(ctx.statementExpression(i)));
i++;
}
- // Bedingung
+ //condition
IExpressionNode condition = (IExpressionNode) visit(ctx.expression());
- // Inkrement
- IStatementExpressionNode crement = null;
- boolean isPrefix = false;
- if (ctx.statementExpression(i) != null) {
- crement = (IStatementExpressionNode) visit(ctx.statementExpression(i));
-
- if (crement instanceof IncrementNode) {
- isPrefix = ((IncrementNode) crement).crementType == CrementType.PREFIX;
- } else if (crement instanceof DecrementNode) {
- isPrefix = ((DecrementNode) crement).crementType == CrementType.PREFIX;
- }
+ //ink
+ IStatementNode crement = null;
+ if(ctx.statementExpression(i) != null){
+ crement = (IStatementNode) visit(ctx.statementExpression(i));
}
- BlockNode forBlock = (BlockNode) visit(ctx.blockStatement());
+ BlockNode forBlock = new BlockNode();
- // While-Schleife
- BlockNode whileBody = new BlockNode();
-
- // Prä-Inkrement: Das Inkrement kommt vor dem Block
- if (crement != null && isPrefix) {
- whileBody.addStatement((IStatementNode) crement);
+ BlockNode forStatements = (BlockNode) visit(ctx.blockStatement());
+ if(forStatements != null) {
+ forBlock.addStatement((IStatementNode) forStatements);
}
- // Block Statements der For-Schleife in den While-Block kopieren
- for (IStatementNode statement : forBlock.statements) {
- whileBody.addStatement(statement);
+ if(crement != null){
+ BlockNode forCrement = new BlockNode();
+ forCrement.addStatement((crement));
+ forBlock.addStatement(forCrement);
}
- // Post-Inkrement: Das Inkrement kommt nach dem Block
- if (crement != null && !isPrefix) {
- whileBody.addStatement((IStatementNode) crement);
- }
+ WhileNode While = new WhileNode(condition, forBlock);
- // Bedingung der While-Schleife
- WhileNode whileNode = new WhileNode(condition, whileBody);
-
- statements.add(whileNode);
+ statements.add(While);
BlockNode resultBlock = new BlockNode();
- for (IStatementNode statement : statements) {
+ for(IStatementNode statement : statements) {
resultBlock.addStatement((IStatementNode) statement);
}
@@ -320,49 +301,6 @@ public class ASTBuilder extends SimpleJavaBaseVisitor {
return null;
}
- @Override
- public ASTNode visitSwitchStatement(SimpleJavaParser.SwitchStatementContext ctx) {
- UnaryNode switchExpression = (UnaryNode) visit(ctx.expression());
-
- List ifNodes = new ArrayList<>();
-
- for (SimpleJavaParser.CaseStatementContext caseCtx : ctx.caseStatement()) {
- IExpressionNode caseExpression = (IExpressionNode) visit(caseCtx.value());
-
- // Condition as NonCalculationNode -> Equals Expression
- NonCalculationNode condition = new NonCalculationNode(switchExpression, "==", caseExpression);
-
- BlockNode caseBlock = new BlockNode();
- for (SimpleJavaParser.StatementContext stmtCtx : caseCtx.statement()) {
- caseBlock.addStatement((IStatementNode) visit(stmtCtx));
- }
-
- // Each case as if
- IfNode ifNode = new IfNode(condition, caseBlock);
- ifNodes.add(ifNode);
- }
-
- // Check if has Default
- ElseNode defaulElseNode = null;
- if (ctx.defaultStatement() != null) {
- BlockNode defaultBlock = new BlockNode();
- for (SimpleJavaParser.StatementContext stmtCtx : ctx.defaultStatement().statement()) {
- defaultBlock.addStatement((IStatementNode) visit(stmtCtx));
- }
- // Default als letztes Else Statement
- defaulElseNode = new ElseNode(defaultBlock);
- }
-
- IfElseNode ifElseNode = new IfElseNode(ifNodes.getFirst(),defaulElseNode);
- ifNodes.removeFirst();
-
- for (IfNode ifNode : ifNodes){
- ifElseNode.addElseIfStatement(ifNode);
- }
-
- return ifElseNode;
- }
-
@Override
public ASTNode visitAssign(SimpleJavaParser.AssignContext ctx) {
return new AssignNode((AssignableNode) visit(ctx.assignableExpression()), (IExpressionNode) visit(ctx.expression()));
diff --git a/src/main/java/parser/generated/SimpleJava.interp b/src/main/java/parser/generated/SimpleJava.interp
index 1426547..aca42bf 100644
--- a/src/main/java/parser/generated/SimpleJava.interp
+++ b/src/main/java/parser/generated/SimpleJava.interp
@@ -43,10 +43,6 @@ null
'for'
'return'
'new'
-'switch'
-'case'
-'default'
-':'
null
null
null
@@ -101,10 +97,6 @@ Else
For
Return
New
-Switch
-Case
-Default
-Colon
CharValue
IntValue
BooleanValue
@@ -135,9 +127,6 @@ ifElseStatement
ifStatement
elseIfStatement
elseStatement
-switchStatement
-caseStatement
-defaultStatement
statementExpression
assign
newDeclaration
@@ -167,4 +156,4 @@ nonCalculationOperator
atn:
-[4, 1, 55, 458, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 1, 0, 4, 0, 100, 8, 0, 11, 0, 12, 0, 101, 1, 1, 3, 1, 105, 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 111, 8, 1, 10, 1, 12, 1, 114, 9, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 3, 2, 121, 8, 2, 1, 3, 3, 3, 124, 8, 3, 1, 3, 1, 3, 1, 3, 3, 3, 129, 8, 3, 1, 3, 1, 3, 1, 3, 1, 4, 3, 4, 135, 8, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 3, 5, 144, 8, 5, 1, 5, 1, 5, 3, 5, 148, 8, 5, 1, 5, 1, 5, 1, 5, 3, 5, 153, 8, 5, 1, 5, 1, 5, 3, 5, 157, 8, 5, 1, 6, 1, 6, 1, 6, 5, 6, 162, 8, 6, 10, 6, 12, 6, 165, 9, 6, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 5, 8, 173, 8, 8, 10, 8, 12, 8, 176, 9, 8, 3, 8, 178, 8, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 3, 9, 195, 8, 9, 1, 10, 1, 10, 5, 10, 199, 8, 10, 10, 10, 12, 10, 202, 9, 10, 1, 10, 1, 10, 1, 11, 1, 11, 3, 11, 208, 8, 11, 1, 12, 1, 12, 1, 12, 1, 12, 3, 12, 214, 8, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 3, 15, 234, 8, 15, 1, 15, 1, 15, 3, 15, 238, 8, 15, 1, 15, 1, 15, 3, 15, 242, 8, 15, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 5, 16, 249, 8, 16, 10, 16, 12, 16, 252, 9, 16, 1, 16, 3, 16, 255, 8, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 4, 20, 279, 8, 20, 11, 20, 12, 20, 280, 1, 20, 3, 20, 284, 8, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 21, 5, 21, 292, 8, 21, 10, 21, 12, 21, 295, 9, 21, 1, 22, 1, 22, 1, 22, 5, 22, 300, 8, 22, 10, 22, 12, 22, 303, 9, 22, 1, 23, 1, 23, 1, 23, 1, 23, 3, 23, 309, 8, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 3, 26, 323, 8, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 3, 27, 335, 8, 27, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 3, 29, 342, 8, 29, 1, 30, 1, 30, 3, 30, 346, 8, 30, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 3, 33, 356, 8, 33, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 36, 1, 36, 3, 36, 366, 8, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 3, 37, 373, 8, 37, 1, 37, 1, 37, 4, 37, 377, 8, 37, 11, 37, 12, 37, 378, 1, 37, 3, 37, 382, 8, 37, 1, 38, 1, 38, 3, 38, 386, 8, 38, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 5, 39, 394, 8, 39, 10, 39, 12, 39, 397, 9, 39, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 5, 40, 405, 8, 40, 10, 40, 12, 40, 408, 9, 40, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 3, 41, 418, 8, 41, 1, 42, 1, 42, 1, 42, 1, 42, 1, 43, 3, 43, 425, 8, 43, 1, 43, 5, 43, 428, 8, 43, 10, 43, 12, 43, 431, 9, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 44, 1, 44, 1, 44, 1, 44, 3, 44, 442, 8, 44, 1, 44, 1, 44, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 46, 1, 46, 1, 47, 1, 47, 1, 48, 1, 48, 1, 48, 0, 2, 78, 80, 49, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 0, 3, 2, 0, 4, 6, 52, 52, 1, 0, 48, 51, 1, 0, 11, 12, 471, 0, 99, 1, 0, 0, 0, 2, 104, 1, 0, 0, 0, 4, 120, 1, 0, 0, 0, 6, 123, 1, 0, 0, 0, 8, 134, 1, 0, 0, 0, 10, 156, 1, 0, 0, 0, 12, 158, 1, 0, 0, 0, 14, 166, 1, 0, 0, 0, 16, 177, 1, 0, 0, 0, 18, 194, 1, 0, 0, 0, 20, 196, 1, 0, 0, 0, 22, 205, 1, 0, 0, 0, 24, 209, 1, 0, 0, 0, 26, 215, 1, 0, 0, 0, 28, 221, 1, 0, 0, 0, 30, 229, 1, 0, 0, 0, 32, 246, 1, 0, 0, 0, 34, 256, 1, 0, 0, 0, 36, 262, 1, 0, 0, 0, 38, 269, 1, 0, 0, 0, 40, 272, 1, 0, 0, 0, 42, 287, 1, 0, 0, 0, 44, 296, 1, 0, 0, 0, 46, 308, 1, 0, 0, 0, 48, 310, 1, 0, 0, 0, 50, 314, 1, 0, 0, 0, 52, 322, 1, 0, 0, 0, 54, 334, 1, 0, 0, 0, 56, 336, 1, 0, 0, 0, 58, 341, 1, 0, 0, 0, 60, 345, 1, 0, 0, 0, 62, 347, 1, 0, 0, 0, 64, 350, 1, 0, 0, 0, 66, 355, 1, 0, 0, 0, 68, 357, 1, 0, 0, 0, 70, 360, 1, 0, 0, 0, 72, 365, 1, 0, 0, 0, 74, 381, 1, 0, 0, 0, 76, 385, 1, 0, 0, 0, 78, 387, 1, 0, 0, 0, 80, 398, 1, 0, 0, 0, 82, 417, 1, 0, 0, 0, 84, 419, 1, 0, 0, 0, 86, 424, 1, 0, 0, 0, 88, 441, 1, 0, 0, 0, 90, 445, 1, 0, 0, 0, 92, 451, 1, 0, 0, 0, 94, 453, 1, 0, 0, 0, 96, 455, 1, 0, 0, 0, 98, 100, 3, 2, 1, 0, 99, 98, 1, 0, 0, 0, 100, 101, 1, 0, 0, 0, 101, 99, 1, 0, 0, 0, 101, 102, 1, 0, 0, 0, 102, 1, 1, 0, 0, 0, 103, 105, 5, 7, 0, 0, 104, 103, 1, 0, 0, 0, 104, 105, 1, 0, 0, 0, 105, 106, 1, 0, 0, 0, 106, 107, 5, 35, 0, 0, 107, 108, 5, 52, 0, 0, 108, 112, 5, 31, 0, 0, 109, 111, 3, 4, 2, 0, 110, 109, 1, 0, 0, 0, 111, 114, 1, 0, 0, 0, 112, 110, 1, 0, 0, 0, 112, 113, 1, 0, 0, 0, 113, 115, 1, 0, 0, 0, 114, 112, 1, 0, 0, 0, 115, 116, 5, 32, 0, 0, 116, 3, 1, 0, 0, 0, 117, 121, 3, 6, 3, 0, 118, 121, 3, 8, 4, 0, 119, 121, 3, 10, 5, 0, 120, 117, 1, 0, 0, 0, 120, 118, 1, 0, 0, 0, 120, 119, 1, 0, 0, 0, 121, 5, 1, 0, 0, 0, 122, 124, 5, 7, 0, 0, 123, 122, 1, 0, 0, 0, 123, 124, 1, 0, 0, 0, 124, 125, 1, 0, 0, 0, 125, 126, 5, 52, 0, 0, 126, 128, 5, 29, 0, 0, 127, 129, 3, 12, 6, 0, 128, 127, 1, 0, 0, 0, 128, 129, 1, 0, 0, 0, 129, 130, 1, 0, 0, 0, 130, 131, 5, 30, 0, 0, 131, 132, 3, 20, 10, 0, 132, 7, 1, 0, 0, 0, 133, 135, 5, 7, 0, 0, 134, 133, 1, 0, 0, 0, 134, 135, 1, 0, 0, 0, 135, 136, 1, 0, 0, 0, 136, 137, 3, 92, 46, 0, 137, 138, 5, 52, 0, 0, 138, 139, 5, 33, 0, 0, 139, 9, 1, 0, 0, 0, 140, 141, 5, 8, 0, 0, 141, 157, 3, 20, 10, 0, 142, 144, 5, 7, 0, 0, 143, 142, 1, 0, 0, 0, 143, 144, 1, 0, 0, 0, 144, 147, 1, 0, 0, 0, 145, 148, 3, 92, 46, 0, 146, 148, 5, 3, 0, 0, 147, 145, 1, 0, 0, 0, 147, 146, 1, 0, 0, 0, 148, 149, 1, 0, 0, 0, 149, 150, 5, 52, 0, 0, 150, 152, 5, 29, 0, 0, 151, 153, 3, 12, 6, 0, 152, 151, 1, 0, 0, 0, 152, 153, 1, 0, 0, 0, 153, 154, 1, 0, 0, 0, 154, 155, 5, 30, 0, 0, 155, 157, 3, 20, 10, 0, 156, 140, 1, 0, 0, 0, 156, 143, 1, 0, 0, 0, 157, 11, 1, 0, 0, 0, 158, 163, 3, 14, 7, 0, 159, 160, 5, 34, 0, 0, 160, 162, 3, 14, 7, 0, 161, 159, 1, 0, 0, 0, 162, 165, 1, 0, 0, 0, 163, 161, 1, 0, 0, 0, 163, 164, 1, 0, 0, 0, 164, 13, 1, 0, 0, 0, 165, 163, 1, 0, 0, 0, 166, 167, 3, 92, 46, 0, 167, 168, 5, 52, 0, 0, 168, 15, 1, 0, 0, 0, 169, 174, 3, 52, 26, 0, 170, 171, 5, 34, 0, 0, 171, 173, 3, 52, 26, 0, 172, 170, 1, 0, 0, 0, 173, 176, 1, 0, 0, 0, 174, 172, 1, 0, 0, 0, 174, 175, 1, 0, 0, 0, 175, 178, 1, 0, 0, 0, 176, 174, 1, 0, 0, 0, 177, 169, 1, 0, 0, 0, 177, 178, 1, 0, 0, 0, 178, 17, 1, 0, 0, 0, 179, 180, 3, 22, 11, 0, 180, 181, 5, 33, 0, 0, 181, 195, 1, 0, 0, 0, 182, 183, 3, 24, 12, 0, 183, 184, 5, 33, 0, 0, 184, 195, 1, 0, 0, 0, 185, 195, 3, 20, 10, 0, 186, 195, 3, 26, 13, 0, 187, 195, 3, 28, 14, 0, 188, 195, 3, 30, 15, 0, 189, 195, 3, 32, 16, 0, 190, 195, 3, 40, 20, 0, 191, 192, 3, 46, 23, 0, 192, 193, 5, 33, 0, 0, 193, 195, 1, 0, 0, 0, 194, 179, 1, 0, 0, 0, 194, 182, 1, 0, 0, 0, 194, 185, 1, 0, 0, 0, 194, 186, 1, 0, 0, 0, 194, 187, 1, 0, 0, 0, 194, 188, 1, 0, 0, 0, 194, 189, 1, 0, 0, 0, 194, 190, 1, 0, 0, 0, 194, 191, 1, 0, 0, 0, 195, 19, 1, 0, 0, 0, 196, 200, 5, 31, 0, 0, 197, 199, 3, 18, 9, 0, 198, 197, 1, 0, 0, 0, 199, 202, 1, 0, 0, 0, 200, 198, 1, 0, 0, 0, 200, 201, 1, 0, 0, 0, 201, 203, 1, 0, 0, 0, 202, 200, 1, 0, 0, 0, 203, 204, 5, 32, 0, 0, 204, 21, 1, 0, 0, 0, 205, 207, 5, 42, 0, 0, 206, 208, 3, 52, 26, 0, 207, 206, 1, 0, 0, 0, 207, 208, 1, 0, 0, 0, 208, 23, 1, 0, 0, 0, 209, 210, 3, 92, 46, 0, 210, 213, 5, 52, 0, 0, 211, 212, 5, 13, 0, 0, 212, 214, 3, 52, 26, 0, 213, 211, 1, 0, 0, 0, 213, 214, 1, 0, 0, 0, 214, 25, 1, 0, 0, 0, 215, 216, 5, 37, 0, 0, 216, 217, 5, 29, 0, 0, 217, 218, 3, 52, 26, 0, 218, 219, 5, 30, 0, 0, 219, 220, 3, 20, 10, 0, 220, 27, 1, 0, 0, 0, 221, 222, 5, 38, 0, 0, 222, 223, 3, 20, 10, 0, 223, 224, 5, 37, 0, 0, 224, 225, 5, 29, 0, 0, 225, 226, 3, 52, 26, 0, 226, 227, 5, 30, 0, 0, 227, 228, 5, 33, 0, 0, 228, 29, 1, 0, 0, 0, 229, 230, 5, 41, 0, 0, 230, 233, 5, 29, 0, 0, 231, 234, 3, 46, 23, 0, 232, 234, 3, 24, 12, 0, 233, 231, 1, 0, 0, 0, 233, 232, 1, 0, 0, 0, 234, 235, 1, 0, 0, 0, 235, 237, 5, 33, 0, 0, 236, 238, 3, 52, 26, 0, 237, 236, 1, 0, 0, 0, 237, 238, 1, 0, 0, 0, 238, 239, 1, 0, 0, 0, 239, 241, 5, 33, 0, 0, 240, 242, 3, 46, 23, 0, 241, 240, 1, 0, 0, 0, 241, 242, 1, 0, 0, 0, 242, 243, 1, 0, 0, 0, 243, 244, 5, 30, 0, 0, 244, 245, 3, 20, 10, 0, 245, 31, 1, 0, 0, 0, 246, 250, 3, 34, 17, 0, 247, 249, 3, 36, 18, 0, 248, 247, 1, 0, 0, 0, 249, 252, 1, 0, 0, 0, 250, 248, 1, 0, 0, 0, 250, 251, 1, 0, 0, 0, 251, 254, 1, 0, 0, 0, 252, 250, 1, 0, 0, 0, 253, 255, 3, 38, 19, 0, 254, 253, 1, 0, 0, 0, 254, 255, 1, 0, 0, 0, 255, 33, 1, 0, 0, 0, 256, 257, 5, 39, 0, 0, 257, 258, 5, 29, 0, 0, 258, 259, 3, 52, 26, 0, 259, 260, 5, 30, 0, 0, 260, 261, 3, 20, 10, 0, 261, 35, 1, 0, 0, 0, 262, 263, 5, 40, 0, 0, 263, 264, 5, 39, 0, 0, 264, 265, 5, 29, 0, 0, 265, 266, 3, 52, 26, 0, 266, 267, 5, 30, 0, 0, 267, 268, 3, 20, 10, 0, 268, 37, 1, 0, 0, 0, 269, 270, 5, 40, 0, 0, 270, 271, 3, 20, 10, 0, 271, 39, 1, 0, 0, 0, 272, 273, 5, 44, 0, 0, 273, 274, 5, 29, 0, 0, 274, 275, 3, 52, 26, 0, 275, 276, 5, 30, 0, 0, 276, 278, 5, 31, 0, 0, 277, 279, 3, 42, 21, 0, 278, 277, 1, 0, 0, 0, 279, 280, 1, 0, 0, 0, 280, 278, 1, 0, 0, 0, 280, 281, 1, 0, 0, 0, 281, 283, 1, 0, 0, 0, 282, 284, 3, 44, 22, 0, 283, 282, 1, 0, 0, 0, 283, 284, 1, 0, 0, 0, 284, 285, 1, 0, 0, 0, 285, 286, 5, 32, 0, 0, 286, 41, 1, 0, 0, 0, 287, 288, 5, 45, 0, 0, 288, 289, 3, 94, 47, 0, 289, 293, 5, 47, 0, 0, 290, 292, 3, 18, 9, 0, 291, 290, 1, 0, 0, 0, 292, 295, 1, 0, 0, 0, 293, 291, 1, 0, 0, 0, 293, 294, 1, 0, 0, 0, 294, 43, 1, 0, 0, 0, 295, 293, 1, 0, 0, 0, 296, 297, 5, 46, 0, 0, 297, 301, 5, 47, 0, 0, 298, 300, 3, 18, 9, 0, 299, 298, 1, 0, 0, 0, 300, 303, 1, 0, 0, 0, 301, 299, 1, 0, 0, 0, 301, 302, 1, 0, 0, 0, 302, 45, 1, 0, 0, 0, 303, 301, 1, 0, 0, 0, 304, 309, 3, 48, 24, 0, 305, 309, 3, 50, 25, 0, 306, 309, 3, 86, 43, 0, 307, 309, 3, 58, 29, 0, 308, 304, 1, 0, 0, 0, 308, 305, 1, 0, 0, 0, 308, 306, 1, 0, 0, 0, 308, 307, 1, 0, 0, 0, 309, 47, 1, 0, 0, 0, 310, 311, 3, 72, 36, 0, 311, 312, 5, 13, 0, 0, 312, 313, 3, 52, 26, 0, 313, 49, 1, 0, 0, 0, 314, 315, 5, 43, 0, 0, 315, 316, 5, 52, 0, 0, 316, 317, 5, 29, 0, 0, 317, 318, 3, 16, 8, 0, 318, 319, 5, 30, 0, 0, 319, 51, 1, 0, 0, 0, 320, 323, 3, 54, 27, 0, 321, 323, 3, 76, 38, 0, 322, 320, 1, 0, 0, 0, 322, 321, 1, 0, 0, 0, 323, 53, 1, 0, 0, 0, 324, 335, 5, 36, 0, 0, 325, 335, 5, 52, 0, 0, 326, 335, 3, 74, 37, 0, 327, 335, 3, 94, 47, 0, 328, 335, 3, 56, 28, 0, 329, 335, 3, 46, 23, 0, 330, 331, 5, 29, 0, 0, 331, 332, 3, 52, 26, 0, 332, 333, 5, 30, 0, 0, 333, 335, 1, 0, 0, 0, 334, 324, 1, 0, 0, 0, 334, 325, 1, 0, 0, 0, 334, 326, 1, 0, 0, 0, 334, 327, 1, 0, 0, 0, 334, 328, 1, 0, 0, 0, 334, 329, 1, 0, 0, 0, 334, 330, 1, 0, 0, 0, 335, 55, 1, 0, 0, 0, 336, 337, 5, 25, 0, 0, 337, 338, 3, 52, 26, 0, 338, 57, 1, 0, 0, 0, 339, 342, 3, 60, 30, 0, 340, 342, 3, 66, 33, 0, 341, 339, 1, 0, 0, 0, 341, 340, 1, 0, 0, 0, 342, 59, 1, 0, 0, 0, 343, 346, 3, 62, 31, 0, 344, 346, 3, 64, 32, 0, 345, 343, 1, 0, 0, 0, 345, 344, 1, 0, 0, 0, 346, 61, 1, 0, 0, 0, 347, 348, 5, 1, 0, 0, 348, 349, 3, 72, 36, 0, 349, 63, 1, 0, 0, 0, 350, 351, 3, 72, 36, 0, 351, 352, 5, 1, 0, 0, 352, 65, 1, 0, 0, 0, 353, 356, 3, 68, 34, 0, 354, 356, 3, 70, 35, 0, 355, 353, 1, 0, 0, 0, 355, 354, 1, 0, 0, 0, 356, 67, 1, 0, 0, 0, 357, 358, 5, 2, 0, 0, 358, 359, 3, 72, 36, 0, 359, 69, 1, 0, 0, 0, 360, 361, 3, 72, 36, 0, 361, 362, 5, 2, 0, 0, 362, 71, 1, 0, 0, 0, 363, 366, 5, 52, 0, 0, 364, 366, 3, 74, 37, 0, 365, 363, 1, 0, 0, 0, 365, 364, 1, 0, 0, 0, 366, 73, 1, 0, 0, 0, 367, 368, 5, 36, 0, 0, 368, 369, 5, 28, 0, 0, 369, 382, 5, 52, 0, 0, 370, 371, 5, 36, 0, 0, 371, 373, 5, 28, 0, 0, 372, 370, 1, 0, 0, 0, 372, 373, 1, 0, 0, 0, 373, 376, 1, 0, 0, 0, 374, 375, 5, 52, 0, 0, 375, 377, 5, 28, 0, 0, 376, 374, 1, 0, 0, 0, 377, 378, 1, 0, 0, 0, 378, 376, 1, 0, 0, 0, 378, 379, 1, 0, 0, 0, 379, 380, 1, 0, 0, 0, 380, 382, 5, 52, 0, 0, 381, 367, 1, 0, 0, 0, 381, 372, 1, 0, 0, 0, 382, 75, 1, 0, 0, 0, 383, 386, 3, 78, 39, 0, 384, 386, 3, 84, 42, 0, 385, 383, 1, 0, 0, 0, 385, 384, 1, 0, 0, 0, 386, 77, 1, 0, 0, 0, 387, 388, 6, 39, -1, 0, 388, 389, 3, 80, 40, 0, 389, 395, 1, 0, 0, 0, 390, 391, 10, 2, 0, 0, 391, 392, 5, 10, 0, 0, 392, 394, 3, 80, 40, 0, 393, 390, 1, 0, 0, 0, 394, 397, 1, 0, 0, 0, 395, 393, 1, 0, 0, 0, 395, 396, 1, 0, 0, 0, 396, 79, 1, 0, 0, 0, 397, 395, 1, 0, 0, 0, 398, 399, 6, 40, -1, 0, 399, 400, 3, 82, 41, 0, 400, 406, 1, 0, 0, 0, 401, 402, 10, 2, 0, 0, 402, 403, 5, 9, 0, 0, 403, 405, 3, 82, 41, 0, 404, 401, 1, 0, 0, 0, 405, 408, 1, 0, 0, 0, 406, 404, 1, 0, 0, 0, 406, 407, 1, 0, 0, 0, 407, 81, 1, 0, 0, 0, 408, 406, 1, 0, 0, 0, 409, 418, 5, 49, 0, 0, 410, 418, 5, 52, 0, 0, 411, 418, 3, 74, 37, 0, 412, 413, 3, 86, 43, 0, 413, 414, 5, 29, 0, 0, 414, 415, 3, 78, 39, 0, 415, 416, 5, 30, 0, 0, 416, 418, 1, 0, 0, 0, 417, 409, 1, 0, 0, 0, 417, 410, 1, 0, 0, 0, 417, 411, 1, 0, 0, 0, 417, 412, 1, 0, 0, 0, 418, 83, 1, 0, 0, 0, 419, 420, 3, 54, 27, 0, 420, 421, 3, 96, 48, 0, 421, 422, 3, 52, 26, 0, 422, 85, 1, 0, 0, 0, 423, 425, 3, 88, 44, 0, 424, 423, 1, 0, 0, 0, 424, 425, 1, 0, 0, 0, 425, 429, 1, 0, 0, 0, 426, 428, 3, 90, 45, 0, 427, 426, 1, 0, 0, 0, 428, 431, 1, 0, 0, 0, 429, 427, 1, 0, 0, 0, 429, 430, 1, 0, 0, 0, 430, 432, 1, 0, 0, 0, 431, 429, 1, 0, 0, 0, 432, 433, 5, 52, 0, 0, 433, 434, 5, 29, 0, 0, 434, 435, 3, 16, 8, 0, 435, 436, 5, 30, 0, 0, 436, 87, 1, 0, 0, 0, 437, 442, 5, 36, 0, 0, 438, 442, 3, 74, 37, 0, 439, 442, 3, 50, 25, 0, 440, 442, 5, 52, 0, 0, 441, 437, 1, 0, 0, 0, 441, 438, 1, 0, 0, 0, 441, 439, 1, 0, 0, 0, 441, 440, 1, 0, 0, 0, 442, 443, 1, 0, 0, 0, 443, 444, 5, 28, 0, 0, 444, 89, 1, 0, 0, 0, 445, 446, 5, 52, 0, 0, 446, 447, 5, 29, 0, 0, 447, 448, 3, 16, 8, 0, 448, 449, 5, 30, 0, 0, 449, 450, 5, 28, 0, 0, 450, 91, 1, 0, 0, 0, 451, 452, 7, 0, 0, 0, 452, 93, 1, 0, 0, 0, 453, 454, 7, 1, 0, 0, 454, 95, 1, 0, 0, 0, 455, 456, 7, 2, 0, 0, 456, 97, 1, 0, 0, 0, 44, 101, 104, 112, 120, 123, 128, 134, 143, 147, 152, 156, 163, 174, 177, 194, 200, 207, 213, 233, 237, 241, 250, 254, 280, 283, 293, 301, 308, 322, 334, 341, 345, 355, 365, 372, 378, 381, 385, 395, 406, 417, 424, 429, 441]
\ No newline at end of file
+[4, 1, 51, 419, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 1, 0, 4, 0, 94, 8, 0, 11, 0, 12, 0, 95, 1, 1, 3, 1, 99, 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 105, 8, 1, 10, 1, 12, 1, 108, 9, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 3, 2, 115, 8, 2, 1, 3, 3, 3, 118, 8, 3, 1, 3, 1, 3, 1, 3, 3, 3, 123, 8, 3, 1, 3, 1, 3, 1, 3, 1, 4, 3, 4, 129, 8, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 3, 5, 138, 8, 5, 1, 5, 1, 5, 3, 5, 142, 8, 5, 1, 5, 1, 5, 1, 5, 3, 5, 147, 8, 5, 1, 5, 1, 5, 3, 5, 151, 8, 5, 1, 6, 1, 6, 1, 6, 5, 6, 156, 8, 6, 10, 6, 12, 6, 159, 9, 6, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 5, 8, 167, 8, 8, 10, 8, 12, 8, 170, 9, 8, 3, 8, 172, 8, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 3, 9, 188, 8, 9, 1, 10, 1, 10, 5, 10, 192, 8, 10, 10, 10, 12, 10, 195, 9, 10, 1, 10, 1, 10, 1, 11, 1, 11, 3, 11, 201, 8, 11, 1, 12, 1, 12, 1, 12, 1, 12, 3, 12, 207, 8, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 3, 15, 227, 8, 15, 1, 15, 1, 15, 3, 15, 231, 8, 15, 1, 15, 1, 15, 3, 15, 235, 8, 15, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 5, 16, 242, 8, 16, 10, 16, 12, 16, 245, 9, 16, 1, 16, 3, 16, 248, 8, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, 3, 20, 270, 8, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 3, 23, 284, 8, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 3, 24, 296, 8, 24, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 3, 26, 303, 8, 26, 1, 27, 1, 27, 3, 27, 307, 8, 27, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 3, 30, 317, 8, 30, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 3, 33, 327, 8, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 334, 8, 34, 1, 34, 1, 34, 4, 34, 338, 8, 34, 11, 34, 12, 34, 339, 1, 34, 3, 34, 343, 8, 34, 1, 35, 1, 35, 3, 35, 347, 8, 35, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 5, 36, 355, 8, 36, 10, 36, 12, 36, 358, 9, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 5, 37, 366, 8, 37, 10, 37, 12, 37, 369, 9, 37, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 3, 38, 379, 8, 38, 1, 39, 1, 39, 1, 39, 1, 39, 1, 40, 3, 40, 386, 8, 40, 1, 40, 5, 40, 389, 8, 40, 10, 40, 12, 40, 392, 9, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 41, 1, 41, 1, 41, 1, 41, 3, 41, 403, 8, 41, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 43, 1, 43, 1, 44, 1, 44, 1, 45, 1, 45, 1, 45, 0, 2, 72, 74, 46, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 0, 3, 2, 0, 4, 6, 48, 48, 1, 0, 44, 47, 1, 0, 11, 12, 430, 0, 93, 1, 0, 0, 0, 2, 98, 1, 0, 0, 0, 4, 114, 1, 0, 0, 0, 6, 117, 1, 0, 0, 0, 8, 128, 1, 0, 0, 0, 10, 150, 1, 0, 0, 0, 12, 152, 1, 0, 0, 0, 14, 160, 1, 0, 0, 0, 16, 171, 1, 0, 0, 0, 18, 187, 1, 0, 0, 0, 20, 189, 1, 0, 0, 0, 22, 198, 1, 0, 0, 0, 24, 202, 1, 0, 0, 0, 26, 208, 1, 0, 0, 0, 28, 214, 1, 0, 0, 0, 30, 222, 1, 0, 0, 0, 32, 239, 1, 0, 0, 0, 34, 249, 1, 0, 0, 0, 36, 255, 1, 0, 0, 0, 38, 262, 1, 0, 0, 0, 40, 269, 1, 0, 0, 0, 42, 271, 1, 0, 0, 0, 44, 275, 1, 0, 0, 0, 46, 283, 1, 0, 0, 0, 48, 295, 1, 0, 0, 0, 50, 297, 1, 0, 0, 0, 52, 302, 1, 0, 0, 0, 54, 306, 1, 0, 0, 0, 56, 308, 1, 0, 0, 0, 58, 311, 1, 0, 0, 0, 60, 316, 1, 0, 0, 0, 62, 318, 1, 0, 0, 0, 64, 321, 1, 0, 0, 0, 66, 326, 1, 0, 0, 0, 68, 342, 1, 0, 0, 0, 70, 346, 1, 0, 0, 0, 72, 348, 1, 0, 0, 0, 74, 359, 1, 0, 0, 0, 76, 378, 1, 0, 0, 0, 78, 380, 1, 0, 0, 0, 80, 385, 1, 0, 0, 0, 82, 402, 1, 0, 0, 0, 84, 406, 1, 0, 0, 0, 86, 412, 1, 0, 0, 0, 88, 414, 1, 0, 0, 0, 90, 416, 1, 0, 0, 0, 92, 94, 3, 2, 1, 0, 93, 92, 1, 0, 0, 0, 94, 95, 1, 0, 0, 0, 95, 93, 1, 0, 0, 0, 95, 96, 1, 0, 0, 0, 96, 1, 1, 0, 0, 0, 97, 99, 5, 7, 0, 0, 98, 97, 1, 0, 0, 0, 98, 99, 1, 0, 0, 0, 99, 100, 1, 0, 0, 0, 100, 101, 5, 35, 0, 0, 101, 102, 5, 48, 0, 0, 102, 106, 5, 31, 0, 0, 103, 105, 3, 4, 2, 0, 104, 103, 1, 0, 0, 0, 105, 108, 1, 0, 0, 0, 106, 104, 1, 0, 0, 0, 106, 107, 1, 0, 0, 0, 107, 109, 1, 0, 0, 0, 108, 106, 1, 0, 0, 0, 109, 110, 5, 32, 0, 0, 110, 3, 1, 0, 0, 0, 111, 115, 3, 6, 3, 0, 112, 115, 3, 8, 4, 0, 113, 115, 3, 10, 5, 0, 114, 111, 1, 0, 0, 0, 114, 112, 1, 0, 0, 0, 114, 113, 1, 0, 0, 0, 115, 5, 1, 0, 0, 0, 116, 118, 5, 7, 0, 0, 117, 116, 1, 0, 0, 0, 117, 118, 1, 0, 0, 0, 118, 119, 1, 0, 0, 0, 119, 120, 5, 48, 0, 0, 120, 122, 5, 29, 0, 0, 121, 123, 3, 12, 6, 0, 122, 121, 1, 0, 0, 0, 122, 123, 1, 0, 0, 0, 123, 124, 1, 0, 0, 0, 124, 125, 5, 30, 0, 0, 125, 126, 3, 20, 10, 0, 126, 7, 1, 0, 0, 0, 127, 129, 5, 7, 0, 0, 128, 127, 1, 0, 0, 0, 128, 129, 1, 0, 0, 0, 129, 130, 1, 0, 0, 0, 130, 131, 3, 86, 43, 0, 131, 132, 5, 48, 0, 0, 132, 133, 5, 33, 0, 0, 133, 9, 1, 0, 0, 0, 134, 135, 5, 8, 0, 0, 135, 151, 3, 20, 10, 0, 136, 138, 5, 7, 0, 0, 137, 136, 1, 0, 0, 0, 137, 138, 1, 0, 0, 0, 138, 141, 1, 0, 0, 0, 139, 142, 3, 86, 43, 0, 140, 142, 5, 3, 0, 0, 141, 139, 1, 0, 0, 0, 141, 140, 1, 0, 0, 0, 142, 143, 1, 0, 0, 0, 143, 144, 5, 48, 0, 0, 144, 146, 5, 29, 0, 0, 145, 147, 3, 12, 6, 0, 146, 145, 1, 0, 0, 0, 146, 147, 1, 0, 0, 0, 147, 148, 1, 0, 0, 0, 148, 149, 5, 30, 0, 0, 149, 151, 3, 20, 10, 0, 150, 134, 1, 0, 0, 0, 150, 137, 1, 0, 0, 0, 151, 11, 1, 0, 0, 0, 152, 157, 3, 14, 7, 0, 153, 154, 5, 34, 0, 0, 154, 156, 3, 14, 7, 0, 155, 153, 1, 0, 0, 0, 156, 159, 1, 0, 0, 0, 157, 155, 1, 0, 0, 0, 157, 158, 1, 0, 0, 0, 158, 13, 1, 0, 0, 0, 159, 157, 1, 0, 0, 0, 160, 161, 3, 86, 43, 0, 161, 162, 5, 48, 0, 0, 162, 15, 1, 0, 0, 0, 163, 168, 3, 46, 23, 0, 164, 165, 5, 34, 0, 0, 165, 167, 3, 46, 23, 0, 166, 164, 1, 0, 0, 0, 167, 170, 1, 0, 0, 0, 168, 166, 1, 0, 0, 0, 168, 169, 1, 0, 0, 0, 169, 172, 1, 0, 0, 0, 170, 168, 1, 0, 0, 0, 171, 163, 1, 0, 0, 0, 171, 172, 1, 0, 0, 0, 172, 17, 1, 0, 0, 0, 173, 174, 3, 22, 11, 0, 174, 175, 5, 33, 0, 0, 175, 188, 1, 0, 0, 0, 176, 177, 3, 24, 12, 0, 177, 178, 5, 33, 0, 0, 178, 188, 1, 0, 0, 0, 179, 188, 3, 20, 10, 0, 180, 188, 3, 26, 13, 0, 181, 188, 3, 28, 14, 0, 182, 188, 3, 30, 15, 0, 183, 188, 3, 32, 16, 0, 184, 185, 3, 40, 20, 0, 185, 186, 5, 33, 0, 0, 186, 188, 1, 0, 0, 0, 187, 173, 1, 0, 0, 0, 187, 176, 1, 0, 0, 0, 187, 179, 1, 0, 0, 0, 187, 180, 1, 0, 0, 0, 187, 181, 1, 0, 0, 0, 187, 182, 1, 0, 0, 0, 187, 183, 1, 0, 0, 0, 187, 184, 1, 0, 0, 0, 188, 19, 1, 0, 0, 0, 189, 193, 5, 31, 0, 0, 190, 192, 3, 18, 9, 0, 191, 190, 1, 0, 0, 0, 192, 195, 1, 0, 0, 0, 193, 191, 1, 0, 0, 0, 193, 194, 1, 0, 0, 0, 194, 196, 1, 0, 0, 0, 195, 193, 1, 0, 0, 0, 196, 197, 5, 32, 0, 0, 197, 21, 1, 0, 0, 0, 198, 200, 5, 42, 0, 0, 199, 201, 3, 46, 23, 0, 200, 199, 1, 0, 0, 0, 200, 201, 1, 0, 0, 0, 201, 23, 1, 0, 0, 0, 202, 203, 3, 86, 43, 0, 203, 206, 5, 48, 0, 0, 204, 205, 5, 13, 0, 0, 205, 207, 3, 46, 23, 0, 206, 204, 1, 0, 0, 0, 206, 207, 1, 0, 0, 0, 207, 25, 1, 0, 0, 0, 208, 209, 5, 37, 0, 0, 209, 210, 5, 29, 0, 0, 210, 211, 3, 46, 23, 0, 211, 212, 5, 30, 0, 0, 212, 213, 3, 20, 10, 0, 213, 27, 1, 0, 0, 0, 214, 215, 5, 38, 0, 0, 215, 216, 3, 20, 10, 0, 216, 217, 5, 37, 0, 0, 217, 218, 5, 29, 0, 0, 218, 219, 3, 46, 23, 0, 219, 220, 5, 30, 0, 0, 220, 221, 5, 33, 0, 0, 221, 29, 1, 0, 0, 0, 222, 223, 5, 41, 0, 0, 223, 226, 5, 29, 0, 0, 224, 227, 3, 40, 20, 0, 225, 227, 3, 24, 12, 0, 226, 224, 1, 0, 0, 0, 226, 225, 1, 0, 0, 0, 227, 228, 1, 0, 0, 0, 228, 230, 5, 33, 0, 0, 229, 231, 3, 46, 23, 0, 230, 229, 1, 0, 0, 0, 230, 231, 1, 0, 0, 0, 231, 232, 1, 0, 0, 0, 232, 234, 5, 33, 0, 0, 233, 235, 3, 40, 20, 0, 234, 233, 1, 0, 0, 0, 234, 235, 1, 0, 0, 0, 235, 236, 1, 0, 0, 0, 236, 237, 5, 30, 0, 0, 237, 238, 3, 20, 10, 0, 238, 31, 1, 0, 0, 0, 239, 243, 3, 34, 17, 0, 240, 242, 3, 36, 18, 0, 241, 240, 1, 0, 0, 0, 242, 245, 1, 0, 0, 0, 243, 241, 1, 0, 0, 0, 243, 244, 1, 0, 0, 0, 244, 247, 1, 0, 0, 0, 245, 243, 1, 0, 0, 0, 246, 248, 3, 38, 19, 0, 247, 246, 1, 0, 0, 0, 247, 248, 1, 0, 0, 0, 248, 33, 1, 0, 0, 0, 249, 250, 5, 39, 0, 0, 250, 251, 5, 29, 0, 0, 251, 252, 3, 46, 23, 0, 252, 253, 5, 30, 0, 0, 253, 254, 3, 20, 10, 0, 254, 35, 1, 0, 0, 0, 255, 256, 5, 40, 0, 0, 256, 257, 5, 39, 0, 0, 257, 258, 5, 29, 0, 0, 258, 259, 3, 46, 23, 0, 259, 260, 5, 30, 0, 0, 260, 261, 3, 20, 10, 0, 261, 37, 1, 0, 0, 0, 262, 263, 5, 40, 0, 0, 263, 264, 3, 20, 10, 0, 264, 39, 1, 0, 0, 0, 265, 270, 3, 42, 21, 0, 266, 270, 3, 44, 22, 0, 267, 270, 3, 80, 40, 0, 268, 270, 3, 52, 26, 0, 269, 265, 1, 0, 0, 0, 269, 266, 1, 0, 0, 0, 269, 267, 1, 0, 0, 0, 269, 268, 1, 0, 0, 0, 270, 41, 1, 0, 0, 0, 271, 272, 3, 66, 33, 0, 272, 273, 5, 13, 0, 0, 273, 274, 3, 46, 23, 0, 274, 43, 1, 0, 0, 0, 275, 276, 5, 43, 0, 0, 276, 277, 5, 48, 0, 0, 277, 278, 5, 29, 0, 0, 278, 279, 3, 16, 8, 0, 279, 280, 5, 30, 0, 0, 280, 45, 1, 0, 0, 0, 281, 284, 3, 48, 24, 0, 282, 284, 3, 70, 35, 0, 283, 281, 1, 0, 0, 0, 283, 282, 1, 0, 0, 0, 284, 47, 1, 0, 0, 0, 285, 296, 5, 36, 0, 0, 286, 296, 5, 48, 0, 0, 287, 296, 3, 68, 34, 0, 288, 296, 3, 88, 44, 0, 289, 296, 3, 50, 25, 0, 290, 296, 3, 40, 20, 0, 291, 292, 5, 29, 0, 0, 292, 293, 3, 46, 23, 0, 293, 294, 5, 30, 0, 0, 294, 296, 1, 0, 0, 0, 295, 285, 1, 0, 0, 0, 295, 286, 1, 0, 0, 0, 295, 287, 1, 0, 0, 0, 295, 288, 1, 0, 0, 0, 295, 289, 1, 0, 0, 0, 295, 290, 1, 0, 0, 0, 295, 291, 1, 0, 0, 0, 296, 49, 1, 0, 0, 0, 297, 298, 5, 25, 0, 0, 298, 299, 3, 46, 23, 0, 299, 51, 1, 0, 0, 0, 300, 303, 3, 54, 27, 0, 301, 303, 3, 60, 30, 0, 302, 300, 1, 0, 0, 0, 302, 301, 1, 0, 0, 0, 303, 53, 1, 0, 0, 0, 304, 307, 3, 56, 28, 0, 305, 307, 3, 58, 29, 0, 306, 304, 1, 0, 0, 0, 306, 305, 1, 0, 0, 0, 307, 55, 1, 0, 0, 0, 308, 309, 5, 1, 0, 0, 309, 310, 3, 66, 33, 0, 310, 57, 1, 0, 0, 0, 311, 312, 3, 66, 33, 0, 312, 313, 5, 1, 0, 0, 313, 59, 1, 0, 0, 0, 314, 317, 3, 62, 31, 0, 315, 317, 3, 64, 32, 0, 316, 314, 1, 0, 0, 0, 316, 315, 1, 0, 0, 0, 317, 61, 1, 0, 0, 0, 318, 319, 5, 2, 0, 0, 319, 320, 3, 66, 33, 0, 320, 63, 1, 0, 0, 0, 321, 322, 3, 66, 33, 0, 322, 323, 5, 2, 0, 0, 323, 65, 1, 0, 0, 0, 324, 327, 5, 48, 0, 0, 325, 327, 3, 68, 34, 0, 326, 324, 1, 0, 0, 0, 326, 325, 1, 0, 0, 0, 327, 67, 1, 0, 0, 0, 328, 329, 5, 36, 0, 0, 329, 330, 5, 28, 0, 0, 330, 343, 5, 48, 0, 0, 331, 332, 5, 36, 0, 0, 332, 334, 5, 28, 0, 0, 333, 331, 1, 0, 0, 0, 333, 334, 1, 0, 0, 0, 334, 337, 1, 0, 0, 0, 335, 336, 5, 48, 0, 0, 336, 338, 5, 28, 0, 0, 337, 335, 1, 0, 0, 0, 338, 339, 1, 0, 0, 0, 339, 337, 1, 0, 0, 0, 339, 340, 1, 0, 0, 0, 340, 341, 1, 0, 0, 0, 341, 343, 5, 48, 0, 0, 342, 328, 1, 0, 0, 0, 342, 333, 1, 0, 0, 0, 343, 69, 1, 0, 0, 0, 344, 347, 3, 72, 36, 0, 345, 347, 3, 78, 39, 0, 346, 344, 1, 0, 0, 0, 346, 345, 1, 0, 0, 0, 347, 71, 1, 0, 0, 0, 348, 349, 6, 36, -1, 0, 349, 350, 3, 74, 37, 0, 350, 356, 1, 0, 0, 0, 351, 352, 10, 2, 0, 0, 352, 353, 5, 10, 0, 0, 353, 355, 3, 74, 37, 0, 354, 351, 1, 0, 0, 0, 355, 358, 1, 0, 0, 0, 356, 354, 1, 0, 0, 0, 356, 357, 1, 0, 0, 0, 357, 73, 1, 0, 0, 0, 358, 356, 1, 0, 0, 0, 359, 360, 6, 37, -1, 0, 360, 361, 3, 76, 38, 0, 361, 367, 1, 0, 0, 0, 362, 363, 10, 2, 0, 0, 363, 364, 5, 9, 0, 0, 364, 366, 3, 76, 38, 0, 365, 362, 1, 0, 0, 0, 366, 369, 1, 0, 0, 0, 367, 365, 1, 0, 0, 0, 367, 368, 1, 0, 0, 0, 368, 75, 1, 0, 0, 0, 369, 367, 1, 0, 0, 0, 370, 379, 5, 45, 0, 0, 371, 379, 5, 48, 0, 0, 372, 379, 3, 68, 34, 0, 373, 374, 3, 80, 40, 0, 374, 375, 5, 29, 0, 0, 375, 376, 3, 72, 36, 0, 376, 377, 5, 30, 0, 0, 377, 379, 1, 0, 0, 0, 378, 370, 1, 0, 0, 0, 378, 371, 1, 0, 0, 0, 378, 372, 1, 0, 0, 0, 378, 373, 1, 0, 0, 0, 379, 77, 1, 0, 0, 0, 380, 381, 3, 48, 24, 0, 381, 382, 3, 90, 45, 0, 382, 383, 3, 46, 23, 0, 383, 79, 1, 0, 0, 0, 384, 386, 3, 82, 41, 0, 385, 384, 1, 0, 0, 0, 385, 386, 1, 0, 0, 0, 386, 390, 1, 0, 0, 0, 387, 389, 3, 84, 42, 0, 388, 387, 1, 0, 0, 0, 389, 392, 1, 0, 0, 0, 390, 388, 1, 0, 0, 0, 390, 391, 1, 0, 0, 0, 391, 393, 1, 0, 0, 0, 392, 390, 1, 0, 0, 0, 393, 394, 5, 48, 0, 0, 394, 395, 5, 29, 0, 0, 395, 396, 3, 16, 8, 0, 396, 397, 5, 30, 0, 0, 397, 81, 1, 0, 0, 0, 398, 403, 5, 36, 0, 0, 399, 403, 3, 68, 34, 0, 400, 403, 3, 44, 22, 0, 401, 403, 5, 48, 0, 0, 402, 398, 1, 0, 0, 0, 402, 399, 1, 0, 0, 0, 402, 400, 1, 0, 0, 0, 402, 401, 1, 0, 0, 0, 403, 404, 1, 0, 0, 0, 404, 405, 5, 28, 0, 0, 405, 83, 1, 0, 0, 0, 406, 407, 5, 48, 0, 0, 407, 408, 5, 29, 0, 0, 408, 409, 3, 16, 8, 0, 409, 410, 5, 30, 0, 0, 410, 411, 5, 28, 0, 0, 411, 85, 1, 0, 0, 0, 412, 413, 7, 0, 0, 0, 413, 87, 1, 0, 0, 0, 414, 415, 7, 1, 0, 0, 415, 89, 1, 0, 0, 0, 416, 417, 7, 2, 0, 0, 417, 91, 1, 0, 0, 0, 40, 95, 98, 106, 114, 117, 122, 128, 137, 141, 146, 150, 157, 168, 171, 187, 193, 200, 206, 226, 230, 234, 243, 247, 269, 283, 295, 302, 306, 316, 326, 333, 339, 342, 346, 356, 367, 378, 385, 390, 402]
\ No newline at end of file
diff --git a/src/main/java/parser/generated/SimpleJava.tokens b/src/main/java/parser/generated/SimpleJava.tokens
index ffe0902..71246c8 100644
--- a/src/main/java/parser/generated/SimpleJava.tokens
+++ b/src/main/java/parser/generated/SimpleJava.tokens
@@ -41,18 +41,14 @@ Else=40
For=41
Return=42
New=43
-Switch=44
-Case=45
-Default=46
-Colon=47
-CharValue=48
-IntValue=49
-BooleanValue=50
-NullValue=51
-Identifier=52
-WS=53
-InlineComment=54
-MultilineComment=55
+CharValue=44
+IntValue=45
+BooleanValue=46
+NullValue=47
+Identifier=48
+WS=49
+InlineComment=50
+MultilineComment=51
'++'=1
'--'=2
'void'=3
@@ -91,8 +87,4 @@ MultilineComment=55
'for'=41
'return'=42
'new'=43
-'switch'=44
-'case'=45
-'default'=46
-':'=47
-'null'=51
+'null'=47
diff --git a/src/main/java/parser/generated/SimpleJavaBaseListener.java b/src/main/java/parser/generated/SimpleJavaBaseListener.java
index 52e183c..eecc12f 100644
--- a/src/main/java/parser/generated/SimpleJavaBaseListener.java
+++ b/src/main/java/parser/generated/SimpleJavaBaseListener.java
@@ -252,42 +252,6 @@ public class SimpleJavaBaseListener implements SimpleJavaListener {
* The default implementation does nothing.
*/
@Override public void exitElseStatement(SimpleJavaParser.ElseStatementContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterSwitchStatement(SimpleJavaParser.SwitchStatementContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitSwitchStatement(SimpleJavaParser.SwitchStatementContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterCaseStatement(SimpleJavaParser.CaseStatementContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitCaseStatement(SimpleJavaParser.CaseStatementContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterDefaultStatement(SimpleJavaParser.DefaultStatementContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitDefaultStatement(SimpleJavaParser.DefaultStatementContext ctx) { }
/**
* {@inheritDoc}
*
diff --git a/src/main/java/parser/generated/SimpleJavaBaseVisitor.java b/src/main/java/parser/generated/SimpleJavaBaseVisitor.java
index 9eb8ace..b3a6029 100644
--- a/src/main/java/parser/generated/SimpleJavaBaseVisitor.java
+++ b/src/main/java/parser/generated/SimpleJavaBaseVisitor.java
@@ -152,27 +152,6 @@ public class SimpleJavaBaseVisitor extends AbstractParseTreeVisitor implem
* {@link #visitChildren} on {@code ctx}.
*/
@Override public T visitElseStatement(SimpleJavaParser.ElseStatementContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitSwitchStatement(SimpleJavaParser.SwitchStatementContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitCaseStatement(SimpleJavaParser.CaseStatementContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitDefaultStatement(SimpleJavaParser.DefaultStatementContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
diff --git a/src/main/java/parser/generated/SimpleJavaLexer.interp b/src/main/java/parser/generated/SimpleJavaLexer.interp
index 3338105..61f0ce5 100644
--- a/src/main/java/parser/generated/SimpleJavaLexer.interp
+++ b/src/main/java/parser/generated/SimpleJavaLexer.interp
@@ -43,10 +43,6 @@ null
'for'
'return'
'new'
-'switch'
-'case'
-'default'
-':'
null
null
null
@@ -101,10 +97,6 @@ Else
For
Return
New
-Switch
-Case
-Default
-Colon
CharValue
IntValue
BooleanValue
@@ -158,10 +150,6 @@ Else
For
Return
New
-Switch
-Case
-Default
-Colon
CharValue
IntValue
BooleanValue
@@ -182,4 +170,4 @@ mode names:
DEFAULT_MODE
atn:
-[4, 0, 55, 443, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 3, 6, 186, 8, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 3, 8, 230, 8, 8, 1, 9, 1, 9, 3, 9, 234, 8, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 3, 10, 242, 8, 10, 1, 11, 1, 11, 3, 11, 246, 8, 11, 1, 12, 1, 12, 1, 13, 1, 13, 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, 20, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 28, 1, 28, 1, 29, 1, 29, 1, 30, 1, 30, 1, 31, 1, 31, 1, 32, 1, 32, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 40, 1, 40, 1, 40, 1, 40, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 1, 42, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 46, 1, 46, 1, 47, 1, 47, 5, 47, 365, 8, 47, 10, 47, 12, 47, 368, 9, 47, 1, 47, 1, 47, 1, 48, 3, 48, 373, 8, 48, 1, 48, 4, 48, 376, 8, 48, 11, 48, 12, 48, 377, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 3, 49, 389, 8, 49, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 51, 1, 51, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 3, 53, 403, 8, 53, 1, 54, 1, 54, 5, 54, 407, 8, 54, 10, 54, 12, 54, 410, 9, 54, 1, 55, 4, 55, 413, 8, 55, 11, 55, 12, 55, 414, 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 1, 56, 5, 56, 423, 8, 56, 10, 56, 12, 56, 426, 9, 56, 1, 56, 1, 56, 1, 57, 1, 57, 1, 57, 1, 57, 5, 57, 434, 8, 57, 10, 57, 12, 57, 437, 9, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 435, 0, 58, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, 37, 75, 38, 77, 39, 79, 40, 81, 41, 83, 42, 85, 43, 87, 44, 89, 45, 91, 46, 93, 47, 95, 48, 97, 49, 99, 50, 101, 51, 103, 0, 105, 0, 107, 0, 109, 52, 111, 53, 113, 54, 115, 55, 1, 0, 5, 2, 0, 10, 10, 13, 13, 2, 0, 65, 90, 97, 122, 1, 0, 48, 57, 2, 0, 36, 36, 95, 95, 3, 0, 9, 10, 13, 13, 32, 32, 461, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 95, 1, 0, 0, 0, 0, 97, 1, 0, 0, 0, 0, 99, 1, 0, 0, 0, 0, 101, 1, 0, 0, 0, 0, 109, 1, 0, 0, 0, 0, 111, 1, 0, 0, 0, 0, 113, 1, 0, 0, 0, 0, 115, 1, 0, 0, 0, 1, 117, 1, 0, 0, 0, 3, 120, 1, 0, 0, 0, 5, 123, 1, 0, 0, 0, 7, 128, 1, 0, 0, 0, 9, 136, 1, 0, 0, 0, 11, 141, 1, 0, 0, 0, 13, 185, 1, 0, 0, 0, 15, 187, 1, 0, 0, 0, 17, 229, 1, 0, 0, 0, 19, 233, 1, 0, 0, 0, 21, 241, 1, 0, 0, 0, 23, 245, 1, 0, 0, 0, 25, 247, 1, 0, 0, 0, 27, 249, 1, 0, 0, 0, 29, 251, 1, 0, 0, 0, 31, 253, 1, 0, 0, 0, 33, 255, 1, 0, 0, 0, 35, 257, 1, 0, 0, 0, 37, 259, 1, 0, 0, 0, 39, 261, 1, 0, 0, 0, 41, 263, 1, 0, 0, 0, 43, 266, 1, 0, 0, 0, 45, 269, 1, 0, 0, 0, 47, 272, 1, 0, 0, 0, 49, 275, 1, 0, 0, 0, 51, 277, 1, 0, 0, 0, 53, 280, 1, 0, 0, 0, 55, 283, 1, 0, 0, 0, 57, 285, 1, 0, 0, 0, 59, 287, 1, 0, 0, 0, 61, 289, 1, 0, 0, 0, 63, 291, 1, 0, 0, 0, 65, 293, 1, 0, 0, 0, 67, 295, 1, 0, 0, 0, 69, 297, 1, 0, 0, 0, 71, 303, 1, 0, 0, 0, 73, 308, 1, 0, 0, 0, 75, 314, 1, 0, 0, 0, 77, 317, 1, 0, 0, 0, 79, 320, 1, 0, 0, 0, 81, 325, 1, 0, 0, 0, 83, 329, 1, 0, 0, 0, 85, 336, 1, 0, 0, 0, 87, 340, 1, 0, 0, 0, 89, 347, 1, 0, 0, 0, 91, 352, 1, 0, 0, 0, 93, 360, 1, 0, 0, 0, 95, 362, 1, 0, 0, 0, 97, 372, 1, 0, 0, 0, 99, 388, 1, 0, 0, 0, 101, 390, 1, 0, 0, 0, 103, 395, 1, 0, 0, 0, 105, 397, 1, 0, 0, 0, 107, 402, 1, 0, 0, 0, 109, 404, 1, 0, 0, 0, 111, 412, 1, 0, 0, 0, 113, 418, 1, 0, 0, 0, 115, 429, 1, 0, 0, 0, 117, 118, 5, 43, 0, 0, 118, 119, 5, 43, 0, 0, 119, 2, 1, 0, 0, 0, 120, 121, 5, 45, 0, 0, 121, 122, 5, 45, 0, 0, 122, 4, 1, 0, 0, 0, 123, 124, 5, 118, 0, 0, 124, 125, 5, 111, 0, 0, 125, 126, 5, 105, 0, 0, 126, 127, 5, 100, 0, 0, 127, 6, 1, 0, 0, 0, 128, 129, 5, 98, 0, 0, 129, 130, 5, 111, 0, 0, 130, 131, 5, 111, 0, 0, 131, 132, 5, 108, 0, 0, 132, 133, 5, 101, 0, 0, 133, 134, 5, 97, 0, 0, 134, 135, 5, 110, 0, 0, 135, 8, 1, 0, 0, 0, 136, 137, 5, 99, 0, 0, 137, 138, 5, 104, 0, 0, 138, 139, 5, 97, 0, 0, 139, 140, 5, 114, 0, 0, 140, 10, 1, 0, 0, 0, 141, 142, 5, 105, 0, 0, 142, 143, 5, 110, 0, 0, 143, 144, 5, 116, 0, 0, 144, 12, 1, 0, 0, 0, 145, 146, 5, 112, 0, 0, 146, 147, 5, 117, 0, 0, 147, 148, 5, 98, 0, 0, 148, 149, 5, 108, 0, 0, 149, 150, 5, 105, 0, 0, 150, 186, 5, 99, 0, 0, 151, 152, 5, 112, 0, 0, 152, 153, 5, 114, 0, 0, 153, 154, 5, 105, 0, 0, 154, 155, 5, 118, 0, 0, 155, 156, 5, 97, 0, 0, 156, 157, 5, 116, 0, 0, 157, 186, 5, 101, 0, 0, 158, 159, 5, 112, 0, 0, 159, 160, 5, 117, 0, 0, 160, 161, 5, 98, 0, 0, 161, 162, 5, 108, 0, 0, 162, 163, 5, 105, 0, 0, 163, 164, 5, 99, 0, 0, 164, 165, 5, 32, 0, 0, 165, 166, 5, 115, 0, 0, 166, 167, 5, 116, 0, 0, 167, 168, 5, 97, 0, 0, 168, 169, 5, 116, 0, 0, 169, 170, 5, 105, 0, 0, 170, 186, 5, 99, 0, 0, 171, 172, 5, 112, 0, 0, 172, 173, 5, 114, 0, 0, 173, 174, 5, 105, 0, 0, 174, 175, 5, 118, 0, 0, 175, 176, 5, 97, 0, 0, 176, 177, 5, 116, 0, 0, 177, 178, 5, 101, 0, 0, 178, 179, 5, 32, 0, 0, 179, 180, 5, 115, 0, 0, 180, 181, 5, 116, 0, 0, 181, 182, 5, 97, 0, 0, 182, 183, 5, 116, 0, 0, 183, 184, 5, 105, 0, 0, 184, 186, 5, 99, 0, 0, 185, 145, 1, 0, 0, 0, 185, 151, 1, 0, 0, 0, 185, 158, 1, 0, 0, 0, 185, 171, 1, 0, 0, 0, 186, 14, 1, 0, 0, 0, 187, 188, 5, 112, 0, 0, 188, 189, 5, 117, 0, 0, 189, 190, 5, 98, 0, 0, 190, 191, 5, 108, 0, 0, 191, 192, 5, 105, 0, 0, 192, 193, 5, 99, 0, 0, 193, 194, 5, 32, 0, 0, 194, 195, 5, 115, 0, 0, 195, 196, 5, 116, 0, 0, 196, 197, 5, 97, 0, 0, 197, 198, 5, 116, 0, 0, 198, 199, 5, 105, 0, 0, 199, 200, 5, 99, 0, 0, 200, 201, 5, 32, 0, 0, 201, 202, 5, 118, 0, 0, 202, 203, 5, 111, 0, 0, 203, 204, 5, 105, 0, 0, 204, 205, 5, 100, 0, 0, 205, 206, 5, 32, 0, 0, 206, 207, 5, 109, 0, 0, 207, 208, 5, 97, 0, 0, 208, 209, 5, 105, 0, 0, 209, 210, 5, 110, 0, 0, 210, 211, 5, 40, 0, 0, 211, 212, 5, 83, 0, 0, 212, 213, 5, 116, 0, 0, 213, 214, 5, 114, 0, 0, 214, 215, 5, 105, 0, 0, 215, 216, 5, 110, 0, 0, 216, 217, 5, 103, 0, 0, 217, 218, 5, 91, 0, 0, 218, 219, 5, 93, 0, 0, 219, 220, 5, 32, 0, 0, 220, 221, 5, 97, 0, 0, 221, 222, 5, 114, 0, 0, 222, 223, 5, 103, 0, 0, 223, 224, 5, 115, 0, 0, 224, 225, 5, 41, 0, 0, 225, 16, 1, 0, 0, 0, 226, 230, 3, 31, 15, 0, 227, 230, 3, 35, 17, 0, 228, 230, 3, 33, 16, 0, 229, 226, 1, 0, 0, 0, 229, 227, 1, 0, 0, 0, 229, 228, 1, 0, 0, 0, 230, 18, 1, 0, 0, 0, 231, 234, 3, 27, 13, 0, 232, 234, 3, 29, 14, 0, 233, 231, 1, 0, 0, 0, 233, 232, 1, 0, 0, 0, 234, 20, 1, 0, 0, 0, 235, 242, 3, 37, 18, 0, 236, 242, 3, 39, 19, 0, 237, 242, 3, 41, 20, 0, 238, 242, 3, 43, 21, 0, 239, 242, 3, 45, 22, 0, 240, 242, 3, 47, 23, 0, 241, 235, 1, 0, 0, 0, 241, 236, 1, 0, 0, 0, 241, 237, 1, 0, 0, 0, 241, 238, 1, 0, 0, 0, 241, 239, 1, 0, 0, 0, 241, 240, 1, 0, 0, 0, 242, 22, 1, 0, 0, 0, 243, 246, 3, 51, 25, 0, 244, 246, 3, 53, 26, 0, 245, 243, 1, 0, 0, 0, 245, 244, 1, 0, 0, 0, 246, 24, 1, 0, 0, 0, 247, 248, 5, 61, 0, 0, 248, 26, 1, 0, 0, 0, 249, 250, 5, 43, 0, 0, 250, 28, 1, 0, 0, 0, 251, 252, 5, 45, 0, 0, 252, 30, 1, 0, 0, 0, 253, 254, 5, 42, 0, 0, 254, 32, 1, 0, 0, 0, 255, 256, 5, 37, 0, 0, 256, 34, 1, 0, 0, 0, 257, 258, 5, 47, 0, 0, 258, 36, 1, 0, 0, 0, 259, 260, 5, 62, 0, 0, 260, 38, 1, 0, 0, 0, 261, 262, 5, 60, 0, 0, 262, 40, 1, 0, 0, 0, 263, 264, 5, 62, 0, 0, 264, 265, 5, 61, 0, 0, 265, 42, 1, 0, 0, 0, 266, 267, 5, 60, 0, 0, 267, 268, 5, 61, 0, 0, 268, 44, 1, 0, 0, 0, 269, 270, 5, 61, 0, 0, 270, 271, 5, 61, 0, 0, 271, 46, 1, 0, 0, 0, 272, 273, 5, 33, 0, 0, 273, 274, 5, 61, 0, 0, 274, 48, 1, 0, 0, 0, 275, 276, 5, 33, 0, 0, 276, 50, 1, 0, 0, 0, 277, 278, 5, 38, 0, 0, 278, 279, 5, 38, 0, 0, 279, 52, 1, 0, 0, 0, 280, 281, 5, 124, 0, 0, 281, 282, 5, 124, 0, 0, 282, 54, 1, 0, 0, 0, 283, 284, 5, 46, 0, 0, 284, 56, 1, 0, 0, 0, 285, 286, 5, 40, 0, 0, 286, 58, 1, 0, 0, 0, 287, 288, 5, 41, 0, 0, 288, 60, 1, 0, 0, 0, 289, 290, 5, 123, 0, 0, 290, 62, 1, 0, 0, 0, 291, 292, 5, 125, 0, 0, 292, 64, 1, 0, 0, 0, 293, 294, 5, 59, 0, 0, 294, 66, 1, 0, 0, 0, 295, 296, 5, 44, 0, 0, 296, 68, 1, 0, 0, 0, 297, 298, 5, 99, 0, 0, 298, 299, 5, 108, 0, 0, 299, 300, 5, 97, 0, 0, 300, 301, 5, 115, 0, 0, 301, 302, 5, 115, 0, 0, 302, 70, 1, 0, 0, 0, 303, 304, 5, 116, 0, 0, 304, 305, 5, 104, 0, 0, 305, 306, 5, 105, 0, 0, 306, 307, 5, 115, 0, 0, 307, 72, 1, 0, 0, 0, 308, 309, 5, 119, 0, 0, 309, 310, 5, 104, 0, 0, 310, 311, 5, 105, 0, 0, 311, 312, 5, 108, 0, 0, 312, 313, 5, 101, 0, 0, 313, 74, 1, 0, 0, 0, 314, 315, 5, 100, 0, 0, 315, 316, 5, 111, 0, 0, 316, 76, 1, 0, 0, 0, 317, 318, 5, 105, 0, 0, 318, 319, 5, 102, 0, 0, 319, 78, 1, 0, 0, 0, 320, 321, 5, 101, 0, 0, 321, 322, 5, 108, 0, 0, 322, 323, 5, 115, 0, 0, 323, 324, 5, 101, 0, 0, 324, 80, 1, 0, 0, 0, 325, 326, 5, 102, 0, 0, 326, 327, 5, 111, 0, 0, 327, 328, 5, 114, 0, 0, 328, 82, 1, 0, 0, 0, 329, 330, 5, 114, 0, 0, 330, 331, 5, 101, 0, 0, 331, 332, 5, 116, 0, 0, 332, 333, 5, 117, 0, 0, 333, 334, 5, 114, 0, 0, 334, 335, 5, 110, 0, 0, 335, 84, 1, 0, 0, 0, 336, 337, 5, 110, 0, 0, 337, 338, 5, 101, 0, 0, 338, 339, 5, 119, 0, 0, 339, 86, 1, 0, 0, 0, 340, 341, 5, 115, 0, 0, 341, 342, 5, 119, 0, 0, 342, 343, 5, 105, 0, 0, 343, 344, 5, 116, 0, 0, 344, 345, 5, 99, 0, 0, 345, 346, 5, 104, 0, 0, 346, 88, 1, 0, 0, 0, 347, 348, 5, 99, 0, 0, 348, 349, 5, 97, 0, 0, 349, 350, 5, 115, 0, 0, 350, 351, 5, 101, 0, 0, 351, 90, 1, 0, 0, 0, 352, 353, 5, 100, 0, 0, 353, 354, 5, 101, 0, 0, 354, 355, 5, 102, 0, 0, 355, 356, 5, 97, 0, 0, 356, 357, 5, 117, 0, 0, 357, 358, 5, 108, 0, 0, 358, 359, 5, 116, 0, 0, 359, 92, 1, 0, 0, 0, 360, 361, 5, 58, 0, 0, 361, 94, 1, 0, 0, 0, 362, 366, 5, 39, 0, 0, 363, 365, 8, 0, 0, 0, 364, 363, 1, 0, 0, 0, 365, 368, 1, 0, 0, 0, 366, 364, 1, 0, 0, 0, 366, 367, 1, 0, 0, 0, 367, 369, 1, 0, 0, 0, 368, 366, 1, 0, 0, 0, 369, 370, 5, 39, 0, 0, 370, 96, 1, 0, 0, 0, 371, 373, 3, 29, 14, 0, 372, 371, 1, 0, 0, 0, 372, 373, 1, 0, 0, 0, 373, 375, 1, 0, 0, 0, 374, 376, 3, 105, 52, 0, 375, 374, 1, 0, 0, 0, 376, 377, 1, 0, 0, 0, 377, 375, 1, 0, 0, 0, 377, 378, 1, 0, 0, 0, 378, 98, 1, 0, 0, 0, 379, 380, 5, 116, 0, 0, 380, 381, 5, 114, 0, 0, 381, 382, 5, 117, 0, 0, 382, 389, 5, 101, 0, 0, 383, 384, 5, 102, 0, 0, 384, 385, 5, 97, 0, 0, 385, 386, 5, 108, 0, 0, 386, 387, 5, 115, 0, 0, 387, 389, 5, 101, 0, 0, 388, 379, 1, 0, 0, 0, 388, 383, 1, 0, 0, 0, 389, 100, 1, 0, 0, 0, 390, 391, 5, 110, 0, 0, 391, 392, 5, 117, 0, 0, 392, 393, 5, 108, 0, 0, 393, 394, 5, 108, 0, 0, 394, 102, 1, 0, 0, 0, 395, 396, 7, 1, 0, 0, 396, 104, 1, 0, 0, 0, 397, 398, 7, 2, 0, 0, 398, 106, 1, 0, 0, 0, 399, 403, 3, 103, 51, 0, 400, 403, 3, 105, 52, 0, 401, 403, 7, 3, 0, 0, 402, 399, 1, 0, 0, 0, 402, 400, 1, 0, 0, 0, 402, 401, 1, 0, 0, 0, 403, 108, 1, 0, 0, 0, 404, 408, 3, 103, 51, 0, 405, 407, 3, 107, 53, 0, 406, 405, 1, 0, 0, 0, 407, 410, 1, 0, 0, 0, 408, 406, 1, 0, 0, 0, 408, 409, 1, 0, 0, 0, 409, 110, 1, 0, 0, 0, 410, 408, 1, 0, 0, 0, 411, 413, 7, 4, 0, 0, 412, 411, 1, 0, 0, 0, 413, 414, 1, 0, 0, 0, 414, 412, 1, 0, 0, 0, 414, 415, 1, 0, 0, 0, 415, 416, 1, 0, 0, 0, 416, 417, 6, 55, 0, 0, 417, 112, 1, 0, 0, 0, 418, 419, 5, 47, 0, 0, 419, 420, 5, 47, 0, 0, 420, 424, 1, 0, 0, 0, 421, 423, 8, 0, 0, 0, 422, 421, 1, 0, 0, 0, 423, 426, 1, 0, 0, 0, 424, 422, 1, 0, 0, 0, 424, 425, 1, 0, 0, 0, 425, 427, 1, 0, 0, 0, 426, 424, 1, 0, 0, 0, 427, 428, 6, 56, 0, 0, 428, 114, 1, 0, 0, 0, 429, 430, 5, 47, 0, 0, 430, 431, 5, 42, 0, 0, 431, 435, 1, 0, 0, 0, 432, 434, 9, 0, 0, 0, 433, 432, 1, 0, 0, 0, 434, 437, 1, 0, 0, 0, 435, 436, 1, 0, 0, 0, 435, 433, 1, 0, 0, 0, 436, 438, 1, 0, 0, 0, 437, 435, 1, 0, 0, 0, 438, 439, 5, 42, 0, 0, 439, 440, 5, 47, 0, 0, 440, 441, 1, 0, 0, 0, 441, 442, 6, 57, 0, 0, 442, 116, 1, 0, 0, 0, 15, 0, 185, 229, 233, 241, 245, 366, 372, 377, 388, 402, 408, 414, 424, 435, 1, 6, 0, 0]
\ No newline at end of file
+[4, 0, 51, 413, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 3, 6, 178, 8, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 3, 8, 222, 8, 8, 1, 9, 1, 9, 3, 9, 226, 8, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 3, 10, 234, 8, 10, 1, 11, 1, 11, 3, 11, 238, 8, 11, 1, 12, 1, 12, 1, 13, 1, 13, 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, 20, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 28, 1, 28, 1, 29, 1, 29, 1, 30, 1, 30, 1, 31, 1, 31, 1, 32, 1, 32, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 40, 1, 40, 1, 40, 1, 40, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 1, 42, 1, 43, 1, 43, 5, 43, 335, 8, 43, 10, 43, 12, 43, 338, 9, 43, 1, 43, 1, 43, 1, 44, 3, 44, 343, 8, 44, 1, 44, 4, 44, 346, 8, 44, 11, 44, 12, 44, 347, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 3, 45, 359, 8, 45, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 47, 1, 47, 1, 48, 1, 48, 1, 49, 1, 49, 1, 49, 3, 49, 373, 8, 49, 1, 50, 1, 50, 5, 50, 377, 8, 50, 10, 50, 12, 50, 380, 9, 50, 1, 51, 4, 51, 383, 8, 51, 11, 51, 12, 51, 384, 1, 51, 1, 51, 1, 52, 1, 52, 1, 52, 1, 52, 5, 52, 393, 8, 52, 10, 52, 12, 52, 396, 9, 52, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 1, 53, 5, 53, 404, 8, 53, 10, 53, 12, 53, 407, 9, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 405, 0, 54, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, 37, 75, 38, 77, 39, 79, 40, 81, 41, 83, 42, 85, 43, 87, 44, 89, 45, 91, 46, 93, 47, 95, 0, 97, 0, 99, 0, 101, 48, 103, 49, 105, 50, 107, 51, 1, 0, 5, 2, 0, 10, 10, 13, 13, 2, 0, 65, 90, 97, 122, 1, 0, 48, 57, 2, 0, 36, 36, 95, 95, 3, 0, 9, 10, 13, 13, 32, 32, 431, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 101, 1, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 105, 1, 0, 0, 0, 0, 107, 1, 0, 0, 0, 1, 109, 1, 0, 0, 0, 3, 112, 1, 0, 0, 0, 5, 115, 1, 0, 0, 0, 7, 120, 1, 0, 0, 0, 9, 128, 1, 0, 0, 0, 11, 133, 1, 0, 0, 0, 13, 177, 1, 0, 0, 0, 15, 179, 1, 0, 0, 0, 17, 221, 1, 0, 0, 0, 19, 225, 1, 0, 0, 0, 21, 233, 1, 0, 0, 0, 23, 237, 1, 0, 0, 0, 25, 239, 1, 0, 0, 0, 27, 241, 1, 0, 0, 0, 29, 243, 1, 0, 0, 0, 31, 245, 1, 0, 0, 0, 33, 247, 1, 0, 0, 0, 35, 249, 1, 0, 0, 0, 37, 251, 1, 0, 0, 0, 39, 253, 1, 0, 0, 0, 41, 255, 1, 0, 0, 0, 43, 258, 1, 0, 0, 0, 45, 261, 1, 0, 0, 0, 47, 264, 1, 0, 0, 0, 49, 267, 1, 0, 0, 0, 51, 269, 1, 0, 0, 0, 53, 272, 1, 0, 0, 0, 55, 275, 1, 0, 0, 0, 57, 277, 1, 0, 0, 0, 59, 279, 1, 0, 0, 0, 61, 281, 1, 0, 0, 0, 63, 283, 1, 0, 0, 0, 65, 285, 1, 0, 0, 0, 67, 287, 1, 0, 0, 0, 69, 289, 1, 0, 0, 0, 71, 295, 1, 0, 0, 0, 73, 300, 1, 0, 0, 0, 75, 306, 1, 0, 0, 0, 77, 309, 1, 0, 0, 0, 79, 312, 1, 0, 0, 0, 81, 317, 1, 0, 0, 0, 83, 321, 1, 0, 0, 0, 85, 328, 1, 0, 0, 0, 87, 332, 1, 0, 0, 0, 89, 342, 1, 0, 0, 0, 91, 358, 1, 0, 0, 0, 93, 360, 1, 0, 0, 0, 95, 365, 1, 0, 0, 0, 97, 367, 1, 0, 0, 0, 99, 372, 1, 0, 0, 0, 101, 374, 1, 0, 0, 0, 103, 382, 1, 0, 0, 0, 105, 388, 1, 0, 0, 0, 107, 399, 1, 0, 0, 0, 109, 110, 5, 43, 0, 0, 110, 111, 5, 43, 0, 0, 111, 2, 1, 0, 0, 0, 112, 113, 5, 45, 0, 0, 113, 114, 5, 45, 0, 0, 114, 4, 1, 0, 0, 0, 115, 116, 5, 118, 0, 0, 116, 117, 5, 111, 0, 0, 117, 118, 5, 105, 0, 0, 118, 119, 5, 100, 0, 0, 119, 6, 1, 0, 0, 0, 120, 121, 5, 98, 0, 0, 121, 122, 5, 111, 0, 0, 122, 123, 5, 111, 0, 0, 123, 124, 5, 108, 0, 0, 124, 125, 5, 101, 0, 0, 125, 126, 5, 97, 0, 0, 126, 127, 5, 110, 0, 0, 127, 8, 1, 0, 0, 0, 128, 129, 5, 99, 0, 0, 129, 130, 5, 104, 0, 0, 130, 131, 5, 97, 0, 0, 131, 132, 5, 114, 0, 0, 132, 10, 1, 0, 0, 0, 133, 134, 5, 105, 0, 0, 134, 135, 5, 110, 0, 0, 135, 136, 5, 116, 0, 0, 136, 12, 1, 0, 0, 0, 137, 138, 5, 112, 0, 0, 138, 139, 5, 117, 0, 0, 139, 140, 5, 98, 0, 0, 140, 141, 5, 108, 0, 0, 141, 142, 5, 105, 0, 0, 142, 178, 5, 99, 0, 0, 143, 144, 5, 112, 0, 0, 144, 145, 5, 114, 0, 0, 145, 146, 5, 105, 0, 0, 146, 147, 5, 118, 0, 0, 147, 148, 5, 97, 0, 0, 148, 149, 5, 116, 0, 0, 149, 178, 5, 101, 0, 0, 150, 151, 5, 112, 0, 0, 151, 152, 5, 117, 0, 0, 152, 153, 5, 98, 0, 0, 153, 154, 5, 108, 0, 0, 154, 155, 5, 105, 0, 0, 155, 156, 5, 99, 0, 0, 156, 157, 5, 32, 0, 0, 157, 158, 5, 115, 0, 0, 158, 159, 5, 116, 0, 0, 159, 160, 5, 97, 0, 0, 160, 161, 5, 116, 0, 0, 161, 162, 5, 105, 0, 0, 162, 178, 5, 99, 0, 0, 163, 164, 5, 112, 0, 0, 164, 165, 5, 114, 0, 0, 165, 166, 5, 105, 0, 0, 166, 167, 5, 118, 0, 0, 167, 168, 5, 97, 0, 0, 168, 169, 5, 116, 0, 0, 169, 170, 5, 101, 0, 0, 170, 171, 5, 32, 0, 0, 171, 172, 5, 115, 0, 0, 172, 173, 5, 116, 0, 0, 173, 174, 5, 97, 0, 0, 174, 175, 5, 116, 0, 0, 175, 176, 5, 105, 0, 0, 176, 178, 5, 99, 0, 0, 177, 137, 1, 0, 0, 0, 177, 143, 1, 0, 0, 0, 177, 150, 1, 0, 0, 0, 177, 163, 1, 0, 0, 0, 178, 14, 1, 0, 0, 0, 179, 180, 5, 112, 0, 0, 180, 181, 5, 117, 0, 0, 181, 182, 5, 98, 0, 0, 182, 183, 5, 108, 0, 0, 183, 184, 5, 105, 0, 0, 184, 185, 5, 99, 0, 0, 185, 186, 5, 32, 0, 0, 186, 187, 5, 115, 0, 0, 187, 188, 5, 116, 0, 0, 188, 189, 5, 97, 0, 0, 189, 190, 5, 116, 0, 0, 190, 191, 5, 105, 0, 0, 191, 192, 5, 99, 0, 0, 192, 193, 5, 32, 0, 0, 193, 194, 5, 118, 0, 0, 194, 195, 5, 111, 0, 0, 195, 196, 5, 105, 0, 0, 196, 197, 5, 100, 0, 0, 197, 198, 5, 32, 0, 0, 198, 199, 5, 109, 0, 0, 199, 200, 5, 97, 0, 0, 200, 201, 5, 105, 0, 0, 201, 202, 5, 110, 0, 0, 202, 203, 5, 40, 0, 0, 203, 204, 5, 83, 0, 0, 204, 205, 5, 116, 0, 0, 205, 206, 5, 114, 0, 0, 206, 207, 5, 105, 0, 0, 207, 208, 5, 110, 0, 0, 208, 209, 5, 103, 0, 0, 209, 210, 5, 91, 0, 0, 210, 211, 5, 93, 0, 0, 211, 212, 5, 32, 0, 0, 212, 213, 5, 97, 0, 0, 213, 214, 5, 114, 0, 0, 214, 215, 5, 103, 0, 0, 215, 216, 5, 115, 0, 0, 216, 217, 5, 41, 0, 0, 217, 16, 1, 0, 0, 0, 218, 222, 3, 31, 15, 0, 219, 222, 3, 35, 17, 0, 220, 222, 3, 33, 16, 0, 221, 218, 1, 0, 0, 0, 221, 219, 1, 0, 0, 0, 221, 220, 1, 0, 0, 0, 222, 18, 1, 0, 0, 0, 223, 226, 3, 27, 13, 0, 224, 226, 3, 29, 14, 0, 225, 223, 1, 0, 0, 0, 225, 224, 1, 0, 0, 0, 226, 20, 1, 0, 0, 0, 227, 234, 3, 37, 18, 0, 228, 234, 3, 39, 19, 0, 229, 234, 3, 41, 20, 0, 230, 234, 3, 43, 21, 0, 231, 234, 3, 45, 22, 0, 232, 234, 3, 47, 23, 0, 233, 227, 1, 0, 0, 0, 233, 228, 1, 0, 0, 0, 233, 229, 1, 0, 0, 0, 233, 230, 1, 0, 0, 0, 233, 231, 1, 0, 0, 0, 233, 232, 1, 0, 0, 0, 234, 22, 1, 0, 0, 0, 235, 238, 3, 51, 25, 0, 236, 238, 3, 53, 26, 0, 237, 235, 1, 0, 0, 0, 237, 236, 1, 0, 0, 0, 238, 24, 1, 0, 0, 0, 239, 240, 5, 61, 0, 0, 240, 26, 1, 0, 0, 0, 241, 242, 5, 43, 0, 0, 242, 28, 1, 0, 0, 0, 243, 244, 5, 45, 0, 0, 244, 30, 1, 0, 0, 0, 245, 246, 5, 42, 0, 0, 246, 32, 1, 0, 0, 0, 247, 248, 5, 37, 0, 0, 248, 34, 1, 0, 0, 0, 249, 250, 5, 47, 0, 0, 250, 36, 1, 0, 0, 0, 251, 252, 5, 62, 0, 0, 252, 38, 1, 0, 0, 0, 253, 254, 5, 60, 0, 0, 254, 40, 1, 0, 0, 0, 255, 256, 5, 62, 0, 0, 256, 257, 5, 61, 0, 0, 257, 42, 1, 0, 0, 0, 258, 259, 5, 60, 0, 0, 259, 260, 5, 61, 0, 0, 260, 44, 1, 0, 0, 0, 261, 262, 5, 61, 0, 0, 262, 263, 5, 61, 0, 0, 263, 46, 1, 0, 0, 0, 264, 265, 5, 33, 0, 0, 265, 266, 5, 61, 0, 0, 266, 48, 1, 0, 0, 0, 267, 268, 5, 33, 0, 0, 268, 50, 1, 0, 0, 0, 269, 270, 5, 38, 0, 0, 270, 271, 5, 38, 0, 0, 271, 52, 1, 0, 0, 0, 272, 273, 5, 124, 0, 0, 273, 274, 5, 124, 0, 0, 274, 54, 1, 0, 0, 0, 275, 276, 5, 46, 0, 0, 276, 56, 1, 0, 0, 0, 277, 278, 5, 40, 0, 0, 278, 58, 1, 0, 0, 0, 279, 280, 5, 41, 0, 0, 280, 60, 1, 0, 0, 0, 281, 282, 5, 123, 0, 0, 282, 62, 1, 0, 0, 0, 283, 284, 5, 125, 0, 0, 284, 64, 1, 0, 0, 0, 285, 286, 5, 59, 0, 0, 286, 66, 1, 0, 0, 0, 287, 288, 5, 44, 0, 0, 288, 68, 1, 0, 0, 0, 289, 290, 5, 99, 0, 0, 290, 291, 5, 108, 0, 0, 291, 292, 5, 97, 0, 0, 292, 293, 5, 115, 0, 0, 293, 294, 5, 115, 0, 0, 294, 70, 1, 0, 0, 0, 295, 296, 5, 116, 0, 0, 296, 297, 5, 104, 0, 0, 297, 298, 5, 105, 0, 0, 298, 299, 5, 115, 0, 0, 299, 72, 1, 0, 0, 0, 300, 301, 5, 119, 0, 0, 301, 302, 5, 104, 0, 0, 302, 303, 5, 105, 0, 0, 303, 304, 5, 108, 0, 0, 304, 305, 5, 101, 0, 0, 305, 74, 1, 0, 0, 0, 306, 307, 5, 100, 0, 0, 307, 308, 5, 111, 0, 0, 308, 76, 1, 0, 0, 0, 309, 310, 5, 105, 0, 0, 310, 311, 5, 102, 0, 0, 311, 78, 1, 0, 0, 0, 312, 313, 5, 101, 0, 0, 313, 314, 5, 108, 0, 0, 314, 315, 5, 115, 0, 0, 315, 316, 5, 101, 0, 0, 316, 80, 1, 0, 0, 0, 317, 318, 5, 102, 0, 0, 318, 319, 5, 111, 0, 0, 319, 320, 5, 114, 0, 0, 320, 82, 1, 0, 0, 0, 321, 322, 5, 114, 0, 0, 322, 323, 5, 101, 0, 0, 323, 324, 5, 116, 0, 0, 324, 325, 5, 117, 0, 0, 325, 326, 5, 114, 0, 0, 326, 327, 5, 110, 0, 0, 327, 84, 1, 0, 0, 0, 328, 329, 5, 110, 0, 0, 329, 330, 5, 101, 0, 0, 330, 331, 5, 119, 0, 0, 331, 86, 1, 0, 0, 0, 332, 336, 5, 39, 0, 0, 333, 335, 8, 0, 0, 0, 334, 333, 1, 0, 0, 0, 335, 338, 1, 0, 0, 0, 336, 334, 1, 0, 0, 0, 336, 337, 1, 0, 0, 0, 337, 339, 1, 0, 0, 0, 338, 336, 1, 0, 0, 0, 339, 340, 5, 39, 0, 0, 340, 88, 1, 0, 0, 0, 341, 343, 3, 29, 14, 0, 342, 341, 1, 0, 0, 0, 342, 343, 1, 0, 0, 0, 343, 345, 1, 0, 0, 0, 344, 346, 3, 97, 48, 0, 345, 344, 1, 0, 0, 0, 346, 347, 1, 0, 0, 0, 347, 345, 1, 0, 0, 0, 347, 348, 1, 0, 0, 0, 348, 90, 1, 0, 0, 0, 349, 350, 5, 116, 0, 0, 350, 351, 5, 114, 0, 0, 351, 352, 5, 117, 0, 0, 352, 359, 5, 101, 0, 0, 353, 354, 5, 102, 0, 0, 354, 355, 5, 97, 0, 0, 355, 356, 5, 108, 0, 0, 356, 357, 5, 115, 0, 0, 357, 359, 5, 101, 0, 0, 358, 349, 1, 0, 0, 0, 358, 353, 1, 0, 0, 0, 359, 92, 1, 0, 0, 0, 360, 361, 5, 110, 0, 0, 361, 362, 5, 117, 0, 0, 362, 363, 5, 108, 0, 0, 363, 364, 5, 108, 0, 0, 364, 94, 1, 0, 0, 0, 365, 366, 7, 1, 0, 0, 366, 96, 1, 0, 0, 0, 367, 368, 7, 2, 0, 0, 368, 98, 1, 0, 0, 0, 369, 373, 3, 95, 47, 0, 370, 373, 3, 97, 48, 0, 371, 373, 7, 3, 0, 0, 372, 369, 1, 0, 0, 0, 372, 370, 1, 0, 0, 0, 372, 371, 1, 0, 0, 0, 373, 100, 1, 0, 0, 0, 374, 378, 3, 95, 47, 0, 375, 377, 3, 99, 49, 0, 376, 375, 1, 0, 0, 0, 377, 380, 1, 0, 0, 0, 378, 376, 1, 0, 0, 0, 378, 379, 1, 0, 0, 0, 379, 102, 1, 0, 0, 0, 380, 378, 1, 0, 0, 0, 381, 383, 7, 4, 0, 0, 382, 381, 1, 0, 0, 0, 383, 384, 1, 0, 0, 0, 384, 382, 1, 0, 0, 0, 384, 385, 1, 0, 0, 0, 385, 386, 1, 0, 0, 0, 386, 387, 6, 51, 0, 0, 387, 104, 1, 0, 0, 0, 388, 389, 5, 47, 0, 0, 389, 390, 5, 47, 0, 0, 390, 394, 1, 0, 0, 0, 391, 393, 8, 0, 0, 0, 392, 391, 1, 0, 0, 0, 393, 396, 1, 0, 0, 0, 394, 392, 1, 0, 0, 0, 394, 395, 1, 0, 0, 0, 395, 397, 1, 0, 0, 0, 396, 394, 1, 0, 0, 0, 397, 398, 6, 52, 0, 0, 398, 106, 1, 0, 0, 0, 399, 400, 5, 47, 0, 0, 400, 401, 5, 42, 0, 0, 401, 405, 1, 0, 0, 0, 402, 404, 9, 0, 0, 0, 403, 402, 1, 0, 0, 0, 404, 407, 1, 0, 0, 0, 405, 406, 1, 0, 0, 0, 405, 403, 1, 0, 0, 0, 406, 408, 1, 0, 0, 0, 407, 405, 1, 0, 0, 0, 408, 409, 5, 42, 0, 0, 409, 410, 5, 47, 0, 0, 410, 411, 1, 0, 0, 0, 411, 412, 6, 53, 0, 0, 412, 108, 1, 0, 0, 0, 15, 0, 177, 221, 225, 233, 237, 336, 342, 347, 358, 372, 378, 384, 394, 405, 1, 6, 0, 0]
\ No newline at end of file
diff --git a/src/main/java/parser/generated/SimpleJavaLexer.java b/src/main/java/parser/generated/SimpleJavaLexer.java
index 2b893af..23296ee 100644
--- a/src/main/java/parser/generated/SimpleJavaLexer.java
+++ b/src/main/java/parser/generated/SimpleJavaLexer.java
@@ -23,9 +23,9 @@ public class SimpleJavaLexer extends Lexer {
Less=20, GreaterEqual=21, LessEqual=22, Equal=23, NotEqual=24, Not=25,
And=26, Or=27, Dot=28, OpenRoundBracket=29, ClosedRoundBracket=30, OpenCurlyBracket=31,
ClosedCurlyBracket=32, Semicolon=33, Comma=34, Class=35, This=36, While=37,
- Do=38, If=39, Else=40, For=41, Return=42, New=43, Switch=44, Case=45,
- Default=46, Colon=47, CharValue=48, IntValue=49, BooleanValue=50, NullValue=51,
- Identifier=52, WS=53, InlineComment=54, MultilineComment=55;
+ Do=38, If=39, Else=40, For=41, Return=42, New=43, CharValue=44, IntValue=45,
+ BooleanValue=46, NullValue=47, Identifier=48, WS=49, InlineComment=50,
+ MultilineComment=51;
public static String[] channelNames = {
"DEFAULT_TOKEN_CHANNEL", "HIDDEN"
};
@@ -42,10 +42,9 @@ public class SimpleJavaLexer extends Lexer {
"GreaterEqual", "LessEqual", "Equal", "NotEqual", "Not", "And", "Or",
"Dot", "OpenRoundBracket", "ClosedRoundBracket", "OpenCurlyBracket",
"ClosedCurlyBracket", "Semicolon", "Comma", "Class", "This", "While",
- "Do", "If", "Else", "For", "Return", "New", "Switch", "Case", "Default",
- "Colon", "CharValue", "IntValue", "BooleanValue", "NullValue", "Alphabetic",
- "Numeric", "ValidIdentSymbols", "Identifier", "WS", "InlineComment",
- "MultilineComment"
+ "Do", "If", "Else", "For", "Return", "New", "CharValue", "IntValue",
+ "BooleanValue", "NullValue", "Alphabetic", "Numeric", "ValidIdentSymbols",
+ "Identifier", "WS", "InlineComment", "MultilineComment"
};
}
public static final String[] ruleNames = makeRuleNames();
@@ -57,8 +56,7 @@ public class SimpleJavaLexer extends Lexer {
"'+'", "'-'", "'*'", "'%'", "'/'", "'>'", "'<'", "'>='", "'<='", "'=='",
"'!='", "'!'", "'&&'", "'||'", "'.'", "'('", "')'", "'{'", "'}'", "';'",
"','", "'class'", "'this'", "'while'", "'do'", "'if'", "'else'", "'for'",
- "'return'", "'new'", "'switch'", "'case'", "'default'", "':'", null,
- null, null, "'null'"
+ "'return'", "'new'", null, null, null, "'null'"
};
}
private static final String[] _LITERAL_NAMES = makeLiteralNames();
@@ -70,9 +68,9 @@ public class SimpleJavaLexer extends Lexer {
"Greater", "Less", "GreaterEqual", "LessEqual", "Equal", "NotEqual",
"Not", "And", "Or", "Dot", "OpenRoundBracket", "ClosedRoundBracket",
"OpenCurlyBracket", "ClosedCurlyBracket", "Semicolon", "Comma", "Class",
- "This", "While", "Do", "If", "Else", "For", "Return", "New", "Switch",
- "Case", "Default", "Colon", "CharValue", "IntValue", "BooleanValue",
- "NullValue", "Identifier", "WS", "InlineComment", "MultilineComment"
+ "This", "While", "Do", "If", "Else", "For", "Return", "New", "CharValue",
+ "IntValue", "BooleanValue", "NullValue", "Identifier", "WS", "InlineComment",
+ "MultilineComment"
};
}
private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames();
@@ -134,7 +132,7 @@ public class SimpleJavaLexer extends Lexer {
public ATN getATN() { return _ATN; }
public static final String _serializedATN =
- "\u0004\u00007\u01bb\u0006\uffff\uffff\u0002\u0000\u0007\u0000\u0002\u0001"+
+ "\u0004\u00003\u019d\u0006\uffff\uffff\u0002\u0000\u0007\u0000\u0002\u0001"+
"\u0007\u0001\u0002\u0002\u0007\u0002\u0002\u0003\u0007\u0003\u0002\u0004"+
"\u0007\u0004\u0002\u0005\u0007\u0005\u0002\u0006\u0007\u0006\u0002\u0007"+
"\u0007\u0007\u0002\b\u0007\b\u0002\t\u0007\t\u0002\n\u0007\n\u0002\u000b"+
@@ -149,263 +147,245 @@ public class SimpleJavaLexer extends Lexer {
"&\u0002\'\u0007\'\u0002(\u0007(\u0002)\u0007)\u0002*\u0007*\u0002+\u0007"+
"+\u0002,\u0007,\u0002-\u0007-\u0002.\u0007.\u0002/\u0007/\u00020\u0007"+
"0\u00021\u00071\u00022\u00072\u00023\u00073\u00024\u00074\u00025\u0007"+
- "5\u00026\u00076\u00027\u00077\u00028\u00078\u00029\u00079\u0001\u0000"+
- "\u0001\u0000\u0001\u0000\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0002"+
- "\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0003\u0001\u0003"+
+ "5\u0001\u0000\u0001\u0000\u0001\u0000\u0001\u0001\u0001\u0001\u0001\u0001"+
+ "\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0003"+
"\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003"+
- "\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0005"+
- "\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0006\u0001\u0006\u0001\u0006"+
+ "\u0001\u0003\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004"+
+ "\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0006\u0001\u0006"+
"\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006"+
"\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006"+
"\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006"+
"\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006"+
"\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006"+
"\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006"+
- "\u0001\u0006\u0003\u0006\u00ba\b\u0006\u0001\u0007\u0001\u0007\u0001\u0007"+
+ "\u0001\u0006\u0001\u0006\u0003\u0006\u00b2\b\u0006\u0001\u0007\u0001\u0007"+
"\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007"+
"\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007"+
"\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007"+
"\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007"+
"\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007"+
"\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007"+
- "\u0001\b\u0001\b\u0001\b\u0003\b\u00e6\b\b\u0001\t\u0001\t\u0003\t\u00ea"+
- "\b\t\u0001\n\u0001\n\u0001\n\u0001\n\u0001\n\u0001\n\u0003\n\u00f2\b\n"+
- "\u0001\u000b\u0001\u000b\u0003\u000b\u00f6\b\u000b\u0001\f\u0001\f\u0001"+
- "\r\u0001\r\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\u0014\u0001\u0015\u0001\u0015"+
- "\u0001\u0015\u0001\u0016\u0001\u0016\u0001\u0016\u0001\u0017\u0001\u0017"+
- "\u0001\u0017\u0001\u0018\u0001\u0018\u0001\u0019\u0001\u0019\u0001\u0019"+
- "\u0001\u001a\u0001\u001a\u0001\u001a\u0001\u001b\u0001\u001b\u0001\u001c"+
- "\u0001\u001c\u0001\u001d\u0001\u001d\u0001\u001e\u0001\u001e\u0001\u001f"+
- "\u0001\u001f\u0001 \u0001 \u0001!\u0001!\u0001\"\u0001\"\u0001\"\u0001"+
- "\"\u0001\"\u0001\"\u0001#\u0001#\u0001#\u0001#\u0001#\u0001$\u0001$\u0001"+
- "$\u0001$\u0001$\u0001$\u0001%\u0001%\u0001%\u0001&\u0001&\u0001&\u0001"+
- "\'\u0001\'\u0001\'\u0001\'\u0001\'\u0001(\u0001(\u0001(\u0001(\u0001)"+
- "\u0001)\u0001)\u0001)\u0001)\u0001)\u0001)\u0001*\u0001*\u0001*\u0001"+
- "*\u0001+\u0001+\u0001+\u0001+\u0001+\u0001+\u0001+\u0001,\u0001,\u0001"+
- ",\u0001,\u0001,\u0001-\u0001-\u0001-\u0001-\u0001-\u0001-\u0001-\u0001"+
- "-\u0001.\u0001.\u0001/\u0001/\u0005/\u016d\b/\n/\f/\u0170\t/\u0001/\u0001"+
- "/\u00010\u00030\u0175\b0\u00010\u00040\u0178\b0\u000b0\f0\u0179\u0001"+
- "1\u00011\u00011\u00011\u00011\u00011\u00011\u00011\u00011\u00031\u0185"+
- "\b1\u00012\u00012\u00012\u00012\u00012\u00013\u00013\u00014\u00014\u0001"+
- "5\u00015\u00015\u00035\u0193\b5\u00016\u00016\u00056\u0197\b6\n6\f6\u019a"+
- "\t6\u00017\u00047\u019d\b7\u000b7\f7\u019e\u00017\u00017\u00018\u0001"+
- "8\u00018\u00018\u00058\u01a7\b8\n8\f8\u01aa\t8\u00018\u00018\u00019\u0001"+
- "9\u00019\u00019\u00059\u01b2\b9\n9\f9\u01b5\t9\u00019\u00019\u00019\u0001"+
- "9\u00019\u0001\u01b3\u0000:\u0001\u0001\u0003\u0002\u0005\u0003\u0007"+
- "\u0004\t\u0005\u000b\u0006\r\u0007\u000f\b\u0011\t\u0013\n\u0015\u000b"+
- "\u0017\f\u0019\r\u001b\u000e\u001d\u000f\u001f\u0010!\u0011#\u0012%\u0013"+
- "\'\u0014)\u0015+\u0016-\u0017/\u00181\u00193\u001a5\u001b7\u001c9\u001d"+
- ";\u001e=\u001f? A!C\"E#G$I%K&M\'O(Q)S*U+W,Y-[.]/_0a1c2e3g\u0000i\u0000"+
- "k\u0000m4o5q6s7\u0001\u0000\u0005\u0002\u0000\n\n\r\r\u0002\u0000AZaz"+
- "\u0001\u000009\u0002\u0000$$__\u0003\u0000\t\n\r\r \u01cd\u0000\u0001"+
- "\u0001\u0000\u0000\u0000\u0000\u0003\u0001\u0000\u0000\u0000\u0000\u0005"+
- "\u0001\u0000\u0000\u0000\u0000\u0007\u0001\u0000\u0000\u0000\u0000\t\u0001"+
- "\u0000\u0000\u0000\u0000\u000b\u0001\u0000\u0000\u0000\u0000\r\u0001\u0000"+
- "\u0000\u0000\u0000\u000f\u0001\u0000\u0000\u0000\u0000\u0011\u0001\u0000"+
- "\u0000\u0000\u0000\u0013\u0001\u0000\u0000\u0000\u0000\u0015\u0001\u0000"+
- "\u0000\u0000\u0000\u0017\u0001\u0000\u0000\u0000\u0000\u0019\u0001\u0000"+
- "\u0000\u0000\u0000\u001b\u0001\u0000\u0000\u0000\u0000\u001d\u0001\u0000"+
- "\u0000\u0000\u0000\u001f\u0001\u0000\u0000\u0000\u0000!\u0001\u0000\u0000"+
- "\u0000\u0000#\u0001\u0000\u0000\u0000\u0000%\u0001\u0000\u0000\u0000\u0000"+
- "\'\u0001\u0000\u0000\u0000\u0000)\u0001\u0000\u0000\u0000\u0000+\u0001"+
- "\u0000\u0000\u0000\u0000-\u0001\u0000\u0000\u0000\u0000/\u0001\u0000\u0000"+
- "\u0000\u00001\u0001\u0000\u0000\u0000\u00003\u0001\u0000\u0000\u0000\u0000"+
- "5\u0001\u0000\u0000\u0000\u00007\u0001\u0000\u0000\u0000\u00009\u0001"+
- "\u0000\u0000\u0000\u0000;\u0001\u0000\u0000\u0000\u0000=\u0001\u0000\u0000"+
- "\u0000\u0000?\u0001\u0000\u0000\u0000\u0000A\u0001\u0000\u0000\u0000\u0000"+
- "C\u0001\u0000\u0000\u0000\u0000E\u0001\u0000\u0000\u0000\u0000G\u0001"+
- "\u0000\u0000\u0000\u0000I\u0001\u0000\u0000\u0000\u0000K\u0001\u0000\u0000"+
- "\u0000\u0000M\u0001\u0000\u0000\u0000\u0000O\u0001\u0000\u0000\u0000\u0000"+
- "Q\u0001\u0000\u0000\u0000\u0000S\u0001\u0000\u0000\u0000\u0000U\u0001"+
- "\u0000\u0000\u0000\u0000W\u0001\u0000\u0000\u0000\u0000Y\u0001\u0000\u0000"+
- "\u0000\u0000[\u0001\u0000\u0000\u0000\u0000]\u0001\u0000\u0000\u0000\u0000"+
- "_\u0001\u0000\u0000\u0000\u0000a\u0001\u0000\u0000\u0000\u0000c\u0001"+
- "\u0000\u0000\u0000\u0000e\u0001\u0000\u0000\u0000\u0000m\u0001\u0000\u0000"+
- "\u0000\u0000o\u0001\u0000\u0000\u0000\u0000q\u0001\u0000\u0000\u0000\u0000"+
- "s\u0001\u0000\u0000\u0000\u0001u\u0001\u0000\u0000\u0000\u0003x\u0001"+
- "\u0000\u0000\u0000\u0005{\u0001\u0000\u0000\u0000\u0007\u0080\u0001\u0000"+
- "\u0000\u0000\t\u0088\u0001\u0000\u0000\u0000\u000b\u008d\u0001\u0000\u0000"+
- "\u0000\r\u00b9\u0001\u0000\u0000\u0000\u000f\u00bb\u0001\u0000\u0000\u0000"+
- "\u0011\u00e5\u0001\u0000\u0000\u0000\u0013\u00e9\u0001\u0000\u0000\u0000"+
- "\u0015\u00f1\u0001\u0000\u0000\u0000\u0017\u00f5\u0001\u0000\u0000\u0000"+
- "\u0019\u00f7\u0001\u0000\u0000\u0000\u001b\u00f9\u0001\u0000\u0000\u0000"+
- "\u001d\u00fb\u0001\u0000\u0000\u0000\u001f\u00fd\u0001\u0000\u0000\u0000"+
- "!\u00ff\u0001\u0000\u0000\u0000#\u0101\u0001\u0000\u0000\u0000%\u0103"+
- "\u0001\u0000\u0000\u0000\'\u0105\u0001\u0000\u0000\u0000)\u0107\u0001"+
- "\u0000\u0000\u0000+\u010a\u0001\u0000\u0000\u0000-\u010d\u0001\u0000\u0000"+
- "\u0000/\u0110\u0001\u0000\u0000\u00001\u0113\u0001\u0000\u0000\u00003"+
- "\u0115\u0001\u0000\u0000\u00005\u0118\u0001\u0000\u0000\u00007\u011b\u0001"+
- "\u0000\u0000\u00009\u011d\u0001\u0000\u0000\u0000;\u011f\u0001\u0000\u0000"+
- "\u0000=\u0121\u0001\u0000\u0000\u0000?\u0123\u0001\u0000\u0000\u0000A"+
- "\u0125\u0001\u0000\u0000\u0000C\u0127\u0001\u0000\u0000\u0000E\u0129\u0001"+
- "\u0000\u0000\u0000G\u012f\u0001\u0000\u0000\u0000I\u0134\u0001\u0000\u0000"+
- "\u0000K\u013a\u0001\u0000\u0000\u0000M\u013d\u0001\u0000\u0000\u0000O"+
- "\u0140\u0001\u0000\u0000\u0000Q\u0145\u0001\u0000\u0000\u0000S\u0149\u0001"+
- "\u0000\u0000\u0000U\u0150\u0001\u0000\u0000\u0000W\u0154\u0001\u0000\u0000"+
- "\u0000Y\u015b\u0001\u0000\u0000\u0000[\u0160\u0001\u0000\u0000\u0000]"+
- "\u0168\u0001\u0000\u0000\u0000_\u016a\u0001\u0000\u0000\u0000a\u0174\u0001"+
- "\u0000\u0000\u0000c\u0184\u0001\u0000\u0000\u0000e\u0186\u0001\u0000\u0000"+
- "\u0000g\u018b\u0001\u0000\u0000\u0000i\u018d\u0001\u0000\u0000\u0000k"+
- "\u0192\u0001\u0000\u0000\u0000m\u0194\u0001\u0000\u0000\u0000o\u019c\u0001"+
- "\u0000\u0000\u0000q\u01a2\u0001\u0000\u0000\u0000s\u01ad\u0001\u0000\u0000"+
- "\u0000uv\u0005+\u0000\u0000vw\u0005+\u0000\u0000w\u0002\u0001\u0000\u0000"+
- "\u0000xy\u0005-\u0000\u0000yz\u0005-\u0000\u0000z\u0004\u0001\u0000\u0000"+
- "\u0000{|\u0005v\u0000\u0000|}\u0005o\u0000\u0000}~\u0005i\u0000\u0000"+
- "~\u007f\u0005d\u0000\u0000\u007f\u0006\u0001\u0000\u0000\u0000\u0080\u0081"+
- "\u0005b\u0000\u0000\u0081\u0082\u0005o\u0000\u0000\u0082\u0083\u0005o"+
- "\u0000\u0000\u0083\u0084\u0005l\u0000\u0000\u0084\u0085\u0005e\u0000\u0000"+
- "\u0085\u0086\u0005a\u0000\u0000\u0086\u0087\u0005n\u0000\u0000\u0087\b"+
- "\u0001\u0000\u0000\u0000\u0088\u0089\u0005c\u0000\u0000\u0089\u008a\u0005"+
- "h\u0000\u0000\u008a\u008b\u0005a\u0000\u0000\u008b\u008c\u0005r\u0000"+
- "\u0000\u008c\n\u0001\u0000\u0000\u0000\u008d\u008e\u0005i\u0000\u0000"+
- "\u008e\u008f\u0005n\u0000\u0000\u008f\u0090\u0005t\u0000\u0000\u0090\f"+
- "\u0001\u0000\u0000\u0000\u0091\u0092\u0005p\u0000\u0000\u0092\u0093\u0005"+
- "u\u0000\u0000\u0093\u0094\u0005b\u0000\u0000\u0094\u0095\u0005l\u0000"+
- "\u0000\u0095\u0096\u0005i\u0000\u0000\u0096\u00ba\u0005c\u0000\u0000\u0097"+
- "\u0098\u0005p\u0000\u0000\u0098\u0099\u0005r\u0000\u0000\u0099\u009a\u0005"+
- "i\u0000\u0000\u009a\u009b\u0005v\u0000\u0000\u009b\u009c\u0005a\u0000"+
- "\u0000\u009c\u009d\u0005t\u0000\u0000\u009d\u00ba\u0005e\u0000\u0000\u009e"+
- "\u009f\u0005p\u0000\u0000\u009f\u00a0\u0005u\u0000\u0000\u00a0\u00a1\u0005"+
- "b\u0000\u0000\u00a1\u00a2\u0005l\u0000\u0000\u00a2\u00a3\u0005i\u0000"+
- "\u0000\u00a3\u00a4\u0005c\u0000\u0000\u00a4\u00a5\u0005 \u0000\u0000\u00a5"+
- "\u00a6\u0005s\u0000\u0000\u00a6\u00a7\u0005t\u0000\u0000\u00a7\u00a8\u0005"+
- "a\u0000\u0000\u00a8\u00a9\u0005t\u0000\u0000\u00a9\u00aa\u0005i\u0000"+
- "\u0000\u00aa\u00ba\u0005c\u0000\u0000\u00ab\u00ac\u0005p\u0000\u0000\u00ac"+
- "\u00ad\u0005r\u0000\u0000\u00ad\u00ae\u0005i\u0000\u0000\u00ae\u00af\u0005"+
- "v\u0000\u0000\u00af\u00b0\u0005a\u0000\u0000\u00b0\u00b1\u0005t\u0000"+
- "\u0000\u00b1\u00b2\u0005e\u0000\u0000\u00b2\u00b3\u0005 \u0000\u0000\u00b3"+
- "\u00b4\u0005s\u0000\u0000\u00b4\u00b5\u0005t\u0000\u0000\u00b5\u00b6\u0005"+
- "a\u0000\u0000\u00b6\u00b7\u0005t\u0000\u0000\u00b7\u00b8\u0005i\u0000"+
- "\u0000\u00b8\u00ba\u0005c\u0000\u0000\u00b9\u0091\u0001\u0000\u0000\u0000"+
- "\u00b9\u0097\u0001\u0000\u0000\u0000\u00b9\u009e\u0001\u0000\u0000\u0000"+
- "\u00b9\u00ab\u0001\u0000\u0000\u0000\u00ba\u000e\u0001\u0000\u0000\u0000"+
- "\u00bb\u00bc\u0005p\u0000\u0000\u00bc\u00bd\u0005u\u0000\u0000\u00bd\u00be"+
- "\u0005b\u0000\u0000\u00be\u00bf\u0005l\u0000\u0000\u00bf\u00c0\u0005i"+
- "\u0000\u0000\u00c0\u00c1\u0005c\u0000\u0000\u00c1\u00c2\u0005 \u0000\u0000"+
- "\u00c2\u00c3\u0005s\u0000\u0000\u00c3\u00c4\u0005t\u0000\u0000\u00c4\u00c5"+
- "\u0005a\u0000\u0000\u00c5\u00c6\u0005t\u0000\u0000\u00c6\u00c7\u0005i"+
- "\u0000\u0000\u00c7\u00c8\u0005c\u0000\u0000\u00c8\u00c9\u0005 \u0000\u0000"+
- "\u00c9\u00ca\u0005v\u0000\u0000\u00ca\u00cb\u0005o\u0000\u0000\u00cb\u00cc"+
- "\u0005i\u0000\u0000\u00cc\u00cd\u0005d\u0000\u0000\u00cd\u00ce\u0005 "+
- "\u0000\u0000\u00ce\u00cf\u0005m\u0000\u0000\u00cf\u00d0\u0005a\u0000\u0000"+
- "\u00d0\u00d1\u0005i\u0000\u0000\u00d1\u00d2\u0005n\u0000\u0000\u00d2\u00d3"+
- "\u0005(\u0000\u0000\u00d3\u00d4\u0005S\u0000\u0000\u00d4\u00d5\u0005t"+
- "\u0000\u0000\u00d5\u00d6\u0005r\u0000\u0000\u00d6\u00d7\u0005i\u0000\u0000"+
- "\u00d7\u00d8\u0005n\u0000\u0000\u00d8\u00d9\u0005g\u0000\u0000\u00d9\u00da"+
- "\u0005[\u0000\u0000\u00da\u00db\u0005]\u0000\u0000\u00db\u00dc\u0005 "+
- "\u0000\u0000\u00dc\u00dd\u0005a\u0000\u0000\u00dd\u00de\u0005r\u0000\u0000"+
- "\u00de\u00df\u0005g\u0000\u0000\u00df\u00e0\u0005s\u0000\u0000\u00e0\u00e1"+
- "\u0005)\u0000\u0000\u00e1\u0010\u0001\u0000\u0000\u0000\u00e2\u00e6\u0003"+
- "\u001f\u000f\u0000\u00e3\u00e6\u0003#\u0011\u0000\u00e4\u00e6\u0003!\u0010"+
- "\u0000\u00e5\u00e2\u0001\u0000\u0000\u0000\u00e5\u00e3\u0001\u0000\u0000"+
- "\u0000\u00e5\u00e4\u0001\u0000\u0000\u0000\u00e6\u0012\u0001\u0000\u0000"+
- "\u0000\u00e7\u00ea\u0003\u001b\r\u0000\u00e8\u00ea\u0003\u001d\u000e\u0000"+
- "\u00e9\u00e7\u0001\u0000\u0000\u0000\u00e9\u00e8\u0001\u0000\u0000\u0000"+
- "\u00ea\u0014\u0001\u0000\u0000\u0000\u00eb\u00f2\u0003%\u0012\u0000\u00ec"+
- "\u00f2\u0003\'\u0013\u0000\u00ed\u00f2\u0003)\u0014\u0000\u00ee\u00f2"+
- "\u0003+\u0015\u0000\u00ef\u00f2\u0003-\u0016\u0000\u00f0\u00f2\u0003/"+
- "\u0017\u0000\u00f1\u00eb\u0001\u0000\u0000\u0000\u00f1\u00ec\u0001\u0000"+
- "\u0000\u0000\u00f1\u00ed\u0001\u0000\u0000\u0000\u00f1\u00ee\u0001\u0000"+
- "\u0000\u0000\u00f1\u00ef\u0001\u0000\u0000\u0000\u00f1\u00f0\u0001\u0000"+
- "\u0000\u0000\u00f2\u0016\u0001\u0000\u0000\u0000\u00f3\u00f6\u00033\u0019"+
- "\u0000\u00f4\u00f6\u00035\u001a\u0000\u00f5\u00f3\u0001\u0000\u0000\u0000"+
- "\u00f5\u00f4\u0001\u0000\u0000\u0000\u00f6\u0018\u0001\u0000\u0000\u0000"+
- "\u00f7\u00f8\u0005=\u0000\u0000\u00f8\u001a\u0001\u0000\u0000\u0000\u00f9"+
- "\u00fa\u0005+\u0000\u0000\u00fa\u001c\u0001\u0000\u0000\u0000\u00fb\u00fc"+
- "\u0005-\u0000\u0000\u00fc\u001e\u0001\u0000\u0000\u0000\u00fd\u00fe\u0005"+
- "*\u0000\u0000\u00fe \u0001\u0000\u0000\u0000\u00ff\u0100\u0005%\u0000"+
- "\u0000\u0100\"\u0001\u0000\u0000\u0000\u0101\u0102\u0005/\u0000\u0000"+
- "\u0102$\u0001\u0000\u0000\u0000\u0103\u0104\u0005>\u0000\u0000\u0104&"+
- "\u0001\u0000\u0000\u0000\u0105\u0106\u0005<\u0000\u0000\u0106(\u0001\u0000"+
- "\u0000\u0000\u0107\u0108\u0005>\u0000\u0000\u0108\u0109\u0005=\u0000\u0000"+
- "\u0109*\u0001\u0000\u0000\u0000\u010a\u010b\u0005<\u0000\u0000\u010b\u010c"+
- "\u0005=\u0000\u0000\u010c,\u0001\u0000\u0000\u0000\u010d\u010e\u0005="+
- "\u0000\u0000\u010e\u010f\u0005=\u0000\u0000\u010f.\u0001\u0000\u0000\u0000"+
- "\u0110\u0111\u0005!\u0000\u0000\u0111\u0112\u0005=\u0000\u0000\u01120"+
- "\u0001\u0000\u0000\u0000\u0113\u0114\u0005!\u0000\u0000\u01142\u0001\u0000"+
- "\u0000\u0000\u0115\u0116\u0005&\u0000\u0000\u0116\u0117\u0005&\u0000\u0000"+
- "\u01174\u0001\u0000\u0000\u0000\u0118\u0119\u0005|\u0000\u0000\u0119\u011a"+
- "\u0005|\u0000\u0000\u011a6\u0001\u0000\u0000\u0000\u011b\u011c\u0005."+
- "\u0000\u0000\u011c8\u0001\u0000\u0000\u0000\u011d\u011e\u0005(\u0000\u0000"+
- "\u011e:\u0001\u0000\u0000\u0000\u011f\u0120\u0005)\u0000\u0000\u0120<"+
- "\u0001\u0000\u0000\u0000\u0121\u0122\u0005{\u0000\u0000\u0122>\u0001\u0000"+
- "\u0000\u0000\u0123\u0124\u0005}\u0000\u0000\u0124@\u0001\u0000\u0000\u0000"+
- "\u0125\u0126\u0005;\u0000\u0000\u0126B\u0001\u0000\u0000\u0000\u0127\u0128"+
- "\u0005,\u0000\u0000\u0128D\u0001\u0000\u0000\u0000\u0129\u012a\u0005c"+
- "\u0000\u0000\u012a\u012b\u0005l\u0000\u0000\u012b\u012c\u0005a\u0000\u0000"+
- "\u012c\u012d\u0005s\u0000\u0000\u012d\u012e\u0005s\u0000\u0000\u012eF"+
- "\u0001\u0000\u0000\u0000\u012f\u0130\u0005t\u0000\u0000\u0130\u0131\u0005"+
- "h\u0000\u0000\u0131\u0132\u0005i\u0000\u0000\u0132\u0133\u0005s\u0000"+
- "\u0000\u0133H\u0001\u0000\u0000\u0000\u0134\u0135\u0005w\u0000\u0000\u0135"+
- "\u0136\u0005h\u0000\u0000\u0136\u0137\u0005i\u0000\u0000\u0137\u0138\u0005"+
- "l\u0000\u0000\u0138\u0139\u0005e\u0000\u0000\u0139J\u0001\u0000\u0000"+
- "\u0000\u013a\u013b\u0005d\u0000\u0000\u013b\u013c\u0005o\u0000\u0000\u013c"+
- "L\u0001\u0000\u0000\u0000\u013d\u013e\u0005i\u0000\u0000\u013e\u013f\u0005"+
- "f\u0000\u0000\u013fN\u0001\u0000\u0000\u0000\u0140\u0141\u0005e\u0000"+
- "\u0000\u0141\u0142\u0005l\u0000\u0000\u0142\u0143\u0005s\u0000\u0000\u0143"+
- "\u0144\u0005e\u0000\u0000\u0144P\u0001\u0000\u0000\u0000\u0145\u0146\u0005"+
- "f\u0000\u0000\u0146\u0147\u0005o\u0000\u0000\u0147\u0148\u0005r\u0000"+
- "\u0000\u0148R\u0001\u0000\u0000\u0000\u0149\u014a\u0005r\u0000\u0000\u014a"+
- "\u014b\u0005e\u0000\u0000\u014b\u014c\u0005t\u0000\u0000\u014c\u014d\u0005"+
- "u\u0000\u0000\u014d\u014e\u0005r\u0000\u0000\u014e\u014f\u0005n\u0000"+
- "\u0000\u014fT\u0001\u0000\u0000\u0000\u0150\u0151\u0005n\u0000\u0000\u0151"+
- "\u0152\u0005e\u0000\u0000\u0152\u0153\u0005w\u0000\u0000\u0153V\u0001"+
- "\u0000\u0000\u0000\u0154\u0155\u0005s\u0000\u0000\u0155\u0156\u0005w\u0000"+
- "\u0000\u0156\u0157\u0005i\u0000\u0000\u0157\u0158\u0005t\u0000\u0000\u0158"+
- "\u0159\u0005c\u0000\u0000\u0159\u015a\u0005h\u0000\u0000\u015aX\u0001"+
- "\u0000\u0000\u0000\u015b\u015c\u0005c\u0000\u0000\u015c\u015d\u0005a\u0000"+
- "\u0000\u015d\u015e\u0005s\u0000\u0000\u015e\u015f\u0005e\u0000\u0000\u015f"+
- "Z\u0001\u0000\u0000\u0000\u0160\u0161\u0005d\u0000\u0000\u0161\u0162\u0005"+
- "e\u0000\u0000\u0162\u0163\u0005f\u0000\u0000\u0163\u0164\u0005a\u0000"+
- "\u0000\u0164\u0165\u0005u\u0000\u0000\u0165\u0166\u0005l\u0000\u0000\u0166"+
- "\u0167\u0005t\u0000\u0000\u0167\\\u0001\u0000\u0000\u0000\u0168\u0169"+
- "\u0005:\u0000\u0000\u0169^\u0001\u0000\u0000\u0000\u016a\u016e\u0005\'"+
- "\u0000\u0000\u016b\u016d\b\u0000\u0000\u0000\u016c\u016b\u0001\u0000\u0000"+
- "\u0000\u016d\u0170\u0001\u0000\u0000\u0000\u016e\u016c\u0001\u0000\u0000"+
- "\u0000\u016e\u016f\u0001\u0000\u0000\u0000\u016f\u0171\u0001\u0000\u0000"+
- "\u0000\u0170\u016e\u0001\u0000\u0000\u0000\u0171\u0172\u0005\'\u0000\u0000"+
- "\u0172`\u0001\u0000\u0000\u0000\u0173\u0175\u0003\u001d\u000e\u0000\u0174"+
- "\u0173\u0001\u0000\u0000\u0000\u0174\u0175\u0001\u0000\u0000\u0000\u0175"+
- "\u0177\u0001\u0000\u0000\u0000\u0176\u0178\u0003i4\u0000\u0177\u0176\u0001"+
- "\u0000\u0000\u0000\u0178\u0179\u0001\u0000\u0000\u0000\u0179\u0177\u0001"+
- "\u0000\u0000\u0000\u0179\u017a\u0001\u0000\u0000\u0000\u017ab\u0001\u0000"+
- "\u0000\u0000\u017b\u017c\u0005t\u0000\u0000\u017c\u017d\u0005r\u0000\u0000"+
- "\u017d\u017e\u0005u\u0000\u0000\u017e\u0185\u0005e\u0000\u0000\u017f\u0180"+
- "\u0005f\u0000\u0000\u0180\u0181\u0005a\u0000\u0000\u0181\u0182\u0005l"+
- "\u0000\u0000\u0182\u0183\u0005s\u0000\u0000\u0183\u0185\u0005e\u0000\u0000"+
- "\u0184\u017b\u0001\u0000\u0000\u0000\u0184\u017f\u0001\u0000\u0000\u0000"+
- "\u0185d\u0001\u0000\u0000\u0000\u0186\u0187\u0005n\u0000\u0000\u0187\u0188"+
- "\u0005u\u0000\u0000\u0188\u0189\u0005l\u0000\u0000\u0189\u018a\u0005l"+
- "\u0000\u0000\u018af\u0001\u0000\u0000\u0000\u018b\u018c\u0007\u0001\u0000"+
- "\u0000\u018ch\u0001\u0000\u0000\u0000\u018d\u018e\u0007\u0002\u0000\u0000"+
- "\u018ej\u0001\u0000\u0000\u0000\u018f\u0193\u0003g3\u0000\u0190\u0193"+
- "\u0003i4\u0000\u0191\u0193\u0007\u0003\u0000\u0000\u0192\u018f\u0001\u0000"+
- "\u0000\u0000\u0192\u0190\u0001\u0000\u0000\u0000\u0192\u0191\u0001\u0000"+
- "\u0000\u0000\u0193l\u0001\u0000\u0000\u0000\u0194\u0198\u0003g3\u0000"+
- "\u0195\u0197\u0003k5\u0000\u0196\u0195\u0001\u0000\u0000\u0000\u0197\u019a"+
- "\u0001\u0000\u0000\u0000\u0198\u0196\u0001\u0000\u0000\u0000\u0198\u0199"+
- "\u0001\u0000\u0000\u0000\u0199n\u0001\u0000\u0000\u0000\u019a\u0198\u0001"+
- "\u0000\u0000\u0000\u019b\u019d\u0007\u0004\u0000\u0000\u019c\u019b\u0001"+
- "\u0000\u0000\u0000\u019d\u019e\u0001\u0000\u0000\u0000\u019e\u019c\u0001"+
- "\u0000\u0000\u0000\u019e\u019f\u0001\u0000\u0000\u0000\u019f\u01a0\u0001"+
- "\u0000\u0000\u0000\u01a0\u01a1\u00067\u0000\u0000\u01a1p\u0001\u0000\u0000"+
- "\u0000\u01a2\u01a3\u0005/\u0000\u0000\u01a3\u01a4\u0005/\u0000\u0000\u01a4"+
- "\u01a8\u0001\u0000\u0000\u0000\u01a5\u01a7\b\u0000\u0000\u0000\u01a6\u01a5"+
- "\u0001\u0000\u0000\u0000\u01a7\u01aa\u0001\u0000\u0000\u0000\u01a8\u01a6"+
- "\u0001\u0000\u0000\u0000\u01a8\u01a9\u0001\u0000\u0000\u0000\u01a9\u01ab"+
- "\u0001\u0000\u0000\u0000\u01aa\u01a8\u0001\u0000\u0000\u0000\u01ab\u01ac"+
- "\u00068\u0000\u0000\u01acr\u0001\u0000\u0000\u0000\u01ad\u01ae\u0005/"+
- "\u0000\u0000\u01ae\u01af\u0005*\u0000\u0000\u01af\u01b3\u0001\u0000\u0000"+
- "\u0000\u01b0\u01b2\t\u0000\u0000\u0000\u01b1\u01b0\u0001\u0000\u0000\u0000"+
- "\u01b2\u01b5\u0001\u0000\u0000\u0000\u01b3\u01b4\u0001\u0000\u0000\u0000"+
- "\u01b3\u01b1\u0001\u0000\u0000\u0000\u01b4\u01b6\u0001\u0000\u0000\u0000"+
- "\u01b5\u01b3\u0001\u0000\u0000\u0000\u01b6\u01b7\u0005*\u0000\u0000\u01b7"+
- "\u01b8\u0005/\u0000\u0000\u01b8\u01b9\u0001\u0000\u0000\u0000\u01b9\u01ba"+
- "\u00069\u0000\u0000\u01bat\u0001\u0000\u0000\u0000\u000f\u0000\u00b9\u00e5"+
- "\u00e9\u00f1\u00f5\u016e\u0174\u0179\u0184\u0192\u0198\u019e\u01a8\u01b3"+
- "\u0001\u0006\u0000\u0000";
+ "\u0001\u0007\u0001\b\u0001\b\u0001\b\u0003\b\u00de\b\b\u0001\t\u0001\t"+
+ "\u0003\t\u00e2\b\t\u0001\n\u0001\n\u0001\n\u0001\n\u0001\n\u0001\n\u0003"+
+ "\n\u00ea\b\n\u0001\u000b\u0001\u000b\u0003\u000b\u00ee\b\u000b\u0001\f"+
+ "\u0001\f\u0001\r\u0001\r\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\u0014\u0001\u0015"+
+ "\u0001\u0015\u0001\u0015\u0001\u0016\u0001\u0016\u0001\u0016\u0001\u0017"+
+ "\u0001\u0017\u0001\u0017\u0001\u0018\u0001\u0018\u0001\u0019\u0001\u0019"+
+ "\u0001\u0019\u0001\u001a\u0001\u001a\u0001\u001a\u0001\u001b\u0001\u001b"+
+ "\u0001\u001c\u0001\u001c\u0001\u001d\u0001\u001d\u0001\u001e\u0001\u001e"+
+ "\u0001\u001f\u0001\u001f\u0001 \u0001 \u0001!\u0001!\u0001\"\u0001\"\u0001"+
+ "\"\u0001\"\u0001\"\u0001\"\u0001#\u0001#\u0001#\u0001#\u0001#\u0001$\u0001"+
+ "$\u0001$\u0001$\u0001$\u0001$\u0001%\u0001%\u0001%\u0001&\u0001&\u0001"+
+ "&\u0001\'\u0001\'\u0001\'\u0001\'\u0001\'\u0001(\u0001(\u0001(\u0001("+
+ "\u0001)\u0001)\u0001)\u0001)\u0001)\u0001)\u0001)\u0001*\u0001*\u0001"+
+ "*\u0001*\u0001+\u0001+\u0005+\u014f\b+\n+\f+\u0152\t+\u0001+\u0001+\u0001"+
+ ",\u0003,\u0157\b,\u0001,\u0004,\u015a\b,\u000b,\f,\u015b\u0001-\u0001"+
+ "-\u0001-\u0001-\u0001-\u0001-\u0001-\u0001-\u0001-\u0003-\u0167\b-\u0001"+
+ ".\u0001.\u0001.\u0001.\u0001.\u0001/\u0001/\u00010\u00010\u00011\u0001"+
+ "1\u00011\u00031\u0175\b1\u00012\u00012\u00052\u0179\b2\n2\f2\u017c\t2"+
+ "\u00013\u00043\u017f\b3\u000b3\f3\u0180\u00013\u00013\u00014\u00014\u0001"+
+ "4\u00014\u00054\u0189\b4\n4\f4\u018c\t4\u00014\u00014\u00015\u00015\u0001"+
+ "5\u00015\u00055\u0194\b5\n5\f5\u0197\t5\u00015\u00015\u00015\u00015\u0001"+
+ "5\u0001\u0195\u00006\u0001\u0001\u0003\u0002\u0005\u0003\u0007\u0004\t"+
+ "\u0005\u000b\u0006\r\u0007\u000f\b\u0011\t\u0013\n\u0015\u000b\u0017\f"+
+ "\u0019\r\u001b\u000e\u001d\u000f\u001f\u0010!\u0011#\u0012%\u0013\'\u0014"+
+ ")\u0015+\u0016-\u0017/\u00181\u00193\u001a5\u001b7\u001c9\u001d;\u001e"+
+ "=\u001f? A!C\"E#G$I%K&M\'O(Q)S*U+W,Y-[.]/_\u0000a\u0000c\u0000e0g1i2k"+
+ "3\u0001\u0000\u0005\u0002\u0000\n\n\r\r\u0002\u0000AZaz\u0001\u000009"+
+ "\u0002\u0000$$__\u0003\u0000\t\n\r\r \u01af\u0000\u0001\u0001\u0000\u0000"+
+ "\u0000\u0000\u0003\u0001\u0000\u0000\u0000\u0000\u0005\u0001\u0000\u0000"+
+ "\u0000\u0000\u0007\u0001\u0000\u0000\u0000\u0000\t\u0001\u0000\u0000\u0000"+
+ "\u0000\u000b\u0001\u0000\u0000\u0000\u0000\r\u0001\u0000\u0000\u0000\u0000"+
+ "\u000f\u0001\u0000\u0000\u0000\u0000\u0011\u0001\u0000\u0000\u0000\u0000"+
+ "\u0013\u0001\u0000\u0000\u0000\u0000\u0015\u0001\u0000\u0000\u0000\u0000"+
+ "\u0017\u0001\u0000\u0000\u0000\u0000\u0019\u0001\u0000\u0000\u0000\u0000"+
+ "\u001b\u0001\u0000\u0000\u0000\u0000\u001d\u0001\u0000\u0000\u0000\u0000"+
+ "\u001f\u0001\u0000\u0000\u0000\u0000!\u0001\u0000\u0000\u0000\u0000#\u0001"+
+ "\u0000\u0000\u0000\u0000%\u0001\u0000\u0000\u0000\u0000\'\u0001\u0000"+
+ "\u0000\u0000\u0000)\u0001\u0000\u0000\u0000\u0000+\u0001\u0000\u0000\u0000"+
+ "\u0000-\u0001\u0000\u0000\u0000\u0000/\u0001\u0000\u0000\u0000\u00001"+
+ "\u0001\u0000\u0000\u0000\u00003\u0001\u0000\u0000\u0000\u00005\u0001\u0000"+
+ "\u0000\u0000\u00007\u0001\u0000\u0000\u0000\u00009\u0001\u0000\u0000\u0000"+
+ "\u0000;\u0001\u0000\u0000\u0000\u0000=\u0001\u0000\u0000\u0000\u0000?"+
+ "\u0001\u0000\u0000\u0000\u0000A\u0001\u0000\u0000\u0000\u0000C\u0001\u0000"+
+ "\u0000\u0000\u0000E\u0001\u0000\u0000\u0000\u0000G\u0001\u0000\u0000\u0000"+
+ "\u0000I\u0001\u0000\u0000\u0000\u0000K\u0001\u0000\u0000\u0000\u0000M"+
+ "\u0001\u0000\u0000\u0000\u0000O\u0001\u0000\u0000\u0000\u0000Q\u0001\u0000"+
+ "\u0000\u0000\u0000S\u0001\u0000\u0000\u0000\u0000U\u0001\u0000\u0000\u0000"+
+ "\u0000W\u0001\u0000\u0000\u0000\u0000Y\u0001\u0000\u0000\u0000\u0000["+
+ "\u0001\u0000\u0000\u0000\u0000]\u0001\u0000\u0000\u0000\u0000e\u0001\u0000"+
+ "\u0000\u0000\u0000g\u0001\u0000\u0000\u0000\u0000i\u0001\u0000\u0000\u0000"+
+ "\u0000k\u0001\u0000\u0000\u0000\u0001m\u0001\u0000\u0000\u0000\u0003p"+
+ "\u0001\u0000\u0000\u0000\u0005s\u0001\u0000\u0000\u0000\u0007x\u0001\u0000"+
+ "\u0000\u0000\t\u0080\u0001\u0000\u0000\u0000\u000b\u0085\u0001\u0000\u0000"+
+ "\u0000\r\u00b1\u0001\u0000\u0000\u0000\u000f\u00b3\u0001\u0000\u0000\u0000"+
+ "\u0011\u00dd\u0001\u0000\u0000\u0000\u0013\u00e1\u0001\u0000\u0000\u0000"+
+ "\u0015\u00e9\u0001\u0000\u0000\u0000\u0017\u00ed\u0001\u0000\u0000\u0000"+
+ "\u0019\u00ef\u0001\u0000\u0000\u0000\u001b\u00f1\u0001\u0000\u0000\u0000"+
+ "\u001d\u00f3\u0001\u0000\u0000\u0000\u001f\u00f5\u0001\u0000\u0000\u0000"+
+ "!\u00f7\u0001\u0000\u0000\u0000#\u00f9\u0001\u0000\u0000\u0000%\u00fb"+
+ "\u0001\u0000\u0000\u0000\'\u00fd\u0001\u0000\u0000\u0000)\u00ff\u0001"+
+ "\u0000\u0000\u0000+\u0102\u0001\u0000\u0000\u0000-\u0105\u0001\u0000\u0000"+
+ "\u0000/\u0108\u0001\u0000\u0000\u00001\u010b\u0001\u0000\u0000\u00003"+
+ "\u010d\u0001\u0000\u0000\u00005\u0110\u0001\u0000\u0000\u00007\u0113\u0001"+
+ "\u0000\u0000\u00009\u0115\u0001\u0000\u0000\u0000;\u0117\u0001\u0000\u0000"+
+ "\u0000=\u0119\u0001\u0000\u0000\u0000?\u011b\u0001\u0000\u0000\u0000A"+
+ "\u011d\u0001\u0000\u0000\u0000C\u011f\u0001\u0000\u0000\u0000E\u0121\u0001"+
+ "\u0000\u0000\u0000G\u0127\u0001\u0000\u0000\u0000I\u012c\u0001\u0000\u0000"+
+ "\u0000K\u0132\u0001\u0000\u0000\u0000M\u0135\u0001\u0000\u0000\u0000O"+
+ "\u0138\u0001\u0000\u0000\u0000Q\u013d\u0001\u0000\u0000\u0000S\u0141\u0001"+
+ "\u0000\u0000\u0000U\u0148\u0001\u0000\u0000\u0000W\u014c\u0001\u0000\u0000"+
+ "\u0000Y\u0156\u0001\u0000\u0000\u0000[\u0166\u0001\u0000\u0000\u0000]"+
+ "\u0168\u0001\u0000\u0000\u0000_\u016d\u0001\u0000\u0000\u0000a\u016f\u0001"+
+ "\u0000\u0000\u0000c\u0174\u0001\u0000\u0000\u0000e\u0176\u0001\u0000\u0000"+
+ "\u0000g\u017e\u0001\u0000\u0000\u0000i\u0184\u0001\u0000\u0000\u0000k"+
+ "\u018f\u0001\u0000\u0000\u0000mn\u0005+\u0000\u0000no\u0005+\u0000\u0000"+
+ "o\u0002\u0001\u0000\u0000\u0000pq\u0005-\u0000\u0000qr\u0005-\u0000\u0000"+
+ "r\u0004\u0001\u0000\u0000\u0000st\u0005v\u0000\u0000tu\u0005o\u0000\u0000"+
+ "uv\u0005i\u0000\u0000vw\u0005d\u0000\u0000w\u0006\u0001\u0000\u0000\u0000"+
+ "xy\u0005b\u0000\u0000yz\u0005o\u0000\u0000z{\u0005o\u0000\u0000{|\u0005"+
+ "l\u0000\u0000|}\u0005e\u0000\u0000}~\u0005a\u0000\u0000~\u007f\u0005n"+
+ "\u0000\u0000\u007f\b\u0001\u0000\u0000\u0000\u0080\u0081\u0005c\u0000"+
+ "\u0000\u0081\u0082\u0005h\u0000\u0000\u0082\u0083\u0005a\u0000\u0000\u0083"+
+ "\u0084\u0005r\u0000\u0000\u0084\n\u0001\u0000\u0000\u0000\u0085\u0086"+
+ "\u0005i\u0000\u0000\u0086\u0087\u0005n\u0000\u0000\u0087\u0088\u0005t"+
+ "\u0000\u0000\u0088\f\u0001\u0000\u0000\u0000\u0089\u008a\u0005p\u0000"+
+ "\u0000\u008a\u008b\u0005u\u0000\u0000\u008b\u008c\u0005b\u0000\u0000\u008c"+
+ "\u008d\u0005l\u0000\u0000\u008d\u008e\u0005i\u0000\u0000\u008e\u00b2\u0005"+
+ "c\u0000\u0000\u008f\u0090\u0005p\u0000\u0000\u0090\u0091\u0005r\u0000"+
+ "\u0000\u0091\u0092\u0005i\u0000\u0000\u0092\u0093\u0005v\u0000\u0000\u0093"+
+ "\u0094\u0005a\u0000\u0000\u0094\u0095\u0005t\u0000\u0000\u0095\u00b2\u0005"+
+ "e\u0000\u0000\u0096\u0097\u0005p\u0000\u0000\u0097\u0098\u0005u\u0000"+
+ "\u0000\u0098\u0099\u0005b\u0000\u0000\u0099\u009a\u0005l\u0000\u0000\u009a"+
+ "\u009b\u0005i\u0000\u0000\u009b\u009c\u0005c\u0000\u0000\u009c\u009d\u0005"+
+ " \u0000\u0000\u009d\u009e\u0005s\u0000\u0000\u009e\u009f\u0005t\u0000"+
+ "\u0000\u009f\u00a0\u0005a\u0000\u0000\u00a0\u00a1\u0005t\u0000\u0000\u00a1"+
+ "\u00a2\u0005i\u0000\u0000\u00a2\u00b2\u0005c\u0000\u0000\u00a3\u00a4\u0005"+
+ "p\u0000\u0000\u00a4\u00a5\u0005r\u0000\u0000\u00a5\u00a6\u0005i\u0000"+
+ "\u0000\u00a6\u00a7\u0005v\u0000\u0000\u00a7\u00a8\u0005a\u0000\u0000\u00a8"+
+ "\u00a9\u0005t\u0000\u0000\u00a9\u00aa\u0005e\u0000\u0000\u00aa\u00ab\u0005"+
+ " \u0000\u0000\u00ab\u00ac\u0005s\u0000\u0000\u00ac\u00ad\u0005t\u0000"+
+ "\u0000\u00ad\u00ae\u0005a\u0000\u0000\u00ae\u00af\u0005t\u0000\u0000\u00af"+
+ "\u00b0\u0005i\u0000\u0000\u00b0\u00b2\u0005c\u0000\u0000\u00b1\u0089\u0001"+
+ "\u0000\u0000\u0000\u00b1\u008f\u0001\u0000\u0000\u0000\u00b1\u0096\u0001"+
+ "\u0000\u0000\u0000\u00b1\u00a3\u0001\u0000\u0000\u0000\u00b2\u000e\u0001"+
+ "\u0000\u0000\u0000\u00b3\u00b4\u0005p\u0000\u0000\u00b4\u00b5\u0005u\u0000"+
+ "\u0000\u00b5\u00b6\u0005b\u0000\u0000\u00b6\u00b7\u0005l\u0000\u0000\u00b7"+
+ "\u00b8\u0005i\u0000\u0000\u00b8\u00b9\u0005c\u0000\u0000\u00b9\u00ba\u0005"+
+ " \u0000\u0000\u00ba\u00bb\u0005s\u0000\u0000\u00bb\u00bc\u0005t\u0000"+
+ "\u0000\u00bc\u00bd\u0005a\u0000\u0000\u00bd\u00be\u0005t\u0000\u0000\u00be"+
+ "\u00bf\u0005i\u0000\u0000\u00bf\u00c0\u0005c\u0000\u0000\u00c0\u00c1\u0005"+
+ " \u0000\u0000\u00c1\u00c2\u0005v\u0000\u0000\u00c2\u00c3\u0005o\u0000"+
+ "\u0000\u00c3\u00c4\u0005i\u0000\u0000\u00c4\u00c5\u0005d\u0000\u0000\u00c5"+
+ "\u00c6\u0005 \u0000\u0000\u00c6\u00c7\u0005m\u0000\u0000\u00c7\u00c8\u0005"+
+ "a\u0000\u0000\u00c8\u00c9\u0005i\u0000\u0000\u00c9\u00ca\u0005n\u0000"+
+ "\u0000\u00ca\u00cb\u0005(\u0000\u0000\u00cb\u00cc\u0005S\u0000\u0000\u00cc"+
+ "\u00cd\u0005t\u0000\u0000\u00cd\u00ce\u0005r\u0000\u0000\u00ce\u00cf\u0005"+
+ "i\u0000\u0000\u00cf\u00d0\u0005n\u0000\u0000\u00d0\u00d1\u0005g\u0000"+
+ "\u0000\u00d1\u00d2\u0005[\u0000\u0000\u00d2\u00d3\u0005]\u0000\u0000\u00d3"+
+ "\u00d4\u0005 \u0000\u0000\u00d4\u00d5\u0005a\u0000\u0000\u00d5\u00d6\u0005"+
+ "r\u0000\u0000\u00d6\u00d7\u0005g\u0000\u0000\u00d7\u00d8\u0005s\u0000"+
+ "\u0000\u00d8\u00d9\u0005)\u0000\u0000\u00d9\u0010\u0001\u0000\u0000\u0000"+
+ "\u00da\u00de\u0003\u001f\u000f\u0000\u00db\u00de\u0003#\u0011\u0000\u00dc"+
+ "\u00de\u0003!\u0010\u0000\u00dd\u00da\u0001\u0000\u0000\u0000\u00dd\u00db"+
+ "\u0001\u0000\u0000\u0000\u00dd\u00dc\u0001\u0000\u0000\u0000\u00de\u0012"+
+ "\u0001\u0000\u0000\u0000\u00df\u00e2\u0003\u001b\r\u0000\u00e0\u00e2\u0003"+
+ "\u001d\u000e\u0000\u00e1\u00df\u0001\u0000\u0000\u0000\u00e1\u00e0\u0001"+
+ "\u0000\u0000\u0000\u00e2\u0014\u0001\u0000\u0000\u0000\u00e3\u00ea\u0003"+
+ "%\u0012\u0000\u00e4\u00ea\u0003\'\u0013\u0000\u00e5\u00ea\u0003)\u0014"+
+ "\u0000\u00e6\u00ea\u0003+\u0015\u0000\u00e7\u00ea\u0003-\u0016\u0000\u00e8"+
+ "\u00ea\u0003/\u0017\u0000\u00e9\u00e3\u0001\u0000\u0000\u0000\u00e9\u00e4"+
+ "\u0001\u0000\u0000\u0000\u00e9\u00e5\u0001\u0000\u0000\u0000\u00e9\u00e6"+
+ "\u0001\u0000\u0000\u0000\u00e9\u00e7\u0001\u0000\u0000\u0000\u00e9\u00e8"+
+ "\u0001\u0000\u0000\u0000\u00ea\u0016\u0001\u0000\u0000\u0000\u00eb\u00ee"+
+ "\u00033\u0019\u0000\u00ec\u00ee\u00035\u001a\u0000\u00ed\u00eb\u0001\u0000"+
+ "\u0000\u0000\u00ed\u00ec\u0001\u0000\u0000\u0000\u00ee\u0018\u0001\u0000"+
+ "\u0000\u0000\u00ef\u00f0\u0005=\u0000\u0000\u00f0\u001a\u0001\u0000\u0000"+
+ "\u0000\u00f1\u00f2\u0005+\u0000\u0000\u00f2\u001c\u0001\u0000\u0000\u0000"+
+ "\u00f3\u00f4\u0005-\u0000\u0000\u00f4\u001e\u0001\u0000\u0000\u0000\u00f5"+
+ "\u00f6\u0005*\u0000\u0000\u00f6 \u0001\u0000\u0000\u0000\u00f7\u00f8\u0005"+
+ "%\u0000\u0000\u00f8\"\u0001\u0000\u0000\u0000\u00f9\u00fa\u0005/\u0000"+
+ "\u0000\u00fa$\u0001\u0000\u0000\u0000\u00fb\u00fc\u0005>\u0000\u0000\u00fc"+
+ "&\u0001\u0000\u0000\u0000\u00fd\u00fe\u0005<\u0000\u0000\u00fe(\u0001"+
+ "\u0000\u0000\u0000\u00ff\u0100\u0005>\u0000\u0000\u0100\u0101\u0005=\u0000"+
+ "\u0000\u0101*\u0001\u0000\u0000\u0000\u0102\u0103\u0005<\u0000\u0000\u0103"+
+ "\u0104\u0005=\u0000\u0000\u0104,\u0001\u0000\u0000\u0000\u0105\u0106\u0005"+
+ "=\u0000\u0000\u0106\u0107\u0005=\u0000\u0000\u0107.\u0001\u0000\u0000"+
+ "\u0000\u0108\u0109\u0005!\u0000\u0000\u0109\u010a\u0005=\u0000\u0000\u010a"+
+ "0\u0001\u0000\u0000\u0000\u010b\u010c\u0005!\u0000\u0000\u010c2\u0001"+
+ "\u0000\u0000\u0000\u010d\u010e\u0005&\u0000\u0000\u010e\u010f\u0005&\u0000"+
+ "\u0000\u010f4\u0001\u0000\u0000\u0000\u0110\u0111\u0005|\u0000\u0000\u0111"+
+ "\u0112\u0005|\u0000\u0000\u01126\u0001\u0000\u0000\u0000\u0113\u0114\u0005"+
+ ".\u0000\u0000\u01148\u0001\u0000\u0000\u0000\u0115\u0116\u0005(\u0000"+
+ "\u0000\u0116:\u0001\u0000\u0000\u0000\u0117\u0118\u0005)\u0000\u0000\u0118"+
+ "<\u0001\u0000\u0000\u0000\u0119\u011a\u0005{\u0000\u0000\u011a>\u0001"+
+ "\u0000\u0000\u0000\u011b\u011c\u0005}\u0000\u0000\u011c@\u0001\u0000\u0000"+
+ "\u0000\u011d\u011e\u0005;\u0000\u0000\u011eB\u0001\u0000\u0000\u0000\u011f"+
+ "\u0120\u0005,\u0000\u0000\u0120D\u0001\u0000\u0000\u0000\u0121\u0122\u0005"+
+ "c\u0000\u0000\u0122\u0123\u0005l\u0000\u0000\u0123\u0124\u0005a\u0000"+
+ "\u0000\u0124\u0125\u0005s\u0000\u0000\u0125\u0126\u0005s\u0000\u0000\u0126"+
+ "F\u0001\u0000\u0000\u0000\u0127\u0128\u0005t\u0000\u0000\u0128\u0129\u0005"+
+ "h\u0000\u0000\u0129\u012a\u0005i\u0000\u0000\u012a\u012b\u0005s\u0000"+
+ "\u0000\u012bH\u0001\u0000\u0000\u0000\u012c\u012d\u0005w\u0000\u0000\u012d"+
+ "\u012e\u0005h\u0000\u0000\u012e\u012f\u0005i\u0000\u0000\u012f\u0130\u0005"+
+ "l\u0000\u0000\u0130\u0131\u0005e\u0000\u0000\u0131J\u0001\u0000\u0000"+
+ "\u0000\u0132\u0133\u0005d\u0000\u0000\u0133\u0134\u0005o\u0000\u0000\u0134"+
+ "L\u0001\u0000\u0000\u0000\u0135\u0136\u0005i\u0000\u0000\u0136\u0137\u0005"+
+ "f\u0000\u0000\u0137N\u0001\u0000\u0000\u0000\u0138\u0139\u0005e\u0000"+
+ "\u0000\u0139\u013a\u0005l\u0000\u0000\u013a\u013b\u0005s\u0000\u0000\u013b"+
+ "\u013c\u0005e\u0000\u0000\u013cP\u0001\u0000\u0000\u0000\u013d\u013e\u0005"+
+ "f\u0000\u0000\u013e\u013f\u0005o\u0000\u0000\u013f\u0140\u0005r\u0000"+
+ "\u0000\u0140R\u0001\u0000\u0000\u0000\u0141\u0142\u0005r\u0000\u0000\u0142"+
+ "\u0143\u0005e\u0000\u0000\u0143\u0144\u0005t\u0000\u0000\u0144\u0145\u0005"+
+ "u\u0000\u0000\u0145\u0146\u0005r\u0000\u0000\u0146\u0147\u0005n\u0000"+
+ "\u0000\u0147T\u0001\u0000\u0000\u0000\u0148\u0149\u0005n\u0000\u0000\u0149"+
+ "\u014a\u0005e\u0000\u0000\u014a\u014b\u0005w\u0000\u0000\u014bV\u0001"+
+ "\u0000\u0000\u0000\u014c\u0150\u0005\'\u0000\u0000\u014d\u014f\b\u0000"+
+ "\u0000\u0000\u014e\u014d\u0001\u0000\u0000\u0000\u014f\u0152\u0001\u0000"+
+ "\u0000\u0000\u0150\u014e\u0001\u0000\u0000\u0000\u0150\u0151\u0001\u0000"+
+ "\u0000\u0000\u0151\u0153\u0001\u0000\u0000\u0000\u0152\u0150\u0001\u0000"+
+ "\u0000\u0000\u0153\u0154\u0005\'\u0000\u0000\u0154X\u0001\u0000\u0000"+
+ "\u0000\u0155\u0157\u0003\u001d\u000e\u0000\u0156\u0155\u0001\u0000\u0000"+
+ "\u0000\u0156\u0157\u0001\u0000\u0000\u0000\u0157\u0159\u0001\u0000\u0000"+
+ "\u0000\u0158\u015a\u0003a0\u0000\u0159\u0158\u0001\u0000\u0000\u0000\u015a"+
+ "\u015b\u0001\u0000\u0000\u0000\u015b\u0159\u0001\u0000\u0000\u0000\u015b"+
+ "\u015c\u0001\u0000\u0000\u0000\u015cZ\u0001\u0000\u0000\u0000\u015d\u015e"+
+ "\u0005t\u0000\u0000\u015e\u015f\u0005r\u0000\u0000\u015f\u0160\u0005u"+
+ "\u0000\u0000\u0160\u0167\u0005e\u0000\u0000\u0161\u0162\u0005f\u0000\u0000"+
+ "\u0162\u0163\u0005a\u0000\u0000\u0163\u0164\u0005l\u0000\u0000\u0164\u0165"+
+ "\u0005s\u0000\u0000\u0165\u0167\u0005e\u0000\u0000\u0166\u015d\u0001\u0000"+
+ "\u0000\u0000\u0166\u0161\u0001\u0000\u0000\u0000\u0167\\\u0001\u0000\u0000"+
+ "\u0000\u0168\u0169\u0005n\u0000\u0000\u0169\u016a\u0005u\u0000\u0000\u016a"+
+ "\u016b\u0005l\u0000\u0000\u016b\u016c\u0005l\u0000\u0000\u016c^\u0001"+
+ "\u0000\u0000\u0000\u016d\u016e\u0007\u0001\u0000\u0000\u016e`\u0001\u0000"+
+ "\u0000\u0000\u016f\u0170\u0007\u0002\u0000\u0000\u0170b\u0001\u0000\u0000"+
+ "\u0000\u0171\u0175\u0003_/\u0000\u0172\u0175\u0003a0\u0000\u0173\u0175"+
+ "\u0007\u0003\u0000\u0000\u0174\u0171\u0001\u0000\u0000\u0000\u0174\u0172"+
+ "\u0001\u0000\u0000\u0000\u0174\u0173\u0001\u0000\u0000\u0000\u0175d\u0001"+
+ "\u0000\u0000\u0000\u0176\u017a\u0003_/\u0000\u0177\u0179\u0003c1\u0000"+
+ "\u0178\u0177\u0001\u0000\u0000\u0000\u0179\u017c\u0001\u0000\u0000\u0000"+
+ "\u017a\u0178\u0001\u0000\u0000\u0000\u017a\u017b\u0001\u0000\u0000\u0000"+
+ "\u017bf\u0001\u0000\u0000\u0000\u017c\u017a\u0001\u0000\u0000\u0000\u017d"+
+ "\u017f\u0007\u0004\u0000\u0000\u017e\u017d\u0001\u0000\u0000\u0000\u017f"+
+ "\u0180\u0001\u0000\u0000\u0000\u0180\u017e\u0001\u0000\u0000\u0000\u0180"+
+ "\u0181\u0001\u0000\u0000\u0000\u0181\u0182\u0001\u0000\u0000\u0000\u0182"+
+ "\u0183\u00063\u0000\u0000\u0183h\u0001\u0000\u0000\u0000\u0184\u0185\u0005"+
+ "/\u0000\u0000\u0185\u0186\u0005/\u0000\u0000\u0186\u018a\u0001\u0000\u0000"+
+ "\u0000\u0187\u0189\b\u0000\u0000\u0000\u0188\u0187\u0001\u0000\u0000\u0000"+
+ "\u0189\u018c\u0001\u0000\u0000\u0000\u018a\u0188\u0001\u0000\u0000\u0000"+
+ "\u018a\u018b\u0001\u0000\u0000\u0000\u018b\u018d\u0001\u0000\u0000\u0000"+
+ "\u018c\u018a\u0001\u0000\u0000\u0000\u018d\u018e\u00064\u0000\u0000\u018e"+
+ "j\u0001\u0000\u0000\u0000\u018f\u0190\u0005/\u0000\u0000\u0190\u0191\u0005"+
+ "*\u0000\u0000\u0191\u0195\u0001\u0000\u0000\u0000\u0192\u0194\t\u0000"+
+ "\u0000\u0000\u0193\u0192\u0001\u0000\u0000\u0000\u0194\u0197\u0001\u0000"+
+ "\u0000\u0000\u0195\u0196\u0001\u0000\u0000\u0000\u0195\u0193\u0001\u0000"+
+ "\u0000\u0000\u0196\u0198\u0001\u0000\u0000\u0000\u0197\u0195\u0001\u0000"+
+ "\u0000\u0000\u0198\u0199\u0005*\u0000\u0000\u0199\u019a\u0005/\u0000\u0000"+
+ "\u019a\u019b\u0001\u0000\u0000\u0000\u019b\u019c\u00065\u0000\u0000\u019c"+
+ "l\u0001\u0000\u0000\u0000\u000f\u0000\u00b1\u00dd\u00e1\u00e9\u00ed\u0150"+
+ "\u0156\u015b\u0166\u0174\u017a\u0180\u018a\u0195\u0001\u0006\u0000\u0000";
public static final ATN _ATN =
new ATNDeserializer().deserialize(_serializedATN.toCharArray());
static {
diff --git a/src/main/java/parser/generated/SimpleJavaLexer.tokens b/src/main/java/parser/generated/SimpleJavaLexer.tokens
index ffe0902..71246c8 100644
--- a/src/main/java/parser/generated/SimpleJavaLexer.tokens
+++ b/src/main/java/parser/generated/SimpleJavaLexer.tokens
@@ -41,18 +41,14 @@ Else=40
For=41
Return=42
New=43
-Switch=44
-Case=45
-Default=46
-Colon=47
-CharValue=48
-IntValue=49
-BooleanValue=50
-NullValue=51
-Identifier=52
-WS=53
-InlineComment=54
-MultilineComment=55
+CharValue=44
+IntValue=45
+BooleanValue=46
+NullValue=47
+Identifier=48
+WS=49
+InlineComment=50
+MultilineComment=51
'++'=1
'--'=2
'void'=3
@@ -91,8 +87,4 @@ MultilineComment=55
'for'=41
'return'=42
'new'=43
-'switch'=44
-'case'=45
-'default'=46
-':'=47
-'null'=51
+'null'=47
diff --git a/src/main/java/parser/generated/SimpleJavaListener.java b/src/main/java/parser/generated/SimpleJavaListener.java
index e5d9ce1..580bfe1 100644
--- a/src/main/java/parser/generated/SimpleJavaListener.java
+++ b/src/main/java/parser/generated/SimpleJavaListener.java
@@ -207,36 +207,6 @@ public interface SimpleJavaListener extends ParseTreeListener {
* @param ctx the parse tree
*/
void exitElseStatement(SimpleJavaParser.ElseStatementContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#switchStatement}.
- * @param ctx the parse tree
- */
- void enterSwitchStatement(SimpleJavaParser.SwitchStatementContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#switchStatement}.
- * @param ctx the parse tree
- */
- void exitSwitchStatement(SimpleJavaParser.SwitchStatementContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#caseStatement}.
- * @param ctx the parse tree
- */
- void enterCaseStatement(SimpleJavaParser.CaseStatementContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#caseStatement}.
- * @param ctx the parse tree
- */
- void exitCaseStatement(SimpleJavaParser.CaseStatementContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#defaultStatement}.
- * @param ctx the parse tree
- */
- void enterDefaultStatement(SimpleJavaParser.DefaultStatementContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#defaultStatement}.
- * @param ctx the parse tree
- */
- void exitDefaultStatement(SimpleJavaParser.DefaultStatementContext ctx);
/**
* Enter a parse tree produced by {@link SimpleJavaParser#statementExpression}.
* @param ctx the parse tree
diff --git a/src/main/java/parser/generated/SimpleJavaParser.java b/src/main/java/parser/generated/SimpleJavaParser.java
index f294da5..3a80a6a 100644
--- a/src/main/java/parser/generated/SimpleJavaParser.java
+++ b/src/main/java/parser/generated/SimpleJavaParser.java
@@ -23,9 +23,9 @@ public class SimpleJavaParser extends Parser {
Less=20, GreaterEqual=21, LessEqual=22, Equal=23, NotEqual=24, Not=25,
And=26, Or=27, Dot=28, OpenRoundBracket=29, ClosedRoundBracket=30, OpenCurlyBracket=31,
ClosedCurlyBracket=32, Semicolon=33, Comma=34, Class=35, This=36, While=37,
- Do=38, If=39, Else=40, For=41, Return=42, New=43, Switch=44, Case=45,
- Default=46, Colon=47, CharValue=48, IntValue=49, BooleanValue=50, NullValue=51,
- Identifier=52, WS=53, InlineComment=54, MultilineComment=55;
+ Do=38, If=39, Else=40, For=41, Return=42, New=43, CharValue=44, IntValue=45,
+ BooleanValue=46, NullValue=47, Identifier=48, WS=49, InlineComment=50,
+ MultilineComment=51;
public static final int
RULE_program = 0, RULE_classDeclaration = 1, RULE_memberDeclaration = 2,
RULE_constructorDeclaration = 3, RULE_fieldDeclaration = 4, RULE_methodDeclaration = 5,
@@ -33,30 +33,29 @@ public class SimpleJavaParser extends Parser {
RULE_blockStatement = 10, RULE_returnStatement = 11, RULE_localVariableDeclaration = 12,
RULE_whileStatement = 13, RULE_doWhileStatement = 14, RULE_forStatement = 15,
RULE_ifElseStatement = 16, RULE_ifStatement = 17, RULE_elseIfStatement = 18,
- RULE_elseStatement = 19, RULE_switchStatement = 20, RULE_caseStatement = 21,
- RULE_defaultStatement = 22, RULE_statementExpression = 23, RULE_assign = 24,
- RULE_newDeclaration = 25, RULE_expression = 26, RULE_unaryExpression = 27,
- RULE_notExpression = 28, RULE_crementExpression = 29, RULE_incrementExpression = 30,
- RULE_prefixIncrementExpression = 31, RULE_suffixIncrementExpression = 32,
- RULE_decrementExpression = 33, RULE_prefixDecrementExpression = 34, RULE_suffixDecrementExpression = 35,
- RULE_assignableExpression = 36, RULE_memberAccess = 37, RULE_binaryExpression = 38,
- RULE_calculationExpression = 39, RULE_dotExpression = 40, RULE_dotSubtractionExpression = 41,
- RULE_nonCalculationExpression = 42, RULE_methodCall = 43, RULE_target = 44,
- RULE_chainedMethod = 45, RULE_type = 46, RULE_value = 47, RULE_nonCalculationOperator = 48;
+ RULE_elseStatement = 19, RULE_statementExpression = 20, RULE_assign = 21,
+ RULE_newDeclaration = 22, RULE_expression = 23, RULE_unaryExpression = 24,
+ RULE_notExpression = 25, RULE_crementExpression = 26, RULE_incrementExpression = 27,
+ RULE_prefixIncrementExpression = 28, RULE_suffixIncrementExpression = 29,
+ RULE_decrementExpression = 30, RULE_prefixDecrementExpression = 31, RULE_suffixDecrementExpression = 32,
+ RULE_assignableExpression = 33, RULE_memberAccess = 34, RULE_binaryExpression = 35,
+ RULE_calculationExpression = 36, RULE_dotExpression = 37, RULE_dotSubtractionExpression = 38,
+ RULE_nonCalculationExpression = 39, RULE_methodCall = 40, RULE_target = 41,
+ RULE_chainedMethod = 42, RULE_type = 43, RULE_value = 44, RULE_nonCalculationOperator = 45;
private static String[] makeRuleNames() {
return new String[] {
"program", "classDeclaration", "memberDeclaration", "constructorDeclaration",
"fieldDeclaration", "methodDeclaration", "parameterList", "parameter",
"argumentList", "statement", "blockStatement", "returnStatement", "localVariableDeclaration",
"whileStatement", "doWhileStatement", "forStatement", "ifElseStatement",
- "ifStatement", "elseIfStatement", "elseStatement", "switchStatement",
- "caseStatement", "defaultStatement", "statementExpression", "assign",
- "newDeclaration", "expression", "unaryExpression", "notExpression", "crementExpression",
- "incrementExpression", "prefixIncrementExpression", "suffixIncrementExpression",
- "decrementExpression", "prefixDecrementExpression", "suffixDecrementExpression",
- "assignableExpression", "memberAccess", "binaryExpression", "calculationExpression",
- "dotExpression", "dotSubtractionExpression", "nonCalculationExpression",
- "methodCall", "target", "chainedMethod", "type", "value", "nonCalculationOperator"
+ "ifStatement", "elseIfStatement", "elseStatement", "statementExpression",
+ "assign", "newDeclaration", "expression", "unaryExpression", "notExpression",
+ "crementExpression", "incrementExpression", "prefixIncrementExpression",
+ "suffixIncrementExpression", "decrementExpression", "prefixDecrementExpression",
+ "suffixDecrementExpression", "assignableExpression", "memberAccess",
+ "binaryExpression", "calculationExpression", "dotExpression", "dotSubtractionExpression",
+ "nonCalculationExpression", "methodCall", "target", "chainedMethod",
+ "type", "value", "nonCalculationOperator"
};
}
public static final String[] ruleNames = makeRuleNames();
@@ -68,8 +67,7 @@ public class SimpleJavaParser extends Parser {
"'+'", "'-'", "'*'", "'%'", "'/'", "'>'", "'<'", "'>='", "'<='", "'=='",
"'!='", "'!'", "'&&'", "'||'", "'.'", "'('", "')'", "'{'", "'}'", "';'",
"','", "'class'", "'this'", "'while'", "'do'", "'if'", "'else'", "'for'",
- "'return'", "'new'", "'switch'", "'case'", "'default'", "':'", null,
- null, null, "'null'"
+ "'return'", "'new'", null, null, null, "'null'"
};
}
private static final String[] _LITERAL_NAMES = makeLiteralNames();
@@ -81,9 +79,9 @@ public class SimpleJavaParser extends Parser {
"Greater", "Less", "GreaterEqual", "LessEqual", "Equal", "NotEqual",
"Not", "And", "Or", "Dot", "OpenRoundBracket", "ClosedRoundBracket",
"OpenCurlyBracket", "ClosedCurlyBracket", "Semicolon", "Comma", "Class",
- "This", "While", "Do", "If", "Else", "For", "Return", "New", "Switch",
- "Case", "Default", "Colon", "CharValue", "IntValue", "BooleanValue",
- "NullValue", "Identifier", "WS", "InlineComment", "MultilineComment"
+ "This", "While", "Do", "If", "Else", "For", "Return", "New", "CharValue",
+ "IntValue", "BooleanValue", "NullValue", "Identifier", "WS", "InlineComment",
+ "MultilineComment"
};
}
private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames();
@@ -171,17 +169,17 @@ public class SimpleJavaParser extends Parser {
try {
enterOuterAlt(_localctx, 1);
{
- setState(99);
+ setState(93);
_errHandler.sync(this);
_la = _input.LA(1);
do {
{
{
- setState(98);
+ setState(92);
classDeclaration();
}
}
- setState(101);
+ setState(95);
_errHandler.sync(this);
_la = _input.LA(1);
} while ( _la==AccessModifier || _la==Class );
@@ -237,37 +235,37 @@ public class SimpleJavaParser extends Parser {
try {
enterOuterAlt(_localctx, 1);
{
- setState(104);
+ setState(98);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==AccessModifier) {
{
- setState(103);
+ setState(97);
match(AccessModifier);
}
}
- setState(106);
+ setState(100);
match(Class);
- setState(107);
+ setState(101);
match(Identifier);
- setState(108);
+ setState(102);
match(OpenCurlyBracket);
- setState(112);
+ setState(106);
_errHandler.sync(this);
_la = _input.LA(1);
- while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 4503599627371000L) != 0)) {
+ while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 281474976711160L) != 0)) {
{
{
- setState(109);
+ setState(103);
memberDeclaration();
}
}
- setState(114);
+ setState(108);
_errHandler.sync(this);
_la = _input.LA(1);
}
- setState(115);
+ setState(109);
match(ClosedCurlyBracket);
}
}
@@ -316,27 +314,27 @@ public class SimpleJavaParser extends Parser {
MemberDeclarationContext _localctx = new MemberDeclarationContext(_ctx, getState());
enterRule(_localctx, 4, RULE_memberDeclaration);
try {
- setState(120);
+ setState(114);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,3,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
- setState(117);
+ setState(111);
constructorDeclaration();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
- setState(118);
+ setState(112);
fieldDeclaration();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
- setState(119);
+ setState(113);
methodDeclaration();
}
break;
@@ -391,33 +389,33 @@ public class SimpleJavaParser extends Parser {
try {
enterOuterAlt(_localctx, 1);
{
- setState(123);
+ setState(117);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==AccessModifier) {
{
- setState(122);
+ setState(116);
match(AccessModifier);
}
}
- setState(125);
+ setState(119);
match(Identifier);
- setState(126);
+ setState(120);
match(OpenRoundBracket);
- setState(128);
+ setState(122);
_errHandler.sync(this);
_la = _input.LA(1);
- if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 4503599627370608L) != 0)) {
+ if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 281474976710768L) != 0)) {
{
- setState(127);
+ setState(121);
parameterList();
}
}
- setState(130);
+ setState(124);
match(ClosedRoundBracket);
- setState(131);
+ setState(125);
blockStatement();
}
}
@@ -466,21 +464,21 @@ public class SimpleJavaParser extends Parser {
try {
enterOuterAlt(_localctx, 1);
{
- setState(134);
+ setState(128);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==AccessModifier) {
{
- setState(133);
+ setState(127);
match(AccessModifier);
}
}
- setState(136);
+ setState(130);
type();
- setState(137);
+ setState(131);
match(Identifier);
- setState(138);
+ setState(132);
match(Semicolon);
}
}
@@ -536,15 +534,15 @@ public class SimpleJavaParser extends Parser {
enterRule(_localctx, 10, RULE_methodDeclaration);
int _la;
try {
- setState(156);
+ setState(150);
_errHandler.sync(this);
switch (_input.LA(1)) {
case MainMethodDeclaration:
enterOuterAlt(_localctx, 1);
{
- setState(140);
+ setState(134);
match(MainMethodDeclaration);
- setState(141);
+ setState(135);
blockStatement();
}
break;
@@ -556,17 +554,17 @@ public class SimpleJavaParser extends Parser {
case Identifier:
enterOuterAlt(_localctx, 2);
{
- setState(143);
+ setState(137);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==AccessModifier) {
{
- setState(142);
+ setState(136);
match(AccessModifier);
}
}
- setState(147);
+ setState(141);
_errHandler.sync(this);
switch (_input.LA(1)) {
case Boolean:
@@ -574,36 +572,36 @@ public class SimpleJavaParser extends Parser {
case Int:
case Identifier:
{
- setState(145);
+ setState(139);
type();
}
break;
case Void:
{
- setState(146);
+ setState(140);
match(Void);
}
break;
default:
throw new NoViableAltException(this);
}
- setState(149);
+ setState(143);
match(Identifier);
- setState(150);
+ setState(144);
match(OpenRoundBracket);
- setState(152);
+ setState(146);
_errHandler.sync(this);
_la = _input.LA(1);
- if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 4503599627370608L) != 0)) {
+ if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 281474976710768L) != 0)) {
{
- setState(151);
+ setState(145);
parameterList();
}
}
- setState(154);
+ setState(148);
match(ClosedRoundBracket);
- setState(155);
+ setState(149);
blockStatement();
}
break;
@@ -660,21 +658,21 @@ public class SimpleJavaParser extends Parser {
try {
enterOuterAlt(_localctx, 1);
{
- setState(158);
+ setState(152);
parameter();
- setState(163);
+ setState(157);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==Comma) {
{
{
- setState(159);
+ setState(153);
match(Comma);
- setState(160);
+ setState(154);
parameter();
}
}
- setState(165);
+ setState(159);
_errHandler.sync(this);
_la = _input.LA(1);
}
@@ -722,9 +720,9 @@ public class SimpleJavaParser extends Parser {
try {
enterOuterAlt(_localctx, 1);
{
- setState(166);
+ setState(160);
type();
- setState(167);
+ setState(161);
match(Identifier);
}
}
@@ -777,26 +775,26 @@ public class SimpleJavaParser extends Parser {
try {
enterOuterAlt(_localctx, 1);
{
- setState(177);
+ setState(171);
_errHandler.sync(this);
_la = _input.LA(1);
- if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 8734589660954630L) != 0)) {
+ if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 554223150301190L) != 0)) {
{
- setState(169);
+ setState(163);
expression();
- setState(174);
+ setState(168);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==Comma) {
{
{
- setState(170);
+ setState(164);
match(Comma);
- setState(171);
+ setState(165);
expression();
}
}
- setState(176);
+ setState(170);
_errHandler.sync(this);
_la = _input.LA(1);
}
@@ -840,9 +838,6 @@ public class SimpleJavaParser extends Parser {
public IfElseStatementContext ifElseStatement() {
return getRuleContext(IfElseStatementContext.class,0);
}
- public SwitchStatementContext switchStatement() {
- return getRuleContext(SwitchStatementContext.class,0);
- }
public StatementExpressionContext statementExpression() {
return getRuleContext(StatementExpressionContext.class,0);
}
@@ -869,75 +864,68 @@ public class SimpleJavaParser extends Parser {
StatementContext _localctx = new StatementContext(_ctx, getState());
enterRule(_localctx, 18, RULE_statement);
try {
- setState(194);
+ setState(187);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,14,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
- setState(179);
+ setState(173);
returnStatement();
- setState(180);
+ setState(174);
match(Semicolon);
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
- setState(182);
+ setState(176);
localVariableDeclaration();
- setState(183);
+ setState(177);
match(Semicolon);
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
- setState(185);
+ setState(179);
blockStatement();
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
- setState(186);
+ setState(180);
whileStatement();
}
break;
case 5:
enterOuterAlt(_localctx, 5);
{
- setState(187);
+ setState(181);
doWhileStatement();
}
break;
case 6:
enterOuterAlt(_localctx, 6);
{
- setState(188);
+ setState(182);
forStatement();
}
break;
case 7:
enterOuterAlt(_localctx, 7);
{
- setState(189);
+ setState(183);
ifElseStatement();
}
break;
case 8:
enterOuterAlt(_localctx, 8);
{
- setState(190);
- switchStatement();
- }
- break;
- case 9:
- enterOuterAlt(_localctx, 9);
- {
- setState(191);
+ setState(184);
statementExpression();
- setState(192);
+ setState(185);
match(Semicolon);
}
break;
@@ -990,23 +978,23 @@ public class SimpleJavaParser extends Parser {
try {
enterOuterAlt(_localctx, 1);
{
- setState(196);
+ setState(189);
match(OpenCurlyBracket);
- setState(200);
+ setState(193);
_errHandler.sync(this);
_la = _input.LA(1);
- while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 4537617915838582L) != 0)) {
+ while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 297901079134326L) != 0)) {
{
{
- setState(197);
+ setState(190);
statement();
}
}
- setState(202);
+ setState(195);
_errHandler.sync(this);
_la = _input.LA(1);
}
- setState(203);
+ setState(196);
match(ClosedCurlyBracket);
}
}
@@ -1053,14 +1041,14 @@ public class SimpleJavaParser extends Parser {
try {
enterOuterAlt(_localctx, 1);
{
- setState(205);
+ setState(198);
match(Return);
- setState(207);
+ setState(200);
_errHandler.sync(this);
_la = _input.LA(1);
- if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 8734589660954630L) != 0)) {
+ if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 554223150301190L) != 0)) {
{
- setState(206);
+ setState(199);
expression();
}
}
@@ -1114,18 +1102,18 @@ public class SimpleJavaParser extends Parser {
try {
enterOuterAlt(_localctx, 1);
{
- setState(209);
+ setState(202);
type();
- setState(210);
+ setState(203);
match(Identifier);
- setState(213);
+ setState(206);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Assign) {
{
- setState(211);
+ setState(204);
match(Assign);
- setState(212);
+ setState(205);
expression();
}
}
@@ -1179,15 +1167,15 @@ public class SimpleJavaParser extends Parser {
try {
enterOuterAlt(_localctx, 1);
{
- setState(215);
+ setState(208);
match(While);
- setState(216);
+ setState(209);
match(OpenRoundBracket);
- setState(217);
+ setState(210);
expression();
- setState(218);
+ setState(211);
match(ClosedRoundBracket);
- setState(219);
+ setState(212);
blockStatement();
}
}
@@ -1240,19 +1228,19 @@ public class SimpleJavaParser extends Parser {
try {
enterOuterAlt(_localctx, 1);
{
- setState(221);
+ setState(214);
match(Do);
- setState(222);
+ setState(215);
blockStatement();
- setState(223);
+ setState(216);
match(While);
- setState(224);
+ setState(217);
match(OpenRoundBracket);
- setState(225);
+ setState(218);
expression();
- setState(226);
+ setState(219);
match(ClosedRoundBracket);
- setState(227);
+ setState(220);
match(Semicolon);
}
}
@@ -1317,53 +1305,53 @@ public class SimpleJavaParser extends Parser {
try {
enterOuterAlt(_localctx, 1);
{
- setState(229);
+ setState(222);
match(For);
- setState(230);
+ setState(223);
match(OpenRoundBracket);
- setState(233);
+ setState(226);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,18,_ctx) ) {
case 1:
{
- setState(231);
+ setState(224);
statementExpression();
}
break;
case 2:
{
- setState(232);
+ setState(225);
localVariableDeclaration();
}
break;
}
- setState(235);
+ setState(228);
match(Semicolon);
- setState(237);
+ setState(230);
_errHandler.sync(this);
_la = _input.LA(1);
- if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 8734589660954630L) != 0)) {
+ if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 554223150301190L) != 0)) {
{
- setState(236);
+ setState(229);
expression();
}
}
- setState(239);
+ setState(232);
match(Semicolon);
- setState(241);
+ setState(234);
_errHandler.sync(this);
_la = _input.LA(1);
- if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 4512464439869446L) != 0)) {
+ if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 290339789209606L) != 0)) {
{
- setState(240);
+ setState(233);
statementExpression();
}
}
- setState(243);
+ setState(236);
match(ClosedRoundBracket);
- setState(244);
+ setState(237);
blockStatement();
}
}
@@ -1419,30 +1407,30 @@ public class SimpleJavaParser extends Parser {
int _alt;
enterOuterAlt(_localctx, 1);
{
- setState(246);
+ setState(239);
ifStatement();
- setState(250);
+ setState(243);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,21,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
- setState(247);
+ setState(240);
elseIfStatement();
}
}
}
- setState(252);
+ setState(245);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,21,_ctx);
}
- setState(254);
+ setState(247);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Else) {
{
- setState(253);
+ setState(246);
elseStatement();
}
}
@@ -1496,15 +1484,15 @@ public class SimpleJavaParser extends Parser {
try {
enterOuterAlt(_localctx, 1);
{
- setState(256);
+ setState(249);
match(If);
- setState(257);
+ setState(250);
match(OpenRoundBracket);
- setState(258);
+ setState(251);
expression();
- setState(259);
+ setState(252);
match(ClosedRoundBracket);
- setState(260);
+ setState(253);
blockStatement();
}
}
@@ -1556,17 +1544,17 @@ public class SimpleJavaParser extends Parser {
try {
enterOuterAlt(_localctx, 1);
{
- setState(262);
+ setState(255);
match(Else);
- setState(263);
+ setState(256);
match(If);
- setState(264);
+ setState(257);
match(OpenRoundBracket);
- setState(265);
+ setState(258);
expression();
- setState(266);
+ setState(259);
match(ClosedRoundBracket);
- setState(267);
+ setState(260);
blockStatement();
}
}
@@ -1612,9 +1600,9 @@ public class SimpleJavaParser extends Parser {
try {
enterOuterAlt(_localctx, 1);
{
- setState(269);
+ setState(262);
match(Else);
- setState(270);
+ setState(263);
blockStatement();
}
}
@@ -1629,239 +1617,6 @@ public class SimpleJavaParser extends Parser {
return _localctx;
}
- @SuppressWarnings("CheckReturnValue")
- public static class SwitchStatementContext extends ParserRuleContext {
- public TerminalNode Switch() { return getToken(SimpleJavaParser.Switch, 0); }
- public TerminalNode OpenRoundBracket() { return getToken(SimpleJavaParser.OpenRoundBracket, 0); }
- public ExpressionContext expression() {
- return getRuleContext(ExpressionContext.class,0);
- }
- public TerminalNode ClosedRoundBracket() { return getToken(SimpleJavaParser.ClosedRoundBracket, 0); }
- public TerminalNode OpenCurlyBracket() { return getToken(SimpleJavaParser.OpenCurlyBracket, 0); }
- public TerminalNode ClosedCurlyBracket() { return getToken(SimpleJavaParser.ClosedCurlyBracket, 0); }
- public List caseStatement() {
- return getRuleContexts(CaseStatementContext.class);
- }
- public CaseStatementContext caseStatement(int i) {
- return getRuleContext(CaseStatementContext.class,i);
- }
- public DefaultStatementContext defaultStatement() {
- return getRuleContext(DefaultStatementContext.class,0);
- }
- public SwitchStatementContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_switchStatement; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterSwitchStatement(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitSwitchStatement(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitSwitchStatement(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final SwitchStatementContext switchStatement() throws RecognitionException {
- SwitchStatementContext _localctx = new SwitchStatementContext(_ctx, getState());
- enterRule(_localctx, 40, RULE_switchStatement);
- int _la;
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(272);
- match(Switch);
- setState(273);
- match(OpenRoundBracket);
- setState(274);
- expression();
- setState(275);
- match(ClosedRoundBracket);
- setState(276);
- match(OpenCurlyBracket);
- setState(278);
- _errHandler.sync(this);
- _la = _input.LA(1);
- do {
- {
- {
- setState(277);
- caseStatement();
- }
- }
- setState(280);
- _errHandler.sync(this);
- _la = _input.LA(1);
- } while ( _la==Case );
- setState(283);
- _errHandler.sync(this);
- _la = _input.LA(1);
- if (_la==Default) {
- {
- setState(282);
- defaultStatement();
- }
- }
-
- setState(285);
- match(ClosedCurlyBracket);
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class CaseStatementContext extends ParserRuleContext {
- public TerminalNode Case() { return getToken(SimpleJavaParser.Case, 0); }
- public ValueContext value() {
- return getRuleContext(ValueContext.class,0);
- }
- public TerminalNode Colon() { return getToken(SimpleJavaParser.Colon, 0); }
- public List statement() {
- return getRuleContexts(StatementContext.class);
- }
- public StatementContext statement(int i) {
- return getRuleContext(StatementContext.class,i);
- }
- public CaseStatementContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_caseStatement; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterCaseStatement(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitCaseStatement(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitCaseStatement(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final CaseStatementContext caseStatement() throws RecognitionException {
- CaseStatementContext _localctx = new CaseStatementContext(_ctx, getState());
- enterRule(_localctx, 42, RULE_caseStatement);
- int _la;
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(287);
- match(Case);
- setState(288);
- value();
- setState(289);
- match(Colon);
- setState(293);
- _errHandler.sync(this);
- _la = _input.LA(1);
- while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 4537617915838582L) != 0)) {
- {
- {
- setState(290);
- statement();
- }
- }
- setState(295);
- _errHandler.sync(this);
- _la = _input.LA(1);
- }
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class DefaultStatementContext extends ParserRuleContext {
- public TerminalNode Default() { return getToken(SimpleJavaParser.Default, 0); }
- public TerminalNode Colon() { return getToken(SimpleJavaParser.Colon, 0); }
- public List statement() {
- return getRuleContexts(StatementContext.class);
- }
- public StatementContext statement(int i) {
- return getRuleContext(StatementContext.class,i);
- }
- public DefaultStatementContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_defaultStatement; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterDefaultStatement(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitDefaultStatement(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitDefaultStatement(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final DefaultStatementContext defaultStatement() throws RecognitionException {
- DefaultStatementContext _localctx = new DefaultStatementContext(_ctx, getState());
- enterRule(_localctx, 44, RULE_defaultStatement);
- int _la;
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(296);
- match(Default);
- setState(297);
- match(Colon);
- setState(301);
- _errHandler.sync(this);
- _la = _input.LA(1);
- while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 4537617915838582L) != 0)) {
- {
- {
- setState(298);
- statement();
- }
- }
- setState(303);
- _errHandler.sync(this);
- _la = _input.LA(1);
- }
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
@SuppressWarnings("CheckReturnValue")
public static class StatementExpressionContext extends ParserRuleContext {
public AssignContext assign() {
@@ -1897,36 +1652,36 @@ public class SimpleJavaParser extends Parser {
public final StatementExpressionContext statementExpression() throws RecognitionException {
StatementExpressionContext _localctx = new StatementExpressionContext(_ctx, getState());
- enterRule(_localctx, 46, RULE_statementExpression);
+ enterRule(_localctx, 40, RULE_statementExpression);
try {
- setState(308);
+ setState(269);
_errHandler.sync(this);
- switch ( getInterpreter().adaptivePredict(_input,27,_ctx) ) {
+ switch ( getInterpreter().adaptivePredict(_input,23,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
- setState(304);
+ setState(265);
assign();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
- setState(305);
+ setState(266);
newDeclaration();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
- setState(306);
+ setState(267);
methodCall();
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
- setState(307);
+ setState(268);
crementExpression();
}
break;
@@ -1973,15 +1728,15 @@ public class SimpleJavaParser extends Parser {
public final AssignContext assign() throws RecognitionException {
AssignContext _localctx = new AssignContext(_ctx, getState());
- enterRule(_localctx, 48, RULE_assign);
+ enterRule(_localctx, 42, RULE_assign);
try {
enterOuterAlt(_localctx, 1);
{
- setState(310);
+ setState(271);
assignableExpression();
- setState(311);
+ setState(272);
match(Assign);
- setState(312);
+ setState(273);
expression();
}
}
@@ -2026,19 +1781,19 @@ public class SimpleJavaParser extends Parser {
public final NewDeclarationContext newDeclaration() throws RecognitionException {
NewDeclarationContext _localctx = new NewDeclarationContext(_ctx, getState());
- enterRule(_localctx, 50, RULE_newDeclaration);
+ enterRule(_localctx, 44, RULE_newDeclaration);
try {
enterOuterAlt(_localctx, 1);
{
- setState(314);
+ setState(275);
match(New);
- setState(315);
+ setState(276);
match(Identifier);
- setState(316);
+ setState(277);
match(OpenRoundBracket);
- setState(317);
+ setState(278);
argumentList();
- setState(318);
+ setState(279);
match(ClosedRoundBracket);
}
}
@@ -2082,22 +1837,22 @@ public class SimpleJavaParser extends Parser {
public final ExpressionContext expression() throws RecognitionException {
ExpressionContext _localctx = new ExpressionContext(_ctx, getState());
- enterRule(_localctx, 52, RULE_expression);
+ enterRule(_localctx, 46, RULE_expression);
try {
- setState(322);
+ setState(283);
_errHandler.sync(this);
- switch ( getInterpreter().adaptivePredict(_input,28,_ctx) ) {
+ switch ( getInterpreter().adaptivePredict(_input,24,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
- setState(320);
+ setState(281);
unaryExpression();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
- setState(321);
+ setState(282);
binaryExpression();
}
break;
@@ -2156,61 +1911,61 @@ public class SimpleJavaParser extends Parser {
public final UnaryExpressionContext unaryExpression() throws RecognitionException {
UnaryExpressionContext _localctx = new UnaryExpressionContext(_ctx, getState());
- enterRule(_localctx, 54, RULE_unaryExpression);
+ enterRule(_localctx, 48, RULE_unaryExpression);
try {
- setState(334);
+ setState(295);
_errHandler.sync(this);
- switch ( getInterpreter().adaptivePredict(_input,29,_ctx) ) {
+ switch ( getInterpreter().adaptivePredict(_input,25,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
- setState(324);
+ setState(285);
match(This);
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
- setState(325);
+ setState(286);
match(Identifier);
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
- setState(326);
+ setState(287);
memberAccess();
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
- setState(327);
+ setState(288);
value();
}
break;
case 5:
enterOuterAlt(_localctx, 5);
{
- setState(328);
+ setState(289);
notExpression();
}
break;
case 6:
enterOuterAlt(_localctx, 6);
{
- setState(329);
+ setState(290);
statementExpression();
}
break;
case 7:
enterOuterAlt(_localctx, 7);
{
- setState(330);
+ setState(291);
match(OpenRoundBracket);
- setState(331);
+ setState(292);
expression();
- setState(332);
+ setState(293);
match(ClosedRoundBracket);
}
break;
@@ -2254,13 +2009,13 @@ public class SimpleJavaParser extends Parser {
public final NotExpressionContext notExpression() throws RecognitionException {
NotExpressionContext _localctx = new NotExpressionContext(_ctx, getState());
- enterRule(_localctx, 56, RULE_notExpression);
+ enterRule(_localctx, 50, RULE_notExpression);
try {
enterOuterAlt(_localctx, 1);
{
- setState(336);
+ setState(297);
match(Not);
- setState(337);
+ setState(298);
expression();
}
}
@@ -2304,22 +2059,22 @@ public class SimpleJavaParser extends Parser {
public final CrementExpressionContext crementExpression() throws RecognitionException {
CrementExpressionContext _localctx = new CrementExpressionContext(_ctx, getState());
- enterRule(_localctx, 58, RULE_crementExpression);
+ enterRule(_localctx, 52, RULE_crementExpression);
try {
- setState(341);
+ setState(302);
_errHandler.sync(this);
- switch ( getInterpreter().adaptivePredict(_input,30,_ctx) ) {
+ switch ( getInterpreter().adaptivePredict(_input,26,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
- setState(339);
+ setState(300);
incrementExpression();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
- setState(340);
+ setState(301);
decrementExpression();
}
break;
@@ -2365,15 +2120,15 @@ public class SimpleJavaParser extends Parser {
public final IncrementExpressionContext incrementExpression() throws RecognitionException {
IncrementExpressionContext _localctx = new IncrementExpressionContext(_ctx, getState());
- enterRule(_localctx, 60, RULE_incrementExpression);
+ enterRule(_localctx, 54, RULE_incrementExpression);
try {
- setState(345);
+ setState(306);
_errHandler.sync(this);
switch (_input.LA(1)) {
case T__0:
enterOuterAlt(_localctx, 1);
{
- setState(343);
+ setState(304);
prefixIncrementExpression();
}
break;
@@ -2381,7 +2136,7 @@ public class SimpleJavaParser extends Parser {
case Identifier:
enterOuterAlt(_localctx, 2);
{
- setState(344);
+ setState(305);
suffixIncrementExpression();
}
break;
@@ -2426,13 +2181,13 @@ public class SimpleJavaParser extends Parser {
public final PrefixIncrementExpressionContext prefixIncrementExpression() throws RecognitionException {
PrefixIncrementExpressionContext _localctx = new PrefixIncrementExpressionContext(_ctx, getState());
- enterRule(_localctx, 62, RULE_prefixIncrementExpression);
+ enterRule(_localctx, 56, RULE_prefixIncrementExpression);
try {
enterOuterAlt(_localctx, 1);
{
- setState(347);
+ setState(308);
match(T__0);
- setState(348);
+ setState(309);
assignableExpression();
}
}
@@ -2473,13 +2228,13 @@ public class SimpleJavaParser extends Parser {
public final SuffixIncrementExpressionContext suffixIncrementExpression() throws RecognitionException {
SuffixIncrementExpressionContext _localctx = new SuffixIncrementExpressionContext(_ctx, getState());
- enterRule(_localctx, 64, RULE_suffixIncrementExpression);
+ enterRule(_localctx, 58, RULE_suffixIncrementExpression);
try {
enterOuterAlt(_localctx, 1);
{
- setState(350);
+ setState(311);
assignableExpression();
- setState(351);
+ setState(312);
match(T__0);
}
}
@@ -2523,15 +2278,15 @@ public class SimpleJavaParser extends Parser {
public final DecrementExpressionContext decrementExpression() throws RecognitionException {
DecrementExpressionContext _localctx = new DecrementExpressionContext(_ctx, getState());
- enterRule(_localctx, 66, RULE_decrementExpression);
+ enterRule(_localctx, 60, RULE_decrementExpression);
try {
- setState(355);
+ setState(316);
_errHandler.sync(this);
switch (_input.LA(1)) {
case T__1:
enterOuterAlt(_localctx, 1);
{
- setState(353);
+ setState(314);
prefixDecrementExpression();
}
break;
@@ -2539,7 +2294,7 @@ public class SimpleJavaParser extends Parser {
case Identifier:
enterOuterAlt(_localctx, 2);
{
- setState(354);
+ setState(315);
suffixDecrementExpression();
}
break;
@@ -2584,13 +2339,13 @@ public class SimpleJavaParser extends Parser {
public final PrefixDecrementExpressionContext prefixDecrementExpression() throws RecognitionException {
PrefixDecrementExpressionContext _localctx = new PrefixDecrementExpressionContext(_ctx, getState());
- enterRule(_localctx, 68, RULE_prefixDecrementExpression);
+ enterRule(_localctx, 62, RULE_prefixDecrementExpression);
try {
enterOuterAlt(_localctx, 1);
{
- setState(357);
+ setState(318);
match(T__1);
- setState(358);
+ setState(319);
assignableExpression();
}
}
@@ -2631,13 +2386,13 @@ public class SimpleJavaParser extends Parser {
public final SuffixDecrementExpressionContext suffixDecrementExpression() throws RecognitionException {
SuffixDecrementExpressionContext _localctx = new SuffixDecrementExpressionContext(_ctx, getState());
- enterRule(_localctx, 70, RULE_suffixDecrementExpression);
+ enterRule(_localctx, 64, RULE_suffixDecrementExpression);
try {
enterOuterAlt(_localctx, 1);
{
- setState(360);
+ setState(321);
assignableExpression();
- setState(361);
+ setState(322);
match(T__1);
}
}
@@ -2679,22 +2434,22 @@ public class SimpleJavaParser extends Parser {
public final AssignableExpressionContext assignableExpression() throws RecognitionException {
AssignableExpressionContext _localctx = new AssignableExpressionContext(_ctx, getState());
- enterRule(_localctx, 72, RULE_assignableExpression);
+ enterRule(_localctx, 66, RULE_assignableExpression);
try {
- setState(365);
+ setState(326);
_errHandler.sync(this);
- switch ( getInterpreter().adaptivePredict(_input,33,_ctx) ) {
+ switch ( getInterpreter().adaptivePredict(_input,29,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
- setState(363);
+ setState(324);
match(Identifier);
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
- setState(364);
+ setState(325);
memberAccess();
}
break;
@@ -2743,40 +2498,40 @@ public class SimpleJavaParser extends Parser {
public final MemberAccessContext memberAccess() throws RecognitionException {
MemberAccessContext _localctx = new MemberAccessContext(_ctx, getState());
- enterRule(_localctx, 74, RULE_memberAccess);
+ enterRule(_localctx, 68, RULE_memberAccess);
int _la;
try {
int _alt;
- setState(381);
+ setState(342);
_errHandler.sync(this);
- switch ( getInterpreter().adaptivePredict(_input,36,_ctx) ) {
+ switch ( getInterpreter().adaptivePredict(_input,32,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
- setState(367);
+ setState(328);
match(This);
- setState(368);
+ setState(329);
match(Dot);
- setState(369);
+ setState(330);
match(Identifier);
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
- setState(372);
+ setState(333);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==This) {
{
- setState(370);
+ setState(331);
match(This);
- setState(371);
+ setState(332);
match(Dot);
}
}
- setState(376);
+ setState(337);
_errHandler.sync(this);
_alt = 1;
do {
@@ -2784,9 +2539,9 @@ public class SimpleJavaParser extends Parser {
case 1:
{
{
- setState(374);
+ setState(335);
match(Identifier);
- setState(375);
+ setState(336);
match(Dot);
}
}
@@ -2794,11 +2549,11 @@ public class SimpleJavaParser extends Parser {
default:
throw new NoViableAltException(this);
}
- setState(378);
+ setState(339);
_errHandler.sync(this);
- _alt = getInterpreter().adaptivePredict(_input,35,_ctx);
+ _alt = getInterpreter().adaptivePredict(_input,31,_ctx);
} while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER );
- setState(380);
+ setState(341);
match(Identifier);
}
break;
@@ -2844,22 +2599,22 @@ public class SimpleJavaParser extends Parser {
public final BinaryExpressionContext binaryExpression() throws RecognitionException {
BinaryExpressionContext _localctx = new BinaryExpressionContext(_ctx, getState());
- enterRule(_localctx, 76, RULE_binaryExpression);
+ enterRule(_localctx, 70, RULE_binaryExpression);
try {
- setState(385);
+ setState(346);
_errHandler.sync(this);
- switch ( getInterpreter().adaptivePredict(_input,37,_ctx) ) {
+ switch ( getInterpreter().adaptivePredict(_input,33,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
- setState(383);
+ setState(344);
calculationExpression(0);
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
- setState(384);
+ setState(345);
nonCalculationExpression();
}
break;
@@ -2913,20 +2668,20 @@ public class SimpleJavaParser extends Parser {
int _parentState = getState();
CalculationExpressionContext _localctx = new CalculationExpressionContext(_ctx, _parentState);
CalculationExpressionContext _prevctx = _localctx;
- int _startState = 78;
- enterRecursionRule(_localctx, 78, RULE_calculationExpression, _p);
+ int _startState = 72;
+ enterRecursionRule(_localctx, 72, RULE_calculationExpression, _p);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
{
- setState(388);
+ setState(349);
dotExpression(0);
}
_ctx.stop = _input.LT(-1);
- setState(395);
+ setState(356);
_errHandler.sync(this);
- _alt = getInterpreter().adaptivePredict(_input,38,_ctx);
+ _alt = getInterpreter().adaptivePredict(_input,34,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
if ( _parseListeners!=null ) triggerExitRuleEvent();
@@ -2935,18 +2690,18 @@ public class SimpleJavaParser extends Parser {
{
_localctx = new CalculationExpressionContext(_parentctx, _parentState);
pushNewRecursionContext(_localctx, _startState, RULE_calculationExpression);
- setState(390);
+ setState(351);
if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)");
- setState(391);
+ setState(352);
match(LineOperator);
- setState(392);
+ setState(353);
dotExpression(0);
}
}
}
- setState(397);
+ setState(358);
_errHandler.sync(this);
- _alt = getInterpreter().adaptivePredict(_input,38,_ctx);
+ _alt = getInterpreter().adaptivePredict(_input,34,_ctx);
}
}
}
@@ -2998,20 +2753,20 @@ public class SimpleJavaParser extends Parser {
int _parentState = getState();
DotExpressionContext _localctx = new DotExpressionContext(_ctx, _parentState);
DotExpressionContext _prevctx = _localctx;
- int _startState = 80;
- enterRecursionRule(_localctx, 80, RULE_dotExpression, _p);
+ int _startState = 74;
+ enterRecursionRule(_localctx, 74, RULE_dotExpression, _p);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
{
- setState(399);
+ setState(360);
dotSubtractionExpression();
}
_ctx.stop = _input.LT(-1);
- setState(406);
+ setState(367);
_errHandler.sync(this);
- _alt = getInterpreter().adaptivePredict(_input,39,_ctx);
+ _alt = getInterpreter().adaptivePredict(_input,35,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
if ( _parseListeners!=null ) triggerExitRuleEvent();
@@ -3020,18 +2775,18 @@ public class SimpleJavaParser extends Parser {
{
_localctx = new DotExpressionContext(_parentctx, _parentState);
pushNewRecursionContext(_localctx, _startState, RULE_dotExpression);
- setState(401);
+ setState(362);
if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)");
- setState(402);
+ setState(363);
match(DotOperator);
- setState(403);
+ setState(364);
dotSubtractionExpression();
}
}
}
- setState(408);
+ setState(369);
_errHandler.sync(this);
- _alt = getInterpreter().adaptivePredict(_input,39,_ctx);
+ _alt = getInterpreter().adaptivePredict(_input,35,_ctx);
}
}
}
@@ -3082,42 +2837,42 @@ public class SimpleJavaParser extends Parser {
public final DotSubtractionExpressionContext dotSubtractionExpression() throws RecognitionException {
DotSubtractionExpressionContext _localctx = new DotSubtractionExpressionContext(_ctx, getState());
- enterRule(_localctx, 82, RULE_dotSubtractionExpression);
+ enterRule(_localctx, 76, RULE_dotSubtractionExpression);
try {
- setState(417);
+ setState(378);
_errHandler.sync(this);
- switch ( getInterpreter().adaptivePredict(_input,40,_ctx) ) {
+ switch ( getInterpreter().adaptivePredict(_input,36,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
- setState(409);
+ setState(370);
match(IntValue);
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
- setState(410);
+ setState(371);
match(Identifier);
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
- setState(411);
+ setState(372);
memberAccess();
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
- setState(412);
+ setState(373);
methodCall();
- setState(413);
+ setState(374);
match(OpenRoundBracket);
- setState(414);
+ setState(375);
calculationExpression(0);
- setState(415);
+ setState(376);
match(ClosedRoundBracket);
}
break;
@@ -3166,15 +2921,15 @@ public class SimpleJavaParser extends Parser {
public final NonCalculationExpressionContext nonCalculationExpression() throws RecognitionException {
NonCalculationExpressionContext _localctx = new NonCalculationExpressionContext(_ctx, getState());
- enterRule(_localctx, 84, RULE_nonCalculationExpression);
+ enterRule(_localctx, 78, RULE_nonCalculationExpression);
try {
enterOuterAlt(_localctx, 1);
{
- setState(419);
+ setState(380);
unaryExpression();
- setState(420);
+ setState(381);
nonCalculationOperator();
- setState(421);
+ setState(382);
expression();
}
}
@@ -3227,44 +2982,44 @@ public class SimpleJavaParser extends Parser {
public final MethodCallContext methodCall() throws RecognitionException {
MethodCallContext _localctx = new MethodCallContext(_ctx, getState());
- enterRule(_localctx, 86, RULE_methodCall);
+ enterRule(_localctx, 80, RULE_methodCall);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
- setState(424);
+ setState(385);
_errHandler.sync(this);
- switch ( getInterpreter().adaptivePredict(_input,41,_ctx) ) {
+ switch ( getInterpreter().adaptivePredict(_input,37,_ctx) ) {
case 1:
{
- setState(423);
+ setState(384);
target();
}
break;
}
- setState(429);
+ setState(390);
_errHandler.sync(this);
- _alt = getInterpreter().adaptivePredict(_input,42,_ctx);
+ _alt = getInterpreter().adaptivePredict(_input,38,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
- setState(426);
+ setState(387);
chainedMethod();
}
}
}
- setState(431);
+ setState(392);
_errHandler.sync(this);
- _alt = getInterpreter().adaptivePredict(_input,42,_ctx);
+ _alt = getInterpreter().adaptivePredict(_input,38,_ctx);
}
- setState(432);
+ setState(393);
match(Identifier);
- setState(433);
+ setState(394);
match(OpenRoundBracket);
- setState(434);
+ setState(395);
argumentList();
- setState(435);
+ setState(396);
match(ClosedRoundBracket);
}
}
@@ -3311,39 +3066,39 @@ public class SimpleJavaParser extends Parser {
public final TargetContext target() throws RecognitionException {
TargetContext _localctx = new TargetContext(_ctx, getState());
- enterRule(_localctx, 88, RULE_target);
+ enterRule(_localctx, 82, RULE_target);
try {
enterOuterAlt(_localctx, 1);
{
- setState(441);
+ setState(402);
_errHandler.sync(this);
- switch ( getInterpreter().adaptivePredict(_input,43,_ctx) ) {
+ switch ( getInterpreter().adaptivePredict(_input,39,_ctx) ) {
case 1:
{
- setState(437);
+ setState(398);
match(This);
}
break;
case 2:
{
- setState(438);
+ setState(399);
memberAccess();
}
break;
case 3:
{
- setState(439);
+ setState(400);
newDeclaration();
}
break;
case 4:
{
- setState(440);
+ setState(401);
match(Identifier);
}
break;
}
- setState(443);
+ setState(404);
match(Dot);
}
}
@@ -3388,19 +3143,19 @@ public class SimpleJavaParser extends Parser {
public final ChainedMethodContext chainedMethod() throws RecognitionException {
ChainedMethodContext _localctx = new ChainedMethodContext(_ctx, getState());
- enterRule(_localctx, 90, RULE_chainedMethod);
+ enterRule(_localctx, 84, RULE_chainedMethod);
try {
enterOuterAlt(_localctx, 1);
{
- setState(445);
+ setState(406);
match(Identifier);
- setState(446);
+ setState(407);
match(OpenRoundBracket);
- setState(447);
+ setState(408);
argumentList();
- setState(448);
+ setState(409);
match(ClosedRoundBracket);
- setState(449);
+ setState(410);
match(Dot);
}
}
@@ -3442,14 +3197,14 @@ public class SimpleJavaParser extends Parser {
public final TypeContext type() throws RecognitionException {
TypeContext _localctx = new TypeContext(_ctx, getState());
- enterRule(_localctx, 92, RULE_type);
+ enterRule(_localctx, 86, RULE_type);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
- setState(451);
+ setState(412);
_la = _input.LA(1);
- if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 4503599627370608L) != 0)) ) {
+ if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 281474976710768L) != 0)) ) {
_errHandler.recoverInline(this);
}
else {
@@ -3497,14 +3252,14 @@ public class SimpleJavaParser extends Parser {
public final ValueContext value() throws RecognitionException {
ValueContext _localctx = new ValueContext(_ctx, getState());
- enterRule(_localctx, 94, RULE_value);
+ enterRule(_localctx, 88, RULE_value);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
- setState(453);
+ setState(414);
_la = _input.LA(1);
- if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 4222124650659840L) != 0)) ) {
+ if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 263882790666240L) != 0)) ) {
_errHandler.recoverInline(this);
}
else {
@@ -3550,12 +3305,12 @@ public class SimpleJavaParser extends Parser {
public final NonCalculationOperatorContext nonCalculationOperator() throws RecognitionException {
NonCalculationOperatorContext _localctx = new NonCalculationOperatorContext(_ctx, getState());
- enterRule(_localctx, 96, RULE_nonCalculationOperator);
+ enterRule(_localctx, 90, RULE_nonCalculationOperator);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
- setState(455);
+ setState(416);
_la = _input.LA(1);
if ( !(_la==ComparisonOperator || _la==LogicalOperator) ) {
_errHandler.recoverInline(this);
@@ -3580,9 +3335,9 @@ public class SimpleJavaParser extends Parser {
public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) {
switch (ruleIndex) {
- case 39:
+ case 36:
return calculationExpression_sempred((CalculationExpressionContext)_localctx, predIndex);
- case 40:
+ case 37:
return dotExpression_sempred((DotExpressionContext)_localctx, predIndex);
}
return true;
@@ -3603,7 +3358,7 @@ public class SimpleJavaParser extends Parser {
}
public static final String _serializedATN =
- "\u0004\u00017\u01ca\u0002\u0000\u0007\u0000\u0002\u0001\u0007\u0001\u0002"+
+ "\u0004\u00013\u01a3\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"+
@@ -3616,278 +3371,252 @@ public class SimpleJavaParser extends Parser {
"\u0002\u001f\u0007\u001f\u0002 \u0007 \u0002!\u0007!\u0002\"\u0007\"\u0002"+
"#\u0007#\u0002$\u0007$\u0002%\u0007%\u0002&\u0007&\u0002\'\u0007\'\u0002"+
"(\u0007(\u0002)\u0007)\u0002*\u0007*\u0002+\u0007+\u0002,\u0007,\u0002"+
- "-\u0007-\u0002.\u0007.\u0002/\u0007/\u00020\u00070\u0001\u0000\u0004\u0000"+
- "d\b\u0000\u000b\u0000\f\u0000e\u0001\u0001\u0003\u0001i\b\u0001\u0001"+
- "\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0005\u0001o\b\u0001\n\u0001"+
- "\f\u0001r\t\u0001\u0001\u0001\u0001\u0001\u0001\u0002\u0001\u0002\u0001"+
- "\u0002\u0003\u0002y\b\u0002\u0001\u0003\u0003\u0003|\b\u0003\u0001\u0003"+
- "\u0001\u0003\u0001\u0003\u0003\u0003\u0081\b\u0003\u0001\u0003\u0001\u0003"+
- "\u0001\u0003\u0001\u0004\u0003\u0004\u0087\b\u0004\u0001\u0004\u0001\u0004"+
- "\u0001\u0004\u0001\u0004\u0001\u0005\u0001\u0005\u0001\u0005\u0003\u0005"+
- "\u0090\b\u0005\u0001\u0005\u0001\u0005\u0003\u0005\u0094\b\u0005\u0001"+
- "\u0005\u0001\u0005\u0001\u0005\u0003\u0005\u0099\b\u0005\u0001\u0005\u0001"+
- "\u0005\u0003\u0005\u009d\b\u0005\u0001\u0006\u0001\u0006\u0001\u0006\u0005"+
- "\u0006\u00a2\b\u0006\n\u0006\f\u0006\u00a5\t\u0006\u0001\u0007\u0001\u0007"+
- "\u0001\u0007\u0001\b\u0001\b\u0001\b\u0005\b\u00ad\b\b\n\b\f\b\u00b0\t"+
- "\b\u0003\b\u00b2\b\b\u0001\t\u0001\t\u0001\t\u0001\t\u0001\t\u0001\t\u0001"+
- "\t\u0001\t\u0001\t\u0001\t\u0001\t\u0001\t\u0001\t\u0001\t\u0001\t\u0003"+
- "\t\u00c3\b\t\u0001\n\u0001\n\u0005\n\u00c7\b\n\n\n\f\n\u00ca\t\n\u0001"+
- "\n\u0001\n\u0001\u000b\u0001\u000b\u0003\u000b\u00d0\b\u000b\u0001\f\u0001"+
- "\f\u0001\f\u0001\f\u0003\f\u00d6\b\f\u0001\r\u0001\r\u0001\r\u0001\r\u0001"+
- "\r\u0001\r\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e"+
- "\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000f\u0001\u000f\u0001\u000f"+
- "\u0001\u000f\u0003\u000f\u00ea\b\u000f\u0001\u000f\u0001\u000f\u0003\u000f"+
- "\u00ee\b\u000f\u0001\u000f\u0001\u000f\u0003\u000f\u00f2\b\u000f\u0001"+
- "\u000f\u0001\u000f\u0001\u000f\u0001\u0010\u0001\u0010\u0005\u0010\u00f9"+
- "\b\u0010\n\u0010\f\u0010\u00fc\t\u0010\u0001\u0010\u0003\u0010\u00ff\b"+
- "\u0010\u0001\u0011\u0001\u0011\u0001\u0011\u0001\u0011\u0001\u0011\u0001"+
- "\u0011\u0001\u0012\u0001\u0012\u0001\u0012\u0001\u0012\u0001\u0012\u0001"+
- "\u0012\u0001\u0012\u0001\u0013\u0001\u0013\u0001\u0013\u0001\u0014\u0001"+
- "\u0014\u0001\u0014\u0001\u0014\u0001\u0014\u0001\u0014\u0004\u0014\u0117"+
- "\b\u0014\u000b\u0014\f\u0014\u0118\u0001\u0014\u0003\u0014\u011c\b\u0014"+
- "\u0001\u0014\u0001\u0014\u0001\u0015\u0001\u0015\u0001\u0015\u0001\u0015"+
- "\u0005\u0015\u0124\b\u0015\n\u0015\f\u0015\u0127\t\u0015\u0001\u0016\u0001"+
- "\u0016\u0001\u0016\u0005\u0016\u012c\b\u0016\n\u0016\f\u0016\u012f\t\u0016"+
- "\u0001\u0017\u0001\u0017\u0001\u0017\u0001\u0017\u0003\u0017\u0135\b\u0017"+
- "\u0001\u0018\u0001\u0018\u0001\u0018\u0001\u0018\u0001\u0019\u0001\u0019"+
- "\u0001\u0019\u0001\u0019\u0001\u0019\u0001\u0019\u0001\u001a\u0001\u001a"+
- "\u0003\u001a\u0143\b\u001a\u0001\u001b\u0001\u001b\u0001\u001b\u0001\u001b"+
- "\u0001\u001b\u0001\u001b\u0001\u001b\u0001\u001b\u0001\u001b\u0001\u001b"+
- "\u0003\u001b\u014f\b\u001b\u0001\u001c\u0001\u001c\u0001\u001c\u0001\u001d"+
- "\u0001\u001d\u0003\u001d\u0156\b\u001d\u0001\u001e\u0001\u001e\u0003\u001e"+
- "\u015a\b\u001e\u0001\u001f\u0001\u001f\u0001\u001f\u0001 \u0001 \u0001"+
- " \u0001!\u0001!\u0003!\u0164\b!\u0001\"\u0001\"\u0001\"\u0001#\u0001#"+
- "\u0001#\u0001$\u0001$\u0003$\u016e\b$\u0001%\u0001%\u0001%\u0001%\u0001"+
- "%\u0003%\u0175\b%\u0001%\u0001%\u0004%\u0179\b%\u000b%\f%\u017a\u0001"+
- "%\u0003%\u017e\b%\u0001&\u0001&\u0003&\u0182\b&\u0001\'\u0001\'\u0001"+
- "\'\u0001\'\u0001\'\u0001\'\u0005\'\u018a\b\'\n\'\f\'\u018d\t\'\u0001("+
- "\u0001(\u0001(\u0001(\u0001(\u0001(\u0005(\u0195\b(\n(\f(\u0198\t(\u0001"+
- ")\u0001)\u0001)\u0001)\u0001)\u0001)\u0001)\u0001)\u0003)\u01a2\b)\u0001"+
- "*\u0001*\u0001*\u0001*\u0001+\u0003+\u01a9\b+\u0001+\u0005+\u01ac\b+\n"+
- "+\f+\u01af\t+\u0001+\u0001+\u0001+\u0001+\u0001+\u0001,\u0001,\u0001,"+
- "\u0001,\u0003,\u01ba\b,\u0001,\u0001,\u0001-\u0001-\u0001-\u0001-\u0001"+
- "-\u0001-\u0001.\u0001.\u0001/\u0001/\u00010\u00010\u00010\u0000\u0002"+
- "NP1\u0000\u0002\u0004\u0006\b\n\f\u000e\u0010\u0012\u0014\u0016\u0018"+
- "\u001a\u001c\u001e \"$&(*,.02468:<>@BDFHJLNPRTVXZ\\^`\u0000\u0003\u0002"+
- "\u0000\u0004\u000644\u0001\u000003\u0001\u0000\u000b\f\u01d7\u0000c\u0001"+
- "\u0000\u0000\u0000\u0002h\u0001\u0000\u0000\u0000\u0004x\u0001\u0000\u0000"+
- "\u0000\u0006{\u0001\u0000\u0000\u0000\b\u0086\u0001\u0000\u0000\u0000"+
- "\n\u009c\u0001\u0000\u0000\u0000\f\u009e\u0001\u0000\u0000\u0000\u000e"+
- "\u00a6\u0001\u0000\u0000\u0000\u0010\u00b1\u0001\u0000\u0000\u0000\u0012"+
- "\u00c2\u0001\u0000\u0000\u0000\u0014\u00c4\u0001\u0000\u0000\u0000\u0016"+
- "\u00cd\u0001\u0000\u0000\u0000\u0018\u00d1\u0001\u0000\u0000\u0000\u001a"+
- "\u00d7\u0001\u0000\u0000\u0000\u001c\u00dd\u0001\u0000\u0000\u0000\u001e"+
- "\u00e5\u0001\u0000\u0000\u0000 \u00f6\u0001\u0000\u0000\u0000\"\u0100"+
- "\u0001\u0000\u0000\u0000$\u0106\u0001\u0000\u0000\u0000&\u010d\u0001\u0000"+
- "\u0000\u0000(\u0110\u0001\u0000\u0000\u0000*\u011f\u0001\u0000\u0000\u0000"+
- ",\u0128\u0001\u0000\u0000\u0000.\u0134\u0001\u0000\u0000\u00000\u0136"+
- "\u0001\u0000\u0000\u00002\u013a\u0001\u0000\u0000\u00004\u0142\u0001\u0000"+
- "\u0000\u00006\u014e\u0001\u0000\u0000\u00008\u0150\u0001\u0000\u0000\u0000"+
- ":\u0155\u0001\u0000\u0000\u0000<\u0159\u0001\u0000\u0000\u0000>\u015b"+
- "\u0001\u0000\u0000\u0000@\u015e\u0001\u0000\u0000\u0000B\u0163\u0001\u0000"+
- "\u0000\u0000D\u0165\u0001\u0000\u0000\u0000F\u0168\u0001\u0000\u0000\u0000"+
- "H\u016d\u0001\u0000\u0000\u0000J\u017d\u0001\u0000\u0000\u0000L\u0181"+
- "\u0001\u0000\u0000\u0000N\u0183\u0001\u0000\u0000\u0000P\u018e\u0001\u0000"+
- "\u0000\u0000R\u01a1\u0001\u0000\u0000\u0000T\u01a3\u0001\u0000\u0000\u0000"+
- "V\u01a8\u0001\u0000\u0000\u0000X\u01b9\u0001\u0000\u0000\u0000Z\u01bd"+
- "\u0001\u0000\u0000\u0000\\\u01c3\u0001\u0000\u0000\u0000^\u01c5\u0001"+
- "\u0000\u0000\u0000`\u01c7\u0001\u0000\u0000\u0000bd\u0003\u0002\u0001"+
- "\u0000cb\u0001\u0000\u0000\u0000de\u0001\u0000\u0000\u0000ec\u0001\u0000"+
- "\u0000\u0000ef\u0001\u0000\u0000\u0000f\u0001\u0001\u0000\u0000\u0000"+
- "gi\u0005\u0007\u0000\u0000hg\u0001\u0000\u0000\u0000hi\u0001\u0000\u0000"+
- "\u0000ij\u0001\u0000\u0000\u0000jk\u0005#\u0000\u0000kl\u00054\u0000\u0000"+
- "lp\u0005\u001f\u0000\u0000mo\u0003\u0004\u0002\u0000nm\u0001\u0000\u0000"+
- "\u0000or\u0001\u0000\u0000\u0000pn\u0001\u0000\u0000\u0000pq\u0001\u0000"+
- "\u0000\u0000qs\u0001\u0000\u0000\u0000rp\u0001\u0000\u0000\u0000st\u0005"+
- " \u0000\u0000t\u0003\u0001\u0000\u0000\u0000uy\u0003\u0006\u0003\u0000"+
- "vy\u0003\b\u0004\u0000wy\u0003\n\u0005\u0000xu\u0001\u0000\u0000\u0000"+
- "xv\u0001\u0000\u0000\u0000xw\u0001\u0000\u0000\u0000y\u0005\u0001\u0000"+
- "\u0000\u0000z|\u0005\u0007\u0000\u0000{z\u0001\u0000\u0000\u0000{|\u0001"+
- "\u0000\u0000\u0000|}\u0001\u0000\u0000\u0000}~\u00054\u0000\u0000~\u0080"+
- "\u0005\u001d\u0000\u0000\u007f\u0081\u0003\f\u0006\u0000\u0080\u007f\u0001"+
- "\u0000\u0000\u0000\u0080\u0081\u0001\u0000\u0000\u0000\u0081\u0082\u0001"+
- "\u0000\u0000\u0000\u0082\u0083\u0005\u001e\u0000\u0000\u0083\u0084\u0003"+
- "\u0014\n\u0000\u0084\u0007\u0001\u0000\u0000\u0000\u0085\u0087\u0005\u0007"+
- "\u0000\u0000\u0086\u0085\u0001\u0000\u0000\u0000\u0086\u0087\u0001\u0000"+
- "\u0000\u0000\u0087\u0088\u0001\u0000\u0000\u0000\u0088\u0089\u0003\\."+
- "\u0000\u0089\u008a\u00054\u0000\u0000\u008a\u008b\u0005!\u0000\u0000\u008b"+
- "\t\u0001\u0000\u0000\u0000\u008c\u008d\u0005\b\u0000\u0000\u008d\u009d"+
- "\u0003\u0014\n\u0000\u008e\u0090\u0005\u0007\u0000\u0000\u008f\u008e\u0001"+
- "\u0000\u0000\u0000\u008f\u0090\u0001\u0000\u0000\u0000\u0090\u0093\u0001"+
- "\u0000\u0000\u0000\u0091\u0094\u0003\\.\u0000\u0092\u0094\u0005\u0003"+
- "\u0000\u0000\u0093\u0091\u0001\u0000\u0000\u0000\u0093\u0092\u0001\u0000"+
- "\u0000\u0000\u0094\u0095\u0001\u0000\u0000\u0000\u0095\u0096\u00054\u0000"+
- "\u0000\u0096\u0098\u0005\u001d\u0000\u0000\u0097\u0099\u0003\f\u0006\u0000"+
- "\u0098\u0097\u0001\u0000\u0000\u0000\u0098\u0099\u0001\u0000\u0000\u0000"+
- "\u0099\u009a\u0001\u0000\u0000\u0000\u009a\u009b\u0005\u001e\u0000\u0000"+
- "\u009b\u009d\u0003\u0014\n\u0000\u009c\u008c\u0001\u0000\u0000\u0000\u009c"+
- "\u008f\u0001\u0000\u0000\u0000\u009d\u000b\u0001\u0000\u0000\u0000\u009e"+
- "\u00a3\u0003\u000e\u0007\u0000\u009f\u00a0\u0005\"\u0000\u0000\u00a0\u00a2"+
- "\u0003\u000e\u0007\u0000\u00a1\u009f\u0001\u0000\u0000\u0000\u00a2\u00a5"+
- "\u0001\u0000\u0000\u0000\u00a3\u00a1\u0001\u0000\u0000\u0000\u00a3\u00a4"+
- "\u0001\u0000\u0000\u0000\u00a4\r\u0001\u0000\u0000\u0000\u00a5\u00a3\u0001"+
- "\u0000\u0000\u0000\u00a6\u00a7\u0003\\.\u0000\u00a7\u00a8\u00054\u0000"+
- "\u0000\u00a8\u000f\u0001\u0000\u0000\u0000\u00a9\u00ae\u00034\u001a\u0000"+
- "\u00aa\u00ab\u0005\"\u0000\u0000\u00ab\u00ad\u00034\u001a\u0000\u00ac"+
- "\u00aa\u0001\u0000\u0000\u0000\u00ad\u00b0\u0001\u0000\u0000\u0000\u00ae"+
- "\u00ac\u0001\u0000\u0000\u0000\u00ae\u00af\u0001\u0000\u0000\u0000\u00af"+
- "\u00b2\u0001\u0000\u0000\u0000\u00b0\u00ae\u0001\u0000\u0000\u0000\u00b1"+
- "\u00a9\u0001\u0000\u0000\u0000\u00b1\u00b2\u0001\u0000\u0000\u0000\u00b2"+
- "\u0011\u0001\u0000\u0000\u0000\u00b3\u00b4\u0003\u0016\u000b\u0000\u00b4"+
- "\u00b5\u0005!\u0000\u0000\u00b5\u00c3\u0001\u0000\u0000\u0000\u00b6\u00b7"+
- "\u0003\u0018\f\u0000\u00b7\u00b8\u0005!\u0000\u0000\u00b8\u00c3\u0001"+
- "\u0000\u0000\u0000\u00b9\u00c3\u0003\u0014\n\u0000\u00ba\u00c3\u0003\u001a"+
- "\r\u0000\u00bb\u00c3\u0003\u001c\u000e\u0000\u00bc\u00c3\u0003\u001e\u000f"+
- "\u0000\u00bd\u00c3\u0003 \u0010\u0000\u00be\u00c3\u0003(\u0014\u0000\u00bf"+
- "\u00c0\u0003.\u0017\u0000\u00c0\u00c1\u0005!\u0000\u0000\u00c1\u00c3\u0001"+
- "\u0000\u0000\u0000\u00c2\u00b3\u0001\u0000\u0000\u0000\u00c2\u00b6\u0001"+
- "\u0000\u0000\u0000\u00c2\u00b9\u0001\u0000\u0000\u0000\u00c2\u00ba\u0001"+
- "\u0000\u0000\u0000\u00c2\u00bb\u0001\u0000\u0000\u0000\u00c2\u00bc\u0001"+
- "\u0000\u0000\u0000\u00c2\u00bd\u0001\u0000\u0000\u0000\u00c2\u00be\u0001"+
- "\u0000\u0000\u0000\u00c2\u00bf\u0001\u0000\u0000\u0000\u00c3\u0013\u0001"+
- "\u0000\u0000\u0000\u00c4\u00c8\u0005\u001f\u0000\u0000\u00c5\u00c7\u0003"+
- "\u0012\t\u0000\u00c6\u00c5\u0001\u0000\u0000\u0000\u00c7\u00ca\u0001\u0000"+
- "\u0000\u0000\u00c8\u00c6\u0001\u0000\u0000\u0000\u00c8\u00c9\u0001\u0000"+
- "\u0000\u0000\u00c9\u00cb\u0001\u0000\u0000\u0000\u00ca\u00c8\u0001\u0000"+
- "\u0000\u0000\u00cb\u00cc\u0005 \u0000\u0000\u00cc\u0015\u0001\u0000\u0000"+
- "\u0000\u00cd\u00cf\u0005*\u0000\u0000\u00ce\u00d0\u00034\u001a\u0000\u00cf"+
- "\u00ce\u0001\u0000\u0000\u0000\u00cf\u00d0\u0001\u0000\u0000\u0000\u00d0"+
- "\u0017\u0001\u0000\u0000\u0000\u00d1\u00d2\u0003\\.\u0000\u00d2\u00d5"+
- "\u00054\u0000\u0000\u00d3\u00d4\u0005\r\u0000\u0000\u00d4\u00d6\u0003"+
- "4\u001a\u0000\u00d5\u00d3\u0001\u0000\u0000\u0000\u00d5\u00d6\u0001\u0000"+
- "\u0000\u0000\u00d6\u0019\u0001\u0000\u0000\u0000\u00d7\u00d8\u0005%\u0000"+
- "\u0000\u00d8\u00d9\u0005\u001d\u0000\u0000\u00d9\u00da\u00034\u001a\u0000"+
- "\u00da\u00db\u0005\u001e\u0000\u0000\u00db\u00dc\u0003\u0014\n\u0000\u00dc"+
- "\u001b\u0001\u0000\u0000\u0000\u00dd\u00de\u0005&\u0000\u0000\u00de\u00df"+
- "\u0003\u0014\n\u0000\u00df\u00e0\u0005%\u0000\u0000\u00e0\u00e1\u0005"+
- "\u001d\u0000\u0000\u00e1\u00e2\u00034\u001a\u0000\u00e2\u00e3\u0005\u001e"+
- "\u0000\u0000\u00e3\u00e4\u0005!\u0000\u0000\u00e4\u001d\u0001\u0000\u0000"+
- "\u0000\u00e5\u00e6\u0005)\u0000\u0000\u00e6\u00e9\u0005\u001d\u0000\u0000"+
- "\u00e7\u00ea\u0003.\u0017\u0000\u00e8\u00ea\u0003\u0018\f\u0000\u00e9"+
- "\u00e7\u0001\u0000\u0000\u0000\u00e9\u00e8\u0001\u0000\u0000\u0000\u00ea"+
- "\u00eb\u0001\u0000\u0000\u0000\u00eb\u00ed\u0005!\u0000\u0000\u00ec\u00ee"+
- "\u00034\u001a\u0000\u00ed\u00ec\u0001\u0000\u0000\u0000\u00ed\u00ee\u0001"+
- "\u0000\u0000\u0000\u00ee\u00ef\u0001\u0000\u0000\u0000\u00ef\u00f1\u0005"+
- "!\u0000\u0000\u00f0\u00f2\u0003.\u0017\u0000\u00f1\u00f0\u0001\u0000\u0000"+
- "\u0000\u00f1\u00f2\u0001\u0000\u0000\u0000\u00f2\u00f3\u0001\u0000\u0000"+
- "\u0000\u00f3\u00f4\u0005\u001e\u0000\u0000\u00f4\u00f5\u0003\u0014\n\u0000"+
- "\u00f5\u001f\u0001\u0000\u0000\u0000\u00f6\u00fa\u0003\"\u0011\u0000\u00f7"+
- "\u00f9\u0003$\u0012\u0000\u00f8\u00f7\u0001\u0000\u0000\u0000\u00f9\u00fc"+
- "\u0001\u0000\u0000\u0000\u00fa\u00f8\u0001\u0000\u0000\u0000\u00fa\u00fb"+
- "\u0001\u0000\u0000\u0000\u00fb\u00fe\u0001\u0000\u0000\u0000\u00fc\u00fa"+
- "\u0001\u0000\u0000\u0000\u00fd\u00ff\u0003&\u0013\u0000\u00fe\u00fd\u0001"+
- "\u0000\u0000\u0000\u00fe\u00ff\u0001\u0000\u0000\u0000\u00ff!\u0001\u0000"+
- "\u0000\u0000\u0100\u0101\u0005\'\u0000\u0000\u0101\u0102\u0005\u001d\u0000"+
- "\u0000\u0102\u0103\u00034\u001a\u0000\u0103\u0104\u0005\u001e\u0000\u0000"+
- "\u0104\u0105\u0003\u0014\n\u0000\u0105#\u0001\u0000\u0000\u0000\u0106"+
- "\u0107\u0005(\u0000\u0000\u0107\u0108\u0005\'\u0000\u0000\u0108\u0109"+
- "\u0005\u001d\u0000\u0000\u0109\u010a\u00034\u001a\u0000\u010a\u010b\u0005"+
- "\u001e\u0000\u0000\u010b\u010c\u0003\u0014\n\u0000\u010c%\u0001\u0000"+
- "\u0000\u0000\u010d\u010e\u0005(\u0000\u0000\u010e\u010f\u0003\u0014\n"+
- "\u0000\u010f\'\u0001\u0000\u0000\u0000\u0110\u0111\u0005,\u0000\u0000"+
- "\u0111\u0112\u0005\u001d\u0000\u0000\u0112\u0113\u00034\u001a\u0000\u0113"+
- "\u0114\u0005\u001e\u0000\u0000\u0114\u0116\u0005\u001f\u0000\u0000\u0115"+
- "\u0117\u0003*\u0015\u0000\u0116\u0115\u0001\u0000\u0000\u0000\u0117\u0118"+
- "\u0001\u0000\u0000\u0000\u0118\u0116\u0001\u0000\u0000\u0000\u0118\u0119"+
- "\u0001\u0000\u0000\u0000\u0119\u011b\u0001\u0000\u0000\u0000\u011a\u011c"+
- "\u0003,\u0016\u0000\u011b\u011a\u0001\u0000\u0000\u0000\u011b\u011c\u0001"+
- "\u0000\u0000\u0000\u011c\u011d\u0001\u0000\u0000\u0000\u011d\u011e\u0005"+
- " \u0000\u0000\u011e)\u0001\u0000\u0000\u0000\u011f\u0120\u0005-\u0000"+
- "\u0000\u0120\u0121\u0003^/\u0000\u0121\u0125\u0005/\u0000\u0000\u0122"+
- "\u0124\u0003\u0012\t\u0000\u0123\u0122\u0001\u0000\u0000\u0000\u0124\u0127"+
- "\u0001\u0000\u0000\u0000\u0125\u0123\u0001\u0000\u0000\u0000\u0125\u0126"+
- "\u0001\u0000\u0000\u0000\u0126+\u0001\u0000\u0000\u0000\u0127\u0125\u0001"+
- "\u0000\u0000\u0000\u0128\u0129\u0005.\u0000\u0000\u0129\u012d\u0005/\u0000"+
- "\u0000\u012a\u012c\u0003\u0012\t\u0000\u012b\u012a\u0001\u0000\u0000\u0000"+
- "\u012c\u012f\u0001\u0000\u0000\u0000\u012d\u012b\u0001\u0000\u0000\u0000"+
- "\u012d\u012e\u0001\u0000\u0000\u0000\u012e-\u0001\u0000\u0000\u0000\u012f"+
- "\u012d\u0001\u0000\u0000\u0000\u0130\u0135\u00030\u0018\u0000\u0131\u0135"+
- "\u00032\u0019\u0000\u0132\u0135\u0003V+\u0000\u0133\u0135\u0003:\u001d"+
- "\u0000\u0134\u0130\u0001\u0000\u0000\u0000\u0134\u0131\u0001\u0000\u0000"+
- "\u0000\u0134\u0132\u0001\u0000\u0000\u0000\u0134\u0133\u0001\u0000\u0000"+
- "\u0000\u0135/\u0001\u0000\u0000\u0000\u0136\u0137\u0003H$\u0000\u0137"+
- "\u0138\u0005\r\u0000\u0000\u0138\u0139\u00034\u001a\u0000\u01391\u0001"+
- "\u0000\u0000\u0000\u013a\u013b\u0005+\u0000\u0000\u013b\u013c\u00054\u0000"+
- "\u0000\u013c\u013d\u0005\u001d\u0000\u0000\u013d\u013e\u0003\u0010\b\u0000"+
- "\u013e\u013f\u0005\u001e\u0000\u0000\u013f3\u0001\u0000\u0000\u0000\u0140"+
- "\u0143\u00036\u001b\u0000\u0141\u0143\u0003L&\u0000\u0142\u0140\u0001"+
- "\u0000\u0000\u0000\u0142\u0141\u0001\u0000\u0000\u0000\u01435\u0001\u0000"+
- "\u0000\u0000\u0144\u014f\u0005$\u0000\u0000\u0145\u014f\u00054\u0000\u0000"+
- "\u0146\u014f\u0003J%\u0000\u0147\u014f\u0003^/\u0000\u0148\u014f\u0003"+
- "8\u001c\u0000\u0149\u014f\u0003.\u0017\u0000\u014a\u014b\u0005\u001d\u0000"+
- "\u0000\u014b\u014c\u00034\u001a\u0000\u014c\u014d\u0005\u001e\u0000\u0000"+
- "\u014d\u014f\u0001\u0000\u0000\u0000\u014e\u0144\u0001\u0000\u0000\u0000"+
- "\u014e\u0145\u0001\u0000\u0000\u0000\u014e\u0146\u0001\u0000\u0000\u0000"+
- "\u014e\u0147\u0001\u0000\u0000\u0000\u014e\u0148\u0001\u0000\u0000\u0000"+
- "\u014e\u0149\u0001\u0000\u0000\u0000\u014e\u014a\u0001\u0000\u0000\u0000"+
- "\u014f7\u0001\u0000\u0000\u0000\u0150\u0151\u0005\u0019\u0000\u0000\u0151"+
- "\u0152\u00034\u001a\u0000\u01529\u0001\u0000\u0000\u0000\u0153\u0156\u0003"+
- "<\u001e\u0000\u0154\u0156\u0003B!\u0000\u0155\u0153\u0001\u0000\u0000"+
- "\u0000\u0155\u0154\u0001\u0000\u0000\u0000\u0156;\u0001\u0000\u0000\u0000"+
- "\u0157\u015a\u0003>\u001f\u0000\u0158\u015a\u0003@ \u0000\u0159\u0157"+
- "\u0001\u0000\u0000\u0000\u0159\u0158\u0001\u0000\u0000\u0000\u015a=\u0001"+
- "\u0000\u0000\u0000\u015b\u015c\u0005\u0001\u0000\u0000\u015c\u015d\u0003"+
- "H$\u0000\u015d?\u0001\u0000\u0000\u0000\u015e\u015f\u0003H$\u0000\u015f"+
- "\u0160\u0005\u0001\u0000\u0000\u0160A\u0001\u0000\u0000\u0000\u0161\u0164"+
- "\u0003D\"\u0000\u0162\u0164\u0003F#\u0000\u0163\u0161\u0001\u0000\u0000"+
- "\u0000\u0163\u0162\u0001\u0000\u0000\u0000\u0164C\u0001\u0000\u0000\u0000"+
- "\u0165\u0166\u0005\u0002\u0000\u0000\u0166\u0167\u0003H$\u0000\u0167E"+
- "\u0001\u0000\u0000\u0000\u0168\u0169\u0003H$\u0000\u0169\u016a\u0005\u0002"+
- "\u0000\u0000\u016aG\u0001\u0000\u0000\u0000\u016b\u016e\u00054\u0000\u0000"+
- "\u016c\u016e\u0003J%\u0000\u016d\u016b\u0001\u0000\u0000\u0000\u016d\u016c"+
- "\u0001\u0000\u0000\u0000\u016eI\u0001\u0000\u0000\u0000\u016f\u0170\u0005"+
- "$\u0000\u0000\u0170\u0171\u0005\u001c\u0000\u0000\u0171\u017e\u00054\u0000"+
- "\u0000\u0172\u0173\u0005$\u0000\u0000\u0173\u0175\u0005\u001c\u0000\u0000"+
- "\u0174\u0172\u0001\u0000\u0000\u0000\u0174\u0175\u0001\u0000\u0000\u0000"+
- "\u0175\u0178\u0001\u0000\u0000\u0000\u0176\u0177\u00054\u0000\u0000\u0177"+
- "\u0179\u0005\u001c\u0000\u0000\u0178\u0176\u0001\u0000\u0000\u0000\u0179"+
- "\u017a\u0001\u0000\u0000\u0000\u017a\u0178\u0001\u0000\u0000\u0000\u017a"+
- "\u017b\u0001\u0000\u0000\u0000\u017b\u017c\u0001\u0000\u0000\u0000\u017c"+
- "\u017e\u00054\u0000\u0000\u017d\u016f\u0001\u0000\u0000\u0000\u017d\u0174"+
- "\u0001\u0000\u0000\u0000\u017eK\u0001\u0000\u0000\u0000\u017f\u0182\u0003"+
- "N\'\u0000\u0180\u0182\u0003T*\u0000\u0181\u017f\u0001\u0000\u0000\u0000"+
- "\u0181\u0180\u0001\u0000\u0000\u0000\u0182M\u0001\u0000\u0000\u0000\u0183"+
- "\u0184\u0006\'\uffff\uffff\u0000\u0184\u0185\u0003P(\u0000\u0185\u018b"+
- "\u0001\u0000\u0000\u0000\u0186\u0187\n\u0002\u0000\u0000\u0187\u0188\u0005"+
- "\n\u0000\u0000\u0188\u018a\u0003P(\u0000\u0189\u0186\u0001\u0000\u0000"+
- "\u0000\u018a\u018d\u0001\u0000\u0000\u0000\u018b\u0189\u0001\u0000\u0000"+
- "\u0000\u018b\u018c\u0001\u0000\u0000\u0000\u018cO\u0001\u0000\u0000\u0000"+
- "\u018d\u018b\u0001\u0000\u0000\u0000\u018e\u018f\u0006(\uffff\uffff\u0000"+
- "\u018f\u0190\u0003R)\u0000\u0190\u0196\u0001\u0000\u0000\u0000\u0191\u0192"+
- "\n\u0002\u0000\u0000\u0192\u0193\u0005\t\u0000\u0000\u0193\u0195\u0003"+
- "R)\u0000\u0194\u0191\u0001\u0000\u0000\u0000\u0195\u0198\u0001\u0000\u0000"+
- "\u0000\u0196\u0194\u0001\u0000\u0000\u0000\u0196\u0197\u0001\u0000\u0000"+
- "\u0000\u0197Q\u0001\u0000\u0000\u0000\u0198\u0196\u0001\u0000\u0000\u0000"+
- "\u0199\u01a2\u00051\u0000\u0000\u019a\u01a2\u00054\u0000\u0000\u019b\u01a2"+
- "\u0003J%\u0000\u019c\u019d\u0003V+\u0000\u019d\u019e\u0005\u001d\u0000"+
- "\u0000\u019e\u019f\u0003N\'\u0000\u019f\u01a0\u0005\u001e\u0000\u0000"+
- "\u01a0\u01a2\u0001\u0000\u0000\u0000\u01a1\u0199\u0001\u0000\u0000\u0000"+
- "\u01a1\u019a\u0001\u0000\u0000\u0000\u01a1\u019b\u0001\u0000\u0000\u0000"+
- "\u01a1\u019c\u0001\u0000\u0000\u0000\u01a2S\u0001\u0000\u0000\u0000\u01a3"+
- "\u01a4\u00036\u001b\u0000\u01a4\u01a5\u0003`0\u0000\u01a5\u01a6\u0003"+
- "4\u001a\u0000\u01a6U\u0001\u0000\u0000\u0000\u01a7\u01a9\u0003X,\u0000"+
- "\u01a8\u01a7\u0001\u0000\u0000\u0000\u01a8\u01a9\u0001\u0000\u0000\u0000"+
- "\u01a9\u01ad\u0001\u0000\u0000\u0000\u01aa\u01ac\u0003Z-\u0000\u01ab\u01aa"+
- "\u0001\u0000\u0000\u0000\u01ac\u01af\u0001\u0000\u0000\u0000\u01ad\u01ab"+
- "\u0001\u0000\u0000\u0000\u01ad\u01ae\u0001\u0000\u0000\u0000\u01ae\u01b0"+
- "\u0001\u0000\u0000\u0000\u01af\u01ad\u0001\u0000\u0000\u0000\u01b0\u01b1"+
- "\u00054\u0000\u0000\u01b1\u01b2\u0005\u001d\u0000\u0000\u01b2\u01b3\u0003"+
- "\u0010\b\u0000\u01b3\u01b4\u0005\u001e\u0000\u0000\u01b4W\u0001\u0000"+
- "\u0000\u0000\u01b5\u01ba\u0005$\u0000\u0000\u01b6\u01ba\u0003J%\u0000"+
- "\u01b7\u01ba\u00032\u0019\u0000\u01b8\u01ba\u00054\u0000\u0000\u01b9\u01b5"+
- "\u0001\u0000\u0000\u0000\u01b9\u01b6\u0001\u0000\u0000\u0000\u01b9\u01b7"+
- "\u0001\u0000\u0000\u0000\u01b9\u01b8\u0001\u0000\u0000\u0000\u01ba\u01bb"+
- "\u0001\u0000\u0000\u0000\u01bb\u01bc\u0005\u001c\u0000\u0000\u01bcY\u0001"+
- "\u0000\u0000\u0000\u01bd\u01be\u00054\u0000\u0000\u01be\u01bf\u0005\u001d"+
- "\u0000\u0000\u01bf\u01c0\u0003\u0010\b\u0000\u01c0\u01c1\u0005\u001e\u0000"+
- "\u0000\u01c1\u01c2\u0005\u001c\u0000\u0000\u01c2[\u0001\u0000\u0000\u0000"+
- "\u01c3\u01c4\u0007\u0000\u0000\u0000\u01c4]\u0001\u0000\u0000\u0000\u01c5"+
- "\u01c6\u0007\u0001\u0000\u0000\u01c6_\u0001\u0000\u0000\u0000\u01c7\u01c8"+
- "\u0007\u0002\u0000\u0000\u01c8a\u0001\u0000\u0000\u0000,ehpx{\u0080\u0086"+
- "\u008f\u0093\u0098\u009c\u00a3\u00ae\u00b1\u00c2\u00c8\u00cf\u00d5\u00e9"+
- "\u00ed\u00f1\u00fa\u00fe\u0118\u011b\u0125\u012d\u0134\u0142\u014e\u0155"+
- "\u0159\u0163\u016d\u0174\u017a\u017d\u0181\u018b\u0196\u01a1\u01a8\u01ad"+
- "\u01b9";
+ "-\u0007-\u0001\u0000\u0004\u0000^\b\u0000\u000b\u0000\f\u0000_\u0001\u0001"+
+ "\u0003\u0001c\b\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001"+
+ "\u0005\u0001i\b\u0001\n\u0001\f\u0001l\t\u0001\u0001\u0001\u0001\u0001"+
+ "\u0001\u0002\u0001\u0002\u0001\u0002\u0003\u0002s\b\u0002\u0001\u0003"+
+ "\u0003\u0003v\b\u0003\u0001\u0003\u0001\u0003\u0001\u0003\u0003\u0003"+
+ "{\b\u0003\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0004\u0003\u0004"+
+ "\u0081\b\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0005"+
+ "\u0001\u0005\u0001\u0005\u0003\u0005\u008a\b\u0005\u0001\u0005\u0001\u0005"+
+ "\u0003\u0005\u008e\b\u0005\u0001\u0005\u0001\u0005\u0001\u0005\u0003\u0005"+
+ "\u0093\b\u0005\u0001\u0005\u0001\u0005\u0003\u0005\u0097\b\u0005\u0001"+
+ "\u0006\u0001\u0006\u0001\u0006\u0005\u0006\u009c\b\u0006\n\u0006\f\u0006"+
+ "\u009f\t\u0006\u0001\u0007\u0001\u0007\u0001\u0007\u0001\b\u0001\b\u0001"+
+ "\b\u0005\b\u00a7\b\b\n\b\f\b\u00aa\t\b\u0003\b\u00ac\b\b\u0001\t\u0001"+
+ "\t\u0001\t\u0001\t\u0001\t\u0001\t\u0001\t\u0001\t\u0001\t\u0001\t\u0001"+
+ "\t\u0001\t\u0001\t\u0001\t\u0003\t\u00bc\b\t\u0001\n\u0001\n\u0005\n\u00c0"+
+ "\b\n\n\n\f\n\u00c3\t\n\u0001\n\u0001\n\u0001\u000b\u0001\u000b\u0003\u000b"+
+ "\u00c9\b\u000b\u0001\f\u0001\f\u0001\f\u0001\f\u0003\f\u00cf\b\f\u0001"+
+ "\r\u0001\r\u0001\r\u0001\r\u0001\r\u0001\r\u0001\u000e\u0001\u000e\u0001"+
+ "\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0001"+
+ "\u000f\u0001\u000f\u0001\u000f\u0001\u000f\u0003\u000f\u00e3\b\u000f\u0001"+
+ "\u000f\u0001\u000f\u0003\u000f\u00e7\b\u000f\u0001\u000f\u0001\u000f\u0003"+
+ "\u000f\u00eb\b\u000f\u0001\u000f\u0001\u000f\u0001\u000f\u0001\u0010\u0001"+
+ "\u0010\u0005\u0010\u00f2\b\u0010\n\u0010\f\u0010\u00f5\t\u0010\u0001\u0010"+
+ "\u0003\u0010\u00f8\b\u0010\u0001\u0011\u0001\u0011\u0001\u0011\u0001\u0011"+
+ "\u0001\u0011\u0001\u0011\u0001\u0012\u0001\u0012\u0001\u0012\u0001\u0012"+
+ "\u0001\u0012\u0001\u0012\u0001\u0012\u0001\u0013\u0001\u0013\u0001\u0013"+
+ "\u0001\u0014\u0001\u0014\u0001\u0014\u0001\u0014\u0003\u0014\u010e\b\u0014"+
+ "\u0001\u0015\u0001\u0015\u0001\u0015\u0001\u0015\u0001\u0016\u0001\u0016"+
+ "\u0001\u0016\u0001\u0016\u0001\u0016\u0001\u0016\u0001\u0017\u0001\u0017"+
+ "\u0003\u0017\u011c\b\u0017\u0001\u0018\u0001\u0018\u0001\u0018\u0001\u0018"+
+ "\u0001\u0018\u0001\u0018\u0001\u0018\u0001\u0018\u0001\u0018\u0001\u0018"+
+ "\u0003\u0018\u0128\b\u0018\u0001\u0019\u0001\u0019\u0001\u0019\u0001\u001a"+
+ "\u0001\u001a\u0003\u001a\u012f\b\u001a\u0001\u001b\u0001\u001b\u0003\u001b"+
+ "\u0133\b\u001b\u0001\u001c\u0001\u001c\u0001\u001c\u0001\u001d\u0001\u001d"+
+ "\u0001\u001d\u0001\u001e\u0001\u001e\u0003\u001e\u013d\b\u001e\u0001\u001f"+
+ "\u0001\u001f\u0001\u001f\u0001 \u0001 \u0001 \u0001!\u0001!\u0003!\u0147"+
+ "\b!\u0001\"\u0001\"\u0001\"\u0001\"\u0001\"\u0003\"\u014e\b\"\u0001\""+
+ "\u0001\"\u0004\"\u0152\b\"\u000b\"\f\"\u0153\u0001\"\u0003\"\u0157\b\""+
+ "\u0001#\u0001#\u0003#\u015b\b#\u0001$\u0001$\u0001$\u0001$\u0001$\u0001"+
+ "$\u0005$\u0163\b$\n$\f$\u0166\t$\u0001%\u0001%\u0001%\u0001%\u0001%\u0001"+
+ "%\u0005%\u016e\b%\n%\f%\u0171\t%\u0001&\u0001&\u0001&\u0001&\u0001&\u0001"+
+ "&\u0001&\u0001&\u0003&\u017b\b&\u0001\'\u0001\'\u0001\'\u0001\'\u0001"+
+ "(\u0003(\u0182\b(\u0001(\u0005(\u0185\b(\n(\f(\u0188\t(\u0001(\u0001("+
+ "\u0001(\u0001(\u0001(\u0001)\u0001)\u0001)\u0001)\u0003)\u0193\b)\u0001"+
+ ")\u0001)\u0001*\u0001*\u0001*\u0001*\u0001*\u0001*\u0001+\u0001+\u0001"+
+ ",\u0001,\u0001-\u0001-\u0001-\u0000\u0002HJ.\u0000\u0002\u0004\u0006\b"+
+ "\n\f\u000e\u0010\u0012\u0014\u0016\u0018\u001a\u001c\u001e \"$&(*,.02"+
+ "468:<>@BDFHJLNPRTVXZ\u0000\u0003\u0002\u0000\u0004\u000600\u0001\u0000"+
+ ",/\u0001\u0000\u000b\f\u01ae\u0000]\u0001\u0000\u0000\u0000\u0002b\u0001"+
+ "\u0000\u0000\u0000\u0004r\u0001\u0000\u0000\u0000\u0006u\u0001\u0000\u0000"+
+ "\u0000\b\u0080\u0001\u0000\u0000\u0000\n\u0096\u0001\u0000\u0000\u0000"+
+ "\f\u0098\u0001\u0000\u0000\u0000\u000e\u00a0\u0001\u0000\u0000\u0000\u0010"+
+ "\u00ab\u0001\u0000\u0000\u0000\u0012\u00bb\u0001\u0000\u0000\u0000\u0014"+
+ "\u00bd\u0001\u0000\u0000\u0000\u0016\u00c6\u0001\u0000\u0000\u0000\u0018"+
+ "\u00ca\u0001\u0000\u0000\u0000\u001a\u00d0\u0001\u0000\u0000\u0000\u001c"+
+ "\u00d6\u0001\u0000\u0000\u0000\u001e\u00de\u0001\u0000\u0000\u0000 \u00ef"+
+ "\u0001\u0000\u0000\u0000\"\u00f9\u0001\u0000\u0000\u0000$\u00ff\u0001"+
+ "\u0000\u0000\u0000&\u0106\u0001\u0000\u0000\u0000(\u010d\u0001\u0000\u0000"+
+ "\u0000*\u010f\u0001\u0000\u0000\u0000,\u0113\u0001\u0000\u0000\u0000."+
+ "\u011b\u0001\u0000\u0000\u00000\u0127\u0001\u0000\u0000\u00002\u0129\u0001"+
+ "\u0000\u0000\u00004\u012e\u0001\u0000\u0000\u00006\u0132\u0001\u0000\u0000"+
+ "\u00008\u0134\u0001\u0000\u0000\u0000:\u0137\u0001\u0000\u0000\u0000<"+
+ "\u013c\u0001\u0000\u0000\u0000>\u013e\u0001\u0000\u0000\u0000@\u0141\u0001"+
+ "\u0000\u0000\u0000B\u0146\u0001\u0000\u0000\u0000D\u0156\u0001\u0000\u0000"+
+ "\u0000F\u015a\u0001\u0000\u0000\u0000H\u015c\u0001\u0000\u0000\u0000J"+
+ "\u0167\u0001\u0000\u0000\u0000L\u017a\u0001\u0000\u0000\u0000N\u017c\u0001"+
+ "\u0000\u0000\u0000P\u0181\u0001\u0000\u0000\u0000R\u0192\u0001\u0000\u0000"+
+ "\u0000T\u0196\u0001\u0000\u0000\u0000V\u019c\u0001\u0000\u0000\u0000X"+
+ "\u019e\u0001\u0000\u0000\u0000Z\u01a0\u0001\u0000\u0000\u0000\\^\u0003"+
+ "\u0002\u0001\u0000]\\\u0001\u0000\u0000\u0000^_\u0001\u0000\u0000\u0000"+
+ "_]\u0001\u0000\u0000\u0000_`\u0001\u0000\u0000\u0000`\u0001\u0001\u0000"+
+ "\u0000\u0000ac\u0005\u0007\u0000\u0000ba\u0001\u0000\u0000\u0000bc\u0001"+
+ "\u0000\u0000\u0000cd\u0001\u0000\u0000\u0000de\u0005#\u0000\u0000ef\u0005"+
+ "0\u0000\u0000fj\u0005\u001f\u0000\u0000gi\u0003\u0004\u0002\u0000hg\u0001"+
+ "\u0000\u0000\u0000il\u0001\u0000\u0000\u0000jh\u0001\u0000\u0000\u0000"+
+ "jk\u0001\u0000\u0000\u0000km\u0001\u0000\u0000\u0000lj\u0001\u0000\u0000"+
+ "\u0000mn\u0005 \u0000\u0000n\u0003\u0001\u0000\u0000\u0000os\u0003\u0006"+
+ "\u0003\u0000ps\u0003\b\u0004\u0000qs\u0003\n\u0005\u0000ro\u0001\u0000"+
+ "\u0000\u0000rp\u0001\u0000\u0000\u0000rq\u0001\u0000\u0000\u0000s\u0005"+
+ "\u0001\u0000\u0000\u0000tv\u0005\u0007\u0000\u0000ut\u0001\u0000\u0000"+
+ "\u0000uv\u0001\u0000\u0000\u0000vw\u0001\u0000\u0000\u0000wx\u00050\u0000"+
+ "\u0000xz\u0005\u001d\u0000\u0000y{\u0003\f\u0006\u0000zy\u0001\u0000\u0000"+
+ "\u0000z{\u0001\u0000\u0000\u0000{|\u0001\u0000\u0000\u0000|}\u0005\u001e"+
+ "\u0000\u0000}~\u0003\u0014\n\u0000~\u0007\u0001\u0000\u0000\u0000\u007f"+
+ "\u0081\u0005\u0007\u0000\u0000\u0080\u007f\u0001\u0000\u0000\u0000\u0080"+
+ "\u0081\u0001\u0000\u0000\u0000\u0081\u0082\u0001\u0000\u0000\u0000\u0082"+
+ "\u0083\u0003V+\u0000\u0083\u0084\u00050\u0000\u0000\u0084\u0085\u0005"+
+ "!\u0000\u0000\u0085\t\u0001\u0000\u0000\u0000\u0086\u0087\u0005\b\u0000"+
+ "\u0000\u0087\u0097\u0003\u0014\n\u0000\u0088\u008a\u0005\u0007\u0000\u0000"+
+ "\u0089\u0088\u0001\u0000\u0000\u0000\u0089\u008a\u0001\u0000\u0000\u0000"+
+ "\u008a\u008d\u0001\u0000\u0000\u0000\u008b\u008e\u0003V+\u0000\u008c\u008e"+
+ "\u0005\u0003\u0000\u0000\u008d\u008b\u0001\u0000\u0000\u0000\u008d\u008c"+
+ "\u0001\u0000\u0000\u0000\u008e\u008f\u0001\u0000\u0000\u0000\u008f\u0090"+
+ "\u00050\u0000\u0000\u0090\u0092\u0005\u001d\u0000\u0000\u0091\u0093\u0003"+
+ "\f\u0006\u0000\u0092\u0091\u0001\u0000\u0000\u0000\u0092\u0093\u0001\u0000"+
+ "\u0000\u0000\u0093\u0094\u0001\u0000\u0000\u0000\u0094\u0095\u0005\u001e"+
+ "\u0000\u0000\u0095\u0097\u0003\u0014\n\u0000\u0096\u0086\u0001\u0000\u0000"+
+ "\u0000\u0096\u0089\u0001\u0000\u0000\u0000\u0097\u000b\u0001\u0000\u0000"+
+ "\u0000\u0098\u009d\u0003\u000e\u0007\u0000\u0099\u009a\u0005\"\u0000\u0000"+
+ "\u009a\u009c\u0003\u000e\u0007\u0000\u009b\u0099\u0001\u0000\u0000\u0000"+
+ "\u009c\u009f\u0001\u0000\u0000\u0000\u009d\u009b\u0001\u0000\u0000\u0000"+
+ "\u009d\u009e\u0001\u0000\u0000\u0000\u009e\r\u0001\u0000\u0000\u0000\u009f"+
+ "\u009d\u0001\u0000\u0000\u0000\u00a0\u00a1\u0003V+\u0000\u00a1\u00a2\u0005"+
+ "0\u0000\u0000\u00a2\u000f\u0001\u0000\u0000\u0000\u00a3\u00a8\u0003.\u0017"+
+ "\u0000\u00a4\u00a5\u0005\"\u0000\u0000\u00a5\u00a7\u0003.\u0017\u0000"+
+ "\u00a6\u00a4\u0001\u0000\u0000\u0000\u00a7\u00aa\u0001\u0000\u0000\u0000"+
+ "\u00a8\u00a6\u0001\u0000\u0000\u0000\u00a8\u00a9\u0001\u0000\u0000\u0000"+
+ "\u00a9\u00ac\u0001\u0000\u0000\u0000\u00aa\u00a8\u0001\u0000\u0000\u0000"+
+ "\u00ab\u00a3\u0001\u0000\u0000\u0000\u00ab\u00ac\u0001\u0000\u0000\u0000"+
+ "\u00ac\u0011\u0001\u0000\u0000\u0000\u00ad\u00ae\u0003\u0016\u000b\u0000"+
+ "\u00ae\u00af\u0005!\u0000\u0000\u00af\u00bc\u0001\u0000\u0000\u0000\u00b0"+
+ "\u00b1\u0003\u0018\f\u0000\u00b1\u00b2\u0005!\u0000\u0000\u00b2\u00bc"+
+ "\u0001\u0000\u0000\u0000\u00b3\u00bc\u0003\u0014\n\u0000\u00b4\u00bc\u0003"+
+ "\u001a\r\u0000\u00b5\u00bc\u0003\u001c\u000e\u0000\u00b6\u00bc\u0003\u001e"+
+ "\u000f\u0000\u00b7\u00bc\u0003 \u0010\u0000\u00b8\u00b9\u0003(\u0014\u0000"+
+ "\u00b9\u00ba\u0005!\u0000\u0000\u00ba\u00bc\u0001\u0000\u0000\u0000\u00bb"+
+ "\u00ad\u0001\u0000\u0000\u0000\u00bb\u00b0\u0001\u0000\u0000\u0000\u00bb"+
+ "\u00b3\u0001\u0000\u0000\u0000\u00bb\u00b4\u0001\u0000\u0000\u0000\u00bb"+
+ "\u00b5\u0001\u0000\u0000\u0000\u00bb\u00b6\u0001\u0000\u0000\u0000\u00bb"+
+ "\u00b7\u0001\u0000\u0000\u0000\u00bb\u00b8\u0001\u0000\u0000\u0000\u00bc"+
+ "\u0013\u0001\u0000\u0000\u0000\u00bd\u00c1\u0005\u001f\u0000\u0000\u00be"+
+ "\u00c0\u0003\u0012\t\u0000\u00bf\u00be\u0001\u0000\u0000\u0000\u00c0\u00c3"+
+ "\u0001\u0000\u0000\u0000\u00c1\u00bf\u0001\u0000\u0000\u0000\u00c1\u00c2"+
+ "\u0001\u0000\u0000\u0000\u00c2\u00c4\u0001\u0000\u0000\u0000\u00c3\u00c1"+
+ "\u0001\u0000\u0000\u0000\u00c4\u00c5\u0005 \u0000\u0000\u00c5\u0015\u0001"+
+ "\u0000\u0000\u0000\u00c6\u00c8\u0005*\u0000\u0000\u00c7\u00c9\u0003.\u0017"+
+ "\u0000\u00c8\u00c7\u0001\u0000\u0000\u0000\u00c8\u00c9\u0001\u0000\u0000"+
+ "\u0000\u00c9\u0017\u0001\u0000\u0000\u0000\u00ca\u00cb\u0003V+\u0000\u00cb"+
+ "\u00ce\u00050\u0000\u0000\u00cc\u00cd\u0005\r\u0000\u0000\u00cd\u00cf"+
+ "\u0003.\u0017\u0000\u00ce\u00cc\u0001\u0000\u0000\u0000\u00ce\u00cf\u0001"+
+ "\u0000\u0000\u0000\u00cf\u0019\u0001\u0000\u0000\u0000\u00d0\u00d1\u0005"+
+ "%\u0000\u0000\u00d1\u00d2\u0005\u001d\u0000\u0000\u00d2\u00d3\u0003.\u0017"+
+ "\u0000\u00d3\u00d4\u0005\u001e\u0000\u0000\u00d4\u00d5\u0003\u0014\n\u0000"+
+ "\u00d5\u001b\u0001\u0000\u0000\u0000\u00d6\u00d7\u0005&\u0000\u0000\u00d7"+
+ "\u00d8\u0003\u0014\n\u0000\u00d8\u00d9\u0005%\u0000\u0000\u00d9\u00da"+
+ "\u0005\u001d\u0000\u0000\u00da\u00db\u0003.\u0017\u0000\u00db\u00dc\u0005"+
+ "\u001e\u0000\u0000\u00dc\u00dd\u0005!\u0000\u0000\u00dd\u001d\u0001\u0000"+
+ "\u0000\u0000\u00de\u00df\u0005)\u0000\u0000\u00df\u00e2\u0005\u001d\u0000"+
+ "\u0000\u00e0\u00e3\u0003(\u0014\u0000\u00e1\u00e3\u0003\u0018\f\u0000"+
+ "\u00e2\u00e0\u0001\u0000\u0000\u0000\u00e2\u00e1\u0001\u0000\u0000\u0000"+
+ "\u00e3\u00e4\u0001\u0000\u0000\u0000\u00e4\u00e6\u0005!\u0000\u0000\u00e5"+
+ "\u00e7\u0003.\u0017\u0000\u00e6\u00e5\u0001\u0000\u0000\u0000\u00e6\u00e7"+
+ "\u0001\u0000\u0000\u0000\u00e7\u00e8\u0001\u0000\u0000\u0000\u00e8\u00ea"+
+ "\u0005!\u0000\u0000\u00e9\u00eb\u0003(\u0014\u0000\u00ea\u00e9\u0001\u0000"+
+ "\u0000\u0000\u00ea\u00eb\u0001\u0000\u0000\u0000\u00eb\u00ec\u0001\u0000"+
+ "\u0000\u0000\u00ec\u00ed\u0005\u001e\u0000\u0000\u00ed\u00ee\u0003\u0014"+
+ "\n\u0000\u00ee\u001f\u0001\u0000\u0000\u0000\u00ef\u00f3\u0003\"\u0011"+
+ "\u0000\u00f0\u00f2\u0003$\u0012\u0000\u00f1\u00f0\u0001\u0000\u0000\u0000"+
+ "\u00f2\u00f5\u0001\u0000\u0000\u0000\u00f3\u00f1\u0001\u0000\u0000\u0000"+
+ "\u00f3\u00f4\u0001\u0000\u0000\u0000\u00f4\u00f7\u0001\u0000\u0000\u0000"+
+ "\u00f5\u00f3\u0001\u0000\u0000\u0000\u00f6\u00f8\u0003&\u0013\u0000\u00f7"+
+ "\u00f6\u0001\u0000\u0000\u0000\u00f7\u00f8\u0001\u0000\u0000\u0000\u00f8"+
+ "!\u0001\u0000\u0000\u0000\u00f9\u00fa\u0005\'\u0000\u0000\u00fa\u00fb"+
+ "\u0005\u001d\u0000\u0000\u00fb\u00fc\u0003.\u0017\u0000\u00fc\u00fd\u0005"+
+ "\u001e\u0000\u0000\u00fd\u00fe\u0003\u0014\n\u0000\u00fe#\u0001\u0000"+
+ "\u0000\u0000\u00ff\u0100\u0005(\u0000\u0000\u0100\u0101\u0005\'\u0000"+
+ "\u0000\u0101\u0102\u0005\u001d\u0000\u0000\u0102\u0103\u0003.\u0017\u0000"+
+ "\u0103\u0104\u0005\u001e\u0000\u0000\u0104\u0105\u0003\u0014\n\u0000\u0105"+
+ "%\u0001\u0000\u0000\u0000\u0106\u0107\u0005(\u0000\u0000\u0107\u0108\u0003"+
+ "\u0014\n\u0000\u0108\'\u0001\u0000\u0000\u0000\u0109\u010e\u0003*\u0015"+
+ "\u0000\u010a\u010e\u0003,\u0016\u0000\u010b\u010e\u0003P(\u0000\u010c"+
+ "\u010e\u00034\u001a\u0000\u010d\u0109\u0001\u0000\u0000\u0000\u010d\u010a"+
+ "\u0001\u0000\u0000\u0000\u010d\u010b\u0001\u0000\u0000\u0000\u010d\u010c"+
+ "\u0001\u0000\u0000\u0000\u010e)\u0001\u0000\u0000\u0000\u010f\u0110\u0003"+
+ "B!\u0000\u0110\u0111\u0005\r\u0000\u0000\u0111\u0112\u0003.\u0017\u0000"+
+ "\u0112+\u0001\u0000\u0000\u0000\u0113\u0114\u0005+\u0000\u0000\u0114\u0115"+
+ "\u00050\u0000\u0000\u0115\u0116\u0005\u001d\u0000\u0000\u0116\u0117\u0003"+
+ "\u0010\b\u0000\u0117\u0118\u0005\u001e\u0000\u0000\u0118-\u0001\u0000"+
+ "\u0000\u0000\u0119\u011c\u00030\u0018\u0000\u011a\u011c\u0003F#\u0000"+
+ "\u011b\u0119\u0001\u0000\u0000\u0000\u011b\u011a\u0001\u0000\u0000\u0000"+
+ "\u011c/\u0001\u0000\u0000\u0000\u011d\u0128\u0005$\u0000\u0000\u011e\u0128"+
+ "\u00050\u0000\u0000\u011f\u0128\u0003D\"\u0000\u0120\u0128\u0003X,\u0000"+
+ "\u0121\u0128\u00032\u0019\u0000\u0122\u0128\u0003(\u0014\u0000\u0123\u0124"+
+ "\u0005\u001d\u0000\u0000\u0124\u0125\u0003.\u0017\u0000\u0125\u0126\u0005"+
+ "\u001e\u0000\u0000\u0126\u0128\u0001\u0000\u0000\u0000\u0127\u011d\u0001"+
+ "\u0000\u0000\u0000\u0127\u011e\u0001\u0000\u0000\u0000\u0127\u011f\u0001"+
+ "\u0000\u0000\u0000\u0127\u0120\u0001\u0000\u0000\u0000\u0127\u0121\u0001"+
+ "\u0000\u0000\u0000\u0127\u0122\u0001\u0000\u0000\u0000\u0127\u0123\u0001"+
+ "\u0000\u0000\u0000\u01281\u0001\u0000\u0000\u0000\u0129\u012a\u0005\u0019"+
+ "\u0000\u0000\u012a\u012b\u0003.\u0017\u0000\u012b3\u0001\u0000\u0000\u0000"+
+ "\u012c\u012f\u00036\u001b\u0000\u012d\u012f\u0003<\u001e\u0000\u012e\u012c"+
+ "\u0001\u0000\u0000\u0000\u012e\u012d\u0001\u0000\u0000\u0000\u012f5\u0001"+
+ "\u0000\u0000\u0000\u0130\u0133\u00038\u001c\u0000\u0131\u0133\u0003:\u001d"+
+ "\u0000\u0132\u0130\u0001\u0000\u0000\u0000\u0132\u0131\u0001\u0000\u0000"+
+ "\u0000\u01337\u0001\u0000\u0000\u0000\u0134\u0135\u0005\u0001\u0000\u0000"+
+ "\u0135\u0136\u0003B!\u0000\u01369\u0001\u0000\u0000\u0000\u0137\u0138"+
+ "\u0003B!\u0000\u0138\u0139\u0005\u0001\u0000\u0000\u0139;\u0001\u0000"+
+ "\u0000\u0000\u013a\u013d\u0003>\u001f\u0000\u013b\u013d\u0003@ \u0000"+
+ "\u013c\u013a\u0001\u0000\u0000\u0000\u013c\u013b\u0001\u0000\u0000\u0000"+
+ "\u013d=\u0001\u0000\u0000\u0000\u013e\u013f\u0005\u0002\u0000\u0000\u013f"+
+ "\u0140\u0003B!\u0000\u0140?\u0001\u0000\u0000\u0000\u0141\u0142\u0003"+
+ "B!\u0000\u0142\u0143\u0005\u0002\u0000\u0000\u0143A\u0001\u0000\u0000"+
+ "\u0000\u0144\u0147\u00050\u0000\u0000\u0145\u0147\u0003D\"\u0000\u0146"+
+ "\u0144\u0001\u0000\u0000\u0000\u0146\u0145\u0001\u0000\u0000\u0000\u0147"+
+ "C\u0001\u0000\u0000\u0000\u0148\u0149\u0005$\u0000\u0000\u0149\u014a\u0005"+
+ "\u001c\u0000\u0000\u014a\u0157\u00050\u0000\u0000\u014b\u014c\u0005$\u0000"+
+ "\u0000\u014c\u014e\u0005\u001c\u0000\u0000\u014d\u014b\u0001\u0000\u0000"+
+ "\u0000\u014d\u014e\u0001\u0000\u0000\u0000\u014e\u0151\u0001\u0000\u0000"+
+ "\u0000\u014f\u0150\u00050\u0000\u0000\u0150\u0152\u0005\u001c\u0000\u0000"+
+ "\u0151\u014f\u0001\u0000\u0000\u0000\u0152\u0153\u0001\u0000\u0000\u0000"+
+ "\u0153\u0151\u0001\u0000\u0000\u0000\u0153\u0154\u0001\u0000\u0000\u0000"+
+ "\u0154\u0155\u0001\u0000\u0000\u0000\u0155\u0157\u00050\u0000\u0000\u0156"+
+ "\u0148\u0001\u0000\u0000\u0000\u0156\u014d\u0001\u0000\u0000\u0000\u0157"+
+ "E\u0001\u0000\u0000\u0000\u0158\u015b\u0003H$\u0000\u0159\u015b\u0003"+
+ "N\'\u0000\u015a\u0158\u0001\u0000\u0000\u0000\u015a\u0159\u0001\u0000"+
+ "\u0000\u0000\u015bG\u0001\u0000\u0000\u0000\u015c\u015d\u0006$\uffff\uffff"+
+ "\u0000\u015d\u015e\u0003J%\u0000\u015e\u0164\u0001\u0000\u0000\u0000\u015f"+
+ "\u0160\n\u0002\u0000\u0000\u0160\u0161\u0005\n\u0000\u0000\u0161\u0163"+
+ "\u0003J%\u0000\u0162\u015f\u0001\u0000\u0000\u0000\u0163\u0166\u0001\u0000"+
+ "\u0000\u0000\u0164\u0162\u0001\u0000\u0000\u0000\u0164\u0165\u0001\u0000"+
+ "\u0000\u0000\u0165I\u0001\u0000\u0000\u0000\u0166\u0164\u0001\u0000\u0000"+
+ "\u0000\u0167\u0168\u0006%\uffff\uffff\u0000\u0168\u0169\u0003L&\u0000"+
+ "\u0169\u016f\u0001\u0000\u0000\u0000\u016a\u016b\n\u0002\u0000\u0000\u016b"+
+ "\u016c\u0005\t\u0000\u0000\u016c\u016e\u0003L&\u0000\u016d\u016a\u0001"+
+ "\u0000\u0000\u0000\u016e\u0171\u0001\u0000\u0000\u0000\u016f\u016d\u0001"+
+ "\u0000\u0000\u0000\u016f\u0170\u0001\u0000\u0000\u0000\u0170K\u0001\u0000"+
+ "\u0000\u0000\u0171\u016f\u0001\u0000\u0000\u0000\u0172\u017b\u0005-\u0000"+
+ "\u0000\u0173\u017b\u00050\u0000\u0000\u0174\u017b\u0003D\"\u0000\u0175"+
+ "\u0176\u0003P(\u0000\u0176\u0177\u0005\u001d\u0000\u0000\u0177\u0178\u0003"+
+ "H$\u0000\u0178\u0179\u0005\u001e\u0000\u0000\u0179\u017b\u0001\u0000\u0000"+
+ "\u0000\u017a\u0172\u0001\u0000\u0000\u0000\u017a\u0173\u0001\u0000\u0000"+
+ "\u0000\u017a\u0174\u0001\u0000\u0000\u0000\u017a\u0175\u0001\u0000\u0000"+
+ "\u0000\u017bM\u0001\u0000\u0000\u0000\u017c\u017d\u00030\u0018\u0000\u017d"+
+ "\u017e\u0003Z-\u0000\u017e\u017f\u0003.\u0017\u0000\u017fO\u0001\u0000"+
+ "\u0000\u0000\u0180\u0182\u0003R)\u0000\u0181\u0180\u0001\u0000\u0000\u0000"+
+ "\u0181\u0182\u0001\u0000\u0000\u0000\u0182\u0186\u0001\u0000\u0000\u0000"+
+ "\u0183\u0185\u0003T*\u0000\u0184\u0183\u0001\u0000\u0000\u0000\u0185\u0188"+
+ "\u0001\u0000\u0000\u0000\u0186\u0184\u0001\u0000\u0000\u0000\u0186\u0187"+
+ "\u0001\u0000\u0000\u0000\u0187\u0189\u0001\u0000\u0000\u0000\u0188\u0186"+
+ "\u0001\u0000\u0000\u0000\u0189\u018a\u00050\u0000\u0000\u018a\u018b\u0005"+
+ "\u001d\u0000\u0000\u018b\u018c\u0003\u0010\b\u0000\u018c\u018d\u0005\u001e"+
+ "\u0000\u0000\u018dQ\u0001\u0000\u0000\u0000\u018e\u0193\u0005$\u0000\u0000"+
+ "\u018f\u0193\u0003D\"\u0000\u0190\u0193\u0003,\u0016\u0000\u0191\u0193"+
+ "\u00050\u0000\u0000\u0192\u018e\u0001\u0000\u0000\u0000\u0192\u018f\u0001"+
+ "\u0000\u0000\u0000\u0192\u0190\u0001\u0000\u0000\u0000\u0192\u0191\u0001"+
+ "\u0000\u0000\u0000\u0193\u0194\u0001\u0000\u0000\u0000\u0194\u0195\u0005"+
+ "\u001c\u0000\u0000\u0195S\u0001\u0000\u0000\u0000\u0196\u0197\u00050\u0000"+
+ "\u0000\u0197\u0198\u0005\u001d\u0000\u0000\u0198\u0199\u0003\u0010\b\u0000"+
+ "\u0199\u019a\u0005\u001e\u0000\u0000\u019a\u019b\u0005\u001c\u0000\u0000"+
+ "\u019bU\u0001\u0000\u0000\u0000\u019c\u019d\u0007\u0000\u0000\u0000\u019d"+
+ "W\u0001\u0000\u0000\u0000\u019e\u019f\u0007\u0001\u0000\u0000\u019fY\u0001"+
+ "\u0000\u0000\u0000\u01a0\u01a1\u0007\u0002\u0000\u0000\u01a1[\u0001\u0000"+
+ "\u0000\u0000(_bjruz\u0080\u0089\u008d\u0092\u0096\u009d\u00a8\u00ab\u00bb"+
+ "\u00c1\u00c8\u00ce\u00e2\u00e6\u00ea\u00f3\u00f7\u010d\u011b\u0127\u012e"+
+ "\u0132\u013c\u0146\u014d\u0153\u0156\u015a\u0164\u016f\u017a\u0181\u0186"+
+ "\u0192";
public static final ATN _ATN =
new ATNDeserializer().deserialize(_serializedATN.toCharArray());
static {
diff --git a/src/main/java/parser/generated/SimpleJavaVisitor.java b/src/main/java/parser/generated/SimpleJavaVisitor.java
index 4cb1f4b..beefef9 100644
--- a/src/main/java/parser/generated/SimpleJavaVisitor.java
+++ b/src/main/java/parser/generated/SimpleJavaVisitor.java
@@ -130,24 +130,6 @@ public interface SimpleJavaVisitor extends ParseTreeVisitor {
* @return the visitor result
*/
T visitElseStatement(SimpleJavaParser.ElseStatementContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#switchStatement}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitSwitchStatement(SimpleJavaParser.SwitchStatementContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#caseStatement}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitCaseStatement(SimpleJavaParser.CaseStatementContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#defaultStatement}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitDefaultStatement(SimpleJavaParser.DefaultStatementContext ctx);
/**
* Visit a parse tree produced by {@link SimpleJavaParser#statementExpression}.
* @param ctx the parse tree
diff --git a/src/main/java/parser/grammar/SimpleJava.g4 b/src/main/java/parser/grammar/SimpleJava.g4
index 91b8920..51b7bc1 100644
--- a/src/main/java/parser/grammar/SimpleJava.g4
+++ b/src/main/java/parser/grammar/SimpleJava.g4
@@ -7,7 +7,7 @@ classDeclaration: AccessModifier? 'class' Identifier OpenCurlyBracket memberDecl
memberDeclaration: constructorDeclaration | fieldDeclaration | methodDeclaration;
constructorDeclaration: AccessModifier? Identifier OpenRoundBracket parameterList? ClosedRoundBracket blockStatement;
-fieldDeclaration: AccessModifier? type Identifier (Assign expression)? Semicolon;
+fieldDeclaration: AccessModifier? type Identifier Semicolon;
methodDeclaration: MainMethodDeclaration blockStatement | AccessModifier? (type | Void) Identifier OpenRoundBracket parameterList? ClosedRoundBracket blockStatement;
parameterList: parameter (Comma parameter)*;
@@ -22,7 +22,6 @@ statement: returnStatement Semicolon
| doWhileStatement
| forStatement
| ifElseStatement
- | switchStatement
| statementExpression Semicolon;
blockStatement: OpenCurlyBracket statement* ClosedCurlyBracket;
@@ -39,10 +38,6 @@ ifStatement: If OpenRoundBracket expression ClosedRoundBracket blockStatement;
elseIfStatement: Else If OpenRoundBracket expression ClosedRoundBracket blockStatement;
elseStatement: Else blockStatement;
-switchStatement: Switch OpenRoundBracket expression ClosedRoundBracket OpenCurlyBracket caseStatement+ defaultStatement? ClosedCurlyBracket;
-caseStatement: Case value Colon statement*;
-defaultStatement: Default Colon statement*;
-
statementExpression: assign | newDeclaration | methodCall | crementExpression;
assign: assignableExpression Assign expression;
newDeclaration: New Identifier OpenRoundBracket argumentList ClosedRoundBracket;
@@ -158,10 +153,6 @@ Else: 'else';
For: 'for';
Return: 'return';
New: 'new';
-Switch: 'switch';
-Case: 'case';
-Default: 'default';
-Colon: ':';
// Werte
CharValue: '\'' ~[\r\n]* '\'';
diff --git a/src/test/java/main/E2EReflectionsTest.java b/src/test/java/main/E2EReflectionsTest.java
index bb7f2ed..453d7b3 100644
--- a/src/test/java/main/E2EReflectionsTest.java
+++ b/src/test/java/main/E2EReflectionsTest.java
@@ -168,7 +168,7 @@ public class E2EReflectionsTest {
@Test
public void testByteCodeGenerator() {
// Test the bytecode generator
- ByteCodeGenerator byteCodeGenerator = new ByteCodeGenerator(outputDirectoryPath, true, true);
+ ByteCodeGenerator byteCodeGenerator = new ByteCodeGenerator(outputDirectoryPath);
byteCodeGenerator.visit((ProgramNode) mockTypedAST);
verify(mockByteCodeGenerator, times(1)).visit((ProgramNode) mockTypedAST);
diff --git a/src/test/java/parser/AstBuilderTest.java b/src/test/java/parser/AstBuilderTest.java
index 7018f8f..b163a2a 100644
--- a/src/test/java/parser/AstBuilderTest.java
+++ b/src/test/java/parser/AstBuilderTest.java
@@ -1,38 +1,42 @@
package parser;
+
import ast.ASTNode;
import ast.ClassNode;
import ast.ProgramNode;
import ast.expressions.IExpressionNode;
-import ast.expressions.binaryexpressions.CalculationNode;
-import ast.expressions.binaryexpressions.DotNode;
-import ast.expressions.binaryexpressions.DotSubstractionNode;
-import ast.expressions.binaryexpressions.NonCalculationNode;
import ast.expressions.unaryexpressions.MemberAccessNode;
import ast.expressions.unaryexpressions.UnaryNode;
-import ast.members.*;
+import ast.members.ConstructorNode;
+import ast.members.FieldNode;
+import ast.members.MemberNode;
+import ast.members.MethodNode;
import ast.parameters.ParameterNode;
import ast.statementexpressions.AssignNode;
import ast.statementexpressions.AssignableNode;
-import ast.statementexpressions.crementexpressions.CrementType;
-import ast.statementexpressions.crementexpressions.DecrementNode;
-import ast.statementexpressions.crementexpressions.IncrementNode;
-import ast.statementexpressions.NewDeclarationNode;
import ast.statementexpressions.methodcallstatementnexpressions.MethodCallNode;
-import ast.statements.*;
-import ast.statementexpressions.methodcallstatementnexpressions.TargetNode;
import ast.statements.BlockNode;
-import ast.statements.LocalVariableDeclarationNode;
+import ast.statements.IStatementNode;
import ast.statements.ReturnNode;
import ast.type.AccessModifierNode;
import ast.type.EnumValueNode;
import ast.type.ValueNode;
import ast.type.type.BaseType;
-import ast.type.type.ReferenceType;
+import ast.type.type.ITypeNode;
import ast.type.type.TypeEnum;
-
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.antlr.v4.runtime.CharStream;
+import org.antlr.v4.runtime.CharStreams;
+import org.antlr.v4.runtime.CommonTokenStream;
+import org.antlr.v4.runtime.tree.ParseTree;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
+import parser.astBuilder.ASTBuilder;
+import parser.generated.SimpleJavaLexer;
+import parser.generated.SimpleJavaParser;
+
+import java.io.IOException;
+import java.lang.reflect.Member;
import static org.assertj.core.api.Assertions.assertThat;
@@ -78,7 +82,7 @@ class AstBuilderTest {
@DisplayName("Field Test")
public void fieldTest() {
ClassNode class1 = Helper.generateEmptyClass("TestClass");
- class1.addMember(new FieldNode(new AccessModifierNode("public"), new BaseType(TypeEnum.INT), "a"));
+ class1.addMember(new FieldNode(null, new BaseType(TypeEnum.INT), "a"));
ProgramNode expected = new ProgramNode();
expected.addClass(class1);
@@ -339,270 +343,74 @@ class AstBuilderTest {
@DisplayName("Self Reference Test")
public void selfReferneceTest(){
- ClassNode testClass = Helper.generateEmptyClass("TestClass");
-
- MemberNode testClassObject = new FieldNode(new AccessModifierNode("public"), new ReferenceType("TestClass"),"testClass");
-
- BlockNode testMethod1Block = new BlockNode();
- testMethod1Block.addStatement(new ReturnNode(new UnaryNode(new MethodCallNode(new TargetNode(true), "testMethod2"))));
- MethodNode testMethod1 = new MethodNode("public", new BaseType(TypeEnum.INT), false, "testMethod1", testMethod1Block);
-
- BlockNode testMethod2Block = new BlockNode();
- testMethod2Block.addStatement(new ReturnNode(new UnaryNode(new ValueNode(EnumValueNode.INT_VALUE,"1"))));
- MethodNode testMethod2 = new MethodNode("public", new BaseType(TypeEnum.INT), false, "testMethod2", testMethod2Block);
-
- BlockNode testMethod3Block = new BlockNode();
- testMethod3Block.addStatement(new LocalVariableDeclarationNode(new ReferenceType("TestClass"),"testClass1", "=", new UnaryNode(new NewDeclarationNode("TestClass")))); // Assing einfach "=" ?
- MemberAccessNode methodAccess = new MemberAccessNode(false);
- methodAccess.addIdentifier("testClass1");
- methodAccess.addIdentifier("testClass");
- TargetNode methodTarget = new TargetNode(methodAccess);
- testMethod3Block.addStatement(new ReturnNode(new UnaryNode(new MethodCallNode(methodTarget,"testMethod1"))));
- MethodNode testMethod3 = new MethodNode("public", new BaseType(TypeEnum.INT), false, "testMethod3", testMethod3Block);
-
- testClass.addMember(testClassObject);
- testClass.addMember(testMethod1);
- testClass.addMember(testMethod2);
- testClass.addMember(testMethod3);
-
- ProgramNode expected = new ProgramNode();
- expected.addClass(testClass);
-
- ASTNode actual = Helper.generateAST("src/test/resources/input/javaCases/SelfReference.java");
-
- assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
+ //assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
}
@Test
@DisplayName("Variable Compare Test")
public void variableCompareTest(){
- ClassNode class1 = Helper.generateEmptyClass("TestClass");
- UnaryNode trueValue = new UnaryNode(new ValueNode(EnumValueNode.BOOLEAN_VALUE,"true"));
- UnaryNode falseValue = new UnaryNode(new ValueNode(EnumValueNode.BOOLEAN_VALUE,"false"));
- BlockNode trueBlock = new BlockNode();
- trueBlock.addStatement(new ReturnNode(trueValue));
- MethodNode trueMethod = new MethodNode("public", new BaseType(TypeEnum.BOOL), false, "trueMethod", trueBlock);
-
- BlockNode falseBlock = new BlockNode();
- falseBlock.addStatement(new ReturnNode(falseValue));
- MethodNode falseMethod = new MethodNode("public", new BaseType(TypeEnum.BOOL), false, "falseMethod", falseBlock);
-
- BlockNode trueAndTrueBlock = new BlockNode();
- trueAndTrueBlock.addStatement(new ReturnNode(new NonCalculationNode(trueValue, "&&", trueValue)));
- MethodNode trueAndTrueMethod = new MethodNode("public", new BaseType(TypeEnum.BOOL), false, "trueAndTrueMethod", trueAndTrueBlock);
-
- BlockNode trueAndFalseBlock = new BlockNode();
- trueAndFalseBlock.addStatement(new ReturnNode(new NonCalculationNode(trueValue, "&&", falseValue)));
- MethodNode trueAndFalseMethod = new MethodNode("public", new BaseType(TypeEnum.BOOL), false, "trueAndFalseMethod", trueAndFalseBlock);
-
- BlockNode falseAndFalseBlock = new BlockNode();
- falseAndFalseBlock.addStatement(new ReturnNode(new NonCalculationNode(falseValue, "&&", falseValue)));
- MethodNode falseAndFalseMethod = new MethodNode("public", new BaseType(TypeEnum.BOOL), false, "falseAndFalseMethod", falseAndFalseBlock);
-
- BlockNode trueOrTrueBlock = new BlockNode();
- trueOrTrueBlock.addStatement(new ReturnNode(new NonCalculationNode(trueValue, "||", trueValue)));
- MethodNode trueOrFalseMethod = new MethodNode("public", new BaseType(TypeEnum.BOOL), false, "trueOrTrueMethod", trueOrTrueBlock);
-
- BlockNode falseOrFalseBlock = new BlockNode();
- falseOrFalseBlock.addStatement(new ReturnNode(new NonCalculationNode(falseValue, "||", falseValue)));
- MethodNode falseOrFalseMethod = new MethodNode("public", new BaseType(TypeEnum.BOOL), false, "falseOrFalseMethod", falseOrFalseBlock);
-
- class1.addMember(trueMethod);
- class1.addMember(falseMethod);
- class1.addMember(trueAndTrueMethod);
- class1.addMember(trueAndFalseMethod);
- class1.addMember(falseAndFalseMethod);
- class1.addMember(trueOrFalseMethod);
- class1.addMember(falseOrFalseMethod);
-
- ProgramNode expected = new ProgramNode();
- expected.addClass(class1);
-
- ASTNode actual = Helper.generateAST("src/test/resources/input/javaCases/variableCompare.java");
-
- assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
+ //assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
}
@Test
@DisplayName("Variable Calculation Test")
public void variableCalculationTest(){
- ClassNode class1 = Helper.generateEmptyClass("TestClass");
- BlockNode aPlusBBlock = new BlockNode();
- aPlusBBlock.addStatement(new ReturnNode(new CalculationNode(new CalculationNode(new DotNode(new DotSubstractionNode("a"))), "+", new DotNode(new DotSubstractionNode("b")))));
- MethodNode aPlusBMethod = new MethodNode("public", new BaseType(TypeEnum.INT), false, "aPlusB", aPlusBBlock);
- aPlusBMethod.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "a"));
- aPlusBMethod.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "b"));
-
- BlockNode aMinusBBlock = new BlockNode();
- aMinusBBlock.addStatement(new ReturnNode(new CalculationNode(new CalculationNode(new DotNode(new DotSubstractionNode("a"))), "-", new DotNode(new DotSubstractionNode("b")))));
- MethodNode aMinusBMethod = new MethodNode("public", new BaseType(TypeEnum.INT), false, "aMinusB", aMinusBBlock);
- aMinusBMethod.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "a"));
- aMinusBMethod.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "b"));
-
- BlockNode aTimeBBlock = new BlockNode();
- aTimeBBlock.addStatement(new ReturnNode(new CalculationNode(new DotNode(new DotNode(new DotSubstractionNode("a")), "*", new DotSubstractionNode("b")))));
- MethodNode aTimeBMethod = new MethodNode("public", new BaseType(TypeEnum.INT), false, "aTimeB", aTimeBBlock);
- aTimeBMethod.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "a"));
- aTimeBMethod.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "b"));
-
- BlockNode aDivBBlock = new BlockNode();
- aDivBBlock.addStatement(new ReturnNode(new CalculationNode(new DotNode(new DotNode(new DotSubstractionNode("a")), "/", new DotSubstractionNode("b")))));
- MethodNode aDivBMethod = new MethodNode("public", new BaseType(TypeEnum.INT), false, "aDivB", aDivBBlock);
- aDivBMethod.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "a"));
- aDivBMethod.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "b"));
-
- BlockNode complexCalcBlock = new BlockNode();
- complexCalcBlock.addStatement(new ReturnNode(new CalculationNode(null, null, new DotNode(new DotNode(new DotNode(new DotNode(new DotSubstractionNode("a")), "*", new DotSubstractionNode("b")), "/", new DotSubstractionNode(new ValueNode(EnumValueNode.INT_VALUE, "1"))), "*", new DotSubstractionNode(new ValueNode(EnumValueNode.INT_VALUE, "3"))))));
- MethodNode complexCalcMethod = new MethodNode("public", new BaseType(TypeEnum.INT), false, "complexCalc", complexCalcBlock);
- complexCalcMethod.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "a"));
- complexCalcMethod.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "b"));
-
- BlockNode aSmallerBBlock = new BlockNode();
- aSmallerBBlock.addStatement(new ReturnNode(new NonCalculationNode(new UnaryNode("a"), "<", new UnaryNode("b"))));
- MethodNode aSmallerBMethod = new MethodNode("public", new BaseType(TypeEnum.BOOL), false, "aSmallerB", aSmallerBBlock);
- aSmallerBMethod.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "a"));
- aSmallerBMethod.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "b"));
-
- BlockNode aGreaterBBlock = new BlockNode();
- aGreaterBBlock.addStatement(new ReturnNode(new NonCalculationNode(new UnaryNode("a"), ">", new UnaryNode("b"))));
- MethodNode aGreaterBMethod = new MethodNode("public", new BaseType(TypeEnum.BOOL), false, "aGreaterB", aGreaterBBlock);
- aGreaterBMethod.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "a"));
- aGreaterBMethod.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "b"));
-
- BlockNode aEqualsBBlock = new BlockNode();
- aEqualsBBlock.addStatement(new ReturnNode(new NonCalculationNode(new UnaryNode("a"), "==", new UnaryNode("b"))));
- MethodNode aEqualsBMethod = new MethodNode("public", new BaseType(TypeEnum.BOOL), false, "aEqualsB", aEqualsBBlock);
- aEqualsBMethod.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "a"));
- aEqualsBMethod.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "b"));
-
- class1.addMember(aPlusBMethod);
- class1.addMember(aMinusBMethod);
- class1.addMember(aTimeBMethod);
- class1.addMember(aDivBMethod);
- class1.addMember(complexCalcMethod);
- class1.addMember(aSmallerBMethod);
- class1.addMember(aGreaterBMethod);
- class1.addMember(aEqualsBMethod);
-
- ProgramNode expected = new ProgramNode();
- expected.addClass(class1);
-
- ASTNode actual = Helper.generateAST("src/test/resources/input/javaCases/variableCalculation.java");
-
- assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
+ //assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
}
@Test
@DisplayName("Main Method Test")
public void mainMethodTest(){
- ClassNode class1 = Helper.generateEmptyClass("TestClass");
- BlockNode block = new BlockNode();
- block.addStatement(new ReturnNode(null));
-
- class1.addMember(new MainMethodNode(block));
-
- ProgramNode expected = new ProgramNode();
- expected.addClass(class1);
-
- ASTNode actual = Helper.generateAST("src/test/resources/input/javaCases/MainMethod.java");
-
- assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
+ //assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
}
@Test
@DisplayName("While Test")
public void whileTest(){
- NonCalculationNode condition = new NonCalculationNode(new UnaryNode("i"), ">", new UnaryNode(new ValueNode(EnumValueNode.INT_VALUE, "0")));
- BlockNode whileBlock = new BlockNode();
- whileBlock.addStatement(new DecrementNode(CrementType.SUFFIX, new AssignableNode("i")));
-
- WhileNode whileStatement = new WhileNode(condition, whileBlock);
-
- BlockNode blockCon = new BlockNode();
- blockCon.addStatement(new LocalVariableDeclarationNode(new BaseType(TypeEnum.INT), "i", "=", new UnaryNode(new ValueNode(EnumValueNode.INT_VALUE, "10"))));
- blockCon.addStatement(whileStatement);
- blockCon.addStatement(new ReturnNode(null));
- ConstructorNode constructor = new ConstructorNode("public", "TestClass", blockCon);
-
- ClassNode class1 = new ClassNode("public", "TestClass");
- class1.addMember(constructor);
-
- ProgramNode expected = new ProgramNode();
- expected.addClass(class1);
-
- ASTNode actual = Helper.generateAST("src/test/resources/input/javaCases/While.java");
-
- assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
+ //assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
}
@Test
@DisplayName("Do While Test")
public void doWhileTest(){
- NonCalculationNode condition = new NonCalculationNode(new UnaryNode("i"), "<", new UnaryNode(new ValueNode(EnumValueNode.INT_VALUE, "10")));
- BlockNode whileBlock = new BlockNode();
- whileBlock.addStatement(new IncrementNode(CrementType.SUFFIX, new AssignableNode("i")));
-
- WhileNode whileStatement = new WhileNode(condition, whileBlock);
-
- BlockNode blockDoWhile = new BlockNode();
- blockDoWhile.addStatement(whileBlock);
- blockDoWhile.addStatement(whileStatement);
-
- BlockNode blockCon = new BlockNode();
- blockCon.addStatement(new LocalVariableDeclarationNode(new BaseType(TypeEnum.INT), "i", "=", new UnaryNode(new ValueNode(EnumValueNode.INT_VALUE, "0"))));
- blockCon.addStatement(blockDoWhile);
- blockCon.addStatement(new ReturnNode(null));
- ConstructorNode constructor = new ConstructorNode("public", "TestClass", blockCon);
-
- ClassNode class1 = new ClassNode("public", "TestClass");
- class1.addMember(constructor);
-
- ProgramNode expected = new ProgramNode();
- expected.addClass(class1);
-
- ASTNode actual = Helper.generateAST("src/test/resources/input/javaCases/DoWhile.java");
-
- assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
+ //assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
}
@Test
@DisplayName("For Test")
public void forTest(){
- LocalVariableDeclarationNode forDeclaration = new LocalVariableDeclarationNode(new BaseType(TypeEnum.INT), "i", "=", new UnaryNode(new ValueNode(EnumValueNode.INT_VALUE, "0")));
- AssignableNode assignable = new AssignableNode("i");
- IncrementNode increment = new IncrementNode(CrementType.SUFFIX, assignable);
+ //assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
+ }
- LocalVariableDeclarationNode declaration = new LocalVariableDeclarationNode(new BaseType(TypeEnum.INT), "a", null, null);
-
- BlockNode whileBlock = new BlockNode();
- whileBlock.addStatement(declaration);
- whileBlock.addStatement(increment);
-
- WhileNode whileStatement = new WhileNode(new NonCalculationNode(new UnaryNode("i"), "<", new UnaryNode(new ValueNode(EnumValueNode.INT_VALUE, "10"))), whileBlock);
-
- BlockNode forStatement = new BlockNode();
- forStatement.addStatement(forDeclaration);
- forStatement.addStatement(whileStatement);
-
- BlockNode blockCon = new BlockNode();
- blockCon.addStatement(forStatement);
- blockCon.addStatement(new ReturnNode(null));
- ConstructorNode constructor = new ConstructorNode("public", "TestClass", blockCon);
-
- ClassNode class1 = new ClassNode("public", "TestClass");
- class1.addMember(constructor);
+ //Noch nicht speziell Increment nur zum Development Testen per Debug
+ @Test
+ @DisplayName("Increment Test")
+ public void incrementTest(){
+ ClassNode classNode = Helper.generateEmptyClass("TestClass");
+ classNode.addMember(new FieldNode(new AccessModifierNode("public"), new BaseType(TypeEnum.INT), "a"));
ProgramNode expected = new ProgramNode();
- expected.addClass(class1);
-
- ASTNode actual = Helper.generateAST("src/test/resources/input/javaCases/For.java");
+ expected.addClass(classNode);
+ ASTNode actual = Helper.generateAST("src/test/resources/input/javaCases/Increment.java");
assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
}
+
+
+
+
+
+
+
+
+
+
+
+
}
\ No newline at end of file
diff --git a/src/test/resources/input/javaCases/DoWhile.java b/src/test/resources/input/javaCases/DoWhile.java
index 3ca1b24..65c25de 100644
--- a/src/test/resources/input/javaCases/DoWhile.java
+++ b/src/test/resources/input/javaCases/DoWhile.java
@@ -4,7 +4,7 @@ class TestClass{
int i = 0;
do{
- i++;
+ i++
}while(i < 10);
}
}
\ No newline at end of file
diff --git a/src/test/resources/input/javaCases/MainMethod.java b/src/test/resources/input/javaCases/MainMehod.java
similarity index 100%
rename from src/test/resources/input/javaCases/MainMethod.java
rename to src/test/resources/input/javaCases/MainMehod.java
diff --git a/src/test/resources/input/javaCases/SelfReference.java b/src/test/resources/input/javaCases/SelfReference.java
index a1709f5..cbe6e25 100644
--- a/src/test/resources/input/javaCases/SelfReference.java
+++ b/src/test/resources/input/javaCases/SelfReference.java
@@ -3,14 +3,14 @@ class TestClass{
TestClass testClass;
int testMethod1() {
- return this.testMethod2();
+ return this.testMethod2()
}
int testMethod2() {
return 1;
}
- int testMethod3(){
+ int testMehtod3(){
TestClass testClass1 = new TestClass();
return testClass1.testClass.testMethod1();
}
diff --git a/src/test/resources/input/javaCases/SwitchCase.java b/src/test/resources/input/javaCases/SwitchCase.java
deleted file mode 100644
index 124c521..0000000
--- a/src/test/resources/input/javaCases/SwitchCase.java
+++ /dev/null
@@ -1,10 +0,0 @@
-class TestClass{
-
- TestClasd (){
- switch (a){
- case 1:
- b = 1;
-
- }
- }
-}
\ No newline at end of file
diff --git a/src/test/resources/input/javaCases/variableCalculation.java b/src/test/resources/input/javaCases/variableCalculationTest.java
similarity index 87%
rename from src/test/resources/input/javaCases/variableCalculation.java
rename to src/test/resources/input/javaCases/variableCalculationTest.java
index f1b79d8..7708811 100644
--- a/src/test/resources/input/javaCases/variableCalculation.java
+++ b/src/test/resources/input/javaCases/variableCalculationTest.java
@@ -16,8 +16,8 @@ class TestClass{
return a / b;
}
- int complexCalc (int a, int b){
- return a * b / 1 * 3;
+ int colmplexCalc (int a, int b){
+ return a * (b / 1);
}
boolean aSmallerB (int a, int b){
diff --git a/src/test/resources/input/javaCases/variableCompare.java b/src/test/resources/input/javaCases/variableCompare.java
deleted file mode 100644
index 81ed8f5..0000000
--- a/src/test/resources/input/javaCases/variableCompare.java
+++ /dev/null
@@ -1,30 +0,0 @@
-class TestClass{
-
- boolean trueMethod() {
- return true;
- }
-
- boolean falseMethod(){
- return false;
- }
-
- boolean trueAndTrueMethod(){
- return true && true;
- }
-
- boolean trueAndFalseMethod(){
- return true && false;
- }
-
- boolean falseAndFalseMethod(){
- return false && false;
- }
-
- boolean trueOrTrueMethod(){
- return true || true;
- }
-
- boolean falseOrFalseMethod(){
- return false || false;
- }
-}
\ No newline at end of file
diff --git a/src/test/resources/input/javaCases/variableCompareTest.java b/src/test/resources/input/javaCases/variableCompareTest.java
new file mode 100644
index 0000000..dc01954
--- /dev/null
+++ b/src/test/resources/input/javaCases/variableCompareTest.java
@@ -0,0 +1,30 @@
+class TestClass{
+
+ boolean true(){
+ return true;
+ }
+
+ boolean false(){
+ return false();
+ }
+
+ boolean trueAndTrue(){
+ return true && true;
+ }
+
+ boolean trueAndFalse(){
+ return true && true;
+ }
+
+ boolean falseAndFalse(){
+ return false && false;
+ }
+
+ boolean trueOrFalse(){
+ return true || false;
+ }
+
+ boolean falseOrFalse(){
+ return false || false;
+ }
+}
\ No newline at end of file
--
2.34.1
From 87be850a0e488fffe004f782f0044c506c31255d Mon Sep 17 00:00:00 2001
From: i22007
Date: Tue, 2 Jul 2024 18:07:48 -0400
Subject: [PATCH 17/96] Revert "Merge branch 'main' into code-generator"
This reverts commit 895636203384d015cd90c724cd4e9f3bb72ab9bd, reversing
changes made to b58fa00c9a7527c434849cb1fc2dbf3bd2194529.
---
.idea/jarRepositories.xml | 5 -
pom.xml | 13 --
src/main/java/ast/literal/LiteralNode.java | 1 +
src/main/java/main/Main.java | 8 +-
.../java/parser/astBuilder/ASTBuilder.java | 7 +-
src/main/resources/input/CompilerInput.java | 4 +-
src/main/resources/output/output.jar | Bin 211 -> 0 bytes
src/test/Makefile | 3 +-
src/test/java/main/E2EReflectionsTest.java | 177 ------------------
.../input/AllFeaturesClassExample.java | 42 +++--
src/test/resources/trees/correctRefType.json | 70 +++++++
src/test/resources/trees/refTypeMismatch.json | 133 +++++++++++++
src/test/resources/trees/test.json | 1 +
13 files changed, 235 insertions(+), 229 deletions(-)
delete mode 100644 src/main/resources/output/output.jar
delete mode 100644 src/test/java/main/E2EReflectionsTest.java
create mode 100644 src/test/resources/trees/correctRefType.json
create mode 100644 src/test/resources/trees/refTypeMismatch.json
create mode 100644 src/test/resources/trees/test.json
diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml
index 35e8b50..712ab9d 100644
--- a/.idea/jarRepositories.xml
+++ b/.idea/jarRepositories.xml
@@ -6,11 +6,6 @@
-
-
-
-
-
diff --git a/pom.xml b/pom.xml
index e32826e..99e9904 100644
--- a/pom.xml
+++ b/pom.xml
@@ -44,12 +44,6 @@
3.26.0
test
-
- org.mockito
- mockito-core
- 5.11.0
- test
-
@@ -84,11 +78,4 @@
-
-
- maven_central
- Maven Central
- https://repo.maven.apache.org/maven2/
-
-
\ No newline at end of file
diff --git a/src/main/java/ast/literal/LiteralNode.java b/src/main/java/ast/literal/LiteralNode.java
index e18ab7b..43a16f9 100644
--- a/src/main/java/ast/literal/LiteralNode.java
+++ b/src/main/java/ast/literal/LiteralNode.java
@@ -1,4 +1,5 @@
package ast.literal;
+
import ast.expressions.IExpressionNode;
import ast.type.type.ITypeNode;
import semantic.SemanticVisitor;
diff --git a/src/main/java/main/Main.java b/src/main/java/main/Main.java
index c365050..7568d24 100644
--- a/src/main/java/main/Main.java
+++ b/src/main/java/main/Main.java
@@ -91,15 +91,15 @@ public class Main {
/*------------------------- Semantic Analyzer -> typed AST -------------------------*/
// Use the SemanticAnalyzer to generate a typed AST
- //ASTNode typedAst = SemanticAnalyzer.generateTast(abstractSyntaxTree);
+ ASTNode typedAst = SemanticAnalyzer.generateTast(abstractSyntaxTree);
// Log the typed AST
- RaupenLogger.logSemanticAnalyzer(abstractSyntaxTree);
+ RaupenLogger.logSemanticAnalyzer(typedAst);
/*------------------------- Bytecode Generator -> Bytecode -------------------------*/
// Use the ByteCodeGenerator to generate bytecode from the typed AST and output it to the specified directory
ByteCodeGenerator byteCodeGenerator = new ByteCodeGenerator(outputDirectoryPath);
- assert abstractSyntaxTree != null;
- byteCodeGenerator.visit((ProgramNode) abstractSyntaxTree);
+ assert typedAst != null;
+ byteCodeGenerator.visit((ProgramNode) typedAst);
// Log the bytecode generation
RaupenLogger.logBytecodeGenerator();
}
diff --git a/src/main/java/parser/astBuilder/ASTBuilder.java b/src/main/java/parser/astBuilder/ASTBuilder.java
index db153db..7ee199b 100644
--- a/src/main/java/parser/astBuilder/ASTBuilder.java
+++ b/src/main/java/parser/astBuilder/ASTBuilder.java
@@ -75,12 +75,7 @@ public class ASTBuilder extends SimpleJavaBaseVisitor {
@Override
public ASTNode visitConstructorDeclaration(SimpleJavaParser.ConstructorDeclarationContext ctx) {
- ConstructorNode constructorNode;
- if(ctx.AccessModifier() != null) {
- constructorNode = new ConstructorNode(ctx.AccessModifier().getText(), ctx.Identifier().getText(), (BlockNode) visit(ctx.blockStatement()));
- } else {
- constructorNode = new ConstructorNode(null, ctx.Identifier().getText(), (BlockNode) visit(ctx.blockStatement()));
- }
+ ConstructorNode constructorNode = new ConstructorNode(ctx.AccessModifier().getText(), ctx.Identifier().getText(), (BlockNode) visit(ctx.blockStatement()));
if(ctx.parameterList() != null) {
for(SimpleJavaParser.ParameterContext parameter : ctx.parameterList().parameter()) {
constructorNode.addParameter((ParameterNode) visit(parameter));
diff --git a/src/main/resources/input/CompilerInput.java b/src/main/resources/input/CompilerInput.java
index b27068a..825490d 100644
--- a/src/main/resources/input/CompilerInput.java
+++ b/src/main/resources/input/CompilerInput.java
@@ -2,15 +2,13 @@ public class Compiler {
public int add(int i, int j) {
return i+j;
}
- public static void main(String[] args) {
- int a = 1;
- }
}
public class Node {
public void main() {
Compiler compiler = new Compiler();
int i = compiler.add(5, 8);
+ return i;
}
}
diff --git a/src/main/resources/output/output.jar b/src/main/resources/output/output.jar
deleted file mode 100644
index 5749e1bdd41b7eec182fc508e7cfebfb99fd14d5..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 211
zcmWIWW@Zs#;Nak3VA=ODf&mGLFt9NAx`sIFdiuHP`#So0y1532==r++JH^28+4sz8
zA8%c~i@e^tTIbH3-yCFc#rVO~Prhf)TrNH5siU_osNmdr-4ka#bss%_^puGqz?+@p
sbea4cL!brvKpf!B$RxsmuozhmWHBnh<%|GtRyL4IMj&(p(&b=n0I9+?*#H0l
diff --git a/src/test/Makefile b/src/test/Makefile
index 1464161..883b79c 100644
--- a/src/test/Makefile
+++ b/src/test/Makefile
@@ -10,7 +10,7 @@ compile-javac:
compile-raupenpiler:
cd ../.. ; mvn -DskipTests install
cd ../.. ; mvn exec:java -Dexec.mainClass="main.Main" -Dexec.args="'src/main/resources/input/CompilerInput.java' 'src/main/resources/output' "
- # cp ../main/resources/output/CompilerInput.class .java/resources/output/raupenpiler
+ cp ../main/resources/output/CompilerInput.class .java/resources/output/raupenpiler
test: compile-javac compile-raupenpiler test-javac test-raupenpiler
@@ -31,7 +31,6 @@ test-raupenpiler:
clean:
# clean output folders
rm -f ../main/resources/output/*.class
- rm -f ../main/resources/output/*.jar
rm -f ./resources/output/javac/*.class
rm -f ./resources/output/raupenpiler/*.class
# clean logs
diff --git a/src/test/java/main/E2EReflectionsTest.java b/src/test/java/main/E2EReflectionsTest.java
deleted file mode 100644
index 453d7b3..0000000
--- a/src/test/java/main/E2EReflectionsTest.java
+++ /dev/null
@@ -1,177 +0,0 @@
-package main;
-
-import ast.ASTNode;
-import ast.ProgramNode;
-import bytecode.ByteCodeGenerator;
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-import org.antlr.v4.runtime.CharStream;
-import org.antlr.v4.runtime.CommonTokenStream;
-import org.antlr.v4.runtime.tree.ParseTree;
-import parser.astBuilder.ASTBuilder;
-import parser.generated.SimpleJavaLexer;
-import parser.generated.SimpleJavaParser;
-import semantic.SemanticAnalyzer;
-
-import static org.junit.jupiter.api.Assertions.*;
-import static org.mockito.Mockito.*;
-
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-
-public class E2EReflectionsTest {
-
-
- private CharStream mockInputCharStream;
- private String outputDirectoryPath;
- private SimpleJavaLexer mockLexer;
- private CommonTokenStream mockTokenStream;
- private SimpleJavaParser mockParser;
- private ParseTree mockParseTree;
- private ASTBuilder mockASTBuilder;
- private ASTNode mockASTNode;
- private SemanticAnalyzer mockSemanticAnalyzer;
- private ASTNode mockTypedAST;
- private ByteCodeGenerator mockByteCodeGenerator;
-
- @BeforeEach
- public void setUp() {
- mockInputCharStream = mock(CharStream.class);
- outputDirectoryPath = "path/to/output";
- mockLexer = mock(SimpleJavaLexer.class);
- mockTokenStream = mock(CommonTokenStream.class);
- mockParser = mock(SimpleJavaParser.class);
- mockParseTree = mock(ParseTree.class);
- mockASTBuilder = mock(ASTBuilder.class);
- mockASTNode = mock(ASTNode.class);
- mockSemanticAnalyzer = mock(SemanticAnalyzer.class);
- mockTypedAST = mock(ASTNode.class);
- mockByteCodeGenerator = mock(ByteCodeGenerator.class);
- }
-
- @Test
- public void testCompileFile() throws Exception {
- // Mock the dependencies
- SimpleJavaLexer mockLexer = mock(SimpleJavaLexer.class);
- CommonTokenStream mockTokenStream = mock(CommonTokenStream.class);
- SimpleJavaParser mockParser = mock(SimpleJavaParser.class);
- ParseTree mockParseTree = mock(ParseTree.class);
- ASTBuilder mockASTBuilder = mock(ASTBuilder.class);
- ASTNode mockASTNode = mock(ASTNode.class);
- SemanticAnalyzer mockSemanticAnalyzer = mock(SemanticAnalyzer.class);
- ASTNode mockTypedAST = mock(ASTNode.class);
- ByteCodeGenerator mockByteCodeGenerator = mock(ByteCodeGenerator.class);
-
- // Mock the behavior
- when(mockLexer.nextToken()).thenReturn(null);
- when(mockTokenStream.getTokens()).thenReturn(new ArrayList<>());
- when(mockParser.program()).thenReturn((SimpleJavaParser.ProgramContext) mockParseTree);
- when(mockASTBuilder.visit(mockParseTree)).thenReturn(mockASTNode);
- when(SemanticAnalyzer.generateTast(mockASTNode)).thenReturn(mockTypedAST);
-
- // Use reflection to invoke the compileFile method
- Method compileFileMethod = main.Main.class.getDeclaredMethod("compileFile", CharStream.class, String.class);
- compileFileMethod.setAccessible(true);
-
- compileFileMethod.invoke(null, mockInputCharStream, outputDirectoryPath);
-
- // Verify each step
- verify(mockLexer, times(1)).nextToken();
- verify(mockTokenStream, times(1)).getTokens();
- verify(mockParser, times(1)).program();
- verify(mockASTBuilder, times(1)).visit(mockParseTree);
- verify(mockSemanticAnalyzer, times(1)).generateTast(mockASTNode);
- verify(mockByteCodeGenerator, times(1)).visit((ProgramNode) mockTypedAST);
- }
-
- @Test
- public void testCompileFile2() throws Exception {
- // Mock the behavior
- when(mockLexer.nextToken()).thenReturn(null);
- when(mockTokenStream.getTokens()).thenReturn(new ArrayList<>());
- when(mockParser.program()).thenReturn((SimpleJavaParser.ProgramContext) mockParseTree);
- when(mockASTBuilder.visit(mockParseTree)).thenReturn(mockASTNode);
- when(SemanticAnalyzer.generateTast(mockASTNode)).thenReturn(mockTypedAST);
-
- // Use reflection to invoke the compileFile method
- Method compileFileMethod = main.Main.class.getDeclaredMethod("compileFile", CharStream.class, String.class);
- compileFileMethod.setAccessible(true);
-
- compileFileMethod.invoke(null, mockInputCharStream, outputDirectoryPath);
-
- // Verify each step
- verify(mockLexer, times(1)).nextToken();
- verify(mockTokenStream, times(1)).getTokens();
- verify(mockParser, times(1)).program();
- verify(mockASTBuilder, times(1)).visit(mockParseTree);
- verify(mockSemanticAnalyzer, times(1)).generateTast(mockASTNode);
- verify(mockByteCodeGenerator, times(1)).visit((ProgramNode) mockTypedAST);
- }
-
-
-
-
-
-
- @Test
- public void testLexer() {
- // Mock the behavior
- when(mockLexer.nextToken()).thenReturn(null);
-
- // Test the lexer
- SimpleJavaLexer lexer = new SimpleJavaLexer(mockInputCharStream);
- CommonTokenStream tokenStream = new CommonTokenStream(lexer);
- tokenStream.fill();
-
- assertNotNull(tokenStream.getTokens());
- verify(mockLexer, atLeastOnce()).nextToken();
- }
-
- @Test
- public void testParser() {
- // Mock the behavior
- when(mockParser.program()).thenReturn((SimpleJavaParser.ProgramContext) mockParseTree);
-
- // Test the parser
- SimpleJavaParser parser = new SimpleJavaParser(mockTokenStream);
- ParseTree parseTree = parser.program();
-
- assertNotNull(parseTree);
- verify(mockParser, times(1)).program();
- }
-
- @Test
- public void testASTBuilder() {
- // Mock the behavior
- when(mockASTBuilder.visit(mockParseTree)).thenReturn(mockASTNode);
-
- // Test the AST builder
- ASTBuilder astBuilder = new ASTBuilder();
- ASTNode abstractSyntaxTree = astBuilder.visit(mockParseTree);
-
- assertNotNull(abstractSyntaxTree);
- verify(mockASTBuilder, times(1)).visit(mockParseTree);
- }
-
- @Test
- public void testSemanticAnalyzer() {
- // Mock the behavior
- when(SemanticAnalyzer.generateTast(mockASTNode)).thenReturn(mockTypedAST);
-
- // Test the semantic analyzer
- ASTNode typedAst = SemanticAnalyzer.generateTast(mockASTNode);
-
- assertNotNull(typedAst);
- verify(mockSemanticAnalyzer, times(1)).generateTast(mockASTNode);
- }
-
- @Test
- public void testByteCodeGenerator() {
- // Test the bytecode generator
- ByteCodeGenerator byteCodeGenerator = new ByteCodeGenerator(outputDirectoryPath);
- byteCodeGenerator.visit((ProgramNode) mockTypedAST);
-
- verify(mockByteCodeGenerator, times(1)).visit((ProgramNode) mockTypedAST);
- }
-}
-
diff --git a/src/test/resources/input/AllFeaturesClassExample.java b/src/test/resources/input/AllFeaturesClassExample.java
index 73121ee..1a8493d 100644
--- a/src/test/resources/input/AllFeaturesClassExample.java
+++ b/src/test/resources/input/AllFeaturesClassExample.java
@@ -9,25 +9,42 @@ public class AllFeaturesClassExample {
this.b = b;
this.c = c;
}
+ private class InnerClass {
+ void innerMethod() {
+ System.out.println("Inner class method");
+ }
+ }
// Methode zur Demonstration von Kontrollstrukturen
void controlStructures() {
// if-else Anweisung
if (a > 10) {
- // System.out.println("a ist größer als 10");
+ System.out.println("a ist größer als 10");
} else {
- // System.out.println("a ist nicht größer als 10");
+ System.out.println("a ist nicht größer als 10");
}
// while Schleife
while (a > 0) {
- // System.out.println("a ist " + a);
+ System.out.println("a ist " + a);
a--;
}
// for Schleife
for (int i = 0; i < 5; i++) {
- // System.out.println("for Schleife Iteration: " + i);
+ System.out.println("for Schleife Iteration: " + i);
+ }
+
+ // switch Anweisung
+ switch (c) {
+ case 'a':
+ System.out.println("c ist ein 'a'");
+ break;
+ case 'b':
+ System.out.println("c ist ein 'b'");
+ break;
+ default:
+ System.out.println("c ist nicht 'a' oder 'b'");
}
}
@@ -35,28 +52,15 @@ public class AllFeaturesClassExample {
void logicalOperations() {
// Logische UND-Operation
if (b && a > 5) {
- // System.out.println("a ist größer als 5 und b ist wahr");
+ System.out.println("a ist größer als 5 und b ist wahr");
}
// Logische ODER-Operation
if (b || a < 5) {
- // System.out.println("b ist wahr oder a ist kleiner als 5");
+ System.out.println("b ist wahr oder a ist kleiner als 5");
}
}
- void mathOperations() {
- // Addition
- int sum = a + 5;
- // Subtraktion
- int difference = a - 5;
- // Multiplikation
- int product = a * 5;
- // Division
- int quotient = a / 5;
- // Modulo
- int remainder = a % 5;
- }
-
public static void main(String[] args) {
AllFeaturesClassExample obj = new AllFeaturesClassExample(12, true, 'a');
obj.controlStructures();
diff --git a/src/test/resources/trees/correctRefType.json b/src/test/resources/trees/correctRefType.json
new file mode 100644
index 0000000..7e67bbc
--- /dev/null
+++ b/src/test/resources/trees/correctRefType.json
@@ -0,0 +1,70 @@
+{
+ "classes": [
+ {
+ "identifier": "testClass1",
+ "accessType": {
+ "enumAccessTypeNode": "PUBLIC"
+ },
+ "members": [
+ {
+ "@type": "Field",
+ "accessTypeNode": {
+ "enumAccessTypeNode": "PUBLIC"
+ },
+ "type": {
+ "@type": "Base",
+ "enumType": "INT"
+ },
+ "identifier": "testVar1"
+ },
+ {
+ "@type": "Method",
+ "visibility": {
+ "enumAccessTypeNode": "PUBLIC"
+ },
+ "type": {
+ "@type": "Base",
+ "enumType": "INT"
+ },
+ "identifier": "testMethod",
+ "parameters": {
+ "parameters": [
+ {
+ "type": {
+ "@type": "Base",
+ "enumType": "INT"
+ },
+ "identifier": "param1"
+ }
+ ]
+ },
+ "statements": [
+ {
+ "@type": "Assignment",
+ "expressionLeft": {
+ "@type": "InstVar",
+ "identifier": "testVar1",
+ "expression": {
+ "@type": "This",
+ "type": {
+ "@type": "Reference",
+ "identifier": "testClass1"
+ }
+ },
+ "type": null
+ },
+ "expressionRight": {
+ "@type": "Literal",
+ "type": {
+ "@type": "Base",
+ "enumType": "INT"
+ }
+ }
+ }
+ ]
+ }
+ ],
+ "hasConstructor": false
+ }
+ ]
+}
\ No newline at end of file
diff --git a/src/test/resources/trees/refTypeMismatch.json b/src/test/resources/trees/refTypeMismatch.json
new file mode 100644
index 0000000..e5ebcd3
--- /dev/null
+++ b/src/test/resources/trees/refTypeMismatch.json
@@ -0,0 +1,133 @@
+{
+ "classes": [
+ {
+ "identifier": "testClass1",
+ "accessType": {
+ "enumAccessTypeNode": "PUBLIC"
+ },
+ "members": [
+ {
+ "@type": "Field",
+ "accessTypeNode": {
+ "enumAccessTypeNode": "PUBLIC"
+ },
+ "type": {
+ "@type": "Base",
+ "enumType": "INT"
+ },
+ "identifier": "testVar1"
+ },
+ {
+ "@type": "Method",
+ "visibility": {
+ "enumAccessTypeNode": "PUBLIC"
+ },
+ "type": {
+ "@type": "Base",
+ "enumType": "INT"
+ },
+ "identifier": "testMethod",
+ "parameters": {
+ "parameters": [
+ {
+ "type": {
+ "@type": "Base",
+ "enumType": "INT"
+ },
+ "identifier": "param1"
+ }
+ ]
+ },
+ "statements": [
+ {
+ "@type": "Assignment",
+ "expressionLeft": {
+ "@type": "InstVar",
+ "identifier": "testVar1",
+ "expression": {
+ "@type": "This",
+ "type": {
+ "@type": "Reference",
+ "identifier": "testClass1"
+ }
+ },
+ "type": null
+ },
+ "expressionRight": {
+ "@type": "Literal",
+ "type": {
+ "@type": "Base",
+ "enumType": "BOOLEAN"
+ }
+ }
+ }
+ ]
+ }
+ ],
+ "hasConstructor": false,
+ "methods": [
+ {
+ "@type": "Method",
+ "visibility": {
+ "enumAccessTypeNode": "PUBLIC"
+ },
+ "type": {
+ "@type": "Base",
+ "enumType": "INT"
+ },
+ "identifier": "testMethod",
+ "parameters": {
+ "parameters": [
+ {
+ "type": {
+ "@type": "Base",
+ "enumType": "INT"
+ },
+ "identifier": "param1"
+ }
+ ]
+ },
+ "statements": [
+ {
+ "@type": "Assignment",
+ "expressionLeft": {
+ "@type": "InstVar",
+ "identifier": "testVar",
+ "expression": {
+ "@type": "InstVar",
+ "identifier": "testVar",
+ "expression": {
+ "@type": "This",
+ "type": {
+ "@type": "Reference",
+ "identifier": "testClass2"
+ }
+ },
+ "type": null
+ },
+ "type": null
+ },
+ "expressionRight": {
+ "@type": "Literal",
+ "type": null
+ },
+ "type": null
+ },
+ {
+ "@type": "VariableDeclaration",
+ "type": {
+ "@type": "Base",
+ "enumType": "CHAR"
+ },
+ "identifier": "objectVar",
+ "expression": {
+ "@type": "Literal",
+ "type": null
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/src/test/resources/trees/test.json b/src/test/resources/trees/test.json
new file mode 100644
index 0000000..7acc30f
--- /dev/null
+++ b/src/test/resources/trees/test.json
@@ -0,0 +1 @@
+{"classes":[{"identifier":"testClass","accessType":{"enumAccessTypeNode":"PUBLIC"},"members":[{"@type":"Field","accessTypeNode":{"enumAccessTypeNode":"PUBLIC"},"type":{"@type":"Base","enumType":"INT"},"identifier":"testVar1"},{"@type":"Field","accessTypeNode":{"enumAccessTypeNode":"PUBLIC"},"type":{"@type":"Base","enumType":"INT"},"identifier":"objectVar"},{"@type":"Method","visibility":{"enumAccessTypeNode":"PUBLIC"},"type":{"@type":"Base","enumType":"INT"},"identifier":"testVar2","parameters":{"parameters":[{"type":{"@type":"Base","enumType":"INT"},"identifier":"param1"}]},"statements":[{"@type":"Assignment","expressionLeft":{"@type":"InstVar","identifier":"objectVar","expression":{"@type":"This","type":{"@type":"Reference","identifier":"testClass"}},"type":null},"expressionRight":{"@type":"Literal","type":{"@type":"Base","enumType":"INT"}}}]}],"hasConstructor":false,"methods":[{"@type":"Method","visibility":{"enumAccessTypeNode":"PUBLIC"},"type":{"@type":"Base","enumType":"INT"},"identifier":"testVar2","parameters":{"parameters":[{"type":{"@type":"Base","enumType":"INT"},"identifier":"param1"}]},"statements":[{"@type":"Assignment","expressionLeft":{"@type":"InstVar","identifier":"objectVar","expression":{"@type":"This","type":{"@type":"Reference","identifier":"testClass"}},"type":null},"expressionRight":{"@type":"Literal","type":{"@type":"Base","enumType":"INT"}}}]}]}]}
\ No newline at end of file
--
2.34.1
From bd76135895b2964a1a20198d0f749cd539b98888 Mon Sep 17 00:00:00 2001
From: i22007
Date: Tue, 2 Jul 2024 21:43:03 -0400
Subject: [PATCH 18/96] Some changes
---
.../TargetNode.java | 5 -
src/main/java/bytecode/MethodCodeGen.java | 115 +++++++++---------
.../java/bytecode/visitor/MethodVisitor.java | 1 -
3 files changed, 58 insertions(+), 63 deletions(-)
diff --git a/src/main/java/ast/statementexpressions/methodcallstatementnexpressions/TargetNode.java b/src/main/java/ast/statementexpressions/methodcallstatementnexpressions/TargetNode.java
index d343dbe..fbd0c08 100644
--- a/src/main/java/ast/statementexpressions/methodcallstatementnexpressions/TargetNode.java
+++ b/src/main/java/ast/statementexpressions/methodcallstatementnexpressions/TargetNode.java
@@ -30,11 +30,6 @@ public class TargetNode implements ASTNode, Visitable {
this.identifier = identifier;
}
- @Override
- public void accept(MethodVisitor methodVisitor) {
- methodVisitor.visit(this);
- }
-
public TypeCheckResult accept(SemanticVisitor visitor) {
return visitor.analyze(this);
}
diff --git a/src/main/java/bytecode/MethodCodeGen.java b/src/main/java/bytecode/MethodCodeGen.java
index ab6e8e1..2744732 100644
--- a/src/main/java/bytecode/MethodCodeGen.java
+++ b/src/main/java/bytecode/MethodCodeGen.java
@@ -39,12 +39,12 @@ public class MethodCodeGen implements bytecode.visitor.MethodVisitor {
private Mapper mapper;
private MethodVisitor methodVisitor;
- private List localVaribales;
+ private List localVariables;
public MethodCodeGen(ClassWriter classWriter) {
this.classWriter = classWriter;
mapper = new Mapper();
- localVaribales = new ArrayList<>();
+ localVariables = new ArrayList<>();
}
@@ -60,10 +60,10 @@ public class MethodCodeGen implements bytecode.visitor.MethodVisitor {
null);
methodVisitor.visitCode();
- localVaribales.add("this");
+ localVariables.add("this");
// Add all method parameters to localVariables
for (ParameterNode parameterNode : constructorNode.parameters) {
- localVaribales.add(parameterNode.identifier);
+ localVariables.add(parameterNode.identifier);
}
methodVisitor.visitVarInsn(ALOAD, 0);
@@ -89,8 +89,8 @@ public class MethodCodeGen implements bytecode.visitor.MethodVisitor {
null);
methodVisitor.visitCode();
- localVaribales.add("this");
- localVaribales.add("args");
+ localVariables.add("this");
+ localVariables.add("args");
// Visit all statements
for (IStatementNode statementNode : mainMethodNode.block.statements) {
@@ -110,10 +110,10 @@ public class MethodCodeGen implements bytecode.visitor.MethodVisitor {
null);
methodVisitor.visitCode();
- localVaribales.add("this");
+ localVariables.add("this");
// Add all method parameters to localVariables
for (ParameterNode parameterNode : methodNode.parameters) {
- localVaribales.add(parameterNode.identifier);
+ localVariables.add(parameterNode.identifier);
}
// Visit all statements
@@ -181,7 +181,7 @@ public class MethodCodeGen implements bytecode.visitor.MethodVisitor {
if (dotSubstractionNode.value != null) {
dotSubstractionNode.value.accept(this);
} else if (dotSubstractionNode.identifier != null) {
- methodVisitor.visitVarInsn(ILOAD, localVaribales.indexOf(dotSubstractionNode.identifier));
+ methodVisitor.visitVarInsn(ILOAD, localVariables.indexOf(dotSubstractionNode.identifier));
} else if (dotSubstractionNode.memberAccess != null) {
dotSubstractionNode.memberAccess.accept(this);
} else if (dotSubstractionNode.methodCall != null) {
@@ -195,7 +195,6 @@ public class MethodCodeGen implements bytecode.visitor.MethodVisitor {
public void visit(NonCalculationNode nonCalculationNode) {
Label labelFalse = new Label();
Label labelTrue = new Label();
- // TODO: Null check
switch (nonCalculationNode.operator) {
case AND:
nonCalculationNode.unaryExpression.accept(this);
@@ -266,8 +265,10 @@ public class MethodCodeGen implements bytecode.visitor.MethodVisitor {
@Override
public void visit(MemberAccessNode memberAccessNode) {
- if (memberAccessNode.thisExpr) {
- // methodVisitor.visitFieldInsn(PUTFIELD, memberAccessNode.identifiers.get(0), memberAccessNode.identifiers.get(1), );
+ // Only used to get, not to put
+ if (memberAccessNode.thisExpr) { // Field
+ // methodVisitor.visitFieldInsn(GETFIELD, memberAccessNode.identifiers.get(0), memberAccessNode.identifiers.get(1), );
+ } else { // Object Attribut
}
}
@@ -296,7 +297,7 @@ public class MethodCodeGen implements bytecode.visitor.MethodVisitor {
if (unaryNode.thisExp != null) {
methodVisitor.visitVarInsn(ALOAD, 0); // this
} else if (unaryNode.identifier != null) {
- methodVisitor.visitVarInsn(ILOAD, localVaribales.indexOf(unaryNode.identifier));
+ methodVisitor.visitVarInsn(ILOAD, localVariables.indexOf(unaryNode.identifier));
} else if (unaryNode.memberAccess != null) {
unaryNode.memberAccess.accept(this);
} else if (unaryNode.value != null) {
@@ -362,23 +363,23 @@ public class MethodCodeGen implements bytecode.visitor.MethodVisitor {
// Process expression
localVariableDeclarationNode.expression.accept(this);
// Store result of expression in variable
- if (localVaribales.contains(localVariableDeclarationNode.identifier)) {
+ if (localVariables.contains(localVariableDeclarationNode.identifier)) {
if (localVariableDeclarationNode.type instanceof BaseType) {
- methodVisitor.visitVarInsn(ISTORE, localVaribales.indexOf(localVariableDeclarationNode.identifier));
+ methodVisitor.visitVarInsn(ISTORE, localVariables.indexOf(localVariableDeclarationNode.identifier));
} else if (localVariableDeclarationNode.type instanceof ReferenceType) {
- methodVisitor.visitVarInsn(ASTORE, localVaribales.indexOf(localVariableDeclarationNode.identifier));
+ methodVisitor.visitVarInsn(ASTORE, localVariables.indexOf(localVariableDeclarationNode.identifier));
}
} else {
- localVaribales.add(localVariableDeclarationNode.identifier);
+ localVariables.add(localVariableDeclarationNode.identifier);
if (localVariableDeclarationNode.type instanceof BaseType) {
- methodVisitor.visitVarInsn(ISTORE, localVaribales.indexOf(localVariableDeclarationNode.identifier));
+ methodVisitor.visitVarInsn(ISTORE, localVariables.indexOf(localVariableDeclarationNode.identifier));
} else if (localVariableDeclarationNode.type instanceof ReferenceType) {
- methodVisitor.visitVarInsn(ASTORE, localVaribales.indexOf(localVariableDeclarationNode.identifier));
+ methodVisitor.visitVarInsn(ASTORE, localVariables.indexOf(localVariableDeclarationNode.identifier));
}
}
} else {
- if (!localVaribales.contains(localVariableDeclarationNode.identifier)) {
- localVaribales.add(localVariableDeclarationNode.identifier);
+ if (!localVariables.contains(localVariableDeclarationNode.identifier)) {
+ localVariables.add(localVariableDeclarationNode.identifier);
}
}
}
@@ -389,43 +390,49 @@ public class MethodCodeGen implements bytecode.visitor.MethodVisitor {
if (assignNode.expression instanceof IncrementNode) {
IncrementNode incrementNode = (IncrementNode) assignNode.expression;
if (incrementNode.crementType.equals(CrementType.PREFIX)) { // ++i
- methodVisitor.visitIincInsn(localVaribales.indexOf(incrementNode.assignableExpression.identifier), 1);
+ methodVisitor.visitIincInsn(localVariables.indexOf(incrementNode.assignableExpression.identifier), 1);
assign(assignNode);
} else if (incrementNode.crementType.equals(CrementType.SUFFIX)) { // Suffix: i++
assign(assignNode);
- methodVisitor.visitIincInsn(localVaribales.indexOf(incrementNode.assignableExpression.identifier), 1);
+ methodVisitor.visitIincInsn(localVariables.indexOf(incrementNode.assignableExpression.identifier), 1);
}
} else if (assignNode.expression instanceof DecrementNode) {
DecrementNode decrementNode = (DecrementNode) assignNode.expression;
if (decrementNode.crementType.equals(CrementType.PREFIX)) {
- methodVisitor.visitIincInsn(localVaribales.indexOf(decrementNode.assignableExpression.identifier), -1);
+ methodVisitor.visitIincInsn(localVariables.indexOf(decrementNode.assignableExpression.identifier), -1);
assign(assignNode);
} else if (decrementNode.crementType.equals(CrementType.SUFFIX)) {
assign(assignNode);
- methodVisitor.visitIincInsn(localVaribales.indexOf(decrementNode.assignableExpression.identifier), 1);
+ methodVisitor.visitIincInsn(localVariables.indexOf(decrementNode.assignableExpression.identifier), 1);
}
} else {
assignNode.expression.accept(this);
+ assign(assignNode);
}
}
private void assign(AssignNode assignNode) {
- // Store result of expression in variable
if (assignNode.assignable.memberAccess.thisExpr) {
- // Global var
- methodVisitor.visitVarInsn(ALOAD, 0);
- if (assignNode.expression instanceof BaseType) {
- //methodVisitor.visitFieldInsn(PUTFIELD, class name, var identifier, mapper.getTypeChar(((BaseTypeNode) type).enumType));
- } else if (assignNode.expression instanceof ReferenceType) {
- //methodVisitor.visitFieldInsn(PUTFIELD, class name, var identifier, "L"class name object +";");
- }
+ assignField(assignNode);
} else {
- // Local var
- if (assignNode.expression instanceof BaseType) {
- methodVisitor.visitVarInsn(ISTORE, localVaribales.indexOf(assignNode.assignable.identifier));
- } else if (assignNode.expression instanceof ReferenceType) {
- methodVisitor.visitVarInsn(ASTORE, localVaribales.indexOf(assignNode.assignable.identifier));
- }
+ assignLocalVar(assignNode);
+ }
+ }
+
+ private void assignLocalVar(AssignNode assignNode) {
+ if (assignNode.expression instanceof BaseType) {
+ methodVisitor.visitVarInsn(ISTORE, localVariables.indexOf(assignNode.assignable.identifier));
+ } else if (assignNode.expression instanceof ReferenceType) {
+ methodVisitor.visitVarInsn(ASTORE, localVariables.indexOf(assignNode.assignable.identifier));
+ }
+ }
+
+ private void assignField(AssignNode assignNode) {
+ if (assignNode.expression instanceof BaseType) {
+ methodVisitor.visitFieldInsn(PUTFIELD, assignNode.assignable.memberAccess.identifiers.get(0), assignNode.assignable.memberAccess.identifiers.get(1), mapper.getTypeChar((BaseType) assignNode.expression.getType()));
+ } else if (assignNode.expression instanceof ReferenceType) {
+ ReferenceType referenceType = (ReferenceType) assignNode.expression.getType();
+ methodVisitor.visitFieldInsn(PUTFIELD, assignNode.assignable.memberAccess.identifiers.get(0), assignNode.assignable.memberAccess.identifiers.get(1), "L"+referenceType.getIdentifier()+";");
}
}
@@ -433,13 +440,13 @@ public class MethodCodeGen implements bytecode.visitor.MethodVisitor {
public void visit(NewDeclarationNode newDeclarationNode) {
methodVisitor.visitTypeInsn(NEW, newDeclarationNode.identifier);
methodVisitor.visitInsn(DUP);
+ List parameterNodes = new ArrayList<>();
for (IExpressionNode expressionNode : newDeclarationNode.expressions) {
expressionNode.accept(this);
+ parameterNodes.add(new ParameterNode(expressionNode.getType(), ""));
}
- // TODO
- //methodVisitor.visitMethodInsn(INVOKESPECIAL, class name, "", mapper.generateMethodDescriptor(), false);
- // TODO: kann ein Field auch definiert werden? Abfrage ob local var oder field
- localVaribales.add(newDeclarationNode.identifier);
+ methodVisitor.visitMethodInsn(INVOKESPECIAL, newDeclarationNode.identifier, "", mapper.generateMethodDescriptor(new BaseType(TypeEnum.VOID),parameterNodes), false);
+ localVariables.add(newDeclarationNode.identifier);
}
@Override
@@ -505,13 +512,6 @@ public class MethodCodeGen implements bytecode.visitor.MethodVisitor {
whileNode.expression.accept(this);
methodVisitor.visitJumpInsn(IFEQ, endOfLoopLabel); // if condition is false, jump out of loop
- // TODO: Unterscheidung bei increment/decrement der for Schleife
- if (whileNode.block.statements.size() == 2) { // For loop
- whileNode.block.statements.get(0).accept(this);
-
- } else {
- whileNode.block.statements.get(0).accept(this);
- }
whileNode.block.accept(this);
methodVisitor.visitJumpInsn(GOTO, loopLabel);
@@ -520,16 +520,17 @@ public class MethodCodeGen implements bytecode.visitor.MethodVisitor {
@Override
public void visit(ChainedMethodNode chainedMethodNode) {
-
+ // TODO: Erstmal abwarten
}
@Override
public void visit(MethodCallNode methodCallNode) {
-
- }
-
- @Override
- public void visit(TargetNode targetNode) {
-
+ List parameterNodes = new ArrayList<>();
+ for(IExpressionNode expressionNode : methodCallNode.parameters) {
+ expressionNode.accept(this);
+ parameterNodes.add(new ParameterNode(expressionNode.getType(), ""));
+ }
+ // TODO: Klassenname und Returntype
+ //methodVisitor.visitMethodInsn(INVOKEVIRTUAL, classname, methodCallNode.identifier, mapper.generateMethodDescriptor(returntype, parameterNodes), false);
}
}
diff --git a/src/main/java/bytecode/visitor/MethodVisitor.java b/src/main/java/bytecode/visitor/MethodVisitor.java
index b38b210..89fbb64 100644
--- a/src/main/java/bytecode/visitor/MethodVisitor.java
+++ b/src/main/java/bytecode/visitor/MethodVisitor.java
@@ -46,7 +46,6 @@ public interface MethodVisitor {
// statement expression
void visit(ChainedMethodNode chainedMethodNode);
void visit(MethodCallNode methodCallNode);
- void visit(TargetNode targetNode);
void visit(AssignNode assignNode);
void visit(NewDeclarationNode newDeclarationNode);
--
2.34.1
From 27baa429b44bd45197d7ce8b954baa851e81ca0a Mon Sep 17 00:00:00 2001
From: Lucas <89882946+notbad3500@users.noreply.github.com>
Date: Wed, 3 Jul 2024 09:35:50 +0200
Subject: [PATCH 19/96] small changes in main for bytecode
---
src/main/java/main/Main.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/main/Main.java b/src/main/java/main/Main.java
index 7568d24..8bd9e73 100644
--- a/src/main/java/main/Main.java
+++ b/src/main/java/main/Main.java
@@ -97,7 +97,7 @@ public class Main {
/*------------------------- Bytecode Generator -> Bytecode -------------------------*/
// Use the ByteCodeGenerator to generate bytecode from the typed AST and output it to the specified directory
- ByteCodeGenerator byteCodeGenerator = new ByteCodeGenerator(outputDirectoryPath);
+ ByteCodeGenerator byteCodeGenerator = new ByteCodeGenerator(outputDirectoryPath, true, true);
assert typedAst != null;
byteCodeGenerator.visit((ProgramNode) typedAst);
// Log the bytecode generation
--
2.34.1
From b072af346bef50ae3cc2e363a9b05adfba5b14d4 Mon Sep 17 00:00:00 2001
From: Lucas <89882946+notbad3500@users.noreply.github.com>
Date: Wed, 3 Jul 2024 13:04:33 +0200
Subject: [PATCH 20/96] Huge Changes in TestFiles, ReflectionsTest, much more
---
.idea/jarRepositories.xml | 5 +
pom.xml | 21 ++-
src/test/Makefile | 7 +-
src/test/java/main/E2EReflectionsTest.java | 81 ++++++++++
src/test/java/main/FailureTest.java | 48 ------
src/test/java/main/FeatureTest.java | 46 ------
src/test/java/main/InputFilesTest.java | 104 +++++++++++++
src/test/java/main/ReflectionsTest.java | 145 ++++++++++++++++++
src/test/java/parser/AstBuilderTest.java | 128 ++++++++--------
src/test/java/semantic/EndToTypedAstTest.java | 9 +-
src/test/resources/input/CombinedExample.java | 23 ---
src/test/resources/input/CompilerInput.java | 16 --
.../input/MoreFeaturesClassExample.java | 6 -
.../AllFeaturesClassExample.java | 41 +++--
.../BooleanOperations.java | 0
.../CharManipulation.java | 0
.../ConditionalStatements.java | 0
.../EmptyClassExample.java | 0
.../LoopExamples.java | 0
.../MethodOverloading.java | 0
.../input/javaCases/ConstructorParameter.java | 5 -
.../input/javaCases/ConstructorThisDot.java | 8 -
.../resources/input/javaCases/EmptyClass.java | 1 -
.../javaCases/EmptyClassWithConstructor.java | 5 -
src/test/resources/input/javaCases/Field.java | 3 -
.../javaCases/FieldWithAccessModifier.java | 3 -
.../input/javaCases/MultipleClasses.java | 3 -
src/test/resources/input/javaCases/Null.java | 8 -
.../input/javaCases/SelfReference.java | 18 ---
.../resources/input/javaCases/VoidMethod.java | 3 -
.../input/javaCases/variableCompareTest.java | 30 ----
.../Char.java | 4 +-
.../Comments.java | 2 +-
.../ConstructorMethodCall.java | 4 +-
.../ConstructorMethodCallParameters.java | 4 +-
.../ConstructorParameter.java | 5 +
.../ConstructorThisDot.java | 8 +
.../DoWhile.java | 6 +-
.../input/singleFeatureTests/EmptyClass.java | 1 +
.../EmptyClassWithConstructor.java | 5 +
.../input/singleFeatureTests/Field.java | 3 +
.../FieldWithAccessModifier.java | 3 +
.../For.java | 4 +-
.../Increment.java | 2 +-
.../MainMehod.java | 2 +-
.../singleFeatureTests/MultipleClasses.java | 3 +
.../input/singleFeatureTests/Null.java | 8 +
.../singleFeatureTests/SelfReference.java | 18 +++
.../ThisDot.java | 4 +-
.../VariableCalculationTest.java} | 2 +-
.../VariableCompareTest.java | 30 ++++
.../input/singleFeatureTests/VoidMethod.java | 3 +
.../While.java | 4 +-
.../CallMethodFromObjekt.java | 4 +-
.../CorrectMemberAccess.java | 6 +-
.../CorrectMethodParameter.java | 2 +-
.../CorrectNonCalcTest.java | 2 +-
.../CorrectReturnType.java | 2 +-
.../typedAstFeatureTests/CorrectTest.java | 21 +++
.../FullTest.java | 5 +-
.../IfExpressionBoolean.java | 2 +-
.../IfReturn.java | 2 +-
.../SelectRightOverloadedMethod.java | 2 +-
.../ThisDotMethod.java | 2 +-
.../VoidReturnTypeIF.java | 2 +-
.../typedAstFeaturesTests/CorrectTest.java | 38 -----
66 files changed, 586 insertions(+), 396 deletions(-)
create mode 100644 src/test/java/main/E2EReflectionsTest.java
delete mode 100644 src/test/java/main/FailureTest.java
delete mode 100644 src/test/java/main/FeatureTest.java
create mode 100644 src/test/java/main/InputFilesTest.java
create mode 100644 src/test/java/main/ReflectionsTest.java
delete mode 100644 src/test/resources/input/CombinedExample.java
delete mode 100644 src/test/resources/input/CompilerInput.java
delete mode 100644 src/test/resources/input/MoreFeaturesClassExample.java
rename src/test/resources/input/{ => combinedFeatureTests}/AllFeaturesClassExample.java (56%)
rename src/test/resources/input/{featureTests => combinedFeatureTests}/BooleanOperations.java (100%)
rename src/test/resources/input/{featureTests => combinedFeatureTests}/CharManipulation.java (100%)
rename src/test/resources/input/{featureTests => combinedFeatureTests}/ConditionalStatements.java (100%)
rename src/test/resources/input/{featureTests => combinedFeatureTests}/EmptyClassExample.java (100%)
rename src/test/resources/input/{featureTests => combinedFeatureTests}/LoopExamples.java (100%)
rename src/test/resources/input/{featureTests => combinedFeatureTests}/MethodOverloading.java (100%)
delete mode 100644 src/test/resources/input/javaCases/ConstructorParameter.java
delete mode 100644 src/test/resources/input/javaCases/ConstructorThisDot.java
delete mode 100644 src/test/resources/input/javaCases/EmptyClass.java
delete mode 100644 src/test/resources/input/javaCases/EmptyClassWithConstructor.java
delete mode 100644 src/test/resources/input/javaCases/Field.java
delete mode 100644 src/test/resources/input/javaCases/FieldWithAccessModifier.java
delete mode 100644 src/test/resources/input/javaCases/MultipleClasses.java
delete mode 100644 src/test/resources/input/javaCases/Null.java
delete mode 100644 src/test/resources/input/javaCases/SelfReference.java
delete mode 100644 src/test/resources/input/javaCases/VoidMethod.java
delete mode 100644 src/test/resources/input/javaCases/variableCompareTest.java
rename src/test/resources/input/{javaCases => singleFeatureTests}/Char.java (68%)
rename src/test/resources/input/{javaCases => singleFeatureTests}/Comments.java (81%)
rename src/test/resources/input/{javaCases => singleFeatureTests}/ConstructorMethodCall.java (56%)
rename src/test/resources/input/{javaCases => singleFeatureTests}/ConstructorMethodCallParameters.java (52%)
create mode 100644 src/test/resources/input/singleFeatureTests/ConstructorParameter.java
create mode 100644 src/test/resources/input/singleFeatureTests/ConstructorThisDot.java
rename src/test/resources/input/{javaCases => singleFeatureTests}/DoWhile.java (52%)
create mode 100644 src/test/resources/input/singleFeatureTests/EmptyClass.java
create mode 100644 src/test/resources/input/singleFeatureTests/EmptyClassWithConstructor.java
create mode 100644 src/test/resources/input/singleFeatureTests/Field.java
create mode 100644 src/test/resources/input/singleFeatureTests/FieldWithAccessModifier.java
rename src/test/resources/input/{javaCases => singleFeatureTests}/For.java (63%)
rename src/test/resources/input/{javaCases => singleFeatureTests}/Increment.java (79%)
rename src/test/resources/input/{javaCases => singleFeatureTests}/MainMehod.java (73%)
create mode 100644 src/test/resources/input/singleFeatureTests/MultipleClasses.java
create mode 100644 src/test/resources/input/singleFeatureTests/Null.java
create mode 100644 src/test/resources/input/singleFeatureTests/SelfReference.java
rename src/test/resources/input/{javaCases => singleFeatureTests}/ThisDot.java (51%)
rename src/test/resources/input/{javaCases/variableCalculationTest.java => singleFeatureTests/VariableCalculationTest.java} (94%)
create mode 100644 src/test/resources/input/singleFeatureTests/VariableCompareTest.java
create mode 100644 src/test/resources/input/singleFeatureTests/VoidMethod.java
rename src/test/resources/input/{javaCases => singleFeatureTests}/While.java (65%)
rename src/test/resources/input/{typedAstFeaturesTests => typedAstFeatureTests}/CallMethodFromObjekt.java (84%)
rename src/test/resources/input/{typedAstFeaturesTests => typedAstFeatureTests}/CorrectMemberAccess.java (75%)
rename src/test/resources/input/{typedAstFeaturesTests => typedAstFeatureTests}/CorrectMethodParameter.java (81%)
rename src/test/resources/input/{typedAstFeaturesTests => typedAstFeatureTests}/CorrectNonCalcTest.java (74%)
rename src/test/resources/input/{typedAstFeaturesTests => typedAstFeatureTests}/CorrectReturnType.java (67%)
create mode 100644 src/test/resources/input/typedAstFeatureTests/CorrectTest.java
rename src/test/resources/input/{typedAstFeaturesTests => typedAstFeatureTests}/FullTest.java (96%)
rename src/test/resources/input/{typedAstFeaturesTests => typedAstFeatureTests}/IfExpressionBoolean.java (72%)
rename src/test/resources/input/{typedAstFeaturesTests => typedAstFeatureTests}/IfReturn.java (86%)
rename src/test/resources/input/{typedAstFeaturesTests => typedAstFeatureTests}/SelectRightOverloadedMethod.java (83%)
rename src/test/resources/input/{typedAstFeaturesTests => typedAstFeatureTests}/ThisDotMethod.java (83%)
rename src/test/resources/input/{typedAstFeaturesTests => typedAstFeatureTests}/VoidReturnTypeIF.java (78%)
delete mode 100644 src/test/resources/input/typedAstFeaturesTests/CorrectTest.java
diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml
index 712ab9d..35e8b50 100644
--- a/.idea/jarRepositories.xml
+++ b/.idea/jarRepositories.xml
@@ -6,6 +6,11 @@
+
+
+
+
+
diff --git a/pom.xml b/pom.xml
index 99e9904..4712163 100644
--- a/pom.xml
+++ b/pom.xml
@@ -20,7 +20,7 @@
org.junit.jupiter
junit-jupiter-engine
- 5.9.3
+ 5.11.0-M2
test
@@ -44,6 +44,18 @@
3.26.0
test
+
+ org.junit.jupiter
+ junit-jupiter-api
+ 5.11.0-M2
+ test
+
+
+ org.mockito
+ mockito-core
+ 5.11.0
+ test
+
@@ -78,4 +90,11 @@
+
+
+ maven_central
+ Maven Central
+ https://repo.maven.apache.org/maven2/
+
+
\ No newline at end of file
diff --git a/src/test/Makefile b/src/test/Makefile
index bb660fe..23be92f 100644
--- a/src/test/Makefile
+++ b/src/test/Makefile
@@ -31,12 +31,15 @@ test-raupenpiler:
clean:
# clean output folders
rm -f ../main/resources/output/*.class
+ rm -f ../main/resources/output/*.jar
rm -f ./resources/output/javac/*.class
rm -f ./resources/output/raupenpiler/*.class
# clean logs
rm -f ../main/resources/logs/*.log
# clean test/java/main folders from .class files for End-to-End tests
rm -f ./java/main/*.class
- # clean javac output from featureTests
- rm -f ./resources/input/featureTests/*.class
+ # clean javac output from combinedFeatureTests
+ rm -f ./resources/input/combinedFeatureTests/*.class
+ rm -f ./resources/input/singleFeatureTests/*.class
+ rm -f ./resources/input/typedAstFeatureTests/*.class
diff --git a/src/test/java/main/E2EReflectionsTest.java b/src/test/java/main/E2EReflectionsTest.java
new file mode 100644
index 0000000..6d3e5b2
--- /dev/null
+++ b/src/test/java/main/E2EReflectionsTest.java
@@ -0,0 +1,81 @@
+package main;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.util.Arrays;
+
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+public class E2EReflectionsTest {
+ @Test
+ public void AllFeaturesClassExampleTest(){
+ try {
+ Class> clazz = Class.forName("resources.input.combinedFeatureTests.AllFeaturesClassExample");
+
+ // Class Name
+ assertEquals("main.AllFeaturesClassExample", clazz.getName());
+
+ // Constructors
+ Constructor>[] actualConstructors = clazz.getDeclaredConstructors();
+ assertTrue(actualConstructors.length > 0, "No constructors found");
+
+ Constructor> expectedConstructor = clazz.getConstructor(int.class, boolean.class, char.class);
+
+ boolean constructorFound = false;
+ for (Constructor> constructor : actualConstructors) {
+ if (constructor.equals(expectedConstructor)) {
+ constructorFound = true;
+ break;
+ }
+ }
+ assertTrue(constructorFound, "Expected constructor not found in actual constructors");
+
+ // Methods
+ Method[] actualMethodNames = clazz.getDeclaredMethods();
+ assertTrue(actualMethodNames.length > 0);
+ for (Method method : actualMethodNames) {
+ System.out.println("Method: " + method.getName());
+ }
+
+ // Method Names
+ String[] expectedMethodNames = {
+ "controlStructures",
+ "logicalOperations",
+ "add",
+ "subtract",
+ "multiply",
+ "divide",
+ "modulo",
+ "main"
+ };
+
+ for (Method method : actualMethodNames) {
+ assertTrue(Arrays.asList(expectedMethodNames).contains(method.getName()));
+ }
+
+ // Fields
+ Field[] actualFields = clazz.getDeclaredFields();
+ assertTrue(actualFields.length > 0, "No fields found");
+
+ Field expectedField = clazz.getDeclaredField("c");
+ assertEquals(expectedField.getType(), char.class);
+
+ boolean fieldFound = false;
+ for (Field field : actualFields) {
+ if (field.equals(expectedField)) {
+ fieldFound = true;
+ break;
+ }
+ }
+ assertTrue(fieldFound, "Expected field not found in actual fields");
+
+
+
+ } catch (ClassNotFoundException | NoSuchFieldException | NoSuchMethodException e) {
+ e.printStackTrace();
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/test/java/main/FailureTest.java b/src/test/java/main/FailureTest.java
deleted file mode 100644
index 60c504b..0000000
--- a/src/test/java/main/FailureTest.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package main;
-
-import static org.junit.jupiter.api.Assertions.assertNotNull;
-import static org.junit.jupiter.api.Assertions.assertTrue;
-
-import org.junit.jupiter.api.Test;
-
-import javax.tools.JavaCompiler;
-import javax.tools.ToolProvider;
-import java.io.File;
-
-public class FailureTest {
- /**
- * This test method checks if invalid Java files fail to compile as expected.
- * It uses the JavaCompiler from the ToolProvider to compile the files.
- * The test passes if all the files fail to compile.
- */
- @Test
- public void areTestFilesActuallyFailTest() {
- // Get the system Java compiler
- JavaCompiler javac = ToolProvider.getSystemJavaCompiler();
- // Assert that the compiler is available
- assertNotNull(javac, "Java Compiler is not available");
-
- String directoryPath = "src/test/resources/input/failureTests";
- File folder = new File(directoryPath);
-
- if (folder.isDirectory()) {
- File[] files = folder.listFiles((dir, name) -> name.endsWith(".java"));
-
- if (files != null) {
- for (File file : files) {
- // Try to compile the file and get the result
- // The run method returns 0 if the compilation was successful, and non-zero otherwise
- int result = javac.run(null, null, null, file.getPath());
-
- // Assert that the compilation failed (i.e., the result is non-zero)
- assertTrue(result != 0, "Expected compilation failure for " + file.getName());
- }
- } else {
- System.out.println("No files found in the directory.");
- }
- } else {
- System.out.println("The provided path is not a directory.");
- }
- }
-}
-
diff --git a/src/test/java/main/FeatureTest.java b/src/test/java/main/FeatureTest.java
deleted file mode 100644
index a3e30de..0000000
--- a/src/test/java/main/FeatureTest.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package main;
-
-import org.junit.jupiter.api.Test;
-
-import javax.tools.JavaCompiler;
-import javax.tools.ToolProvider;
-import java.io.File;
-
-import static org.junit.jupiter.api.Assertions.*;
-
-public class FeatureTest {
- /**
- * This test method checks if valid Java files compile successfully.
- * It uses the JavaCompiler from the ToolProvider to compile the files.
- * The test passes if all the files compile without errors.
- */
- @Test
- public void areTestFilesActuallyValid() {
- // Get the system Java compiler
- JavaCompiler javac = ToolProvider.getSystemJavaCompiler();
- // Assert that the compiler is available
- assertNotNull(javac, "Java Compiler is not available");
-
- String directoryPath = "src/test/resources/input/featureTests";
- File folder = new File(directoryPath);
-
- if (folder.isDirectory()) {
- File[] files = folder.listFiles((dir, name) -> name.endsWith(".java"));
-
- if (files != null) {
- for (File file : files) {
- // Try to compile the file and get the result
- // The run method returns 0 if the compilation was successful, and non-zero otherwise
- int result = javac.run(null, null, null, file.getPath());
-
- // Assert that the compilation succeeded (i.e., the result is zero)
- assertEquals(0, result, "Expected compilation success for " + file.getName());
- }
- } else {
- System.out.println("No files found in the directory.");
- }
- } else {
- System.out.println("The provided path is not a directory.");
- }
- }
-}
diff --git a/src/test/java/main/InputFilesTest.java b/src/test/java/main/InputFilesTest.java
new file mode 100644
index 0000000..f3b5c81
--- /dev/null
+++ b/src/test/java/main/InputFilesTest.java
@@ -0,0 +1,104 @@
+package main;
+
+import org.junit.jupiter.api.Test;
+
+import javax.tools.JavaCompiler;
+import javax.tools.ToolProvider;
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.util.List;
+import java.util.stream.Collectors;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+public class InputFilesTest {
+
+ /**
+ * This test method checks if valid Java files compile successfully.
+ * It uses the JavaCompiler from the ToolProvider to compile the files.
+ * The test passes if all the files compile without errors.
+ */
+ @Test
+ public void areTestFilesActuallyValid() throws IOException {
+ // Get the system Java compiler
+ JavaCompiler javac = ToolProvider.getSystemJavaCompiler();
+ // Assert that the compiler is available
+ assertNotNull(javac, "Java Compiler is not available");
+
+ File folder1 = new File("src/test/resources/input/combinedFeatureTests");
+ File folder2 = new File("src/test/resources/input/singleFeatureTests");
+ File folder3 = new File("src/test/resources/input/typedAstFeatureTests");
+
+ List files = getJavaFilesFromDirectory(folder1);
+ files.addAll(getJavaFilesFromDirectory(folder2));
+ files.addAll(getJavaFilesFromDirectory(folder3));
+
+ if (!files.isEmpty()) {
+ for (File file : files) {
+ // Try to compile the file and get the result
+ int result = javac.run(null, null, null, file.getPath());
+
+ // Assert that the compilation succeeded (i.e., the result is zero)
+ assertEquals(0, result, "Expected compilation success for " + file.getName());
+ }
+ } else {
+ System.out.println("No files found in the directories.");
+ }
+ }
+
+
+ /**
+ * This test method checks if invalid Java files fail to compile as expected.
+ * It uses the JavaCompiler from the ToolProvider to compile the files.
+ * The test passes if all the files fail to compile.
+ */
+ @Test
+ public void areTestFilesActuallyFails() {
+ // Get the system Java compiler
+ JavaCompiler javac = ToolProvider.getSystemJavaCompiler();
+ // Assert that the compiler is available
+ assertNotNull(javac, "Java Compiler is not available");
+
+ String directoryPath = "src/test/resources/input/failureTests";
+ File folder = new File(directoryPath);
+
+ if (folder.isDirectory()) {
+ File[] files = folder.listFiles((dir, name) -> name.endsWith(".java"));
+
+ if (files != null) {
+ for (File file : files) {
+ // Try to compile the file and get the result
+ // The run method returns 0 if the compilation was successful, and non-zero otherwise
+ int result = javac.run(null, null, null, file.getPath());
+
+ // Assert that the compilation failed (i.e., the result is non-zero)
+ assertTrue(result != 0, "Expected compilation failure for " + file.getName());
+ }
+ } else {
+ System.out.println("No files found in the directory.");
+ }
+ } else {
+ System.out.println("The provided path is not a directory.");
+ }
+ }
+
+ /**
+ * Helper method to get all .java files from a directory.
+ *
+ * @param directory the directory to search for .java files
+ * @return a list of .java files
+ * @throws IOException if an I/O error occurs
+ */
+ private List getJavaFilesFromDirectory(File directory) throws IOException {
+ if (directory.isDirectory()) {
+ return Files.list(directory.toPath())
+ .filter(path -> path.toString().endsWith(".java"))
+ .map(java.nio.file.Path::toFile)
+ .collect(Collectors.toList());
+ } else {
+ System.out.println("The provided path is not a directory: " + directory.getPath());
+ return List.of();
+ }
+ }
+}
diff --git a/src/test/java/main/ReflectionsTest.java b/src/test/java/main/ReflectionsTest.java
new file mode 100644
index 0000000..d47d95a
--- /dev/null
+++ b/src/test/java/main/ReflectionsTest.java
@@ -0,0 +1,145 @@
+package main;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.util.Arrays;
+import java.util.List;
+
+import org.antlr.v4.runtime.CharStream;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+
+public class ReflectionsTest {
+
+ @Test
+ public void testSimpleJavaLexerClass() throws ClassNotFoundException, NoSuchMethodException {
+ Class> clazz = Class.forName("parser.generated.SimpleJavaLexer");
+
+ // Class Name
+ assertEquals("parser.generated.SimpleJavaLexer", clazz.getName());
+
+ // Constructors
+ Constructor>[] actualConstructors = clazz.getDeclaredConstructors();
+ assertTrue(actualConstructors.length > 0, "No constructors found");
+
+ Constructor> expectedConstructor = clazz.getConstructor(CharStream.class);
+
+ boolean constructorFound = false;
+ for (Constructor> constructor : actualConstructors) {
+ if (constructor.equals(expectedConstructor)) {
+ constructorFound = true;
+ break;
+ }
+ }
+ assertTrue(constructorFound, "Expected constructor not found in actual constructors");
+
+
+
+ // Methods
+ Method[] actualMethodNames = clazz.getDeclaredMethods();
+ assertTrue(actualMethodNames.length > 0);
+ Arrays.stream(actualMethodNames).forEach(method -> System.out.println("Method: " + method.getName()));
+
+ List expectedMethodNames = Arrays.asList(
+ "getTokenNames",
+ "getVocabulary",
+ "getGrammarFileName",
+ "getRuleNames",
+ "getSerializedATN",
+ "getChannelNames",
+ "getModeNames",
+ "getATN",
+ "makeRuleNames",
+ "makeLiteralNames",
+ "makeSymbolicNames"
+ );
+
+ for (Method method : actualMethodNames) {
+ assertTrue(expectedMethodNames.contains(method.getName()));
+ }
+
+ for (String expectedMethodName : expectedMethodNames) {
+ boolean methodFound = false;
+ for (Method method : actualMethodNames) {
+ if (method.getName().equals(expectedMethodName)) {
+ methodFound = true;
+ break;
+ }
+ }
+ assertTrue(methodFound, "Expected method " + expectedMethodName + " not found in actual methods");
+ }
+
+
+ // Fields
+ Field[] actualFieldNames = clazz.getDeclaredFields();
+ assertTrue(actualFieldNames.length > 0);
+ Arrays.stream(actualFieldNames).forEach(field -> System.out.println("Field: " + field.getName()));
+
+ List expectedFieldNames = Arrays.asList(
+ "_decisionToDFA",
+ "_sharedContextCache",
+ "channelNames",
+ "modeNames",
+ "ruleNames",
+ "_LITERAL_NAMES",
+ "_SYMBOLIC_NAMES",
+ "VOCABULARY",
+ "tokenNames",
+ "_serializedATN",
+ "_ATN"
+ );
+
+ for (Field field : actualFieldNames) {
+ assertTrue(expectedFieldNames.contains(field.getName()));
+ }
+ }
+
+ @Test
+ public void testSimpleJavaParserClass() throws ClassNotFoundException {
+ Class> clazz = Class.forName("parser.generated.SimpleJavaParser");
+
+ // Class Name
+ assertEquals("parser.generated.SimpleJavaParser", clazz.getName());
+
+ // Constructors
+ Constructor>[] constructors = clazz.getDeclaredConstructors();
+ assertTrue(constructors.length > 0);
+
+ // Methods
+ Method[] methods = clazz.getDeclaredMethods();
+ assertTrue(methods.length > 0);
+ Arrays.stream(methods).forEach(method -> System.out.println("Method: " + method.getName()));
+
+ // Fields
+ Field[] fields = clazz.getDeclaredFields();
+ assertTrue(fields.length > 0);
+ Arrays.stream(fields).forEach(field -> System.out.println("Field: " + field.getName()));
+ }
+
+ @Test
+ public void testASTBuilderClass() throws ClassNotFoundException {
+ Class> clazz = Class.forName("parser.astBuilder.ASTBuilder");
+
+ // Class Name
+ assertEquals("parser.astBuilder.ASTBuilder", clazz.getName());
+
+ // Constructors
+ Constructor>[] constructors = clazz.getDeclaredConstructors();
+ assertTrue(constructors.length > 0);
+
+ // Methods
+ Method[] methods = clazz.getDeclaredMethods();
+ assertTrue(methods.length > 0);
+ Arrays.stream(methods).forEach(method -> System.out.println("Method: " + method.getName()));
+
+ // Fields
+ Field[] fields = clazz.getDeclaredFields();
+ assertTrue(fields.length > 0);
+ Arrays.stream(fields).forEach(field -> System.out.println("Field: " + field.getName()));
+ }
+
+ // Similarly, you can add tests for SemanticAnalyzer and ByteCodeGenerator
+}
diff --git a/src/test/java/parser/AstBuilderTest.java b/src/test/java/parser/AstBuilderTest.java
index b163a2a..2810e55 100644
--- a/src/test/java/parser/AstBuilderTest.java
+++ b/src/test/java/parser/AstBuilderTest.java
@@ -43,104 +43,106 @@ import static org.assertj.core.api.Assertions.assertThat;
@DisplayName("Untyped Abstract Syntax Tree")
class AstBuilderTest {
+ private final static String directoryPath = "src/test/resources/input/singleFeatureTests/";
+
@Test
@DisplayName("Empty Class Test")
- public void emptyClassTest(){
- ClassNode emptyClass = Helper.generateEmptyClass("TestClass");
+ public void emptyClassTest() {
+ ClassNode emptyClass = Helper.generateEmptyClass("EmptyClass");
ProgramNode expected = new ProgramNode();
expected.addClass(emptyClass);
- ASTNode actual = Helper.generateAST("src/test/resources/input/javaCases/EmptyClass.java");
+ ASTNode actual = Helper.generateAST(directoryPath + "EmptyClass.java");
assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
}
@Test
@DisplayName("Multiple Empty Classes Test")
public void multipleEmptyClassesTest() {
- ClassNode class1 = Helper.generateEmptyClass("TestClass1");
+ ClassNode class1 = Helper.generateEmptyClass("MultipleClasses");
ClassNode class2 = Helper.generateEmptyClass("TestClass2");
ProgramNode expected = new ProgramNode();
expected.addClass(class1);
expected.addClass(class2);
- ASTNode actual = Helper.generateAST("src/test/resources/input/javaCases/MultipleClasses.java");
+ ASTNode actual = Helper.generateAST(directoryPath + "MultipleClasses.java");
assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
}
@Test
@DisplayName("Empty Class Test with Constructor")
public void emptyClassWithConstructorTest() {
- ClassNode class1 = Helper.generateEmptyClass("TestClass");
+ ClassNode class1 = Helper.generateEmptyClass("EmptyClassWithConstructor");
ProgramNode expected = new ProgramNode();
expected.addClass(class1);
- ASTNode actual = Helper.generateAST("src/test/resources/input/javaCases/EmptyClassWithConstructor.java");
+ ASTNode actual = Helper.generateAST(directoryPath + "EmptyClassWithConstructor.java");
assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
}
@Test
@DisplayName("Field Test")
public void fieldTest() {
- ClassNode class1 = Helper.generateEmptyClass("TestClass");
- class1.addMember(new FieldNode(null, new BaseType(TypeEnum.INT), "a"));
+ ClassNode class1 = Helper.generateEmptyClass("Field");
+ class1.addMember(new FieldNode(new AccessModifierNode("public"), new BaseType(TypeEnum.INT), "a"));
ProgramNode expected = new ProgramNode();
expected.addClass(class1);
- ASTNode actual = Helper.generateAST("src/test/resources/input/javaCases/Field.java");
+ ASTNode actual = Helper.generateAST(directoryPath + "Field.java");
assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
}
@Test
@DisplayName("Field Test with Accessmodifier")
public void fieldTestWithModifier() {
- ClassNode class1 = Helper.generateEmptyClass("TestClass");
+ ClassNode class1 = Helper.generateEmptyClass("FieldWithAccessModifier");
class1.addMember(new FieldNode(new AccessModifierNode("public"), new BaseType(TypeEnum.INT), "a"));
ProgramNode expected = new ProgramNode();
expected.addClass(class1);
- ASTNode actual = Helper.generateAST("src/test/resources/input/javaCases/FieldWithAccessModifier.java");
+ ASTNode actual = Helper.generateAST(directoryPath + "FieldWithAccessModifier.java");
assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
}
@Test
- @DisplayName("Commments Ignore Test")
- public void commmentsIgnoreTest(){
- ClassNode class1 = Helper.generateEmptyClass("TestClass");
+ @DisplayName("Comments Ignore Test")
+ public void commentsIgnoreTest() {
+ ClassNode class1 = Helper.generateEmptyClass("Comments");
class1.addMember(new FieldNode(new AccessModifierNode("private"), new BaseType(TypeEnum.INT), "a"));
ProgramNode expected = new ProgramNode();
expected.addClass(class1);
- ASTNode actual = Helper.generateAST("src/test/resources/input/javaCases/Comments.java");
+ ASTNode actual = Helper.generateAST(directoryPath + "Comments.java");
assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
}
@Test
- @DisplayName("Constructor Paramerter Test")
- public void constructorParameterTest(){
+ @DisplayName("Constructor Parameter Test")
+ public void constructorParameterTest() {
BlockNode block = new BlockNode();
block.addStatement(new ReturnNode(null));
- ConstructorNode constructor = new ConstructorNode("public", "TestClass", block);
+ ConstructorNode constructor = new ConstructorNode("public", "ConstructorParameter", block);
constructor.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "a"));
constructor.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "b"));
- ClassNode class1 = new ClassNode("public", "TestClass");
+ ClassNode class1 = new ClassNode("public", "ConstructorParameter");
class1.addMember(constructor);
ProgramNode expected = new ProgramNode();
expected.addClass(class1);
- ASTNode actual = Helper.generateAST("src/test/resources/input/javaCases/ConstructorParameter.java");
+ ASTNode actual = Helper.generateAST(directoryPath + "ConstructorParameter.java");
assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
}
@Test
@DisplayName("This Dot Test")
- public void thisDotTest(){
+ public void thisDotTest() {
BlockNode block = new BlockNode();
MemberAccessNode memberAccess = new MemberAccessNode(true);
memberAccess.addIdentifier("a");
@@ -152,23 +154,23 @@ class AstBuilderTest {
block.addStatement(new AssignNode(assignable, expression));
block.addStatement(new ReturnNode(null));
- ConstructorNode constructor = new ConstructorNode("public", "TestClass", block);
+ ConstructorNode constructor = new ConstructorNode("public", "ThisDot", block);
- ClassNode class1 = new ClassNode("public", "TestClass");
+ ClassNode class1 = new ClassNode("public", "ThisDot");
class1.addMember(new FieldNode(new AccessModifierNode("public"), new BaseType(TypeEnum.INT), "a"));
class1.addMember(constructor);
ProgramNode expected = new ProgramNode();
expected.addClass(class1);
- ASTNode actual = Helper.generateAST("src/test/resources/input/javaCases/ThisDot.java");
+ ASTNode actual = Helper.generateAST(directoryPath + "ThisDot.java");
assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
}
@Test
@DisplayName("Constructor This Dot Test")
- public void constructorThisDotTest(){
+ public void constructorThisDotTest() {
BlockNode block = new BlockNode();
MemberAccessNode memberAccess = new MemberAccessNode(true);
memberAccess.addIdentifier("a");
@@ -179,25 +181,25 @@ class AstBuilderTest {
block.addStatement(new AssignNode(assignable, expression));
block.addStatement(new ReturnNode(null));
- ConstructorNode constructor = new ConstructorNode("public", "TestClass", block);
+ ConstructorNode constructor = new ConstructorNode("public", "ConstructorThisDot", block);
constructor.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "a"));
- ClassNode class1 = new ClassNode("public", "TestClass");
+ ClassNode class1 = new ClassNode("public", "ConstructorThisDot");
class1.addMember(new FieldNode(new AccessModifierNode("private"), new BaseType(TypeEnum.INT), "a"));
class1.addMember(constructor);
ProgramNode expected = new ProgramNode();
expected.addClass(class1);
- ASTNode actual = Helper.generateAST("src/test/resources/input/javaCases/ConstructorThisDot.java");
+ ASTNode actual = Helper.generateAST(directoryPath + "ConstructorThisDot.java");
assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
}
@Test
@DisplayName("Void Methoden Test")
- public void voidMethodenTest(){
- ClassNode class1 = Helper.generateEmptyClass("TestClass");
+ public void voidMethodenTest() {
+ ClassNode class1 = Helper.generateEmptyClass("VoidMethod");
BlockNode block = new BlockNode();
block.addStatement(new ReturnNode(null));
class1.addMember(new MethodNode("public", null, true, "test", block));
@@ -205,14 +207,14 @@ class AstBuilderTest {
ProgramNode expected = new ProgramNode();
expected.addClass(class1);
- ASTNode actual = Helper.generateAST("src/test/resources/input/javaCases/VoidMethod.java");
+ ASTNode actual = Helper.generateAST(directoryPath + "VoidMethod.java");
assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
}
@Test
@DisplayName("Constructor Method call Test")
- public void constructorMethodCallTest(){
+ public void constructorMethodCallTest() {
BlockNode blockCon = new BlockNode();
MemberAccessNode memberAccess = new MemberAccessNode(true);
memberAccess.addIdentifier("a");
@@ -223,13 +225,13 @@ class AstBuilderTest {
blockCon.addStatement(new AssignNode(assignable, expression));
blockCon.addStatement(new ReturnNode(null));
- ConstructorNode constructor = new ConstructorNode("public", "TestClass", blockCon);
+ ConstructorNode constructor = new ConstructorNode("public", "ConstructorMethodCall", blockCon);
BlockNode blockMethod = new BlockNode();
blockMethod.addStatement(new ReturnNode(new UnaryNode(new ValueNode(EnumValueNode.INT_VALUE, "1"))));
MethodNode method = new MethodNode("public", new BaseType(TypeEnum.INT), false, "testMethod", blockMethod);
- ClassNode class1 = new ClassNode("public", "TestClass");
+ ClassNode class1 = new ClassNode("public", "ConstructorMethodCall");
class1.addMember(new FieldNode(new AccessModifierNode("public"), new BaseType(TypeEnum.INT), "a"));
class1.addMember(constructor);
class1.addMember(method);
@@ -237,14 +239,14 @@ class AstBuilderTest {
ProgramNode expected = new ProgramNode();
expected.addClass(class1);
- ASTNode actual = Helper.generateAST("src/test/resources/input/javaCases/ConstructorMethodCall.java");
+ ASTNode actual = Helper.generateAST(directoryPath + "ConstructorMethodCall.java");
assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
}
@Test
@DisplayName("Constructor Method call Parameters Test")
- public void constructorMethodCallParametersTest(){
+ public void constructorMethodCallParametersTest() {
BlockNode blockCon = new BlockNode();
MemberAccessNode memberAccess = new MemberAccessNode(true);
memberAccess.addIdentifier("a");
@@ -257,7 +259,7 @@ class AstBuilderTest {
blockCon.addStatement(new AssignNode(assignable, expression));
blockCon.addStatement(new ReturnNode(null));
- ConstructorNode constructor = new ConstructorNode("public", "TestClass", blockCon);
+ ConstructorNode constructor = new ConstructorNode("public", "ConstructorMethodCallParameters", blockCon);
constructor.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "a"));
BlockNode blockMethod = new BlockNode();
@@ -265,7 +267,7 @@ class AstBuilderTest {
MethodNode method = new MethodNode("public", new BaseType(TypeEnum.INT), false, "testMethod", blockMethod);
method.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "a"));
- ClassNode class1 = new ClassNode("public", "TestClass");
+ ClassNode class1 = new ClassNode("public", "ConstructorMethodCallParameters");
class1.addMember(new FieldNode(new AccessModifierNode("public"), new BaseType(TypeEnum.INT), "a"));
class1.addMember(constructor);
class1.addMember(method);
@@ -273,14 +275,14 @@ class AstBuilderTest {
ProgramNode expected = new ProgramNode();
expected.addClass(class1);
- ASTNode actual = Helper.generateAST("src/test/resources/input/javaCases/ConstructorMethodCallParameters.java");
+ ASTNode actual = Helper.generateAST(directoryPath + "ConstructorMethodCallParameters.java");
assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
}
@Test
@DisplayName("Char Test")
- public void charTest(){
+ public void charTest() {
BlockNode blockCon = new BlockNode();
MemberAccessNode memberAccess = new MemberAccessNode(true);
memberAccess.addIdentifier("a");
@@ -293,7 +295,7 @@ class AstBuilderTest {
blockCon.addStatement(new AssignNode(assignable, expression));
blockCon.addStatement(new ReturnNode(null));
- ConstructorNode constructor = new ConstructorNode("public", "TestClass", blockCon);
+ ConstructorNode constructor = new ConstructorNode("public", "Char", blockCon);
constructor.addParameter(new ParameterNode(new BaseType(TypeEnum.CHAR), "a"));
BlockNode blockMethod = new BlockNode();
@@ -301,7 +303,7 @@ class AstBuilderTest {
MethodNode method = new MethodNode("public", new BaseType(TypeEnum.CHAR), false, "testMethod", blockMethod);
method.addParameter(new ParameterNode(new BaseType(TypeEnum.CHAR), "a"));
- ClassNode class1 = new ClassNode("public", "TestClass");
+ ClassNode class1 = new ClassNode("public", "Char");
class1.addMember(new FieldNode(new AccessModifierNode("public"), new BaseType(TypeEnum.CHAR), "a"));
class1.addMember(constructor);
class1.addMember(method);
@@ -309,14 +311,14 @@ class AstBuilderTest {
ProgramNode expected = new ProgramNode();
expected.addClass(class1);
- ASTNode actual = Helper.generateAST("src/test/resources/input/javaCases/Char.java");
+ ASTNode actual = Helper.generateAST(directoryPath + "Char.java");
assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
}
@Test
@DisplayName("Null Test")
- public void nullTest(){
+ public void nullTest() {
BlockNode blockCon = new BlockNode();
MemberAccessNode memberAccess = new MemberAccessNode(true);
memberAccess.addIdentifier("a");
@@ -325,65 +327,65 @@ class AstBuilderTest {
blockCon.addStatement(new AssignNode(assignable, new UnaryNode(new ValueNode(EnumValueNode.NULL_VALUE, "null"))));
blockCon.addStatement(new ReturnNode(null));
- ConstructorNode constructor = new ConstructorNode("public", "TestClass", blockCon);
+ ConstructorNode constructor = new ConstructorNode("public", "Null", blockCon);
- ClassNode class1 = new ClassNode("public", "TestClass");
+ ClassNode class1 = new ClassNode("public", "Null");
class1.addMember(new FieldNode(new AccessModifierNode("public"), new BaseType(TypeEnum.INT), "a"));
class1.addMember(constructor);
ProgramNode expected = new ProgramNode();
expected.addClass(class1);
- ASTNode actual = Helper.generateAST("src/test/resources/input/javaCases/Null.java");
+ ASTNode actual = Helper.generateAST(directoryPath + "Null.java");
assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
}
@Test
@DisplayName("Self Reference Test")
- public void selfReferneceTest(){
+ public void selfReferneceTest() {
//assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
}
@Test
@DisplayName("Variable Compare Test")
- public void variableCompareTest(){
+ public void variableCompareTest() {
//assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
}
@Test
@DisplayName("Variable Calculation Test")
- public void variableCalculationTest(){
+ public void variableCalculationTest() {
//assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
}
@Test
@DisplayName("Main Method Test")
- public void mainMethodTest(){
+ public void mainMethodTest() {
//assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
}
@Test
@DisplayName("While Test")
- public void whileTest(){
+ public void whileTest() {
//assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
}
@Test
@DisplayName("Do While Test")
- public void doWhileTest(){
+ public void doWhileTest() {
//assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
}
@Test
@DisplayName("For Test")
- public void forTest(){
+ public void forTest() {
//assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
}
@@ -391,26 +393,16 @@ class AstBuilderTest {
//Noch nicht speziell Increment nur zum Development Testen per Debug
@Test
@DisplayName("Increment Test")
- public void incrementTest(){
- ClassNode classNode = Helper.generateEmptyClass("TestClass");
+ public void incrementTest() {
+ ClassNode classNode = Helper.generateEmptyClass("Increment");
classNode.addMember(new FieldNode(new AccessModifierNode("public"), new BaseType(TypeEnum.INT), "a"));
ProgramNode expected = new ProgramNode();
expected.addClass(classNode);
- ASTNode actual = Helper.generateAST("src/test/resources/input/javaCases/Increment.java");
+ ASTNode actual = Helper.generateAST(directoryPath + "Increment.java");
assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
}
-
-
-
-
-
-
-
-
-
-
}
\ No newline at end of file
diff --git a/src/test/java/semantic/EndToTypedAstTest.java b/src/test/java/semantic/EndToTypedAstTest.java
index 637ebc1..a33b9d4 100644
--- a/src/test/java/semantic/EndToTypedAstTest.java
+++ b/src/test/java/semantic/EndToTypedAstTest.java
@@ -38,17 +38,14 @@ public class EndToTypedAstTest {
CharStream codeCharStream = null;
try {
- codeCharStream = CharStreams.fromPath(Paths.get("src/test/resources/input/typedAstFeaturesTests/CorrectTest.java"));
+ codeCharStream = CharStreams.fromPath(Paths.get("src/test/resources/input/typedAstFeatureTests/CorrectTest.java"));
} catch (IOException e) {
throw new RuntimeException(e);
}
SimpleJavaLexer lexer = new SimpleJavaLexer(codeCharStream);
CommonTokenStream tokenStream = new CommonTokenStream(lexer);
-
SimpleJavaParser parser = new SimpleJavaParser(tokenStream);
- ParseTree parseTree = parser.program(); // parse the input
-
- /* ------------------------- AST builder -> AST ------------------------- */
+ ParseTree parseTree = parser.program();
ASTBuilder astBuilder = new ASTBuilder();
ProgramNode abstractSyntaxTree = (ProgramNode) astBuilder.visit(parseTree);
@@ -115,7 +112,7 @@ public class EndToTypedAstTest {
@Test
public void featureTest() {
- String directoryPath = "src/test/resources/input/typedAstFeaturesTests";
+ String directoryPath = "src/test/resources/input/typedAstFeatureTests";
File folder = new File(directoryPath);
if (folder.isDirectory()) {
File[] files = folder.listFiles((_, name) -> name.endsWith(".java"));
diff --git a/src/test/resources/input/CombinedExample.java b/src/test/resources/input/CombinedExample.java
deleted file mode 100644
index e7e000c..0000000
--- a/src/test/resources/input/CombinedExample.java
+++ /dev/null
@@ -1,23 +0,0 @@
-public class CombinedExample {
- int number;
- boolean flag;
- char letter;
-
- public CombinedExample(int number, boolean flag, char letter) {
- this.number = number;
- this.flag = flag;
- this.letter = letter;
- }
-
- public void displayValues() {
- System.out.println("Number: " + number);
- System.out.println("Flag: " + flag);
- System.out.println("Letter: " + letter);
- }
-
- public static void main(String[] args) {
- CombinedExample obj = new CombinedExample(10, true, 'X');
- obj.displayValues();
- }
-}
-
diff --git a/src/test/resources/input/CompilerInput.java b/src/test/resources/input/CompilerInput.java
deleted file mode 100644
index d850a3e..0000000
--- a/src/test/resources/input/CompilerInput.java
+++ /dev/null
@@ -1,16 +0,0 @@
-public class CompilerInput {
-
- public int a;
-
- public static int testMethod(char x){
- return 0;
- }
-
- public class Test {
-
- public static int testMethod(char x, int a){
- return 0;
- }
- }
-}
-
diff --git a/src/test/resources/input/MoreFeaturesClassExample.java b/src/test/resources/input/MoreFeaturesClassExample.java
deleted file mode 100644
index 4f6fbf3..0000000
--- a/src/test/resources/input/MoreFeaturesClassExample.java
+++ /dev/null
@@ -1,6 +0,0 @@
-public class MoreFeaturesClassExample {
- int hallo;
- private class Inner {
- int hallo2;
- }
-}
diff --git a/src/test/resources/input/AllFeaturesClassExample.java b/src/test/resources/input/combinedFeatureTests/AllFeaturesClassExample.java
similarity index 56%
rename from src/test/resources/input/AllFeaturesClassExample.java
rename to src/test/resources/input/combinedFeatureTests/AllFeaturesClassExample.java
index 1a8493d..8f5b3c6 100644
--- a/src/test/resources/input/AllFeaturesClassExample.java
+++ b/src/test/resources/input/combinedFeatureTests/AllFeaturesClassExample.java
@@ -9,19 +9,12 @@ public class AllFeaturesClassExample {
this.b = b;
this.c = c;
}
- private class InnerClass {
- void innerMethod() {
- System.out.println("Inner class method");
- }
- }
// Methode zur Demonstration von Kontrollstrukturen
void controlStructures() {
// if-else Anweisung
if (a > 10) {
- System.out.println("a ist größer als 10");
} else {
- System.out.println("a ist nicht größer als 10");
}
// while Schleife
@@ -32,35 +25,41 @@ public class AllFeaturesClassExample {
// for Schleife
for (int i = 0; i < 5; i++) {
- System.out.println("for Schleife Iteration: " + i);
}
- // switch Anweisung
- switch (c) {
- case 'a':
- System.out.println("c ist ein 'a'");
- break;
- case 'b':
- System.out.println("c ist ein 'b'");
- break;
- default:
- System.out.println("c ist nicht 'a' oder 'b'");
- }
}
// Methode zur Arbeit mit logischen Operatoren
void logicalOperations() {
// Logische UND-Operation
if (b && a > 5) {
- System.out.println("a ist größer als 5 und b ist wahr");
}
// Logische ODER-Operation
if (b || a < 5) {
- System.out.println("b ist wahr oder a ist kleiner als 5");
}
}
+ int add(int a, int b) {
+ return a + b;
+ }
+
+ int subtract(int a, int b) {
+ return a - b;
+ }
+
+ int multiply(int a, int b) {
+ return a * b;
+ }
+
+ int divide(int a, int b) {
+ return a / b;
+ }
+
+ int modulo(int a, int b) {
+ return a % b;
+ }
+
public static void main(String[] args) {
AllFeaturesClassExample obj = new AllFeaturesClassExample(12, true, 'a');
obj.controlStructures();
diff --git a/src/test/resources/input/featureTests/BooleanOperations.java b/src/test/resources/input/combinedFeatureTests/BooleanOperations.java
similarity index 100%
rename from src/test/resources/input/featureTests/BooleanOperations.java
rename to src/test/resources/input/combinedFeatureTests/BooleanOperations.java
diff --git a/src/test/resources/input/featureTests/CharManipulation.java b/src/test/resources/input/combinedFeatureTests/CharManipulation.java
similarity index 100%
rename from src/test/resources/input/featureTests/CharManipulation.java
rename to src/test/resources/input/combinedFeatureTests/CharManipulation.java
diff --git a/src/test/resources/input/featureTests/ConditionalStatements.java b/src/test/resources/input/combinedFeatureTests/ConditionalStatements.java
similarity index 100%
rename from src/test/resources/input/featureTests/ConditionalStatements.java
rename to src/test/resources/input/combinedFeatureTests/ConditionalStatements.java
diff --git a/src/test/resources/input/featureTests/EmptyClassExample.java b/src/test/resources/input/combinedFeatureTests/EmptyClassExample.java
similarity index 100%
rename from src/test/resources/input/featureTests/EmptyClassExample.java
rename to src/test/resources/input/combinedFeatureTests/EmptyClassExample.java
diff --git a/src/test/resources/input/featureTests/LoopExamples.java b/src/test/resources/input/combinedFeatureTests/LoopExamples.java
similarity index 100%
rename from src/test/resources/input/featureTests/LoopExamples.java
rename to src/test/resources/input/combinedFeatureTests/LoopExamples.java
diff --git a/src/test/resources/input/featureTests/MethodOverloading.java b/src/test/resources/input/combinedFeatureTests/MethodOverloading.java
similarity index 100%
rename from src/test/resources/input/featureTests/MethodOverloading.java
rename to src/test/resources/input/combinedFeatureTests/MethodOverloading.java
diff --git a/src/test/resources/input/javaCases/ConstructorParameter.java b/src/test/resources/input/javaCases/ConstructorParameter.java
deleted file mode 100644
index 96e27a1..0000000
--- a/src/test/resources/input/javaCases/ConstructorParameter.java
+++ /dev/null
@@ -1,5 +0,0 @@
-class TestClass {
- public TestClass(int a, int b){
-
- }
-}
\ No newline at end of file
diff --git a/src/test/resources/input/javaCases/ConstructorThisDot.java b/src/test/resources/input/javaCases/ConstructorThisDot.java
deleted file mode 100644
index d51452d..0000000
--- a/src/test/resources/input/javaCases/ConstructorThisDot.java
+++ /dev/null
@@ -1,8 +0,0 @@
-class TestClass{
-
- private int a;
-
- public TestClass(int a){
- this.a = a;
- }
-}
\ No newline at end of file
diff --git a/src/test/resources/input/javaCases/EmptyClass.java b/src/test/resources/input/javaCases/EmptyClass.java
deleted file mode 100644
index f2be03c..0000000
--- a/src/test/resources/input/javaCases/EmptyClass.java
+++ /dev/null
@@ -1 +0,0 @@
-class TestClass {}
\ No newline at end of file
diff --git a/src/test/resources/input/javaCases/EmptyClassWithConstructor.java b/src/test/resources/input/javaCases/EmptyClassWithConstructor.java
deleted file mode 100644
index 0907f20..0000000
--- a/src/test/resources/input/javaCases/EmptyClassWithConstructor.java
+++ /dev/null
@@ -1,5 +0,0 @@
-public class TestClass {
- public TestClass() {
-
- }
-}
\ No newline at end of file
diff --git a/src/test/resources/input/javaCases/Field.java b/src/test/resources/input/javaCases/Field.java
deleted file mode 100644
index 082ad8b..0000000
--- a/src/test/resources/input/javaCases/Field.java
+++ /dev/null
@@ -1,3 +0,0 @@
-public class TestClass {
- int a;
-}
\ No newline at end of file
diff --git a/src/test/resources/input/javaCases/FieldWithAccessModifier.java b/src/test/resources/input/javaCases/FieldWithAccessModifier.java
deleted file mode 100644
index 7cd041f..0000000
--- a/src/test/resources/input/javaCases/FieldWithAccessModifier.java
+++ /dev/null
@@ -1,3 +0,0 @@
-public class TestClass {
- public int a;
-}
\ No newline at end of file
diff --git a/src/test/resources/input/javaCases/MultipleClasses.java b/src/test/resources/input/javaCases/MultipleClasses.java
deleted file mode 100644
index a560484..0000000
--- a/src/test/resources/input/javaCases/MultipleClasses.java
+++ /dev/null
@@ -1,3 +0,0 @@
-class TestClass1 {}
-
-class TestClass2{}
\ No newline at end of file
diff --git a/src/test/resources/input/javaCases/Null.java b/src/test/resources/input/javaCases/Null.java
deleted file mode 100644
index 719b7a0..0000000
--- a/src/test/resources/input/javaCases/Null.java
+++ /dev/null
@@ -1,8 +0,0 @@
-class TestClass{
-
- int a;
-
- public TestClass(){
- this.a = null;
- }
-}
\ No newline at end of file
diff --git a/src/test/resources/input/javaCases/SelfReference.java b/src/test/resources/input/javaCases/SelfReference.java
deleted file mode 100644
index cbe6e25..0000000
--- a/src/test/resources/input/javaCases/SelfReference.java
+++ /dev/null
@@ -1,18 +0,0 @@
-class TestClass{
-
- TestClass testClass;
-
- int testMethod1() {
- return this.testMethod2()
- }
-
- int testMethod2() {
- return 1;
- }
-
- int testMehtod3(){
- TestClass testClass1 = new TestClass();
- return testClass1.testClass.testMethod1();
- }
-
-}
\ No newline at end of file
diff --git a/src/test/resources/input/javaCases/VoidMethod.java b/src/test/resources/input/javaCases/VoidMethod.java
deleted file mode 100644
index d342243..0000000
--- a/src/test/resources/input/javaCases/VoidMethod.java
+++ /dev/null
@@ -1,3 +0,0 @@
-class TestClass{
- void test(){}
-}
\ No newline at end of file
diff --git a/src/test/resources/input/javaCases/variableCompareTest.java b/src/test/resources/input/javaCases/variableCompareTest.java
deleted file mode 100644
index dc01954..0000000
--- a/src/test/resources/input/javaCases/variableCompareTest.java
+++ /dev/null
@@ -1,30 +0,0 @@
-class TestClass{
-
- boolean true(){
- return true;
- }
-
- boolean false(){
- return false();
- }
-
- boolean trueAndTrue(){
- return true && true;
- }
-
- boolean trueAndFalse(){
- return true && true;
- }
-
- boolean falseAndFalse(){
- return false && false;
- }
-
- boolean trueOrFalse(){
- return true || false;
- }
-
- boolean falseOrFalse(){
- return false || false;
- }
-}
\ No newline at end of file
diff --git a/src/test/resources/input/javaCases/Char.java b/src/test/resources/input/singleFeatureTests/Char.java
similarity index 68%
rename from src/test/resources/input/javaCases/Char.java
rename to src/test/resources/input/singleFeatureTests/Char.java
index de9c21f..54ff6fa 100644
--- a/src/test/resources/input/javaCases/Char.java
+++ b/src/test/resources/input/singleFeatureTests/Char.java
@@ -1,8 +1,8 @@
-class TestClass{
+class Char {
char a;
- public TestClass(char a){
+ public Char(char a){
this.a = testMethod(a);
}
diff --git a/src/test/resources/input/javaCases/Comments.java b/src/test/resources/input/singleFeatureTests/Comments.java
similarity index 81%
rename from src/test/resources/input/javaCases/Comments.java
rename to src/test/resources/input/singleFeatureTests/Comments.java
index 2af751c..fbf3e12 100644
--- a/src/test/resources/input/javaCases/Comments.java
+++ b/src/test/resources/input/singleFeatureTests/Comments.java
@@ -3,6 +3,6 @@
Mutliple Line Comment. Ignore
*/
-class TestClass{
+class Comments{
private int a; // Ignore
}
diff --git a/src/test/resources/input/javaCases/ConstructorMethodCall.java b/src/test/resources/input/singleFeatureTests/ConstructorMethodCall.java
similarity index 56%
rename from src/test/resources/input/javaCases/ConstructorMethodCall.java
rename to src/test/resources/input/singleFeatureTests/ConstructorMethodCall.java
index 172777c..2e0c4a8 100644
--- a/src/test/resources/input/javaCases/ConstructorMethodCall.java
+++ b/src/test/resources/input/singleFeatureTests/ConstructorMethodCall.java
@@ -1,8 +1,8 @@
-class TestClass {
+public class ConstructorMethodCall {
int a;
- public TestClass(){
+ public ConstructorMethodCall(){
this.a = testMethod();
}
diff --git a/src/test/resources/input/javaCases/ConstructorMethodCallParameters.java b/src/test/resources/input/singleFeatureTests/ConstructorMethodCallParameters.java
similarity index 52%
rename from src/test/resources/input/javaCases/ConstructorMethodCallParameters.java
rename to src/test/resources/input/singleFeatureTests/ConstructorMethodCallParameters.java
index fe3b0fd..61f83e1 100644
--- a/src/test/resources/input/javaCases/ConstructorMethodCallParameters.java
+++ b/src/test/resources/input/singleFeatureTests/ConstructorMethodCallParameters.java
@@ -1,8 +1,8 @@
-class TestClass {
+class ConstructorMethodCallParameters {
int a;
- public TestClass(int a){
+ public ConstructorMethodCallParameters(int a){
this.a = testMethod(a);
}
diff --git a/src/test/resources/input/singleFeatureTests/ConstructorParameter.java b/src/test/resources/input/singleFeatureTests/ConstructorParameter.java
new file mode 100644
index 0000000..1d821ca
--- /dev/null
+++ b/src/test/resources/input/singleFeatureTests/ConstructorParameter.java
@@ -0,0 +1,5 @@
+class ConstructorParameter {
+ public ConstructorParameter(int a, int b){
+
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/input/singleFeatureTests/ConstructorThisDot.java b/src/test/resources/input/singleFeatureTests/ConstructorThisDot.java
new file mode 100644
index 0000000..8e8077b
--- /dev/null
+++ b/src/test/resources/input/singleFeatureTests/ConstructorThisDot.java
@@ -0,0 +1,8 @@
+class ConstructorThisDot {
+
+ private int a;
+
+ public ConstructorThisDot(int a){
+ this.a = a;
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/input/javaCases/DoWhile.java b/src/test/resources/input/singleFeatureTests/DoWhile.java
similarity index 52%
rename from src/test/resources/input/javaCases/DoWhile.java
rename to src/test/resources/input/singleFeatureTests/DoWhile.java
index 65c25de..db1b1ab 100644
--- a/src/test/resources/input/javaCases/DoWhile.java
+++ b/src/test/resources/input/singleFeatureTests/DoWhile.java
@@ -1,10 +1,10 @@
-class TestClass{
+class DoWhile{
- public TestClass(){
+ public DoWhile(){
int i = 0;
do{
- i++
+ i++;
}while(i < 10);
}
}
\ No newline at end of file
diff --git a/src/test/resources/input/singleFeatureTests/EmptyClass.java b/src/test/resources/input/singleFeatureTests/EmptyClass.java
new file mode 100644
index 0000000..1d9bc30
--- /dev/null
+++ b/src/test/resources/input/singleFeatureTests/EmptyClass.java
@@ -0,0 +1 @@
+class EmptyClass {}
\ No newline at end of file
diff --git a/src/test/resources/input/singleFeatureTests/EmptyClassWithConstructor.java b/src/test/resources/input/singleFeatureTests/EmptyClassWithConstructor.java
new file mode 100644
index 0000000..5d7333a
--- /dev/null
+++ b/src/test/resources/input/singleFeatureTests/EmptyClassWithConstructor.java
@@ -0,0 +1,5 @@
+public class EmptyClassWithConstructor {
+ public EmptyClassWithConstructor() {
+
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/input/singleFeatureTests/Field.java b/src/test/resources/input/singleFeatureTests/Field.java
new file mode 100644
index 0000000..218857c
--- /dev/null
+++ b/src/test/resources/input/singleFeatureTests/Field.java
@@ -0,0 +1,3 @@
+class Field {
+ int a;
+}
\ No newline at end of file
diff --git a/src/test/resources/input/singleFeatureTests/FieldWithAccessModifier.java b/src/test/resources/input/singleFeatureTests/FieldWithAccessModifier.java
new file mode 100644
index 0000000..6bb9e11
--- /dev/null
+++ b/src/test/resources/input/singleFeatureTests/FieldWithAccessModifier.java
@@ -0,0 +1,3 @@
+public class FieldWithAccessModifier {
+ public int a;
+}
\ No newline at end of file
diff --git a/src/test/resources/input/javaCases/For.java b/src/test/resources/input/singleFeatureTests/For.java
similarity index 63%
rename from src/test/resources/input/javaCases/For.java
rename to src/test/resources/input/singleFeatureTests/For.java
index 4bb8f8a..f8f0fd6 100644
--- a/src/test/resources/input/javaCases/For.java
+++ b/src/test/resources/input/singleFeatureTests/For.java
@@ -1,6 +1,6 @@
-class TestClass{
+class For{
- public TestClass(){
+ public For(){
for(int i = 0; i < 10; i++){
int a;
}
diff --git a/src/test/resources/input/javaCases/Increment.java b/src/test/resources/input/singleFeatureTests/Increment.java
similarity index 79%
rename from src/test/resources/input/javaCases/Increment.java
rename to src/test/resources/input/singleFeatureTests/Increment.java
index 9560a9b..d2789c9 100644
--- a/src/test/resources/input/javaCases/Increment.java
+++ b/src/test/resources/input/singleFeatureTests/Increment.java
@@ -5,7 +5,7 @@ public class Increment {
public void increment(int p) {
test = p++;
- for(int i = 1; i<=10, i++) {
+ for(int i = 1; i<=10; i++) {
int a = 5;
}
}
diff --git a/src/test/resources/input/javaCases/MainMehod.java b/src/test/resources/input/singleFeatureTests/MainMehod.java
similarity index 73%
rename from src/test/resources/input/javaCases/MainMehod.java
rename to src/test/resources/input/singleFeatureTests/MainMehod.java
index df7c2e1..b6079ae 100644
--- a/src/test/resources/input/javaCases/MainMehod.java
+++ b/src/test/resources/input/singleFeatureTests/MainMehod.java
@@ -1,4 +1,4 @@
-class TestClass{
+class MainMethod{
public static void main(String[] args) {
}
diff --git a/src/test/resources/input/singleFeatureTests/MultipleClasses.java b/src/test/resources/input/singleFeatureTests/MultipleClasses.java
new file mode 100644
index 0000000..dda277c
--- /dev/null
+++ b/src/test/resources/input/singleFeatureTests/MultipleClasses.java
@@ -0,0 +1,3 @@
+class MultipleClasses {}
+
+class TestClass2{}
\ No newline at end of file
diff --git a/src/test/resources/input/singleFeatureTests/Null.java b/src/test/resources/input/singleFeatureTests/Null.java
new file mode 100644
index 0000000..bb0b8c3
--- /dev/null
+++ b/src/test/resources/input/singleFeatureTests/Null.java
@@ -0,0 +1,8 @@
+class Null{
+
+ int a;
+
+ public Null(){
+ // this.a = null;
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/input/singleFeatureTests/SelfReference.java b/src/test/resources/input/singleFeatureTests/SelfReference.java
new file mode 100644
index 0000000..24e1fd5
--- /dev/null
+++ b/src/test/resources/input/singleFeatureTests/SelfReference.java
@@ -0,0 +1,18 @@
+class SelfReference{
+
+ SelfReference selfReference;
+
+ int testMethod1() {
+ return this.testMethod2();
+ }
+
+ int testMethod2() {
+ return 1;
+ }
+
+ int testMehtod3(){
+ SelfReference selfReference1 = new SelfReference();
+ return selfReference1.selfReference.testMethod1();
+ }
+
+}
\ No newline at end of file
diff --git a/src/test/resources/input/javaCases/ThisDot.java b/src/test/resources/input/singleFeatureTests/ThisDot.java
similarity index 51%
rename from src/test/resources/input/javaCases/ThisDot.java
rename to src/test/resources/input/singleFeatureTests/ThisDot.java
index 866b39e..4d3a41e 100644
--- a/src/test/resources/input/javaCases/ThisDot.java
+++ b/src/test/resources/input/singleFeatureTests/ThisDot.java
@@ -1,8 +1,8 @@
-class TestClass{
+class ThisDot {
public int a;
- public TestClass() {
+ public ThisDot() {
this.a = 1;
}
}
\ No newline at end of file
diff --git a/src/test/resources/input/javaCases/variableCalculationTest.java b/src/test/resources/input/singleFeatureTests/VariableCalculationTest.java
similarity index 94%
rename from src/test/resources/input/javaCases/variableCalculationTest.java
rename to src/test/resources/input/singleFeatureTests/VariableCalculationTest.java
index 7708811..11dfac5 100644
--- a/src/test/resources/input/javaCases/variableCalculationTest.java
+++ b/src/test/resources/input/singleFeatureTests/VariableCalculationTest.java
@@ -1,4 +1,4 @@
-class TestClass{
+class VariableCalculationTest{
int aPlusB(int a, int b){
return a + b;
diff --git a/src/test/resources/input/singleFeatureTests/VariableCompareTest.java b/src/test/resources/input/singleFeatureTests/VariableCompareTest.java
new file mode 100644
index 0000000..070ebf9
--- /dev/null
+++ b/src/test/resources/input/singleFeatureTests/VariableCompareTest.java
@@ -0,0 +1,30 @@
+class VariableCompareTest{
+
+ boolean trueMethod(){
+ return true;
+ }
+
+ boolean falseMethod(){
+ return false;
+ }
+
+ boolean trueAndTrue(){
+ return trueMethod() && trueMethod();
+ }
+
+ boolean trueAndFalse(){
+ return trueMethod() && falseMethod();
+ }
+
+ boolean falseAndFalse(){
+ return falseMethod() && falseMethod();
+ }
+
+ boolean trueOrFalse(){
+ return trueMethod() || falseMethod();
+ }
+
+ boolean falseOrFalse(){
+ return falseMethod() || falseMethod();
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/input/singleFeatureTests/VoidMethod.java b/src/test/resources/input/singleFeatureTests/VoidMethod.java
new file mode 100644
index 0000000..0d45373
--- /dev/null
+++ b/src/test/resources/input/singleFeatureTests/VoidMethod.java
@@ -0,0 +1,3 @@
+class VoidMethod{
+ void test(){}
+}
\ No newline at end of file
diff --git a/src/test/resources/input/javaCases/While.java b/src/test/resources/input/singleFeatureTests/While.java
similarity index 65%
rename from src/test/resources/input/javaCases/While.java
rename to src/test/resources/input/singleFeatureTests/While.java
index c06efdd..01dc5fc 100644
--- a/src/test/resources/input/javaCases/While.java
+++ b/src/test/resources/input/singleFeatureTests/While.java
@@ -1,6 +1,6 @@
-class TestClass{
+class While{
- public TestClass(){
+ public While(){
int i = 10;
while ( i > 0){
diff --git a/src/test/resources/input/typedAstFeaturesTests/CallMethodFromObjekt.java b/src/test/resources/input/typedAstFeatureTests/CallMethodFromObjekt.java
similarity index 84%
rename from src/test/resources/input/typedAstFeaturesTests/CallMethodFromObjekt.java
rename to src/test/resources/input/typedAstFeatureTests/CallMethodFromObjekt.java
index 61b94f2..714960f 100644
--- a/src/test/resources/input/typedAstFeaturesTests/CallMethodFromObjekt.java
+++ b/src/test/resources/input/typedAstFeatureTests/CallMethodFromObjekt.java
@@ -1,4 +1,4 @@
-public class Test {
+public class CallMethodFromObjekt {
public int firstInt;
public Car ca;
@@ -7,7 +7,6 @@ public class Test {
return ca.getSpeed();
}
-}
public class Car{
@@ -17,4 +16,5 @@ public class Car{
return speed;
}
+}
}
\ No newline at end of file
diff --git a/src/test/resources/input/typedAstFeaturesTests/CorrectMemberAccess.java b/src/test/resources/input/typedAstFeatureTests/CorrectMemberAccess.java
similarity index 75%
rename from src/test/resources/input/typedAstFeaturesTests/CorrectMemberAccess.java
rename to src/test/resources/input/typedAstFeatureTests/CorrectMemberAccess.java
index b9f3dbb..462d181 100644
--- a/src/test/resources/input/typedAstFeaturesTests/CorrectMemberAccess.java
+++ b/src/test/resources/input/typedAstFeatureTests/CorrectMemberAccess.java
@@ -1,4 +1,4 @@
-public class Test{
+public class CorrectMemberAccess{
public Car c;
@@ -6,9 +6,8 @@ public class Test{
return c.getSpeed();
}
-}
-public class Car{
+private class Car{
private int speed;
@@ -16,4 +15,5 @@ public class Car{
return speed;
}
+}
}
\ No newline at end of file
diff --git a/src/test/resources/input/typedAstFeaturesTests/CorrectMethodParameter.java b/src/test/resources/input/typedAstFeatureTests/CorrectMethodParameter.java
similarity index 81%
rename from src/test/resources/input/typedAstFeaturesTests/CorrectMethodParameter.java
rename to src/test/resources/input/typedAstFeatureTests/CorrectMethodParameter.java
index ecfad3e..e1c390c 100644
--- a/src/test/resources/input/typedAstFeaturesTests/CorrectMethodParameter.java
+++ b/src/test/resources/input/typedAstFeatureTests/CorrectMethodParameter.java
@@ -1,4 +1,4 @@
-public class Test{
+public class CorrectMethodParameter{
public void test(int x){
diff --git a/src/test/resources/input/typedAstFeaturesTests/CorrectNonCalcTest.java b/src/test/resources/input/typedAstFeatureTests/CorrectNonCalcTest.java
similarity index 74%
rename from src/test/resources/input/typedAstFeaturesTests/CorrectNonCalcTest.java
rename to src/test/resources/input/typedAstFeatureTests/CorrectNonCalcTest.java
index d78e926..1a9ccb7 100644
--- a/src/test/resources/input/typedAstFeaturesTests/CorrectNonCalcTest.java
+++ b/src/test/resources/input/typedAstFeatureTests/CorrectNonCalcTest.java
@@ -1,4 +1,4 @@
-public class Test{
+public class CorrectNonCalcTest{
public void test(boolean b){
if(b == true){
diff --git a/src/test/resources/input/typedAstFeaturesTests/CorrectReturnType.java b/src/test/resources/input/typedAstFeatureTests/CorrectReturnType.java
similarity index 67%
rename from src/test/resources/input/typedAstFeaturesTests/CorrectReturnType.java
rename to src/test/resources/input/typedAstFeatureTests/CorrectReturnType.java
index 473e8df..62667d4 100644
--- a/src/test/resources/input/typedAstFeaturesTests/CorrectReturnType.java
+++ b/src/test/resources/input/typedAstFeatureTests/CorrectReturnType.java
@@ -1,4 +1,4 @@
-public class Example {
+public class CorrectReturnType {
public static int testMethod(int x){
return x;
diff --git a/src/test/resources/input/typedAstFeatureTests/CorrectTest.java b/src/test/resources/input/typedAstFeatureTests/CorrectTest.java
new file mode 100644
index 0000000..268fbe8
--- /dev/null
+++ b/src/test/resources/input/typedAstFeatureTests/CorrectTest.java
@@ -0,0 +1,21 @@
+public class CorrectTest {
+ int a;
+ boolean b;
+ char c;
+
+ public void controlStructures(int adf, boolean bool) {
+ if (a > (10 + 8)) {
+ } else {
+ }
+
+
+ while (a > adf) {
+ a--;
+ }
+
+ for (int i = 0; i < 5; i++) {
+ }
+
+
+ }
+}
diff --git a/src/test/resources/input/typedAstFeaturesTests/FullTest.java b/src/test/resources/input/typedAstFeatureTests/FullTest.java
similarity index 96%
rename from src/test/resources/input/typedAstFeaturesTests/FullTest.java
rename to src/test/resources/input/typedAstFeatureTests/FullTest.java
index 5c3a97b..f512c69 100644
--- a/src/test/resources/input/typedAstFeaturesTests/FullTest.java
+++ b/src/test/resources/input/typedAstFeatureTests/FullTest.java
@@ -1,5 +1,5 @@
-public class AllFeaturesClassExample {
+public class FullTest {
int a;
boolean b;
char c;
@@ -18,7 +18,7 @@ public class AllFeaturesClassExample {
}
- }
+
// void logicalOperations() {
// // Logische UND-Operation
@@ -62,3 +62,4 @@ public class Car {
}
+}
\ No newline at end of file
diff --git a/src/test/resources/input/typedAstFeaturesTests/IfExpressionBoolean.java b/src/test/resources/input/typedAstFeatureTests/IfExpressionBoolean.java
similarity index 72%
rename from src/test/resources/input/typedAstFeaturesTests/IfExpressionBoolean.java
rename to src/test/resources/input/typedAstFeatureTests/IfExpressionBoolean.java
index 526a2f2..9d7c120 100644
--- a/src/test/resources/input/typedAstFeaturesTests/IfExpressionBoolean.java
+++ b/src/test/resources/input/typedAstFeatureTests/IfExpressionBoolean.java
@@ -1,4 +1,4 @@
-public class Car{
+public class IfExpressionBoolean{
public void test(boolean boo){
diff --git a/src/test/resources/input/typedAstFeaturesTests/IfReturn.java b/src/test/resources/input/typedAstFeatureTests/IfReturn.java
similarity index 86%
rename from src/test/resources/input/typedAstFeaturesTests/IfReturn.java
rename to src/test/resources/input/typedAstFeatureTests/IfReturn.java
index 00cd263..2051faa 100644
--- a/src/test/resources/input/typedAstFeaturesTests/IfReturn.java
+++ b/src/test/resources/input/typedAstFeatureTests/IfReturn.java
@@ -1,4 +1,4 @@
-public class Car{
+public class IfReturn{
public int getSpeed(boolean bool, int a, int b){
diff --git a/src/test/resources/input/typedAstFeaturesTests/SelectRightOverloadedMethod.java b/src/test/resources/input/typedAstFeatureTests/SelectRightOverloadedMethod.java
similarity index 83%
rename from src/test/resources/input/typedAstFeaturesTests/SelectRightOverloadedMethod.java
rename to src/test/resources/input/typedAstFeatureTests/SelectRightOverloadedMethod.java
index bcb6b9c..eaa82d6 100644
--- a/src/test/resources/input/typedAstFeaturesTests/SelectRightOverloadedMethod.java
+++ b/src/test/resources/input/typedAstFeatureTests/SelectRightOverloadedMethod.java
@@ -1,4 +1,4 @@
-public class Test{
+public class SelectRightOverloadedMethod{
public int i;
public boolean b;
diff --git a/src/test/resources/input/typedAstFeaturesTests/ThisDotMethod.java b/src/test/resources/input/typedAstFeatureTests/ThisDotMethod.java
similarity index 83%
rename from src/test/resources/input/typedAstFeaturesTests/ThisDotMethod.java
rename to src/test/resources/input/typedAstFeatureTests/ThisDotMethod.java
index 36bcade..dd67f9a 100644
--- a/src/test/resources/input/typedAstFeaturesTests/ThisDotMethod.java
+++ b/src/test/resources/input/typedAstFeatureTests/ThisDotMethod.java
@@ -1,4 +1,4 @@
-public class Car{
+public class ThisDotMethod{
private int speed;
diff --git a/src/test/resources/input/typedAstFeaturesTests/VoidReturnTypeIF.java b/src/test/resources/input/typedAstFeatureTests/VoidReturnTypeIF.java
similarity index 78%
rename from src/test/resources/input/typedAstFeaturesTests/VoidReturnTypeIF.java
rename to src/test/resources/input/typedAstFeatureTests/VoidReturnTypeIF.java
index bc31a27..d6ea473 100644
--- a/src/test/resources/input/typedAstFeaturesTests/VoidReturnTypeIF.java
+++ b/src/test/resources/input/typedAstFeatureTests/VoidReturnTypeIF.java
@@ -1,4 +1,4 @@
-public class Car{
+public class VoidReturnTypeIF{
private int speed;
diff --git a/src/test/resources/input/typedAstFeaturesTests/CorrectTest.java b/src/test/resources/input/typedAstFeaturesTests/CorrectTest.java
deleted file mode 100644
index 5ef0b26..0000000
--- a/src/test/resources/input/typedAstFeaturesTests/CorrectTest.java
+++ /dev/null
@@ -1,38 +0,0 @@
-public class AllFeaturesClassExample {
- int a;
- boolean b;
- char c;
-
- public void controlStructures(int adf, boolean bool) {
- if (a > (10 + 8)) {
- } else {
- }
-
-
- while (a > adf) {
- a--;
- }
-
- for (int i = 0; i < 5; i++) {
- }
-
-
- }
-
-// void logicalOperations() {
- // Logische UND-Operation
-// if (b && a > 5) {
-// System.out.println("a ist größer als 5 und b ist wahr");
-// }
-
- // Logische ODER-Operation
-// if (b || a < 5) {
-// System.out.println("b ist wahr oder a ist kleiner als 5");
-// }
-// }
-
-// public static void main(String[] args) {
-// AllFeaturesClassExample obj = new AllFeaturesClassExample(12, true, 'a');
-// obj.controlStructures();
-// }
-}
--
2.34.1
From 2bf73385af6cec9a936ebb9f834fb629e4fb3eca Mon Sep 17 00:00:00 2001
From: Lucas <89882946+notbad3500@users.noreply.github.com>
Date: Wed, 3 Jul 2024 13:06:06 +0200
Subject: [PATCH 21/96] small changes
---
.../input/featureTests/BooleanOperations.class | Bin 686 -> 0 bytes
.../input/featureTests/CharManipulation.class | Bin 638 -> 0 bytes
.../featureTests/ConditionalStatements.class | Bin 780 -> 0 bytes
.../input/featureTests/EmptyClassExample.class | Bin 208 -> 0 bytes
.../input/featureTests/LoopExamples.class | Bin 1004 -> 0 bytes
.../input/featureTests/MethodOverloading.class | Bin 1083 -> 0 bytes
6 files changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 src/test/resources/input/featureTests/BooleanOperations.class
delete mode 100644 src/test/resources/input/featureTests/CharManipulation.class
delete mode 100644 src/test/resources/input/featureTests/ConditionalStatements.class
delete mode 100644 src/test/resources/input/featureTests/EmptyClassExample.class
delete mode 100644 src/test/resources/input/featureTests/LoopExamples.class
delete mode 100644 src/test/resources/input/featureTests/MethodOverloading.class
diff --git a/src/test/resources/input/featureTests/BooleanOperations.class b/src/test/resources/input/featureTests/BooleanOperations.class
deleted file mode 100644
index cd8092afc9340340c3c834d5302392425b071189..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 686
zcmZuv(P|Sx6g{)qWRi8$CQXy7wQ5^!lNHPdRD7sVL828R1>2`d9G7V~vthF-^jG`=
zUwl!t1qDCAk5bR1!6M4A_s+d@?>XmQ_Q%h!-vR8R6Tm}3!VghINuYMDPE|KiHty~Z
zj`c7XC_OUPrS&$@Pd7>6DDk-b{r_yDu|i^M0ObHQI4-DuN
z=bfvf-Cz{))x8JN1w^#^1@a>!flb;46li^(A}S~`%bm>o*61B(G5QSo;ZKVz0*i$k
zoYql1C4tMokpHO>nj@CJD(%rd=uI6cR4$2_T5*j=!D3<6--2f20OR
zpzu-0+I$koHJXPWitt?c0p<~q-Z_@(fsFM@7D=O%nDj^)qf!CU@kuUO;Y9(b(XrJp
zu;ii=U>Vha%zEdiMvdu_WVEbyAKTDL`&+7G(=(}(<6SHFGQbL633x+gx>F)8Z+-)8T_`M`c2kNu7Xt;kUWf-h%BbokHN5H}fx%-Xyk-a>?H
zH*hZ*32YHd$Ppbrd3Y#rl|z`;t@CR&^Winzi>DGx0?EQ|lV~kArxt~0^7ak@3luN0
zqK@q;|A4kOv;7OjALYGUEOf6>ZcR{|V6|1=pI~Da&$_Kq2s~*YOFZWaR*7{~Df*u4
HbJ+OR=|(Sh3MEvQIh;9X&i6ZWW`F(p{u96})RKrGYQu67LtG$pPh>=!bG3bvR~?o($S@Bp^-`
zNMqSX#>EP0?)XZ~=$w+6mq
zn``B(MSTh+o55t%k*}30E-jq=kr@GY*h_@ZE4cVfv{Cx(mG(JzRc1{-S$%-0ZhV9N
znLB|!+BDAs7QYx0h%?G7&Fi|XGMb0gudqKN{RK3hnG-MBjm1>u2b@di0Z$sn$^52wX1pk!
m^MiXlt#KW4{kzCEIY5qbtF(D+q5u!;Bo+xM5m045f`h-jQ=H!b
diff --git a/src/test/resources/input/featureTests/EmptyClassExample.class b/src/test/resources/input/featureTests/EmptyClassExample.class
deleted file mode 100644
index a6a129d83eb7b7fa699093038b18c5956b9ac7cc..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 208
zcmX^0Z`VEs1_mbvUM>bE24;2!79Ivx1~x_pfvm)`ME#t^ymWp4q^#8B5=I6#o6Nk-
z5<5l)W)00Sb_Nbc20_={f|5$-oW$Z{*NVj4f}B)F1{UZ16d=X#lbM(5SDKrYS`?C)
z1d`wi&Mz%WPIb!!al|lm>VYg|P-I{Sx&s6lfe`2tAjt{j$%6R|46It)85lQ$rMZA4
ONE)J)8%Q%T@BjcvAt~Pg
diff --git a/src/test/resources/input/featureTests/LoopExamples.class b/src/test/resources/input/featureTests/LoopExamples.class
deleted file mode 100644
index 2a398c6e58dba159bd89b9357647b2657cb08f32..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 1004
zcmaJ=L2nX46#fP%3+onI5GtY-D^;jkwBDrgP$IEOt0pwvpX~rul@+n
zUOekTlOFs5{uY0MY1FqsA_U?dW@h(&?|a|-=IxK)7vBNwVaG%SQ3EjxONcY9obhvB
zbGSUMy=tF{j%JAO+S1m~7^0QxaS{n64VV_Lz?y-#hJh9?q11qqat9+KTh(6sw$v@{
z3+~o4R5N8EjTMG9m-j_O$qv^iw(ij>&|K<(ax44Qar#IH<=XPJZX$!MfvXmB$TMUY
z@G}@*Sj~|k$vj2%I0J^1fdYedpp^IgEq6UfP|a9Fbp=EEz?S0Wz-LiRtaF^t5jMg$`f;bo+
JqK3yP`~|8~{Zs$|
diff --git a/src/test/resources/input/featureTests/MethodOverloading.class b/src/test/resources/input/featureTests/MethodOverloading.class
deleted file mode 100644
index 2357744da74e54140524878508a87dd6fe8f3e92..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 1083
zcmaJ=T~8B16g@+?-L@>>0wM)g1#M}i0)E%{Koeq89(PmmwPA0
zgZi0hD2Bvq$8*#hhFCUtY$C}p^G>K!**rKGzAJgt@lMh(5ldklmWc@qlbE_eRqF*x
zw247>iEzFeHgRO}(04plQ@-HslBSrkFpD|D@n(}Do~=}Jm08j`Z(#w842x~v5@qQ%
zxccCzQ(6UzdnzE#Y$X@bhT4gfR1xPA?wDA%kiiPW+=#vmW=E@VJxwx9kvrDH*0eC2
zydX)TCIT}UW!V%AQ&q!@A;qEmu79#CFa+Qz<
zArgdK8N!-KVI3QN>>-KK!U{iOe!N7g`UB~FJaK{PE8GGua9bA)U0J=NF?8ix=WN(#
q97$O8I3|#%#~Q-};v2(5WGPS5>JjzIg)xs^s-@}s37+8vmi_{y1Na&M
--
2.34.1
From 1cf1aaf8374f2363c860768808a1a68452e625b5 Mon Sep 17 00:00:00 2001
From: Lucas <89882946+notbad3500@users.noreply.github.com>
Date: Wed, 3 Jul 2024 14:08:27 +0200
Subject: [PATCH 22/96] Doku, AllFeaturesClassExample not running!!!
---
.lib/Kurzdokumentation.md | 58 +++++++++++++++++++
src/test/java/main/E2EReflectionsTest.java | 16 ++++-
src/test/java/main/InputFilesTest.java | 32 +++++-----
.../AllFeaturesClassExample.java | 10 +++-
4 files changed, 96 insertions(+), 20 deletions(-)
create mode 100644 .lib/Kurzdokumentation.md
diff --git a/.lib/Kurzdokumentation.md b/.lib/Kurzdokumentation.md
new file mode 100644
index 0000000..b298cf9
--- /dev/null
+++ b/.lib/Kurzdokumentation.md
@@ -0,0 +1,58 @@
+# Kurzdokumentation
+
+## Aufgabenverteilung
+
+### Maximilian Stahl und Jannik Rombach:
+- **Scanner**
+- **Parser**
+- **AST**
+- **AstBuilder**
+ - **Modul: ast**
+ - Alle
+ - **Modul: parser**
+ - Alle
+ - **Modul: visitor**
+ - Alle
+ - **Testmodul: parser**
+ - AstBuildertest.java
+ - Helper.java
+ - **Testfiles: singleFeatureTests**
+ - Alle
+
+### Johannes Ehlert:
+- **Semantische Analyse**
+ - **Modul: semantic**
+ - **Modul: typecheck**
+ - **Testmodul: parser**
+ - AstBuildertest.java
+ - **Testfiles: typedAstFeatureTests**
+ - Großteil
+ - **Testfiles: typedAstExceptionsTests**
+ - Großteil
+
+### David Große:
+- **Bytecodegenerator**
+ - **Modul: bytecode**
+ - Alle
+
+### Lucas Janker:
+- **Tests**
+ - **Modul: main**
+ - Alle
+ - **Testmodul: main**
+ - Alle
+ - **Testmodul: parser**
+ - ScannerTest.java
+ - ParserTest.java
+ - **Testmodul: semantic**
+ - **Testfiles: combinedFeatureTests**
+ - Alle
+ - **Testfiles: failureTests**
+ - Alle
+ - **Testfiles: Alle**
+ - Refactoring
+ - **Ordnerstrukturen**
+ - Großteil
+ - **Build**
+ - **Makefile**
+ - **Dokumentation**
\ No newline at end of file
diff --git a/src/test/java/main/E2EReflectionsTest.java b/src/test/java/main/E2EReflectionsTest.java
index 6d3e5b2..f461417 100644
--- a/src/test/java/main/E2EReflectionsTest.java
+++ b/src/test/java/main/E2EReflectionsTest.java
@@ -7,13 +7,25 @@ import java.util.Arrays;
import org.junit.jupiter.api.Test;
+import javax.tools.JavaCompiler;
+import javax.tools.ToolProvider;
+
import static org.junit.jupiter.api.Assertions.*;
public class E2EReflectionsTest {
@Test
public void AllFeaturesClassExampleTest(){
try {
- Class> clazz = Class.forName("resources.input.combinedFeatureTests.AllFeaturesClassExample");
+ Main.main(new String[]{"src/test/resources/input/combinedFeatureTests/AllFeaturesClassExample.java", "src/test/resources/output/raupenpiler"});
+ // Get the system Java compiler
+ JavaCompiler javac = ToolProvider.getSystemJavaCompiler();
+ // Assert that the compiler is available
+ assertNotNull(javac, "Java Compiler is not available");
+ javac.run(null, null, null, "src/test/resources/input/combinedFeatureTests/AllFeaturesClassExample.java");
+
+ Class> clazz = Class.forName("src.resources.input.combinedFeatureTests.AllFeaturesClassExample");
+ ClassLoader classLoader = getClass().getClassLoader();
+ // Class> clazz = classLoader.loadClass("main.AllFeaturesClassExample");
// Class Name
assertEquals("main.AllFeaturesClassExample", clazz.getName());
@@ -76,6 +88,8 @@ public class E2EReflectionsTest {
} catch (ClassNotFoundException | NoSuchFieldException | NoSuchMethodException e) {
e.printStackTrace();
+ } catch (Exception e) {
+ throw new RuntimeException(e);
}
}
}
\ No newline at end of file
diff --git a/src/test/java/main/InputFilesTest.java b/src/test/java/main/InputFilesTest.java
index f3b5c81..4529c9d 100644
--- a/src/test/java/main/InputFilesTest.java
+++ b/src/test/java/main/InputFilesTest.java
@@ -54,33 +54,33 @@ public class InputFilesTest {
* The test passes if all the files fail to compile.
*/
@Test
- public void areTestFilesActuallyFails() {
+ public void areTestFilesActuallyFails() throws IOException {
// Get the system Java compiler
JavaCompiler javac = ToolProvider.getSystemJavaCompiler();
// Assert that the compiler is available
assertNotNull(javac, "Java Compiler is not available");
- String directoryPath = "src/test/resources/input/failureTests";
- File folder = new File(directoryPath);
- if (folder.isDirectory()) {
- File[] files = folder.listFiles((dir, name) -> name.endsWith(".java"));
+ File folder1 = new File("src/test/resources/input/failureTests");
+ File folder2 = new File("src/test/resources/input/typedAstExceptionsTest");
- if (files != null) {
- for (File file : files) {
- // Try to compile the file and get the result
- // The run method returns 0 if the compilation was successful, and non-zero otherwise
- int result = javac.run(null, null, null, file.getPath());
+ List files = getJavaFilesFromDirectory(folder1);
+ files.addAll(getJavaFilesFromDirectory(folder2));
- // Assert that the compilation failed (i.e., the result is non-zero)
- assertTrue(result != 0, "Expected compilation failure for " + file.getName());
- }
- } else {
- System.out.println("No files found in the directory.");
+
+ if (!files.isEmpty()) {
+ for (File file : files) {
+ // Try to compile the file and get the result
+ // The run method returns 0 if the compilation was successful, and non-zero otherwise
+ int result = javac.run(null, null, null, file.getPath());
+
+ // Assert that the compilation failed (i.e., the result is non-zero)
+ assertTrue(result != 0, "Expected compilation failure for " + file.getName());
}
} else {
- System.out.println("The provided path is not a directory.");
+ System.out.println("No files found in the directory.");
}
+
}
/**
diff --git a/src/test/resources/input/combinedFeatureTests/AllFeaturesClassExample.java b/src/test/resources/input/combinedFeatureTests/AllFeaturesClassExample.java
index 8f5b3c6..ed7c73a 100644
--- a/src/test/resources/input/combinedFeatureTests/AllFeaturesClassExample.java
+++ b/src/test/resources/input/combinedFeatureTests/AllFeaturesClassExample.java
@@ -4,7 +4,7 @@ public class AllFeaturesClassExample {
char c;
// Konstruktor
- AllFeaturesClassExample(int a, boolean b, char c) {
+ public AllFeaturesClassExample(int a, boolean b, char c) {
this.a = a;
this.b = b;
this.c = c;
@@ -19,12 +19,12 @@ public class AllFeaturesClassExample {
// while Schleife
while (a > 0) {
- System.out.println("a ist " + a);
a--;
}
-
+ int c = 0;
// for Schleife
for (int i = 0; i < 5; i++) {
+ c++;
}
}
@@ -60,6 +60,10 @@ public class AllFeaturesClassExample {
return a % b;
}
+ boolean greaterThan(int a, int b) {
+ return a > b;
+ }
+
public static void main(String[] args) {
AllFeaturesClassExample obj = new AllFeaturesClassExample(12, true, 'a');
obj.controlStructures();
--
2.34.1
From 2ef50f93a9fdc62e815d03ab52c2fad42ada9e19 Mon Sep 17 00:00:00 2001
From: Lucas <89882946+notbad3500@users.noreply.github.com>
Date: Wed, 3 Jul 2024 15:21:58 +0200
Subject: [PATCH 23/96] added system properties
---
src/main/java/main/Main.java | 11 ++-
src/test/Makefile | 2 +-
src/test/java/semantic/SemanticTest.java | 110 +----------------------
3 files changed, 10 insertions(+), 113 deletions(-)
diff --git a/src/main/java/main/Main.java b/src/main/java/main/Main.java
index 8bd9e73..d5bb523 100644
--- a/src/main/java/main/Main.java
+++ b/src/main/java/main/Main.java
@@ -13,6 +13,7 @@ import org.antlr.v4.runtime.tree.ParseTree;
import java.io.IOException;
import java.nio.file.Paths;
+import java.util.Optional;
/**
@@ -20,9 +21,9 @@ import java.nio.file.Paths;
* cd .\src\test\
*
make clean compile-raupenpiler
*
Start Raupenpiler using jar:
- *
java.exe -jar path_to_jar\JavaCompiler-1.0-jar-with-dependencies.jar 'path_to_input_file.java' 'path_to_output_directory'
+ *
java.exe -DgenJar=true_OR_false -DgenClass=true_OR_false -jar path_to_jar\JavaCompiler-1.0-jar-with-dependencies.jar 'path_to_input_file.java' 'path_to_output_directory'
*
Example (jar needs to be in the target directory, compile with make or mvn package first):
- * java.exe -jar .\target\JavaCompiler-1.0-jar-with-dependencies.jar 'src/main/resources/input/CompilerInput.java' 'src/main/resources/output'
+ * java.exe -DgenJar=true -DgenClass=true -jar .\target\JavaCompiler-1.0-jar-with-dependencies.jar 'src/main/resources/input/CompilerInput.java' 'src/main/resources/output'
*/
public class Main {
public static void main(String[] args) throws Exception {
@@ -97,7 +98,11 @@ public class Main {
/*------------------------- Bytecode Generator -> Bytecode -------------------------*/
// Use the ByteCodeGenerator to generate bytecode from the typed AST and output it to the specified directory
- ByteCodeGenerator byteCodeGenerator = new ByteCodeGenerator(outputDirectoryPath, true, true);
+
+ final boolean genJar = Optional.ofNullable(System.getProperty("genJar")).map(String::toLowerCase).map(Boolean::parseBoolean).orElse(true);
+ final boolean genClass = Optional.ofNullable(System.getProperty("genClass")).map(String::toLowerCase).map(Boolean::parseBoolean).orElse(true);
+
+ ByteCodeGenerator byteCodeGenerator = new ByteCodeGenerator(outputDirectoryPath, genJar, genClass);
assert typedAst != null;
byteCodeGenerator.visit((ProgramNode) typedAst);
// Log the bytecode generation
diff --git a/src/test/Makefile b/src/test/Makefile
index 23be92f..a19508b 100644
--- a/src/test/Makefile
+++ b/src/test/Makefile
@@ -9,7 +9,7 @@ compile-javac:
compile-raupenpiler:
cd ../.. ; mvn -DskipTests install
- cd ../.. ; mvn exec:java -Dexec.mainClass="main.Main" -Dexec.args="'src/main/resources/input/CompilerInput.java' 'src/main/resources/output' "
+ cd ../.. ; mvn exec:java -DgenJar=true -DgenClass=true -Dexec.mainClass="main.Main" -Dexec.args="'src/main/resources/input/CompilerInput.java' 'src/main/resources/output'"
cp ../main/resources/output/CompilerInput.class .java/resources/output/raupenpiler
test: compile-javac compile-raupenpiler test-javac test-raupenpiler
diff --git a/src/test/java/semantic/SemanticTest.java b/src/test/java/semantic/SemanticTest.java
index 58d0210..f406580 100644
--- a/src/test/java/semantic/SemanticTest.java
+++ b/src/test/java/semantic/SemanticTest.java
@@ -2,112 +2,4 @@ package semantic;
public class SemanticTest {
-
- public void test(){
-
- }
-
- public void test(int a, boolean b){
-
- }
-
- public void test(boolean b, int a){
-
- }
-
-// @Test
-// public void alreadyDeclaredLocalFieldVar() {
-// ProgramNode programNode = new ProgramNode();
-// List classList = new ArrayList<>();
-// AccessTypeNode accessTypeNode = new AccessTypeNode(EnumAccessTypeNode.PUBLIC);
-// ClassNode classNode = new ClassNode(accessTypeNode, "testClass");
-//
-// SemanticAnalyzer semanticAnalyzer = new SemanticAnalyzer();
-// ASTNode tast = semanticAnalyzer.generateTast(ast);
-//
-// MemberNode memberNode2 = new FieldNode(accessTypeNode, new BaseTypeNode(EnumTypeNode.INT), "testVar");
-// classNode.members.add(memberNode2);
-//
-// classList.add(classNode);
-// programNode.classes = classList;
-//
-// ASTNode typedAst = SemanticAnalyzer.generateTast(programNode);
-//
-// assertEquals(1, SemanticAnalyzer.errors.size());
-// assertInstanceOf(AlreadyDeclaredException.class, SemanticAnalyzer.errors.getFirst());
-// assertNull(typedAst);
-// }
-//
-// @Test
-// public void shouldWorkWithNoError() {
-// ProgramNode programNode = new ProgramNode();
-// List classList = new ArrayList<>();
-// AccessTypeNode accessTypeNode = new AccessTypeNode(EnumAccessTypeNode.PUBLIC);
-// ClassNode classNode = new ClassNode(accessTypeNode, "testClass");
-//
-// SemanticAnalyzer semanticAnalyzer = new SemanticAnalyzer();
-// ASTNode tast = semanticAnalyzer.generateTast(ast);
-//
-// assertEquals(semanticAnalyzer.errors.size(), 0);
-// assertNotNull(tast);
-//
-// MemberNode memberNode3 = getMemberNode(accessTypeNode);
-// classNode.members.add(memberNode3);
-//
-// classList.add(classNode);
-// programNode.classes = classList;
-//
-// ASTNode typedAst = SemanticAnalyzer.generateTast(programNode);
-//
-// assertEquals(0, SemanticAnalyzer.errors.size());
-// assertEquals(programNode, typedAst);
-// }
-//
-// /**
-// * This method is used to create a MemberNode representing a method.
-// * It first creates a list of ParameterNodes and adds a ParameterNode to it.
-// * Then, it creates a ParameterListNode using the list of ParameterNodes.
-// * After that, it creates a list of StatementNodes and adds a StatementNode to it by calling the getStatementNode method.
-// * Finally, it creates a MethodNode using the provided AccessTypeNode, a BaseTypeNode representing the return type of the method,
-// * the method name, the ParameterListNode, and the list of StatementNodes, and returns this MethodNode.
-// *
-// * @param accessTypeNode The AccessTypeNode representing the access type of the method.
-// * @return The created MemberNode representing the method.
-// */
-//private static MemberNode getMemberNode(AccessTypeNode accessTypeNode) {
-// List parameterNodeList = new ArrayList<>();
-// ParameterNode parameterNode1 = new ParameterNode(new BaseTypeNode(EnumTypeNode.INT), "param1");
-// parameterNodeList.add(parameterNode1);
-// ParameterListNode parameterListNode = new ParameterListNode(parameterNodeList);
-//
-// List statementNodeList = new ArrayList<>();
-//
-// StatementNode statementNode1 = getStatementNode();
-// statementNodeList.add(statementNode1);
-//
-// return new MethodNode(accessTypeNode, new BaseTypeNode(EnumTypeNode.INT), "testVar2", parameterListNode, statementNodeList);
-//}
-//
-// /**
-// * This method is used to create a StatementNode for an assignment operation.
-// * It first creates two IdentifierExpressionNodes for 'this' and 'objectVar'.
-// * Then, it creates a BinaryExpressionNode to represent the operation 'this.objectVar'.
-// * After that, it creates a LiteralNode to represent the integer value 1.
-// * Finally, it creates another BinaryExpressionNode to represent the assignment operation 'this.objectVar = 1',
-// * and wraps this expression in an AssignmentStatementNode.
-// *
-// * @return The created AssignmentStatementNode representing the assignment operation 'this.objectVar = 1'.
-// */
-//private static StatementNode getStatementNode() {
-// ExpressionNode expressionNodeObjectVariableLeft = new IdentifierExpressionNode("this");
-// ExpressionNode expressionNodeObjectVariableRight = new IdentifierExpressionNode("objectVar");
-//
-// ExpressionNode expressionNodeLeft = new BinaryExpressionNode(expressionNodeObjectVariableLeft, expressionNodeObjectVariableRight, ExpresssionOperator.DOT);
-//
-// ExpressionNode expressionNodeRight = new LiteralNode(1);
-//
-// BinaryExpressionNode expressionNode = new BinaryExpressionNode(expressionNodeLeft, expressionNodeRight, ExpresssionOperator.ASSIGNMENT);
-//
-// return new AssignmentStatementNode(expressionNode);
-//}
-}
+}
\ No newline at end of file
--
2.34.1
From b7affd75ae9b3024492e7b240bd55574c8b6ddd9 Mon Sep 17 00:00:00 2001
From: Bruder John
Date: Wed, 3 Jul 2024 15:35:09 +0200
Subject: [PATCH 24/96] added chainedmethods
---
src/main/java/semantic/SemanticAnalyzer.java | 60 ++++++++++++++++---
src/main/java/semantic/context/Context.java | 4 ++
.../ClassNotDeclared.java | 12 ++++
.../typedAstFeaturesTests/ChainedMethods.java | 29 +++++++++
.../typedAstFeaturesTests/CorrectTest.java | 50 ++++++----------
5 files changed, 115 insertions(+), 40 deletions(-)
create mode 100644 src/test/resources/input/typedAstExceptionsTests/ClassNotDeclared.java
create mode 100644 src/test/resources/input/typedAstFeaturesTests/ChainedMethods.java
diff --git a/src/main/java/semantic/SemanticAnalyzer.java b/src/main/java/semantic/SemanticAnalyzer.java
index 6ebd124..bbe2aa1 100644
--- a/src/main/java/semantic/SemanticAnalyzer.java
+++ b/src/main/java/semantic/SemanticAnalyzer.java
@@ -21,6 +21,7 @@ import ast.statementexpressions.AssignableNode;
import ast.statementexpressions.NewDeclarationNode;
import ast.statementexpressions.crementexpressions.DecrementNode;
import ast.statementexpressions.crementexpressions.IncrementNode;
+import ast.statementexpressions.methodcallstatementnexpressions.ChainedMethodNode;
import ast.statementexpressions.methodcallstatementnexpressions.MethodCallNode;
import ast.statementexpressions.methodcallstatementnexpressions.TargetNode;
import ast.statements.*;
@@ -29,6 +30,7 @@ import ast.type.EnumAccessModifierNode;
import ast.type.ValueNode;
import ast.type.type.*;
import com.sun.jdi.IntegerType;
+import semantic.context.ClassContext;
import semantic.context.Context;
import semantic.exceptions.*;
import typechecker.TypeCheckResult;
@@ -163,6 +165,11 @@ public class SemanticAnalyzer implements SemanticVisitor {
@Override
public TypeCheckResult analyze(FieldNode toCheck) {
+ if (toCheck.type instanceof ReferenceType referenceType) {
+ if(!context.containsClass(referenceType.getIdentifier())){
+ errors.add(new NotDeclaredException(referenceType.getIdentifier() + " not declared"));
+ }
+ }
if (currentFields.get(toCheck.identifier) != null) {
errors.add(new AlreadyDeclaredException("Already declared " + toCheck.identifier));
return new TypeCheckResult(false, null);
@@ -170,6 +177,8 @@ public class SemanticAnalyzer implements SemanticVisitor {
currentFields.put(toCheck.identifier, toCheck.type);
}
return new TypeCheckResult(true, null);
+
+
}
@Override
@@ -224,7 +233,7 @@ public class SemanticAnalyzer implements SemanticVisitor {
}
for (IStatementNode statementNode : blockNode.statements) {
var result = statementNode.accept(this);
- if(!(statementNode instanceof IncrementNode) && !(statementNode instanceof DecrementNode)){
+ if (!(statementNode instanceof IncrementNode) && !(statementNode instanceof DecrementNode)) {
if (result.getType() != null) {
if (blockReturnType == null) {
blockReturnType = result.getType();
@@ -275,13 +284,6 @@ public class SemanticAnalyzer implements SemanticVisitor {
currentNullType = oldNullType;
var valid = true;
- // This check currently handles things like :
- /**
- * private int i;
- * void foo(int i){
- * i = i;
- * }
- */
if (assignable.equals(rExpression)) {
errors.add(new TypeMismatchException("Cannot assign to self"));
valid = false;
@@ -324,6 +326,15 @@ public class SemanticAnalyzer implements SemanticVisitor {
targetType = currentFields.get(toCheck.target.identifier);
}
if (targetType instanceof ReferenceType reference) {
+ if (!toCheck.chainedMethods.isEmpty()) {
+ for (ChainedMethodNode chainedMethod : toCheck.chainedMethods) {
+ var type = getTypeFromMethod(chainedMethod, reference);
+ if (type instanceof ReferenceType referenceType)
+ reference = referenceType;
+ else
+ errors.add(new TypeMismatchException("Ein Basetyp hat keine funktionen"));
+ }
+ }
var type = getTypeFromMethod(toCheck, reference);
if (type != null) {
return new TypeCheckResult(true, type);
@@ -620,4 +631,37 @@ public class SemanticAnalyzer implements SemanticVisitor {
return null;
}
+ private ITypeNode getTypeFromMethod(ChainedMethodNode toCheck, ReferenceType reference) {
+ var classContext = context.getClass(reference.getIdentifier());
+
+ var methods = classContext.getMethods();
+ for (var method : methods) {
+ if (toCheck.identifier.equals(method.getIdentifier())) {
+ if (method.getParameters().size() == toCheck.expressions.size() && !(method instanceof ConstructorNode)) {
+ boolean same = true;
+ for (int i = 0; i < method.getParameters().size(); i++) {
+ var result1 = method.getParameters().get(i).accept(this);
+ var result2 = toCheck.expressions.get(i).accept(this);
+ if (!Objects.equals(result1.getType(), result2.getType())) {
+ same = false;
+ }
+ }
+ if (same) {
+ if (method.accesModifier.accessType == EnumAccessModifierNode.PUBLIC) {
+ if (method.getType() == null) {
+ return new BaseType(TypeEnum.VOID);
+ }
+ return method.getType();
+ } else {
+ errors.add(new NotVisibleException("This Method is not Visible"));
+ }
+
+ }
+ }
+ }
+ }
+
+ return null;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/semantic/context/Context.java b/src/main/java/semantic/context/Context.java
index 39e279a..4b20c8f 100644
--- a/src/main/java/semantic/context/Context.java
+++ b/src/main/java/semantic/context/Context.java
@@ -21,6 +21,10 @@ public class Context {
return classes.get(identifier);
}
+ public HashMap getClasses() {
+ return classes;
+ }
+
public boolean containsClass(String identifier) {
return classes.containsKey(identifier);
}
diff --git a/src/test/resources/input/typedAstExceptionsTests/ClassNotDeclared.java b/src/test/resources/input/typedAstExceptionsTests/ClassNotDeclared.java
new file mode 100644
index 0000000..6e2b81e
--- /dev/null
+++ b/src/test/resources/input/typedAstExceptionsTests/ClassNotDeclared.java
@@ -0,0 +1,12 @@
+// @expected: NotDeclaredException
+public class Test {
+
+ public House1 h;
+
+
+}
+
+public class House {
+
+
+}
diff --git a/src/test/resources/input/typedAstFeaturesTests/ChainedMethods.java b/src/test/resources/input/typedAstFeaturesTests/ChainedMethods.java
new file mode 100644
index 0000000..7156569
--- /dev/null
+++ b/src/test/resources/input/typedAstFeaturesTests/ChainedMethods.java
@@ -0,0 +1,29 @@
+public class Test {
+
+ public House h;
+
+ public int test(House h){
+ return h.getW().getSize();
+ }
+
+
+}
+
+public class House {
+
+ private Window w;
+
+ public Window getW(){
+ return w;
+ }
+
+}
+
+public class Window{
+
+ private int size;
+
+ public int getSize() {
+ return size;
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/input/typedAstFeaturesTests/CorrectTest.java b/src/test/resources/input/typedAstFeaturesTests/CorrectTest.java
index 5ef0b26..09585f9 100644
--- a/src/test/resources/input/typedAstFeaturesTests/CorrectTest.java
+++ b/src/test/resources/input/typedAstFeaturesTests/CorrectTest.java
@@ -1,38 +1,24 @@
-public class AllFeaturesClassExample {
- int a;
- boolean b;
- char c;
+public class Test {
- public void controlStructures(int adf, boolean bool) {
- if (a > (10 + 8)) {
+ public Car c;
+
+ public int test(boolean b, int x) {
+ if (b == true) {
+ return c.getSpeed();
} else {
+ return x;
}
-
-
- while (a > adf) {
- a--;
- }
-
- for (int i = 0; i < 5; i++) {
- }
-
-
}
-// void logicalOperations() {
- // Logische UND-Operation
-// if (b && a > 5) {
-// System.out.println("a ist größer als 5 und b ist wahr");
-// }
-
- // Logische ODER-Operation
-// if (b || a < 5) {
-// System.out.println("b ist wahr oder a ist kleiner als 5");
-// }
-// }
-
-// public static void main(String[] args) {
-// AllFeaturesClassExample obj = new AllFeaturesClassExample(12, true, 'a');
-// obj.controlStructures();
-// }
}
+
+public class Car {
+
+ private int speed;
+
+ public int getSpeed() {
+ return speed;
+ }
+
+}
+
--
2.34.1
From ba73e1bd45d00657b3d14bd04e6a95a8f73f3a10 Mon Sep 17 00:00:00 2001
From: Bruder John
Date: Wed, 3 Jul 2024 15:35:39 +0200
Subject: [PATCH 25/96] Revert "added chainedmethods"
This reverts commit b7affd75ae9b3024492e7b240bd55574c8b6ddd9.
---
src/main/java/semantic/SemanticAnalyzer.java | 60 +++----------------
src/main/java/semantic/context/Context.java | 4 --
.../ClassNotDeclared.java | 12 ----
.../typedAstFeaturesTests/ChainedMethods.java | 29 ---------
.../typedAstFeaturesTests/CorrectTest.java | 50 ++++++++++------
5 files changed, 40 insertions(+), 115 deletions(-)
delete mode 100644 src/test/resources/input/typedAstExceptionsTests/ClassNotDeclared.java
delete mode 100644 src/test/resources/input/typedAstFeaturesTests/ChainedMethods.java
diff --git a/src/main/java/semantic/SemanticAnalyzer.java b/src/main/java/semantic/SemanticAnalyzer.java
index bbe2aa1..6ebd124 100644
--- a/src/main/java/semantic/SemanticAnalyzer.java
+++ b/src/main/java/semantic/SemanticAnalyzer.java
@@ -21,7 +21,6 @@ import ast.statementexpressions.AssignableNode;
import ast.statementexpressions.NewDeclarationNode;
import ast.statementexpressions.crementexpressions.DecrementNode;
import ast.statementexpressions.crementexpressions.IncrementNode;
-import ast.statementexpressions.methodcallstatementnexpressions.ChainedMethodNode;
import ast.statementexpressions.methodcallstatementnexpressions.MethodCallNode;
import ast.statementexpressions.methodcallstatementnexpressions.TargetNode;
import ast.statements.*;
@@ -30,7 +29,6 @@ import ast.type.EnumAccessModifierNode;
import ast.type.ValueNode;
import ast.type.type.*;
import com.sun.jdi.IntegerType;
-import semantic.context.ClassContext;
import semantic.context.Context;
import semantic.exceptions.*;
import typechecker.TypeCheckResult;
@@ -165,11 +163,6 @@ public class SemanticAnalyzer implements SemanticVisitor {
@Override
public TypeCheckResult analyze(FieldNode toCheck) {
- if (toCheck.type instanceof ReferenceType referenceType) {
- if(!context.containsClass(referenceType.getIdentifier())){
- errors.add(new NotDeclaredException(referenceType.getIdentifier() + " not declared"));
- }
- }
if (currentFields.get(toCheck.identifier) != null) {
errors.add(new AlreadyDeclaredException("Already declared " + toCheck.identifier));
return new TypeCheckResult(false, null);
@@ -177,8 +170,6 @@ public class SemanticAnalyzer implements SemanticVisitor {
currentFields.put(toCheck.identifier, toCheck.type);
}
return new TypeCheckResult(true, null);
-
-
}
@Override
@@ -233,7 +224,7 @@ public class SemanticAnalyzer implements SemanticVisitor {
}
for (IStatementNode statementNode : blockNode.statements) {
var result = statementNode.accept(this);
- if (!(statementNode instanceof IncrementNode) && !(statementNode instanceof DecrementNode)) {
+ if(!(statementNode instanceof IncrementNode) && !(statementNode instanceof DecrementNode)){
if (result.getType() != null) {
if (blockReturnType == null) {
blockReturnType = result.getType();
@@ -284,6 +275,13 @@ public class SemanticAnalyzer implements SemanticVisitor {
currentNullType = oldNullType;
var valid = true;
+ // This check currently handles things like :
+ /**
+ * private int i;
+ * void foo(int i){
+ * i = i;
+ * }
+ */
if (assignable.equals(rExpression)) {
errors.add(new TypeMismatchException("Cannot assign to self"));
valid = false;
@@ -326,15 +324,6 @@ public class SemanticAnalyzer implements SemanticVisitor {
targetType = currentFields.get(toCheck.target.identifier);
}
if (targetType instanceof ReferenceType reference) {
- if (!toCheck.chainedMethods.isEmpty()) {
- for (ChainedMethodNode chainedMethod : toCheck.chainedMethods) {
- var type = getTypeFromMethod(chainedMethod, reference);
- if (type instanceof ReferenceType referenceType)
- reference = referenceType;
- else
- errors.add(new TypeMismatchException("Ein Basetyp hat keine funktionen"));
- }
- }
var type = getTypeFromMethod(toCheck, reference);
if (type != null) {
return new TypeCheckResult(true, type);
@@ -631,37 +620,4 @@ public class SemanticAnalyzer implements SemanticVisitor {
return null;
}
- private ITypeNode getTypeFromMethod(ChainedMethodNode toCheck, ReferenceType reference) {
- var classContext = context.getClass(reference.getIdentifier());
-
- var methods = classContext.getMethods();
- for (var method : methods) {
- if (toCheck.identifier.equals(method.getIdentifier())) {
- if (method.getParameters().size() == toCheck.expressions.size() && !(method instanceof ConstructorNode)) {
- boolean same = true;
- for (int i = 0; i < method.getParameters().size(); i++) {
- var result1 = method.getParameters().get(i).accept(this);
- var result2 = toCheck.expressions.get(i).accept(this);
- if (!Objects.equals(result1.getType(), result2.getType())) {
- same = false;
- }
- }
- if (same) {
- if (method.accesModifier.accessType == EnumAccessModifierNode.PUBLIC) {
- if (method.getType() == null) {
- return new BaseType(TypeEnum.VOID);
- }
- return method.getType();
- } else {
- errors.add(new NotVisibleException("This Method is not Visible"));
- }
-
- }
- }
- }
- }
-
- return null;
- }
-
}
\ No newline at end of file
diff --git a/src/main/java/semantic/context/Context.java b/src/main/java/semantic/context/Context.java
index 4b20c8f..39e279a 100644
--- a/src/main/java/semantic/context/Context.java
+++ b/src/main/java/semantic/context/Context.java
@@ -21,10 +21,6 @@ public class Context {
return classes.get(identifier);
}
- public HashMap getClasses() {
- return classes;
- }
-
public boolean containsClass(String identifier) {
return classes.containsKey(identifier);
}
diff --git a/src/test/resources/input/typedAstExceptionsTests/ClassNotDeclared.java b/src/test/resources/input/typedAstExceptionsTests/ClassNotDeclared.java
deleted file mode 100644
index 6e2b81e..0000000
--- a/src/test/resources/input/typedAstExceptionsTests/ClassNotDeclared.java
+++ /dev/null
@@ -1,12 +0,0 @@
-// @expected: NotDeclaredException
-public class Test {
-
- public House1 h;
-
-
-}
-
-public class House {
-
-
-}
diff --git a/src/test/resources/input/typedAstFeaturesTests/ChainedMethods.java b/src/test/resources/input/typedAstFeaturesTests/ChainedMethods.java
deleted file mode 100644
index 7156569..0000000
--- a/src/test/resources/input/typedAstFeaturesTests/ChainedMethods.java
+++ /dev/null
@@ -1,29 +0,0 @@
-public class Test {
-
- public House h;
-
- public int test(House h){
- return h.getW().getSize();
- }
-
-
-}
-
-public class House {
-
- private Window w;
-
- public Window getW(){
- return w;
- }
-
-}
-
-public class Window{
-
- private int size;
-
- public int getSize() {
- return size;
- }
-}
\ No newline at end of file
diff --git a/src/test/resources/input/typedAstFeaturesTests/CorrectTest.java b/src/test/resources/input/typedAstFeaturesTests/CorrectTest.java
index 09585f9..5ef0b26 100644
--- a/src/test/resources/input/typedAstFeaturesTests/CorrectTest.java
+++ b/src/test/resources/input/typedAstFeaturesTests/CorrectTest.java
@@ -1,24 +1,38 @@
-public class Test {
+public class AllFeaturesClassExample {
+ int a;
+ boolean b;
+ char c;
- public Car c;
-
- public int test(boolean b, int x) {
- if (b == true) {
- return c.getSpeed();
+ public void controlStructures(int adf, boolean bool) {
+ if (a > (10 + 8)) {
} else {
- return x;
}
+
+
+ while (a > adf) {
+ a--;
+ }
+
+ for (int i = 0; i < 5; i++) {
+ }
+
+
}
+// void logicalOperations() {
+ // Logische UND-Operation
+// if (b && a > 5) {
+// System.out.println("a ist größer als 5 und b ist wahr");
+// }
+
+ // Logische ODER-Operation
+// if (b || a < 5) {
+// System.out.println("b ist wahr oder a ist kleiner als 5");
+// }
+// }
+
+// public static void main(String[] args) {
+// AllFeaturesClassExample obj = new AllFeaturesClassExample(12, true, 'a');
+// obj.controlStructures();
+// }
}
-
-public class Car {
-
- private int speed;
-
- public int getSpeed() {
- return speed;
- }
-
-}
-
--
2.34.1
From e6a2b0fe9dd77c0b39cd849dad0d4577c7c6520b Mon Sep 17 00:00:00 2001
From: Lucas <89882946+notbad3500@users.noreply.github.com>
Date: Wed, 3 Jul 2024 15:58:02 +0200
Subject: [PATCH 26/96] Semantic Tests work
---
src/test/java/main/MainTest.java | 9 +-
src/test/java/main/ReflectionsTest.java | 2 +-
src/test/java/parser/AstBuilderTest.java | 16 +-
src/test/java/semantic/SemanticTest.java | 438 +++++++++++++++++++++++
4 files changed, 442 insertions(+), 23 deletions(-)
diff --git a/src/test/java/main/MainTest.java b/src/test/java/main/MainTest.java
index 24389bc..54ab8be 100644
--- a/src/test/java/main/MainTest.java
+++ b/src/test/java/main/MainTest.java
@@ -12,16 +12,11 @@ import java.nio.file.Paths;
* run every test: mvn test
* Nutzen dieser Klasse: Eigentlich nicht vorhanden, in der Main gibts nichts zu testen
*/
+@Deprecated
public class MainTest {
@Test
void test() {
- CharStream codeCharStream = null;
- try {
- codeCharStream = CharStreams.fromPath(Paths.get("src/main/test/resources/CompilerInput.java"));
- Main.compileFile(codeCharStream, "src/main/test/resources/output");
- } catch (IOException e) {
- System.err.println("Error reading the file: " + e.getMessage());
- }
+ System.out.println("MainTest");
}
}
diff --git a/src/test/java/main/ReflectionsTest.java b/src/test/java/main/ReflectionsTest.java
index d47d95a..3b4cffd 100644
--- a/src/test/java/main/ReflectionsTest.java
+++ b/src/test/java/main/ReflectionsTest.java
@@ -11,7 +11,7 @@ import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
-
+@Deprecated
public class ReflectionsTest {
@Test
diff --git a/src/test/java/parser/AstBuilderTest.java b/src/test/java/parser/AstBuilderTest.java
index 2810e55..15403d3 100644
--- a/src/test/java/parser/AstBuilderTest.java
+++ b/src/test/java/parser/AstBuilderTest.java
@@ -9,34 +9,20 @@ import ast.expressions.unaryexpressions.MemberAccessNode;
import ast.expressions.unaryexpressions.UnaryNode;
import ast.members.ConstructorNode;
import ast.members.FieldNode;
-import ast.members.MemberNode;
import ast.members.MethodNode;
import ast.parameters.ParameterNode;
import ast.statementexpressions.AssignNode;
import ast.statementexpressions.AssignableNode;
import ast.statementexpressions.methodcallstatementnexpressions.MethodCallNode;
import ast.statements.BlockNode;
-import ast.statements.IStatementNode;
import ast.statements.ReturnNode;
import ast.type.AccessModifierNode;
import ast.type.EnumValueNode;
import ast.type.ValueNode;
import ast.type.type.BaseType;
-import ast.type.type.ITypeNode;
import ast.type.type.TypeEnum;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import org.antlr.v4.runtime.CharStream;
-import org.antlr.v4.runtime.CharStreams;
-import org.antlr.v4.runtime.CommonTokenStream;
-import org.antlr.v4.runtime.tree.ParseTree;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
-import parser.astBuilder.ASTBuilder;
-import parser.generated.SimpleJavaLexer;
-import parser.generated.SimpleJavaParser;
-
-import java.io.IOException;
-import java.lang.reflect.Member;
import static org.assertj.core.api.Assertions.assertThat;
@@ -343,7 +329,7 @@ class AstBuilderTest {
@Test
@DisplayName("Self Reference Test")
- public void selfReferneceTest() {
+ public void selfReferenceTest() {
//assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
}
diff --git a/src/test/java/semantic/SemanticTest.java b/src/test/java/semantic/SemanticTest.java
index f406580..db86fe9 100644
--- a/src/test/java/semantic/SemanticTest.java
+++ b/src/test/java/semantic/SemanticTest.java
@@ -1,5 +1,443 @@
package semantic;
+import ast.ASTNode;
+import ast.ClassNode;
+import ast.ProgramNode;
+import ast.expressions.IExpressionNode;
+import ast.expressions.unaryexpressions.MemberAccessNode;
+import ast.expressions.unaryexpressions.UnaryNode;
+import ast.members.ConstructorNode;
+import ast.members.FieldNode;
+import ast.members.MethodNode;
+import ast.parameters.ParameterNode;
+import ast.statementexpressions.AssignNode;
+import ast.statementexpressions.AssignableNode;
+import ast.statementexpressions.methodcallstatementnexpressions.MethodCallNode;
+import ast.statements.BlockNode;
+import ast.statements.ReturnNode;
+import ast.type.AccessModifierNode;
+import ast.type.EnumValueNode;
+import ast.type.ValueNode;
+import ast.type.type.BaseType;
+import ast.type.type.TypeEnum;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.DisplayName;
+import org.junit.jupiter.api.Test;
+import parser.Helper;
+
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
public class SemanticTest {
+ private final static String directoryPath = "src/test/resources/input/singleFeatureTests/";
+
+ @BeforeEach
+ public void setUp() {
+ SemanticAnalyzer.clearAnalyzer();
+ }
+
+ @Test
+ @DisplayName("Empty Class Test")
+ public void emptyClassTest() {
+ ClassNode emptyClass = Helper.generateEmptyClass("EmptyClass");
+ ProgramNode abstractSyntaxTree = new ProgramNode();
+ abstractSyntaxTree.addClass(emptyClass);
+
+ ASTNode typedAst = SemanticAnalyzer.generateTast(abstractSyntaxTree);
+ for (Exception runtimeException : SemanticAnalyzer.errors) {
+ runtimeException.printStackTrace();
+ }
+ assertTrue(SemanticAnalyzer.errors.isEmpty());
+ assertNotNull(typedAst);
+ }
+
+
+ @Test
+ @DisplayName("Multiple Empty Classes Test")
+ public void multipleEmptyClassesTest() {
+ ClassNode class1 = Helper.generateEmptyClass("MultipleClasses");
+ ClassNode class2 = Helper.generateEmptyClass("TestClass2");
+ ProgramNode abstractSyntaxTree = new ProgramNode();
+ abstractSyntaxTree.addClass(class1);
+ abstractSyntaxTree.addClass(class2);
+
+ ASTNode typedAst = SemanticAnalyzer.generateTast(abstractSyntaxTree);
+ for (Exception runtimeException : SemanticAnalyzer.errors) {
+ runtimeException.printStackTrace();
+ }
+ assertTrue(SemanticAnalyzer.errors.isEmpty());
+ assertNotNull(typedAst);
+ }
+
+
+ @Test
+ @DisplayName("Empty Class Test with Constructor")
+ public void emptyClassWithConstructorTest() {
+ ClassNode class1 = Helper.generateEmptyClass("EmptyClassWithConstructor");
+ ProgramNode abstractSyntaxTree = new ProgramNode();
+ abstractSyntaxTree.addClass(class1);
+
+ ASTNode typedAst = SemanticAnalyzer.generateTast(abstractSyntaxTree);
+ for (Exception runtimeException : SemanticAnalyzer.errors) {
+ runtimeException.printStackTrace();
+ }
+ assertTrue(SemanticAnalyzer.errors.isEmpty());
+ assertNotNull(typedAst);
+ }
+
+ @Test
+ @DisplayName("Field Test")
+ public void fieldTest() {
+ ClassNode class1 = Helper.generateEmptyClass("Field");
+ class1.addMember(new FieldNode(new AccessModifierNode("public"), new BaseType(TypeEnum.INT), "a"));
+
+ ProgramNode abstractSyntaxTree = new ProgramNode();
+ abstractSyntaxTree.addClass(class1);
+
+ ASTNode typedAst = SemanticAnalyzer.generateTast(abstractSyntaxTree);
+ for (Exception runtimeException : SemanticAnalyzer.errors) {
+ runtimeException.printStackTrace();
+ }
+ assertTrue(SemanticAnalyzer.errors.isEmpty());
+ assertNotNull(typedAst);
+ }
+
+ @Test
+ @DisplayName("Field Test with Accessmodifier")
+ public void fieldTestWithModifier() {
+ ClassNode class1 = Helper.generateEmptyClass("FieldWithAccessModifier");
+ class1.addMember(new FieldNode(new AccessModifierNode("public"), new BaseType(TypeEnum.INT), "a"));
+
+ ProgramNode abstractSyntaxTree = new ProgramNode();
+ abstractSyntaxTree.addClass(class1);
+
+ ASTNode typedAst = SemanticAnalyzer.generateTast(abstractSyntaxTree);
+ for (Exception runtimeException : SemanticAnalyzer.errors) {
+ runtimeException.printStackTrace();
+ }
+ assertTrue(SemanticAnalyzer.errors.isEmpty());
+ assertNotNull(typedAst);
+ }
+
+ @Test
+ @DisplayName("Comments Ignore Test")
+ public void commentsIgnoreTest() {
+ ClassNode class1 = Helper.generateEmptyClass("Comments");
+ class1.addMember(new FieldNode(new AccessModifierNode("private"), new BaseType(TypeEnum.INT), "a"));
+
+ ProgramNode abstractSyntaxTree = new ProgramNode();
+ abstractSyntaxTree.addClass(class1);
+
+ ASTNode typedAst = SemanticAnalyzer.generateTast(abstractSyntaxTree);
+ for (Exception runtimeException : SemanticAnalyzer.errors) {
+ runtimeException.printStackTrace();
+ }
+ assertTrue(SemanticAnalyzer.errors.isEmpty());
+ assertNotNull(typedAst);
+ }
+
+ @Test
+ @DisplayName("Constructor Parameter Test")
+ public void constructorParameterTest() {
+ BlockNode block = new BlockNode();
+ block.addStatement(new ReturnNode(null));
+ ConstructorNode constructor = new ConstructorNode("public", "ConstructorParameter", block);
+ constructor.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "a"));
+ constructor.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "b"));
+
+ ClassNode class1 = new ClassNode("public", "ConstructorParameter");
+ class1.addMember(constructor);
+
+ ProgramNode abstractSyntaxTree = new ProgramNode();
+ abstractSyntaxTree.addClass(class1);
+
+ ASTNode typedAst = SemanticAnalyzer.generateTast(abstractSyntaxTree);
+ for (Exception runtimeException : SemanticAnalyzer.errors) {
+ runtimeException.printStackTrace();
+ }
+ assertTrue(SemanticAnalyzer.errors.isEmpty());
+ assertNotNull(typedAst);
+ }
+
+ @Test
+ @DisplayName("This Dot Test")
+ public void thisDotTest() {
+ BlockNode block = new BlockNode();
+ MemberAccessNode memberAccess = new MemberAccessNode(true);
+ memberAccess.addIdentifier("a");
+
+ AssignableNode assignable = new AssignableNode(memberAccess);
+
+ ValueNode value = new ValueNode(EnumValueNode.INT_VALUE, "1");
+ IExpressionNode expression = new UnaryNode(value);
+
+ block.addStatement(new AssignNode(assignable, expression));
+ block.addStatement(new ReturnNode(null));
+ ConstructorNode constructor = new ConstructorNode("public", "ThisDot", block);
+
+ ClassNode class1 = new ClassNode("public", "ThisDot");
+ class1.addMember(new FieldNode(new AccessModifierNode("public"), new BaseType(TypeEnum.INT), "a"));
+ class1.addMember(constructor);
+
+ ProgramNode abstractSyntaxTree = new ProgramNode();
+ abstractSyntaxTree.addClass(class1);
+
+ ASTNode typedAst = SemanticAnalyzer.generateTast(abstractSyntaxTree);
+ for (Exception runtimeException : SemanticAnalyzer.errors) {
+ runtimeException.printStackTrace();
+ }
+ assertTrue(SemanticAnalyzer.errors.isEmpty());
+ assertNotNull(typedAst);
+ }
+
+ @Test
+ @DisplayName("Constructor This Dot Test")
+ public void constructorThisDotTest() {
+ BlockNode block = new BlockNode();
+ MemberAccessNode memberAccess = new MemberAccessNode(true);
+ memberAccess.addIdentifier("a");
+
+ AssignableNode assignable = new AssignableNode(memberAccess);
+
+ IExpressionNode expression = new UnaryNode("a");
+
+ block.addStatement(new AssignNode(assignable, expression));
+ block.addStatement(new ReturnNode(null));
+ ConstructorNode constructor = new ConstructorNode("public", "ConstructorThisDot", block);
+ constructor.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "a"));
+
+ ClassNode class1 = new ClassNode("public", "ConstructorThisDot");
+ class1.addMember(new FieldNode(new AccessModifierNode("private"), new BaseType(TypeEnum.INT), "a"));
+ class1.addMember(constructor);
+
+ ProgramNode abstractSyntaxTree = new ProgramNode();
+ abstractSyntaxTree.addClass(class1);
+
+ ASTNode typedAst = SemanticAnalyzer.generateTast(abstractSyntaxTree);
+ for (Exception runtimeException : SemanticAnalyzer.errors) {
+ runtimeException.printStackTrace();
+ }
+ assertTrue(SemanticAnalyzer.errors.isEmpty());
+ assertNotNull(typedAst);
+ }
+
+ @Test
+ @DisplayName("Void Methoden Test")
+ public void voidMethodenTest() {
+ ClassNode class1 = Helper.generateEmptyClass("VoidMethod");
+ BlockNode block = new BlockNode();
+ block.addStatement(new ReturnNode(null));
+ class1.addMember(new MethodNode("public", null, true, "test", block));
+
+ ProgramNode abstractSyntaxTree = new ProgramNode();
+ abstractSyntaxTree.addClass(class1);
+
+ ASTNode typedAst = SemanticAnalyzer.generateTast(abstractSyntaxTree);
+ for (Exception runtimeException : SemanticAnalyzer.errors) {
+ runtimeException.printStackTrace();
+ }
+ assertTrue(SemanticAnalyzer.errors.isEmpty());
+ assertNotNull(typedAst);
+ }
+
+ @Test
+ @DisplayName("Constructor Method call Test")
+ public void constructorMethodCallTest() {
+ BlockNode blockCon = new BlockNode();
+ MemberAccessNode memberAccess = new MemberAccessNode(true);
+ memberAccess.addIdentifier("a");
+
+ AssignableNode assignable = new AssignableNode(memberAccess);
+
+ IExpressionNode expression = new UnaryNode(new MethodCallNode(null, "testMethod"));
+
+ blockCon.addStatement(new AssignNode(assignable, expression));
+ blockCon.addStatement(new ReturnNode(null));
+ ConstructorNode constructor = new ConstructorNode("public", "ConstructorMethodCall", blockCon);
+
+ BlockNode blockMethod = new BlockNode();
+ blockMethod.addStatement(new ReturnNode(new UnaryNode(new ValueNode(EnumValueNode.INT_VALUE, "1"))));
+ MethodNode method = new MethodNode("public", new BaseType(TypeEnum.INT), false, "testMethod", blockMethod);
+
+ ClassNode class1 = new ClassNode("public", "ConstructorMethodCall");
+ class1.addMember(new FieldNode(new AccessModifierNode("public"), new BaseType(TypeEnum.INT), "a"));
+ class1.addMember(constructor);
+ class1.addMember(method);
+
+ ProgramNode abstractSyntaxTree = new ProgramNode();
+ abstractSyntaxTree.addClass(class1);
+
+ ASTNode typedAst = SemanticAnalyzer.generateTast(abstractSyntaxTree);
+ for (Exception runtimeException : SemanticAnalyzer.errors) {
+ runtimeException.printStackTrace();
+ }
+ assertTrue(SemanticAnalyzer.errors.isEmpty());
+ assertNotNull(typedAst);
+ }
+
+ @Test
+ @DisplayName("Constructor Method call Parameters Test")
+ public void constructorMethodCallParametersTest() {
+ BlockNode blockCon = new BlockNode();
+ MemberAccessNode memberAccess = new MemberAccessNode(true);
+ memberAccess.addIdentifier("a");
+
+ AssignableNode assignable = new AssignableNode(memberAccess);
+
+ MethodCallNode methodCall = new MethodCallNode(null, "testMethod");
+ methodCall.addExpression(new UnaryNode("a"));
+ IExpressionNode expression = new UnaryNode(methodCall);
+
+ blockCon.addStatement(new AssignNode(assignable, expression));
+ blockCon.addStatement(new ReturnNode(null));
+ ConstructorNode constructor = new ConstructorNode("public", "ConstructorMethodCallParameters", blockCon);
+ constructor.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "a"));
+
+ BlockNode blockMethod = new BlockNode();
+ blockMethod.addStatement(new ReturnNode(new UnaryNode("a")));
+ MethodNode method = new MethodNode("public", new BaseType(TypeEnum.INT), false, "testMethod", blockMethod);
+ method.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "a"));
+
+ ClassNode class1 = new ClassNode("public", "ConstructorMethodCallParameters");
+ class1.addMember(new FieldNode(new AccessModifierNode("public"), new BaseType(TypeEnum.INT), "a"));
+ class1.addMember(constructor);
+ class1.addMember(method);
+
+ ProgramNode abstractSyntaxTree = new ProgramNode();
+ abstractSyntaxTree.addClass(class1);
+
+ ASTNode typedAst = SemanticAnalyzer.generateTast(abstractSyntaxTree);
+ for (Exception runtimeException : SemanticAnalyzer.errors) {
+ runtimeException.printStackTrace();
+ }
+ assertTrue(SemanticAnalyzer.errors.isEmpty());
+ assertNotNull(typedAst);
+ }
+
+ @Test
+ @DisplayName("Char Test")
+ public void charTest() {
+ BlockNode blockCon = new BlockNode();
+ MemberAccessNode memberAccess = new MemberAccessNode(true);
+ memberAccess.addIdentifier("a");
+
+ AssignableNode assignable = new AssignableNode(memberAccess);
+
+ MethodCallNode methodCall = new MethodCallNode(null, "testMethod");
+ methodCall.addExpression(new UnaryNode("a"));
+ IExpressionNode expression = new UnaryNode(methodCall);
+
+ blockCon.addStatement(new AssignNode(assignable, expression));
+ blockCon.addStatement(new ReturnNode(null));
+ ConstructorNode constructor = new ConstructorNode("public", "Char", blockCon);
+ constructor.addParameter(new ParameterNode(new BaseType(TypeEnum.CHAR), "a"));
+
+ BlockNode blockMethod = new BlockNode();
+ blockMethod.addStatement(new ReturnNode(new UnaryNode("a")));
+ MethodNode method = new MethodNode("public", new BaseType(TypeEnum.CHAR), false, "testMethod", blockMethod);
+ method.addParameter(new ParameterNode(new BaseType(TypeEnum.CHAR), "a"));
+
+ ClassNode class1 = new ClassNode("public", "Char");
+ class1.addMember(new FieldNode(new AccessModifierNode("public"), new BaseType(TypeEnum.CHAR), "a"));
+ class1.addMember(constructor);
+ class1.addMember(method);
+
+ ProgramNode abstractSyntaxTree = new ProgramNode();
+ abstractSyntaxTree.addClass(class1);
+
+ ASTNode typedAst = SemanticAnalyzer.generateTast(abstractSyntaxTree);
+ for (Exception runtimeException : SemanticAnalyzer.errors) {
+ runtimeException.printStackTrace();
+ }
+ assertTrue(SemanticAnalyzer.errors.isEmpty());
+ assertNotNull(typedAst);
+ }
+
+ @Test
+ @DisplayName("Null Test")
+ public void nullTest() {
+ BlockNode blockCon = new BlockNode();
+ MemberAccessNode memberAccess = new MemberAccessNode(true);
+ memberAccess.addIdentifier("a");
+
+ AssignableNode assignable = new AssignableNode(memberAccess);
+
+ blockCon.addStatement(new AssignNode(assignable, new UnaryNode(new ValueNode(EnumValueNode.NULL_VALUE, "null"))));
+ blockCon.addStatement(new ReturnNode(null));
+ ConstructorNode constructor = new ConstructorNode("public", "Null", blockCon);
+
+ ClassNode class1 = new ClassNode("public", "Null");
+ class1.addMember(new FieldNode(new AccessModifierNode("public"), new BaseType(TypeEnum.INT), "a"));
+ class1.addMember(constructor);
+
+ ProgramNode abstractSyntaxTree = new ProgramNode();
+ abstractSyntaxTree.addClass(class1);
+
+ ASTNode typedAst = SemanticAnalyzer.generateTast(abstractSyntaxTree);
+ for (Exception runtimeException : SemanticAnalyzer.errors) {
+ runtimeException.printStackTrace();
+ }
+ assertTrue(SemanticAnalyzer.errors.isEmpty());
+ assertNotNull(typedAst);
+ }
+
+ @Test
+ @DisplayName("Self Reference Test")
+ public void selfReferenceTest() {
+
+ }
+
+ @Test
+ @DisplayName("Variable Compare Test")
+ public void variableCompareTest() {
+
+ }
+
+ @Test
+ @DisplayName("Variable Calculation Test")
+ public void variableCalculationTest() {
+
+ }
+
+ @Test
+ @DisplayName("Main Method Test")
+ public void mainMethodTest() {
+
+ }
+
+ @Test
+ @DisplayName("While Test")
+ public void whileTest() {
+
+ }
+
+ @Test
+ @DisplayName("Do While Test")
+ public void doWhileTest() {
+
+ }
+
+ @Test
+ @DisplayName("For Test")
+ public void forTest() {
+
+ }
+
+ @Test
+ @DisplayName("Increment Test")
+ public void incrementTest() {
+ ClassNode classNode = Helper.generateEmptyClass("Increment");
+ classNode.addMember(new FieldNode(new AccessModifierNode("public"), new BaseType(TypeEnum.INT), "a"));
+
+ ProgramNode abstractSyntaxTree = new ProgramNode();
+ abstractSyntaxTree.addClass(classNode);
+
+ ASTNode typedAst = SemanticAnalyzer.generateTast(abstractSyntaxTree);
+ for (Exception runtimeException : SemanticAnalyzer.errors) {
+ runtimeException.printStackTrace();
+ }
+ assertTrue(SemanticAnalyzer.errors.isEmpty());
+ assertNotNull(typedAst);
+ }
}
\ No newline at end of file
--
2.34.1
From 7ddea8f18df132b1cad24f9ca598e1ab2dae3acf Mon Sep 17 00:00:00 2001
From: Bruder John
Date: Wed, 3 Jul 2024 17:06:44 +0200
Subject: [PATCH 27/96] removed Correct test
---
.../typedAstFeaturesTests/CorrectTest.java | 24 -------------------
1 file changed, 24 deletions(-)
delete mode 100644 src/test/resources/input/typedAstFeaturesTests/CorrectTest.java
diff --git a/src/test/resources/input/typedAstFeaturesTests/CorrectTest.java b/src/test/resources/input/typedAstFeaturesTests/CorrectTest.java
deleted file mode 100644
index 09585f9..0000000
--- a/src/test/resources/input/typedAstFeaturesTests/CorrectTest.java
+++ /dev/null
@@ -1,24 +0,0 @@
-public class Test {
-
- public Car c;
-
- public int test(boolean b, int x) {
- if (b == true) {
- return c.getSpeed();
- } else {
- return x;
- }
- }
-
-}
-
-public class Car {
-
- private int speed;
-
- public int getSpeed() {
- return speed;
- }
-
-}
-
--
2.34.1
From 8afa3b8461b86d8b4acf6a82d4daf6862756aa03 Mon Sep 17 00:00:00 2001
From: Bruder John
Date: Wed, 3 Jul 2024 17:41:17 +0200
Subject: [PATCH 28/96] Added Own Tests
---
src/test/java/semantic/BeginnToTAST.java | 45 +++++++++++++++++++
.../input/johnsTests/FieldTests.java | 5 +++
2 files changed, 50 insertions(+)
create mode 100644 src/test/java/semantic/BeginnToTAST.java
create mode 100644 src/test/resources/input/johnsTests/FieldTests.java
diff --git a/src/test/java/semantic/BeginnToTAST.java b/src/test/java/semantic/BeginnToTAST.java
new file mode 100644
index 0000000..8b59666
--- /dev/null
+++ b/src/test/java/semantic/BeginnToTAST.java
@@ -0,0 +1,45 @@
+package semantic;
+
+import ast.ProgramNode;
+import org.antlr.v4.runtime.CharStream;
+import org.antlr.v4.runtime.CharStreams;
+import org.antlr.v4.runtime.CommonTokenStream;
+import org.antlr.v4.runtime.tree.ParseTree;
+import org.junit.jupiter.api.Test;
+import parser.astBuilder.ASTBuilder;
+import parser.generated.SimpleJavaLexer;
+import parser.generated.SimpleJavaParser;
+
+import java.io.IOException;
+import java.nio.file.Paths;
+
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+public class BeginnToTAST {
+
+ @Test
+ public void FieldTests() {
+ SemanticAnalyzer.clearAnalyzer();
+
+ CharStream codeCharStream = null;
+ try {
+ codeCharStream = CharStreams.fromPath(Paths.get("src/test/resources/input/johnsTests/FieldTests.java"));
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ SimpleJavaLexer lexer = new SimpleJavaLexer(codeCharStream);
+ CommonTokenStream tokenStream = new CommonTokenStream(lexer);
+
+ SimpleJavaParser parser = new SimpleJavaParser(tokenStream);
+ ParseTree parseTree = parser.program(); // parse the input
+
+ /* ------------------------- AST builder -> AST ------------------------- */
+ ASTBuilder astBuilder = new ASTBuilder();
+ ProgramNode abstractSyntaxTree = (ProgramNode) astBuilder.visit(parseTree);
+
+ var result = SemanticAnalyzer.generateTast(abstractSyntaxTree);
+
+ assertTrue(SemanticAnalyzer.errors.isEmpty());
+ }
+
+}
diff --git a/src/test/resources/input/johnsTests/FieldTests.java b/src/test/resources/input/johnsTests/FieldTests.java
new file mode 100644
index 0000000..5a8eea4
--- /dev/null
+++ b/src/test/resources/input/johnsTests/FieldTests.java
@@ -0,0 +1,5 @@
+public class Test{
+
+ int a = 10;
+
+}
\ No newline at end of file
--
2.34.1
From a4c1c502aba0292491626793ee249e08fa42ac51 Mon Sep 17 00:00:00 2001
From: Bruder John
Date: Wed, 3 Jul 2024 18:15:57 +0200
Subject: [PATCH 29/96] Revert "Merge branch 'NewParser' into johns-branch"
This reverts commit 84ecf316cd162c339a5a2fc9b095f5339b0dc559, reversing
changes made to 7ddea8f18df132b1cad24f9ca598e1ab2dae3acf.
---
src/main/java/semantic/SemanticAnalyzer.java | 58 ++-
src/main/java/semantic/context/Context.java | 4 +
src/test/java/main/MainTest.java | 9 +-
src/test/java/main/ReflectionsTest.java | 2 +-
src/test/java/parser/AstBuilderTest.java | 16 +-
src/test/java/semantic/SemanticTest.java | 438 ------------------
.../ClassNotDeclared.java | 12 +
7 files changed, 90 insertions(+), 449 deletions(-)
create mode 100644 src/test/resources/input/typedAstExceptionsTests/ClassNotDeclared.java
diff --git a/src/main/java/semantic/SemanticAnalyzer.java b/src/main/java/semantic/SemanticAnalyzer.java
index 6ebd124..9878989 100644
--- a/src/main/java/semantic/SemanticAnalyzer.java
+++ b/src/main/java/semantic/SemanticAnalyzer.java
@@ -21,6 +21,7 @@ import ast.statementexpressions.AssignableNode;
import ast.statementexpressions.NewDeclarationNode;
import ast.statementexpressions.crementexpressions.DecrementNode;
import ast.statementexpressions.crementexpressions.IncrementNode;
+import ast.statementexpressions.methodcallstatementnexpressions.ChainedMethodNode;
import ast.statementexpressions.methodcallstatementnexpressions.MethodCallNode;
import ast.statementexpressions.methodcallstatementnexpressions.TargetNode;
import ast.statements.*;
@@ -29,6 +30,7 @@ import ast.type.EnumAccessModifierNode;
import ast.type.ValueNode;
import ast.type.type.*;
import com.sun.jdi.IntegerType;
+import semantic.context.ClassContext;
import semantic.context.Context;
import semantic.exceptions.*;
import typechecker.TypeCheckResult;
@@ -163,6 +165,11 @@ public class SemanticAnalyzer implements SemanticVisitor {
@Override
public TypeCheckResult analyze(FieldNode toCheck) {
+ if (toCheck.type instanceof ReferenceType referenceType) {
+ if(!context.containsClass(referenceType.getIdentifier())){
+ errors.add(new NotDeclaredException(referenceType.getIdentifier() + " not declared"));
+ }
+ }
if (currentFields.get(toCheck.identifier) != null) {
errors.add(new AlreadyDeclaredException("Already declared " + toCheck.identifier));
return new TypeCheckResult(false, null);
@@ -170,6 +177,8 @@ public class SemanticAnalyzer implements SemanticVisitor {
currentFields.put(toCheck.identifier, toCheck.type);
}
return new TypeCheckResult(true, null);
+
+
}
@Override
@@ -275,13 +284,6 @@ public class SemanticAnalyzer implements SemanticVisitor {
currentNullType = oldNullType;
var valid = true;
- // This check currently handles things like :
- /**
- * private int i;
- * void foo(int i){
- * i = i;
- * }
- */
if (assignable.equals(rExpression)) {
errors.add(new TypeMismatchException("Cannot assign to self"));
valid = false;
@@ -324,6 +326,15 @@ public class SemanticAnalyzer implements SemanticVisitor {
targetType = currentFields.get(toCheck.target.identifier);
}
if (targetType instanceof ReferenceType reference) {
+ if (!toCheck.chainedMethods.isEmpty()) {
+ for (ChainedMethodNode chainedMethod : toCheck.chainedMethods) {
+ var type = getTypeFromMethod(chainedMethod, reference);
+ if (type instanceof ReferenceType referenceType)
+ reference = referenceType;
+ else
+ errors.add(new TypeMismatchException("Ein Basetyp hat keine funktionen"));
+ }
+ }
var type = getTypeFromMethod(toCheck, reference);
if (type != null) {
return new TypeCheckResult(true, type);
@@ -620,4 +631,37 @@ public class SemanticAnalyzer implements SemanticVisitor {
return null;
}
+ private ITypeNode getTypeFromMethod(ChainedMethodNode toCheck, ReferenceType reference) {
+ var classContext = context.getClass(reference.getIdentifier());
+
+ var methods = classContext.getMethods();
+ for (var method : methods) {
+ if (toCheck.identifier.equals(method.getIdentifier())) {
+ if (method.getParameters().size() == toCheck.expressions.size() && !(method instanceof ConstructorNode)) {
+ boolean same = true;
+ for (int i = 0; i < method.getParameters().size(); i++) {
+ var result1 = method.getParameters().get(i).accept(this);
+ var result2 = toCheck.expressions.get(i).accept(this);
+ if (!Objects.equals(result1.getType(), result2.getType())) {
+ same = false;
+ }
+ }
+ if (same) {
+ if (method.accesModifier.accessType == EnumAccessModifierNode.PUBLIC) {
+ if (method.getType() == null) {
+ return new BaseType(TypeEnum.VOID);
+ }
+ return method.getType();
+ } else {
+ errors.add(new NotVisibleException("This Method is not Visible"));
+ }
+
+ }
+ }
+ }
+ }
+
+ return null;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/semantic/context/Context.java b/src/main/java/semantic/context/Context.java
index 39e279a..4b20c8f 100644
--- a/src/main/java/semantic/context/Context.java
+++ b/src/main/java/semantic/context/Context.java
@@ -21,6 +21,10 @@ public class Context {
return classes.get(identifier);
}
+ public HashMap getClasses() {
+ return classes;
+ }
+
public boolean containsClass(String identifier) {
return classes.containsKey(identifier);
}
diff --git a/src/test/java/main/MainTest.java b/src/test/java/main/MainTest.java
index 54ab8be..24389bc 100644
--- a/src/test/java/main/MainTest.java
+++ b/src/test/java/main/MainTest.java
@@ -12,11 +12,16 @@ import java.nio.file.Paths;
* run every test: mvn test
* Nutzen dieser Klasse: Eigentlich nicht vorhanden, in der Main gibts nichts zu testen
*/
-@Deprecated
public class MainTest {
@Test
void test() {
- System.out.println("MainTest");
+ CharStream codeCharStream = null;
+ try {
+ codeCharStream = CharStreams.fromPath(Paths.get("src/main/test/resources/CompilerInput.java"));
+ Main.compileFile(codeCharStream, "src/main/test/resources/output");
+ } catch (IOException e) {
+ System.err.println("Error reading the file: " + e.getMessage());
+ }
}
}
diff --git a/src/test/java/main/ReflectionsTest.java b/src/test/java/main/ReflectionsTest.java
index 3b4cffd..d47d95a 100644
--- a/src/test/java/main/ReflectionsTest.java
+++ b/src/test/java/main/ReflectionsTest.java
@@ -11,7 +11,7 @@ import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
-@Deprecated
+
public class ReflectionsTest {
@Test
diff --git a/src/test/java/parser/AstBuilderTest.java b/src/test/java/parser/AstBuilderTest.java
index 15403d3..2810e55 100644
--- a/src/test/java/parser/AstBuilderTest.java
+++ b/src/test/java/parser/AstBuilderTest.java
@@ -9,20 +9,34 @@ import ast.expressions.unaryexpressions.MemberAccessNode;
import ast.expressions.unaryexpressions.UnaryNode;
import ast.members.ConstructorNode;
import ast.members.FieldNode;
+import ast.members.MemberNode;
import ast.members.MethodNode;
import ast.parameters.ParameterNode;
import ast.statementexpressions.AssignNode;
import ast.statementexpressions.AssignableNode;
import ast.statementexpressions.methodcallstatementnexpressions.MethodCallNode;
import ast.statements.BlockNode;
+import ast.statements.IStatementNode;
import ast.statements.ReturnNode;
import ast.type.AccessModifierNode;
import ast.type.EnumValueNode;
import ast.type.ValueNode;
import ast.type.type.BaseType;
+import ast.type.type.ITypeNode;
import ast.type.type.TypeEnum;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.antlr.v4.runtime.CharStream;
+import org.antlr.v4.runtime.CharStreams;
+import org.antlr.v4.runtime.CommonTokenStream;
+import org.antlr.v4.runtime.tree.ParseTree;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
+import parser.astBuilder.ASTBuilder;
+import parser.generated.SimpleJavaLexer;
+import parser.generated.SimpleJavaParser;
+
+import java.io.IOException;
+import java.lang.reflect.Member;
import static org.assertj.core.api.Assertions.assertThat;
@@ -329,7 +343,7 @@ class AstBuilderTest {
@Test
@DisplayName("Self Reference Test")
- public void selfReferenceTest() {
+ public void selfReferneceTest() {
//assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
}
diff --git a/src/test/java/semantic/SemanticTest.java b/src/test/java/semantic/SemanticTest.java
index db86fe9..f406580 100644
--- a/src/test/java/semantic/SemanticTest.java
+++ b/src/test/java/semantic/SemanticTest.java
@@ -1,443 +1,5 @@
package semantic;
-import ast.ASTNode;
-import ast.ClassNode;
-import ast.ProgramNode;
-import ast.expressions.IExpressionNode;
-import ast.expressions.unaryexpressions.MemberAccessNode;
-import ast.expressions.unaryexpressions.UnaryNode;
-import ast.members.ConstructorNode;
-import ast.members.FieldNode;
-import ast.members.MethodNode;
-import ast.parameters.ParameterNode;
-import ast.statementexpressions.AssignNode;
-import ast.statementexpressions.AssignableNode;
-import ast.statementexpressions.methodcallstatementnexpressions.MethodCallNode;
-import ast.statements.BlockNode;
-import ast.statements.ReturnNode;
-import ast.type.AccessModifierNode;
-import ast.type.EnumValueNode;
-import ast.type.ValueNode;
-import ast.type.type.BaseType;
-import ast.type.type.TypeEnum;
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.DisplayName;
-import org.junit.jupiter.api.Test;
-import parser.Helper;
-
-import static org.junit.jupiter.api.Assertions.assertNotNull;
-import static org.junit.jupiter.api.Assertions.assertTrue;
-
public class SemanticTest {
- private final static String directoryPath = "src/test/resources/input/singleFeatureTests/";
-
- @BeforeEach
- public void setUp() {
- SemanticAnalyzer.clearAnalyzer();
- }
-
- @Test
- @DisplayName("Empty Class Test")
- public void emptyClassTest() {
- ClassNode emptyClass = Helper.generateEmptyClass("EmptyClass");
- ProgramNode abstractSyntaxTree = new ProgramNode();
- abstractSyntaxTree.addClass(emptyClass);
-
- ASTNode typedAst = SemanticAnalyzer.generateTast(abstractSyntaxTree);
- for (Exception runtimeException : SemanticAnalyzer.errors) {
- runtimeException.printStackTrace();
- }
- assertTrue(SemanticAnalyzer.errors.isEmpty());
- assertNotNull(typedAst);
- }
-
-
- @Test
- @DisplayName("Multiple Empty Classes Test")
- public void multipleEmptyClassesTest() {
- ClassNode class1 = Helper.generateEmptyClass("MultipleClasses");
- ClassNode class2 = Helper.generateEmptyClass("TestClass2");
- ProgramNode abstractSyntaxTree = new ProgramNode();
- abstractSyntaxTree.addClass(class1);
- abstractSyntaxTree.addClass(class2);
-
- ASTNode typedAst = SemanticAnalyzer.generateTast(abstractSyntaxTree);
- for (Exception runtimeException : SemanticAnalyzer.errors) {
- runtimeException.printStackTrace();
- }
- assertTrue(SemanticAnalyzer.errors.isEmpty());
- assertNotNull(typedAst);
- }
-
-
- @Test
- @DisplayName("Empty Class Test with Constructor")
- public void emptyClassWithConstructorTest() {
- ClassNode class1 = Helper.generateEmptyClass("EmptyClassWithConstructor");
- ProgramNode abstractSyntaxTree = new ProgramNode();
- abstractSyntaxTree.addClass(class1);
-
- ASTNode typedAst = SemanticAnalyzer.generateTast(abstractSyntaxTree);
- for (Exception runtimeException : SemanticAnalyzer.errors) {
- runtimeException.printStackTrace();
- }
- assertTrue(SemanticAnalyzer.errors.isEmpty());
- assertNotNull(typedAst);
- }
-
- @Test
- @DisplayName("Field Test")
- public void fieldTest() {
- ClassNode class1 = Helper.generateEmptyClass("Field");
- class1.addMember(new FieldNode(new AccessModifierNode("public"), new BaseType(TypeEnum.INT), "a"));
-
- ProgramNode abstractSyntaxTree = new ProgramNode();
- abstractSyntaxTree.addClass(class1);
-
- ASTNode typedAst = SemanticAnalyzer.generateTast(abstractSyntaxTree);
- for (Exception runtimeException : SemanticAnalyzer.errors) {
- runtimeException.printStackTrace();
- }
- assertTrue(SemanticAnalyzer.errors.isEmpty());
- assertNotNull(typedAst);
- }
-
- @Test
- @DisplayName("Field Test with Accessmodifier")
- public void fieldTestWithModifier() {
- ClassNode class1 = Helper.generateEmptyClass("FieldWithAccessModifier");
- class1.addMember(new FieldNode(new AccessModifierNode("public"), new BaseType(TypeEnum.INT), "a"));
-
- ProgramNode abstractSyntaxTree = new ProgramNode();
- abstractSyntaxTree.addClass(class1);
-
- ASTNode typedAst = SemanticAnalyzer.generateTast(abstractSyntaxTree);
- for (Exception runtimeException : SemanticAnalyzer.errors) {
- runtimeException.printStackTrace();
- }
- assertTrue(SemanticAnalyzer.errors.isEmpty());
- assertNotNull(typedAst);
- }
-
- @Test
- @DisplayName("Comments Ignore Test")
- public void commentsIgnoreTest() {
- ClassNode class1 = Helper.generateEmptyClass("Comments");
- class1.addMember(new FieldNode(new AccessModifierNode("private"), new BaseType(TypeEnum.INT), "a"));
-
- ProgramNode abstractSyntaxTree = new ProgramNode();
- abstractSyntaxTree.addClass(class1);
-
- ASTNode typedAst = SemanticAnalyzer.generateTast(abstractSyntaxTree);
- for (Exception runtimeException : SemanticAnalyzer.errors) {
- runtimeException.printStackTrace();
- }
- assertTrue(SemanticAnalyzer.errors.isEmpty());
- assertNotNull(typedAst);
- }
-
- @Test
- @DisplayName("Constructor Parameter Test")
- public void constructorParameterTest() {
- BlockNode block = new BlockNode();
- block.addStatement(new ReturnNode(null));
- ConstructorNode constructor = new ConstructorNode("public", "ConstructorParameter", block);
- constructor.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "a"));
- constructor.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "b"));
-
- ClassNode class1 = new ClassNode("public", "ConstructorParameter");
- class1.addMember(constructor);
-
- ProgramNode abstractSyntaxTree = new ProgramNode();
- abstractSyntaxTree.addClass(class1);
-
- ASTNode typedAst = SemanticAnalyzer.generateTast(abstractSyntaxTree);
- for (Exception runtimeException : SemanticAnalyzer.errors) {
- runtimeException.printStackTrace();
- }
- assertTrue(SemanticAnalyzer.errors.isEmpty());
- assertNotNull(typedAst);
- }
-
- @Test
- @DisplayName("This Dot Test")
- public void thisDotTest() {
- BlockNode block = new BlockNode();
- MemberAccessNode memberAccess = new MemberAccessNode(true);
- memberAccess.addIdentifier("a");
-
- AssignableNode assignable = new AssignableNode(memberAccess);
-
- ValueNode value = new ValueNode(EnumValueNode.INT_VALUE, "1");
- IExpressionNode expression = new UnaryNode(value);
-
- block.addStatement(new AssignNode(assignable, expression));
- block.addStatement(new ReturnNode(null));
- ConstructorNode constructor = new ConstructorNode("public", "ThisDot", block);
-
- ClassNode class1 = new ClassNode("public", "ThisDot");
- class1.addMember(new FieldNode(new AccessModifierNode("public"), new BaseType(TypeEnum.INT), "a"));
- class1.addMember(constructor);
-
- ProgramNode abstractSyntaxTree = new ProgramNode();
- abstractSyntaxTree.addClass(class1);
-
- ASTNode typedAst = SemanticAnalyzer.generateTast(abstractSyntaxTree);
- for (Exception runtimeException : SemanticAnalyzer.errors) {
- runtimeException.printStackTrace();
- }
- assertTrue(SemanticAnalyzer.errors.isEmpty());
- assertNotNull(typedAst);
- }
-
- @Test
- @DisplayName("Constructor This Dot Test")
- public void constructorThisDotTest() {
- BlockNode block = new BlockNode();
- MemberAccessNode memberAccess = new MemberAccessNode(true);
- memberAccess.addIdentifier("a");
-
- AssignableNode assignable = new AssignableNode(memberAccess);
-
- IExpressionNode expression = new UnaryNode("a");
-
- block.addStatement(new AssignNode(assignable, expression));
- block.addStatement(new ReturnNode(null));
- ConstructorNode constructor = new ConstructorNode("public", "ConstructorThisDot", block);
- constructor.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "a"));
-
- ClassNode class1 = new ClassNode("public", "ConstructorThisDot");
- class1.addMember(new FieldNode(new AccessModifierNode("private"), new BaseType(TypeEnum.INT), "a"));
- class1.addMember(constructor);
-
- ProgramNode abstractSyntaxTree = new ProgramNode();
- abstractSyntaxTree.addClass(class1);
-
- ASTNode typedAst = SemanticAnalyzer.generateTast(abstractSyntaxTree);
- for (Exception runtimeException : SemanticAnalyzer.errors) {
- runtimeException.printStackTrace();
- }
- assertTrue(SemanticAnalyzer.errors.isEmpty());
- assertNotNull(typedAst);
- }
-
- @Test
- @DisplayName("Void Methoden Test")
- public void voidMethodenTest() {
- ClassNode class1 = Helper.generateEmptyClass("VoidMethod");
- BlockNode block = new BlockNode();
- block.addStatement(new ReturnNode(null));
- class1.addMember(new MethodNode("public", null, true, "test", block));
-
- ProgramNode abstractSyntaxTree = new ProgramNode();
- abstractSyntaxTree.addClass(class1);
-
- ASTNode typedAst = SemanticAnalyzer.generateTast(abstractSyntaxTree);
- for (Exception runtimeException : SemanticAnalyzer.errors) {
- runtimeException.printStackTrace();
- }
- assertTrue(SemanticAnalyzer.errors.isEmpty());
- assertNotNull(typedAst);
- }
-
- @Test
- @DisplayName("Constructor Method call Test")
- public void constructorMethodCallTest() {
- BlockNode blockCon = new BlockNode();
- MemberAccessNode memberAccess = new MemberAccessNode(true);
- memberAccess.addIdentifier("a");
-
- AssignableNode assignable = new AssignableNode(memberAccess);
-
- IExpressionNode expression = new UnaryNode(new MethodCallNode(null, "testMethod"));
-
- blockCon.addStatement(new AssignNode(assignable, expression));
- blockCon.addStatement(new ReturnNode(null));
- ConstructorNode constructor = new ConstructorNode("public", "ConstructorMethodCall", blockCon);
-
- BlockNode blockMethod = new BlockNode();
- blockMethod.addStatement(new ReturnNode(new UnaryNode(new ValueNode(EnumValueNode.INT_VALUE, "1"))));
- MethodNode method = new MethodNode("public", new BaseType(TypeEnum.INT), false, "testMethod", blockMethod);
-
- ClassNode class1 = new ClassNode("public", "ConstructorMethodCall");
- class1.addMember(new FieldNode(new AccessModifierNode("public"), new BaseType(TypeEnum.INT), "a"));
- class1.addMember(constructor);
- class1.addMember(method);
-
- ProgramNode abstractSyntaxTree = new ProgramNode();
- abstractSyntaxTree.addClass(class1);
-
- ASTNode typedAst = SemanticAnalyzer.generateTast(abstractSyntaxTree);
- for (Exception runtimeException : SemanticAnalyzer.errors) {
- runtimeException.printStackTrace();
- }
- assertTrue(SemanticAnalyzer.errors.isEmpty());
- assertNotNull(typedAst);
- }
-
- @Test
- @DisplayName("Constructor Method call Parameters Test")
- public void constructorMethodCallParametersTest() {
- BlockNode blockCon = new BlockNode();
- MemberAccessNode memberAccess = new MemberAccessNode(true);
- memberAccess.addIdentifier("a");
-
- AssignableNode assignable = new AssignableNode(memberAccess);
-
- MethodCallNode methodCall = new MethodCallNode(null, "testMethod");
- methodCall.addExpression(new UnaryNode("a"));
- IExpressionNode expression = new UnaryNode(methodCall);
-
- blockCon.addStatement(new AssignNode(assignable, expression));
- blockCon.addStatement(new ReturnNode(null));
- ConstructorNode constructor = new ConstructorNode("public", "ConstructorMethodCallParameters", blockCon);
- constructor.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "a"));
-
- BlockNode blockMethod = new BlockNode();
- blockMethod.addStatement(new ReturnNode(new UnaryNode("a")));
- MethodNode method = new MethodNode("public", new BaseType(TypeEnum.INT), false, "testMethod", blockMethod);
- method.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "a"));
-
- ClassNode class1 = new ClassNode("public", "ConstructorMethodCallParameters");
- class1.addMember(new FieldNode(new AccessModifierNode("public"), new BaseType(TypeEnum.INT), "a"));
- class1.addMember(constructor);
- class1.addMember(method);
-
- ProgramNode abstractSyntaxTree = new ProgramNode();
- abstractSyntaxTree.addClass(class1);
-
- ASTNode typedAst = SemanticAnalyzer.generateTast(abstractSyntaxTree);
- for (Exception runtimeException : SemanticAnalyzer.errors) {
- runtimeException.printStackTrace();
- }
- assertTrue(SemanticAnalyzer.errors.isEmpty());
- assertNotNull(typedAst);
- }
-
- @Test
- @DisplayName("Char Test")
- public void charTest() {
- BlockNode blockCon = new BlockNode();
- MemberAccessNode memberAccess = new MemberAccessNode(true);
- memberAccess.addIdentifier("a");
-
- AssignableNode assignable = new AssignableNode(memberAccess);
-
- MethodCallNode methodCall = new MethodCallNode(null, "testMethod");
- methodCall.addExpression(new UnaryNode("a"));
- IExpressionNode expression = new UnaryNode(methodCall);
-
- blockCon.addStatement(new AssignNode(assignable, expression));
- blockCon.addStatement(new ReturnNode(null));
- ConstructorNode constructor = new ConstructorNode("public", "Char", blockCon);
- constructor.addParameter(new ParameterNode(new BaseType(TypeEnum.CHAR), "a"));
-
- BlockNode blockMethod = new BlockNode();
- blockMethod.addStatement(new ReturnNode(new UnaryNode("a")));
- MethodNode method = new MethodNode("public", new BaseType(TypeEnum.CHAR), false, "testMethod", blockMethod);
- method.addParameter(new ParameterNode(new BaseType(TypeEnum.CHAR), "a"));
-
- ClassNode class1 = new ClassNode("public", "Char");
- class1.addMember(new FieldNode(new AccessModifierNode("public"), new BaseType(TypeEnum.CHAR), "a"));
- class1.addMember(constructor);
- class1.addMember(method);
-
- ProgramNode abstractSyntaxTree = new ProgramNode();
- abstractSyntaxTree.addClass(class1);
-
- ASTNode typedAst = SemanticAnalyzer.generateTast(abstractSyntaxTree);
- for (Exception runtimeException : SemanticAnalyzer.errors) {
- runtimeException.printStackTrace();
- }
- assertTrue(SemanticAnalyzer.errors.isEmpty());
- assertNotNull(typedAst);
- }
-
- @Test
- @DisplayName("Null Test")
- public void nullTest() {
- BlockNode blockCon = new BlockNode();
- MemberAccessNode memberAccess = new MemberAccessNode(true);
- memberAccess.addIdentifier("a");
-
- AssignableNode assignable = new AssignableNode(memberAccess);
-
- blockCon.addStatement(new AssignNode(assignable, new UnaryNode(new ValueNode(EnumValueNode.NULL_VALUE, "null"))));
- blockCon.addStatement(new ReturnNode(null));
- ConstructorNode constructor = new ConstructorNode("public", "Null", blockCon);
-
- ClassNode class1 = new ClassNode("public", "Null");
- class1.addMember(new FieldNode(new AccessModifierNode("public"), new BaseType(TypeEnum.INT), "a"));
- class1.addMember(constructor);
-
- ProgramNode abstractSyntaxTree = new ProgramNode();
- abstractSyntaxTree.addClass(class1);
-
- ASTNode typedAst = SemanticAnalyzer.generateTast(abstractSyntaxTree);
- for (Exception runtimeException : SemanticAnalyzer.errors) {
- runtimeException.printStackTrace();
- }
- assertTrue(SemanticAnalyzer.errors.isEmpty());
- assertNotNull(typedAst);
- }
-
- @Test
- @DisplayName("Self Reference Test")
- public void selfReferenceTest() {
-
- }
-
- @Test
- @DisplayName("Variable Compare Test")
- public void variableCompareTest() {
-
- }
-
- @Test
- @DisplayName("Variable Calculation Test")
- public void variableCalculationTest() {
-
- }
-
- @Test
- @DisplayName("Main Method Test")
- public void mainMethodTest() {
-
- }
-
- @Test
- @DisplayName("While Test")
- public void whileTest() {
-
- }
-
- @Test
- @DisplayName("Do While Test")
- public void doWhileTest() {
-
- }
-
- @Test
- @DisplayName("For Test")
- public void forTest() {
-
- }
-
- @Test
- @DisplayName("Increment Test")
- public void incrementTest() {
- ClassNode classNode = Helper.generateEmptyClass("Increment");
- classNode.addMember(new FieldNode(new AccessModifierNode("public"), new BaseType(TypeEnum.INT), "a"));
-
- ProgramNode abstractSyntaxTree = new ProgramNode();
- abstractSyntaxTree.addClass(classNode);
-
- ASTNode typedAst = SemanticAnalyzer.generateTast(abstractSyntaxTree);
- for (Exception runtimeException : SemanticAnalyzer.errors) {
- runtimeException.printStackTrace();
- }
- assertTrue(SemanticAnalyzer.errors.isEmpty());
- assertNotNull(typedAst);
- }
}
\ No newline at end of file
diff --git a/src/test/resources/input/typedAstExceptionsTests/ClassNotDeclared.java b/src/test/resources/input/typedAstExceptionsTests/ClassNotDeclared.java
new file mode 100644
index 0000000..6e2b81e
--- /dev/null
+++ b/src/test/resources/input/typedAstExceptionsTests/ClassNotDeclared.java
@@ -0,0 +1,12 @@
+// @expected: NotDeclaredException
+public class Test {
+
+ public House1 h;
+
+
+}
+
+public class House {
+
+
+}
--
2.34.1
From 3e0e6f8327fdfde6dd944af29083c7d46c33c4f3 Mon Sep 17 00:00:00 2001
From: Bruder John
Date: Wed, 3 Jul 2024 18:22:04 +0200
Subject: [PATCH 30/96] Commpiling Compiler in Intelij
---
src/main/resources/META-INF/MANIFEST.MF | 3 +++
.../AllFeaturesClassExample.class | Bin 0 -> 1093 bytes
.../combinedFeatureTests/BooleanOperations.class | Bin 0 -> 686 bytes
.../combinedFeatureTests/CharManipulation.class | Bin 0 -> 638 bytes
.../ConditionalStatements.class | Bin 0 -> 780 bytes
.../combinedFeatureTests/EmptyClassExample.class | Bin 0 -> 208 bytes
.../combinedFeatureTests/LoopExamples.class | Bin 0 -> 1004 bytes
.../combinedFeatureTests/MethodOverloading.class | Bin 0 -> 1083 bytes
.../input/singleFeatureTests/Char.class | Bin 0 -> 302 bytes
.../input/singleFeatureTests/Comments.class | Bin 0 -> 206 bytes
.../ConstructorMethodCall.class | Bin 0 -> 327 bytes
.../ConstructorMethodCallParameters.class | Bin 0 -> 356 bytes
.../ConstructorParameter.class | Bin 0 -> 226 bytes
.../singleFeatureTests/ConstructorThisDot.class | Bin 0 -> 256 bytes
.../input/singleFeatureTests/DoWhile.class | Bin 0 -> 250 bytes
.../input/singleFeatureTests/EmptyClass.class | Bin 0 -> 194 bytes
.../EmptyClassWithConstructor.class | Bin 0 -> 228 bytes
.../input/singleFeatureTests/Field.class | Bin 0 -> 200 bytes
.../FieldWithAccessModifier.class | Bin 0 -> 236 bytes
.../resources/input/singleFeatureTests/For.class | Bin 0 -> 240 bytes
.../input/singleFeatureTests/Increment.class | Bin 0 -> 350 bytes
.../input/singleFeatureTests/MainMethod.class | Bin 0 -> 264 bytes
.../singleFeatureTests/MultipleClasses.class | Bin 0 -> 204 bytes
.../input/singleFeatureTests/Null.class | Bin 0 -> 202 bytes
.../input/singleFeatureTests/SelfReference.class | Bin 0 -> 466 bytes
.../input/singleFeatureTests/TestClass2.class | Bin 0 -> 199 bytes
.../input/singleFeatureTests/ThisDot.class | Bin 0 -> 227 bytes
.../VariableCalculationTest.class | Bin 0 -> 730 bytes
.../singleFeatureTests/VariableCompareTest.class | Bin 0 -> 782 bytes
.../input/singleFeatureTests/VoidMethod.class | Bin 0 -> 240 bytes
.../input/singleFeatureTests/While.class | Bin 0 -> 249 bytes
.../CallMethodFromObjekt$Car.class | Bin 0 -> 448 bytes
.../CallMethodFromObjekt.class | Bin 0 -> 461 bytes
33 files changed, 3 insertions(+)
create mode 100644 src/main/resources/META-INF/MANIFEST.MF
create mode 100644 src/test/resources/input/combinedFeatureTests/AllFeaturesClassExample.class
create mode 100644 src/test/resources/input/combinedFeatureTests/BooleanOperations.class
create mode 100644 src/test/resources/input/combinedFeatureTests/CharManipulation.class
create mode 100644 src/test/resources/input/combinedFeatureTests/ConditionalStatements.class
create mode 100644 src/test/resources/input/combinedFeatureTests/EmptyClassExample.class
create mode 100644 src/test/resources/input/combinedFeatureTests/LoopExamples.class
create mode 100644 src/test/resources/input/combinedFeatureTests/MethodOverloading.class
create mode 100644 src/test/resources/input/singleFeatureTests/Char.class
create mode 100644 src/test/resources/input/singleFeatureTests/Comments.class
create mode 100644 src/test/resources/input/singleFeatureTests/ConstructorMethodCall.class
create mode 100644 src/test/resources/input/singleFeatureTests/ConstructorMethodCallParameters.class
create mode 100644 src/test/resources/input/singleFeatureTests/ConstructorParameter.class
create mode 100644 src/test/resources/input/singleFeatureTests/ConstructorThisDot.class
create mode 100644 src/test/resources/input/singleFeatureTests/DoWhile.class
create mode 100644 src/test/resources/input/singleFeatureTests/EmptyClass.class
create mode 100644 src/test/resources/input/singleFeatureTests/EmptyClassWithConstructor.class
create mode 100644 src/test/resources/input/singleFeatureTests/Field.class
create mode 100644 src/test/resources/input/singleFeatureTests/FieldWithAccessModifier.class
create mode 100644 src/test/resources/input/singleFeatureTests/For.class
create mode 100644 src/test/resources/input/singleFeatureTests/Increment.class
create mode 100644 src/test/resources/input/singleFeatureTests/MainMethod.class
create mode 100644 src/test/resources/input/singleFeatureTests/MultipleClasses.class
create mode 100644 src/test/resources/input/singleFeatureTests/Null.class
create mode 100644 src/test/resources/input/singleFeatureTests/SelfReference.class
create mode 100644 src/test/resources/input/singleFeatureTests/TestClass2.class
create mode 100644 src/test/resources/input/singleFeatureTests/ThisDot.class
create mode 100644 src/test/resources/input/singleFeatureTests/VariableCalculationTest.class
create mode 100644 src/test/resources/input/singleFeatureTests/VariableCompareTest.class
create mode 100644 src/test/resources/input/singleFeatureTests/VoidMethod.class
create mode 100644 src/test/resources/input/singleFeatureTests/While.class
create mode 100644 src/test/resources/input/typedAstFeatureTests/CallMethodFromObjekt$Car.class
create mode 100644 src/test/resources/input/typedAstFeatureTests/CallMethodFromObjekt.class
diff --git a/src/main/resources/META-INF/MANIFEST.MF b/src/main/resources/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..6948c82
--- /dev/null
+++ b/src/main/resources/META-INF/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Main-Class: main.Main
+
diff --git a/src/test/resources/input/combinedFeatureTests/AllFeaturesClassExample.class b/src/test/resources/input/combinedFeatureTests/AllFeaturesClassExample.class
new file mode 100644
index 0000000000000000000000000000000000000000..b59adc2b7e01f158236a1ad77e723a9172711fe4
GIT binary patch
literal 1093
zcmZ`%O-~b16g{sq(64DJUj=Cq0fn|8uyA3t8nl9Gg0jGnfE!=iNg14Wn(372o
zmTd|MNh>RO(!dZ>j4HH!l^HQGiZMo2S}Dd%TFFmPD_7nx<#$!;nt>@*(Qwsidah&d
zcy6ca3#qSJ1JnLj+o@YsX>YeoS9+GyYzycmr^X6~wydW4ywj+d?h9E_H6?aDS$+LX
zwt`rbwVJ>{u3XNS1tRTE#dD=m^MJ|mopokCN8J|I=tqt|PsKD+#>6}1Q1$O(*NA&x`h?DCgV3Hd5>WCv@FVw`81
zOPXYU3Jb^}Pru5FZxCTXkB_Cp(IIWF&EHgNvm4ZGuc-k>AOQwqQEk3z8|vIi(Dh}W2`d9G7V~vthF-^jG`=
zUwl!t1qDCAk5bR1!6M4A_s+d@?>XmQ_Q%h!-vR8R6Tm}3!VghINuYMDPE|KiHty~Z
zj`c7XC_OUPrS&$@Pd7>6DDk-b{r_yDu|i^M0ObHQI4-DuN
z=bfvf-Cz{))x8JN1w^#^1@a>!flb;46li^(A}S~`%bm>o*61B(G5QSo;ZKVz0*i$k
zoYql1C4tMokpHO>nj@CJD(%rd=uI6cR4$2_T5*j=!D3<6--2f20OR
zpzu-0+I$koHJXPWitt?c0p<~q-Z_@(fsFM@7D=O%nDj^)qf!CU@kuUO;Y9(b(XrJp
zu;ii=U>Vha%zEdiMvdu_WVEbyAKTDL`&+7G(=(}(<6SHFGQbL633x+gx>F)8Z+-)8T_`M`c2kNu7Xt;kUWf-h%BbokHN5H}fx%-Xyk-a>?H
zH*hZ*32YHd$Ppbrd3Y#rl|z`;t@CR&^Winzi>DGx0?EQ|lV~kArxt~0^7ak@3luN0
zqK@q;|A4kOv;7OjALYGUEOf6>ZcR{|V6|1=pI~Da&$_Kq2s~*YOFZWaR*7{~Df*u4
HbJ+OR=|(Sh3MEvQIh;9X&i6ZWW`F(p{u96})RKrGYQu67LtG$pPh>=!bG3bvR~?o($S@Bp^-`
zNMqSX#>EP0?)XZ~=$w+6mq
zn``B(MSTh+o55t%k*}30E-jq=kr@GY*h_@ZE4cVfv{Cx(mG(JzRc1{-S$%-0ZhV9N
znLB|!+BDAs7QYx0h%?G7&Fi|XGMb0gudqKN{RK3hnG-MBjm1>u2b@di0Z$sn$^52wX1pk!
m^MiXlt#KW4{kzCEIY5qbtF(D+q5u!;Bo+xM5m045f`h-jQ=H!b
literal 0
HcmV?d00001
diff --git a/src/test/resources/input/combinedFeatureTests/EmptyClassExample.class b/src/test/resources/input/combinedFeatureTests/EmptyClassExample.class
new file mode 100644
index 0000000000000000000000000000000000000000..a6a129d83eb7b7fa699093038b18c5956b9ac7cc
GIT binary patch
literal 208
zcmX^0Z`VEs1_mbvUM>bE24;2!79Ivx1~x_pfvm)`ME#t^ymWp4q^#8B5=I6#o6Nk-
z5<5l)W)00Sb_Nbc20_={f|5$-oW$Z{*NVj4f}B)F1{UZ16d=X#lbM(5SDKrYS`?C)
z1d`wi&Mz%WPIb!!al|lm>VYg|P-I{Sx&s6lfe`2tAjt{j$%6R|46It)85lQ$rMZA4
ONE)J)8%Q%T@BjcvAt~Pg
literal 0
HcmV?d00001
diff --git a/src/test/resources/input/combinedFeatureTests/LoopExamples.class b/src/test/resources/input/combinedFeatureTests/LoopExamples.class
new file mode 100644
index 0000000000000000000000000000000000000000..2a398c6e58dba159bd89b9357647b2657cb08f32
GIT binary patch
literal 1004
zcmaJ=L2nX46#fP%3+onI5GtY-D^;jkwBDrgP$IEOt0pwvpX~rul@+n
zUOekTlOFs5{uY0MY1FqsA_U?dW@h(&?|a|-=IxK)7vBNwVaG%SQ3EjxONcY9obhvB
zbGSUMy=tF{j%JAO+S1m~7^0QxaS{n64VV_Lz?y-#hJh9?q11qqat9+KTh(6sw$v@{
z3+~o4R5N8EjTMG9m-j_O$qv^iw(ij>&|K<(ax44Qar#IH<=XPJZX$!MfvXmB$TMUY
z@G}@*Sj~|k$vj2%I0J^1fdYedpp^IgEq6UfP|a9Fbp=EEz?S0Wz-LiRtaF^t5jMg$`f;bo+
JqK3yP`~|8~{Zs$|
literal 0
HcmV?d00001
diff --git a/src/test/resources/input/combinedFeatureTests/MethodOverloading.class b/src/test/resources/input/combinedFeatureTests/MethodOverloading.class
new file mode 100644
index 0000000000000000000000000000000000000000..2357744da74e54140524878508a87dd6fe8f3e92
GIT binary patch
literal 1083
zcmaJ=T~8B16g@+?-L@>>0wM)g1#M}i0)E%{Koeq89(PmmwPA0
zgZi0hD2Bvq$8*#hhFCUtY$C}p^G>K!**rKGzAJgt@lMh(5ldklmWc@qlbE_eRqF*x
zw247>iEzFeHgRO}(04plQ@-HslBSrkFpD|D@n(}Do~=}Jm08j`Z(#w842x~v5@qQ%
zxccCzQ(6UzdnzE#Y$X@bhT4gfR1xPA?wDA%kiiPW+=#vmW=E@VJxwx9kvrDH*0eC2
zydX)TCIT}UW!V%AQ&q!@A;qEmu79#CFa+Qz<
zArgdK8N!-KVI3QN>>-KK!U{iOe!N7g`UB~FJaK{PE8GGua9bA)U0J=NF?8ix=WN(#
q97$O8I3|#%#~Q-};v2(5WGPS5>JjzIg)xs^s-@}s37+8vmi_{y1Na&M
literal 0
HcmV?d00001
diff --git a/src/test/resources/input/singleFeatureTests/Char.class b/src/test/resources/input/singleFeatureTests/Char.class
new file mode 100644
index 0000000000000000000000000000000000000000..8e9c65e698b9692fda17bc8083d5cfb7c515b6c3
GIT binary patch
literal 302
zcmXX=yHdhH6g@WyiCIHHd=%1HLJIf+$HL4|p%yyy8`zOBn9Rh*ucEOKXDs{xKg#he
zSln|T=P~!^_v;(LEiM#1_z{8xErf#ZO26sxT365Ghhk;sRuEp7RcUVo{$My$I6@pj
zB{)VR2=b+F1j?FMduQyjUhp=^hj~n0nxKQOKr|~q5Hshg7e>&TmX*2RycDK+(#4t=
z^;mD3xtWx1iCyx@eS<4zdHhyb3?zD-TR0*1xQ*cN`84~4WLbZQ=mYKdz2lUak_Ytx
dLbMTa=I{UBOLmv-^|wTU(}(PUBAz)0=YLd8Dh&Vt
literal 0
HcmV?d00001
diff --git a/src/test/resources/input/singleFeatureTests/Comments.class b/src/test/resources/input/singleFeatureTests/Comments.class
new file mode 100644
index 0000000000000000000000000000000000000000..8d74444c8006241940352d7c5197335aab576a17
GIT binary patch
literal 206
zcmXv|I|{;35S-25m>4f0SgM7&fLIt11kpmVe~AxyAs>i|_p%Z!Jb;H1HxY}S*_mOP
zeSe-W04oG8H0U-A4<;)+`#6G!Jh_MH^+tB{OPM_6?nV8Ml
R19b0VkFkw^=rd~=d;y@sBZvS1
literal 0
HcmV?d00001
diff --git a/src/test/resources/input/singleFeatureTests/ConstructorMethodCall.class b/src/test/resources/input/singleFeatureTests/ConstructorMethodCall.class
new file mode 100644
index 0000000000000000000000000000000000000000..009c42373cb5456168563ddc4036ca8f43968486
GIT binary patch
literal 327
zcmZusyH3ME5S+E0m>ib}k2LA%z!KyKPzo#|MdDF_=+Djx92r}3&U_UO1t3xI0elo<
z&QMb9+|J(4+|Aeb$0vX@OcerzF(Qo~`hv;YJehfEs{8qMwzjzw^iPYba0@|rcyy<*
zg+UCZu?;PlrggP(O`E&AxwP(~UZtii1$
m=>)sP5kg`Q5d|7CdxrXx&Ukv;AbKVW{JysZ6mierVE+exEH=pi
literal 0
HcmV?d00001
diff --git a/src/test/resources/input/singleFeatureTests/ConstructorMethodCallParameters.class b/src/test/resources/input/singleFeatureTests/ConstructorMethodCallParameters.class
new file mode 100644
index 0000000000000000000000000000000000000000..6c01775e5811edc75a952be0e4de8cb02bcaae7f
GIT binary patch
literal 356
zcmah^yH3ME5S+Cgn;ec4o&_nOph#RKKY%E(gk*`A1WJE)PTAu4YK(4kQ|nu0Ug~)w%kn{Lxl~5!h9Hb;%vK_Jqja2h`9u_=j{$)s
zN4gbeOi4Xgg#JxYsk?TWDg7j~k~`wDZgsA%3tOE3V>+=v;EZh?{*gG?i_zh{gFVK5
zt|o9ddK9lfaXkD)@PXd@X5)Y{VjVp1!AB1P=lt>C?g_KK?F`=-33lFR1_a}wRdDnR
D!^=R8
literal 0
HcmV?d00001
diff --git a/src/test/resources/input/singleFeatureTests/ConstructorParameter.class b/src/test/resources/input/singleFeatureTests/ConstructorParameter.class
new file mode 100644
index 0000000000000000000000000000000000000000..eabb195ade30d8262acbc7736868b9210682e4a3
GIT binary patch
literal 226
zcmZusI|{-;5Pf5^Mq~UGHg?(>3%!6?CqFP1Pc$~p~OjQ=P~o<
z&A@y<-`5+!94#LeI3C;p0#!oiBJXmN$n-qfMi&)ZLUpQBZD#~$7#=;;2;D`N-mJ-E
zo0*+7@~W&d1TkE#!Xv?5WG6*vuXU<6`887JAftpU{yxi1td_bEy?;Z-#d`GN@l}Np
eL!i#lXEk7Un8oM`dX()3$KnOBy9`25=FJ~72QDiB
literal 0
HcmV?d00001
diff --git a/src/test/resources/input/singleFeatureTests/ConstructorThisDot.class b/src/test/resources/input/singleFeatureTests/ConstructorThisDot.class
new file mode 100644
index 0000000000000000000000000000000000000000..1a1c4c38599720fe9b6c9abdea71dad319ee7e12
GIT binary patch
literal 256
zcmZWj%MQU%5IxgYt5wg9g^eX$@B?CjNSX)>Vt-pVT%k9q)_+-u#KH&oC^5CQm@{+E
zyw3acd;yrC<-vgI!17UoO=uj&RSZue*$-FIQN|g;9;rlSV}jZ1Z(Wq(I`Di{;1gO?
zom{dsk29Ta4(c+~yg-5@Bv`$$zvVR5J4vW7R3ex8Ig;r{L?>3fwa(L6&Q(F$|Ca`Z
y7j*ff!Cr}xfBq_BvsG4V%mUVnz85?|LFW$V_M53Q)?hN0V8Mn9hc_C`4K%-pd@f=D
literal 0
HcmV?d00001
diff --git a/src/test/resources/input/singleFeatureTests/DoWhile.class b/src/test/resources/input/singleFeatureTests/DoWhile.class
new file mode 100644
index 0000000000000000000000000000000000000000..d7f8c194c4d92b228c0fd34d35d1e3abd3d67c37
GIT binary patch
literal 250
zcmXYrJ#NB45QX2^#tV)OuF}v@28wV2l!8Pw{1uL%UOOu=0UIHc6L1lZkP0b94v-^J
z1fCH)(i^>R=k3nl|IaUgKI$GU*b0u13S2?B(qFo}*4d&vjaMcq1a2?Q(&9y6KecBH
zRe^fT=gV|$1kP*z!PXe1nVIZ2vDv-rxV#9WLMNYNy}f%c%J;j(3~nj^o_{VsLko&K
zlt)bE24;2!79Ivx1~x_pfvm)`ME#t^ymWp4q^#8B5=I6#o6Nk-
z5<5l)W)00Sb_Nbc1}@j!f|5$-oW$Z{Mg|t={FGEi27aH+yi~u^+@#c^ki?`Mpa@rR
zerZv1s#_+A!;jFS2eN`efq@-pGYBvOG0<)x%?V`50%@>_)^-NQjbLdmAPJHNDP?5f
J2GUFnJOHXMBsTy6
literal 0
HcmV?d00001
diff --git a/src/test/resources/input/singleFeatureTests/EmptyClassWithConstructor.class b/src/test/resources/input/singleFeatureTests/EmptyClassWithConstructor.class
new file mode 100644
index 0000000000000000000000000000000000000000..664bf33beed4dcaa368c76f472c1260ce5efbe9a
GIT binary patch
literal 228
zcmZ`!!4APt5S-Ogig0z2^o9dJAPyQ%!hvvptruQXt-QWUe3p~M!3X##vF+VXcCxdR
zY-T^-*BihbZ5I_-4(t}Hs1dr6xQR(DlG9`pL^3pl+EgXV%m~(CxOY$|^cI(^x%;um
zvV$^bKTR^D^U$Q4VEgG&5;`lD$aQ`Rq~3`j=8d~ea~;a1Dn$S9g>ex89vse96frm%
bbAy#vYM?rLf*z&qG8a#P+h!1&<=pxK$pSF#
literal 0
HcmV?d00001
diff --git a/src/test/resources/input/singleFeatureTests/Field.class b/src/test/resources/input/singleFeatureTests/Field.class
new file mode 100644
index 0000000000000000000000000000000000000000..e06f2cf103c1789c64fb00719460e1234458f36d
GIT binary patch
literal 200
zcmXX=I|{;35S-2LX^h4T2$pJLE+7^P0YS7->|c_Hybu!ziTAP+EIfdR688m*+1Z(4
z*!_H8ZvY#FJ}lS*P5>7kVVujmj0#y^qhpe*v>|vaUFv2{uxIm&K#$O(B2YNpJh_8JVB2x
O4tSc_ln6s+3!@+I=peTM
literal 0
HcmV?d00001
diff --git a/src/test/resources/input/singleFeatureTests/FieldWithAccessModifier.class b/src/test/resources/input/singleFeatureTests/FieldWithAccessModifier.class
new file mode 100644
index 0000000000000000000000000000000000000000..a322f456660163581e52d48955bdb5799b09bb7f
GIT binary patch
literal 236
zcmZ{e%?`m(5QWd6N|oB#u&~2IUqB>Cnn?UC2nNDeP$bj?aS?VXqP@Lz1L>uN;y^_z9TM`L?nXz6&~TIt{jEw5
zBhQnk(>(UoPRWEof@?}BOk!UWteJ}B;(T;vvKDU07h@Hl6HhuS6U{$4{R{$a=*$Li
gBFZp+8&k5buxfoAKP5}ZIDWP2mSReS0N%1a2@jvx9-m!Q`h3jvdpK@<~=
zeza7C(#Q|hWWRM)JeTfv-9*!@KpmCh#=5#tr%;X|YhMef^AHNy3
z`hr@oh|}wn_+~-zd*kUOHAk7{*Z=PC+F;nBy<%|M*Z@R|h{;)N{B6%SK)L-4d7KmL
ztakk?Y9L%t&na~{-Dq#lM4sR}`&*%ZkE++5DS7yQw{it5U!#LP;_-#hSY}_R{}QJf
O>Jz?v&|bK(l9eBg(mC${
literal 0
HcmV?d00001
diff --git a/src/test/resources/input/singleFeatureTests/MainMethod.class b/src/test/resources/input/singleFeatureTests/MainMethod.class
new file mode 100644
index 0000000000000000000000000000000000000000..8c96555ce3d2249920de30814a84a73955ec260d
GIT binary patch
literal 264
zcmZ9GKM%oB6vfZ2Qh!QK5`)BuK|cU7keHN#SWK_H@T7fBn%4I+Nen)K4<+tnkhsIW
zC+D90a-OgI1Hcqs6&4B(Y!^k82+gy&2tN|~=&!=F+-HQ+SZS3_2!&pM>!3`i214mT
zW~bypuxH6Z61;`da+$}WOgAEo*s)_y5n8?7;s;%4snW+$f6J70lBat)S0>!}BAGZe
wVRYeeF*9a!H4rMSI(*4EgB$3|f;qg++vo~va6cDle;juIV>Sos{It+`15Ds8`Tzg`
literal 0
HcmV?d00001
diff --git a/src/test/resources/input/singleFeatureTests/MultipleClasses.class b/src/test/resources/input/singleFeatureTests/MultipleClasses.class
new file mode 100644
index 0000000000000000000000000000000000000000..4585bf0309a0781a1a7b4e841df2df39cb83717c
GIT binary patch
literal 204
zcmX^0Z`VEs1_mbvUM>bE24;2!79Ivx1~x_pfvm)`ME#t^ymWp4q^#8B5=I6#o6Nk-
z5<5l)W)00Sb_Nbc27cetoRZ9foK)wW#Ny)AVnzlQ=lqmZpoC9mUaDVdZc=JdNMceB
zP=qTuzqBYh)h!dm5kb?Z2eOPofq@<91`uEbVxTL4G$)WH3#7p!TH6^IH-e?PfFwv7
Oq?D0?8%Q%T@BjcwkSJ>a
literal 0
HcmV?d00001
diff --git a/src/test/resources/input/singleFeatureTests/Null.class b/src/test/resources/input/singleFeatureTests/Null.class
new file mode 100644
index 0000000000000000000000000000000000000000..0df771002189b736862434729dd7eb1a6cbcb673
GIT binary patch
literal 202
zcmW+wI|{;35S-1|#ArN%c4}cRAQlROAW5Ovzr=^U@Jt{i-pfj`@Bki4+?Qf@cV?K~
z{r=t`09(W%EZ9Dr2rfLrq!bU4Xi?pgEH7oz61=slRJ$SA^Tox-fZ(K^)&vra1Jhl7
zm4x`HDw%foTsCKsYgWQj-8F^WD?oktoMT8qc<$-qvC^tAVdW#f{(duZAwfa-TGC&2-1RrAK*uc
zGb+~fVP|J&&N*}0kI&b404HeM(4bo|98_Qmc!S_E=%hh*-?<70GExHOQIaL)_`Qw`ToGI=?A2xV~-gz2PPIznyF4A%se(q+
z3p&&iS%VIZPmx9P*68M3WorWQOpd@3Sx*0us5kP<&@rs18K_Bb+R`tyO*ac@#w^aJ
l=<*+KhkE1gyf;+uCTRHEFKCX@nzH!IfF|#h6jxXit6v$9Nbvvw
literal 0
HcmV?d00001
diff --git a/src/test/resources/input/singleFeatureTests/TestClass2.class b/src/test/resources/input/singleFeatureTests/TestClass2.class
new file mode 100644
index 0000000000000000000000000000000000000000..85b51363ba1e568002e8b72e1b88048e396b7e0f
GIT binary patch
literal 199
zcmW+wy9&ZU5S%kH(HPOfROjL$MX#H-|_b_Jm^)Tu5;1hd!QI%vWXa6Po(5ya-G
zuhWcGBst~;Ym)61Az0{CEz3)y@{LT++;P`gneWt0SH!FL2Gu!q+0@{7*rBqmEB=Rh
in_0wD;_OCGP-HzI?thKX=)+{RVX@kQU|qo6K==cXSR>{D
literal 0
HcmV?d00001
diff --git a/src/test/resources/input/singleFeatureTests/VariableCalculationTest.class b/src/test/resources/input/singleFeatureTests/VariableCalculationTest.class
new file mode 100644
index 0000000000000000000000000000000000000000..42d44bcbbc7011d09db29d39fc7e9ccdc4c52c30
GIT binary patch
literal 730
zcmZ{g&rZTX5XNVrPzps*QAntUBY1!pFvfs?LLzDc;o!-kY;5L@5Q}zrDY&$3=_rBE^4AN~M?VA>kX7&ai
zdmQ~Klfc8<0HwMt*&YU-&5wj?!CKOFRgDZK&}kFuG3cdT0NqU47Dc8`c3y$KP(rTs
zRb`a}q`;)8P)n_nqE@snpQqJdQltNL7};MW6GX0rk=Ki)Nn|FBl#67R$m|cfOaWG-w+U5*EB1_@_uHK4PZ+@F0J?PN2p}{W^?8zJ
c#y8NF0UzS7WsQN>*V_9qe>Q`SE{g`*Z_&Oc*8l(j
literal 0
HcmV?d00001
diff --git a/src/test/resources/input/singleFeatureTests/While.class b/src/test/resources/input/singleFeatureTests/While.class
new file mode 100644
index 0000000000000000000000000000000000000000..3fbdb4f503cb162e7e0a86cadb65fd33720b2cb8
GIT binary patch
literal 249
zcmX^0Z`VEs1_mbvJ}w3(24;2!79Ivx1~x_pfvm)`ME#t^ymWp4q^#8B5=I6#o6Nk-
z5<5l)W)00Sb_Nbc2G;P5%$!t41{UZ16d=X#lbM(5SDKrYS`?C)1d`wlE=f$z_Dw8+
z^0|WZON)|I-N3rIz`FH77BMI=umkM}0Y)GMx&TOW0(pKw8YC{HwVi=cfXhaD9s_3!
z$1_ovZ79eB?>f{EJf|Gu(`o&&XhJn6C7MyHPG^Y};{>8xrM!Gjp3}
z#>FwAx{XQjdr87Nj8&GgY_r7&&cv`Kry@bIESV*_gI$SxQk||}0H^&4dS4SOf<1!a3eH;k>t8#+V{($=?i5x(1qY7Z-P$~;m9Iaywb%~y^N~oa$`U82FSONe5
literal 0
HcmV?d00001
diff --git a/src/test/resources/input/typedAstFeatureTests/CallMethodFromObjekt.class b/src/test/resources/input/typedAstFeatureTests/CallMethodFromObjekt.class
new file mode 100644
index 0000000000000000000000000000000000000000..4fee59341e764ff0ae786b9ad56c3223cc8e5682
GIT binary patch
literal 461
zcmZ`#!A`IN#DcdsT3o~DGtxgYxJ1;IQ%
zxhcX%(SqZm1eZ|vR1gd~y^ChOI9h7Uy;zK?BD4nUnn#|B&m5Fdu~2ofi5j8tpO9eB
zIUPSR&$97-A#VLRN&BHpA%QtBnlYg=@IxN0mJ^Pz)g%xmpZvI-akPr3-19ZrTsP=c
zuS_V7I7x@BpGXL9KMXnc0+l2z(3D@}P
Date: Wed, 3 Jul 2024 18:24:02 +0200
Subject: [PATCH 31/96] added Semanticcheck to main
---
src/main/java/main/Main.java | 26 +++++++++++++++++---------
1 file changed, 17 insertions(+), 9 deletions(-)
diff --git a/src/main/java/main/Main.java b/src/main/java/main/Main.java
index d5bb523..5f1395b 100644
--- a/src/main/java/main/Main.java
+++ b/src/main/java/main/Main.java
@@ -96,16 +96,24 @@ public class Main {
// Log the typed AST
RaupenLogger.logSemanticAnalyzer(typedAst);
- /*------------------------- Bytecode Generator -> Bytecode -------------------------*/
- // Use the ByteCodeGenerator to generate bytecode from the typed AST and output it to the specified directory
+ if(SemanticAnalyzer.errors.isEmpty()){
+ /*------------------------- Bytecode Generator -> Bytecode -------------------------*/
+ // Use the ByteCodeGenerator to generate bytecode from the typed AST and output it to the specified directory
+
+ final boolean genJar = Optional.ofNullable(System.getProperty("genJar")).map(String::toLowerCase).map(Boolean::parseBoolean).orElse(true);
+ final boolean genClass = Optional.ofNullable(System.getProperty("genClass")).map(String::toLowerCase).map(Boolean::parseBoolean).orElse(true);
+
+ ByteCodeGenerator byteCodeGenerator = new ByteCodeGenerator(outputDirectoryPath, genJar, genClass);
+ assert typedAst != null;
+ byteCodeGenerator.visit((ProgramNode) typedAst);
+ // Log the bytecode generation
+ RaupenLogger.logBytecodeGenerator();
+ } else {
+ for(Exception exception : SemanticAnalyzer.errors){
+ exception.printStackTrace();
+ }
+ }
- final boolean genJar = Optional.ofNullable(System.getProperty("genJar")).map(String::toLowerCase).map(Boolean::parseBoolean).orElse(true);
- final boolean genClass = Optional.ofNullable(System.getProperty("genClass")).map(String::toLowerCase).map(Boolean::parseBoolean).orElse(true);
- ByteCodeGenerator byteCodeGenerator = new ByteCodeGenerator(outputDirectoryPath, genJar, genClass);
- assert typedAst != null;
- byteCodeGenerator.visit((ProgramNode) typedAst);
- // Log the bytecode generation
- RaupenLogger.logBytecodeGenerator();
}
}
\ No newline at end of file
--
2.34.1
From b7863d06845fa5629051a1143aa040f7d6f5a6f6 Mon Sep 17 00:00:00 2001
From: Bruder John
Date: Wed, 3 Jul 2024 18:33:30 +0200
Subject: [PATCH 32/96] fixed thistar
---
src/main/java/ast/members/MainMethodNode.java | 1 -
src/main/java/semantic/SemanticAnalyzer.java | 6 +++--
.../typedAstFeatureTests/CorrectTest.java | 22 ++++---------------
3 files changed, 8 insertions(+), 21 deletions(-)
diff --git a/src/main/java/ast/members/MainMethodNode.java b/src/main/java/ast/members/MainMethodNode.java
index 314a6d0..dc87afa 100644
--- a/src/main/java/ast/members/MainMethodNode.java
+++ b/src/main/java/ast/members/MainMethodNode.java
@@ -5,7 +5,6 @@ import bytecode.visitor.MethodVisitor;
import visitor.Visitable;
public class MainMethodNode extends MethodNode implements Visitable {
- public BlockNode block;
public MainMethodNode(BlockNode block) {
this.block = block;
diff --git a/src/main/java/semantic/SemanticAnalyzer.java b/src/main/java/semantic/SemanticAnalyzer.java
index 9878989..0611219 100644
--- a/src/main/java/semantic/SemanticAnalyzer.java
+++ b/src/main/java/semantic/SemanticAnalyzer.java
@@ -344,11 +344,13 @@ public class SemanticAnalyzer implements SemanticVisitor {
}
} else {
+ if (toCheck.target.thisTar != null) {
if (toCheck.target.thisTar) {
var type = getTypeFromMethod(toCheck, new ReferenceType(currentClass.identifier));
if (type != null) {
return new TypeCheckResult(true, type);
}
+ }
} else {
var result = toCheck.target.accept(this);
if (result.getType() instanceof ReferenceType reference) {
@@ -394,9 +396,9 @@ public class SemanticAnalyzer implements SemanticVisitor {
if (context.containsClass(toCheck.identifier)) {
return new TypeCheckResult(true, new ReferenceType(toCheck.identifier));
+ } else {
+ throw new RuntimeException("Cannot find class " + toCheck.identifier);
}
-
- return null;
}
@Override
diff --git a/src/test/resources/input/typedAstFeatureTests/CorrectTest.java b/src/test/resources/input/typedAstFeatureTests/CorrectTest.java
index 268fbe8..2a7e882 100644
--- a/src/test/resources/input/typedAstFeatureTests/CorrectTest.java
+++ b/src/test/resources/input/typedAstFeatureTests/CorrectTest.java
@@ -1,21 +1,7 @@
-public class CorrectTest {
- int a;
- boolean b;
- char c;
- public void controlStructures(int adf, boolean bool) {
- if (a > (10 + 8)) {
- } else {
+ public class Run {
+ public static void main(String[] args) {
+// Test t = new Test();
+// System.out.println(t.test());
}
-
-
- while (a > adf) {
- a--;
- }
-
- for (int i = 0; i < 5; i++) {
- }
-
-
}
-}
--
2.34.1
From a9d7e841f53b1ca7e5ed89b3e8cdbea33be31a34 Mon Sep 17 00:00:00 2001
From: Bruder John
Date: Wed, 3 Jul 2024 18:42:14 +0200
Subject: [PATCH 33/96] changed correct Semantic check
---
.../typedAstFeatureTests/CorrectTest.java | 22 +++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
diff --git a/src/test/resources/input/typedAstFeatureTests/CorrectTest.java b/src/test/resources/input/typedAstFeatureTests/CorrectTest.java
index 2a7e882..268fbe8 100644
--- a/src/test/resources/input/typedAstFeatureTests/CorrectTest.java
+++ b/src/test/resources/input/typedAstFeatureTests/CorrectTest.java
@@ -1,7 +1,21 @@
+public class CorrectTest {
+ int a;
+ boolean b;
+ char c;
- public class Run {
- public static void main(String[] args) {
-// Test t = new Test();
-// System.out.println(t.test());
+ public void controlStructures(int adf, boolean bool) {
+ if (a > (10 + 8)) {
+ } else {
}
+
+
+ while (a > adf) {
+ a--;
+ }
+
+ for (int i = 0; i < 5; i++) {
+ }
+
+
}
+}
--
2.34.1
From f1abe5d5a8fcc986b7623a796855f693bc069f27 Mon Sep 17 00:00:00 2001
From: i22035
Date: Wed, 3 Jul 2024 18:47:46 +0200
Subject: [PATCH 34/96] Fixed ASTBuilder Tests
---
.../binaryexpressions/CalculationNode.java | 12 +-
.../java/parser/astBuilder/ASTBuilder.java | 123 +-
.../java/parser/generated/SimpleJava.interp | 159 -
.../java/parser/generated/SimpleJava.tokens | 90 -
.../generated/SimpleJavaBaseListener.java | 592 ---
.../generated/SimpleJavaBaseVisitor.java | 337 --
.../parser/generated/SimpleJavaLexer.interp | 173 -
.../parser/generated/SimpleJavaLexer.java | 397 --
.../parser/generated/SimpleJavaLexer.tokens | 90 -
.../parser/generated/SimpleJavaListener.java | 470 ---
.../parser/generated/SimpleJavaParser.java | 3628 -----------------
.../parser/generated/SimpleJavaVisitor.java | 289 --
src/main/java/parser/grammar/SimpleJava.g4 | 11 +-
src/test/java/parser/AstBuilderTest.java | 290 +-
.../{MainMehod.java => MainMethod.java} | 0
.../input/singleFeatureTests/Null.java | 4 +-
.../singleFeatureTests/SelfReference.java | 2 +-
...tionTest.java => VariableCalculation.java} | 6 +-
.../singleFeatureTests/VariableCompare.java | 30 +
.../VariableCompareTest.java | 30 -
20 files changed, 391 insertions(+), 6342 deletions(-)
delete mode 100644 src/main/java/parser/generated/SimpleJava.interp
delete mode 100644 src/main/java/parser/generated/SimpleJava.tokens
delete mode 100644 src/main/java/parser/generated/SimpleJavaBaseListener.java
delete mode 100644 src/main/java/parser/generated/SimpleJavaBaseVisitor.java
delete mode 100644 src/main/java/parser/generated/SimpleJavaLexer.interp
delete mode 100644 src/main/java/parser/generated/SimpleJavaLexer.java
delete mode 100644 src/main/java/parser/generated/SimpleJavaLexer.tokens
delete mode 100644 src/main/java/parser/generated/SimpleJavaListener.java
delete mode 100644 src/main/java/parser/generated/SimpleJavaParser.java
delete mode 100644 src/main/java/parser/generated/SimpleJavaVisitor.java
rename src/test/resources/input/singleFeatureTests/{MainMehod.java => MainMethod.java} (100%)
rename src/test/resources/input/singleFeatureTests/{VariableCalculationTest.java => VariableCalculation.java} (82%)
create mode 100644 src/test/resources/input/singleFeatureTests/VariableCompare.java
delete mode 100644 src/test/resources/input/singleFeatureTests/VariableCompareTest.java
diff --git a/src/main/java/ast/expressions/binaryexpressions/CalculationNode.java b/src/main/java/ast/expressions/binaryexpressions/CalculationNode.java
index 78c059d..9a2cc13 100644
--- a/src/main/java/ast/expressions/binaryexpressions/CalculationNode.java
+++ b/src/main/java/ast/expressions/binaryexpressions/CalculationNode.java
@@ -22,10 +22,12 @@ public class CalculationNode extends BinaryNode {
}
private void setOperator(String operator) {
- if(operator.equals("+")) {
- this.operator = EnumLineOperator.PLUS;
- } else if(operator.equals("-")) {
- this.operator = EnumLineOperator.MINUS;
+ if(operator != null) {
+ if(operator.equals("+")) {
+ this.operator = EnumLineOperator.PLUS;
+ } else if(operator.equals("-")) {
+ this.operator = EnumLineOperator.MINUS;
+ }
}
}
@@ -40,4 +42,4 @@ public class CalculationNode extends BinaryNode {
methodVisitor.visit(this);
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/parser/astBuilder/ASTBuilder.java b/src/main/java/parser/astBuilder/ASTBuilder.java
index 7ee199b..ff04a83 100644
--- a/src/main/java/parser/astBuilder/ASTBuilder.java
+++ b/src/main/java/parser/astBuilder/ASTBuilder.java
@@ -3,10 +3,7 @@ package parser.astBuilder;
import ast.*;
import ast.expressions.IExpressionNode;
-import ast.expressions.binaryexpressions.CalculationNode;
-import ast.expressions.binaryexpressions.DotNode;
-import ast.expressions.binaryexpressions.DotSubstractionNode;
-import ast.expressions.binaryexpressions.NonCalculationNode;
+import ast.expressions.binaryexpressions.*;
import ast.expressions.unaryexpressions.MemberAccessNode;
import ast.expressions.unaryexpressions.NotNode;
import ast.expressions.unaryexpressions.UnaryNode;
@@ -14,6 +11,7 @@ import ast.members.*;
import ast.parameters.ParameterNode;
import ast.statementexpressions.AssignNode;
import ast.statementexpressions.AssignableNode;
+import ast.statementexpressions.IStatementExpressionNode;
import ast.statementexpressions.NewDeclarationNode;
import ast.statementexpressions.crementexpressions.CrementType;
import ast.statementexpressions.crementexpressions.DecrementNode;
@@ -75,7 +73,12 @@ public class ASTBuilder extends SimpleJavaBaseVisitor {
@Override
public ASTNode visitConstructorDeclaration(SimpleJavaParser.ConstructorDeclarationContext ctx) {
- ConstructorNode constructorNode = new ConstructorNode(ctx.AccessModifier().getText(), ctx.Identifier().getText(), (BlockNode) visit(ctx.blockStatement()));
+ ConstructorNode constructorNode;
+ if(ctx.AccessModifier() != null) {
+ constructorNode = new ConstructorNode(ctx.AccessModifier().getText(), ctx.Identifier().getText(), (BlockNode) visit(ctx.blockStatement()));
+ } else {
+ constructorNode = new ConstructorNode("public", ctx.Identifier().getText(), (BlockNode) visit(ctx.blockStatement()));
+ }
if(ctx.parameterList() != null) {
for(SimpleJavaParser.ParameterContext parameter : ctx.parameterList().parameter()) {
constructorNode.addParameter((ParameterNode) visit(parameter));
@@ -164,6 +167,8 @@ public class ASTBuilder extends SimpleJavaBaseVisitor {
return visitForStatement(ctx.forStatement());
} else if(ctx.ifElseStatement() != null) {
return visitIfElseStatement(ctx.ifElseStatement());
+ } else if(ctx.switchStatement() != null) {
+ return visitSwitchStatement(ctx.switchStatement());
} else if(ctx.statementExpression() != null) {
return visitStatementExpression(ctx.statementExpression());
}
@@ -177,7 +182,12 @@ public class ASTBuilder extends SimpleJavaBaseVisitor {
@Override
public ASTNode visitLocalVariableDeclaration(SimpleJavaParser.LocalVariableDeclarationContext ctx) {
- return new LocalVariableDeclarationNode(createTypeNode(ctx.type().getText()), ctx.Identifier().getText(), ctx.Assign().getText(), (IExpressionNode) visit(ctx.expression()));
+ if(ctx.Assign() != null) {
+ return new LocalVariableDeclarationNode(createTypeNode(ctx.type().getText()), ctx.Identifier().getText(), ctx.Assign().getText(), (IExpressionNode) visit(ctx.expression()));
+ } else {
+ return new LocalVariableDeclarationNode(createTypeNode(ctx.type().getText()), ctx.Identifier().getText(), null, null);
+ }
+
}
@Override
@@ -209,46 +219,60 @@ public class ASTBuilder extends SimpleJavaBaseVisitor {
@Override
public ASTNode visitForStatement(SimpleJavaParser.ForStatementContext ctx) {
-
List statements = new ArrayList<>();
- //init
+ // Initialisierung
int i = 0;
- if(ctx.localVariableDeclaration() != null) {
+ if (ctx.localVariableDeclaration() != null) {
statements.add((IStatementNode) visit(ctx.localVariableDeclaration()));
- } else if(ctx.statementExpression(i) != null){
+ } else if (ctx.statementExpression(i) != null) {
statements.add((IStatementNode) visit(ctx.statementExpression(i)));
i++;
}
- //condition
+ // Bedingung
IExpressionNode condition = (IExpressionNode) visit(ctx.expression());
- //ink
- IStatementNode crement = null;
- if(ctx.statementExpression(i) != null){
- crement = (IStatementNode) visit(ctx.statementExpression(i));
+ // Inkrement
+ IStatementExpressionNode crement = null;
+ boolean isPrefix = false;
+ if (ctx.statementExpression(i) != null) {
+ crement = (IStatementExpressionNode) visit(ctx.statementExpression(i));
+
+ if (crement instanceof IncrementNode) {
+ isPrefix = ((IncrementNode) crement).crementType == CrementType.PREFIX;
+ } else if (crement instanceof DecrementNode) {
+ isPrefix = ((DecrementNode) crement).crementType == CrementType.PREFIX;
+ }
}
- BlockNode forBlock = new BlockNode();
+ BlockNode forBlock = (BlockNode) visit(ctx.blockStatement());
- BlockNode forStatements = (BlockNode) visit(ctx.blockStatement());
- if(forStatements != null) {
- forBlock.addStatement((IStatementNode) forStatements);
+ // While-Schleife
+ BlockNode whileBody = new BlockNode();
+
+ // Prä-Inkrement: Das Inkrement kommt vor dem Block
+ if (crement != null && isPrefix) {
+ whileBody.addStatement((IStatementNode) crement);
}
- if(crement != null){
- BlockNode forCrement = new BlockNode();
- forCrement.addStatement((crement));
- forBlock.addStatement(forCrement);
+ // Block Statements der For-Schleife in den While-Block kopieren
+ for (IStatementNode statement : forBlock.statements) {
+ whileBody.addStatement(statement);
}
- WhileNode While = new WhileNode(condition, forBlock);
+ // Post-Inkrement: Das Inkrement kommt nach dem Block
+ if (crement != null && !isPrefix) {
+ whileBody.addStatement((IStatementNode) crement);
+ }
- statements.add(While);
+ // Bedingung der While-Schleife
+ WhileNode whileNode = new WhileNode(condition, whileBody);
+
+ statements.add(whileNode);
BlockNode resultBlock = new BlockNode();
- for(IStatementNode statement : statements) {
+ for (IStatementNode statement : statements) {
resultBlock.addStatement((IStatementNode) statement);
}
@@ -296,6 +320,49 @@ public class ASTBuilder extends SimpleJavaBaseVisitor {
return null;
}
+ @Override
+ public ASTNode visitSwitchStatement(SimpleJavaParser.SwitchStatementContext ctx) {
+ UnaryNode switchExpression = (UnaryNode) visit(ctx.expression());
+
+ List ifNodes = new ArrayList<>();
+
+ for (SimpleJavaParser.CaseStatementContext caseCtx : ctx.caseStatement()) {
+ IExpressionNode caseExpression = (IExpressionNode) visit(caseCtx.value());
+
+ // Condition as NonCalculationNode -> Equals Expression
+ NonCalculationNode condition = new NonCalculationNode(switchExpression, "==", caseExpression);
+
+ BlockNode caseBlock = new BlockNode();
+ for (SimpleJavaParser.StatementContext stmtCtx : caseCtx.statement()) {
+ caseBlock.addStatement((IStatementNode) visit(stmtCtx));
+ }
+
+ // Each case as if
+ IfNode ifNode = new IfNode(condition, caseBlock);
+ ifNodes.add(ifNode);
+ }
+
+ // Check if has Default
+ ElseNode defaulElseNode = null;
+ if (ctx.defaultStatement() != null) {
+ BlockNode defaultBlock = new BlockNode();
+ for (SimpleJavaParser.StatementContext stmtCtx : ctx.defaultStatement().statement()) {
+ defaultBlock.addStatement((IStatementNode) visit(stmtCtx));
+ }
+ // Default als letztes Else Statement
+ defaulElseNode = new ElseNode(defaultBlock);
+ }
+
+ IfElseNode ifElseNode = new IfElseNode(ifNodes.getFirst(),defaulElseNode);
+ ifNodes.removeFirst();
+
+ for (IfNode ifNode : ifNodes){
+ ifElseNode.addElseIfStatement(ifNode);
+ }
+
+ return ifElseNode;
+ }
+
@Override
public ASTNode visitAssign(SimpleJavaParser.AssignContext ctx) {
return new AssignNode((AssignableNode) visit(ctx.assignableExpression()), (IExpressionNode) visit(ctx.expression()));
@@ -532,6 +599,4 @@ public class ASTBuilder extends SimpleJavaBaseVisitor {
default -> new ReferenceType(identifier);
};
}
-
-}
-
+}
\ No newline at end of file
diff --git a/src/main/java/parser/generated/SimpleJava.interp b/src/main/java/parser/generated/SimpleJava.interp
deleted file mode 100644
index aca42bf..0000000
--- a/src/main/java/parser/generated/SimpleJava.interp
+++ /dev/null
@@ -1,159 +0,0 @@
-token literal names:
-null
-'++'
-'--'
-'void'
-'boolean'
-'char'
-'int'
-null
-'public static void main(String[] args)'
-null
-null
-null
-null
-'='
-'+'
-'-'
-'*'
-'%'
-'/'
-'>'
-'<'
-'>='
-'<='
-'=='
-'!='
-'!'
-'&&'
-'||'
-'.'
-'('
-')'
-'{'
-'}'
-';'
-','
-'class'
-'this'
-'while'
-'do'
-'if'
-'else'
-'for'
-'return'
-'new'
-null
-null
-null
-'null'
-null
-null
-null
-null
-
-token symbolic names:
-null
-null
-null
-Void
-Boolean
-Char
-Int
-AccessModifier
-MainMethodDeclaration
-DotOperator
-LineOperator
-ComparisonOperator
-LogicalOperator
-Assign
-Plus
-Minus
-Mult
-Modulo
-Div
-Greater
-Less
-GreaterEqual
-LessEqual
-Equal
-NotEqual
-Not
-And
-Or
-Dot
-OpenRoundBracket
-ClosedRoundBracket
-OpenCurlyBracket
-ClosedCurlyBracket
-Semicolon
-Comma
-Class
-This
-While
-Do
-If
-Else
-For
-Return
-New
-CharValue
-IntValue
-BooleanValue
-NullValue
-Identifier
-WS
-InlineComment
-MultilineComment
-
-rule names:
-program
-classDeclaration
-memberDeclaration
-constructorDeclaration
-fieldDeclaration
-methodDeclaration
-parameterList
-parameter
-argumentList
-statement
-blockStatement
-returnStatement
-localVariableDeclaration
-whileStatement
-doWhileStatement
-forStatement
-ifElseStatement
-ifStatement
-elseIfStatement
-elseStatement
-statementExpression
-assign
-newDeclaration
-expression
-unaryExpression
-notExpression
-crementExpression
-incrementExpression
-prefixIncrementExpression
-suffixIncrementExpression
-decrementExpression
-prefixDecrementExpression
-suffixDecrementExpression
-assignableExpression
-memberAccess
-binaryExpression
-calculationExpression
-dotExpression
-dotSubtractionExpression
-nonCalculationExpression
-methodCall
-target
-chainedMethod
-type
-value
-nonCalculationOperator
-
-
-atn:
-[4, 1, 51, 419, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 1, 0, 4, 0, 94, 8, 0, 11, 0, 12, 0, 95, 1, 1, 3, 1, 99, 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 105, 8, 1, 10, 1, 12, 1, 108, 9, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 3, 2, 115, 8, 2, 1, 3, 3, 3, 118, 8, 3, 1, 3, 1, 3, 1, 3, 3, 3, 123, 8, 3, 1, 3, 1, 3, 1, 3, 1, 4, 3, 4, 129, 8, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 3, 5, 138, 8, 5, 1, 5, 1, 5, 3, 5, 142, 8, 5, 1, 5, 1, 5, 1, 5, 3, 5, 147, 8, 5, 1, 5, 1, 5, 3, 5, 151, 8, 5, 1, 6, 1, 6, 1, 6, 5, 6, 156, 8, 6, 10, 6, 12, 6, 159, 9, 6, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 5, 8, 167, 8, 8, 10, 8, 12, 8, 170, 9, 8, 3, 8, 172, 8, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 3, 9, 188, 8, 9, 1, 10, 1, 10, 5, 10, 192, 8, 10, 10, 10, 12, 10, 195, 9, 10, 1, 10, 1, 10, 1, 11, 1, 11, 3, 11, 201, 8, 11, 1, 12, 1, 12, 1, 12, 1, 12, 3, 12, 207, 8, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 3, 15, 227, 8, 15, 1, 15, 1, 15, 3, 15, 231, 8, 15, 1, 15, 1, 15, 3, 15, 235, 8, 15, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 5, 16, 242, 8, 16, 10, 16, 12, 16, 245, 9, 16, 1, 16, 3, 16, 248, 8, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, 3, 20, 270, 8, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 3, 23, 284, 8, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 3, 24, 296, 8, 24, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 3, 26, 303, 8, 26, 1, 27, 1, 27, 3, 27, 307, 8, 27, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 3, 30, 317, 8, 30, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 3, 33, 327, 8, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 3, 34, 334, 8, 34, 1, 34, 1, 34, 4, 34, 338, 8, 34, 11, 34, 12, 34, 339, 1, 34, 3, 34, 343, 8, 34, 1, 35, 1, 35, 3, 35, 347, 8, 35, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 5, 36, 355, 8, 36, 10, 36, 12, 36, 358, 9, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 5, 37, 366, 8, 37, 10, 37, 12, 37, 369, 9, 37, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 3, 38, 379, 8, 38, 1, 39, 1, 39, 1, 39, 1, 39, 1, 40, 3, 40, 386, 8, 40, 1, 40, 5, 40, 389, 8, 40, 10, 40, 12, 40, 392, 9, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 41, 1, 41, 1, 41, 1, 41, 3, 41, 403, 8, 41, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 43, 1, 43, 1, 44, 1, 44, 1, 45, 1, 45, 1, 45, 0, 2, 72, 74, 46, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 0, 3, 2, 0, 4, 6, 48, 48, 1, 0, 44, 47, 1, 0, 11, 12, 430, 0, 93, 1, 0, 0, 0, 2, 98, 1, 0, 0, 0, 4, 114, 1, 0, 0, 0, 6, 117, 1, 0, 0, 0, 8, 128, 1, 0, 0, 0, 10, 150, 1, 0, 0, 0, 12, 152, 1, 0, 0, 0, 14, 160, 1, 0, 0, 0, 16, 171, 1, 0, 0, 0, 18, 187, 1, 0, 0, 0, 20, 189, 1, 0, 0, 0, 22, 198, 1, 0, 0, 0, 24, 202, 1, 0, 0, 0, 26, 208, 1, 0, 0, 0, 28, 214, 1, 0, 0, 0, 30, 222, 1, 0, 0, 0, 32, 239, 1, 0, 0, 0, 34, 249, 1, 0, 0, 0, 36, 255, 1, 0, 0, 0, 38, 262, 1, 0, 0, 0, 40, 269, 1, 0, 0, 0, 42, 271, 1, 0, 0, 0, 44, 275, 1, 0, 0, 0, 46, 283, 1, 0, 0, 0, 48, 295, 1, 0, 0, 0, 50, 297, 1, 0, 0, 0, 52, 302, 1, 0, 0, 0, 54, 306, 1, 0, 0, 0, 56, 308, 1, 0, 0, 0, 58, 311, 1, 0, 0, 0, 60, 316, 1, 0, 0, 0, 62, 318, 1, 0, 0, 0, 64, 321, 1, 0, 0, 0, 66, 326, 1, 0, 0, 0, 68, 342, 1, 0, 0, 0, 70, 346, 1, 0, 0, 0, 72, 348, 1, 0, 0, 0, 74, 359, 1, 0, 0, 0, 76, 378, 1, 0, 0, 0, 78, 380, 1, 0, 0, 0, 80, 385, 1, 0, 0, 0, 82, 402, 1, 0, 0, 0, 84, 406, 1, 0, 0, 0, 86, 412, 1, 0, 0, 0, 88, 414, 1, 0, 0, 0, 90, 416, 1, 0, 0, 0, 92, 94, 3, 2, 1, 0, 93, 92, 1, 0, 0, 0, 94, 95, 1, 0, 0, 0, 95, 93, 1, 0, 0, 0, 95, 96, 1, 0, 0, 0, 96, 1, 1, 0, 0, 0, 97, 99, 5, 7, 0, 0, 98, 97, 1, 0, 0, 0, 98, 99, 1, 0, 0, 0, 99, 100, 1, 0, 0, 0, 100, 101, 5, 35, 0, 0, 101, 102, 5, 48, 0, 0, 102, 106, 5, 31, 0, 0, 103, 105, 3, 4, 2, 0, 104, 103, 1, 0, 0, 0, 105, 108, 1, 0, 0, 0, 106, 104, 1, 0, 0, 0, 106, 107, 1, 0, 0, 0, 107, 109, 1, 0, 0, 0, 108, 106, 1, 0, 0, 0, 109, 110, 5, 32, 0, 0, 110, 3, 1, 0, 0, 0, 111, 115, 3, 6, 3, 0, 112, 115, 3, 8, 4, 0, 113, 115, 3, 10, 5, 0, 114, 111, 1, 0, 0, 0, 114, 112, 1, 0, 0, 0, 114, 113, 1, 0, 0, 0, 115, 5, 1, 0, 0, 0, 116, 118, 5, 7, 0, 0, 117, 116, 1, 0, 0, 0, 117, 118, 1, 0, 0, 0, 118, 119, 1, 0, 0, 0, 119, 120, 5, 48, 0, 0, 120, 122, 5, 29, 0, 0, 121, 123, 3, 12, 6, 0, 122, 121, 1, 0, 0, 0, 122, 123, 1, 0, 0, 0, 123, 124, 1, 0, 0, 0, 124, 125, 5, 30, 0, 0, 125, 126, 3, 20, 10, 0, 126, 7, 1, 0, 0, 0, 127, 129, 5, 7, 0, 0, 128, 127, 1, 0, 0, 0, 128, 129, 1, 0, 0, 0, 129, 130, 1, 0, 0, 0, 130, 131, 3, 86, 43, 0, 131, 132, 5, 48, 0, 0, 132, 133, 5, 33, 0, 0, 133, 9, 1, 0, 0, 0, 134, 135, 5, 8, 0, 0, 135, 151, 3, 20, 10, 0, 136, 138, 5, 7, 0, 0, 137, 136, 1, 0, 0, 0, 137, 138, 1, 0, 0, 0, 138, 141, 1, 0, 0, 0, 139, 142, 3, 86, 43, 0, 140, 142, 5, 3, 0, 0, 141, 139, 1, 0, 0, 0, 141, 140, 1, 0, 0, 0, 142, 143, 1, 0, 0, 0, 143, 144, 5, 48, 0, 0, 144, 146, 5, 29, 0, 0, 145, 147, 3, 12, 6, 0, 146, 145, 1, 0, 0, 0, 146, 147, 1, 0, 0, 0, 147, 148, 1, 0, 0, 0, 148, 149, 5, 30, 0, 0, 149, 151, 3, 20, 10, 0, 150, 134, 1, 0, 0, 0, 150, 137, 1, 0, 0, 0, 151, 11, 1, 0, 0, 0, 152, 157, 3, 14, 7, 0, 153, 154, 5, 34, 0, 0, 154, 156, 3, 14, 7, 0, 155, 153, 1, 0, 0, 0, 156, 159, 1, 0, 0, 0, 157, 155, 1, 0, 0, 0, 157, 158, 1, 0, 0, 0, 158, 13, 1, 0, 0, 0, 159, 157, 1, 0, 0, 0, 160, 161, 3, 86, 43, 0, 161, 162, 5, 48, 0, 0, 162, 15, 1, 0, 0, 0, 163, 168, 3, 46, 23, 0, 164, 165, 5, 34, 0, 0, 165, 167, 3, 46, 23, 0, 166, 164, 1, 0, 0, 0, 167, 170, 1, 0, 0, 0, 168, 166, 1, 0, 0, 0, 168, 169, 1, 0, 0, 0, 169, 172, 1, 0, 0, 0, 170, 168, 1, 0, 0, 0, 171, 163, 1, 0, 0, 0, 171, 172, 1, 0, 0, 0, 172, 17, 1, 0, 0, 0, 173, 174, 3, 22, 11, 0, 174, 175, 5, 33, 0, 0, 175, 188, 1, 0, 0, 0, 176, 177, 3, 24, 12, 0, 177, 178, 5, 33, 0, 0, 178, 188, 1, 0, 0, 0, 179, 188, 3, 20, 10, 0, 180, 188, 3, 26, 13, 0, 181, 188, 3, 28, 14, 0, 182, 188, 3, 30, 15, 0, 183, 188, 3, 32, 16, 0, 184, 185, 3, 40, 20, 0, 185, 186, 5, 33, 0, 0, 186, 188, 1, 0, 0, 0, 187, 173, 1, 0, 0, 0, 187, 176, 1, 0, 0, 0, 187, 179, 1, 0, 0, 0, 187, 180, 1, 0, 0, 0, 187, 181, 1, 0, 0, 0, 187, 182, 1, 0, 0, 0, 187, 183, 1, 0, 0, 0, 187, 184, 1, 0, 0, 0, 188, 19, 1, 0, 0, 0, 189, 193, 5, 31, 0, 0, 190, 192, 3, 18, 9, 0, 191, 190, 1, 0, 0, 0, 192, 195, 1, 0, 0, 0, 193, 191, 1, 0, 0, 0, 193, 194, 1, 0, 0, 0, 194, 196, 1, 0, 0, 0, 195, 193, 1, 0, 0, 0, 196, 197, 5, 32, 0, 0, 197, 21, 1, 0, 0, 0, 198, 200, 5, 42, 0, 0, 199, 201, 3, 46, 23, 0, 200, 199, 1, 0, 0, 0, 200, 201, 1, 0, 0, 0, 201, 23, 1, 0, 0, 0, 202, 203, 3, 86, 43, 0, 203, 206, 5, 48, 0, 0, 204, 205, 5, 13, 0, 0, 205, 207, 3, 46, 23, 0, 206, 204, 1, 0, 0, 0, 206, 207, 1, 0, 0, 0, 207, 25, 1, 0, 0, 0, 208, 209, 5, 37, 0, 0, 209, 210, 5, 29, 0, 0, 210, 211, 3, 46, 23, 0, 211, 212, 5, 30, 0, 0, 212, 213, 3, 20, 10, 0, 213, 27, 1, 0, 0, 0, 214, 215, 5, 38, 0, 0, 215, 216, 3, 20, 10, 0, 216, 217, 5, 37, 0, 0, 217, 218, 5, 29, 0, 0, 218, 219, 3, 46, 23, 0, 219, 220, 5, 30, 0, 0, 220, 221, 5, 33, 0, 0, 221, 29, 1, 0, 0, 0, 222, 223, 5, 41, 0, 0, 223, 226, 5, 29, 0, 0, 224, 227, 3, 40, 20, 0, 225, 227, 3, 24, 12, 0, 226, 224, 1, 0, 0, 0, 226, 225, 1, 0, 0, 0, 227, 228, 1, 0, 0, 0, 228, 230, 5, 33, 0, 0, 229, 231, 3, 46, 23, 0, 230, 229, 1, 0, 0, 0, 230, 231, 1, 0, 0, 0, 231, 232, 1, 0, 0, 0, 232, 234, 5, 33, 0, 0, 233, 235, 3, 40, 20, 0, 234, 233, 1, 0, 0, 0, 234, 235, 1, 0, 0, 0, 235, 236, 1, 0, 0, 0, 236, 237, 5, 30, 0, 0, 237, 238, 3, 20, 10, 0, 238, 31, 1, 0, 0, 0, 239, 243, 3, 34, 17, 0, 240, 242, 3, 36, 18, 0, 241, 240, 1, 0, 0, 0, 242, 245, 1, 0, 0, 0, 243, 241, 1, 0, 0, 0, 243, 244, 1, 0, 0, 0, 244, 247, 1, 0, 0, 0, 245, 243, 1, 0, 0, 0, 246, 248, 3, 38, 19, 0, 247, 246, 1, 0, 0, 0, 247, 248, 1, 0, 0, 0, 248, 33, 1, 0, 0, 0, 249, 250, 5, 39, 0, 0, 250, 251, 5, 29, 0, 0, 251, 252, 3, 46, 23, 0, 252, 253, 5, 30, 0, 0, 253, 254, 3, 20, 10, 0, 254, 35, 1, 0, 0, 0, 255, 256, 5, 40, 0, 0, 256, 257, 5, 39, 0, 0, 257, 258, 5, 29, 0, 0, 258, 259, 3, 46, 23, 0, 259, 260, 5, 30, 0, 0, 260, 261, 3, 20, 10, 0, 261, 37, 1, 0, 0, 0, 262, 263, 5, 40, 0, 0, 263, 264, 3, 20, 10, 0, 264, 39, 1, 0, 0, 0, 265, 270, 3, 42, 21, 0, 266, 270, 3, 44, 22, 0, 267, 270, 3, 80, 40, 0, 268, 270, 3, 52, 26, 0, 269, 265, 1, 0, 0, 0, 269, 266, 1, 0, 0, 0, 269, 267, 1, 0, 0, 0, 269, 268, 1, 0, 0, 0, 270, 41, 1, 0, 0, 0, 271, 272, 3, 66, 33, 0, 272, 273, 5, 13, 0, 0, 273, 274, 3, 46, 23, 0, 274, 43, 1, 0, 0, 0, 275, 276, 5, 43, 0, 0, 276, 277, 5, 48, 0, 0, 277, 278, 5, 29, 0, 0, 278, 279, 3, 16, 8, 0, 279, 280, 5, 30, 0, 0, 280, 45, 1, 0, 0, 0, 281, 284, 3, 48, 24, 0, 282, 284, 3, 70, 35, 0, 283, 281, 1, 0, 0, 0, 283, 282, 1, 0, 0, 0, 284, 47, 1, 0, 0, 0, 285, 296, 5, 36, 0, 0, 286, 296, 5, 48, 0, 0, 287, 296, 3, 68, 34, 0, 288, 296, 3, 88, 44, 0, 289, 296, 3, 50, 25, 0, 290, 296, 3, 40, 20, 0, 291, 292, 5, 29, 0, 0, 292, 293, 3, 46, 23, 0, 293, 294, 5, 30, 0, 0, 294, 296, 1, 0, 0, 0, 295, 285, 1, 0, 0, 0, 295, 286, 1, 0, 0, 0, 295, 287, 1, 0, 0, 0, 295, 288, 1, 0, 0, 0, 295, 289, 1, 0, 0, 0, 295, 290, 1, 0, 0, 0, 295, 291, 1, 0, 0, 0, 296, 49, 1, 0, 0, 0, 297, 298, 5, 25, 0, 0, 298, 299, 3, 46, 23, 0, 299, 51, 1, 0, 0, 0, 300, 303, 3, 54, 27, 0, 301, 303, 3, 60, 30, 0, 302, 300, 1, 0, 0, 0, 302, 301, 1, 0, 0, 0, 303, 53, 1, 0, 0, 0, 304, 307, 3, 56, 28, 0, 305, 307, 3, 58, 29, 0, 306, 304, 1, 0, 0, 0, 306, 305, 1, 0, 0, 0, 307, 55, 1, 0, 0, 0, 308, 309, 5, 1, 0, 0, 309, 310, 3, 66, 33, 0, 310, 57, 1, 0, 0, 0, 311, 312, 3, 66, 33, 0, 312, 313, 5, 1, 0, 0, 313, 59, 1, 0, 0, 0, 314, 317, 3, 62, 31, 0, 315, 317, 3, 64, 32, 0, 316, 314, 1, 0, 0, 0, 316, 315, 1, 0, 0, 0, 317, 61, 1, 0, 0, 0, 318, 319, 5, 2, 0, 0, 319, 320, 3, 66, 33, 0, 320, 63, 1, 0, 0, 0, 321, 322, 3, 66, 33, 0, 322, 323, 5, 2, 0, 0, 323, 65, 1, 0, 0, 0, 324, 327, 5, 48, 0, 0, 325, 327, 3, 68, 34, 0, 326, 324, 1, 0, 0, 0, 326, 325, 1, 0, 0, 0, 327, 67, 1, 0, 0, 0, 328, 329, 5, 36, 0, 0, 329, 330, 5, 28, 0, 0, 330, 343, 5, 48, 0, 0, 331, 332, 5, 36, 0, 0, 332, 334, 5, 28, 0, 0, 333, 331, 1, 0, 0, 0, 333, 334, 1, 0, 0, 0, 334, 337, 1, 0, 0, 0, 335, 336, 5, 48, 0, 0, 336, 338, 5, 28, 0, 0, 337, 335, 1, 0, 0, 0, 338, 339, 1, 0, 0, 0, 339, 337, 1, 0, 0, 0, 339, 340, 1, 0, 0, 0, 340, 341, 1, 0, 0, 0, 341, 343, 5, 48, 0, 0, 342, 328, 1, 0, 0, 0, 342, 333, 1, 0, 0, 0, 343, 69, 1, 0, 0, 0, 344, 347, 3, 72, 36, 0, 345, 347, 3, 78, 39, 0, 346, 344, 1, 0, 0, 0, 346, 345, 1, 0, 0, 0, 347, 71, 1, 0, 0, 0, 348, 349, 6, 36, -1, 0, 349, 350, 3, 74, 37, 0, 350, 356, 1, 0, 0, 0, 351, 352, 10, 2, 0, 0, 352, 353, 5, 10, 0, 0, 353, 355, 3, 74, 37, 0, 354, 351, 1, 0, 0, 0, 355, 358, 1, 0, 0, 0, 356, 354, 1, 0, 0, 0, 356, 357, 1, 0, 0, 0, 357, 73, 1, 0, 0, 0, 358, 356, 1, 0, 0, 0, 359, 360, 6, 37, -1, 0, 360, 361, 3, 76, 38, 0, 361, 367, 1, 0, 0, 0, 362, 363, 10, 2, 0, 0, 363, 364, 5, 9, 0, 0, 364, 366, 3, 76, 38, 0, 365, 362, 1, 0, 0, 0, 366, 369, 1, 0, 0, 0, 367, 365, 1, 0, 0, 0, 367, 368, 1, 0, 0, 0, 368, 75, 1, 0, 0, 0, 369, 367, 1, 0, 0, 0, 370, 379, 5, 45, 0, 0, 371, 379, 5, 48, 0, 0, 372, 379, 3, 68, 34, 0, 373, 374, 3, 80, 40, 0, 374, 375, 5, 29, 0, 0, 375, 376, 3, 72, 36, 0, 376, 377, 5, 30, 0, 0, 377, 379, 1, 0, 0, 0, 378, 370, 1, 0, 0, 0, 378, 371, 1, 0, 0, 0, 378, 372, 1, 0, 0, 0, 378, 373, 1, 0, 0, 0, 379, 77, 1, 0, 0, 0, 380, 381, 3, 48, 24, 0, 381, 382, 3, 90, 45, 0, 382, 383, 3, 46, 23, 0, 383, 79, 1, 0, 0, 0, 384, 386, 3, 82, 41, 0, 385, 384, 1, 0, 0, 0, 385, 386, 1, 0, 0, 0, 386, 390, 1, 0, 0, 0, 387, 389, 3, 84, 42, 0, 388, 387, 1, 0, 0, 0, 389, 392, 1, 0, 0, 0, 390, 388, 1, 0, 0, 0, 390, 391, 1, 0, 0, 0, 391, 393, 1, 0, 0, 0, 392, 390, 1, 0, 0, 0, 393, 394, 5, 48, 0, 0, 394, 395, 5, 29, 0, 0, 395, 396, 3, 16, 8, 0, 396, 397, 5, 30, 0, 0, 397, 81, 1, 0, 0, 0, 398, 403, 5, 36, 0, 0, 399, 403, 3, 68, 34, 0, 400, 403, 3, 44, 22, 0, 401, 403, 5, 48, 0, 0, 402, 398, 1, 0, 0, 0, 402, 399, 1, 0, 0, 0, 402, 400, 1, 0, 0, 0, 402, 401, 1, 0, 0, 0, 403, 404, 1, 0, 0, 0, 404, 405, 5, 28, 0, 0, 405, 83, 1, 0, 0, 0, 406, 407, 5, 48, 0, 0, 407, 408, 5, 29, 0, 0, 408, 409, 3, 16, 8, 0, 409, 410, 5, 30, 0, 0, 410, 411, 5, 28, 0, 0, 411, 85, 1, 0, 0, 0, 412, 413, 7, 0, 0, 0, 413, 87, 1, 0, 0, 0, 414, 415, 7, 1, 0, 0, 415, 89, 1, 0, 0, 0, 416, 417, 7, 2, 0, 0, 417, 91, 1, 0, 0, 0, 40, 95, 98, 106, 114, 117, 122, 128, 137, 141, 146, 150, 157, 168, 171, 187, 193, 200, 206, 226, 230, 234, 243, 247, 269, 283, 295, 302, 306, 316, 326, 333, 339, 342, 346, 356, 367, 378, 385, 390, 402]
\ No newline at end of file
diff --git a/src/main/java/parser/generated/SimpleJava.tokens b/src/main/java/parser/generated/SimpleJava.tokens
deleted file mode 100644
index 71246c8..0000000
--- a/src/main/java/parser/generated/SimpleJava.tokens
+++ /dev/null
@@ -1,90 +0,0 @@
-T__0=1
-T__1=2
-Void=3
-Boolean=4
-Char=5
-Int=6
-AccessModifier=7
-MainMethodDeclaration=8
-DotOperator=9
-LineOperator=10
-ComparisonOperator=11
-LogicalOperator=12
-Assign=13
-Plus=14
-Minus=15
-Mult=16
-Modulo=17
-Div=18
-Greater=19
-Less=20
-GreaterEqual=21
-LessEqual=22
-Equal=23
-NotEqual=24
-Not=25
-And=26
-Or=27
-Dot=28
-OpenRoundBracket=29
-ClosedRoundBracket=30
-OpenCurlyBracket=31
-ClosedCurlyBracket=32
-Semicolon=33
-Comma=34
-Class=35
-This=36
-While=37
-Do=38
-If=39
-Else=40
-For=41
-Return=42
-New=43
-CharValue=44
-IntValue=45
-BooleanValue=46
-NullValue=47
-Identifier=48
-WS=49
-InlineComment=50
-MultilineComment=51
-'++'=1
-'--'=2
-'void'=3
-'boolean'=4
-'char'=5
-'int'=6
-'public static void main(String[] args)'=8
-'='=13
-'+'=14
-'-'=15
-'*'=16
-'%'=17
-'/'=18
-'>'=19
-'<'=20
-'>='=21
-'<='=22
-'=='=23
-'!='=24
-'!'=25
-'&&'=26
-'||'=27
-'.'=28
-'('=29
-')'=30
-'{'=31
-'}'=32
-';'=33
-','=34
-'class'=35
-'this'=36
-'while'=37
-'do'=38
-'if'=39
-'else'=40
-'for'=41
-'return'=42
-'new'=43
-'null'=47
diff --git a/src/main/java/parser/generated/SimpleJavaBaseListener.java b/src/main/java/parser/generated/SimpleJavaBaseListener.java
deleted file mode 100644
index eecc12f..0000000
--- a/src/main/java/parser/generated/SimpleJavaBaseListener.java
+++ /dev/null
@@ -1,592 +0,0 @@
-// Generated from C:/Users/janni/Desktop/NichtHaskell2.0/src/main/java/parser/grammar/SimpleJava.g4 by ANTLR 4.13.1
-package parser.generated;
-
-import org.antlr.v4.runtime.ParserRuleContext;
-import org.antlr.v4.runtime.tree.ErrorNode;
-import org.antlr.v4.runtime.tree.TerminalNode;
-
-/**
- * This class provides an empty implementation of {@link SimpleJavaListener},
- * which can be extended to create a listener which only needs to handle a subset
- * of the available methods.
- */
-@SuppressWarnings("CheckReturnValue")
-public class SimpleJavaBaseListener implements SimpleJavaListener {
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterProgram(SimpleJavaParser.ProgramContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitProgram(SimpleJavaParser.ProgramContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterClassDeclaration(SimpleJavaParser.ClassDeclarationContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitClassDeclaration(SimpleJavaParser.ClassDeclarationContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterMemberDeclaration(SimpleJavaParser.MemberDeclarationContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitMemberDeclaration(SimpleJavaParser.MemberDeclarationContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterConstructorDeclaration(SimpleJavaParser.ConstructorDeclarationContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitConstructorDeclaration(SimpleJavaParser.ConstructorDeclarationContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterFieldDeclaration(SimpleJavaParser.FieldDeclarationContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitFieldDeclaration(SimpleJavaParser.FieldDeclarationContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterMethodDeclaration(SimpleJavaParser.MethodDeclarationContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitMethodDeclaration(SimpleJavaParser.MethodDeclarationContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterParameterList(SimpleJavaParser.ParameterListContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitParameterList(SimpleJavaParser.ParameterListContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterParameter(SimpleJavaParser.ParameterContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitParameter(SimpleJavaParser.ParameterContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterArgumentList(SimpleJavaParser.ArgumentListContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitArgumentList(SimpleJavaParser.ArgumentListContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterStatement(SimpleJavaParser.StatementContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitStatement(SimpleJavaParser.StatementContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterBlockStatement(SimpleJavaParser.BlockStatementContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitBlockStatement(SimpleJavaParser.BlockStatementContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterReturnStatement(SimpleJavaParser.ReturnStatementContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitReturnStatement(SimpleJavaParser.ReturnStatementContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterLocalVariableDeclaration(SimpleJavaParser.LocalVariableDeclarationContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitLocalVariableDeclaration(SimpleJavaParser.LocalVariableDeclarationContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterWhileStatement(SimpleJavaParser.WhileStatementContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitWhileStatement(SimpleJavaParser.WhileStatementContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterDoWhileStatement(SimpleJavaParser.DoWhileStatementContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitDoWhileStatement(SimpleJavaParser.DoWhileStatementContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterForStatement(SimpleJavaParser.ForStatementContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitForStatement(SimpleJavaParser.ForStatementContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterIfElseStatement(SimpleJavaParser.IfElseStatementContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitIfElseStatement(SimpleJavaParser.IfElseStatementContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterIfStatement(SimpleJavaParser.IfStatementContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitIfStatement(SimpleJavaParser.IfStatementContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterElseIfStatement(SimpleJavaParser.ElseIfStatementContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitElseIfStatement(SimpleJavaParser.ElseIfStatementContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterElseStatement(SimpleJavaParser.ElseStatementContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitElseStatement(SimpleJavaParser.ElseStatementContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterStatementExpression(SimpleJavaParser.StatementExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitStatementExpression(SimpleJavaParser.StatementExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterAssign(SimpleJavaParser.AssignContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitAssign(SimpleJavaParser.AssignContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterNewDeclaration(SimpleJavaParser.NewDeclarationContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitNewDeclaration(SimpleJavaParser.NewDeclarationContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterExpression(SimpleJavaParser.ExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitExpression(SimpleJavaParser.ExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterUnaryExpression(SimpleJavaParser.UnaryExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitUnaryExpression(SimpleJavaParser.UnaryExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterNotExpression(SimpleJavaParser.NotExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitNotExpression(SimpleJavaParser.NotExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterCrementExpression(SimpleJavaParser.CrementExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitCrementExpression(SimpleJavaParser.CrementExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterIncrementExpression(SimpleJavaParser.IncrementExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitIncrementExpression(SimpleJavaParser.IncrementExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterPrefixIncrementExpression(SimpleJavaParser.PrefixIncrementExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitPrefixIncrementExpression(SimpleJavaParser.PrefixIncrementExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterSuffixIncrementExpression(SimpleJavaParser.SuffixIncrementExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitSuffixIncrementExpression(SimpleJavaParser.SuffixIncrementExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterDecrementExpression(SimpleJavaParser.DecrementExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitDecrementExpression(SimpleJavaParser.DecrementExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterPrefixDecrementExpression(SimpleJavaParser.PrefixDecrementExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitPrefixDecrementExpression(SimpleJavaParser.PrefixDecrementExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterSuffixDecrementExpression(SimpleJavaParser.SuffixDecrementExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitSuffixDecrementExpression(SimpleJavaParser.SuffixDecrementExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterAssignableExpression(SimpleJavaParser.AssignableExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitAssignableExpression(SimpleJavaParser.AssignableExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterMemberAccess(SimpleJavaParser.MemberAccessContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitMemberAccess(SimpleJavaParser.MemberAccessContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterBinaryExpression(SimpleJavaParser.BinaryExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitBinaryExpression(SimpleJavaParser.BinaryExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterCalculationExpression(SimpleJavaParser.CalculationExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitCalculationExpression(SimpleJavaParser.CalculationExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterDotExpression(SimpleJavaParser.DotExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitDotExpression(SimpleJavaParser.DotExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterDotSubtractionExpression(SimpleJavaParser.DotSubtractionExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitDotSubtractionExpression(SimpleJavaParser.DotSubtractionExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterNonCalculationExpression(SimpleJavaParser.NonCalculationExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitNonCalculationExpression(SimpleJavaParser.NonCalculationExpressionContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterMethodCall(SimpleJavaParser.MethodCallContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitMethodCall(SimpleJavaParser.MethodCallContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterTarget(SimpleJavaParser.TargetContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitTarget(SimpleJavaParser.TargetContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterChainedMethod(SimpleJavaParser.ChainedMethodContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitChainedMethod(SimpleJavaParser.ChainedMethodContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterType(SimpleJavaParser.TypeContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitType(SimpleJavaParser.TypeContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterValue(SimpleJavaParser.ValueContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitValue(SimpleJavaParser.ValueContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterNonCalculationOperator(SimpleJavaParser.NonCalculationOperatorContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitNonCalculationOperator(SimpleJavaParser.NonCalculationOperatorContext ctx) { }
-
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void enterEveryRule(ParserRuleContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void exitEveryRule(ParserRuleContext ctx) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void visitTerminal(TerminalNode node) { }
- /**
- * {@inheritDoc}
- *
- * The default implementation does nothing.
- */
- @Override public void visitErrorNode(ErrorNode node) { }
-}
\ No newline at end of file
diff --git a/src/main/java/parser/generated/SimpleJavaBaseVisitor.java b/src/main/java/parser/generated/SimpleJavaBaseVisitor.java
deleted file mode 100644
index b3a6029..0000000
--- a/src/main/java/parser/generated/SimpleJavaBaseVisitor.java
+++ /dev/null
@@ -1,337 +0,0 @@
-// Generated from C:/Users/janni/Desktop/NichtHaskell2.0/src/main/java/parser/grammar/SimpleJava.g4 by ANTLR 4.13.1
-package parser.generated;
-import org.antlr.v4.runtime.tree.AbstractParseTreeVisitor;
-
-/**
- * This class provides an empty implementation of {@link SimpleJavaVisitor},
- * which can be extended to create a visitor which only needs to handle a subset
- * of the available methods.
- *
- * @param The return type of the visit operation. Use {@link Void} for
- * operations with no return type.
- */
-@SuppressWarnings("CheckReturnValue")
-public class SimpleJavaBaseVisitor extends AbstractParseTreeVisitor implements SimpleJavaVisitor {
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitProgram(SimpleJavaParser.ProgramContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitClassDeclaration(SimpleJavaParser.ClassDeclarationContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitMemberDeclaration(SimpleJavaParser.MemberDeclarationContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitConstructorDeclaration(SimpleJavaParser.ConstructorDeclarationContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitFieldDeclaration(SimpleJavaParser.FieldDeclarationContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitMethodDeclaration(SimpleJavaParser.MethodDeclarationContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitParameterList(SimpleJavaParser.ParameterListContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitParameter(SimpleJavaParser.ParameterContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitArgumentList(SimpleJavaParser.ArgumentListContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitStatement(SimpleJavaParser.StatementContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitBlockStatement(SimpleJavaParser.BlockStatementContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitReturnStatement(SimpleJavaParser.ReturnStatementContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitLocalVariableDeclaration(SimpleJavaParser.LocalVariableDeclarationContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitWhileStatement(SimpleJavaParser.WhileStatementContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitDoWhileStatement(SimpleJavaParser.DoWhileStatementContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitForStatement(SimpleJavaParser.ForStatementContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitIfElseStatement(SimpleJavaParser.IfElseStatementContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitIfStatement(SimpleJavaParser.IfStatementContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitElseIfStatement(SimpleJavaParser.ElseIfStatementContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitElseStatement(SimpleJavaParser.ElseStatementContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitStatementExpression(SimpleJavaParser.StatementExpressionContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitAssign(SimpleJavaParser.AssignContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitNewDeclaration(SimpleJavaParser.NewDeclarationContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitExpression(SimpleJavaParser.ExpressionContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitUnaryExpression(SimpleJavaParser.UnaryExpressionContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitNotExpression(SimpleJavaParser.NotExpressionContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitCrementExpression(SimpleJavaParser.CrementExpressionContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitIncrementExpression(SimpleJavaParser.IncrementExpressionContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitPrefixIncrementExpression(SimpleJavaParser.PrefixIncrementExpressionContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitSuffixIncrementExpression(SimpleJavaParser.SuffixIncrementExpressionContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitDecrementExpression(SimpleJavaParser.DecrementExpressionContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitPrefixDecrementExpression(SimpleJavaParser.PrefixDecrementExpressionContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitSuffixDecrementExpression(SimpleJavaParser.SuffixDecrementExpressionContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitAssignableExpression(SimpleJavaParser.AssignableExpressionContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitMemberAccess(SimpleJavaParser.MemberAccessContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitBinaryExpression(SimpleJavaParser.BinaryExpressionContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitCalculationExpression(SimpleJavaParser.CalculationExpressionContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitDotExpression(SimpleJavaParser.DotExpressionContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitDotSubtractionExpression(SimpleJavaParser.DotSubtractionExpressionContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitNonCalculationExpression(SimpleJavaParser.NonCalculationExpressionContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitMethodCall(SimpleJavaParser.MethodCallContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitTarget(SimpleJavaParser.TargetContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitChainedMethod(SimpleJavaParser.ChainedMethodContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitType(SimpleJavaParser.TypeContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitValue(SimpleJavaParser.ValueContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitNonCalculationOperator(SimpleJavaParser.NonCalculationOperatorContext ctx) { return visitChildren(ctx); }
-}
\ No newline at end of file
diff --git a/src/main/java/parser/generated/SimpleJavaLexer.interp b/src/main/java/parser/generated/SimpleJavaLexer.interp
deleted file mode 100644
index 61f0ce5..0000000
--- a/src/main/java/parser/generated/SimpleJavaLexer.interp
+++ /dev/null
@@ -1,173 +0,0 @@
-token literal names:
-null
-'++'
-'--'
-'void'
-'boolean'
-'char'
-'int'
-null
-'public static void main(String[] args)'
-null
-null
-null
-null
-'='
-'+'
-'-'
-'*'
-'%'
-'/'
-'>'
-'<'
-'>='
-'<='
-'=='
-'!='
-'!'
-'&&'
-'||'
-'.'
-'('
-')'
-'{'
-'}'
-';'
-','
-'class'
-'this'
-'while'
-'do'
-'if'
-'else'
-'for'
-'return'
-'new'
-null
-null
-null
-'null'
-null
-null
-null
-null
-
-token symbolic names:
-null
-null
-null
-Void
-Boolean
-Char
-Int
-AccessModifier
-MainMethodDeclaration
-DotOperator
-LineOperator
-ComparisonOperator
-LogicalOperator
-Assign
-Plus
-Minus
-Mult
-Modulo
-Div
-Greater
-Less
-GreaterEqual
-LessEqual
-Equal
-NotEqual
-Not
-And
-Or
-Dot
-OpenRoundBracket
-ClosedRoundBracket
-OpenCurlyBracket
-ClosedCurlyBracket
-Semicolon
-Comma
-Class
-This
-While
-Do
-If
-Else
-For
-Return
-New
-CharValue
-IntValue
-BooleanValue
-NullValue
-Identifier
-WS
-InlineComment
-MultilineComment
-
-rule names:
-T__0
-T__1
-Void
-Boolean
-Char
-Int
-AccessModifier
-MainMethodDeclaration
-DotOperator
-LineOperator
-ComparisonOperator
-LogicalOperator
-Assign
-Plus
-Minus
-Mult
-Modulo
-Div
-Greater
-Less
-GreaterEqual
-LessEqual
-Equal
-NotEqual
-Not
-And
-Or
-Dot
-OpenRoundBracket
-ClosedRoundBracket
-OpenCurlyBracket
-ClosedCurlyBracket
-Semicolon
-Comma
-Class
-This
-While
-Do
-If
-Else
-For
-Return
-New
-CharValue
-IntValue
-BooleanValue
-NullValue
-Alphabetic
-Numeric
-ValidIdentSymbols
-Identifier
-WS
-InlineComment
-MultilineComment
-
-channel names:
-DEFAULT_TOKEN_CHANNEL
-HIDDEN
-
-mode names:
-DEFAULT_MODE
-
-atn:
-[4, 0, 51, 413, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 3, 6, 178, 8, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 3, 8, 222, 8, 8, 1, 9, 1, 9, 3, 9, 226, 8, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 3, 10, 234, 8, 10, 1, 11, 1, 11, 3, 11, 238, 8, 11, 1, 12, 1, 12, 1, 13, 1, 13, 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, 20, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 28, 1, 28, 1, 29, 1, 29, 1, 30, 1, 30, 1, 31, 1, 31, 1, 32, 1, 32, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 40, 1, 40, 1, 40, 1, 40, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 1, 42, 1, 43, 1, 43, 5, 43, 335, 8, 43, 10, 43, 12, 43, 338, 9, 43, 1, 43, 1, 43, 1, 44, 3, 44, 343, 8, 44, 1, 44, 4, 44, 346, 8, 44, 11, 44, 12, 44, 347, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 3, 45, 359, 8, 45, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 47, 1, 47, 1, 48, 1, 48, 1, 49, 1, 49, 1, 49, 3, 49, 373, 8, 49, 1, 50, 1, 50, 5, 50, 377, 8, 50, 10, 50, 12, 50, 380, 9, 50, 1, 51, 4, 51, 383, 8, 51, 11, 51, 12, 51, 384, 1, 51, 1, 51, 1, 52, 1, 52, 1, 52, 1, 52, 5, 52, 393, 8, 52, 10, 52, 12, 52, 396, 9, 52, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 1, 53, 5, 53, 404, 8, 53, 10, 53, 12, 53, 407, 9, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 405, 0, 54, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, 37, 75, 38, 77, 39, 79, 40, 81, 41, 83, 42, 85, 43, 87, 44, 89, 45, 91, 46, 93, 47, 95, 0, 97, 0, 99, 0, 101, 48, 103, 49, 105, 50, 107, 51, 1, 0, 5, 2, 0, 10, 10, 13, 13, 2, 0, 65, 90, 97, 122, 1, 0, 48, 57, 2, 0, 36, 36, 95, 95, 3, 0, 9, 10, 13, 13, 32, 32, 431, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 101, 1, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 105, 1, 0, 0, 0, 0, 107, 1, 0, 0, 0, 1, 109, 1, 0, 0, 0, 3, 112, 1, 0, 0, 0, 5, 115, 1, 0, 0, 0, 7, 120, 1, 0, 0, 0, 9, 128, 1, 0, 0, 0, 11, 133, 1, 0, 0, 0, 13, 177, 1, 0, 0, 0, 15, 179, 1, 0, 0, 0, 17, 221, 1, 0, 0, 0, 19, 225, 1, 0, 0, 0, 21, 233, 1, 0, 0, 0, 23, 237, 1, 0, 0, 0, 25, 239, 1, 0, 0, 0, 27, 241, 1, 0, 0, 0, 29, 243, 1, 0, 0, 0, 31, 245, 1, 0, 0, 0, 33, 247, 1, 0, 0, 0, 35, 249, 1, 0, 0, 0, 37, 251, 1, 0, 0, 0, 39, 253, 1, 0, 0, 0, 41, 255, 1, 0, 0, 0, 43, 258, 1, 0, 0, 0, 45, 261, 1, 0, 0, 0, 47, 264, 1, 0, 0, 0, 49, 267, 1, 0, 0, 0, 51, 269, 1, 0, 0, 0, 53, 272, 1, 0, 0, 0, 55, 275, 1, 0, 0, 0, 57, 277, 1, 0, 0, 0, 59, 279, 1, 0, 0, 0, 61, 281, 1, 0, 0, 0, 63, 283, 1, 0, 0, 0, 65, 285, 1, 0, 0, 0, 67, 287, 1, 0, 0, 0, 69, 289, 1, 0, 0, 0, 71, 295, 1, 0, 0, 0, 73, 300, 1, 0, 0, 0, 75, 306, 1, 0, 0, 0, 77, 309, 1, 0, 0, 0, 79, 312, 1, 0, 0, 0, 81, 317, 1, 0, 0, 0, 83, 321, 1, 0, 0, 0, 85, 328, 1, 0, 0, 0, 87, 332, 1, 0, 0, 0, 89, 342, 1, 0, 0, 0, 91, 358, 1, 0, 0, 0, 93, 360, 1, 0, 0, 0, 95, 365, 1, 0, 0, 0, 97, 367, 1, 0, 0, 0, 99, 372, 1, 0, 0, 0, 101, 374, 1, 0, 0, 0, 103, 382, 1, 0, 0, 0, 105, 388, 1, 0, 0, 0, 107, 399, 1, 0, 0, 0, 109, 110, 5, 43, 0, 0, 110, 111, 5, 43, 0, 0, 111, 2, 1, 0, 0, 0, 112, 113, 5, 45, 0, 0, 113, 114, 5, 45, 0, 0, 114, 4, 1, 0, 0, 0, 115, 116, 5, 118, 0, 0, 116, 117, 5, 111, 0, 0, 117, 118, 5, 105, 0, 0, 118, 119, 5, 100, 0, 0, 119, 6, 1, 0, 0, 0, 120, 121, 5, 98, 0, 0, 121, 122, 5, 111, 0, 0, 122, 123, 5, 111, 0, 0, 123, 124, 5, 108, 0, 0, 124, 125, 5, 101, 0, 0, 125, 126, 5, 97, 0, 0, 126, 127, 5, 110, 0, 0, 127, 8, 1, 0, 0, 0, 128, 129, 5, 99, 0, 0, 129, 130, 5, 104, 0, 0, 130, 131, 5, 97, 0, 0, 131, 132, 5, 114, 0, 0, 132, 10, 1, 0, 0, 0, 133, 134, 5, 105, 0, 0, 134, 135, 5, 110, 0, 0, 135, 136, 5, 116, 0, 0, 136, 12, 1, 0, 0, 0, 137, 138, 5, 112, 0, 0, 138, 139, 5, 117, 0, 0, 139, 140, 5, 98, 0, 0, 140, 141, 5, 108, 0, 0, 141, 142, 5, 105, 0, 0, 142, 178, 5, 99, 0, 0, 143, 144, 5, 112, 0, 0, 144, 145, 5, 114, 0, 0, 145, 146, 5, 105, 0, 0, 146, 147, 5, 118, 0, 0, 147, 148, 5, 97, 0, 0, 148, 149, 5, 116, 0, 0, 149, 178, 5, 101, 0, 0, 150, 151, 5, 112, 0, 0, 151, 152, 5, 117, 0, 0, 152, 153, 5, 98, 0, 0, 153, 154, 5, 108, 0, 0, 154, 155, 5, 105, 0, 0, 155, 156, 5, 99, 0, 0, 156, 157, 5, 32, 0, 0, 157, 158, 5, 115, 0, 0, 158, 159, 5, 116, 0, 0, 159, 160, 5, 97, 0, 0, 160, 161, 5, 116, 0, 0, 161, 162, 5, 105, 0, 0, 162, 178, 5, 99, 0, 0, 163, 164, 5, 112, 0, 0, 164, 165, 5, 114, 0, 0, 165, 166, 5, 105, 0, 0, 166, 167, 5, 118, 0, 0, 167, 168, 5, 97, 0, 0, 168, 169, 5, 116, 0, 0, 169, 170, 5, 101, 0, 0, 170, 171, 5, 32, 0, 0, 171, 172, 5, 115, 0, 0, 172, 173, 5, 116, 0, 0, 173, 174, 5, 97, 0, 0, 174, 175, 5, 116, 0, 0, 175, 176, 5, 105, 0, 0, 176, 178, 5, 99, 0, 0, 177, 137, 1, 0, 0, 0, 177, 143, 1, 0, 0, 0, 177, 150, 1, 0, 0, 0, 177, 163, 1, 0, 0, 0, 178, 14, 1, 0, 0, 0, 179, 180, 5, 112, 0, 0, 180, 181, 5, 117, 0, 0, 181, 182, 5, 98, 0, 0, 182, 183, 5, 108, 0, 0, 183, 184, 5, 105, 0, 0, 184, 185, 5, 99, 0, 0, 185, 186, 5, 32, 0, 0, 186, 187, 5, 115, 0, 0, 187, 188, 5, 116, 0, 0, 188, 189, 5, 97, 0, 0, 189, 190, 5, 116, 0, 0, 190, 191, 5, 105, 0, 0, 191, 192, 5, 99, 0, 0, 192, 193, 5, 32, 0, 0, 193, 194, 5, 118, 0, 0, 194, 195, 5, 111, 0, 0, 195, 196, 5, 105, 0, 0, 196, 197, 5, 100, 0, 0, 197, 198, 5, 32, 0, 0, 198, 199, 5, 109, 0, 0, 199, 200, 5, 97, 0, 0, 200, 201, 5, 105, 0, 0, 201, 202, 5, 110, 0, 0, 202, 203, 5, 40, 0, 0, 203, 204, 5, 83, 0, 0, 204, 205, 5, 116, 0, 0, 205, 206, 5, 114, 0, 0, 206, 207, 5, 105, 0, 0, 207, 208, 5, 110, 0, 0, 208, 209, 5, 103, 0, 0, 209, 210, 5, 91, 0, 0, 210, 211, 5, 93, 0, 0, 211, 212, 5, 32, 0, 0, 212, 213, 5, 97, 0, 0, 213, 214, 5, 114, 0, 0, 214, 215, 5, 103, 0, 0, 215, 216, 5, 115, 0, 0, 216, 217, 5, 41, 0, 0, 217, 16, 1, 0, 0, 0, 218, 222, 3, 31, 15, 0, 219, 222, 3, 35, 17, 0, 220, 222, 3, 33, 16, 0, 221, 218, 1, 0, 0, 0, 221, 219, 1, 0, 0, 0, 221, 220, 1, 0, 0, 0, 222, 18, 1, 0, 0, 0, 223, 226, 3, 27, 13, 0, 224, 226, 3, 29, 14, 0, 225, 223, 1, 0, 0, 0, 225, 224, 1, 0, 0, 0, 226, 20, 1, 0, 0, 0, 227, 234, 3, 37, 18, 0, 228, 234, 3, 39, 19, 0, 229, 234, 3, 41, 20, 0, 230, 234, 3, 43, 21, 0, 231, 234, 3, 45, 22, 0, 232, 234, 3, 47, 23, 0, 233, 227, 1, 0, 0, 0, 233, 228, 1, 0, 0, 0, 233, 229, 1, 0, 0, 0, 233, 230, 1, 0, 0, 0, 233, 231, 1, 0, 0, 0, 233, 232, 1, 0, 0, 0, 234, 22, 1, 0, 0, 0, 235, 238, 3, 51, 25, 0, 236, 238, 3, 53, 26, 0, 237, 235, 1, 0, 0, 0, 237, 236, 1, 0, 0, 0, 238, 24, 1, 0, 0, 0, 239, 240, 5, 61, 0, 0, 240, 26, 1, 0, 0, 0, 241, 242, 5, 43, 0, 0, 242, 28, 1, 0, 0, 0, 243, 244, 5, 45, 0, 0, 244, 30, 1, 0, 0, 0, 245, 246, 5, 42, 0, 0, 246, 32, 1, 0, 0, 0, 247, 248, 5, 37, 0, 0, 248, 34, 1, 0, 0, 0, 249, 250, 5, 47, 0, 0, 250, 36, 1, 0, 0, 0, 251, 252, 5, 62, 0, 0, 252, 38, 1, 0, 0, 0, 253, 254, 5, 60, 0, 0, 254, 40, 1, 0, 0, 0, 255, 256, 5, 62, 0, 0, 256, 257, 5, 61, 0, 0, 257, 42, 1, 0, 0, 0, 258, 259, 5, 60, 0, 0, 259, 260, 5, 61, 0, 0, 260, 44, 1, 0, 0, 0, 261, 262, 5, 61, 0, 0, 262, 263, 5, 61, 0, 0, 263, 46, 1, 0, 0, 0, 264, 265, 5, 33, 0, 0, 265, 266, 5, 61, 0, 0, 266, 48, 1, 0, 0, 0, 267, 268, 5, 33, 0, 0, 268, 50, 1, 0, 0, 0, 269, 270, 5, 38, 0, 0, 270, 271, 5, 38, 0, 0, 271, 52, 1, 0, 0, 0, 272, 273, 5, 124, 0, 0, 273, 274, 5, 124, 0, 0, 274, 54, 1, 0, 0, 0, 275, 276, 5, 46, 0, 0, 276, 56, 1, 0, 0, 0, 277, 278, 5, 40, 0, 0, 278, 58, 1, 0, 0, 0, 279, 280, 5, 41, 0, 0, 280, 60, 1, 0, 0, 0, 281, 282, 5, 123, 0, 0, 282, 62, 1, 0, 0, 0, 283, 284, 5, 125, 0, 0, 284, 64, 1, 0, 0, 0, 285, 286, 5, 59, 0, 0, 286, 66, 1, 0, 0, 0, 287, 288, 5, 44, 0, 0, 288, 68, 1, 0, 0, 0, 289, 290, 5, 99, 0, 0, 290, 291, 5, 108, 0, 0, 291, 292, 5, 97, 0, 0, 292, 293, 5, 115, 0, 0, 293, 294, 5, 115, 0, 0, 294, 70, 1, 0, 0, 0, 295, 296, 5, 116, 0, 0, 296, 297, 5, 104, 0, 0, 297, 298, 5, 105, 0, 0, 298, 299, 5, 115, 0, 0, 299, 72, 1, 0, 0, 0, 300, 301, 5, 119, 0, 0, 301, 302, 5, 104, 0, 0, 302, 303, 5, 105, 0, 0, 303, 304, 5, 108, 0, 0, 304, 305, 5, 101, 0, 0, 305, 74, 1, 0, 0, 0, 306, 307, 5, 100, 0, 0, 307, 308, 5, 111, 0, 0, 308, 76, 1, 0, 0, 0, 309, 310, 5, 105, 0, 0, 310, 311, 5, 102, 0, 0, 311, 78, 1, 0, 0, 0, 312, 313, 5, 101, 0, 0, 313, 314, 5, 108, 0, 0, 314, 315, 5, 115, 0, 0, 315, 316, 5, 101, 0, 0, 316, 80, 1, 0, 0, 0, 317, 318, 5, 102, 0, 0, 318, 319, 5, 111, 0, 0, 319, 320, 5, 114, 0, 0, 320, 82, 1, 0, 0, 0, 321, 322, 5, 114, 0, 0, 322, 323, 5, 101, 0, 0, 323, 324, 5, 116, 0, 0, 324, 325, 5, 117, 0, 0, 325, 326, 5, 114, 0, 0, 326, 327, 5, 110, 0, 0, 327, 84, 1, 0, 0, 0, 328, 329, 5, 110, 0, 0, 329, 330, 5, 101, 0, 0, 330, 331, 5, 119, 0, 0, 331, 86, 1, 0, 0, 0, 332, 336, 5, 39, 0, 0, 333, 335, 8, 0, 0, 0, 334, 333, 1, 0, 0, 0, 335, 338, 1, 0, 0, 0, 336, 334, 1, 0, 0, 0, 336, 337, 1, 0, 0, 0, 337, 339, 1, 0, 0, 0, 338, 336, 1, 0, 0, 0, 339, 340, 5, 39, 0, 0, 340, 88, 1, 0, 0, 0, 341, 343, 3, 29, 14, 0, 342, 341, 1, 0, 0, 0, 342, 343, 1, 0, 0, 0, 343, 345, 1, 0, 0, 0, 344, 346, 3, 97, 48, 0, 345, 344, 1, 0, 0, 0, 346, 347, 1, 0, 0, 0, 347, 345, 1, 0, 0, 0, 347, 348, 1, 0, 0, 0, 348, 90, 1, 0, 0, 0, 349, 350, 5, 116, 0, 0, 350, 351, 5, 114, 0, 0, 351, 352, 5, 117, 0, 0, 352, 359, 5, 101, 0, 0, 353, 354, 5, 102, 0, 0, 354, 355, 5, 97, 0, 0, 355, 356, 5, 108, 0, 0, 356, 357, 5, 115, 0, 0, 357, 359, 5, 101, 0, 0, 358, 349, 1, 0, 0, 0, 358, 353, 1, 0, 0, 0, 359, 92, 1, 0, 0, 0, 360, 361, 5, 110, 0, 0, 361, 362, 5, 117, 0, 0, 362, 363, 5, 108, 0, 0, 363, 364, 5, 108, 0, 0, 364, 94, 1, 0, 0, 0, 365, 366, 7, 1, 0, 0, 366, 96, 1, 0, 0, 0, 367, 368, 7, 2, 0, 0, 368, 98, 1, 0, 0, 0, 369, 373, 3, 95, 47, 0, 370, 373, 3, 97, 48, 0, 371, 373, 7, 3, 0, 0, 372, 369, 1, 0, 0, 0, 372, 370, 1, 0, 0, 0, 372, 371, 1, 0, 0, 0, 373, 100, 1, 0, 0, 0, 374, 378, 3, 95, 47, 0, 375, 377, 3, 99, 49, 0, 376, 375, 1, 0, 0, 0, 377, 380, 1, 0, 0, 0, 378, 376, 1, 0, 0, 0, 378, 379, 1, 0, 0, 0, 379, 102, 1, 0, 0, 0, 380, 378, 1, 0, 0, 0, 381, 383, 7, 4, 0, 0, 382, 381, 1, 0, 0, 0, 383, 384, 1, 0, 0, 0, 384, 382, 1, 0, 0, 0, 384, 385, 1, 0, 0, 0, 385, 386, 1, 0, 0, 0, 386, 387, 6, 51, 0, 0, 387, 104, 1, 0, 0, 0, 388, 389, 5, 47, 0, 0, 389, 390, 5, 47, 0, 0, 390, 394, 1, 0, 0, 0, 391, 393, 8, 0, 0, 0, 392, 391, 1, 0, 0, 0, 393, 396, 1, 0, 0, 0, 394, 392, 1, 0, 0, 0, 394, 395, 1, 0, 0, 0, 395, 397, 1, 0, 0, 0, 396, 394, 1, 0, 0, 0, 397, 398, 6, 52, 0, 0, 398, 106, 1, 0, 0, 0, 399, 400, 5, 47, 0, 0, 400, 401, 5, 42, 0, 0, 401, 405, 1, 0, 0, 0, 402, 404, 9, 0, 0, 0, 403, 402, 1, 0, 0, 0, 404, 407, 1, 0, 0, 0, 405, 406, 1, 0, 0, 0, 405, 403, 1, 0, 0, 0, 406, 408, 1, 0, 0, 0, 407, 405, 1, 0, 0, 0, 408, 409, 5, 42, 0, 0, 409, 410, 5, 47, 0, 0, 410, 411, 1, 0, 0, 0, 411, 412, 6, 53, 0, 0, 412, 108, 1, 0, 0, 0, 15, 0, 177, 221, 225, 233, 237, 336, 342, 347, 358, 372, 378, 384, 394, 405, 1, 6, 0, 0]
\ No newline at end of file
diff --git a/src/main/java/parser/generated/SimpleJavaLexer.java b/src/main/java/parser/generated/SimpleJavaLexer.java
deleted file mode 100644
index 23296ee..0000000
--- a/src/main/java/parser/generated/SimpleJavaLexer.java
+++ /dev/null
@@ -1,397 +0,0 @@
-// Generated from C:/Users/janni/Desktop/NichtHaskell2.0/src/main/java/parser/grammar/SimpleJava.g4 by ANTLR 4.13.1
-package parser.generated;
-import org.antlr.v4.runtime.Lexer;
-import org.antlr.v4.runtime.CharStream;
-import org.antlr.v4.runtime.Token;
-import org.antlr.v4.runtime.TokenStream;
-import org.antlr.v4.runtime.*;
-import org.antlr.v4.runtime.atn.*;
-import org.antlr.v4.runtime.dfa.DFA;
-import org.antlr.v4.runtime.misc.*;
-
-@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast", "CheckReturnValue", "this-escape"})
-public class SimpleJavaLexer extends Lexer {
- static { RuntimeMetaData.checkVersion("4.13.1", RuntimeMetaData.VERSION); }
-
- protected static final DFA[] _decisionToDFA;
- protected static final PredictionContextCache _sharedContextCache =
- new PredictionContextCache();
- public static final int
- T__0=1, T__1=2, Void=3, Boolean=4, Char=5, Int=6, AccessModifier=7, MainMethodDeclaration=8,
- DotOperator=9, LineOperator=10, ComparisonOperator=11, LogicalOperator=12,
- Assign=13, Plus=14, Minus=15, Mult=16, Modulo=17, Div=18, Greater=19,
- Less=20, GreaterEqual=21, LessEqual=22, Equal=23, NotEqual=24, Not=25,
- And=26, Or=27, Dot=28, OpenRoundBracket=29, ClosedRoundBracket=30, OpenCurlyBracket=31,
- ClosedCurlyBracket=32, Semicolon=33, Comma=34, Class=35, This=36, While=37,
- Do=38, If=39, Else=40, For=41, Return=42, New=43, CharValue=44, IntValue=45,
- BooleanValue=46, NullValue=47, Identifier=48, WS=49, InlineComment=50,
- MultilineComment=51;
- public static String[] channelNames = {
- "DEFAULT_TOKEN_CHANNEL", "HIDDEN"
- };
-
- public static String[] modeNames = {
- "DEFAULT_MODE"
- };
-
- private static String[] makeRuleNames() {
- return new String[] {
- "T__0", "T__1", "Void", "Boolean", "Char", "Int", "AccessModifier", "MainMethodDeclaration",
- "DotOperator", "LineOperator", "ComparisonOperator", "LogicalOperator",
- "Assign", "Plus", "Minus", "Mult", "Modulo", "Div", "Greater", "Less",
- "GreaterEqual", "LessEqual", "Equal", "NotEqual", "Not", "And", "Or",
- "Dot", "OpenRoundBracket", "ClosedRoundBracket", "OpenCurlyBracket",
- "ClosedCurlyBracket", "Semicolon", "Comma", "Class", "This", "While",
- "Do", "If", "Else", "For", "Return", "New", "CharValue", "IntValue",
- "BooleanValue", "NullValue", "Alphabetic", "Numeric", "ValidIdentSymbols",
- "Identifier", "WS", "InlineComment", "MultilineComment"
- };
- }
- public static final String[] ruleNames = makeRuleNames();
-
- private static String[] makeLiteralNames() {
- return new String[] {
- null, "'++'", "'--'", "'void'", "'boolean'", "'char'", "'int'", null,
- "'public static void main(String[] args)'", null, null, null, null, "'='",
- "'+'", "'-'", "'*'", "'%'", "'/'", "'>'", "'<'", "'>='", "'<='", "'=='",
- "'!='", "'!'", "'&&'", "'||'", "'.'", "'('", "')'", "'{'", "'}'", "';'",
- "','", "'class'", "'this'", "'while'", "'do'", "'if'", "'else'", "'for'",
- "'return'", "'new'", null, null, null, "'null'"
- };
- }
- private static final String[] _LITERAL_NAMES = makeLiteralNames();
- private static String[] makeSymbolicNames() {
- return new String[] {
- null, null, null, "Void", "Boolean", "Char", "Int", "AccessModifier",
- "MainMethodDeclaration", "DotOperator", "LineOperator", "ComparisonOperator",
- "LogicalOperator", "Assign", "Plus", "Minus", "Mult", "Modulo", "Div",
- "Greater", "Less", "GreaterEqual", "LessEqual", "Equal", "NotEqual",
- "Not", "And", "Or", "Dot", "OpenRoundBracket", "ClosedRoundBracket",
- "OpenCurlyBracket", "ClosedCurlyBracket", "Semicolon", "Comma", "Class",
- "This", "While", "Do", "If", "Else", "For", "Return", "New", "CharValue",
- "IntValue", "BooleanValue", "NullValue", "Identifier", "WS", "InlineComment",
- "MultilineComment"
- };
- }
- private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames();
- public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
-
- /**
- * @deprecated Use {@link #VOCABULARY} instead.
- */
- @Deprecated
- public static final String[] tokenNames;
- static {
- tokenNames = new String[_SYMBOLIC_NAMES.length];
- for (int i = 0; i < tokenNames.length; i++) {
- tokenNames[i] = VOCABULARY.getLiteralName(i);
- if (tokenNames[i] == null) {
- tokenNames[i] = VOCABULARY.getSymbolicName(i);
- }
-
- if (tokenNames[i] == null) {
- tokenNames[i] = "";
- }
- }
- }
-
- @Override
- @Deprecated
- public String[] getTokenNames() {
- return tokenNames;
- }
-
- @Override
-
- public Vocabulary getVocabulary() {
- return VOCABULARY;
- }
-
-
- public SimpleJavaLexer(CharStream input) {
- super(input);
- _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
- }
-
- @Override
- public String getGrammarFileName() { return "SimpleJava.g4"; }
-
- @Override
- public String[] getRuleNames() { return ruleNames; }
-
- @Override
- public String getSerializedATN() { return _serializedATN; }
-
- @Override
- public String[] getChannelNames() { return channelNames; }
-
- @Override
- public String[] getModeNames() { return modeNames; }
-
- @Override
- public ATN getATN() { return _ATN; }
-
- public static final String _serializedATN =
- "\u0004\u00003\u019d\u0006\uffff\uffff\u0002\u0000\u0007\u0000\u0002\u0001"+
- "\u0007\u0001\u0002\u0002\u0007\u0002\u0002\u0003\u0007\u0003\u0002\u0004"+
- "\u0007\u0004\u0002\u0005\u0007\u0005\u0002\u0006\u0007\u0006\u0002\u0007"+
- "\u0007\u0007\u0002\b\u0007\b\u0002\t\u0007\t\u0002\n\u0007\n\u0002\u000b"+
- "\u0007\u000b\u0002\f\u0007\f\u0002\r\u0007\r\u0002\u000e\u0007\u000e\u0002"+
- "\u000f\u0007\u000f\u0002\u0010\u0007\u0010\u0002\u0011\u0007\u0011\u0002"+
- "\u0012\u0007\u0012\u0002\u0013\u0007\u0013\u0002\u0014\u0007\u0014\u0002"+
- "\u0015\u0007\u0015\u0002\u0016\u0007\u0016\u0002\u0017\u0007\u0017\u0002"+
- "\u0018\u0007\u0018\u0002\u0019\u0007\u0019\u0002\u001a\u0007\u001a\u0002"+
- "\u001b\u0007\u001b\u0002\u001c\u0007\u001c\u0002\u001d\u0007\u001d\u0002"+
- "\u001e\u0007\u001e\u0002\u001f\u0007\u001f\u0002 \u0007 \u0002!\u0007"+
- "!\u0002\"\u0007\"\u0002#\u0007#\u0002$\u0007$\u0002%\u0007%\u0002&\u0007"+
- "&\u0002\'\u0007\'\u0002(\u0007(\u0002)\u0007)\u0002*\u0007*\u0002+\u0007"+
- "+\u0002,\u0007,\u0002-\u0007-\u0002.\u0007.\u0002/\u0007/\u00020\u0007"+
- "0\u00021\u00071\u00022\u00072\u00023\u00073\u00024\u00074\u00025\u0007"+
- "5\u0001\u0000\u0001\u0000\u0001\u0000\u0001\u0001\u0001\u0001\u0001\u0001"+
- "\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0003"+
- "\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003"+
- "\u0001\u0003\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004"+
- "\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0006\u0001\u0006"+
- "\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006"+
- "\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006"+
- "\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006"+
- "\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006"+
- "\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006"+
- "\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006"+
- "\u0001\u0006\u0001\u0006\u0003\u0006\u00b2\b\u0006\u0001\u0007\u0001\u0007"+
- "\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007"+
- "\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007"+
- "\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007"+
- "\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007"+
- "\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007"+
- "\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007"+
- "\u0001\u0007\u0001\b\u0001\b\u0001\b\u0003\b\u00de\b\b\u0001\t\u0001\t"+
- "\u0003\t\u00e2\b\t\u0001\n\u0001\n\u0001\n\u0001\n\u0001\n\u0001\n\u0003"+
- "\n\u00ea\b\n\u0001\u000b\u0001\u000b\u0003\u000b\u00ee\b\u000b\u0001\f"+
- "\u0001\f\u0001\r\u0001\r\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\u0014\u0001\u0015"+
- "\u0001\u0015\u0001\u0015\u0001\u0016\u0001\u0016\u0001\u0016\u0001\u0017"+
- "\u0001\u0017\u0001\u0017\u0001\u0018\u0001\u0018\u0001\u0019\u0001\u0019"+
- "\u0001\u0019\u0001\u001a\u0001\u001a\u0001\u001a\u0001\u001b\u0001\u001b"+
- "\u0001\u001c\u0001\u001c\u0001\u001d\u0001\u001d\u0001\u001e\u0001\u001e"+
- "\u0001\u001f\u0001\u001f\u0001 \u0001 \u0001!\u0001!\u0001\"\u0001\"\u0001"+
- "\"\u0001\"\u0001\"\u0001\"\u0001#\u0001#\u0001#\u0001#\u0001#\u0001$\u0001"+
- "$\u0001$\u0001$\u0001$\u0001$\u0001%\u0001%\u0001%\u0001&\u0001&\u0001"+
- "&\u0001\'\u0001\'\u0001\'\u0001\'\u0001\'\u0001(\u0001(\u0001(\u0001("+
- "\u0001)\u0001)\u0001)\u0001)\u0001)\u0001)\u0001)\u0001*\u0001*\u0001"+
- "*\u0001*\u0001+\u0001+\u0005+\u014f\b+\n+\f+\u0152\t+\u0001+\u0001+\u0001"+
- ",\u0003,\u0157\b,\u0001,\u0004,\u015a\b,\u000b,\f,\u015b\u0001-\u0001"+
- "-\u0001-\u0001-\u0001-\u0001-\u0001-\u0001-\u0001-\u0003-\u0167\b-\u0001"+
- ".\u0001.\u0001.\u0001.\u0001.\u0001/\u0001/\u00010\u00010\u00011\u0001"+
- "1\u00011\u00031\u0175\b1\u00012\u00012\u00052\u0179\b2\n2\f2\u017c\t2"+
- "\u00013\u00043\u017f\b3\u000b3\f3\u0180\u00013\u00013\u00014\u00014\u0001"+
- "4\u00014\u00054\u0189\b4\n4\f4\u018c\t4\u00014\u00014\u00015\u00015\u0001"+
- "5\u00015\u00055\u0194\b5\n5\f5\u0197\t5\u00015\u00015\u00015\u00015\u0001"+
- "5\u0001\u0195\u00006\u0001\u0001\u0003\u0002\u0005\u0003\u0007\u0004\t"+
- "\u0005\u000b\u0006\r\u0007\u000f\b\u0011\t\u0013\n\u0015\u000b\u0017\f"+
- "\u0019\r\u001b\u000e\u001d\u000f\u001f\u0010!\u0011#\u0012%\u0013\'\u0014"+
- ")\u0015+\u0016-\u0017/\u00181\u00193\u001a5\u001b7\u001c9\u001d;\u001e"+
- "=\u001f? A!C\"E#G$I%K&M\'O(Q)S*U+W,Y-[.]/_\u0000a\u0000c\u0000e0g1i2k"+
- "3\u0001\u0000\u0005\u0002\u0000\n\n\r\r\u0002\u0000AZaz\u0001\u000009"+
- "\u0002\u0000$$__\u0003\u0000\t\n\r\r \u01af\u0000\u0001\u0001\u0000\u0000"+
- "\u0000\u0000\u0003\u0001\u0000\u0000\u0000\u0000\u0005\u0001\u0000\u0000"+
- "\u0000\u0000\u0007\u0001\u0000\u0000\u0000\u0000\t\u0001\u0000\u0000\u0000"+
- "\u0000\u000b\u0001\u0000\u0000\u0000\u0000\r\u0001\u0000\u0000\u0000\u0000"+
- "\u000f\u0001\u0000\u0000\u0000\u0000\u0011\u0001\u0000\u0000\u0000\u0000"+
- "\u0013\u0001\u0000\u0000\u0000\u0000\u0015\u0001\u0000\u0000\u0000\u0000"+
- "\u0017\u0001\u0000\u0000\u0000\u0000\u0019\u0001\u0000\u0000\u0000\u0000"+
- "\u001b\u0001\u0000\u0000\u0000\u0000\u001d\u0001\u0000\u0000\u0000\u0000"+
- "\u001f\u0001\u0000\u0000\u0000\u0000!\u0001\u0000\u0000\u0000\u0000#\u0001"+
- "\u0000\u0000\u0000\u0000%\u0001\u0000\u0000\u0000\u0000\'\u0001\u0000"+
- "\u0000\u0000\u0000)\u0001\u0000\u0000\u0000\u0000+\u0001\u0000\u0000\u0000"+
- "\u0000-\u0001\u0000\u0000\u0000\u0000/\u0001\u0000\u0000\u0000\u00001"+
- "\u0001\u0000\u0000\u0000\u00003\u0001\u0000\u0000\u0000\u00005\u0001\u0000"+
- "\u0000\u0000\u00007\u0001\u0000\u0000\u0000\u00009\u0001\u0000\u0000\u0000"+
- "\u0000;\u0001\u0000\u0000\u0000\u0000=\u0001\u0000\u0000\u0000\u0000?"+
- "\u0001\u0000\u0000\u0000\u0000A\u0001\u0000\u0000\u0000\u0000C\u0001\u0000"+
- "\u0000\u0000\u0000E\u0001\u0000\u0000\u0000\u0000G\u0001\u0000\u0000\u0000"+
- "\u0000I\u0001\u0000\u0000\u0000\u0000K\u0001\u0000\u0000\u0000\u0000M"+
- "\u0001\u0000\u0000\u0000\u0000O\u0001\u0000\u0000\u0000\u0000Q\u0001\u0000"+
- "\u0000\u0000\u0000S\u0001\u0000\u0000\u0000\u0000U\u0001\u0000\u0000\u0000"+
- "\u0000W\u0001\u0000\u0000\u0000\u0000Y\u0001\u0000\u0000\u0000\u0000["+
- "\u0001\u0000\u0000\u0000\u0000]\u0001\u0000\u0000\u0000\u0000e\u0001\u0000"+
- "\u0000\u0000\u0000g\u0001\u0000\u0000\u0000\u0000i\u0001\u0000\u0000\u0000"+
- "\u0000k\u0001\u0000\u0000\u0000\u0001m\u0001\u0000\u0000\u0000\u0003p"+
- "\u0001\u0000\u0000\u0000\u0005s\u0001\u0000\u0000\u0000\u0007x\u0001\u0000"+
- "\u0000\u0000\t\u0080\u0001\u0000\u0000\u0000\u000b\u0085\u0001\u0000\u0000"+
- "\u0000\r\u00b1\u0001\u0000\u0000\u0000\u000f\u00b3\u0001\u0000\u0000\u0000"+
- "\u0011\u00dd\u0001\u0000\u0000\u0000\u0013\u00e1\u0001\u0000\u0000\u0000"+
- "\u0015\u00e9\u0001\u0000\u0000\u0000\u0017\u00ed\u0001\u0000\u0000\u0000"+
- "\u0019\u00ef\u0001\u0000\u0000\u0000\u001b\u00f1\u0001\u0000\u0000\u0000"+
- "\u001d\u00f3\u0001\u0000\u0000\u0000\u001f\u00f5\u0001\u0000\u0000\u0000"+
- "!\u00f7\u0001\u0000\u0000\u0000#\u00f9\u0001\u0000\u0000\u0000%\u00fb"+
- "\u0001\u0000\u0000\u0000\'\u00fd\u0001\u0000\u0000\u0000)\u00ff\u0001"+
- "\u0000\u0000\u0000+\u0102\u0001\u0000\u0000\u0000-\u0105\u0001\u0000\u0000"+
- "\u0000/\u0108\u0001\u0000\u0000\u00001\u010b\u0001\u0000\u0000\u00003"+
- "\u010d\u0001\u0000\u0000\u00005\u0110\u0001\u0000\u0000\u00007\u0113\u0001"+
- "\u0000\u0000\u00009\u0115\u0001\u0000\u0000\u0000;\u0117\u0001\u0000\u0000"+
- "\u0000=\u0119\u0001\u0000\u0000\u0000?\u011b\u0001\u0000\u0000\u0000A"+
- "\u011d\u0001\u0000\u0000\u0000C\u011f\u0001\u0000\u0000\u0000E\u0121\u0001"+
- "\u0000\u0000\u0000G\u0127\u0001\u0000\u0000\u0000I\u012c\u0001\u0000\u0000"+
- "\u0000K\u0132\u0001\u0000\u0000\u0000M\u0135\u0001\u0000\u0000\u0000O"+
- "\u0138\u0001\u0000\u0000\u0000Q\u013d\u0001\u0000\u0000\u0000S\u0141\u0001"+
- "\u0000\u0000\u0000U\u0148\u0001\u0000\u0000\u0000W\u014c\u0001\u0000\u0000"+
- "\u0000Y\u0156\u0001\u0000\u0000\u0000[\u0166\u0001\u0000\u0000\u0000]"+
- "\u0168\u0001\u0000\u0000\u0000_\u016d\u0001\u0000\u0000\u0000a\u016f\u0001"+
- "\u0000\u0000\u0000c\u0174\u0001\u0000\u0000\u0000e\u0176\u0001\u0000\u0000"+
- "\u0000g\u017e\u0001\u0000\u0000\u0000i\u0184\u0001\u0000\u0000\u0000k"+
- "\u018f\u0001\u0000\u0000\u0000mn\u0005+\u0000\u0000no\u0005+\u0000\u0000"+
- "o\u0002\u0001\u0000\u0000\u0000pq\u0005-\u0000\u0000qr\u0005-\u0000\u0000"+
- "r\u0004\u0001\u0000\u0000\u0000st\u0005v\u0000\u0000tu\u0005o\u0000\u0000"+
- "uv\u0005i\u0000\u0000vw\u0005d\u0000\u0000w\u0006\u0001\u0000\u0000\u0000"+
- "xy\u0005b\u0000\u0000yz\u0005o\u0000\u0000z{\u0005o\u0000\u0000{|\u0005"+
- "l\u0000\u0000|}\u0005e\u0000\u0000}~\u0005a\u0000\u0000~\u007f\u0005n"+
- "\u0000\u0000\u007f\b\u0001\u0000\u0000\u0000\u0080\u0081\u0005c\u0000"+
- "\u0000\u0081\u0082\u0005h\u0000\u0000\u0082\u0083\u0005a\u0000\u0000\u0083"+
- "\u0084\u0005r\u0000\u0000\u0084\n\u0001\u0000\u0000\u0000\u0085\u0086"+
- "\u0005i\u0000\u0000\u0086\u0087\u0005n\u0000\u0000\u0087\u0088\u0005t"+
- "\u0000\u0000\u0088\f\u0001\u0000\u0000\u0000\u0089\u008a\u0005p\u0000"+
- "\u0000\u008a\u008b\u0005u\u0000\u0000\u008b\u008c\u0005b\u0000\u0000\u008c"+
- "\u008d\u0005l\u0000\u0000\u008d\u008e\u0005i\u0000\u0000\u008e\u00b2\u0005"+
- "c\u0000\u0000\u008f\u0090\u0005p\u0000\u0000\u0090\u0091\u0005r\u0000"+
- "\u0000\u0091\u0092\u0005i\u0000\u0000\u0092\u0093\u0005v\u0000\u0000\u0093"+
- "\u0094\u0005a\u0000\u0000\u0094\u0095\u0005t\u0000\u0000\u0095\u00b2\u0005"+
- "e\u0000\u0000\u0096\u0097\u0005p\u0000\u0000\u0097\u0098\u0005u\u0000"+
- "\u0000\u0098\u0099\u0005b\u0000\u0000\u0099\u009a\u0005l\u0000\u0000\u009a"+
- "\u009b\u0005i\u0000\u0000\u009b\u009c\u0005c\u0000\u0000\u009c\u009d\u0005"+
- " \u0000\u0000\u009d\u009e\u0005s\u0000\u0000\u009e\u009f\u0005t\u0000"+
- "\u0000\u009f\u00a0\u0005a\u0000\u0000\u00a0\u00a1\u0005t\u0000\u0000\u00a1"+
- "\u00a2\u0005i\u0000\u0000\u00a2\u00b2\u0005c\u0000\u0000\u00a3\u00a4\u0005"+
- "p\u0000\u0000\u00a4\u00a5\u0005r\u0000\u0000\u00a5\u00a6\u0005i\u0000"+
- "\u0000\u00a6\u00a7\u0005v\u0000\u0000\u00a7\u00a8\u0005a\u0000\u0000\u00a8"+
- "\u00a9\u0005t\u0000\u0000\u00a9\u00aa\u0005e\u0000\u0000\u00aa\u00ab\u0005"+
- " \u0000\u0000\u00ab\u00ac\u0005s\u0000\u0000\u00ac\u00ad\u0005t\u0000"+
- "\u0000\u00ad\u00ae\u0005a\u0000\u0000\u00ae\u00af\u0005t\u0000\u0000\u00af"+
- "\u00b0\u0005i\u0000\u0000\u00b0\u00b2\u0005c\u0000\u0000\u00b1\u0089\u0001"+
- "\u0000\u0000\u0000\u00b1\u008f\u0001\u0000\u0000\u0000\u00b1\u0096\u0001"+
- "\u0000\u0000\u0000\u00b1\u00a3\u0001\u0000\u0000\u0000\u00b2\u000e\u0001"+
- "\u0000\u0000\u0000\u00b3\u00b4\u0005p\u0000\u0000\u00b4\u00b5\u0005u\u0000"+
- "\u0000\u00b5\u00b6\u0005b\u0000\u0000\u00b6\u00b7\u0005l\u0000\u0000\u00b7"+
- "\u00b8\u0005i\u0000\u0000\u00b8\u00b9\u0005c\u0000\u0000\u00b9\u00ba\u0005"+
- " \u0000\u0000\u00ba\u00bb\u0005s\u0000\u0000\u00bb\u00bc\u0005t\u0000"+
- "\u0000\u00bc\u00bd\u0005a\u0000\u0000\u00bd\u00be\u0005t\u0000\u0000\u00be"+
- "\u00bf\u0005i\u0000\u0000\u00bf\u00c0\u0005c\u0000\u0000\u00c0\u00c1\u0005"+
- " \u0000\u0000\u00c1\u00c2\u0005v\u0000\u0000\u00c2\u00c3\u0005o\u0000"+
- "\u0000\u00c3\u00c4\u0005i\u0000\u0000\u00c4\u00c5\u0005d\u0000\u0000\u00c5"+
- "\u00c6\u0005 \u0000\u0000\u00c6\u00c7\u0005m\u0000\u0000\u00c7\u00c8\u0005"+
- "a\u0000\u0000\u00c8\u00c9\u0005i\u0000\u0000\u00c9\u00ca\u0005n\u0000"+
- "\u0000\u00ca\u00cb\u0005(\u0000\u0000\u00cb\u00cc\u0005S\u0000\u0000\u00cc"+
- "\u00cd\u0005t\u0000\u0000\u00cd\u00ce\u0005r\u0000\u0000\u00ce\u00cf\u0005"+
- "i\u0000\u0000\u00cf\u00d0\u0005n\u0000\u0000\u00d0\u00d1\u0005g\u0000"+
- "\u0000\u00d1\u00d2\u0005[\u0000\u0000\u00d2\u00d3\u0005]\u0000\u0000\u00d3"+
- "\u00d4\u0005 \u0000\u0000\u00d4\u00d5\u0005a\u0000\u0000\u00d5\u00d6\u0005"+
- "r\u0000\u0000\u00d6\u00d7\u0005g\u0000\u0000\u00d7\u00d8\u0005s\u0000"+
- "\u0000\u00d8\u00d9\u0005)\u0000\u0000\u00d9\u0010\u0001\u0000\u0000\u0000"+
- "\u00da\u00de\u0003\u001f\u000f\u0000\u00db\u00de\u0003#\u0011\u0000\u00dc"+
- "\u00de\u0003!\u0010\u0000\u00dd\u00da\u0001\u0000\u0000\u0000\u00dd\u00db"+
- "\u0001\u0000\u0000\u0000\u00dd\u00dc\u0001\u0000\u0000\u0000\u00de\u0012"+
- "\u0001\u0000\u0000\u0000\u00df\u00e2\u0003\u001b\r\u0000\u00e0\u00e2\u0003"+
- "\u001d\u000e\u0000\u00e1\u00df\u0001\u0000\u0000\u0000\u00e1\u00e0\u0001"+
- "\u0000\u0000\u0000\u00e2\u0014\u0001\u0000\u0000\u0000\u00e3\u00ea\u0003"+
- "%\u0012\u0000\u00e4\u00ea\u0003\'\u0013\u0000\u00e5\u00ea\u0003)\u0014"+
- "\u0000\u00e6\u00ea\u0003+\u0015\u0000\u00e7\u00ea\u0003-\u0016\u0000\u00e8"+
- "\u00ea\u0003/\u0017\u0000\u00e9\u00e3\u0001\u0000\u0000\u0000\u00e9\u00e4"+
- "\u0001\u0000\u0000\u0000\u00e9\u00e5\u0001\u0000\u0000\u0000\u00e9\u00e6"+
- "\u0001\u0000\u0000\u0000\u00e9\u00e7\u0001\u0000\u0000\u0000\u00e9\u00e8"+
- "\u0001\u0000\u0000\u0000\u00ea\u0016\u0001\u0000\u0000\u0000\u00eb\u00ee"+
- "\u00033\u0019\u0000\u00ec\u00ee\u00035\u001a\u0000\u00ed\u00eb\u0001\u0000"+
- "\u0000\u0000\u00ed\u00ec\u0001\u0000\u0000\u0000\u00ee\u0018\u0001\u0000"+
- "\u0000\u0000\u00ef\u00f0\u0005=\u0000\u0000\u00f0\u001a\u0001\u0000\u0000"+
- "\u0000\u00f1\u00f2\u0005+\u0000\u0000\u00f2\u001c\u0001\u0000\u0000\u0000"+
- "\u00f3\u00f4\u0005-\u0000\u0000\u00f4\u001e\u0001\u0000\u0000\u0000\u00f5"+
- "\u00f6\u0005*\u0000\u0000\u00f6 \u0001\u0000\u0000\u0000\u00f7\u00f8\u0005"+
- "%\u0000\u0000\u00f8\"\u0001\u0000\u0000\u0000\u00f9\u00fa\u0005/\u0000"+
- "\u0000\u00fa$\u0001\u0000\u0000\u0000\u00fb\u00fc\u0005>\u0000\u0000\u00fc"+
- "&\u0001\u0000\u0000\u0000\u00fd\u00fe\u0005<\u0000\u0000\u00fe(\u0001"+
- "\u0000\u0000\u0000\u00ff\u0100\u0005>\u0000\u0000\u0100\u0101\u0005=\u0000"+
- "\u0000\u0101*\u0001\u0000\u0000\u0000\u0102\u0103\u0005<\u0000\u0000\u0103"+
- "\u0104\u0005=\u0000\u0000\u0104,\u0001\u0000\u0000\u0000\u0105\u0106\u0005"+
- "=\u0000\u0000\u0106\u0107\u0005=\u0000\u0000\u0107.\u0001\u0000\u0000"+
- "\u0000\u0108\u0109\u0005!\u0000\u0000\u0109\u010a\u0005=\u0000\u0000\u010a"+
- "0\u0001\u0000\u0000\u0000\u010b\u010c\u0005!\u0000\u0000\u010c2\u0001"+
- "\u0000\u0000\u0000\u010d\u010e\u0005&\u0000\u0000\u010e\u010f\u0005&\u0000"+
- "\u0000\u010f4\u0001\u0000\u0000\u0000\u0110\u0111\u0005|\u0000\u0000\u0111"+
- "\u0112\u0005|\u0000\u0000\u01126\u0001\u0000\u0000\u0000\u0113\u0114\u0005"+
- ".\u0000\u0000\u01148\u0001\u0000\u0000\u0000\u0115\u0116\u0005(\u0000"+
- "\u0000\u0116:\u0001\u0000\u0000\u0000\u0117\u0118\u0005)\u0000\u0000\u0118"+
- "<\u0001\u0000\u0000\u0000\u0119\u011a\u0005{\u0000\u0000\u011a>\u0001"+
- "\u0000\u0000\u0000\u011b\u011c\u0005}\u0000\u0000\u011c@\u0001\u0000\u0000"+
- "\u0000\u011d\u011e\u0005;\u0000\u0000\u011eB\u0001\u0000\u0000\u0000\u011f"+
- "\u0120\u0005,\u0000\u0000\u0120D\u0001\u0000\u0000\u0000\u0121\u0122\u0005"+
- "c\u0000\u0000\u0122\u0123\u0005l\u0000\u0000\u0123\u0124\u0005a\u0000"+
- "\u0000\u0124\u0125\u0005s\u0000\u0000\u0125\u0126\u0005s\u0000\u0000\u0126"+
- "F\u0001\u0000\u0000\u0000\u0127\u0128\u0005t\u0000\u0000\u0128\u0129\u0005"+
- "h\u0000\u0000\u0129\u012a\u0005i\u0000\u0000\u012a\u012b\u0005s\u0000"+
- "\u0000\u012bH\u0001\u0000\u0000\u0000\u012c\u012d\u0005w\u0000\u0000\u012d"+
- "\u012e\u0005h\u0000\u0000\u012e\u012f\u0005i\u0000\u0000\u012f\u0130\u0005"+
- "l\u0000\u0000\u0130\u0131\u0005e\u0000\u0000\u0131J\u0001\u0000\u0000"+
- "\u0000\u0132\u0133\u0005d\u0000\u0000\u0133\u0134\u0005o\u0000\u0000\u0134"+
- "L\u0001\u0000\u0000\u0000\u0135\u0136\u0005i\u0000\u0000\u0136\u0137\u0005"+
- "f\u0000\u0000\u0137N\u0001\u0000\u0000\u0000\u0138\u0139\u0005e\u0000"+
- "\u0000\u0139\u013a\u0005l\u0000\u0000\u013a\u013b\u0005s\u0000\u0000\u013b"+
- "\u013c\u0005e\u0000\u0000\u013cP\u0001\u0000\u0000\u0000\u013d\u013e\u0005"+
- "f\u0000\u0000\u013e\u013f\u0005o\u0000\u0000\u013f\u0140\u0005r\u0000"+
- "\u0000\u0140R\u0001\u0000\u0000\u0000\u0141\u0142\u0005r\u0000\u0000\u0142"+
- "\u0143\u0005e\u0000\u0000\u0143\u0144\u0005t\u0000\u0000\u0144\u0145\u0005"+
- "u\u0000\u0000\u0145\u0146\u0005r\u0000\u0000\u0146\u0147\u0005n\u0000"+
- "\u0000\u0147T\u0001\u0000\u0000\u0000\u0148\u0149\u0005n\u0000\u0000\u0149"+
- "\u014a\u0005e\u0000\u0000\u014a\u014b\u0005w\u0000\u0000\u014bV\u0001"+
- "\u0000\u0000\u0000\u014c\u0150\u0005\'\u0000\u0000\u014d\u014f\b\u0000"+
- "\u0000\u0000\u014e\u014d\u0001\u0000\u0000\u0000\u014f\u0152\u0001\u0000"+
- "\u0000\u0000\u0150\u014e\u0001\u0000\u0000\u0000\u0150\u0151\u0001\u0000"+
- "\u0000\u0000\u0151\u0153\u0001\u0000\u0000\u0000\u0152\u0150\u0001\u0000"+
- "\u0000\u0000\u0153\u0154\u0005\'\u0000\u0000\u0154X\u0001\u0000\u0000"+
- "\u0000\u0155\u0157\u0003\u001d\u000e\u0000\u0156\u0155\u0001\u0000\u0000"+
- "\u0000\u0156\u0157\u0001\u0000\u0000\u0000\u0157\u0159\u0001\u0000\u0000"+
- "\u0000\u0158\u015a\u0003a0\u0000\u0159\u0158\u0001\u0000\u0000\u0000\u015a"+
- "\u015b\u0001\u0000\u0000\u0000\u015b\u0159\u0001\u0000\u0000\u0000\u015b"+
- "\u015c\u0001\u0000\u0000\u0000\u015cZ\u0001\u0000\u0000\u0000\u015d\u015e"+
- "\u0005t\u0000\u0000\u015e\u015f\u0005r\u0000\u0000\u015f\u0160\u0005u"+
- "\u0000\u0000\u0160\u0167\u0005e\u0000\u0000\u0161\u0162\u0005f\u0000\u0000"+
- "\u0162\u0163\u0005a\u0000\u0000\u0163\u0164\u0005l\u0000\u0000\u0164\u0165"+
- "\u0005s\u0000\u0000\u0165\u0167\u0005e\u0000\u0000\u0166\u015d\u0001\u0000"+
- "\u0000\u0000\u0166\u0161\u0001\u0000\u0000\u0000\u0167\\\u0001\u0000\u0000"+
- "\u0000\u0168\u0169\u0005n\u0000\u0000\u0169\u016a\u0005u\u0000\u0000\u016a"+
- "\u016b\u0005l\u0000\u0000\u016b\u016c\u0005l\u0000\u0000\u016c^\u0001"+
- "\u0000\u0000\u0000\u016d\u016e\u0007\u0001\u0000\u0000\u016e`\u0001\u0000"+
- "\u0000\u0000\u016f\u0170\u0007\u0002\u0000\u0000\u0170b\u0001\u0000\u0000"+
- "\u0000\u0171\u0175\u0003_/\u0000\u0172\u0175\u0003a0\u0000\u0173\u0175"+
- "\u0007\u0003\u0000\u0000\u0174\u0171\u0001\u0000\u0000\u0000\u0174\u0172"+
- "\u0001\u0000\u0000\u0000\u0174\u0173\u0001\u0000\u0000\u0000\u0175d\u0001"+
- "\u0000\u0000\u0000\u0176\u017a\u0003_/\u0000\u0177\u0179\u0003c1\u0000"+
- "\u0178\u0177\u0001\u0000\u0000\u0000\u0179\u017c\u0001\u0000\u0000\u0000"+
- "\u017a\u0178\u0001\u0000\u0000\u0000\u017a\u017b\u0001\u0000\u0000\u0000"+
- "\u017bf\u0001\u0000\u0000\u0000\u017c\u017a\u0001\u0000\u0000\u0000\u017d"+
- "\u017f\u0007\u0004\u0000\u0000\u017e\u017d\u0001\u0000\u0000\u0000\u017f"+
- "\u0180\u0001\u0000\u0000\u0000\u0180\u017e\u0001\u0000\u0000\u0000\u0180"+
- "\u0181\u0001\u0000\u0000\u0000\u0181\u0182\u0001\u0000\u0000\u0000\u0182"+
- "\u0183\u00063\u0000\u0000\u0183h\u0001\u0000\u0000\u0000\u0184\u0185\u0005"+
- "/\u0000\u0000\u0185\u0186\u0005/\u0000\u0000\u0186\u018a\u0001\u0000\u0000"+
- "\u0000\u0187\u0189\b\u0000\u0000\u0000\u0188\u0187\u0001\u0000\u0000\u0000"+
- "\u0189\u018c\u0001\u0000\u0000\u0000\u018a\u0188\u0001\u0000\u0000\u0000"+
- "\u018a\u018b\u0001\u0000\u0000\u0000\u018b\u018d\u0001\u0000\u0000\u0000"+
- "\u018c\u018a\u0001\u0000\u0000\u0000\u018d\u018e\u00064\u0000\u0000\u018e"+
- "j\u0001\u0000\u0000\u0000\u018f\u0190\u0005/\u0000\u0000\u0190\u0191\u0005"+
- "*\u0000\u0000\u0191\u0195\u0001\u0000\u0000\u0000\u0192\u0194\t\u0000"+
- "\u0000\u0000\u0193\u0192\u0001\u0000\u0000\u0000\u0194\u0197\u0001\u0000"+
- "\u0000\u0000\u0195\u0196\u0001\u0000\u0000\u0000\u0195\u0193\u0001\u0000"+
- "\u0000\u0000\u0196\u0198\u0001\u0000\u0000\u0000\u0197\u0195\u0001\u0000"+
- "\u0000\u0000\u0198\u0199\u0005*\u0000\u0000\u0199\u019a\u0005/\u0000\u0000"+
- "\u019a\u019b\u0001\u0000\u0000\u0000\u019b\u019c\u00065\u0000\u0000\u019c"+
- "l\u0001\u0000\u0000\u0000\u000f\u0000\u00b1\u00dd\u00e1\u00e9\u00ed\u0150"+
- "\u0156\u015b\u0166\u0174\u017a\u0180\u018a\u0195\u0001\u0006\u0000\u0000";
- public static final ATN _ATN =
- new ATNDeserializer().deserialize(_serializedATN.toCharArray());
- static {
- _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()];
- for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) {
- _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i);
- }
- }
-}
\ No newline at end of file
diff --git a/src/main/java/parser/generated/SimpleJavaLexer.tokens b/src/main/java/parser/generated/SimpleJavaLexer.tokens
deleted file mode 100644
index 71246c8..0000000
--- a/src/main/java/parser/generated/SimpleJavaLexer.tokens
+++ /dev/null
@@ -1,90 +0,0 @@
-T__0=1
-T__1=2
-Void=3
-Boolean=4
-Char=5
-Int=6
-AccessModifier=7
-MainMethodDeclaration=8
-DotOperator=9
-LineOperator=10
-ComparisonOperator=11
-LogicalOperator=12
-Assign=13
-Plus=14
-Minus=15
-Mult=16
-Modulo=17
-Div=18
-Greater=19
-Less=20
-GreaterEqual=21
-LessEqual=22
-Equal=23
-NotEqual=24
-Not=25
-And=26
-Or=27
-Dot=28
-OpenRoundBracket=29
-ClosedRoundBracket=30
-OpenCurlyBracket=31
-ClosedCurlyBracket=32
-Semicolon=33
-Comma=34
-Class=35
-This=36
-While=37
-Do=38
-If=39
-Else=40
-For=41
-Return=42
-New=43
-CharValue=44
-IntValue=45
-BooleanValue=46
-NullValue=47
-Identifier=48
-WS=49
-InlineComment=50
-MultilineComment=51
-'++'=1
-'--'=2
-'void'=3
-'boolean'=4
-'char'=5
-'int'=6
-'public static void main(String[] args)'=8
-'='=13
-'+'=14
-'-'=15
-'*'=16
-'%'=17
-'/'=18
-'>'=19
-'<'=20
-'>='=21
-'<='=22
-'=='=23
-'!='=24
-'!'=25
-'&&'=26
-'||'=27
-'.'=28
-'('=29
-')'=30
-'{'=31
-'}'=32
-';'=33
-','=34
-'class'=35
-'this'=36
-'while'=37
-'do'=38
-'if'=39
-'else'=40
-'for'=41
-'return'=42
-'new'=43
-'null'=47
diff --git a/src/main/java/parser/generated/SimpleJavaListener.java b/src/main/java/parser/generated/SimpleJavaListener.java
deleted file mode 100644
index 580bfe1..0000000
--- a/src/main/java/parser/generated/SimpleJavaListener.java
+++ /dev/null
@@ -1,470 +0,0 @@
-// Generated from C:/Users/janni/Desktop/NichtHaskell2.0/src/main/java/parser/grammar/SimpleJava.g4 by ANTLR 4.13.1
-package parser.generated;
-import org.antlr.v4.runtime.tree.ParseTreeListener;
-
-/**
- * This interface defines a complete listener for a parse tree produced by
- * {@link SimpleJavaParser}.
- */
-public interface SimpleJavaListener extends ParseTreeListener {
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#program}.
- * @param ctx the parse tree
- */
- void enterProgram(SimpleJavaParser.ProgramContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#program}.
- * @param ctx the parse tree
- */
- void exitProgram(SimpleJavaParser.ProgramContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#classDeclaration}.
- * @param ctx the parse tree
- */
- void enterClassDeclaration(SimpleJavaParser.ClassDeclarationContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#classDeclaration}.
- * @param ctx the parse tree
- */
- void exitClassDeclaration(SimpleJavaParser.ClassDeclarationContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#memberDeclaration}.
- * @param ctx the parse tree
- */
- void enterMemberDeclaration(SimpleJavaParser.MemberDeclarationContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#memberDeclaration}.
- * @param ctx the parse tree
- */
- void exitMemberDeclaration(SimpleJavaParser.MemberDeclarationContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#constructorDeclaration}.
- * @param ctx the parse tree
- */
- void enterConstructorDeclaration(SimpleJavaParser.ConstructorDeclarationContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#constructorDeclaration}.
- * @param ctx the parse tree
- */
- void exitConstructorDeclaration(SimpleJavaParser.ConstructorDeclarationContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#fieldDeclaration}.
- * @param ctx the parse tree
- */
- void enterFieldDeclaration(SimpleJavaParser.FieldDeclarationContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#fieldDeclaration}.
- * @param ctx the parse tree
- */
- void exitFieldDeclaration(SimpleJavaParser.FieldDeclarationContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#methodDeclaration}.
- * @param ctx the parse tree
- */
- void enterMethodDeclaration(SimpleJavaParser.MethodDeclarationContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#methodDeclaration}.
- * @param ctx the parse tree
- */
- void exitMethodDeclaration(SimpleJavaParser.MethodDeclarationContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#parameterList}.
- * @param ctx the parse tree
- */
- void enterParameterList(SimpleJavaParser.ParameterListContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#parameterList}.
- * @param ctx the parse tree
- */
- void exitParameterList(SimpleJavaParser.ParameterListContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#parameter}.
- * @param ctx the parse tree
- */
- void enterParameter(SimpleJavaParser.ParameterContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#parameter}.
- * @param ctx the parse tree
- */
- void exitParameter(SimpleJavaParser.ParameterContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#argumentList}.
- * @param ctx the parse tree
- */
- void enterArgumentList(SimpleJavaParser.ArgumentListContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#argumentList}.
- * @param ctx the parse tree
- */
- void exitArgumentList(SimpleJavaParser.ArgumentListContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#statement}.
- * @param ctx the parse tree
- */
- void enterStatement(SimpleJavaParser.StatementContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#statement}.
- * @param ctx the parse tree
- */
- void exitStatement(SimpleJavaParser.StatementContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#blockStatement}.
- * @param ctx the parse tree
- */
- void enterBlockStatement(SimpleJavaParser.BlockStatementContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#blockStatement}.
- * @param ctx the parse tree
- */
- void exitBlockStatement(SimpleJavaParser.BlockStatementContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#returnStatement}.
- * @param ctx the parse tree
- */
- void enterReturnStatement(SimpleJavaParser.ReturnStatementContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#returnStatement}.
- * @param ctx the parse tree
- */
- void exitReturnStatement(SimpleJavaParser.ReturnStatementContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#localVariableDeclaration}.
- * @param ctx the parse tree
- */
- void enterLocalVariableDeclaration(SimpleJavaParser.LocalVariableDeclarationContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#localVariableDeclaration}.
- * @param ctx the parse tree
- */
- void exitLocalVariableDeclaration(SimpleJavaParser.LocalVariableDeclarationContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#whileStatement}.
- * @param ctx the parse tree
- */
- void enterWhileStatement(SimpleJavaParser.WhileStatementContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#whileStatement}.
- * @param ctx the parse tree
- */
- void exitWhileStatement(SimpleJavaParser.WhileStatementContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#doWhileStatement}.
- * @param ctx the parse tree
- */
- void enterDoWhileStatement(SimpleJavaParser.DoWhileStatementContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#doWhileStatement}.
- * @param ctx the parse tree
- */
- void exitDoWhileStatement(SimpleJavaParser.DoWhileStatementContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#forStatement}.
- * @param ctx the parse tree
- */
- void enterForStatement(SimpleJavaParser.ForStatementContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#forStatement}.
- * @param ctx the parse tree
- */
- void exitForStatement(SimpleJavaParser.ForStatementContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#ifElseStatement}.
- * @param ctx the parse tree
- */
- void enterIfElseStatement(SimpleJavaParser.IfElseStatementContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#ifElseStatement}.
- * @param ctx the parse tree
- */
- void exitIfElseStatement(SimpleJavaParser.IfElseStatementContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#ifStatement}.
- * @param ctx the parse tree
- */
- void enterIfStatement(SimpleJavaParser.IfStatementContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#ifStatement}.
- * @param ctx the parse tree
- */
- void exitIfStatement(SimpleJavaParser.IfStatementContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#elseIfStatement}.
- * @param ctx the parse tree
- */
- void enterElseIfStatement(SimpleJavaParser.ElseIfStatementContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#elseIfStatement}.
- * @param ctx the parse tree
- */
- void exitElseIfStatement(SimpleJavaParser.ElseIfStatementContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#elseStatement}.
- * @param ctx the parse tree
- */
- void enterElseStatement(SimpleJavaParser.ElseStatementContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#elseStatement}.
- * @param ctx the parse tree
- */
- void exitElseStatement(SimpleJavaParser.ElseStatementContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#statementExpression}.
- * @param ctx the parse tree
- */
- void enterStatementExpression(SimpleJavaParser.StatementExpressionContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#statementExpression}.
- * @param ctx the parse tree
- */
- void exitStatementExpression(SimpleJavaParser.StatementExpressionContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#assign}.
- * @param ctx the parse tree
- */
- void enterAssign(SimpleJavaParser.AssignContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#assign}.
- * @param ctx the parse tree
- */
- void exitAssign(SimpleJavaParser.AssignContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#newDeclaration}.
- * @param ctx the parse tree
- */
- void enterNewDeclaration(SimpleJavaParser.NewDeclarationContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#newDeclaration}.
- * @param ctx the parse tree
- */
- void exitNewDeclaration(SimpleJavaParser.NewDeclarationContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#expression}.
- * @param ctx the parse tree
- */
- void enterExpression(SimpleJavaParser.ExpressionContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#expression}.
- * @param ctx the parse tree
- */
- void exitExpression(SimpleJavaParser.ExpressionContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#unaryExpression}.
- * @param ctx the parse tree
- */
- void enterUnaryExpression(SimpleJavaParser.UnaryExpressionContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#unaryExpression}.
- * @param ctx the parse tree
- */
- void exitUnaryExpression(SimpleJavaParser.UnaryExpressionContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#notExpression}.
- * @param ctx the parse tree
- */
- void enterNotExpression(SimpleJavaParser.NotExpressionContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#notExpression}.
- * @param ctx the parse tree
- */
- void exitNotExpression(SimpleJavaParser.NotExpressionContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#crementExpression}.
- * @param ctx the parse tree
- */
- void enterCrementExpression(SimpleJavaParser.CrementExpressionContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#crementExpression}.
- * @param ctx the parse tree
- */
- void exitCrementExpression(SimpleJavaParser.CrementExpressionContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#incrementExpression}.
- * @param ctx the parse tree
- */
- void enterIncrementExpression(SimpleJavaParser.IncrementExpressionContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#incrementExpression}.
- * @param ctx the parse tree
- */
- void exitIncrementExpression(SimpleJavaParser.IncrementExpressionContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#prefixIncrementExpression}.
- * @param ctx the parse tree
- */
- void enterPrefixIncrementExpression(SimpleJavaParser.PrefixIncrementExpressionContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#prefixIncrementExpression}.
- * @param ctx the parse tree
- */
- void exitPrefixIncrementExpression(SimpleJavaParser.PrefixIncrementExpressionContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#suffixIncrementExpression}.
- * @param ctx the parse tree
- */
- void enterSuffixIncrementExpression(SimpleJavaParser.SuffixIncrementExpressionContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#suffixIncrementExpression}.
- * @param ctx the parse tree
- */
- void exitSuffixIncrementExpression(SimpleJavaParser.SuffixIncrementExpressionContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#decrementExpression}.
- * @param ctx the parse tree
- */
- void enterDecrementExpression(SimpleJavaParser.DecrementExpressionContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#decrementExpression}.
- * @param ctx the parse tree
- */
- void exitDecrementExpression(SimpleJavaParser.DecrementExpressionContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#prefixDecrementExpression}.
- * @param ctx the parse tree
- */
- void enterPrefixDecrementExpression(SimpleJavaParser.PrefixDecrementExpressionContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#prefixDecrementExpression}.
- * @param ctx the parse tree
- */
- void exitPrefixDecrementExpression(SimpleJavaParser.PrefixDecrementExpressionContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#suffixDecrementExpression}.
- * @param ctx the parse tree
- */
- void enterSuffixDecrementExpression(SimpleJavaParser.SuffixDecrementExpressionContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#suffixDecrementExpression}.
- * @param ctx the parse tree
- */
- void exitSuffixDecrementExpression(SimpleJavaParser.SuffixDecrementExpressionContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#assignableExpression}.
- * @param ctx the parse tree
- */
- void enterAssignableExpression(SimpleJavaParser.AssignableExpressionContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#assignableExpression}.
- * @param ctx the parse tree
- */
- void exitAssignableExpression(SimpleJavaParser.AssignableExpressionContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#memberAccess}.
- * @param ctx the parse tree
- */
- void enterMemberAccess(SimpleJavaParser.MemberAccessContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#memberAccess}.
- * @param ctx the parse tree
- */
- void exitMemberAccess(SimpleJavaParser.MemberAccessContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#binaryExpression}.
- * @param ctx the parse tree
- */
- void enterBinaryExpression(SimpleJavaParser.BinaryExpressionContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#binaryExpression}.
- * @param ctx the parse tree
- */
- void exitBinaryExpression(SimpleJavaParser.BinaryExpressionContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#calculationExpression}.
- * @param ctx the parse tree
- */
- void enterCalculationExpression(SimpleJavaParser.CalculationExpressionContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#calculationExpression}.
- * @param ctx the parse tree
- */
- void exitCalculationExpression(SimpleJavaParser.CalculationExpressionContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#dotExpression}.
- * @param ctx the parse tree
- */
- void enterDotExpression(SimpleJavaParser.DotExpressionContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#dotExpression}.
- * @param ctx the parse tree
- */
- void exitDotExpression(SimpleJavaParser.DotExpressionContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#dotSubtractionExpression}.
- * @param ctx the parse tree
- */
- void enterDotSubtractionExpression(SimpleJavaParser.DotSubtractionExpressionContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#dotSubtractionExpression}.
- * @param ctx the parse tree
- */
- void exitDotSubtractionExpression(SimpleJavaParser.DotSubtractionExpressionContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#nonCalculationExpression}.
- * @param ctx the parse tree
- */
- void enterNonCalculationExpression(SimpleJavaParser.NonCalculationExpressionContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#nonCalculationExpression}.
- * @param ctx the parse tree
- */
- void exitNonCalculationExpression(SimpleJavaParser.NonCalculationExpressionContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#methodCall}.
- * @param ctx the parse tree
- */
- void enterMethodCall(SimpleJavaParser.MethodCallContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#methodCall}.
- * @param ctx the parse tree
- */
- void exitMethodCall(SimpleJavaParser.MethodCallContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#target}.
- * @param ctx the parse tree
- */
- void enterTarget(SimpleJavaParser.TargetContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#target}.
- * @param ctx the parse tree
- */
- void exitTarget(SimpleJavaParser.TargetContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#chainedMethod}.
- * @param ctx the parse tree
- */
- void enterChainedMethod(SimpleJavaParser.ChainedMethodContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#chainedMethod}.
- * @param ctx the parse tree
- */
- void exitChainedMethod(SimpleJavaParser.ChainedMethodContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#type}.
- * @param ctx the parse tree
- */
- void enterType(SimpleJavaParser.TypeContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#type}.
- * @param ctx the parse tree
- */
- void exitType(SimpleJavaParser.TypeContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#value}.
- * @param ctx the parse tree
- */
- void enterValue(SimpleJavaParser.ValueContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#value}.
- * @param ctx the parse tree
- */
- void exitValue(SimpleJavaParser.ValueContext ctx);
- /**
- * Enter a parse tree produced by {@link SimpleJavaParser#nonCalculationOperator}.
- * @param ctx the parse tree
- */
- void enterNonCalculationOperator(SimpleJavaParser.NonCalculationOperatorContext ctx);
- /**
- * Exit a parse tree produced by {@link SimpleJavaParser#nonCalculationOperator}.
- * @param ctx the parse tree
- */
- void exitNonCalculationOperator(SimpleJavaParser.NonCalculationOperatorContext ctx);
-}
\ No newline at end of file
diff --git a/src/main/java/parser/generated/SimpleJavaParser.java b/src/main/java/parser/generated/SimpleJavaParser.java
deleted file mode 100644
index 3a80a6a..0000000
--- a/src/main/java/parser/generated/SimpleJavaParser.java
+++ /dev/null
@@ -1,3628 +0,0 @@
-// Generated from C:/Users/janni/Desktop/NichtHaskell2.0/src/main/java/parser/grammar/SimpleJava.g4 by ANTLR 4.13.1
-package parser.generated;
-import org.antlr.v4.runtime.atn.*;
-import org.antlr.v4.runtime.dfa.DFA;
-import org.antlr.v4.runtime.*;
-import org.antlr.v4.runtime.misc.*;
-import org.antlr.v4.runtime.tree.*;
-import java.util.List;
-import java.util.Iterator;
-import java.util.ArrayList;
-
-@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast", "CheckReturnValue"})
-public class SimpleJavaParser extends Parser {
- static { RuntimeMetaData.checkVersion("4.13.1", RuntimeMetaData.VERSION); }
-
- protected static final DFA[] _decisionToDFA;
- protected static final PredictionContextCache _sharedContextCache =
- new PredictionContextCache();
- public static final int
- T__0=1, T__1=2, Void=3, Boolean=4, Char=5, Int=6, AccessModifier=7, MainMethodDeclaration=8,
- DotOperator=9, LineOperator=10, ComparisonOperator=11, LogicalOperator=12,
- Assign=13, Plus=14, Minus=15, Mult=16, Modulo=17, Div=18, Greater=19,
- Less=20, GreaterEqual=21, LessEqual=22, Equal=23, NotEqual=24, Not=25,
- And=26, Or=27, Dot=28, OpenRoundBracket=29, ClosedRoundBracket=30, OpenCurlyBracket=31,
- ClosedCurlyBracket=32, Semicolon=33, Comma=34, Class=35, This=36, While=37,
- Do=38, If=39, Else=40, For=41, Return=42, New=43, CharValue=44, IntValue=45,
- BooleanValue=46, NullValue=47, Identifier=48, WS=49, InlineComment=50,
- MultilineComment=51;
- public static final int
- RULE_program = 0, RULE_classDeclaration = 1, RULE_memberDeclaration = 2,
- RULE_constructorDeclaration = 3, RULE_fieldDeclaration = 4, RULE_methodDeclaration = 5,
- RULE_parameterList = 6, RULE_parameter = 7, RULE_argumentList = 8, RULE_statement = 9,
- RULE_blockStatement = 10, RULE_returnStatement = 11, RULE_localVariableDeclaration = 12,
- RULE_whileStatement = 13, RULE_doWhileStatement = 14, RULE_forStatement = 15,
- RULE_ifElseStatement = 16, RULE_ifStatement = 17, RULE_elseIfStatement = 18,
- RULE_elseStatement = 19, RULE_statementExpression = 20, RULE_assign = 21,
- RULE_newDeclaration = 22, RULE_expression = 23, RULE_unaryExpression = 24,
- RULE_notExpression = 25, RULE_crementExpression = 26, RULE_incrementExpression = 27,
- RULE_prefixIncrementExpression = 28, RULE_suffixIncrementExpression = 29,
- RULE_decrementExpression = 30, RULE_prefixDecrementExpression = 31, RULE_suffixDecrementExpression = 32,
- RULE_assignableExpression = 33, RULE_memberAccess = 34, RULE_binaryExpression = 35,
- RULE_calculationExpression = 36, RULE_dotExpression = 37, RULE_dotSubtractionExpression = 38,
- RULE_nonCalculationExpression = 39, RULE_methodCall = 40, RULE_target = 41,
- RULE_chainedMethod = 42, RULE_type = 43, RULE_value = 44, RULE_nonCalculationOperator = 45;
- private static String[] makeRuleNames() {
- return new String[] {
- "program", "classDeclaration", "memberDeclaration", "constructorDeclaration",
- "fieldDeclaration", "methodDeclaration", "parameterList", "parameter",
- "argumentList", "statement", "blockStatement", "returnStatement", "localVariableDeclaration",
- "whileStatement", "doWhileStatement", "forStatement", "ifElseStatement",
- "ifStatement", "elseIfStatement", "elseStatement", "statementExpression",
- "assign", "newDeclaration", "expression", "unaryExpression", "notExpression",
- "crementExpression", "incrementExpression", "prefixIncrementExpression",
- "suffixIncrementExpression", "decrementExpression", "prefixDecrementExpression",
- "suffixDecrementExpression", "assignableExpression", "memberAccess",
- "binaryExpression", "calculationExpression", "dotExpression", "dotSubtractionExpression",
- "nonCalculationExpression", "methodCall", "target", "chainedMethod",
- "type", "value", "nonCalculationOperator"
- };
- }
- public static final String[] ruleNames = makeRuleNames();
-
- private static String[] makeLiteralNames() {
- return new String[] {
- null, "'++'", "'--'", "'void'", "'boolean'", "'char'", "'int'", null,
- "'public static void main(String[] args)'", null, null, null, null, "'='",
- "'+'", "'-'", "'*'", "'%'", "'/'", "'>'", "'<'", "'>='", "'<='", "'=='",
- "'!='", "'!'", "'&&'", "'||'", "'.'", "'('", "')'", "'{'", "'}'", "';'",
- "','", "'class'", "'this'", "'while'", "'do'", "'if'", "'else'", "'for'",
- "'return'", "'new'", null, null, null, "'null'"
- };
- }
- private static final String[] _LITERAL_NAMES = makeLiteralNames();
- private static String[] makeSymbolicNames() {
- return new String[] {
- null, null, null, "Void", "Boolean", "Char", "Int", "AccessModifier",
- "MainMethodDeclaration", "DotOperator", "LineOperator", "ComparisonOperator",
- "LogicalOperator", "Assign", "Plus", "Minus", "Mult", "Modulo", "Div",
- "Greater", "Less", "GreaterEqual", "LessEqual", "Equal", "NotEqual",
- "Not", "And", "Or", "Dot", "OpenRoundBracket", "ClosedRoundBracket",
- "OpenCurlyBracket", "ClosedCurlyBracket", "Semicolon", "Comma", "Class",
- "This", "While", "Do", "If", "Else", "For", "Return", "New", "CharValue",
- "IntValue", "BooleanValue", "NullValue", "Identifier", "WS", "InlineComment",
- "MultilineComment"
- };
- }
- private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames();
- public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
-
- /**
- * @deprecated Use {@link #VOCABULARY} instead.
- */
- @Deprecated
- public static final String[] tokenNames;
- static {
- tokenNames = new String[_SYMBOLIC_NAMES.length];
- for (int i = 0; i < tokenNames.length; i++) {
- tokenNames[i] = VOCABULARY.getLiteralName(i);
- if (tokenNames[i] == null) {
- tokenNames[i] = VOCABULARY.getSymbolicName(i);
- }
-
- if (tokenNames[i] == null) {
- tokenNames[i] = "";
- }
- }
- }
-
- @Override
- @Deprecated
- public String[] getTokenNames() {
- return tokenNames;
- }
-
- @Override
-
- public Vocabulary getVocabulary() {
- return VOCABULARY;
- }
-
- @Override
- public String getGrammarFileName() { return "SimpleJava.g4"; }
-
- @Override
- public String[] getRuleNames() { return ruleNames; }
-
- @Override
- public String getSerializedATN() { return _serializedATN; }
-
- @Override
- public ATN getATN() { return _ATN; }
-
- public SimpleJavaParser(TokenStream input) {
- super(input);
- _interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class ProgramContext extends ParserRuleContext {
- public List classDeclaration() {
- return getRuleContexts(ClassDeclarationContext.class);
- }
- public ClassDeclarationContext classDeclaration(int i) {
- return getRuleContext(ClassDeclarationContext.class,i);
- }
- public ProgramContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_program; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterProgram(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitProgram(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitProgram(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final ProgramContext program() throws RecognitionException {
- ProgramContext _localctx = new ProgramContext(_ctx, getState());
- enterRule(_localctx, 0, RULE_program);
- int _la;
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(93);
- _errHandler.sync(this);
- _la = _input.LA(1);
- do {
- {
- {
- setState(92);
- classDeclaration();
- }
- }
- setState(95);
- _errHandler.sync(this);
- _la = _input.LA(1);
- } while ( _la==AccessModifier || _la==Class );
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class ClassDeclarationContext extends ParserRuleContext {
- public TerminalNode Class() { return getToken(SimpleJavaParser.Class, 0); }
- public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
- public TerminalNode OpenCurlyBracket() { return getToken(SimpleJavaParser.OpenCurlyBracket, 0); }
- public TerminalNode ClosedCurlyBracket() { return getToken(SimpleJavaParser.ClosedCurlyBracket, 0); }
- public TerminalNode AccessModifier() { return getToken(SimpleJavaParser.AccessModifier, 0); }
- public List memberDeclaration() {
- return getRuleContexts(MemberDeclarationContext.class);
- }
- public MemberDeclarationContext memberDeclaration(int i) {
- return getRuleContext(MemberDeclarationContext.class,i);
- }
- public ClassDeclarationContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_classDeclaration; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterClassDeclaration(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitClassDeclaration(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitClassDeclaration(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final ClassDeclarationContext classDeclaration() throws RecognitionException {
- ClassDeclarationContext _localctx = new ClassDeclarationContext(_ctx, getState());
- enterRule(_localctx, 2, RULE_classDeclaration);
- int _la;
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(98);
- _errHandler.sync(this);
- _la = _input.LA(1);
- if (_la==AccessModifier) {
- {
- setState(97);
- match(AccessModifier);
- }
- }
-
- setState(100);
- match(Class);
- setState(101);
- match(Identifier);
- setState(102);
- match(OpenCurlyBracket);
- setState(106);
- _errHandler.sync(this);
- _la = _input.LA(1);
- while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 281474976711160L) != 0)) {
- {
- {
- setState(103);
- memberDeclaration();
- }
- }
- setState(108);
- _errHandler.sync(this);
- _la = _input.LA(1);
- }
- setState(109);
- match(ClosedCurlyBracket);
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class MemberDeclarationContext extends ParserRuleContext {
- public ConstructorDeclarationContext constructorDeclaration() {
- return getRuleContext(ConstructorDeclarationContext.class,0);
- }
- public FieldDeclarationContext fieldDeclaration() {
- return getRuleContext(FieldDeclarationContext.class,0);
- }
- public MethodDeclarationContext methodDeclaration() {
- return getRuleContext(MethodDeclarationContext.class,0);
- }
- public MemberDeclarationContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_memberDeclaration; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterMemberDeclaration(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitMemberDeclaration(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitMemberDeclaration(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final MemberDeclarationContext memberDeclaration() throws RecognitionException {
- MemberDeclarationContext _localctx = new MemberDeclarationContext(_ctx, getState());
- enterRule(_localctx, 4, RULE_memberDeclaration);
- try {
- setState(114);
- _errHandler.sync(this);
- switch ( getInterpreter().adaptivePredict(_input,3,_ctx) ) {
- case 1:
- enterOuterAlt(_localctx, 1);
- {
- setState(111);
- constructorDeclaration();
- }
- break;
- case 2:
- enterOuterAlt(_localctx, 2);
- {
- setState(112);
- fieldDeclaration();
- }
- break;
- case 3:
- enterOuterAlt(_localctx, 3);
- {
- setState(113);
- methodDeclaration();
- }
- break;
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class ConstructorDeclarationContext extends ParserRuleContext {
- public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
- public TerminalNode OpenRoundBracket() { return getToken(SimpleJavaParser.OpenRoundBracket, 0); }
- public TerminalNode ClosedRoundBracket() { return getToken(SimpleJavaParser.ClosedRoundBracket, 0); }
- public BlockStatementContext blockStatement() {
- return getRuleContext(BlockStatementContext.class,0);
- }
- public TerminalNode AccessModifier() { return getToken(SimpleJavaParser.AccessModifier, 0); }
- public ParameterListContext parameterList() {
- return getRuleContext(ParameterListContext.class,0);
- }
- public ConstructorDeclarationContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_constructorDeclaration; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterConstructorDeclaration(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitConstructorDeclaration(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitConstructorDeclaration(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final ConstructorDeclarationContext constructorDeclaration() throws RecognitionException {
- ConstructorDeclarationContext _localctx = new ConstructorDeclarationContext(_ctx, getState());
- enterRule(_localctx, 6, RULE_constructorDeclaration);
- int _la;
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(117);
- _errHandler.sync(this);
- _la = _input.LA(1);
- if (_la==AccessModifier) {
- {
- setState(116);
- match(AccessModifier);
- }
- }
-
- setState(119);
- match(Identifier);
- setState(120);
- match(OpenRoundBracket);
- setState(122);
- _errHandler.sync(this);
- _la = _input.LA(1);
- if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 281474976710768L) != 0)) {
- {
- setState(121);
- parameterList();
- }
- }
-
- setState(124);
- match(ClosedRoundBracket);
- setState(125);
- blockStatement();
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class FieldDeclarationContext extends ParserRuleContext {
- public TypeContext type() {
- return getRuleContext(TypeContext.class,0);
- }
- public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
- public TerminalNode Semicolon() { return getToken(SimpleJavaParser.Semicolon, 0); }
- public TerminalNode AccessModifier() { return getToken(SimpleJavaParser.AccessModifier, 0); }
- public FieldDeclarationContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_fieldDeclaration; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterFieldDeclaration(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitFieldDeclaration(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitFieldDeclaration(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final FieldDeclarationContext fieldDeclaration() throws RecognitionException {
- FieldDeclarationContext _localctx = new FieldDeclarationContext(_ctx, getState());
- enterRule(_localctx, 8, RULE_fieldDeclaration);
- int _la;
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(128);
- _errHandler.sync(this);
- _la = _input.LA(1);
- if (_la==AccessModifier) {
- {
- setState(127);
- match(AccessModifier);
- }
- }
-
- setState(130);
- type();
- setState(131);
- match(Identifier);
- setState(132);
- match(Semicolon);
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class MethodDeclarationContext extends ParserRuleContext {
- public TerminalNode MainMethodDeclaration() { return getToken(SimpleJavaParser.MainMethodDeclaration, 0); }
- public BlockStatementContext blockStatement() {
- return getRuleContext(BlockStatementContext.class,0);
- }
- public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
- public TerminalNode OpenRoundBracket() { return getToken(SimpleJavaParser.OpenRoundBracket, 0); }
- public TerminalNode ClosedRoundBracket() { return getToken(SimpleJavaParser.ClosedRoundBracket, 0); }
- public TypeContext type() {
- return getRuleContext(TypeContext.class,0);
- }
- public TerminalNode Void() { return getToken(SimpleJavaParser.Void, 0); }
- public TerminalNode AccessModifier() { return getToken(SimpleJavaParser.AccessModifier, 0); }
- public ParameterListContext parameterList() {
- return getRuleContext(ParameterListContext.class,0);
- }
- public MethodDeclarationContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_methodDeclaration; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterMethodDeclaration(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitMethodDeclaration(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitMethodDeclaration(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final MethodDeclarationContext methodDeclaration() throws RecognitionException {
- MethodDeclarationContext _localctx = new MethodDeclarationContext(_ctx, getState());
- enterRule(_localctx, 10, RULE_methodDeclaration);
- int _la;
- try {
- setState(150);
- _errHandler.sync(this);
- switch (_input.LA(1)) {
- case MainMethodDeclaration:
- enterOuterAlt(_localctx, 1);
- {
- setState(134);
- match(MainMethodDeclaration);
- setState(135);
- blockStatement();
- }
- break;
- case Void:
- case Boolean:
- case Char:
- case Int:
- case AccessModifier:
- case Identifier:
- enterOuterAlt(_localctx, 2);
- {
- setState(137);
- _errHandler.sync(this);
- _la = _input.LA(1);
- if (_la==AccessModifier) {
- {
- setState(136);
- match(AccessModifier);
- }
- }
-
- setState(141);
- _errHandler.sync(this);
- switch (_input.LA(1)) {
- case Boolean:
- case Char:
- case Int:
- case Identifier:
- {
- setState(139);
- type();
- }
- break;
- case Void:
- {
- setState(140);
- match(Void);
- }
- break;
- default:
- throw new NoViableAltException(this);
- }
- setState(143);
- match(Identifier);
- setState(144);
- match(OpenRoundBracket);
- setState(146);
- _errHandler.sync(this);
- _la = _input.LA(1);
- if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 281474976710768L) != 0)) {
- {
- setState(145);
- parameterList();
- }
- }
-
- setState(148);
- match(ClosedRoundBracket);
- setState(149);
- blockStatement();
- }
- break;
- default:
- throw new NoViableAltException(this);
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class ParameterListContext extends ParserRuleContext {
- public List parameter() {
- return getRuleContexts(ParameterContext.class);
- }
- public ParameterContext parameter(int i) {
- return getRuleContext(ParameterContext.class,i);
- }
- public List Comma() { return getTokens(SimpleJavaParser.Comma); }
- public TerminalNode Comma(int i) {
- return getToken(SimpleJavaParser.Comma, i);
- }
- public ParameterListContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_parameterList; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterParameterList(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitParameterList(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitParameterList(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final ParameterListContext parameterList() throws RecognitionException {
- ParameterListContext _localctx = new ParameterListContext(_ctx, getState());
- enterRule(_localctx, 12, RULE_parameterList);
- int _la;
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(152);
- parameter();
- setState(157);
- _errHandler.sync(this);
- _la = _input.LA(1);
- while (_la==Comma) {
- {
- {
- setState(153);
- match(Comma);
- setState(154);
- parameter();
- }
- }
- setState(159);
- _errHandler.sync(this);
- _la = _input.LA(1);
- }
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class ParameterContext extends ParserRuleContext {
- public TypeContext type() {
- return getRuleContext(TypeContext.class,0);
- }
- public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
- public ParameterContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_parameter; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterParameter(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitParameter(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitParameter(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final ParameterContext parameter() throws RecognitionException {
- ParameterContext _localctx = new ParameterContext(_ctx, getState());
- enterRule(_localctx, 14, RULE_parameter);
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(160);
- type();
- setState(161);
- match(Identifier);
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class ArgumentListContext extends ParserRuleContext {
- public List expression() {
- return getRuleContexts(ExpressionContext.class);
- }
- public ExpressionContext expression(int i) {
- return getRuleContext(ExpressionContext.class,i);
- }
- public List Comma() { return getTokens(SimpleJavaParser.Comma); }
- public TerminalNode Comma(int i) {
- return getToken(SimpleJavaParser.Comma, i);
- }
- public ArgumentListContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_argumentList; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterArgumentList(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitArgumentList(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitArgumentList(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final ArgumentListContext argumentList() throws RecognitionException {
- ArgumentListContext _localctx = new ArgumentListContext(_ctx, getState());
- enterRule(_localctx, 16, RULE_argumentList);
- int _la;
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(171);
- _errHandler.sync(this);
- _la = _input.LA(1);
- if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 554223150301190L) != 0)) {
- {
- setState(163);
- expression();
- setState(168);
- _errHandler.sync(this);
- _la = _input.LA(1);
- while (_la==Comma) {
- {
- {
- setState(164);
- match(Comma);
- setState(165);
- expression();
- }
- }
- setState(170);
- _errHandler.sync(this);
- _la = _input.LA(1);
- }
- }
- }
-
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class StatementContext extends ParserRuleContext {
- public ReturnStatementContext returnStatement() {
- return getRuleContext(ReturnStatementContext.class,0);
- }
- public TerminalNode Semicolon() { return getToken(SimpleJavaParser.Semicolon, 0); }
- public LocalVariableDeclarationContext localVariableDeclaration() {
- return getRuleContext(LocalVariableDeclarationContext.class,0);
- }
- public BlockStatementContext blockStatement() {
- return getRuleContext(BlockStatementContext.class,0);
- }
- public WhileStatementContext whileStatement() {
- return getRuleContext(WhileStatementContext.class,0);
- }
- public DoWhileStatementContext doWhileStatement() {
- return getRuleContext(DoWhileStatementContext.class,0);
- }
- public ForStatementContext forStatement() {
- return getRuleContext(ForStatementContext.class,0);
- }
- public IfElseStatementContext ifElseStatement() {
- return getRuleContext(IfElseStatementContext.class,0);
- }
- public StatementExpressionContext statementExpression() {
- return getRuleContext(StatementExpressionContext.class,0);
- }
- public StatementContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_statement; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterStatement(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitStatement(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitStatement(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final StatementContext statement() throws RecognitionException {
- StatementContext _localctx = new StatementContext(_ctx, getState());
- enterRule(_localctx, 18, RULE_statement);
- try {
- setState(187);
- _errHandler.sync(this);
- switch ( getInterpreter().adaptivePredict(_input,14,_ctx) ) {
- case 1:
- enterOuterAlt(_localctx, 1);
- {
- setState(173);
- returnStatement();
- setState(174);
- match(Semicolon);
- }
- break;
- case 2:
- enterOuterAlt(_localctx, 2);
- {
- setState(176);
- localVariableDeclaration();
- setState(177);
- match(Semicolon);
- }
- break;
- case 3:
- enterOuterAlt(_localctx, 3);
- {
- setState(179);
- blockStatement();
- }
- break;
- case 4:
- enterOuterAlt(_localctx, 4);
- {
- setState(180);
- whileStatement();
- }
- break;
- case 5:
- enterOuterAlt(_localctx, 5);
- {
- setState(181);
- doWhileStatement();
- }
- break;
- case 6:
- enterOuterAlt(_localctx, 6);
- {
- setState(182);
- forStatement();
- }
- break;
- case 7:
- enterOuterAlt(_localctx, 7);
- {
- setState(183);
- ifElseStatement();
- }
- break;
- case 8:
- enterOuterAlt(_localctx, 8);
- {
- setState(184);
- statementExpression();
- setState(185);
- match(Semicolon);
- }
- break;
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class BlockStatementContext extends ParserRuleContext {
- public TerminalNode OpenCurlyBracket() { return getToken(SimpleJavaParser.OpenCurlyBracket, 0); }
- public TerminalNode ClosedCurlyBracket() { return getToken(SimpleJavaParser.ClosedCurlyBracket, 0); }
- public List statement() {
- return getRuleContexts(StatementContext.class);
- }
- public StatementContext statement(int i) {
- return getRuleContext(StatementContext.class,i);
- }
- public BlockStatementContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_blockStatement; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterBlockStatement(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitBlockStatement(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitBlockStatement(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final BlockStatementContext blockStatement() throws RecognitionException {
- BlockStatementContext _localctx = new BlockStatementContext(_ctx, getState());
- enterRule(_localctx, 20, RULE_blockStatement);
- int _la;
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(189);
- match(OpenCurlyBracket);
- setState(193);
- _errHandler.sync(this);
- _la = _input.LA(1);
- while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 297901079134326L) != 0)) {
- {
- {
- setState(190);
- statement();
- }
- }
- setState(195);
- _errHandler.sync(this);
- _la = _input.LA(1);
- }
- setState(196);
- match(ClosedCurlyBracket);
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class ReturnStatementContext extends ParserRuleContext {
- public TerminalNode Return() { return getToken(SimpleJavaParser.Return, 0); }
- public ExpressionContext expression() {
- return getRuleContext(ExpressionContext.class,0);
- }
- public ReturnStatementContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_returnStatement; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterReturnStatement(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitReturnStatement(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitReturnStatement(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final ReturnStatementContext returnStatement() throws RecognitionException {
- ReturnStatementContext _localctx = new ReturnStatementContext(_ctx, getState());
- enterRule(_localctx, 22, RULE_returnStatement);
- int _la;
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(198);
- match(Return);
- setState(200);
- _errHandler.sync(this);
- _la = _input.LA(1);
- if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 554223150301190L) != 0)) {
- {
- setState(199);
- expression();
- }
- }
-
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class LocalVariableDeclarationContext extends ParserRuleContext {
- public TypeContext type() {
- return getRuleContext(TypeContext.class,0);
- }
- public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
- public TerminalNode Assign() { return getToken(SimpleJavaParser.Assign, 0); }
- public ExpressionContext expression() {
- return getRuleContext(ExpressionContext.class,0);
- }
- public LocalVariableDeclarationContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_localVariableDeclaration; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterLocalVariableDeclaration(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitLocalVariableDeclaration(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitLocalVariableDeclaration(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final LocalVariableDeclarationContext localVariableDeclaration() throws RecognitionException {
- LocalVariableDeclarationContext _localctx = new LocalVariableDeclarationContext(_ctx, getState());
- enterRule(_localctx, 24, RULE_localVariableDeclaration);
- int _la;
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(202);
- type();
- setState(203);
- match(Identifier);
- setState(206);
- _errHandler.sync(this);
- _la = _input.LA(1);
- if (_la==Assign) {
- {
- setState(204);
- match(Assign);
- setState(205);
- expression();
- }
- }
-
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class WhileStatementContext extends ParserRuleContext {
- public TerminalNode While() { return getToken(SimpleJavaParser.While, 0); }
- public TerminalNode OpenRoundBracket() { return getToken(SimpleJavaParser.OpenRoundBracket, 0); }
- public ExpressionContext expression() {
- return getRuleContext(ExpressionContext.class,0);
- }
- public TerminalNode ClosedRoundBracket() { return getToken(SimpleJavaParser.ClosedRoundBracket, 0); }
- public BlockStatementContext blockStatement() {
- return getRuleContext(BlockStatementContext.class,0);
- }
- public WhileStatementContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_whileStatement; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterWhileStatement(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitWhileStatement(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitWhileStatement(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final WhileStatementContext whileStatement() throws RecognitionException {
- WhileStatementContext _localctx = new WhileStatementContext(_ctx, getState());
- enterRule(_localctx, 26, RULE_whileStatement);
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(208);
- match(While);
- setState(209);
- match(OpenRoundBracket);
- setState(210);
- expression();
- setState(211);
- match(ClosedRoundBracket);
- setState(212);
- blockStatement();
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class DoWhileStatementContext extends ParserRuleContext {
- public TerminalNode Do() { return getToken(SimpleJavaParser.Do, 0); }
- public BlockStatementContext blockStatement() {
- return getRuleContext(BlockStatementContext.class,0);
- }
- public TerminalNode While() { return getToken(SimpleJavaParser.While, 0); }
- public TerminalNode OpenRoundBracket() { return getToken(SimpleJavaParser.OpenRoundBracket, 0); }
- public ExpressionContext expression() {
- return getRuleContext(ExpressionContext.class,0);
- }
- public TerminalNode ClosedRoundBracket() { return getToken(SimpleJavaParser.ClosedRoundBracket, 0); }
- public TerminalNode Semicolon() { return getToken(SimpleJavaParser.Semicolon, 0); }
- public DoWhileStatementContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_doWhileStatement; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterDoWhileStatement(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitDoWhileStatement(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitDoWhileStatement(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final DoWhileStatementContext doWhileStatement() throws RecognitionException {
- DoWhileStatementContext _localctx = new DoWhileStatementContext(_ctx, getState());
- enterRule(_localctx, 28, RULE_doWhileStatement);
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(214);
- match(Do);
- setState(215);
- blockStatement();
- setState(216);
- match(While);
- setState(217);
- match(OpenRoundBracket);
- setState(218);
- expression();
- setState(219);
- match(ClosedRoundBracket);
- setState(220);
- match(Semicolon);
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class ForStatementContext extends ParserRuleContext {
- public TerminalNode For() { return getToken(SimpleJavaParser.For, 0); }
- public TerminalNode OpenRoundBracket() { return getToken(SimpleJavaParser.OpenRoundBracket, 0); }
- public List Semicolon() { return getTokens(SimpleJavaParser.Semicolon); }
- public TerminalNode Semicolon(int i) {
- return getToken(SimpleJavaParser.Semicolon, i);
- }
- public TerminalNode ClosedRoundBracket() { return getToken(SimpleJavaParser.ClosedRoundBracket, 0); }
- public BlockStatementContext blockStatement() {
- return getRuleContext(BlockStatementContext.class,0);
- }
- public List statementExpression() {
- return getRuleContexts(StatementExpressionContext.class);
- }
- public StatementExpressionContext statementExpression(int i) {
- return getRuleContext(StatementExpressionContext.class,i);
- }
- public LocalVariableDeclarationContext localVariableDeclaration() {
- return getRuleContext(LocalVariableDeclarationContext.class,0);
- }
- public ExpressionContext expression() {
- return getRuleContext(ExpressionContext.class,0);
- }
- public ForStatementContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_forStatement; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterForStatement(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitForStatement(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitForStatement(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final ForStatementContext forStatement() throws RecognitionException {
- ForStatementContext _localctx = new ForStatementContext(_ctx, getState());
- enterRule(_localctx, 30, RULE_forStatement);
- int _la;
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(222);
- match(For);
- setState(223);
- match(OpenRoundBracket);
- setState(226);
- _errHandler.sync(this);
- switch ( getInterpreter().adaptivePredict(_input,18,_ctx) ) {
- case 1:
- {
- setState(224);
- statementExpression();
- }
- break;
- case 2:
- {
- setState(225);
- localVariableDeclaration();
- }
- break;
- }
- setState(228);
- match(Semicolon);
- setState(230);
- _errHandler.sync(this);
- _la = _input.LA(1);
- if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 554223150301190L) != 0)) {
- {
- setState(229);
- expression();
- }
- }
-
- setState(232);
- match(Semicolon);
- setState(234);
- _errHandler.sync(this);
- _la = _input.LA(1);
- if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 290339789209606L) != 0)) {
- {
- setState(233);
- statementExpression();
- }
- }
-
- setState(236);
- match(ClosedRoundBracket);
- setState(237);
- blockStatement();
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class IfElseStatementContext extends ParserRuleContext {
- public IfStatementContext ifStatement() {
- return getRuleContext(IfStatementContext.class,0);
- }
- public List elseIfStatement() {
- return getRuleContexts(ElseIfStatementContext.class);
- }
- public ElseIfStatementContext elseIfStatement(int i) {
- return getRuleContext(ElseIfStatementContext.class,i);
- }
- public ElseStatementContext elseStatement() {
- return getRuleContext(ElseStatementContext.class,0);
- }
- public IfElseStatementContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_ifElseStatement; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterIfElseStatement(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitIfElseStatement(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitIfElseStatement(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final IfElseStatementContext ifElseStatement() throws RecognitionException {
- IfElseStatementContext _localctx = new IfElseStatementContext(_ctx, getState());
- enterRule(_localctx, 32, RULE_ifElseStatement);
- int _la;
- try {
- int _alt;
- enterOuterAlt(_localctx, 1);
- {
- setState(239);
- ifStatement();
- setState(243);
- _errHandler.sync(this);
- _alt = getInterpreter().adaptivePredict(_input,21,_ctx);
- while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
- if ( _alt==1 ) {
- {
- {
- setState(240);
- elseIfStatement();
- }
- }
- }
- setState(245);
- _errHandler.sync(this);
- _alt = getInterpreter().adaptivePredict(_input,21,_ctx);
- }
- setState(247);
- _errHandler.sync(this);
- _la = _input.LA(1);
- if (_la==Else) {
- {
- setState(246);
- elseStatement();
- }
- }
-
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class IfStatementContext extends ParserRuleContext {
- public TerminalNode If() { return getToken(SimpleJavaParser.If, 0); }
- public TerminalNode OpenRoundBracket() { return getToken(SimpleJavaParser.OpenRoundBracket, 0); }
- public ExpressionContext expression() {
- return getRuleContext(ExpressionContext.class,0);
- }
- public TerminalNode ClosedRoundBracket() { return getToken(SimpleJavaParser.ClosedRoundBracket, 0); }
- public BlockStatementContext blockStatement() {
- return getRuleContext(BlockStatementContext.class,0);
- }
- public IfStatementContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_ifStatement; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterIfStatement(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitIfStatement(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitIfStatement(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final IfStatementContext ifStatement() throws RecognitionException {
- IfStatementContext _localctx = new IfStatementContext(_ctx, getState());
- enterRule(_localctx, 34, RULE_ifStatement);
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(249);
- match(If);
- setState(250);
- match(OpenRoundBracket);
- setState(251);
- expression();
- setState(252);
- match(ClosedRoundBracket);
- setState(253);
- blockStatement();
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class ElseIfStatementContext extends ParserRuleContext {
- public TerminalNode Else() { return getToken(SimpleJavaParser.Else, 0); }
- public TerminalNode If() { return getToken(SimpleJavaParser.If, 0); }
- public TerminalNode OpenRoundBracket() { return getToken(SimpleJavaParser.OpenRoundBracket, 0); }
- public ExpressionContext expression() {
- return getRuleContext(ExpressionContext.class,0);
- }
- public TerminalNode ClosedRoundBracket() { return getToken(SimpleJavaParser.ClosedRoundBracket, 0); }
- public BlockStatementContext blockStatement() {
- return getRuleContext(BlockStatementContext.class,0);
- }
- public ElseIfStatementContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_elseIfStatement; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterElseIfStatement(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitElseIfStatement(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitElseIfStatement(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final ElseIfStatementContext elseIfStatement() throws RecognitionException {
- ElseIfStatementContext _localctx = new ElseIfStatementContext(_ctx, getState());
- enterRule(_localctx, 36, RULE_elseIfStatement);
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(255);
- match(Else);
- setState(256);
- match(If);
- setState(257);
- match(OpenRoundBracket);
- setState(258);
- expression();
- setState(259);
- match(ClosedRoundBracket);
- setState(260);
- blockStatement();
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class ElseStatementContext extends ParserRuleContext {
- public TerminalNode Else() { return getToken(SimpleJavaParser.Else, 0); }
- public BlockStatementContext blockStatement() {
- return getRuleContext(BlockStatementContext.class,0);
- }
- public ElseStatementContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_elseStatement; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterElseStatement(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitElseStatement(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitElseStatement(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final ElseStatementContext elseStatement() throws RecognitionException {
- ElseStatementContext _localctx = new ElseStatementContext(_ctx, getState());
- enterRule(_localctx, 38, RULE_elseStatement);
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(262);
- match(Else);
- setState(263);
- blockStatement();
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class StatementExpressionContext extends ParserRuleContext {
- public AssignContext assign() {
- return getRuleContext(AssignContext.class,0);
- }
- public NewDeclarationContext newDeclaration() {
- return getRuleContext(NewDeclarationContext.class,0);
- }
- public MethodCallContext methodCall() {
- return getRuleContext(MethodCallContext.class,0);
- }
- public CrementExpressionContext crementExpression() {
- return getRuleContext(CrementExpressionContext.class,0);
- }
- public StatementExpressionContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_statementExpression; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterStatementExpression(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitStatementExpression(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitStatementExpression(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final StatementExpressionContext statementExpression() throws RecognitionException {
- StatementExpressionContext _localctx = new StatementExpressionContext(_ctx, getState());
- enterRule(_localctx, 40, RULE_statementExpression);
- try {
- setState(269);
- _errHandler.sync(this);
- switch ( getInterpreter().adaptivePredict(_input,23,_ctx) ) {
- case 1:
- enterOuterAlt(_localctx, 1);
- {
- setState(265);
- assign();
- }
- break;
- case 2:
- enterOuterAlt(_localctx, 2);
- {
- setState(266);
- newDeclaration();
- }
- break;
- case 3:
- enterOuterAlt(_localctx, 3);
- {
- setState(267);
- methodCall();
- }
- break;
- case 4:
- enterOuterAlt(_localctx, 4);
- {
- setState(268);
- crementExpression();
- }
- break;
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class AssignContext extends ParserRuleContext {
- public AssignableExpressionContext assignableExpression() {
- return getRuleContext(AssignableExpressionContext.class,0);
- }
- public TerminalNode Assign() { return getToken(SimpleJavaParser.Assign, 0); }
- public ExpressionContext expression() {
- return getRuleContext(ExpressionContext.class,0);
- }
- public AssignContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_assign; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterAssign(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitAssign(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitAssign(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final AssignContext assign() throws RecognitionException {
- AssignContext _localctx = new AssignContext(_ctx, getState());
- enterRule(_localctx, 42, RULE_assign);
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(271);
- assignableExpression();
- setState(272);
- match(Assign);
- setState(273);
- expression();
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class NewDeclarationContext extends ParserRuleContext {
- public TerminalNode New() { return getToken(SimpleJavaParser.New, 0); }
- public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
- public TerminalNode OpenRoundBracket() { return getToken(SimpleJavaParser.OpenRoundBracket, 0); }
- public ArgumentListContext argumentList() {
- return getRuleContext(ArgumentListContext.class,0);
- }
- public TerminalNode ClosedRoundBracket() { return getToken(SimpleJavaParser.ClosedRoundBracket, 0); }
- public NewDeclarationContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_newDeclaration; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterNewDeclaration(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitNewDeclaration(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitNewDeclaration(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final NewDeclarationContext newDeclaration() throws RecognitionException {
- NewDeclarationContext _localctx = new NewDeclarationContext(_ctx, getState());
- enterRule(_localctx, 44, RULE_newDeclaration);
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(275);
- match(New);
- setState(276);
- match(Identifier);
- setState(277);
- match(OpenRoundBracket);
- setState(278);
- argumentList();
- setState(279);
- match(ClosedRoundBracket);
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class ExpressionContext extends ParserRuleContext {
- public UnaryExpressionContext unaryExpression() {
- return getRuleContext(UnaryExpressionContext.class,0);
- }
- public BinaryExpressionContext binaryExpression() {
- return getRuleContext(BinaryExpressionContext.class,0);
- }
- public ExpressionContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_expression; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterExpression(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitExpression(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitExpression(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final ExpressionContext expression() throws RecognitionException {
- ExpressionContext _localctx = new ExpressionContext(_ctx, getState());
- enterRule(_localctx, 46, RULE_expression);
- try {
- setState(283);
- _errHandler.sync(this);
- switch ( getInterpreter().adaptivePredict(_input,24,_ctx) ) {
- case 1:
- enterOuterAlt(_localctx, 1);
- {
- setState(281);
- unaryExpression();
- }
- break;
- case 2:
- enterOuterAlt(_localctx, 2);
- {
- setState(282);
- binaryExpression();
- }
- break;
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class UnaryExpressionContext extends ParserRuleContext {
- public TerminalNode This() { return getToken(SimpleJavaParser.This, 0); }
- public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
- public MemberAccessContext memberAccess() {
- return getRuleContext(MemberAccessContext.class,0);
- }
- public ValueContext value() {
- return getRuleContext(ValueContext.class,0);
- }
- public NotExpressionContext notExpression() {
- return getRuleContext(NotExpressionContext.class,0);
- }
- public StatementExpressionContext statementExpression() {
- return getRuleContext(StatementExpressionContext.class,0);
- }
- public TerminalNode OpenRoundBracket() { return getToken(SimpleJavaParser.OpenRoundBracket, 0); }
- public ExpressionContext expression() {
- return getRuleContext(ExpressionContext.class,0);
- }
- public TerminalNode ClosedRoundBracket() { return getToken(SimpleJavaParser.ClosedRoundBracket, 0); }
- public UnaryExpressionContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_unaryExpression; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterUnaryExpression(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitUnaryExpression(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitUnaryExpression(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final UnaryExpressionContext unaryExpression() throws RecognitionException {
- UnaryExpressionContext _localctx = new UnaryExpressionContext(_ctx, getState());
- enterRule(_localctx, 48, RULE_unaryExpression);
- try {
- setState(295);
- _errHandler.sync(this);
- switch ( getInterpreter().adaptivePredict(_input,25,_ctx) ) {
- case 1:
- enterOuterAlt(_localctx, 1);
- {
- setState(285);
- match(This);
- }
- break;
- case 2:
- enterOuterAlt(_localctx, 2);
- {
- setState(286);
- match(Identifier);
- }
- break;
- case 3:
- enterOuterAlt(_localctx, 3);
- {
- setState(287);
- memberAccess();
- }
- break;
- case 4:
- enterOuterAlt(_localctx, 4);
- {
- setState(288);
- value();
- }
- break;
- case 5:
- enterOuterAlt(_localctx, 5);
- {
- setState(289);
- notExpression();
- }
- break;
- case 6:
- enterOuterAlt(_localctx, 6);
- {
- setState(290);
- statementExpression();
- }
- break;
- case 7:
- enterOuterAlt(_localctx, 7);
- {
- setState(291);
- match(OpenRoundBracket);
- setState(292);
- expression();
- setState(293);
- match(ClosedRoundBracket);
- }
- break;
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class NotExpressionContext extends ParserRuleContext {
- public TerminalNode Not() { return getToken(SimpleJavaParser.Not, 0); }
- public ExpressionContext expression() {
- return getRuleContext(ExpressionContext.class,0);
- }
- public NotExpressionContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_notExpression; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterNotExpression(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitNotExpression(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitNotExpression(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final NotExpressionContext notExpression() throws RecognitionException {
- NotExpressionContext _localctx = new NotExpressionContext(_ctx, getState());
- enterRule(_localctx, 50, RULE_notExpression);
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(297);
- match(Not);
- setState(298);
- expression();
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class CrementExpressionContext extends ParserRuleContext {
- public IncrementExpressionContext incrementExpression() {
- return getRuleContext(IncrementExpressionContext.class,0);
- }
- public DecrementExpressionContext decrementExpression() {
- return getRuleContext(DecrementExpressionContext.class,0);
- }
- public CrementExpressionContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_crementExpression; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterCrementExpression(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitCrementExpression(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitCrementExpression(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final CrementExpressionContext crementExpression() throws RecognitionException {
- CrementExpressionContext _localctx = new CrementExpressionContext(_ctx, getState());
- enterRule(_localctx, 52, RULE_crementExpression);
- try {
- setState(302);
- _errHandler.sync(this);
- switch ( getInterpreter().adaptivePredict(_input,26,_ctx) ) {
- case 1:
- enterOuterAlt(_localctx, 1);
- {
- setState(300);
- incrementExpression();
- }
- break;
- case 2:
- enterOuterAlt(_localctx, 2);
- {
- setState(301);
- decrementExpression();
- }
- break;
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class IncrementExpressionContext extends ParserRuleContext {
- public PrefixIncrementExpressionContext prefixIncrementExpression() {
- return getRuleContext(PrefixIncrementExpressionContext.class,0);
- }
- public SuffixIncrementExpressionContext suffixIncrementExpression() {
- return getRuleContext(SuffixIncrementExpressionContext.class,0);
- }
- public IncrementExpressionContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_incrementExpression; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterIncrementExpression(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitIncrementExpression(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitIncrementExpression(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final IncrementExpressionContext incrementExpression() throws RecognitionException {
- IncrementExpressionContext _localctx = new IncrementExpressionContext(_ctx, getState());
- enterRule(_localctx, 54, RULE_incrementExpression);
- try {
- setState(306);
- _errHandler.sync(this);
- switch (_input.LA(1)) {
- case T__0:
- enterOuterAlt(_localctx, 1);
- {
- setState(304);
- prefixIncrementExpression();
- }
- break;
- case This:
- case Identifier:
- enterOuterAlt(_localctx, 2);
- {
- setState(305);
- suffixIncrementExpression();
- }
- break;
- default:
- throw new NoViableAltException(this);
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class PrefixIncrementExpressionContext extends ParserRuleContext {
- public AssignableExpressionContext assignableExpression() {
- return getRuleContext(AssignableExpressionContext.class,0);
- }
- public PrefixIncrementExpressionContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_prefixIncrementExpression; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterPrefixIncrementExpression(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitPrefixIncrementExpression(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitPrefixIncrementExpression(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final PrefixIncrementExpressionContext prefixIncrementExpression() throws RecognitionException {
- PrefixIncrementExpressionContext _localctx = new PrefixIncrementExpressionContext(_ctx, getState());
- enterRule(_localctx, 56, RULE_prefixIncrementExpression);
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(308);
- match(T__0);
- setState(309);
- assignableExpression();
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class SuffixIncrementExpressionContext extends ParserRuleContext {
- public AssignableExpressionContext assignableExpression() {
- return getRuleContext(AssignableExpressionContext.class,0);
- }
- public SuffixIncrementExpressionContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_suffixIncrementExpression; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterSuffixIncrementExpression(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitSuffixIncrementExpression(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitSuffixIncrementExpression(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final SuffixIncrementExpressionContext suffixIncrementExpression() throws RecognitionException {
- SuffixIncrementExpressionContext _localctx = new SuffixIncrementExpressionContext(_ctx, getState());
- enterRule(_localctx, 58, RULE_suffixIncrementExpression);
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(311);
- assignableExpression();
- setState(312);
- match(T__0);
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class DecrementExpressionContext extends ParserRuleContext {
- public PrefixDecrementExpressionContext prefixDecrementExpression() {
- return getRuleContext(PrefixDecrementExpressionContext.class,0);
- }
- public SuffixDecrementExpressionContext suffixDecrementExpression() {
- return getRuleContext(SuffixDecrementExpressionContext.class,0);
- }
- public DecrementExpressionContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_decrementExpression; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterDecrementExpression(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitDecrementExpression(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitDecrementExpression(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final DecrementExpressionContext decrementExpression() throws RecognitionException {
- DecrementExpressionContext _localctx = new DecrementExpressionContext(_ctx, getState());
- enterRule(_localctx, 60, RULE_decrementExpression);
- try {
- setState(316);
- _errHandler.sync(this);
- switch (_input.LA(1)) {
- case T__1:
- enterOuterAlt(_localctx, 1);
- {
- setState(314);
- prefixDecrementExpression();
- }
- break;
- case This:
- case Identifier:
- enterOuterAlt(_localctx, 2);
- {
- setState(315);
- suffixDecrementExpression();
- }
- break;
- default:
- throw new NoViableAltException(this);
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class PrefixDecrementExpressionContext extends ParserRuleContext {
- public AssignableExpressionContext assignableExpression() {
- return getRuleContext(AssignableExpressionContext.class,0);
- }
- public PrefixDecrementExpressionContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_prefixDecrementExpression; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterPrefixDecrementExpression(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitPrefixDecrementExpression(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitPrefixDecrementExpression(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final PrefixDecrementExpressionContext prefixDecrementExpression() throws RecognitionException {
- PrefixDecrementExpressionContext _localctx = new PrefixDecrementExpressionContext(_ctx, getState());
- enterRule(_localctx, 62, RULE_prefixDecrementExpression);
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(318);
- match(T__1);
- setState(319);
- assignableExpression();
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class SuffixDecrementExpressionContext extends ParserRuleContext {
- public AssignableExpressionContext assignableExpression() {
- return getRuleContext(AssignableExpressionContext.class,0);
- }
- public SuffixDecrementExpressionContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_suffixDecrementExpression; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterSuffixDecrementExpression(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitSuffixDecrementExpression(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitSuffixDecrementExpression(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final SuffixDecrementExpressionContext suffixDecrementExpression() throws RecognitionException {
- SuffixDecrementExpressionContext _localctx = new SuffixDecrementExpressionContext(_ctx, getState());
- enterRule(_localctx, 64, RULE_suffixDecrementExpression);
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(321);
- assignableExpression();
- setState(322);
- match(T__1);
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class AssignableExpressionContext extends ParserRuleContext {
- public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
- public MemberAccessContext memberAccess() {
- return getRuleContext(MemberAccessContext.class,0);
- }
- public AssignableExpressionContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_assignableExpression; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterAssignableExpression(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitAssignableExpression(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitAssignableExpression(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final AssignableExpressionContext assignableExpression() throws RecognitionException {
- AssignableExpressionContext _localctx = new AssignableExpressionContext(_ctx, getState());
- enterRule(_localctx, 66, RULE_assignableExpression);
- try {
- setState(326);
- _errHandler.sync(this);
- switch ( getInterpreter().adaptivePredict(_input,29,_ctx) ) {
- case 1:
- enterOuterAlt(_localctx, 1);
- {
- setState(324);
- match(Identifier);
- }
- break;
- case 2:
- enterOuterAlt(_localctx, 2);
- {
- setState(325);
- memberAccess();
- }
- break;
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class MemberAccessContext extends ParserRuleContext {
- public TerminalNode This() { return getToken(SimpleJavaParser.This, 0); }
- public List Dot() { return getTokens(SimpleJavaParser.Dot); }
- public TerminalNode Dot(int i) {
- return getToken(SimpleJavaParser.Dot, i);
- }
- public List Identifier() { return getTokens(SimpleJavaParser.Identifier); }
- public TerminalNode Identifier(int i) {
- return getToken(SimpleJavaParser.Identifier, i);
- }
- public MemberAccessContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_memberAccess; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterMemberAccess(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitMemberAccess(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitMemberAccess(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final MemberAccessContext memberAccess() throws RecognitionException {
- MemberAccessContext _localctx = new MemberAccessContext(_ctx, getState());
- enterRule(_localctx, 68, RULE_memberAccess);
- int _la;
- try {
- int _alt;
- setState(342);
- _errHandler.sync(this);
- switch ( getInterpreter().adaptivePredict(_input,32,_ctx) ) {
- case 1:
- enterOuterAlt(_localctx, 1);
- {
- setState(328);
- match(This);
- setState(329);
- match(Dot);
- setState(330);
- match(Identifier);
- }
- break;
- case 2:
- enterOuterAlt(_localctx, 2);
- {
- setState(333);
- _errHandler.sync(this);
- _la = _input.LA(1);
- if (_la==This) {
- {
- setState(331);
- match(This);
- setState(332);
- match(Dot);
- }
- }
-
- setState(337);
- _errHandler.sync(this);
- _alt = 1;
- do {
- switch (_alt) {
- case 1:
- {
- {
- setState(335);
- match(Identifier);
- setState(336);
- match(Dot);
- }
- }
- break;
- default:
- throw new NoViableAltException(this);
- }
- setState(339);
- _errHandler.sync(this);
- _alt = getInterpreter().adaptivePredict(_input,31,_ctx);
- } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER );
- setState(341);
- match(Identifier);
- }
- break;
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class BinaryExpressionContext extends ParserRuleContext {
- public CalculationExpressionContext calculationExpression() {
- return getRuleContext(CalculationExpressionContext.class,0);
- }
- public NonCalculationExpressionContext nonCalculationExpression() {
- return getRuleContext(NonCalculationExpressionContext.class,0);
- }
- public BinaryExpressionContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_binaryExpression; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterBinaryExpression(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitBinaryExpression(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitBinaryExpression(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final BinaryExpressionContext binaryExpression() throws RecognitionException {
- BinaryExpressionContext _localctx = new BinaryExpressionContext(_ctx, getState());
- enterRule(_localctx, 70, RULE_binaryExpression);
- try {
- setState(346);
- _errHandler.sync(this);
- switch ( getInterpreter().adaptivePredict(_input,33,_ctx) ) {
- case 1:
- enterOuterAlt(_localctx, 1);
- {
- setState(344);
- calculationExpression(0);
- }
- break;
- case 2:
- enterOuterAlt(_localctx, 2);
- {
- setState(345);
- nonCalculationExpression();
- }
- break;
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class CalculationExpressionContext extends ParserRuleContext {
- public DotExpressionContext dotExpression() {
- return getRuleContext(DotExpressionContext.class,0);
- }
- public CalculationExpressionContext calculationExpression() {
- return getRuleContext(CalculationExpressionContext.class,0);
- }
- public TerminalNode LineOperator() { return getToken(SimpleJavaParser.LineOperator, 0); }
- public CalculationExpressionContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_calculationExpression; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterCalculationExpression(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitCalculationExpression(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitCalculationExpression(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final CalculationExpressionContext calculationExpression() throws RecognitionException {
- return calculationExpression(0);
- }
-
- private CalculationExpressionContext calculationExpression(int _p) throws RecognitionException {
- ParserRuleContext _parentctx = _ctx;
- int _parentState = getState();
- CalculationExpressionContext _localctx = new CalculationExpressionContext(_ctx, _parentState);
- CalculationExpressionContext _prevctx = _localctx;
- int _startState = 72;
- enterRecursionRule(_localctx, 72, RULE_calculationExpression, _p);
- try {
- int _alt;
- enterOuterAlt(_localctx, 1);
- {
- {
- setState(349);
- dotExpression(0);
- }
- _ctx.stop = _input.LT(-1);
- setState(356);
- _errHandler.sync(this);
- _alt = getInterpreter().adaptivePredict(_input,34,_ctx);
- while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
- if ( _alt==1 ) {
- if ( _parseListeners!=null ) triggerExitRuleEvent();
- _prevctx = _localctx;
- {
- {
- _localctx = new CalculationExpressionContext(_parentctx, _parentState);
- pushNewRecursionContext(_localctx, _startState, RULE_calculationExpression);
- setState(351);
- if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)");
- setState(352);
- match(LineOperator);
- setState(353);
- dotExpression(0);
- }
- }
- }
- setState(358);
- _errHandler.sync(this);
- _alt = getInterpreter().adaptivePredict(_input,34,_ctx);
- }
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- unrollRecursionContexts(_parentctx);
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class DotExpressionContext extends ParserRuleContext {
- public DotSubtractionExpressionContext dotSubtractionExpression() {
- return getRuleContext(DotSubtractionExpressionContext.class,0);
- }
- public DotExpressionContext dotExpression() {
- return getRuleContext(DotExpressionContext.class,0);
- }
- public TerminalNode DotOperator() { return getToken(SimpleJavaParser.DotOperator, 0); }
- public DotExpressionContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_dotExpression; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterDotExpression(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitDotExpression(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitDotExpression(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final DotExpressionContext dotExpression() throws RecognitionException {
- return dotExpression(0);
- }
-
- private DotExpressionContext dotExpression(int _p) throws RecognitionException {
- ParserRuleContext _parentctx = _ctx;
- int _parentState = getState();
- DotExpressionContext _localctx = new DotExpressionContext(_ctx, _parentState);
- DotExpressionContext _prevctx = _localctx;
- int _startState = 74;
- enterRecursionRule(_localctx, 74, RULE_dotExpression, _p);
- try {
- int _alt;
- enterOuterAlt(_localctx, 1);
- {
- {
- setState(360);
- dotSubtractionExpression();
- }
- _ctx.stop = _input.LT(-1);
- setState(367);
- _errHandler.sync(this);
- _alt = getInterpreter().adaptivePredict(_input,35,_ctx);
- while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
- if ( _alt==1 ) {
- if ( _parseListeners!=null ) triggerExitRuleEvent();
- _prevctx = _localctx;
- {
- {
- _localctx = new DotExpressionContext(_parentctx, _parentState);
- pushNewRecursionContext(_localctx, _startState, RULE_dotExpression);
- setState(362);
- if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)");
- setState(363);
- match(DotOperator);
- setState(364);
- dotSubtractionExpression();
- }
- }
- }
- setState(369);
- _errHandler.sync(this);
- _alt = getInterpreter().adaptivePredict(_input,35,_ctx);
- }
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- unrollRecursionContexts(_parentctx);
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class DotSubtractionExpressionContext extends ParserRuleContext {
- public TerminalNode IntValue() { return getToken(SimpleJavaParser.IntValue, 0); }
- public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
- public MemberAccessContext memberAccess() {
- return getRuleContext(MemberAccessContext.class,0);
- }
- public MethodCallContext methodCall() {
- return getRuleContext(MethodCallContext.class,0);
- }
- public TerminalNode OpenRoundBracket() { return getToken(SimpleJavaParser.OpenRoundBracket, 0); }
- public CalculationExpressionContext calculationExpression() {
- return getRuleContext(CalculationExpressionContext.class,0);
- }
- public TerminalNode ClosedRoundBracket() { return getToken(SimpleJavaParser.ClosedRoundBracket, 0); }
- public DotSubtractionExpressionContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_dotSubtractionExpression; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterDotSubtractionExpression(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitDotSubtractionExpression(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitDotSubtractionExpression(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final DotSubtractionExpressionContext dotSubtractionExpression() throws RecognitionException {
- DotSubtractionExpressionContext _localctx = new DotSubtractionExpressionContext(_ctx, getState());
- enterRule(_localctx, 76, RULE_dotSubtractionExpression);
- try {
- setState(378);
- _errHandler.sync(this);
- switch ( getInterpreter().adaptivePredict(_input,36,_ctx) ) {
- case 1:
- enterOuterAlt(_localctx, 1);
- {
- setState(370);
- match(IntValue);
- }
- break;
- case 2:
- enterOuterAlt(_localctx, 2);
- {
- setState(371);
- match(Identifier);
- }
- break;
- case 3:
- enterOuterAlt(_localctx, 3);
- {
- setState(372);
- memberAccess();
- }
- break;
- case 4:
- enterOuterAlt(_localctx, 4);
- {
- setState(373);
- methodCall();
- setState(374);
- match(OpenRoundBracket);
- setState(375);
- calculationExpression(0);
- setState(376);
- match(ClosedRoundBracket);
- }
- break;
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class NonCalculationExpressionContext extends ParserRuleContext {
- public UnaryExpressionContext unaryExpression() {
- return getRuleContext(UnaryExpressionContext.class,0);
- }
- public NonCalculationOperatorContext nonCalculationOperator() {
- return getRuleContext(NonCalculationOperatorContext.class,0);
- }
- public ExpressionContext expression() {
- return getRuleContext(ExpressionContext.class,0);
- }
- public NonCalculationExpressionContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_nonCalculationExpression; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterNonCalculationExpression(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitNonCalculationExpression(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitNonCalculationExpression(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final NonCalculationExpressionContext nonCalculationExpression() throws RecognitionException {
- NonCalculationExpressionContext _localctx = new NonCalculationExpressionContext(_ctx, getState());
- enterRule(_localctx, 78, RULE_nonCalculationExpression);
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(380);
- unaryExpression();
- setState(381);
- nonCalculationOperator();
- setState(382);
- expression();
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class MethodCallContext extends ParserRuleContext {
- public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
- public TerminalNode OpenRoundBracket() { return getToken(SimpleJavaParser.OpenRoundBracket, 0); }
- public ArgumentListContext argumentList() {
- return getRuleContext(ArgumentListContext.class,0);
- }
- public TerminalNode ClosedRoundBracket() { return getToken(SimpleJavaParser.ClosedRoundBracket, 0); }
- public TargetContext target() {
- return getRuleContext(TargetContext.class,0);
- }
- public List chainedMethod() {
- return getRuleContexts(ChainedMethodContext.class);
- }
- public ChainedMethodContext chainedMethod(int i) {
- return getRuleContext(ChainedMethodContext.class,i);
- }
- public MethodCallContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_methodCall; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterMethodCall(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitMethodCall(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitMethodCall(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final MethodCallContext methodCall() throws RecognitionException {
- MethodCallContext _localctx = new MethodCallContext(_ctx, getState());
- enterRule(_localctx, 80, RULE_methodCall);
- try {
- int _alt;
- enterOuterAlt(_localctx, 1);
- {
- setState(385);
- _errHandler.sync(this);
- switch ( getInterpreter().adaptivePredict(_input,37,_ctx) ) {
- case 1:
- {
- setState(384);
- target();
- }
- break;
- }
- setState(390);
- _errHandler.sync(this);
- _alt = getInterpreter().adaptivePredict(_input,38,_ctx);
- while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
- if ( _alt==1 ) {
- {
- {
- setState(387);
- chainedMethod();
- }
- }
- }
- setState(392);
- _errHandler.sync(this);
- _alt = getInterpreter().adaptivePredict(_input,38,_ctx);
- }
- setState(393);
- match(Identifier);
- setState(394);
- match(OpenRoundBracket);
- setState(395);
- argumentList();
- setState(396);
- match(ClosedRoundBracket);
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class TargetContext extends ParserRuleContext {
- public TerminalNode Dot() { return getToken(SimpleJavaParser.Dot, 0); }
- public TerminalNode This() { return getToken(SimpleJavaParser.This, 0); }
- public MemberAccessContext memberAccess() {
- return getRuleContext(MemberAccessContext.class,0);
- }
- public NewDeclarationContext newDeclaration() {
- return getRuleContext(NewDeclarationContext.class,0);
- }
- public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
- public TargetContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_target; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterTarget(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitTarget(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitTarget(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final TargetContext target() throws RecognitionException {
- TargetContext _localctx = new TargetContext(_ctx, getState());
- enterRule(_localctx, 82, RULE_target);
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(402);
- _errHandler.sync(this);
- switch ( getInterpreter().adaptivePredict(_input,39,_ctx) ) {
- case 1:
- {
- setState(398);
- match(This);
- }
- break;
- case 2:
- {
- setState(399);
- memberAccess();
- }
- break;
- case 3:
- {
- setState(400);
- newDeclaration();
- }
- break;
- case 4:
- {
- setState(401);
- match(Identifier);
- }
- break;
- }
- setState(404);
- match(Dot);
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class ChainedMethodContext extends ParserRuleContext {
- public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
- public TerminalNode OpenRoundBracket() { return getToken(SimpleJavaParser.OpenRoundBracket, 0); }
- public ArgumentListContext argumentList() {
- return getRuleContext(ArgumentListContext.class,0);
- }
- public TerminalNode ClosedRoundBracket() { return getToken(SimpleJavaParser.ClosedRoundBracket, 0); }
- public TerminalNode Dot() { return getToken(SimpleJavaParser.Dot, 0); }
- public ChainedMethodContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_chainedMethod; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterChainedMethod(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitChainedMethod(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitChainedMethod(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final ChainedMethodContext chainedMethod() throws RecognitionException {
- ChainedMethodContext _localctx = new ChainedMethodContext(_ctx, getState());
- enterRule(_localctx, 84, RULE_chainedMethod);
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(406);
- match(Identifier);
- setState(407);
- match(OpenRoundBracket);
- setState(408);
- argumentList();
- setState(409);
- match(ClosedRoundBracket);
- setState(410);
- match(Dot);
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class TypeContext extends ParserRuleContext {
- public TerminalNode Int() { return getToken(SimpleJavaParser.Int, 0); }
- public TerminalNode Boolean() { return getToken(SimpleJavaParser.Boolean, 0); }
- public TerminalNode Char() { return getToken(SimpleJavaParser.Char, 0); }
- public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
- public TypeContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_type; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterType(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitType(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitType(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final TypeContext type() throws RecognitionException {
- TypeContext _localctx = new TypeContext(_ctx, getState());
- enterRule(_localctx, 86, RULE_type);
- int _la;
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(412);
- _la = _input.LA(1);
- if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 281474976710768L) != 0)) ) {
- _errHandler.recoverInline(this);
- }
- else {
- if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
- _errHandler.reportMatch(this);
- consume();
- }
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class ValueContext extends ParserRuleContext {
- public TerminalNode IntValue() { return getToken(SimpleJavaParser.IntValue, 0); }
- public TerminalNode BooleanValue() { return getToken(SimpleJavaParser.BooleanValue, 0); }
- public TerminalNode CharValue() { return getToken(SimpleJavaParser.CharValue, 0); }
- public TerminalNode NullValue() { return getToken(SimpleJavaParser.NullValue, 0); }
- public ValueContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_value; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterValue(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitValue(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitValue(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final ValueContext value() throws RecognitionException {
- ValueContext _localctx = new ValueContext(_ctx, getState());
- enterRule(_localctx, 88, RULE_value);
- int _la;
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(414);
- _la = _input.LA(1);
- if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 263882790666240L) != 0)) ) {
- _errHandler.recoverInline(this);
- }
- else {
- if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
- _errHandler.reportMatch(this);
- consume();
- }
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- @SuppressWarnings("CheckReturnValue")
- public static class NonCalculationOperatorContext extends ParserRuleContext {
- public TerminalNode LogicalOperator() { return getToken(SimpleJavaParser.LogicalOperator, 0); }
- public TerminalNode ComparisonOperator() { return getToken(SimpleJavaParser.ComparisonOperator, 0); }
- public NonCalculationOperatorContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_nonCalculationOperator; }
- @Override
- public void enterRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterNonCalculationOperator(this);
- }
- @Override
- public void exitRule(ParseTreeListener listener) {
- if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitNonCalculationOperator(this);
- }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitNonCalculationOperator(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final NonCalculationOperatorContext nonCalculationOperator() throws RecognitionException {
- NonCalculationOperatorContext _localctx = new NonCalculationOperatorContext(_ctx, getState());
- enterRule(_localctx, 90, RULE_nonCalculationOperator);
- int _la;
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(416);
- _la = _input.LA(1);
- if ( !(_la==ComparisonOperator || _la==LogicalOperator) ) {
- _errHandler.recoverInline(this);
- }
- else {
- if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
- _errHandler.reportMatch(this);
- consume();
- }
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
- public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) {
- switch (ruleIndex) {
- case 36:
- return calculationExpression_sempred((CalculationExpressionContext)_localctx, predIndex);
- case 37:
- return dotExpression_sempred((DotExpressionContext)_localctx, predIndex);
- }
- return true;
- }
- private boolean calculationExpression_sempred(CalculationExpressionContext _localctx, int predIndex) {
- switch (predIndex) {
- case 0:
- return precpred(_ctx, 2);
- }
- return true;
- }
- private boolean dotExpression_sempred(DotExpressionContext _localctx, int predIndex) {
- switch (predIndex) {
- case 1:
- return precpred(_ctx, 2);
- }
- return true;
- }
-
- public static final String _serializedATN =
- "\u0004\u00013\u01a3\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"+
- "\f\u0007\f\u0002\r\u0007\r\u0002\u000e\u0007\u000e\u0002\u000f\u0007\u000f"+
- "\u0002\u0010\u0007\u0010\u0002\u0011\u0007\u0011\u0002\u0012\u0007\u0012"+
- "\u0002\u0013\u0007\u0013\u0002\u0014\u0007\u0014\u0002\u0015\u0007\u0015"+
- "\u0002\u0016\u0007\u0016\u0002\u0017\u0007\u0017\u0002\u0018\u0007\u0018"+
- "\u0002\u0019\u0007\u0019\u0002\u001a\u0007\u001a\u0002\u001b\u0007\u001b"+
- "\u0002\u001c\u0007\u001c\u0002\u001d\u0007\u001d\u0002\u001e\u0007\u001e"+
- "\u0002\u001f\u0007\u001f\u0002 \u0007 \u0002!\u0007!\u0002\"\u0007\"\u0002"+
- "#\u0007#\u0002$\u0007$\u0002%\u0007%\u0002&\u0007&\u0002\'\u0007\'\u0002"+
- "(\u0007(\u0002)\u0007)\u0002*\u0007*\u0002+\u0007+\u0002,\u0007,\u0002"+
- "-\u0007-\u0001\u0000\u0004\u0000^\b\u0000\u000b\u0000\f\u0000_\u0001\u0001"+
- "\u0003\u0001c\b\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001"+
- "\u0005\u0001i\b\u0001\n\u0001\f\u0001l\t\u0001\u0001\u0001\u0001\u0001"+
- "\u0001\u0002\u0001\u0002\u0001\u0002\u0003\u0002s\b\u0002\u0001\u0003"+
- "\u0003\u0003v\b\u0003\u0001\u0003\u0001\u0003\u0001\u0003\u0003\u0003"+
- "{\b\u0003\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0004\u0003\u0004"+
- "\u0081\b\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0005"+
- "\u0001\u0005\u0001\u0005\u0003\u0005\u008a\b\u0005\u0001\u0005\u0001\u0005"+
- "\u0003\u0005\u008e\b\u0005\u0001\u0005\u0001\u0005\u0001\u0005\u0003\u0005"+
- "\u0093\b\u0005\u0001\u0005\u0001\u0005\u0003\u0005\u0097\b\u0005\u0001"+
- "\u0006\u0001\u0006\u0001\u0006\u0005\u0006\u009c\b\u0006\n\u0006\f\u0006"+
- "\u009f\t\u0006\u0001\u0007\u0001\u0007\u0001\u0007\u0001\b\u0001\b\u0001"+
- "\b\u0005\b\u00a7\b\b\n\b\f\b\u00aa\t\b\u0003\b\u00ac\b\b\u0001\t\u0001"+
- "\t\u0001\t\u0001\t\u0001\t\u0001\t\u0001\t\u0001\t\u0001\t\u0001\t\u0001"+
- "\t\u0001\t\u0001\t\u0001\t\u0003\t\u00bc\b\t\u0001\n\u0001\n\u0005\n\u00c0"+
- "\b\n\n\n\f\n\u00c3\t\n\u0001\n\u0001\n\u0001\u000b\u0001\u000b\u0003\u000b"+
- "\u00c9\b\u000b\u0001\f\u0001\f\u0001\f\u0001\f\u0003\f\u00cf\b\f\u0001"+
- "\r\u0001\r\u0001\r\u0001\r\u0001\r\u0001\r\u0001\u000e\u0001\u000e\u0001"+
- "\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0001"+
- "\u000f\u0001\u000f\u0001\u000f\u0001\u000f\u0003\u000f\u00e3\b\u000f\u0001"+
- "\u000f\u0001\u000f\u0003\u000f\u00e7\b\u000f\u0001\u000f\u0001\u000f\u0003"+
- "\u000f\u00eb\b\u000f\u0001\u000f\u0001\u000f\u0001\u000f\u0001\u0010\u0001"+
- "\u0010\u0005\u0010\u00f2\b\u0010\n\u0010\f\u0010\u00f5\t\u0010\u0001\u0010"+
- "\u0003\u0010\u00f8\b\u0010\u0001\u0011\u0001\u0011\u0001\u0011\u0001\u0011"+
- "\u0001\u0011\u0001\u0011\u0001\u0012\u0001\u0012\u0001\u0012\u0001\u0012"+
- "\u0001\u0012\u0001\u0012\u0001\u0012\u0001\u0013\u0001\u0013\u0001\u0013"+
- "\u0001\u0014\u0001\u0014\u0001\u0014\u0001\u0014\u0003\u0014\u010e\b\u0014"+
- "\u0001\u0015\u0001\u0015\u0001\u0015\u0001\u0015\u0001\u0016\u0001\u0016"+
- "\u0001\u0016\u0001\u0016\u0001\u0016\u0001\u0016\u0001\u0017\u0001\u0017"+
- "\u0003\u0017\u011c\b\u0017\u0001\u0018\u0001\u0018\u0001\u0018\u0001\u0018"+
- "\u0001\u0018\u0001\u0018\u0001\u0018\u0001\u0018\u0001\u0018\u0001\u0018"+
- "\u0003\u0018\u0128\b\u0018\u0001\u0019\u0001\u0019\u0001\u0019\u0001\u001a"+
- "\u0001\u001a\u0003\u001a\u012f\b\u001a\u0001\u001b\u0001\u001b\u0003\u001b"+
- "\u0133\b\u001b\u0001\u001c\u0001\u001c\u0001\u001c\u0001\u001d\u0001\u001d"+
- "\u0001\u001d\u0001\u001e\u0001\u001e\u0003\u001e\u013d\b\u001e\u0001\u001f"+
- "\u0001\u001f\u0001\u001f\u0001 \u0001 \u0001 \u0001!\u0001!\u0003!\u0147"+
- "\b!\u0001\"\u0001\"\u0001\"\u0001\"\u0001\"\u0003\"\u014e\b\"\u0001\""+
- "\u0001\"\u0004\"\u0152\b\"\u000b\"\f\"\u0153\u0001\"\u0003\"\u0157\b\""+
- "\u0001#\u0001#\u0003#\u015b\b#\u0001$\u0001$\u0001$\u0001$\u0001$\u0001"+
- "$\u0005$\u0163\b$\n$\f$\u0166\t$\u0001%\u0001%\u0001%\u0001%\u0001%\u0001"+
- "%\u0005%\u016e\b%\n%\f%\u0171\t%\u0001&\u0001&\u0001&\u0001&\u0001&\u0001"+
- "&\u0001&\u0001&\u0003&\u017b\b&\u0001\'\u0001\'\u0001\'\u0001\'\u0001"+
- "(\u0003(\u0182\b(\u0001(\u0005(\u0185\b(\n(\f(\u0188\t(\u0001(\u0001("+
- "\u0001(\u0001(\u0001(\u0001)\u0001)\u0001)\u0001)\u0003)\u0193\b)\u0001"+
- ")\u0001)\u0001*\u0001*\u0001*\u0001*\u0001*\u0001*\u0001+\u0001+\u0001"+
- ",\u0001,\u0001-\u0001-\u0001-\u0000\u0002HJ.\u0000\u0002\u0004\u0006\b"+
- "\n\f\u000e\u0010\u0012\u0014\u0016\u0018\u001a\u001c\u001e \"$&(*,.02"+
- "468:<>@BDFHJLNPRTVXZ\u0000\u0003\u0002\u0000\u0004\u000600\u0001\u0000"+
- ",/\u0001\u0000\u000b\f\u01ae\u0000]\u0001\u0000\u0000\u0000\u0002b\u0001"+
- "\u0000\u0000\u0000\u0004r\u0001\u0000\u0000\u0000\u0006u\u0001\u0000\u0000"+
- "\u0000\b\u0080\u0001\u0000\u0000\u0000\n\u0096\u0001\u0000\u0000\u0000"+
- "\f\u0098\u0001\u0000\u0000\u0000\u000e\u00a0\u0001\u0000\u0000\u0000\u0010"+
- "\u00ab\u0001\u0000\u0000\u0000\u0012\u00bb\u0001\u0000\u0000\u0000\u0014"+
- "\u00bd\u0001\u0000\u0000\u0000\u0016\u00c6\u0001\u0000\u0000\u0000\u0018"+
- "\u00ca\u0001\u0000\u0000\u0000\u001a\u00d0\u0001\u0000\u0000\u0000\u001c"+
- "\u00d6\u0001\u0000\u0000\u0000\u001e\u00de\u0001\u0000\u0000\u0000 \u00ef"+
- "\u0001\u0000\u0000\u0000\"\u00f9\u0001\u0000\u0000\u0000$\u00ff\u0001"+
- "\u0000\u0000\u0000&\u0106\u0001\u0000\u0000\u0000(\u010d\u0001\u0000\u0000"+
- "\u0000*\u010f\u0001\u0000\u0000\u0000,\u0113\u0001\u0000\u0000\u0000."+
- "\u011b\u0001\u0000\u0000\u00000\u0127\u0001\u0000\u0000\u00002\u0129\u0001"+
- "\u0000\u0000\u00004\u012e\u0001\u0000\u0000\u00006\u0132\u0001\u0000\u0000"+
- "\u00008\u0134\u0001\u0000\u0000\u0000:\u0137\u0001\u0000\u0000\u0000<"+
- "\u013c\u0001\u0000\u0000\u0000>\u013e\u0001\u0000\u0000\u0000@\u0141\u0001"+
- "\u0000\u0000\u0000B\u0146\u0001\u0000\u0000\u0000D\u0156\u0001\u0000\u0000"+
- "\u0000F\u015a\u0001\u0000\u0000\u0000H\u015c\u0001\u0000\u0000\u0000J"+
- "\u0167\u0001\u0000\u0000\u0000L\u017a\u0001\u0000\u0000\u0000N\u017c\u0001"+
- "\u0000\u0000\u0000P\u0181\u0001\u0000\u0000\u0000R\u0192\u0001\u0000\u0000"+
- "\u0000T\u0196\u0001\u0000\u0000\u0000V\u019c\u0001\u0000\u0000\u0000X"+
- "\u019e\u0001\u0000\u0000\u0000Z\u01a0\u0001\u0000\u0000\u0000\\^\u0003"+
- "\u0002\u0001\u0000]\\\u0001\u0000\u0000\u0000^_\u0001\u0000\u0000\u0000"+
- "_]\u0001\u0000\u0000\u0000_`\u0001\u0000\u0000\u0000`\u0001\u0001\u0000"+
- "\u0000\u0000ac\u0005\u0007\u0000\u0000ba\u0001\u0000\u0000\u0000bc\u0001"+
- "\u0000\u0000\u0000cd\u0001\u0000\u0000\u0000de\u0005#\u0000\u0000ef\u0005"+
- "0\u0000\u0000fj\u0005\u001f\u0000\u0000gi\u0003\u0004\u0002\u0000hg\u0001"+
- "\u0000\u0000\u0000il\u0001\u0000\u0000\u0000jh\u0001\u0000\u0000\u0000"+
- "jk\u0001\u0000\u0000\u0000km\u0001\u0000\u0000\u0000lj\u0001\u0000\u0000"+
- "\u0000mn\u0005 \u0000\u0000n\u0003\u0001\u0000\u0000\u0000os\u0003\u0006"+
- "\u0003\u0000ps\u0003\b\u0004\u0000qs\u0003\n\u0005\u0000ro\u0001\u0000"+
- "\u0000\u0000rp\u0001\u0000\u0000\u0000rq\u0001\u0000\u0000\u0000s\u0005"+
- "\u0001\u0000\u0000\u0000tv\u0005\u0007\u0000\u0000ut\u0001\u0000\u0000"+
- "\u0000uv\u0001\u0000\u0000\u0000vw\u0001\u0000\u0000\u0000wx\u00050\u0000"+
- "\u0000xz\u0005\u001d\u0000\u0000y{\u0003\f\u0006\u0000zy\u0001\u0000\u0000"+
- "\u0000z{\u0001\u0000\u0000\u0000{|\u0001\u0000\u0000\u0000|}\u0005\u001e"+
- "\u0000\u0000}~\u0003\u0014\n\u0000~\u0007\u0001\u0000\u0000\u0000\u007f"+
- "\u0081\u0005\u0007\u0000\u0000\u0080\u007f\u0001\u0000\u0000\u0000\u0080"+
- "\u0081\u0001\u0000\u0000\u0000\u0081\u0082\u0001\u0000\u0000\u0000\u0082"+
- "\u0083\u0003V+\u0000\u0083\u0084\u00050\u0000\u0000\u0084\u0085\u0005"+
- "!\u0000\u0000\u0085\t\u0001\u0000\u0000\u0000\u0086\u0087\u0005\b\u0000"+
- "\u0000\u0087\u0097\u0003\u0014\n\u0000\u0088\u008a\u0005\u0007\u0000\u0000"+
- "\u0089\u0088\u0001\u0000\u0000\u0000\u0089\u008a\u0001\u0000\u0000\u0000"+
- "\u008a\u008d\u0001\u0000\u0000\u0000\u008b\u008e\u0003V+\u0000\u008c\u008e"+
- "\u0005\u0003\u0000\u0000\u008d\u008b\u0001\u0000\u0000\u0000\u008d\u008c"+
- "\u0001\u0000\u0000\u0000\u008e\u008f\u0001\u0000\u0000\u0000\u008f\u0090"+
- "\u00050\u0000\u0000\u0090\u0092\u0005\u001d\u0000\u0000\u0091\u0093\u0003"+
- "\f\u0006\u0000\u0092\u0091\u0001\u0000\u0000\u0000\u0092\u0093\u0001\u0000"+
- "\u0000\u0000\u0093\u0094\u0001\u0000\u0000\u0000\u0094\u0095\u0005\u001e"+
- "\u0000\u0000\u0095\u0097\u0003\u0014\n\u0000\u0096\u0086\u0001\u0000\u0000"+
- "\u0000\u0096\u0089\u0001\u0000\u0000\u0000\u0097\u000b\u0001\u0000\u0000"+
- "\u0000\u0098\u009d\u0003\u000e\u0007\u0000\u0099\u009a\u0005\"\u0000\u0000"+
- "\u009a\u009c\u0003\u000e\u0007\u0000\u009b\u0099\u0001\u0000\u0000\u0000"+
- "\u009c\u009f\u0001\u0000\u0000\u0000\u009d\u009b\u0001\u0000\u0000\u0000"+
- "\u009d\u009e\u0001\u0000\u0000\u0000\u009e\r\u0001\u0000\u0000\u0000\u009f"+
- "\u009d\u0001\u0000\u0000\u0000\u00a0\u00a1\u0003V+\u0000\u00a1\u00a2\u0005"+
- "0\u0000\u0000\u00a2\u000f\u0001\u0000\u0000\u0000\u00a3\u00a8\u0003.\u0017"+
- "\u0000\u00a4\u00a5\u0005\"\u0000\u0000\u00a5\u00a7\u0003.\u0017\u0000"+
- "\u00a6\u00a4\u0001\u0000\u0000\u0000\u00a7\u00aa\u0001\u0000\u0000\u0000"+
- "\u00a8\u00a6\u0001\u0000\u0000\u0000\u00a8\u00a9\u0001\u0000\u0000\u0000"+
- "\u00a9\u00ac\u0001\u0000\u0000\u0000\u00aa\u00a8\u0001\u0000\u0000\u0000"+
- "\u00ab\u00a3\u0001\u0000\u0000\u0000\u00ab\u00ac\u0001\u0000\u0000\u0000"+
- "\u00ac\u0011\u0001\u0000\u0000\u0000\u00ad\u00ae\u0003\u0016\u000b\u0000"+
- "\u00ae\u00af\u0005!\u0000\u0000\u00af\u00bc\u0001\u0000\u0000\u0000\u00b0"+
- "\u00b1\u0003\u0018\f\u0000\u00b1\u00b2\u0005!\u0000\u0000\u00b2\u00bc"+
- "\u0001\u0000\u0000\u0000\u00b3\u00bc\u0003\u0014\n\u0000\u00b4\u00bc\u0003"+
- "\u001a\r\u0000\u00b5\u00bc\u0003\u001c\u000e\u0000\u00b6\u00bc\u0003\u001e"+
- "\u000f\u0000\u00b7\u00bc\u0003 \u0010\u0000\u00b8\u00b9\u0003(\u0014\u0000"+
- "\u00b9\u00ba\u0005!\u0000\u0000\u00ba\u00bc\u0001\u0000\u0000\u0000\u00bb"+
- "\u00ad\u0001\u0000\u0000\u0000\u00bb\u00b0\u0001\u0000\u0000\u0000\u00bb"+
- "\u00b3\u0001\u0000\u0000\u0000\u00bb\u00b4\u0001\u0000\u0000\u0000\u00bb"+
- "\u00b5\u0001\u0000\u0000\u0000\u00bb\u00b6\u0001\u0000\u0000\u0000\u00bb"+
- "\u00b7\u0001\u0000\u0000\u0000\u00bb\u00b8\u0001\u0000\u0000\u0000\u00bc"+
- "\u0013\u0001\u0000\u0000\u0000\u00bd\u00c1\u0005\u001f\u0000\u0000\u00be"+
- "\u00c0\u0003\u0012\t\u0000\u00bf\u00be\u0001\u0000\u0000\u0000\u00c0\u00c3"+
- "\u0001\u0000\u0000\u0000\u00c1\u00bf\u0001\u0000\u0000\u0000\u00c1\u00c2"+
- "\u0001\u0000\u0000\u0000\u00c2\u00c4\u0001\u0000\u0000\u0000\u00c3\u00c1"+
- "\u0001\u0000\u0000\u0000\u00c4\u00c5\u0005 \u0000\u0000\u00c5\u0015\u0001"+
- "\u0000\u0000\u0000\u00c6\u00c8\u0005*\u0000\u0000\u00c7\u00c9\u0003.\u0017"+
- "\u0000\u00c8\u00c7\u0001\u0000\u0000\u0000\u00c8\u00c9\u0001\u0000\u0000"+
- "\u0000\u00c9\u0017\u0001\u0000\u0000\u0000\u00ca\u00cb\u0003V+\u0000\u00cb"+
- "\u00ce\u00050\u0000\u0000\u00cc\u00cd\u0005\r\u0000\u0000\u00cd\u00cf"+
- "\u0003.\u0017\u0000\u00ce\u00cc\u0001\u0000\u0000\u0000\u00ce\u00cf\u0001"+
- "\u0000\u0000\u0000\u00cf\u0019\u0001\u0000\u0000\u0000\u00d0\u00d1\u0005"+
- "%\u0000\u0000\u00d1\u00d2\u0005\u001d\u0000\u0000\u00d2\u00d3\u0003.\u0017"+
- "\u0000\u00d3\u00d4\u0005\u001e\u0000\u0000\u00d4\u00d5\u0003\u0014\n\u0000"+
- "\u00d5\u001b\u0001\u0000\u0000\u0000\u00d6\u00d7\u0005&\u0000\u0000\u00d7"+
- "\u00d8\u0003\u0014\n\u0000\u00d8\u00d9\u0005%\u0000\u0000\u00d9\u00da"+
- "\u0005\u001d\u0000\u0000\u00da\u00db\u0003.\u0017\u0000\u00db\u00dc\u0005"+
- "\u001e\u0000\u0000\u00dc\u00dd\u0005!\u0000\u0000\u00dd\u001d\u0001\u0000"+
- "\u0000\u0000\u00de\u00df\u0005)\u0000\u0000\u00df\u00e2\u0005\u001d\u0000"+
- "\u0000\u00e0\u00e3\u0003(\u0014\u0000\u00e1\u00e3\u0003\u0018\f\u0000"+
- "\u00e2\u00e0\u0001\u0000\u0000\u0000\u00e2\u00e1\u0001\u0000\u0000\u0000"+
- "\u00e3\u00e4\u0001\u0000\u0000\u0000\u00e4\u00e6\u0005!\u0000\u0000\u00e5"+
- "\u00e7\u0003.\u0017\u0000\u00e6\u00e5\u0001\u0000\u0000\u0000\u00e6\u00e7"+
- "\u0001\u0000\u0000\u0000\u00e7\u00e8\u0001\u0000\u0000\u0000\u00e8\u00ea"+
- "\u0005!\u0000\u0000\u00e9\u00eb\u0003(\u0014\u0000\u00ea\u00e9\u0001\u0000"+
- "\u0000\u0000\u00ea\u00eb\u0001\u0000\u0000\u0000\u00eb\u00ec\u0001\u0000"+
- "\u0000\u0000\u00ec\u00ed\u0005\u001e\u0000\u0000\u00ed\u00ee\u0003\u0014"+
- "\n\u0000\u00ee\u001f\u0001\u0000\u0000\u0000\u00ef\u00f3\u0003\"\u0011"+
- "\u0000\u00f0\u00f2\u0003$\u0012\u0000\u00f1\u00f0\u0001\u0000\u0000\u0000"+
- "\u00f2\u00f5\u0001\u0000\u0000\u0000\u00f3\u00f1\u0001\u0000\u0000\u0000"+
- "\u00f3\u00f4\u0001\u0000\u0000\u0000\u00f4\u00f7\u0001\u0000\u0000\u0000"+
- "\u00f5\u00f3\u0001\u0000\u0000\u0000\u00f6\u00f8\u0003&\u0013\u0000\u00f7"+
- "\u00f6\u0001\u0000\u0000\u0000\u00f7\u00f8\u0001\u0000\u0000\u0000\u00f8"+
- "!\u0001\u0000\u0000\u0000\u00f9\u00fa\u0005\'\u0000\u0000\u00fa\u00fb"+
- "\u0005\u001d\u0000\u0000\u00fb\u00fc\u0003.\u0017\u0000\u00fc\u00fd\u0005"+
- "\u001e\u0000\u0000\u00fd\u00fe\u0003\u0014\n\u0000\u00fe#\u0001\u0000"+
- "\u0000\u0000\u00ff\u0100\u0005(\u0000\u0000\u0100\u0101\u0005\'\u0000"+
- "\u0000\u0101\u0102\u0005\u001d\u0000\u0000\u0102\u0103\u0003.\u0017\u0000"+
- "\u0103\u0104\u0005\u001e\u0000\u0000\u0104\u0105\u0003\u0014\n\u0000\u0105"+
- "%\u0001\u0000\u0000\u0000\u0106\u0107\u0005(\u0000\u0000\u0107\u0108\u0003"+
- "\u0014\n\u0000\u0108\'\u0001\u0000\u0000\u0000\u0109\u010e\u0003*\u0015"+
- "\u0000\u010a\u010e\u0003,\u0016\u0000\u010b\u010e\u0003P(\u0000\u010c"+
- "\u010e\u00034\u001a\u0000\u010d\u0109\u0001\u0000\u0000\u0000\u010d\u010a"+
- "\u0001\u0000\u0000\u0000\u010d\u010b\u0001\u0000\u0000\u0000\u010d\u010c"+
- "\u0001\u0000\u0000\u0000\u010e)\u0001\u0000\u0000\u0000\u010f\u0110\u0003"+
- "B!\u0000\u0110\u0111\u0005\r\u0000\u0000\u0111\u0112\u0003.\u0017\u0000"+
- "\u0112+\u0001\u0000\u0000\u0000\u0113\u0114\u0005+\u0000\u0000\u0114\u0115"+
- "\u00050\u0000\u0000\u0115\u0116\u0005\u001d\u0000\u0000\u0116\u0117\u0003"+
- "\u0010\b\u0000\u0117\u0118\u0005\u001e\u0000\u0000\u0118-\u0001\u0000"+
- "\u0000\u0000\u0119\u011c\u00030\u0018\u0000\u011a\u011c\u0003F#\u0000"+
- "\u011b\u0119\u0001\u0000\u0000\u0000\u011b\u011a\u0001\u0000\u0000\u0000"+
- "\u011c/\u0001\u0000\u0000\u0000\u011d\u0128\u0005$\u0000\u0000\u011e\u0128"+
- "\u00050\u0000\u0000\u011f\u0128\u0003D\"\u0000\u0120\u0128\u0003X,\u0000"+
- "\u0121\u0128\u00032\u0019\u0000\u0122\u0128\u0003(\u0014\u0000\u0123\u0124"+
- "\u0005\u001d\u0000\u0000\u0124\u0125\u0003.\u0017\u0000\u0125\u0126\u0005"+
- "\u001e\u0000\u0000\u0126\u0128\u0001\u0000\u0000\u0000\u0127\u011d\u0001"+
- "\u0000\u0000\u0000\u0127\u011e\u0001\u0000\u0000\u0000\u0127\u011f\u0001"+
- "\u0000\u0000\u0000\u0127\u0120\u0001\u0000\u0000\u0000\u0127\u0121\u0001"+
- "\u0000\u0000\u0000\u0127\u0122\u0001\u0000\u0000\u0000\u0127\u0123\u0001"+
- "\u0000\u0000\u0000\u01281\u0001\u0000\u0000\u0000\u0129\u012a\u0005\u0019"+
- "\u0000\u0000\u012a\u012b\u0003.\u0017\u0000\u012b3\u0001\u0000\u0000\u0000"+
- "\u012c\u012f\u00036\u001b\u0000\u012d\u012f\u0003<\u001e\u0000\u012e\u012c"+
- "\u0001\u0000\u0000\u0000\u012e\u012d\u0001\u0000\u0000\u0000\u012f5\u0001"+
- "\u0000\u0000\u0000\u0130\u0133\u00038\u001c\u0000\u0131\u0133\u0003:\u001d"+
- "\u0000\u0132\u0130\u0001\u0000\u0000\u0000\u0132\u0131\u0001\u0000\u0000"+
- "\u0000\u01337\u0001\u0000\u0000\u0000\u0134\u0135\u0005\u0001\u0000\u0000"+
- "\u0135\u0136\u0003B!\u0000\u01369\u0001\u0000\u0000\u0000\u0137\u0138"+
- "\u0003B!\u0000\u0138\u0139\u0005\u0001\u0000\u0000\u0139;\u0001\u0000"+
- "\u0000\u0000\u013a\u013d\u0003>\u001f\u0000\u013b\u013d\u0003@ \u0000"+
- "\u013c\u013a\u0001\u0000\u0000\u0000\u013c\u013b\u0001\u0000\u0000\u0000"+
- "\u013d=\u0001\u0000\u0000\u0000\u013e\u013f\u0005\u0002\u0000\u0000\u013f"+
- "\u0140\u0003B!\u0000\u0140?\u0001\u0000\u0000\u0000\u0141\u0142\u0003"+
- "B!\u0000\u0142\u0143\u0005\u0002\u0000\u0000\u0143A\u0001\u0000\u0000"+
- "\u0000\u0144\u0147\u00050\u0000\u0000\u0145\u0147\u0003D\"\u0000\u0146"+
- "\u0144\u0001\u0000\u0000\u0000\u0146\u0145\u0001\u0000\u0000\u0000\u0147"+
- "C\u0001\u0000\u0000\u0000\u0148\u0149\u0005$\u0000\u0000\u0149\u014a\u0005"+
- "\u001c\u0000\u0000\u014a\u0157\u00050\u0000\u0000\u014b\u014c\u0005$\u0000"+
- "\u0000\u014c\u014e\u0005\u001c\u0000\u0000\u014d\u014b\u0001\u0000\u0000"+
- "\u0000\u014d\u014e\u0001\u0000\u0000\u0000\u014e\u0151\u0001\u0000\u0000"+
- "\u0000\u014f\u0150\u00050\u0000\u0000\u0150\u0152\u0005\u001c\u0000\u0000"+
- "\u0151\u014f\u0001\u0000\u0000\u0000\u0152\u0153\u0001\u0000\u0000\u0000"+
- "\u0153\u0151\u0001\u0000\u0000\u0000\u0153\u0154\u0001\u0000\u0000\u0000"+
- "\u0154\u0155\u0001\u0000\u0000\u0000\u0155\u0157\u00050\u0000\u0000\u0156"+
- "\u0148\u0001\u0000\u0000\u0000\u0156\u014d\u0001\u0000\u0000\u0000\u0157"+
- "E\u0001\u0000\u0000\u0000\u0158\u015b\u0003H$\u0000\u0159\u015b\u0003"+
- "N\'\u0000\u015a\u0158\u0001\u0000\u0000\u0000\u015a\u0159\u0001\u0000"+
- "\u0000\u0000\u015bG\u0001\u0000\u0000\u0000\u015c\u015d\u0006$\uffff\uffff"+
- "\u0000\u015d\u015e\u0003J%\u0000\u015e\u0164\u0001\u0000\u0000\u0000\u015f"+
- "\u0160\n\u0002\u0000\u0000\u0160\u0161\u0005\n\u0000\u0000\u0161\u0163"+
- "\u0003J%\u0000\u0162\u015f\u0001\u0000\u0000\u0000\u0163\u0166\u0001\u0000"+
- "\u0000\u0000\u0164\u0162\u0001\u0000\u0000\u0000\u0164\u0165\u0001\u0000"+
- "\u0000\u0000\u0165I\u0001\u0000\u0000\u0000\u0166\u0164\u0001\u0000\u0000"+
- "\u0000\u0167\u0168\u0006%\uffff\uffff\u0000\u0168\u0169\u0003L&\u0000"+
- "\u0169\u016f\u0001\u0000\u0000\u0000\u016a\u016b\n\u0002\u0000\u0000\u016b"+
- "\u016c\u0005\t\u0000\u0000\u016c\u016e\u0003L&\u0000\u016d\u016a\u0001"+
- "\u0000\u0000\u0000\u016e\u0171\u0001\u0000\u0000\u0000\u016f\u016d\u0001"+
- "\u0000\u0000\u0000\u016f\u0170\u0001\u0000\u0000\u0000\u0170K\u0001\u0000"+
- "\u0000\u0000\u0171\u016f\u0001\u0000\u0000\u0000\u0172\u017b\u0005-\u0000"+
- "\u0000\u0173\u017b\u00050\u0000\u0000\u0174\u017b\u0003D\"\u0000\u0175"+
- "\u0176\u0003P(\u0000\u0176\u0177\u0005\u001d\u0000\u0000\u0177\u0178\u0003"+
- "H$\u0000\u0178\u0179\u0005\u001e\u0000\u0000\u0179\u017b\u0001\u0000\u0000"+
- "\u0000\u017a\u0172\u0001\u0000\u0000\u0000\u017a\u0173\u0001\u0000\u0000"+
- "\u0000\u017a\u0174\u0001\u0000\u0000\u0000\u017a\u0175\u0001\u0000\u0000"+
- "\u0000\u017bM\u0001\u0000\u0000\u0000\u017c\u017d\u00030\u0018\u0000\u017d"+
- "\u017e\u0003Z-\u0000\u017e\u017f\u0003.\u0017\u0000\u017fO\u0001\u0000"+
- "\u0000\u0000\u0180\u0182\u0003R)\u0000\u0181\u0180\u0001\u0000\u0000\u0000"+
- "\u0181\u0182\u0001\u0000\u0000\u0000\u0182\u0186\u0001\u0000\u0000\u0000"+
- "\u0183\u0185\u0003T*\u0000\u0184\u0183\u0001\u0000\u0000\u0000\u0185\u0188"+
- "\u0001\u0000\u0000\u0000\u0186\u0184\u0001\u0000\u0000\u0000\u0186\u0187"+
- "\u0001\u0000\u0000\u0000\u0187\u0189\u0001\u0000\u0000\u0000\u0188\u0186"+
- "\u0001\u0000\u0000\u0000\u0189\u018a\u00050\u0000\u0000\u018a\u018b\u0005"+
- "\u001d\u0000\u0000\u018b\u018c\u0003\u0010\b\u0000\u018c\u018d\u0005\u001e"+
- "\u0000\u0000\u018dQ\u0001\u0000\u0000\u0000\u018e\u0193\u0005$\u0000\u0000"+
- "\u018f\u0193\u0003D\"\u0000\u0190\u0193\u0003,\u0016\u0000\u0191\u0193"+
- "\u00050\u0000\u0000\u0192\u018e\u0001\u0000\u0000\u0000\u0192\u018f\u0001"+
- "\u0000\u0000\u0000\u0192\u0190\u0001\u0000\u0000\u0000\u0192\u0191\u0001"+
- "\u0000\u0000\u0000\u0193\u0194\u0001\u0000\u0000\u0000\u0194\u0195\u0005"+
- "\u001c\u0000\u0000\u0195S\u0001\u0000\u0000\u0000\u0196\u0197\u00050\u0000"+
- "\u0000\u0197\u0198\u0005\u001d\u0000\u0000\u0198\u0199\u0003\u0010\b\u0000"+
- "\u0199\u019a\u0005\u001e\u0000\u0000\u019a\u019b\u0005\u001c\u0000\u0000"+
- "\u019bU\u0001\u0000\u0000\u0000\u019c\u019d\u0007\u0000\u0000\u0000\u019d"+
- "W\u0001\u0000\u0000\u0000\u019e\u019f\u0007\u0001\u0000\u0000\u019fY\u0001"+
- "\u0000\u0000\u0000\u01a0\u01a1\u0007\u0002\u0000\u0000\u01a1[\u0001\u0000"+
- "\u0000\u0000(_bjruz\u0080\u0089\u008d\u0092\u0096\u009d\u00a8\u00ab\u00bb"+
- "\u00c1\u00c8\u00ce\u00e2\u00e6\u00ea\u00f3\u00f7\u010d\u011b\u0127\u012e"+
- "\u0132\u013c\u0146\u014d\u0153\u0156\u015a\u0164\u016f\u017a\u0181\u0186"+
- "\u0192";
- public static final ATN _ATN =
- new ATNDeserializer().deserialize(_serializedATN.toCharArray());
- static {
- _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()];
- for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) {
- _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i);
- }
- }
-}
\ No newline at end of file
diff --git a/src/main/java/parser/generated/SimpleJavaVisitor.java b/src/main/java/parser/generated/SimpleJavaVisitor.java
deleted file mode 100644
index beefef9..0000000
--- a/src/main/java/parser/generated/SimpleJavaVisitor.java
+++ /dev/null
@@ -1,289 +0,0 @@
-// Generated from C:/Users/janni/Desktop/NichtHaskell2.0/src/main/java/parser/grammar/SimpleJava.g4 by ANTLR 4.13.1
-package parser.generated;
-import org.antlr.v4.runtime.tree.ParseTreeVisitor;
-
-/**
- * This interface defines a complete generic visitor for a parse tree produced
- * by {@link SimpleJavaParser}.
- *
- * @param The return type of the visit operation. Use {@link Void} for
- * operations with no return type.
- */
-public interface SimpleJavaVisitor extends ParseTreeVisitor {
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#program}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitProgram(SimpleJavaParser.ProgramContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#classDeclaration}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitClassDeclaration(SimpleJavaParser.ClassDeclarationContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#memberDeclaration}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitMemberDeclaration(SimpleJavaParser.MemberDeclarationContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#constructorDeclaration}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitConstructorDeclaration(SimpleJavaParser.ConstructorDeclarationContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#fieldDeclaration}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitFieldDeclaration(SimpleJavaParser.FieldDeclarationContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#methodDeclaration}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitMethodDeclaration(SimpleJavaParser.MethodDeclarationContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#parameterList}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitParameterList(SimpleJavaParser.ParameterListContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#parameter}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitParameter(SimpleJavaParser.ParameterContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#argumentList}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitArgumentList(SimpleJavaParser.ArgumentListContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#statement}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitStatement(SimpleJavaParser.StatementContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#blockStatement}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitBlockStatement(SimpleJavaParser.BlockStatementContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#returnStatement}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitReturnStatement(SimpleJavaParser.ReturnStatementContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#localVariableDeclaration}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitLocalVariableDeclaration(SimpleJavaParser.LocalVariableDeclarationContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#whileStatement}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitWhileStatement(SimpleJavaParser.WhileStatementContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#doWhileStatement}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitDoWhileStatement(SimpleJavaParser.DoWhileStatementContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#forStatement}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitForStatement(SimpleJavaParser.ForStatementContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#ifElseStatement}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitIfElseStatement(SimpleJavaParser.IfElseStatementContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#ifStatement}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitIfStatement(SimpleJavaParser.IfStatementContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#elseIfStatement}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitElseIfStatement(SimpleJavaParser.ElseIfStatementContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#elseStatement}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitElseStatement(SimpleJavaParser.ElseStatementContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#statementExpression}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitStatementExpression(SimpleJavaParser.StatementExpressionContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#assign}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitAssign(SimpleJavaParser.AssignContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#newDeclaration}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitNewDeclaration(SimpleJavaParser.NewDeclarationContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#expression}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitExpression(SimpleJavaParser.ExpressionContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#unaryExpression}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitUnaryExpression(SimpleJavaParser.UnaryExpressionContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#notExpression}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitNotExpression(SimpleJavaParser.NotExpressionContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#crementExpression}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitCrementExpression(SimpleJavaParser.CrementExpressionContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#incrementExpression}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitIncrementExpression(SimpleJavaParser.IncrementExpressionContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#prefixIncrementExpression}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitPrefixIncrementExpression(SimpleJavaParser.PrefixIncrementExpressionContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#suffixIncrementExpression}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitSuffixIncrementExpression(SimpleJavaParser.SuffixIncrementExpressionContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#decrementExpression}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitDecrementExpression(SimpleJavaParser.DecrementExpressionContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#prefixDecrementExpression}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitPrefixDecrementExpression(SimpleJavaParser.PrefixDecrementExpressionContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#suffixDecrementExpression}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitSuffixDecrementExpression(SimpleJavaParser.SuffixDecrementExpressionContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#assignableExpression}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitAssignableExpression(SimpleJavaParser.AssignableExpressionContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#memberAccess}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitMemberAccess(SimpleJavaParser.MemberAccessContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#binaryExpression}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitBinaryExpression(SimpleJavaParser.BinaryExpressionContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#calculationExpression}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitCalculationExpression(SimpleJavaParser.CalculationExpressionContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#dotExpression}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitDotExpression(SimpleJavaParser.DotExpressionContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#dotSubtractionExpression}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitDotSubtractionExpression(SimpleJavaParser.DotSubtractionExpressionContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#nonCalculationExpression}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitNonCalculationExpression(SimpleJavaParser.NonCalculationExpressionContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#methodCall}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitMethodCall(SimpleJavaParser.MethodCallContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#target}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitTarget(SimpleJavaParser.TargetContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#chainedMethod}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitChainedMethod(SimpleJavaParser.ChainedMethodContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#type}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitType(SimpleJavaParser.TypeContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#value}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitValue(SimpleJavaParser.ValueContext ctx);
- /**
- * Visit a parse tree produced by {@link SimpleJavaParser#nonCalculationOperator}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitNonCalculationOperator(SimpleJavaParser.NonCalculationOperatorContext ctx);
-}
\ No newline at end of file
diff --git a/src/main/java/parser/grammar/SimpleJava.g4 b/src/main/java/parser/grammar/SimpleJava.g4
index 51b7bc1..91b8920 100644
--- a/src/main/java/parser/grammar/SimpleJava.g4
+++ b/src/main/java/parser/grammar/SimpleJava.g4
@@ -7,7 +7,7 @@ classDeclaration: AccessModifier? 'class' Identifier OpenCurlyBracket memberDecl
memberDeclaration: constructorDeclaration | fieldDeclaration | methodDeclaration;
constructorDeclaration: AccessModifier? Identifier OpenRoundBracket parameterList? ClosedRoundBracket blockStatement;
-fieldDeclaration: AccessModifier? type Identifier Semicolon;
+fieldDeclaration: AccessModifier? type Identifier (Assign expression)? Semicolon;
methodDeclaration: MainMethodDeclaration blockStatement | AccessModifier? (type | Void) Identifier OpenRoundBracket parameterList? ClosedRoundBracket blockStatement;
parameterList: parameter (Comma parameter)*;
@@ -22,6 +22,7 @@ statement: returnStatement Semicolon
| doWhileStatement
| forStatement
| ifElseStatement
+ | switchStatement
| statementExpression Semicolon;
blockStatement: OpenCurlyBracket statement* ClosedCurlyBracket;
@@ -38,6 +39,10 @@ ifStatement: If OpenRoundBracket expression ClosedRoundBracket blockStatement;
elseIfStatement: Else If OpenRoundBracket expression ClosedRoundBracket blockStatement;
elseStatement: Else blockStatement;
+switchStatement: Switch OpenRoundBracket expression ClosedRoundBracket OpenCurlyBracket caseStatement+ defaultStatement? ClosedCurlyBracket;
+caseStatement: Case value Colon statement*;
+defaultStatement: Default Colon statement*;
+
statementExpression: assign | newDeclaration | methodCall | crementExpression;
assign: assignableExpression Assign expression;
newDeclaration: New Identifier OpenRoundBracket argumentList ClosedRoundBracket;
@@ -153,6 +158,10 @@ Else: 'else';
For: 'for';
Return: 'return';
New: 'new';
+Switch: 'switch';
+Case: 'case';
+Default: 'default';
+Colon: ':';
// Werte
CharValue: '\'' ~[\r\n]* '\'';
diff --git a/src/test/java/parser/AstBuilderTest.java b/src/test/java/parser/AstBuilderTest.java
index 2810e55..808d0e0 100644
--- a/src/test/java/parser/AstBuilderTest.java
+++ b/src/test/java/parser/AstBuilderTest.java
@@ -1,42 +1,34 @@
package parser;
-
import ast.ASTNode;
import ast.ClassNode;
import ast.ProgramNode;
import ast.expressions.IExpressionNode;
+import ast.expressions.binaryexpressions.CalculationNode;
+import ast.expressions.binaryexpressions.DotNode;
+import ast.expressions.binaryexpressions.DotSubstractionNode;
+import ast.expressions.binaryexpressions.NonCalculationNode;
import ast.expressions.unaryexpressions.MemberAccessNode;
import ast.expressions.unaryexpressions.UnaryNode;
-import ast.members.ConstructorNode;
-import ast.members.FieldNode;
-import ast.members.MemberNode;
-import ast.members.MethodNode;
+import ast.members.*;
import ast.parameters.ParameterNode;
import ast.statementexpressions.AssignNode;
import ast.statementexpressions.AssignableNode;
+import ast.statementexpressions.NewDeclarationNode;
+import ast.statementexpressions.crementexpressions.CrementType;
+import ast.statementexpressions.crementexpressions.DecrementNode;
+import ast.statementexpressions.crementexpressions.IncrementNode;
import ast.statementexpressions.methodcallstatementnexpressions.MethodCallNode;
-import ast.statements.BlockNode;
-import ast.statements.IStatementNode;
-import ast.statements.ReturnNode;
+import ast.statementexpressions.methodcallstatementnexpressions.TargetNode;
+import ast.statements.*;
import ast.type.AccessModifierNode;
import ast.type.EnumValueNode;
import ast.type.ValueNode;
import ast.type.type.BaseType;
-import ast.type.type.ITypeNode;
+import ast.type.type.ReferenceType;
import ast.type.type.TypeEnum;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import org.antlr.v4.runtime.CharStream;
-import org.antlr.v4.runtime.CharStreams;
-import org.antlr.v4.runtime.CommonTokenStream;
-import org.antlr.v4.runtime.tree.ParseTree;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
-import parser.astBuilder.ASTBuilder;
-import parser.generated.SimpleJavaLexer;
-import parser.generated.SimpleJavaParser;
-
-import java.io.IOException;
-import java.lang.reflect.Member;
import static org.assertj.core.api.Assertions.assertThat;
@@ -330,7 +322,7 @@ class AstBuilderTest {
ConstructorNode constructor = new ConstructorNode("public", "Null", blockCon);
ClassNode class1 = new ClassNode("public", "Null");
- class1.addMember(new FieldNode(new AccessModifierNode("public"), new BaseType(TypeEnum.INT), "a"));
+ class1.addMember(new FieldNode(new AccessModifierNode("public"), new ReferenceType("Null"), "a"));
class1.addMember(constructor);
ProgramNode expected = new ProgramNode();
@@ -343,66 +335,272 @@ class AstBuilderTest {
@Test
@DisplayName("Self Reference Test")
- public void selfReferneceTest() {
+ public void selfReferneceTest(){
- //assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
+ ClassNode testClass = Helper.generateEmptyClass("SelfReference");
+
+ MemberNode testClassObject = new FieldNode(new AccessModifierNode("public"), new ReferenceType("SelfReference"),"selfReference");
+
+ BlockNode testMethod1Block = new BlockNode();
+ testMethod1Block.addStatement(new ReturnNode(new UnaryNode(new MethodCallNode(new TargetNode(true), "testMethod2"))));
+ MethodNode testMethod1 = new MethodNode("public", new BaseType(TypeEnum.INT), false, "testMethod1", testMethod1Block);
+
+ BlockNode testMethod2Block = new BlockNode();
+ testMethod2Block.addStatement(new ReturnNode(new UnaryNode(new ValueNode(EnumValueNode.INT_VALUE,"1"))));
+ MethodNode testMethod2 = new MethodNode("public", new BaseType(TypeEnum.INT), false, "testMethod2", testMethod2Block);
+
+ BlockNode testMethod3Block = new BlockNode();
+ testMethod3Block.addStatement(new LocalVariableDeclarationNode(new ReferenceType("SelfReference"),"selfReference1", "=", new UnaryNode(new NewDeclarationNode("SelfReference")))); // Assing einfach "=" ?
+ MemberAccessNode methodAccess = new MemberAccessNode(false);
+ methodAccess.addIdentifier("selfReference1");
+ methodAccess.addIdentifier("selfReference");
+ TargetNode methodTarget = new TargetNode(methodAccess);
+ testMethod3Block.addStatement(new ReturnNode(new UnaryNode(new MethodCallNode(methodTarget,"testMethod1"))));
+ MethodNode testMethod3 = new MethodNode("public", new BaseType(TypeEnum.INT), false, "testMethod3", testMethod3Block);
+
+ testClass.addMember(testClassObject);
+ testClass.addMember(testMethod1);
+ testClass.addMember(testMethod2);
+ testClass.addMember(testMethod3);
+
+ ProgramNode expected = new ProgramNode();
+ expected.addClass(testClass);
+
+ ASTNode actual = Helper.generateAST(directoryPath + "SelfReference.java");
+
+ assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
}
@Test
@DisplayName("Variable Compare Test")
- public void variableCompareTest() {
+ public void variableCompareTest(){
+ ClassNode class1 = Helper.generateEmptyClass("VariableCompare");
+ UnaryNode trueValue = new UnaryNode(new ValueNode(EnumValueNode.BOOLEAN_VALUE,"true"));
+ UnaryNode falseValue = new UnaryNode(new ValueNode(EnumValueNode.BOOLEAN_VALUE,"false"));
- //assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
+ BlockNode trueBlock = new BlockNode();
+ trueBlock.addStatement(new ReturnNode(trueValue));
+ MethodNode trueMethod = new MethodNode("public", new BaseType(TypeEnum.BOOL), false, "trueMethod", trueBlock);
+
+ BlockNode falseBlock = new BlockNode();
+ falseBlock.addStatement(new ReturnNode(falseValue));
+ MethodNode falseMethod = new MethodNode("public", new BaseType(TypeEnum.BOOL), false, "falseMethod", falseBlock);
+
+ BlockNode trueAndTrueBlock = new BlockNode();
+ trueAndTrueBlock.addStatement(new ReturnNode(new NonCalculationNode(trueValue, "&&", trueValue)));
+ MethodNode trueAndTrueMethod = new MethodNode("public", new BaseType(TypeEnum.BOOL), false, "trueAndTrueMethod", trueAndTrueBlock);
+
+ BlockNode trueAndFalseBlock = new BlockNode();
+ trueAndFalseBlock.addStatement(new ReturnNode(new NonCalculationNode(trueValue, "&&", falseValue)));
+ MethodNode trueAndFalseMethod = new MethodNode("public", new BaseType(TypeEnum.BOOL), false, "trueAndFalseMethod", trueAndFalseBlock);
+
+ BlockNode falseAndFalseBlock = new BlockNode();
+ falseAndFalseBlock.addStatement(new ReturnNode(new NonCalculationNode(falseValue, "&&", falseValue)));
+ MethodNode falseAndFalseMethod = new MethodNode("public", new BaseType(TypeEnum.BOOL), false, "falseAndFalseMethod", falseAndFalseBlock);
+
+ BlockNode trueOrTrueBlock = new BlockNode();
+ trueOrTrueBlock.addStatement(new ReturnNode(new NonCalculationNode(trueValue, "||", trueValue)));
+ MethodNode trueOrFalseMethod = new MethodNode("public", new BaseType(TypeEnum.BOOL), false, "trueOrTrueMethod", trueOrTrueBlock);
+
+ BlockNode falseOrFalseBlock = new BlockNode();
+ falseOrFalseBlock.addStatement(new ReturnNode(new NonCalculationNode(falseValue, "||", falseValue)));
+ MethodNode falseOrFalseMethod = new MethodNode("public", new BaseType(TypeEnum.BOOL), false, "falseOrFalseMethod", falseOrFalseBlock);
+
+ class1.addMember(trueMethod);
+ class1.addMember(falseMethod);
+ class1.addMember(trueAndTrueMethod);
+ class1.addMember(trueAndFalseMethod);
+ class1.addMember(falseAndFalseMethod);
+ class1.addMember(trueOrFalseMethod);
+ class1.addMember(falseOrFalseMethod);
+
+ ProgramNode expected = new ProgramNode();
+ expected.addClass(class1);
+
+ ASTNode actual = Helper.generateAST(directoryPath + "VariableCompare.java");
+
+ assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
}
@Test
@DisplayName("Variable Calculation Test")
- public void variableCalculationTest() {
+ public void variableCalculationTest(){
+ ClassNode class1 = Helper.generateEmptyClass("VariableCalculation");
- //assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
+ BlockNode aPlusBBlock = new BlockNode();
+ aPlusBBlock.addStatement(new ReturnNode(new CalculationNode(new CalculationNode(new DotNode(new DotSubstractionNode("a"))), "+", new DotNode(new DotSubstractionNode("b")))));
+ MethodNode aPlusBMethod = new MethodNode("public", new BaseType(TypeEnum.INT), false, "aPlusB", aPlusBBlock);
+ aPlusBMethod.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "a"));
+ aPlusBMethod.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "b"));
+
+ BlockNode aMinusBBlock = new BlockNode();
+ aMinusBBlock.addStatement(new ReturnNode(new CalculationNode(new CalculationNode(new DotNode(new DotSubstractionNode("a"))), "-", new DotNode(new DotSubstractionNode("b")))));
+ MethodNode aMinusBMethod = new MethodNode("public", new BaseType(TypeEnum.INT), false, "aMinusB", aMinusBBlock);
+ aMinusBMethod.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "a"));
+ aMinusBMethod.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "b"));
+
+ BlockNode aTimeBBlock = new BlockNode();
+ aTimeBBlock.addStatement(new ReturnNode(new CalculationNode(new DotNode(new DotNode(new DotSubstractionNode("a")), "*", new DotSubstractionNode("b")))));
+ MethodNode aTimeBMethod = new MethodNode("public", new BaseType(TypeEnum.INT), false, "aTimeB", aTimeBBlock);
+ aTimeBMethod.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "a"));
+ aTimeBMethod.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "b"));
+
+ BlockNode aDivBBlock = new BlockNode();
+ aDivBBlock.addStatement(new ReturnNode(new CalculationNode(new DotNode(new DotNode(new DotSubstractionNode("a")), "/", new DotSubstractionNode("b")))));
+ MethodNode aDivBMethod = new MethodNode("public", new BaseType(TypeEnum.INT), false, "aDivB", aDivBBlock);
+ aDivBMethod.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "a"));
+ aDivBMethod.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "b"));
+
+ BlockNode complexCalcBlock = new BlockNode();
+ complexCalcBlock.addStatement(new ReturnNode(new CalculationNode(null, null, new DotNode(new DotNode(new DotNode(new DotNode(new DotSubstractionNode("a")), "*", new DotSubstractionNode("b")), "/", new DotSubstractionNode(new ValueNode(EnumValueNode.INT_VALUE, "1"))), "*", new DotSubstractionNode(new ValueNode(EnumValueNode.INT_VALUE, "3"))))));
+ MethodNode complexCalcMethod = new MethodNode("public", new BaseType(TypeEnum.INT), false, "complexCalc", complexCalcBlock);
+ complexCalcMethod.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "a"));
+ complexCalcMethod.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "b"));
+
+ BlockNode aSmallerBBlock = new BlockNode();
+ aSmallerBBlock.addStatement(new ReturnNode(new NonCalculationNode(new UnaryNode("a"), "<", new UnaryNode("b"))));
+ MethodNode aSmallerBMethod = new MethodNode("public", new BaseType(TypeEnum.BOOL), false, "aSmallerB", aSmallerBBlock);
+ aSmallerBMethod.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "a"));
+ aSmallerBMethod.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "b"));
+
+ BlockNode aGreaterBBlock = new BlockNode();
+ aGreaterBBlock.addStatement(new ReturnNode(new NonCalculationNode(new UnaryNode("a"), ">", new UnaryNode("b"))));
+ MethodNode aGreaterBMethod = new MethodNode("public", new BaseType(TypeEnum.BOOL), false, "aGreaterB", aGreaterBBlock);
+ aGreaterBMethod.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "a"));
+ aGreaterBMethod.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "b"));
+
+ BlockNode aEqualsBBlock = new BlockNode();
+ aEqualsBBlock.addStatement(new ReturnNode(new NonCalculationNode(new UnaryNode("a"), "==", new UnaryNode("b"))));
+ MethodNode aEqualsBMethod = new MethodNode("public", new BaseType(TypeEnum.BOOL), false, "aEqualsB", aEqualsBBlock);
+ aEqualsBMethod.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "a"));
+ aEqualsBMethod.addParameter(new ParameterNode(new BaseType(TypeEnum.INT), "b"));
+
+ class1.addMember(aPlusBMethod);
+ class1.addMember(aMinusBMethod);
+ class1.addMember(aTimeBMethod);
+ class1.addMember(aDivBMethod);
+ class1.addMember(complexCalcMethod);
+ class1.addMember(aSmallerBMethod);
+ class1.addMember(aGreaterBMethod);
+ class1.addMember(aEqualsBMethod);
+
+ ProgramNode expected = new ProgramNode();
+ expected.addClass(class1);
+
+ ASTNode actual = Helper.generateAST(directoryPath + "VariableCalculation.java");
+
+ assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
}
@Test
@DisplayName("Main Method Test")
- public void mainMethodTest() {
+ public void mainMethodTest(){
+ ClassNode class1 = Helper.generateEmptyClass("MainMethod");
- //assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
+ BlockNode block = new BlockNode();
+ block.addStatement(new ReturnNode(null));
+
+ class1.addMember(new MainMethodNode(block));
+
+ ProgramNode expected = new ProgramNode();
+ expected.addClass(class1);
+
+ ASTNode actual = Helper.generateAST(directoryPath + "MainMethod.java");
+
+ assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
}
@Test
@DisplayName("While Test")
- public void whileTest() {
+ public void whileTest(){
+ NonCalculationNode condition = new NonCalculationNode(new UnaryNode("i"), ">", new UnaryNode(new ValueNode(EnumValueNode.INT_VALUE, "0")));
- //assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
+ BlockNode whileBlock = new BlockNode();
+ whileBlock.addStatement(new DecrementNode(CrementType.SUFFIX, new AssignableNode("i")));
+
+ WhileNode whileStatement = new WhileNode(condition, whileBlock);
+
+ BlockNode blockCon = new BlockNode();
+ blockCon.addStatement(new LocalVariableDeclarationNode(new BaseType(TypeEnum.INT), "i", "=", new UnaryNode(new ValueNode(EnumValueNode.INT_VALUE, "10"))));
+ blockCon.addStatement(whileStatement);
+ blockCon.addStatement(new ReturnNode(null));
+ ConstructorNode constructor = new ConstructorNode("public", "TestClass", blockCon);
+
+ ClassNode class1 = new ClassNode("public", "While");
+ class1.addMember(constructor);
+
+ ProgramNode expected = new ProgramNode();
+ expected.addClass(class1);
+
+ ASTNode actual = Helper.generateAST(directoryPath + "While.java");
+
+ assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
}
@Test
@DisplayName("Do While Test")
- public void doWhileTest() {
+ public void doWhileTest(){
+ NonCalculationNode condition = new NonCalculationNode(new UnaryNode("i"), "<", new UnaryNode(new ValueNode(EnumValueNode.INT_VALUE, "10")));
- //assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
+ BlockNode whileBlock = new BlockNode();
+ whileBlock.addStatement(new IncrementNode(CrementType.SUFFIX, new AssignableNode("i")));
+
+ WhileNode whileStatement = new WhileNode(condition, whileBlock);
+
+ BlockNode blockDoWhile = new BlockNode();
+ blockDoWhile.addStatement(whileBlock);
+ blockDoWhile.addStatement(whileStatement);
+
+ BlockNode blockCon = new BlockNode();
+ blockCon.addStatement(new LocalVariableDeclarationNode(new BaseType(TypeEnum.INT), "i", "=", new UnaryNode(new ValueNode(EnumValueNode.INT_VALUE, "0"))));
+ blockCon.addStatement(blockDoWhile);
+ blockCon.addStatement(new ReturnNode(null));
+ ConstructorNode constructor = new ConstructorNode("public", "TestClass", blockCon);
+
+ ClassNode class1 = new ClassNode("public", "DoWhile");
+ class1.addMember(constructor);
+
+ ProgramNode expected = new ProgramNode();
+ expected.addClass(class1);
+
+ ASTNode actual = Helper.generateAST(directoryPath + "DoWhile.java");
+
+ assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
}
@Test
@DisplayName("For Test")
- public void forTest() {
+ public void forTest(){
+ LocalVariableDeclarationNode forDeclaration = new LocalVariableDeclarationNode(new BaseType(TypeEnum.INT), "i", "=", new UnaryNode(new ValueNode(EnumValueNode.INT_VALUE, "0")));
- //assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
- }
+ AssignableNode assignable = new AssignableNode("i");
+ IncrementNode increment = new IncrementNode(CrementType.SUFFIX, assignable);
- //Noch nicht speziell Increment nur zum Development Testen per Debug
- @Test
- @DisplayName("Increment Test")
- public void incrementTest() {
- ClassNode classNode = Helper.generateEmptyClass("Increment");
- classNode.addMember(new FieldNode(new AccessModifierNode("public"), new BaseType(TypeEnum.INT), "a"));
+ LocalVariableDeclarationNode declaration = new LocalVariableDeclarationNode(new BaseType(TypeEnum.INT), "a", null, null);
+
+ BlockNode whileBlock = new BlockNode();
+ whileBlock.addStatement(declaration);
+ whileBlock.addStatement(increment);
+
+ WhileNode whileStatement = new WhileNode(new NonCalculationNode(new UnaryNode("i"), "<", new UnaryNode(new ValueNode(EnumValueNode.INT_VALUE, "10"))), whileBlock);
+
+ BlockNode forStatement = new BlockNode();
+ forStatement.addStatement(forDeclaration);
+ forStatement.addStatement(whileStatement);
+
+ BlockNode blockCon = new BlockNode();
+ blockCon.addStatement(forStatement);
+ blockCon.addStatement(new ReturnNode(null));
+ ConstructorNode constructor = new ConstructorNode("public", "TestClass", blockCon);
+
+ ClassNode class1 = new ClassNode("public", "For");
+ class1.addMember(constructor);
ProgramNode expected = new ProgramNode();
- expected.addClass(classNode);
+ expected.addClass(class1);
+
+ ASTNode actual = Helper.generateAST(directoryPath + "For.java");
- ASTNode actual = Helper.generateAST(directoryPath + "Increment.java");
assertThat(actual).isEqualToComparingFieldByFieldRecursively(expected);
}
-
-
}
\ No newline at end of file
diff --git a/src/test/resources/input/singleFeatureTests/MainMehod.java b/src/test/resources/input/singleFeatureTests/MainMethod.java
similarity index 100%
rename from src/test/resources/input/singleFeatureTests/MainMehod.java
rename to src/test/resources/input/singleFeatureTests/MainMethod.java
diff --git a/src/test/resources/input/singleFeatureTests/Null.java b/src/test/resources/input/singleFeatureTests/Null.java
index bb0b8c3..1c843fa 100644
--- a/src/test/resources/input/singleFeatureTests/Null.java
+++ b/src/test/resources/input/singleFeatureTests/Null.java
@@ -1,8 +1,8 @@
class Null{
- int a;
+ Null a;
public Null(){
- // this.a = null;
+ this.a = null;
}
}
\ No newline at end of file
diff --git a/src/test/resources/input/singleFeatureTests/SelfReference.java b/src/test/resources/input/singleFeatureTests/SelfReference.java
index 24e1fd5..93bed9e 100644
--- a/src/test/resources/input/singleFeatureTests/SelfReference.java
+++ b/src/test/resources/input/singleFeatureTests/SelfReference.java
@@ -10,7 +10,7 @@ class SelfReference{
return 1;
}
- int testMehtod3(){
+ int testMethod3(){
SelfReference selfReference1 = new SelfReference();
return selfReference1.selfReference.testMethod1();
}
diff --git a/src/test/resources/input/singleFeatureTests/VariableCalculationTest.java b/src/test/resources/input/singleFeatureTests/VariableCalculation.java
similarity index 82%
rename from src/test/resources/input/singleFeatureTests/VariableCalculationTest.java
rename to src/test/resources/input/singleFeatureTests/VariableCalculation.java
index 11dfac5..847b1a6 100644
--- a/src/test/resources/input/singleFeatureTests/VariableCalculationTest.java
+++ b/src/test/resources/input/singleFeatureTests/VariableCalculation.java
@@ -1,4 +1,4 @@
-class VariableCalculationTest{
+class VariableCalculation{
int aPlusB(int a, int b){
return a + b;
@@ -16,8 +16,8 @@ class VariableCalculationTest{
return a / b;
}
- int colmplexCalc (int a, int b){
- return a * (b / 1);
+ int complexCalc (int a, int b){
+ return a * b / 1 * 3;
}
boolean aSmallerB (int a, int b){
diff --git a/src/test/resources/input/singleFeatureTests/VariableCompare.java b/src/test/resources/input/singleFeatureTests/VariableCompare.java
new file mode 100644
index 0000000..70f2a39
--- /dev/null
+++ b/src/test/resources/input/singleFeatureTests/VariableCompare.java
@@ -0,0 +1,30 @@
+class VariableCompare{
+
+ boolean trueMethod() {
+ return true;
+ }
+
+ boolean falseMethod(){
+ return false;
+ }
+
+ boolean trueAndTrueMethod(){
+ return true && true;
+ }
+
+ boolean trueAndFalseMethod(){
+ return true && false;
+ }
+
+ boolean falseAndFalseMethod(){
+ return false && false;
+ }
+
+ boolean trueOrTrueMethod(){
+ return true || true;
+ }
+
+ boolean falseOrFalseMethod(){
+ return false || false;
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/input/singleFeatureTests/VariableCompareTest.java b/src/test/resources/input/singleFeatureTests/VariableCompareTest.java
deleted file mode 100644
index 070ebf9..0000000
--- a/src/test/resources/input/singleFeatureTests/VariableCompareTest.java
+++ /dev/null
@@ -1,30 +0,0 @@
-class VariableCompareTest{
-
- boolean trueMethod(){
- return true;
- }
-
- boolean falseMethod(){
- return false;
- }
-
- boolean trueAndTrue(){
- return trueMethod() && trueMethod();
- }
-
- boolean trueAndFalse(){
- return trueMethod() && falseMethod();
- }
-
- boolean falseAndFalse(){
- return falseMethod() && falseMethod();
- }
-
- boolean trueOrFalse(){
- return trueMethod() || falseMethod();
- }
-
- boolean falseOrFalse(){
- return falseMethod() || falseMethod();
- }
-}
\ No newline at end of file
--
2.34.1
From c5aea859651998987d4e2378df6a9e0a05018130 Mon Sep 17 00:00:00 2001
From: i22035
Date: Wed, 3 Jul 2024 18:49:15 +0200
Subject: [PATCH 35/96] New Generated
---
.../java/parser/generated/SimpleJava.interp | 170 +
.../java/parser/generated/SimpleJava.tokens | 98 +
.../generated/SimpleJavaBaseListener.java | 628 +++
.../generated/SimpleJavaBaseVisitor.java | 358 ++
.../parser/generated/SimpleJavaLexer.interp | 185 +
.../parser/generated/SimpleJavaLexer.java | 417 ++
.../parser/generated/SimpleJavaLexer.tokens | 98 +
.../parser/generated/SimpleJavaListener.java | 500 +++
.../parser/generated/SimpleJavaParser.java | 3918 +++++++++++++++++
.../parser/generated/SimpleJavaVisitor.java | 307 ++
10 files changed, 6679 insertions(+)
create mode 100644 src/main/java/parser/generated/SimpleJava.interp
create mode 100644 src/main/java/parser/generated/SimpleJava.tokens
create mode 100644 src/main/java/parser/generated/SimpleJavaBaseListener.java
create mode 100644 src/main/java/parser/generated/SimpleJavaBaseVisitor.java
create mode 100644 src/main/java/parser/generated/SimpleJavaLexer.interp
create mode 100644 src/main/java/parser/generated/SimpleJavaLexer.java
create mode 100644 src/main/java/parser/generated/SimpleJavaLexer.tokens
create mode 100644 src/main/java/parser/generated/SimpleJavaListener.java
create mode 100644 src/main/java/parser/generated/SimpleJavaParser.java
create mode 100644 src/main/java/parser/generated/SimpleJavaVisitor.java
diff --git a/src/main/java/parser/generated/SimpleJava.interp b/src/main/java/parser/generated/SimpleJava.interp
new file mode 100644
index 0000000..047b13e
--- /dev/null
+++ b/src/main/java/parser/generated/SimpleJava.interp
@@ -0,0 +1,170 @@
+token literal names:
+null
+'++'
+'--'
+'void'
+'boolean'
+'char'
+'int'
+null
+'public static void main(String[] args)'
+null
+null
+null
+null
+'='
+'+'
+'-'
+'*'
+'%'
+'/'
+'>'
+'<'
+'>='
+'<='
+'=='
+'!='
+'!'
+'&&'
+'||'
+'.'
+'('
+')'
+'{'
+'}'
+';'
+','
+'class'
+'this'
+'while'
+'do'
+'if'
+'else'
+'for'
+'return'
+'new'
+'switch'
+'case'
+'default'
+':'
+null
+null
+null
+'null'
+null
+null
+null
+null
+
+token symbolic names:
+null
+null
+null
+Void
+Boolean
+Char
+Int
+AccessModifier
+MainMethodDeclaration
+DotOperator
+LineOperator
+ComparisonOperator
+LogicalOperator
+Assign
+Plus
+Minus
+Mult
+Modulo
+Div
+Greater
+Less
+GreaterEqual
+LessEqual
+Equal
+NotEqual
+Not
+And
+Or
+Dot
+OpenRoundBracket
+ClosedRoundBracket
+OpenCurlyBracket
+ClosedCurlyBracket
+Semicolon
+Comma
+Class
+This
+While
+Do
+If
+Else
+For
+Return
+New
+Switch
+Case
+Default
+Colon
+CharValue
+IntValue
+BooleanValue
+NullValue
+Identifier
+WS
+InlineComment
+MultilineComment
+
+rule names:
+program
+classDeclaration
+memberDeclaration
+constructorDeclaration
+fieldDeclaration
+methodDeclaration
+parameterList
+parameter
+argumentList
+statement
+blockStatement
+returnStatement
+localVariableDeclaration
+whileStatement
+doWhileStatement
+forStatement
+ifElseStatement
+ifStatement
+elseIfStatement
+elseStatement
+switchStatement
+caseStatement
+defaultStatement
+statementExpression
+assign
+newDeclaration
+expression
+unaryExpression
+notExpression
+crementExpression
+incrementExpression
+prefixIncrementExpression
+suffixIncrementExpression
+decrementExpression
+prefixDecrementExpression
+suffixDecrementExpression
+assignableExpression
+memberAccess
+binaryExpression
+calculationExpression
+dotExpression
+dotSubtractionExpression
+nonCalculationExpression
+methodCall
+target
+chainedMethod
+type
+value
+nonCalculationOperator
+
+
+atn:
+[4, 1, 55, 462, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 1, 0, 4, 0, 100, 8, 0, 11, 0, 12, 0, 101, 1, 1, 3, 1, 105, 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 111, 8, 1, 10, 1, 12, 1, 114, 9, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 3, 2, 121, 8, 2, 1, 3, 3, 3, 124, 8, 3, 1, 3, 1, 3, 1, 3, 3, 3, 129, 8, 3, 1, 3, 1, 3, 1, 3, 1, 4, 3, 4, 135, 8, 4, 1, 4, 1, 4, 1, 4, 1, 4, 3, 4, 141, 8, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 3, 5, 148, 8, 5, 1, 5, 1, 5, 3, 5, 152, 8, 5, 1, 5, 1, 5, 1, 5, 3, 5, 157, 8, 5, 1, 5, 1, 5, 3, 5, 161, 8, 5, 1, 6, 1, 6, 1, 6, 5, 6, 166, 8, 6, 10, 6, 12, 6, 169, 9, 6, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 5, 8, 177, 8, 8, 10, 8, 12, 8, 180, 9, 8, 3, 8, 182, 8, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 3, 9, 199, 8, 9, 1, 10, 1, 10, 5, 10, 203, 8, 10, 10, 10, 12, 10, 206, 9, 10, 1, 10, 1, 10, 1, 11, 1, 11, 3, 11, 212, 8, 11, 1, 12, 1, 12, 1, 12, 1, 12, 3, 12, 218, 8, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 3, 15, 238, 8, 15, 1, 15, 1, 15, 3, 15, 242, 8, 15, 1, 15, 1, 15, 3, 15, 246, 8, 15, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 5, 16, 253, 8, 16, 10, 16, 12, 16, 256, 9, 16, 1, 16, 3, 16, 259, 8, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 4, 20, 283, 8, 20, 11, 20, 12, 20, 284, 1, 20, 3, 20, 288, 8, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 21, 5, 21, 296, 8, 21, 10, 21, 12, 21, 299, 9, 21, 1, 22, 1, 22, 1, 22, 5, 22, 304, 8, 22, 10, 22, 12, 22, 307, 9, 22, 1, 23, 1, 23, 1, 23, 1, 23, 3, 23, 313, 8, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 3, 26, 327, 8, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 3, 27, 339, 8, 27, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 3, 29, 346, 8, 29, 1, 30, 1, 30, 3, 30, 350, 8, 30, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 3, 33, 360, 8, 33, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 36, 1, 36, 3, 36, 370, 8, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 3, 37, 377, 8, 37, 1, 37, 1, 37, 4, 37, 381, 8, 37, 11, 37, 12, 37, 382, 1, 37, 3, 37, 386, 8, 37, 1, 38, 1, 38, 3, 38, 390, 8, 38, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 5, 39, 398, 8, 39, 10, 39, 12, 39, 401, 9, 39, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 5, 40, 409, 8, 40, 10, 40, 12, 40, 412, 9, 40, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 3, 41, 422, 8, 41, 1, 42, 1, 42, 1, 42, 1, 42, 1, 43, 3, 43, 429, 8, 43, 1, 43, 5, 43, 432, 8, 43, 10, 43, 12, 43, 435, 9, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 44, 1, 44, 1, 44, 1, 44, 3, 44, 446, 8, 44, 1, 44, 1, 44, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 46, 1, 46, 1, 47, 1, 47, 1, 48, 1, 48, 1, 48, 0, 2, 78, 80, 49, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 0, 3, 2, 0, 4, 6, 52, 52, 1, 0, 48, 51, 1, 0, 11, 12, 476, 0, 99, 1, 0, 0, 0, 2, 104, 1, 0, 0, 0, 4, 120, 1, 0, 0, 0, 6, 123, 1, 0, 0, 0, 8, 134, 1, 0, 0, 0, 10, 160, 1, 0, 0, 0, 12, 162, 1, 0, 0, 0, 14, 170, 1, 0, 0, 0, 16, 181, 1, 0, 0, 0, 18, 198, 1, 0, 0, 0, 20, 200, 1, 0, 0, 0, 22, 209, 1, 0, 0, 0, 24, 213, 1, 0, 0, 0, 26, 219, 1, 0, 0, 0, 28, 225, 1, 0, 0, 0, 30, 233, 1, 0, 0, 0, 32, 250, 1, 0, 0, 0, 34, 260, 1, 0, 0, 0, 36, 266, 1, 0, 0, 0, 38, 273, 1, 0, 0, 0, 40, 276, 1, 0, 0, 0, 42, 291, 1, 0, 0, 0, 44, 300, 1, 0, 0, 0, 46, 312, 1, 0, 0, 0, 48, 314, 1, 0, 0, 0, 50, 318, 1, 0, 0, 0, 52, 326, 1, 0, 0, 0, 54, 338, 1, 0, 0, 0, 56, 340, 1, 0, 0, 0, 58, 345, 1, 0, 0, 0, 60, 349, 1, 0, 0, 0, 62, 351, 1, 0, 0, 0, 64, 354, 1, 0, 0, 0, 66, 359, 1, 0, 0, 0, 68, 361, 1, 0, 0, 0, 70, 364, 1, 0, 0, 0, 72, 369, 1, 0, 0, 0, 74, 385, 1, 0, 0, 0, 76, 389, 1, 0, 0, 0, 78, 391, 1, 0, 0, 0, 80, 402, 1, 0, 0, 0, 82, 421, 1, 0, 0, 0, 84, 423, 1, 0, 0, 0, 86, 428, 1, 0, 0, 0, 88, 445, 1, 0, 0, 0, 90, 449, 1, 0, 0, 0, 92, 455, 1, 0, 0, 0, 94, 457, 1, 0, 0, 0, 96, 459, 1, 0, 0, 0, 98, 100, 3, 2, 1, 0, 99, 98, 1, 0, 0, 0, 100, 101, 1, 0, 0, 0, 101, 99, 1, 0, 0, 0, 101, 102, 1, 0, 0, 0, 102, 1, 1, 0, 0, 0, 103, 105, 5, 7, 0, 0, 104, 103, 1, 0, 0, 0, 104, 105, 1, 0, 0, 0, 105, 106, 1, 0, 0, 0, 106, 107, 5, 35, 0, 0, 107, 108, 5, 52, 0, 0, 108, 112, 5, 31, 0, 0, 109, 111, 3, 4, 2, 0, 110, 109, 1, 0, 0, 0, 111, 114, 1, 0, 0, 0, 112, 110, 1, 0, 0, 0, 112, 113, 1, 0, 0, 0, 113, 115, 1, 0, 0, 0, 114, 112, 1, 0, 0, 0, 115, 116, 5, 32, 0, 0, 116, 3, 1, 0, 0, 0, 117, 121, 3, 6, 3, 0, 118, 121, 3, 8, 4, 0, 119, 121, 3, 10, 5, 0, 120, 117, 1, 0, 0, 0, 120, 118, 1, 0, 0, 0, 120, 119, 1, 0, 0, 0, 121, 5, 1, 0, 0, 0, 122, 124, 5, 7, 0, 0, 123, 122, 1, 0, 0, 0, 123, 124, 1, 0, 0, 0, 124, 125, 1, 0, 0, 0, 125, 126, 5, 52, 0, 0, 126, 128, 5, 29, 0, 0, 127, 129, 3, 12, 6, 0, 128, 127, 1, 0, 0, 0, 128, 129, 1, 0, 0, 0, 129, 130, 1, 0, 0, 0, 130, 131, 5, 30, 0, 0, 131, 132, 3, 20, 10, 0, 132, 7, 1, 0, 0, 0, 133, 135, 5, 7, 0, 0, 134, 133, 1, 0, 0, 0, 134, 135, 1, 0, 0, 0, 135, 136, 1, 0, 0, 0, 136, 137, 3, 92, 46, 0, 137, 140, 5, 52, 0, 0, 138, 139, 5, 13, 0, 0, 139, 141, 3, 52, 26, 0, 140, 138, 1, 0, 0, 0, 140, 141, 1, 0, 0, 0, 141, 142, 1, 0, 0, 0, 142, 143, 5, 33, 0, 0, 143, 9, 1, 0, 0, 0, 144, 145, 5, 8, 0, 0, 145, 161, 3, 20, 10, 0, 146, 148, 5, 7, 0, 0, 147, 146, 1, 0, 0, 0, 147, 148, 1, 0, 0, 0, 148, 151, 1, 0, 0, 0, 149, 152, 3, 92, 46, 0, 150, 152, 5, 3, 0, 0, 151, 149, 1, 0, 0, 0, 151, 150, 1, 0, 0, 0, 152, 153, 1, 0, 0, 0, 153, 154, 5, 52, 0, 0, 154, 156, 5, 29, 0, 0, 155, 157, 3, 12, 6, 0, 156, 155, 1, 0, 0, 0, 156, 157, 1, 0, 0, 0, 157, 158, 1, 0, 0, 0, 158, 159, 5, 30, 0, 0, 159, 161, 3, 20, 10, 0, 160, 144, 1, 0, 0, 0, 160, 147, 1, 0, 0, 0, 161, 11, 1, 0, 0, 0, 162, 167, 3, 14, 7, 0, 163, 164, 5, 34, 0, 0, 164, 166, 3, 14, 7, 0, 165, 163, 1, 0, 0, 0, 166, 169, 1, 0, 0, 0, 167, 165, 1, 0, 0, 0, 167, 168, 1, 0, 0, 0, 168, 13, 1, 0, 0, 0, 169, 167, 1, 0, 0, 0, 170, 171, 3, 92, 46, 0, 171, 172, 5, 52, 0, 0, 172, 15, 1, 0, 0, 0, 173, 178, 3, 52, 26, 0, 174, 175, 5, 34, 0, 0, 175, 177, 3, 52, 26, 0, 176, 174, 1, 0, 0, 0, 177, 180, 1, 0, 0, 0, 178, 176, 1, 0, 0, 0, 178, 179, 1, 0, 0, 0, 179, 182, 1, 0, 0, 0, 180, 178, 1, 0, 0, 0, 181, 173, 1, 0, 0, 0, 181, 182, 1, 0, 0, 0, 182, 17, 1, 0, 0, 0, 183, 184, 3, 22, 11, 0, 184, 185, 5, 33, 0, 0, 185, 199, 1, 0, 0, 0, 186, 187, 3, 24, 12, 0, 187, 188, 5, 33, 0, 0, 188, 199, 1, 0, 0, 0, 189, 199, 3, 20, 10, 0, 190, 199, 3, 26, 13, 0, 191, 199, 3, 28, 14, 0, 192, 199, 3, 30, 15, 0, 193, 199, 3, 32, 16, 0, 194, 199, 3, 40, 20, 0, 195, 196, 3, 46, 23, 0, 196, 197, 5, 33, 0, 0, 197, 199, 1, 0, 0, 0, 198, 183, 1, 0, 0, 0, 198, 186, 1, 0, 0, 0, 198, 189, 1, 0, 0, 0, 198, 190, 1, 0, 0, 0, 198, 191, 1, 0, 0, 0, 198, 192, 1, 0, 0, 0, 198, 193, 1, 0, 0, 0, 198, 194, 1, 0, 0, 0, 198, 195, 1, 0, 0, 0, 199, 19, 1, 0, 0, 0, 200, 204, 5, 31, 0, 0, 201, 203, 3, 18, 9, 0, 202, 201, 1, 0, 0, 0, 203, 206, 1, 0, 0, 0, 204, 202, 1, 0, 0, 0, 204, 205, 1, 0, 0, 0, 205, 207, 1, 0, 0, 0, 206, 204, 1, 0, 0, 0, 207, 208, 5, 32, 0, 0, 208, 21, 1, 0, 0, 0, 209, 211, 5, 42, 0, 0, 210, 212, 3, 52, 26, 0, 211, 210, 1, 0, 0, 0, 211, 212, 1, 0, 0, 0, 212, 23, 1, 0, 0, 0, 213, 214, 3, 92, 46, 0, 214, 217, 5, 52, 0, 0, 215, 216, 5, 13, 0, 0, 216, 218, 3, 52, 26, 0, 217, 215, 1, 0, 0, 0, 217, 218, 1, 0, 0, 0, 218, 25, 1, 0, 0, 0, 219, 220, 5, 37, 0, 0, 220, 221, 5, 29, 0, 0, 221, 222, 3, 52, 26, 0, 222, 223, 5, 30, 0, 0, 223, 224, 3, 20, 10, 0, 224, 27, 1, 0, 0, 0, 225, 226, 5, 38, 0, 0, 226, 227, 3, 20, 10, 0, 227, 228, 5, 37, 0, 0, 228, 229, 5, 29, 0, 0, 229, 230, 3, 52, 26, 0, 230, 231, 5, 30, 0, 0, 231, 232, 5, 33, 0, 0, 232, 29, 1, 0, 0, 0, 233, 234, 5, 41, 0, 0, 234, 237, 5, 29, 0, 0, 235, 238, 3, 46, 23, 0, 236, 238, 3, 24, 12, 0, 237, 235, 1, 0, 0, 0, 237, 236, 1, 0, 0, 0, 238, 239, 1, 0, 0, 0, 239, 241, 5, 33, 0, 0, 240, 242, 3, 52, 26, 0, 241, 240, 1, 0, 0, 0, 241, 242, 1, 0, 0, 0, 242, 243, 1, 0, 0, 0, 243, 245, 5, 33, 0, 0, 244, 246, 3, 46, 23, 0, 245, 244, 1, 0, 0, 0, 245, 246, 1, 0, 0, 0, 246, 247, 1, 0, 0, 0, 247, 248, 5, 30, 0, 0, 248, 249, 3, 20, 10, 0, 249, 31, 1, 0, 0, 0, 250, 254, 3, 34, 17, 0, 251, 253, 3, 36, 18, 0, 252, 251, 1, 0, 0, 0, 253, 256, 1, 0, 0, 0, 254, 252, 1, 0, 0, 0, 254, 255, 1, 0, 0, 0, 255, 258, 1, 0, 0, 0, 256, 254, 1, 0, 0, 0, 257, 259, 3, 38, 19, 0, 258, 257, 1, 0, 0, 0, 258, 259, 1, 0, 0, 0, 259, 33, 1, 0, 0, 0, 260, 261, 5, 39, 0, 0, 261, 262, 5, 29, 0, 0, 262, 263, 3, 52, 26, 0, 263, 264, 5, 30, 0, 0, 264, 265, 3, 20, 10, 0, 265, 35, 1, 0, 0, 0, 266, 267, 5, 40, 0, 0, 267, 268, 5, 39, 0, 0, 268, 269, 5, 29, 0, 0, 269, 270, 3, 52, 26, 0, 270, 271, 5, 30, 0, 0, 271, 272, 3, 20, 10, 0, 272, 37, 1, 0, 0, 0, 273, 274, 5, 40, 0, 0, 274, 275, 3, 20, 10, 0, 275, 39, 1, 0, 0, 0, 276, 277, 5, 44, 0, 0, 277, 278, 5, 29, 0, 0, 278, 279, 3, 52, 26, 0, 279, 280, 5, 30, 0, 0, 280, 282, 5, 31, 0, 0, 281, 283, 3, 42, 21, 0, 282, 281, 1, 0, 0, 0, 283, 284, 1, 0, 0, 0, 284, 282, 1, 0, 0, 0, 284, 285, 1, 0, 0, 0, 285, 287, 1, 0, 0, 0, 286, 288, 3, 44, 22, 0, 287, 286, 1, 0, 0, 0, 287, 288, 1, 0, 0, 0, 288, 289, 1, 0, 0, 0, 289, 290, 5, 32, 0, 0, 290, 41, 1, 0, 0, 0, 291, 292, 5, 45, 0, 0, 292, 293, 3, 94, 47, 0, 293, 297, 5, 47, 0, 0, 294, 296, 3, 18, 9, 0, 295, 294, 1, 0, 0, 0, 296, 299, 1, 0, 0, 0, 297, 295, 1, 0, 0, 0, 297, 298, 1, 0, 0, 0, 298, 43, 1, 0, 0, 0, 299, 297, 1, 0, 0, 0, 300, 301, 5, 46, 0, 0, 301, 305, 5, 47, 0, 0, 302, 304, 3, 18, 9, 0, 303, 302, 1, 0, 0, 0, 304, 307, 1, 0, 0, 0, 305, 303, 1, 0, 0, 0, 305, 306, 1, 0, 0, 0, 306, 45, 1, 0, 0, 0, 307, 305, 1, 0, 0, 0, 308, 313, 3, 48, 24, 0, 309, 313, 3, 50, 25, 0, 310, 313, 3, 86, 43, 0, 311, 313, 3, 58, 29, 0, 312, 308, 1, 0, 0, 0, 312, 309, 1, 0, 0, 0, 312, 310, 1, 0, 0, 0, 312, 311, 1, 0, 0, 0, 313, 47, 1, 0, 0, 0, 314, 315, 3, 72, 36, 0, 315, 316, 5, 13, 0, 0, 316, 317, 3, 52, 26, 0, 317, 49, 1, 0, 0, 0, 318, 319, 5, 43, 0, 0, 319, 320, 5, 52, 0, 0, 320, 321, 5, 29, 0, 0, 321, 322, 3, 16, 8, 0, 322, 323, 5, 30, 0, 0, 323, 51, 1, 0, 0, 0, 324, 327, 3, 54, 27, 0, 325, 327, 3, 76, 38, 0, 326, 324, 1, 0, 0, 0, 326, 325, 1, 0, 0, 0, 327, 53, 1, 0, 0, 0, 328, 339, 5, 36, 0, 0, 329, 339, 5, 52, 0, 0, 330, 339, 3, 74, 37, 0, 331, 339, 3, 94, 47, 0, 332, 339, 3, 56, 28, 0, 333, 339, 3, 46, 23, 0, 334, 335, 5, 29, 0, 0, 335, 336, 3, 52, 26, 0, 336, 337, 5, 30, 0, 0, 337, 339, 1, 0, 0, 0, 338, 328, 1, 0, 0, 0, 338, 329, 1, 0, 0, 0, 338, 330, 1, 0, 0, 0, 338, 331, 1, 0, 0, 0, 338, 332, 1, 0, 0, 0, 338, 333, 1, 0, 0, 0, 338, 334, 1, 0, 0, 0, 339, 55, 1, 0, 0, 0, 340, 341, 5, 25, 0, 0, 341, 342, 3, 52, 26, 0, 342, 57, 1, 0, 0, 0, 343, 346, 3, 60, 30, 0, 344, 346, 3, 66, 33, 0, 345, 343, 1, 0, 0, 0, 345, 344, 1, 0, 0, 0, 346, 59, 1, 0, 0, 0, 347, 350, 3, 62, 31, 0, 348, 350, 3, 64, 32, 0, 349, 347, 1, 0, 0, 0, 349, 348, 1, 0, 0, 0, 350, 61, 1, 0, 0, 0, 351, 352, 5, 1, 0, 0, 352, 353, 3, 72, 36, 0, 353, 63, 1, 0, 0, 0, 354, 355, 3, 72, 36, 0, 355, 356, 5, 1, 0, 0, 356, 65, 1, 0, 0, 0, 357, 360, 3, 68, 34, 0, 358, 360, 3, 70, 35, 0, 359, 357, 1, 0, 0, 0, 359, 358, 1, 0, 0, 0, 360, 67, 1, 0, 0, 0, 361, 362, 5, 2, 0, 0, 362, 363, 3, 72, 36, 0, 363, 69, 1, 0, 0, 0, 364, 365, 3, 72, 36, 0, 365, 366, 5, 2, 0, 0, 366, 71, 1, 0, 0, 0, 367, 370, 5, 52, 0, 0, 368, 370, 3, 74, 37, 0, 369, 367, 1, 0, 0, 0, 369, 368, 1, 0, 0, 0, 370, 73, 1, 0, 0, 0, 371, 372, 5, 36, 0, 0, 372, 373, 5, 28, 0, 0, 373, 386, 5, 52, 0, 0, 374, 375, 5, 36, 0, 0, 375, 377, 5, 28, 0, 0, 376, 374, 1, 0, 0, 0, 376, 377, 1, 0, 0, 0, 377, 380, 1, 0, 0, 0, 378, 379, 5, 52, 0, 0, 379, 381, 5, 28, 0, 0, 380, 378, 1, 0, 0, 0, 381, 382, 1, 0, 0, 0, 382, 380, 1, 0, 0, 0, 382, 383, 1, 0, 0, 0, 383, 384, 1, 0, 0, 0, 384, 386, 5, 52, 0, 0, 385, 371, 1, 0, 0, 0, 385, 376, 1, 0, 0, 0, 386, 75, 1, 0, 0, 0, 387, 390, 3, 78, 39, 0, 388, 390, 3, 84, 42, 0, 389, 387, 1, 0, 0, 0, 389, 388, 1, 0, 0, 0, 390, 77, 1, 0, 0, 0, 391, 392, 6, 39, -1, 0, 392, 393, 3, 80, 40, 0, 393, 399, 1, 0, 0, 0, 394, 395, 10, 2, 0, 0, 395, 396, 5, 10, 0, 0, 396, 398, 3, 80, 40, 0, 397, 394, 1, 0, 0, 0, 398, 401, 1, 0, 0, 0, 399, 397, 1, 0, 0, 0, 399, 400, 1, 0, 0, 0, 400, 79, 1, 0, 0, 0, 401, 399, 1, 0, 0, 0, 402, 403, 6, 40, -1, 0, 403, 404, 3, 82, 41, 0, 404, 410, 1, 0, 0, 0, 405, 406, 10, 2, 0, 0, 406, 407, 5, 9, 0, 0, 407, 409, 3, 82, 41, 0, 408, 405, 1, 0, 0, 0, 409, 412, 1, 0, 0, 0, 410, 408, 1, 0, 0, 0, 410, 411, 1, 0, 0, 0, 411, 81, 1, 0, 0, 0, 412, 410, 1, 0, 0, 0, 413, 422, 5, 49, 0, 0, 414, 422, 5, 52, 0, 0, 415, 422, 3, 74, 37, 0, 416, 417, 3, 86, 43, 0, 417, 418, 5, 29, 0, 0, 418, 419, 3, 78, 39, 0, 419, 420, 5, 30, 0, 0, 420, 422, 1, 0, 0, 0, 421, 413, 1, 0, 0, 0, 421, 414, 1, 0, 0, 0, 421, 415, 1, 0, 0, 0, 421, 416, 1, 0, 0, 0, 422, 83, 1, 0, 0, 0, 423, 424, 3, 54, 27, 0, 424, 425, 3, 96, 48, 0, 425, 426, 3, 52, 26, 0, 426, 85, 1, 0, 0, 0, 427, 429, 3, 88, 44, 0, 428, 427, 1, 0, 0, 0, 428, 429, 1, 0, 0, 0, 429, 433, 1, 0, 0, 0, 430, 432, 3, 90, 45, 0, 431, 430, 1, 0, 0, 0, 432, 435, 1, 0, 0, 0, 433, 431, 1, 0, 0, 0, 433, 434, 1, 0, 0, 0, 434, 436, 1, 0, 0, 0, 435, 433, 1, 0, 0, 0, 436, 437, 5, 52, 0, 0, 437, 438, 5, 29, 0, 0, 438, 439, 3, 16, 8, 0, 439, 440, 5, 30, 0, 0, 440, 87, 1, 0, 0, 0, 441, 446, 5, 36, 0, 0, 442, 446, 3, 74, 37, 0, 443, 446, 3, 50, 25, 0, 444, 446, 5, 52, 0, 0, 445, 441, 1, 0, 0, 0, 445, 442, 1, 0, 0, 0, 445, 443, 1, 0, 0, 0, 445, 444, 1, 0, 0, 0, 446, 447, 1, 0, 0, 0, 447, 448, 5, 28, 0, 0, 448, 89, 1, 0, 0, 0, 449, 450, 5, 52, 0, 0, 450, 451, 5, 29, 0, 0, 451, 452, 3, 16, 8, 0, 452, 453, 5, 30, 0, 0, 453, 454, 5, 28, 0, 0, 454, 91, 1, 0, 0, 0, 455, 456, 7, 0, 0, 0, 456, 93, 1, 0, 0, 0, 457, 458, 7, 1, 0, 0, 458, 95, 1, 0, 0, 0, 459, 460, 7, 2, 0, 0, 460, 97, 1, 0, 0, 0, 45, 101, 104, 112, 120, 123, 128, 134, 140, 147, 151, 156, 160, 167, 178, 181, 198, 204, 211, 217, 237, 241, 245, 254, 258, 284, 287, 297, 305, 312, 326, 338, 345, 349, 359, 369, 376, 382, 385, 389, 399, 410, 421, 428, 433, 445]
\ No newline at end of file
diff --git a/src/main/java/parser/generated/SimpleJava.tokens b/src/main/java/parser/generated/SimpleJava.tokens
new file mode 100644
index 0000000..ffe0902
--- /dev/null
+++ b/src/main/java/parser/generated/SimpleJava.tokens
@@ -0,0 +1,98 @@
+T__0=1
+T__1=2
+Void=3
+Boolean=4
+Char=5
+Int=6
+AccessModifier=7
+MainMethodDeclaration=8
+DotOperator=9
+LineOperator=10
+ComparisonOperator=11
+LogicalOperator=12
+Assign=13
+Plus=14
+Minus=15
+Mult=16
+Modulo=17
+Div=18
+Greater=19
+Less=20
+GreaterEqual=21
+LessEqual=22
+Equal=23
+NotEqual=24
+Not=25
+And=26
+Or=27
+Dot=28
+OpenRoundBracket=29
+ClosedRoundBracket=30
+OpenCurlyBracket=31
+ClosedCurlyBracket=32
+Semicolon=33
+Comma=34
+Class=35
+This=36
+While=37
+Do=38
+If=39
+Else=40
+For=41
+Return=42
+New=43
+Switch=44
+Case=45
+Default=46
+Colon=47
+CharValue=48
+IntValue=49
+BooleanValue=50
+NullValue=51
+Identifier=52
+WS=53
+InlineComment=54
+MultilineComment=55
+'++'=1
+'--'=2
+'void'=3
+'boolean'=4
+'char'=5
+'int'=6
+'public static void main(String[] args)'=8
+'='=13
+'+'=14
+'-'=15
+'*'=16
+'%'=17
+'/'=18
+'>'=19
+'<'=20
+'>='=21
+'<='=22
+'=='=23
+'!='=24
+'!'=25
+'&&'=26
+'||'=27
+'.'=28
+'('=29
+')'=30
+'{'=31
+'}'=32
+';'=33
+','=34
+'class'=35
+'this'=36
+'while'=37
+'do'=38
+'if'=39
+'else'=40
+'for'=41
+'return'=42
+'new'=43
+'switch'=44
+'case'=45
+'default'=46
+':'=47
+'null'=51
diff --git a/src/main/java/parser/generated/SimpleJavaBaseListener.java b/src/main/java/parser/generated/SimpleJavaBaseListener.java
new file mode 100644
index 0000000..acd7546
--- /dev/null
+++ b/src/main/java/parser/generated/SimpleJavaBaseListener.java
@@ -0,0 +1,628 @@
+// Generated from C:/Users/Maxi/Documents/DHBW/Compilerbau/NichtHaskell2.0/src/main/java/parser/grammar/SimpleJava.g4 by ANTLR 4.13.1
+package parser.generated;
+
+import org.antlr.v4.runtime.ParserRuleContext;
+import org.antlr.v4.runtime.tree.ErrorNode;
+import org.antlr.v4.runtime.tree.TerminalNode;
+
+/**
+ * This class provides an empty implementation of {@link SimpleJavaListener},
+ * which can be extended to create a listener which only needs to handle a subset
+ * of the available methods.
+ */
+@SuppressWarnings("CheckReturnValue")
+public class SimpleJavaBaseListener implements SimpleJavaListener {
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterProgram(SimpleJavaParser.ProgramContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitProgram(SimpleJavaParser.ProgramContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterClassDeclaration(SimpleJavaParser.ClassDeclarationContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitClassDeclaration(SimpleJavaParser.ClassDeclarationContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterMemberDeclaration(SimpleJavaParser.MemberDeclarationContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitMemberDeclaration(SimpleJavaParser.MemberDeclarationContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterConstructorDeclaration(SimpleJavaParser.ConstructorDeclarationContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitConstructorDeclaration(SimpleJavaParser.ConstructorDeclarationContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterFieldDeclaration(SimpleJavaParser.FieldDeclarationContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitFieldDeclaration(SimpleJavaParser.FieldDeclarationContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterMethodDeclaration(SimpleJavaParser.MethodDeclarationContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitMethodDeclaration(SimpleJavaParser.MethodDeclarationContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterParameterList(SimpleJavaParser.ParameterListContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitParameterList(SimpleJavaParser.ParameterListContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterParameter(SimpleJavaParser.ParameterContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitParameter(SimpleJavaParser.ParameterContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterArgumentList(SimpleJavaParser.ArgumentListContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitArgumentList(SimpleJavaParser.ArgumentListContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterStatement(SimpleJavaParser.StatementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitStatement(SimpleJavaParser.StatementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterBlockStatement(SimpleJavaParser.BlockStatementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitBlockStatement(SimpleJavaParser.BlockStatementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterReturnStatement(SimpleJavaParser.ReturnStatementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitReturnStatement(SimpleJavaParser.ReturnStatementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterLocalVariableDeclaration(SimpleJavaParser.LocalVariableDeclarationContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitLocalVariableDeclaration(SimpleJavaParser.LocalVariableDeclarationContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterWhileStatement(SimpleJavaParser.WhileStatementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitWhileStatement(SimpleJavaParser.WhileStatementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterDoWhileStatement(SimpleJavaParser.DoWhileStatementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitDoWhileStatement(SimpleJavaParser.DoWhileStatementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterForStatement(SimpleJavaParser.ForStatementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitForStatement(SimpleJavaParser.ForStatementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterIfElseStatement(SimpleJavaParser.IfElseStatementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitIfElseStatement(SimpleJavaParser.IfElseStatementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterIfStatement(SimpleJavaParser.IfStatementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitIfStatement(SimpleJavaParser.IfStatementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterElseIfStatement(SimpleJavaParser.ElseIfStatementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitElseIfStatement(SimpleJavaParser.ElseIfStatementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterElseStatement(SimpleJavaParser.ElseStatementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitElseStatement(SimpleJavaParser.ElseStatementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterSwitchStatement(SimpleJavaParser.SwitchStatementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitSwitchStatement(SimpleJavaParser.SwitchStatementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterCaseStatement(SimpleJavaParser.CaseStatementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitCaseStatement(SimpleJavaParser.CaseStatementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterDefaultStatement(SimpleJavaParser.DefaultStatementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitDefaultStatement(SimpleJavaParser.DefaultStatementContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterStatementExpression(SimpleJavaParser.StatementExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitStatementExpression(SimpleJavaParser.StatementExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterAssign(SimpleJavaParser.AssignContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitAssign(SimpleJavaParser.AssignContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterNewDeclaration(SimpleJavaParser.NewDeclarationContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitNewDeclaration(SimpleJavaParser.NewDeclarationContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterExpression(SimpleJavaParser.ExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitExpression(SimpleJavaParser.ExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterUnaryExpression(SimpleJavaParser.UnaryExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitUnaryExpression(SimpleJavaParser.UnaryExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterNotExpression(SimpleJavaParser.NotExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitNotExpression(SimpleJavaParser.NotExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterCrementExpression(SimpleJavaParser.CrementExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitCrementExpression(SimpleJavaParser.CrementExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterIncrementExpression(SimpleJavaParser.IncrementExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitIncrementExpression(SimpleJavaParser.IncrementExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterPrefixIncrementExpression(SimpleJavaParser.PrefixIncrementExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitPrefixIncrementExpression(SimpleJavaParser.PrefixIncrementExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterSuffixIncrementExpression(SimpleJavaParser.SuffixIncrementExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitSuffixIncrementExpression(SimpleJavaParser.SuffixIncrementExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterDecrementExpression(SimpleJavaParser.DecrementExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitDecrementExpression(SimpleJavaParser.DecrementExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterPrefixDecrementExpression(SimpleJavaParser.PrefixDecrementExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitPrefixDecrementExpression(SimpleJavaParser.PrefixDecrementExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterSuffixDecrementExpression(SimpleJavaParser.SuffixDecrementExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitSuffixDecrementExpression(SimpleJavaParser.SuffixDecrementExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterAssignableExpression(SimpleJavaParser.AssignableExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitAssignableExpression(SimpleJavaParser.AssignableExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterMemberAccess(SimpleJavaParser.MemberAccessContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitMemberAccess(SimpleJavaParser.MemberAccessContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterBinaryExpression(SimpleJavaParser.BinaryExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitBinaryExpression(SimpleJavaParser.BinaryExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterCalculationExpression(SimpleJavaParser.CalculationExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitCalculationExpression(SimpleJavaParser.CalculationExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterDotExpression(SimpleJavaParser.DotExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitDotExpression(SimpleJavaParser.DotExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterDotSubtractionExpression(SimpleJavaParser.DotSubtractionExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitDotSubtractionExpression(SimpleJavaParser.DotSubtractionExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterNonCalculationExpression(SimpleJavaParser.NonCalculationExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitNonCalculationExpression(SimpleJavaParser.NonCalculationExpressionContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterMethodCall(SimpleJavaParser.MethodCallContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitMethodCall(SimpleJavaParser.MethodCallContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterTarget(SimpleJavaParser.TargetContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitTarget(SimpleJavaParser.TargetContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterChainedMethod(SimpleJavaParser.ChainedMethodContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitChainedMethod(SimpleJavaParser.ChainedMethodContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterType(SimpleJavaParser.TypeContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitType(SimpleJavaParser.TypeContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterValue(SimpleJavaParser.ValueContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitValue(SimpleJavaParser.ValueContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterNonCalculationOperator(SimpleJavaParser.NonCalculationOperatorContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitNonCalculationOperator(SimpleJavaParser.NonCalculationOperatorContext ctx) { }
+
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void enterEveryRule(ParserRuleContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void exitEveryRule(ParserRuleContext ctx) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void visitTerminal(TerminalNode node) { }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation does nothing.
+ */
+ @Override public void visitErrorNode(ErrorNode node) { }
+}
\ No newline at end of file
diff --git a/src/main/java/parser/generated/SimpleJavaBaseVisitor.java b/src/main/java/parser/generated/SimpleJavaBaseVisitor.java
new file mode 100644
index 0000000..53d159c
--- /dev/null
+++ b/src/main/java/parser/generated/SimpleJavaBaseVisitor.java
@@ -0,0 +1,358 @@
+// Generated from C:/Users/Maxi/Documents/DHBW/Compilerbau/NichtHaskell2.0/src/main/java/parser/grammar/SimpleJava.g4 by ANTLR 4.13.1
+package parser.generated;
+import org.antlr.v4.runtime.tree.AbstractParseTreeVisitor;
+
+/**
+ * This class provides an empty implementation of {@link SimpleJavaVisitor},
+ * which can be extended to create a visitor which only needs to handle a subset
+ * of the available methods.
+ *
+ * @param The return type of the visit operation. Use {@link Void} for
+ * operations with no return type.
+ */
+@SuppressWarnings("CheckReturnValue")
+public class SimpleJavaBaseVisitor extends AbstractParseTreeVisitor implements SimpleJavaVisitor {
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitProgram(SimpleJavaParser.ProgramContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitClassDeclaration(SimpleJavaParser.ClassDeclarationContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitMemberDeclaration(SimpleJavaParser.MemberDeclarationContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitConstructorDeclaration(SimpleJavaParser.ConstructorDeclarationContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitFieldDeclaration(SimpleJavaParser.FieldDeclarationContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitMethodDeclaration(SimpleJavaParser.MethodDeclarationContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitParameterList(SimpleJavaParser.ParameterListContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitParameter(SimpleJavaParser.ParameterContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitArgumentList(SimpleJavaParser.ArgumentListContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitStatement(SimpleJavaParser.StatementContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitBlockStatement(SimpleJavaParser.BlockStatementContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitReturnStatement(SimpleJavaParser.ReturnStatementContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitLocalVariableDeclaration(SimpleJavaParser.LocalVariableDeclarationContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitWhileStatement(SimpleJavaParser.WhileStatementContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitDoWhileStatement(SimpleJavaParser.DoWhileStatementContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitForStatement(SimpleJavaParser.ForStatementContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitIfElseStatement(SimpleJavaParser.IfElseStatementContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitIfStatement(SimpleJavaParser.IfStatementContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitElseIfStatement(SimpleJavaParser.ElseIfStatementContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitElseStatement(SimpleJavaParser.ElseStatementContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitSwitchStatement(SimpleJavaParser.SwitchStatementContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitCaseStatement(SimpleJavaParser.CaseStatementContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitDefaultStatement(SimpleJavaParser.DefaultStatementContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitStatementExpression(SimpleJavaParser.StatementExpressionContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitAssign(SimpleJavaParser.AssignContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitNewDeclaration(SimpleJavaParser.NewDeclarationContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitExpression(SimpleJavaParser.ExpressionContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitUnaryExpression(SimpleJavaParser.UnaryExpressionContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitNotExpression(SimpleJavaParser.NotExpressionContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitCrementExpression(SimpleJavaParser.CrementExpressionContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitIncrementExpression(SimpleJavaParser.IncrementExpressionContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitPrefixIncrementExpression(SimpleJavaParser.PrefixIncrementExpressionContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitSuffixIncrementExpression(SimpleJavaParser.SuffixIncrementExpressionContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitDecrementExpression(SimpleJavaParser.DecrementExpressionContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitPrefixDecrementExpression(SimpleJavaParser.PrefixDecrementExpressionContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitSuffixDecrementExpression(SimpleJavaParser.SuffixDecrementExpressionContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitAssignableExpression(SimpleJavaParser.AssignableExpressionContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitMemberAccess(SimpleJavaParser.MemberAccessContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitBinaryExpression(SimpleJavaParser.BinaryExpressionContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitCalculationExpression(SimpleJavaParser.CalculationExpressionContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitDotExpression(SimpleJavaParser.DotExpressionContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitDotSubtractionExpression(SimpleJavaParser.DotSubtractionExpressionContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitNonCalculationExpression(SimpleJavaParser.NonCalculationExpressionContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitMethodCall(SimpleJavaParser.MethodCallContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitTarget(SimpleJavaParser.TargetContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitChainedMethod(SimpleJavaParser.ChainedMethodContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitType(SimpleJavaParser.TypeContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitValue(SimpleJavaParser.ValueContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitNonCalculationOperator(SimpleJavaParser.NonCalculationOperatorContext ctx) { return visitChildren(ctx); }
+}
\ No newline at end of file
diff --git a/src/main/java/parser/generated/SimpleJavaLexer.interp b/src/main/java/parser/generated/SimpleJavaLexer.interp
new file mode 100644
index 0000000..3338105
--- /dev/null
+++ b/src/main/java/parser/generated/SimpleJavaLexer.interp
@@ -0,0 +1,185 @@
+token literal names:
+null
+'++'
+'--'
+'void'
+'boolean'
+'char'
+'int'
+null
+'public static void main(String[] args)'
+null
+null
+null
+null
+'='
+'+'
+'-'
+'*'
+'%'
+'/'
+'>'
+'<'
+'>='
+'<='
+'=='
+'!='
+'!'
+'&&'
+'||'
+'.'
+'('
+')'
+'{'
+'}'
+';'
+','
+'class'
+'this'
+'while'
+'do'
+'if'
+'else'
+'for'
+'return'
+'new'
+'switch'
+'case'
+'default'
+':'
+null
+null
+null
+'null'
+null
+null
+null
+null
+
+token symbolic names:
+null
+null
+null
+Void
+Boolean
+Char
+Int
+AccessModifier
+MainMethodDeclaration
+DotOperator
+LineOperator
+ComparisonOperator
+LogicalOperator
+Assign
+Plus
+Minus
+Mult
+Modulo
+Div
+Greater
+Less
+GreaterEqual
+LessEqual
+Equal
+NotEqual
+Not
+And
+Or
+Dot
+OpenRoundBracket
+ClosedRoundBracket
+OpenCurlyBracket
+ClosedCurlyBracket
+Semicolon
+Comma
+Class
+This
+While
+Do
+If
+Else
+For
+Return
+New
+Switch
+Case
+Default
+Colon
+CharValue
+IntValue
+BooleanValue
+NullValue
+Identifier
+WS
+InlineComment
+MultilineComment
+
+rule names:
+T__0
+T__1
+Void
+Boolean
+Char
+Int
+AccessModifier
+MainMethodDeclaration
+DotOperator
+LineOperator
+ComparisonOperator
+LogicalOperator
+Assign
+Plus
+Minus
+Mult
+Modulo
+Div
+Greater
+Less
+GreaterEqual
+LessEqual
+Equal
+NotEqual
+Not
+And
+Or
+Dot
+OpenRoundBracket
+ClosedRoundBracket
+OpenCurlyBracket
+ClosedCurlyBracket
+Semicolon
+Comma
+Class
+This
+While
+Do
+If
+Else
+For
+Return
+New
+Switch
+Case
+Default
+Colon
+CharValue
+IntValue
+BooleanValue
+NullValue
+Alphabetic
+Numeric
+ValidIdentSymbols
+Identifier
+WS
+InlineComment
+MultilineComment
+
+channel names:
+DEFAULT_TOKEN_CHANNEL
+HIDDEN
+
+mode names:
+DEFAULT_MODE
+
+atn:
+[4, 0, 55, 443, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 3, 6, 186, 8, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 3, 8, 230, 8, 8, 1, 9, 1, 9, 3, 9, 234, 8, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 3, 10, 242, 8, 10, 1, 11, 1, 11, 3, 11, 246, 8, 11, 1, 12, 1, 12, 1, 13, 1, 13, 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, 20, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 28, 1, 28, 1, 29, 1, 29, 1, 30, 1, 30, 1, 31, 1, 31, 1, 32, 1, 32, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 40, 1, 40, 1, 40, 1, 40, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 1, 42, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 46, 1, 46, 1, 47, 1, 47, 5, 47, 365, 8, 47, 10, 47, 12, 47, 368, 9, 47, 1, 47, 1, 47, 1, 48, 3, 48, 373, 8, 48, 1, 48, 4, 48, 376, 8, 48, 11, 48, 12, 48, 377, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 3, 49, 389, 8, 49, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 51, 1, 51, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 3, 53, 403, 8, 53, 1, 54, 1, 54, 5, 54, 407, 8, 54, 10, 54, 12, 54, 410, 9, 54, 1, 55, 4, 55, 413, 8, 55, 11, 55, 12, 55, 414, 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 1, 56, 5, 56, 423, 8, 56, 10, 56, 12, 56, 426, 9, 56, 1, 56, 1, 56, 1, 57, 1, 57, 1, 57, 1, 57, 5, 57, 434, 8, 57, 10, 57, 12, 57, 437, 9, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 435, 0, 58, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, 37, 75, 38, 77, 39, 79, 40, 81, 41, 83, 42, 85, 43, 87, 44, 89, 45, 91, 46, 93, 47, 95, 48, 97, 49, 99, 50, 101, 51, 103, 0, 105, 0, 107, 0, 109, 52, 111, 53, 113, 54, 115, 55, 1, 0, 5, 2, 0, 10, 10, 13, 13, 2, 0, 65, 90, 97, 122, 1, 0, 48, 57, 2, 0, 36, 36, 95, 95, 3, 0, 9, 10, 13, 13, 32, 32, 461, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 95, 1, 0, 0, 0, 0, 97, 1, 0, 0, 0, 0, 99, 1, 0, 0, 0, 0, 101, 1, 0, 0, 0, 0, 109, 1, 0, 0, 0, 0, 111, 1, 0, 0, 0, 0, 113, 1, 0, 0, 0, 0, 115, 1, 0, 0, 0, 1, 117, 1, 0, 0, 0, 3, 120, 1, 0, 0, 0, 5, 123, 1, 0, 0, 0, 7, 128, 1, 0, 0, 0, 9, 136, 1, 0, 0, 0, 11, 141, 1, 0, 0, 0, 13, 185, 1, 0, 0, 0, 15, 187, 1, 0, 0, 0, 17, 229, 1, 0, 0, 0, 19, 233, 1, 0, 0, 0, 21, 241, 1, 0, 0, 0, 23, 245, 1, 0, 0, 0, 25, 247, 1, 0, 0, 0, 27, 249, 1, 0, 0, 0, 29, 251, 1, 0, 0, 0, 31, 253, 1, 0, 0, 0, 33, 255, 1, 0, 0, 0, 35, 257, 1, 0, 0, 0, 37, 259, 1, 0, 0, 0, 39, 261, 1, 0, 0, 0, 41, 263, 1, 0, 0, 0, 43, 266, 1, 0, 0, 0, 45, 269, 1, 0, 0, 0, 47, 272, 1, 0, 0, 0, 49, 275, 1, 0, 0, 0, 51, 277, 1, 0, 0, 0, 53, 280, 1, 0, 0, 0, 55, 283, 1, 0, 0, 0, 57, 285, 1, 0, 0, 0, 59, 287, 1, 0, 0, 0, 61, 289, 1, 0, 0, 0, 63, 291, 1, 0, 0, 0, 65, 293, 1, 0, 0, 0, 67, 295, 1, 0, 0, 0, 69, 297, 1, 0, 0, 0, 71, 303, 1, 0, 0, 0, 73, 308, 1, 0, 0, 0, 75, 314, 1, 0, 0, 0, 77, 317, 1, 0, 0, 0, 79, 320, 1, 0, 0, 0, 81, 325, 1, 0, 0, 0, 83, 329, 1, 0, 0, 0, 85, 336, 1, 0, 0, 0, 87, 340, 1, 0, 0, 0, 89, 347, 1, 0, 0, 0, 91, 352, 1, 0, 0, 0, 93, 360, 1, 0, 0, 0, 95, 362, 1, 0, 0, 0, 97, 372, 1, 0, 0, 0, 99, 388, 1, 0, 0, 0, 101, 390, 1, 0, 0, 0, 103, 395, 1, 0, 0, 0, 105, 397, 1, 0, 0, 0, 107, 402, 1, 0, 0, 0, 109, 404, 1, 0, 0, 0, 111, 412, 1, 0, 0, 0, 113, 418, 1, 0, 0, 0, 115, 429, 1, 0, 0, 0, 117, 118, 5, 43, 0, 0, 118, 119, 5, 43, 0, 0, 119, 2, 1, 0, 0, 0, 120, 121, 5, 45, 0, 0, 121, 122, 5, 45, 0, 0, 122, 4, 1, 0, 0, 0, 123, 124, 5, 118, 0, 0, 124, 125, 5, 111, 0, 0, 125, 126, 5, 105, 0, 0, 126, 127, 5, 100, 0, 0, 127, 6, 1, 0, 0, 0, 128, 129, 5, 98, 0, 0, 129, 130, 5, 111, 0, 0, 130, 131, 5, 111, 0, 0, 131, 132, 5, 108, 0, 0, 132, 133, 5, 101, 0, 0, 133, 134, 5, 97, 0, 0, 134, 135, 5, 110, 0, 0, 135, 8, 1, 0, 0, 0, 136, 137, 5, 99, 0, 0, 137, 138, 5, 104, 0, 0, 138, 139, 5, 97, 0, 0, 139, 140, 5, 114, 0, 0, 140, 10, 1, 0, 0, 0, 141, 142, 5, 105, 0, 0, 142, 143, 5, 110, 0, 0, 143, 144, 5, 116, 0, 0, 144, 12, 1, 0, 0, 0, 145, 146, 5, 112, 0, 0, 146, 147, 5, 117, 0, 0, 147, 148, 5, 98, 0, 0, 148, 149, 5, 108, 0, 0, 149, 150, 5, 105, 0, 0, 150, 186, 5, 99, 0, 0, 151, 152, 5, 112, 0, 0, 152, 153, 5, 114, 0, 0, 153, 154, 5, 105, 0, 0, 154, 155, 5, 118, 0, 0, 155, 156, 5, 97, 0, 0, 156, 157, 5, 116, 0, 0, 157, 186, 5, 101, 0, 0, 158, 159, 5, 112, 0, 0, 159, 160, 5, 117, 0, 0, 160, 161, 5, 98, 0, 0, 161, 162, 5, 108, 0, 0, 162, 163, 5, 105, 0, 0, 163, 164, 5, 99, 0, 0, 164, 165, 5, 32, 0, 0, 165, 166, 5, 115, 0, 0, 166, 167, 5, 116, 0, 0, 167, 168, 5, 97, 0, 0, 168, 169, 5, 116, 0, 0, 169, 170, 5, 105, 0, 0, 170, 186, 5, 99, 0, 0, 171, 172, 5, 112, 0, 0, 172, 173, 5, 114, 0, 0, 173, 174, 5, 105, 0, 0, 174, 175, 5, 118, 0, 0, 175, 176, 5, 97, 0, 0, 176, 177, 5, 116, 0, 0, 177, 178, 5, 101, 0, 0, 178, 179, 5, 32, 0, 0, 179, 180, 5, 115, 0, 0, 180, 181, 5, 116, 0, 0, 181, 182, 5, 97, 0, 0, 182, 183, 5, 116, 0, 0, 183, 184, 5, 105, 0, 0, 184, 186, 5, 99, 0, 0, 185, 145, 1, 0, 0, 0, 185, 151, 1, 0, 0, 0, 185, 158, 1, 0, 0, 0, 185, 171, 1, 0, 0, 0, 186, 14, 1, 0, 0, 0, 187, 188, 5, 112, 0, 0, 188, 189, 5, 117, 0, 0, 189, 190, 5, 98, 0, 0, 190, 191, 5, 108, 0, 0, 191, 192, 5, 105, 0, 0, 192, 193, 5, 99, 0, 0, 193, 194, 5, 32, 0, 0, 194, 195, 5, 115, 0, 0, 195, 196, 5, 116, 0, 0, 196, 197, 5, 97, 0, 0, 197, 198, 5, 116, 0, 0, 198, 199, 5, 105, 0, 0, 199, 200, 5, 99, 0, 0, 200, 201, 5, 32, 0, 0, 201, 202, 5, 118, 0, 0, 202, 203, 5, 111, 0, 0, 203, 204, 5, 105, 0, 0, 204, 205, 5, 100, 0, 0, 205, 206, 5, 32, 0, 0, 206, 207, 5, 109, 0, 0, 207, 208, 5, 97, 0, 0, 208, 209, 5, 105, 0, 0, 209, 210, 5, 110, 0, 0, 210, 211, 5, 40, 0, 0, 211, 212, 5, 83, 0, 0, 212, 213, 5, 116, 0, 0, 213, 214, 5, 114, 0, 0, 214, 215, 5, 105, 0, 0, 215, 216, 5, 110, 0, 0, 216, 217, 5, 103, 0, 0, 217, 218, 5, 91, 0, 0, 218, 219, 5, 93, 0, 0, 219, 220, 5, 32, 0, 0, 220, 221, 5, 97, 0, 0, 221, 222, 5, 114, 0, 0, 222, 223, 5, 103, 0, 0, 223, 224, 5, 115, 0, 0, 224, 225, 5, 41, 0, 0, 225, 16, 1, 0, 0, 0, 226, 230, 3, 31, 15, 0, 227, 230, 3, 35, 17, 0, 228, 230, 3, 33, 16, 0, 229, 226, 1, 0, 0, 0, 229, 227, 1, 0, 0, 0, 229, 228, 1, 0, 0, 0, 230, 18, 1, 0, 0, 0, 231, 234, 3, 27, 13, 0, 232, 234, 3, 29, 14, 0, 233, 231, 1, 0, 0, 0, 233, 232, 1, 0, 0, 0, 234, 20, 1, 0, 0, 0, 235, 242, 3, 37, 18, 0, 236, 242, 3, 39, 19, 0, 237, 242, 3, 41, 20, 0, 238, 242, 3, 43, 21, 0, 239, 242, 3, 45, 22, 0, 240, 242, 3, 47, 23, 0, 241, 235, 1, 0, 0, 0, 241, 236, 1, 0, 0, 0, 241, 237, 1, 0, 0, 0, 241, 238, 1, 0, 0, 0, 241, 239, 1, 0, 0, 0, 241, 240, 1, 0, 0, 0, 242, 22, 1, 0, 0, 0, 243, 246, 3, 51, 25, 0, 244, 246, 3, 53, 26, 0, 245, 243, 1, 0, 0, 0, 245, 244, 1, 0, 0, 0, 246, 24, 1, 0, 0, 0, 247, 248, 5, 61, 0, 0, 248, 26, 1, 0, 0, 0, 249, 250, 5, 43, 0, 0, 250, 28, 1, 0, 0, 0, 251, 252, 5, 45, 0, 0, 252, 30, 1, 0, 0, 0, 253, 254, 5, 42, 0, 0, 254, 32, 1, 0, 0, 0, 255, 256, 5, 37, 0, 0, 256, 34, 1, 0, 0, 0, 257, 258, 5, 47, 0, 0, 258, 36, 1, 0, 0, 0, 259, 260, 5, 62, 0, 0, 260, 38, 1, 0, 0, 0, 261, 262, 5, 60, 0, 0, 262, 40, 1, 0, 0, 0, 263, 264, 5, 62, 0, 0, 264, 265, 5, 61, 0, 0, 265, 42, 1, 0, 0, 0, 266, 267, 5, 60, 0, 0, 267, 268, 5, 61, 0, 0, 268, 44, 1, 0, 0, 0, 269, 270, 5, 61, 0, 0, 270, 271, 5, 61, 0, 0, 271, 46, 1, 0, 0, 0, 272, 273, 5, 33, 0, 0, 273, 274, 5, 61, 0, 0, 274, 48, 1, 0, 0, 0, 275, 276, 5, 33, 0, 0, 276, 50, 1, 0, 0, 0, 277, 278, 5, 38, 0, 0, 278, 279, 5, 38, 0, 0, 279, 52, 1, 0, 0, 0, 280, 281, 5, 124, 0, 0, 281, 282, 5, 124, 0, 0, 282, 54, 1, 0, 0, 0, 283, 284, 5, 46, 0, 0, 284, 56, 1, 0, 0, 0, 285, 286, 5, 40, 0, 0, 286, 58, 1, 0, 0, 0, 287, 288, 5, 41, 0, 0, 288, 60, 1, 0, 0, 0, 289, 290, 5, 123, 0, 0, 290, 62, 1, 0, 0, 0, 291, 292, 5, 125, 0, 0, 292, 64, 1, 0, 0, 0, 293, 294, 5, 59, 0, 0, 294, 66, 1, 0, 0, 0, 295, 296, 5, 44, 0, 0, 296, 68, 1, 0, 0, 0, 297, 298, 5, 99, 0, 0, 298, 299, 5, 108, 0, 0, 299, 300, 5, 97, 0, 0, 300, 301, 5, 115, 0, 0, 301, 302, 5, 115, 0, 0, 302, 70, 1, 0, 0, 0, 303, 304, 5, 116, 0, 0, 304, 305, 5, 104, 0, 0, 305, 306, 5, 105, 0, 0, 306, 307, 5, 115, 0, 0, 307, 72, 1, 0, 0, 0, 308, 309, 5, 119, 0, 0, 309, 310, 5, 104, 0, 0, 310, 311, 5, 105, 0, 0, 311, 312, 5, 108, 0, 0, 312, 313, 5, 101, 0, 0, 313, 74, 1, 0, 0, 0, 314, 315, 5, 100, 0, 0, 315, 316, 5, 111, 0, 0, 316, 76, 1, 0, 0, 0, 317, 318, 5, 105, 0, 0, 318, 319, 5, 102, 0, 0, 319, 78, 1, 0, 0, 0, 320, 321, 5, 101, 0, 0, 321, 322, 5, 108, 0, 0, 322, 323, 5, 115, 0, 0, 323, 324, 5, 101, 0, 0, 324, 80, 1, 0, 0, 0, 325, 326, 5, 102, 0, 0, 326, 327, 5, 111, 0, 0, 327, 328, 5, 114, 0, 0, 328, 82, 1, 0, 0, 0, 329, 330, 5, 114, 0, 0, 330, 331, 5, 101, 0, 0, 331, 332, 5, 116, 0, 0, 332, 333, 5, 117, 0, 0, 333, 334, 5, 114, 0, 0, 334, 335, 5, 110, 0, 0, 335, 84, 1, 0, 0, 0, 336, 337, 5, 110, 0, 0, 337, 338, 5, 101, 0, 0, 338, 339, 5, 119, 0, 0, 339, 86, 1, 0, 0, 0, 340, 341, 5, 115, 0, 0, 341, 342, 5, 119, 0, 0, 342, 343, 5, 105, 0, 0, 343, 344, 5, 116, 0, 0, 344, 345, 5, 99, 0, 0, 345, 346, 5, 104, 0, 0, 346, 88, 1, 0, 0, 0, 347, 348, 5, 99, 0, 0, 348, 349, 5, 97, 0, 0, 349, 350, 5, 115, 0, 0, 350, 351, 5, 101, 0, 0, 351, 90, 1, 0, 0, 0, 352, 353, 5, 100, 0, 0, 353, 354, 5, 101, 0, 0, 354, 355, 5, 102, 0, 0, 355, 356, 5, 97, 0, 0, 356, 357, 5, 117, 0, 0, 357, 358, 5, 108, 0, 0, 358, 359, 5, 116, 0, 0, 359, 92, 1, 0, 0, 0, 360, 361, 5, 58, 0, 0, 361, 94, 1, 0, 0, 0, 362, 366, 5, 39, 0, 0, 363, 365, 8, 0, 0, 0, 364, 363, 1, 0, 0, 0, 365, 368, 1, 0, 0, 0, 366, 364, 1, 0, 0, 0, 366, 367, 1, 0, 0, 0, 367, 369, 1, 0, 0, 0, 368, 366, 1, 0, 0, 0, 369, 370, 5, 39, 0, 0, 370, 96, 1, 0, 0, 0, 371, 373, 3, 29, 14, 0, 372, 371, 1, 0, 0, 0, 372, 373, 1, 0, 0, 0, 373, 375, 1, 0, 0, 0, 374, 376, 3, 105, 52, 0, 375, 374, 1, 0, 0, 0, 376, 377, 1, 0, 0, 0, 377, 375, 1, 0, 0, 0, 377, 378, 1, 0, 0, 0, 378, 98, 1, 0, 0, 0, 379, 380, 5, 116, 0, 0, 380, 381, 5, 114, 0, 0, 381, 382, 5, 117, 0, 0, 382, 389, 5, 101, 0, 0, 383, 384, 5, 102, 0, 0, 384, 385, 5, 97, 0, 0, 385, 386, 5, 108, 0, 0, 386, 387, 5, 115, 0, 0, 387, 389, 5, 101, 0, 0, 388, 379, 1, 0, 0, 0, 388, 383, 1, 0, 0, 0, 389, 100, 1, 0, 0, 0, 390, 391, 5, 110, 0, 0, 391, 392, 5, 117, 0, 0, 392, 393, 5, 108, 0, 0, 393, 394, 5, 108, 0, 0, 394, 102, 1, 0, 0, 0, 395, 396, 7, 1, 0, 0, 396, 104, 1, 0, 0, 0, 397, 398, 7, 2, 0, 0, 398, 106, 1, 0, 0, 0, 399, 403, 3, 103, 51, 0, 400, 403, 3, 105, 52, 0, 401, 403, 7, 3, 0, 0, 402, 399, 1, 0, 0, 0, 402, 400, 1, 0, 0, 0, 402, 401, 1, 0, 0, 0, 403, 108, 1, 0, 0, 0, 404, 408, 3, 103, 51, 0, 405, 407, 3, 107, 53, 0, 406, 405, 1, 0, 0, 0, 407, 410, 1, 0, 0, 0, 408, 406, 1, 0, 0, 0, 408, 409, 1, 0, 0, 0, 409, 110, 1, 0, 0, 0, 410, 408, 1, 0, 0, 0, 411, 413, 7, 4, 0, 0, 412, 411, 1, 0, 0, 0, 413, 414, 1, 0, 0, 0, 414, 412, 1, 0, 0, 0, 414, 415, 1, 0, 0, 0, 415, 416, 1, 0, 0, 0, 416, 417, 6, 55, 0, 0, 417, 112, 1, 0, 0, 0, 418, 419, 5, 47, 0, 0, 419, 420, 5, 47, 0, 0, 420, 424, 1, 0, 0, 0, 421, 423, 8, 0, 0, 0, 422, 421, 1, 0, 0, 0, 423, 426, 1, 0, 0, 0, 424, 422, 1, 0, 0, 0, 424, 425, 1, 0, 0, 0, 425, 427, 1, 0, 0, 0, 426, 424, 1, 0, 0, 0, 427, 428, 6, 56, 0, 0, 428, 114, 1, 0, 0, 0, 429, 430, 5, 47, 0, 0, 430, 431, 5, 42, 0, 0, 431, 435, 1, 0, 0, 0, 432, 434, 9, 0, 0, 0, 433, 432, 1, 0, 0, 0, 434, 437, 1, 0, 0, 0, 435, 436, 1, 0, 0, 0, 435, 433, 1, 0, 0, 0, 436, 438, 1, 0, 0, 0, 437, 435, 1, 0, 0, 0, 438, 439, 5, 42, 0, 0, 439, 440, 5, 47, 0, 0, 440, 441, 1, 0, 0, 0, 441, 442, 6, 57, 0, 0, 442, 116, 1, 0, 0, 0, 15, 0, 185, 229, 233, 241, 245, 366, 372, 377, 388, 402, 408, 414, 424, 435, 1, 6, 0, 0]
\ No newline at end of file
diff --git a/src/main/java/parser/generated/SimpleJavaLexer.java b/src/main/java/parser/generated/SimpleJavaLexer.java
new file mode 100644
index 0000000..116ed8e
--- /dev/null
+++ b/src/main/java/parser/generated/SimpleJavaLexer.java
@@ -0,0 +1,417 @@
+// Generated from C:/Users/Maxi/Documents/DHBW/Compilerbau/NichtHaskell2.0/src/main/java/parser/grammar/SimpleJava.g4 by ANTLR 4.13.1
+package parser.generated;
+import org.antlr.v4.runtime.Lexer;
+import org.antlr.v4.runtime.CharStream;
+import org.antlr.v4.runtime.Token;
+import org.antlr.v4.runtime.TokenStream;
+import org.antlr.v4.runtime.*;
+import org.antlr.v4.runtime.atn.*;
+import org.antlr.v4.runtime.dfa.DFA;
+import org.antlr.v4.runtime.misc.*;
+
+@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast", "CheckReturnValue", "this-escape"})
+public class SimpleJavaLexer extends Lexer {
+ static { RuntimeMetaData.checkVersion("4.13.1", RuntimeMetaData.VERSION); }
+
+ protected static final DFA[] _decisionToDFA;
+ protected static final PredictionContextCache _sharedContextCache =
+ new PredictionContextCache();
+ public static final int
+ T__0=1, T__1=2, Void=3, Boolean=4, Char=5, Int=6, AccessModifier=7, MainMethodDeclaration=8,
+ DotOperator=9, LineOperator=10, ComparisonOperator=11, LogicalOperator=12,
+ Assign=13, Plus=14, Minus=15, Mult=16, Modulo=17, Div=18, Greater=19,
+ Less=20, GreaterEqual=21, LessEqual=22, Equal=23, NotEqual=24, Not=25,
+ And=26, Or=27, Dot=28, OpenRoundBracket=29, ClosedRoundBracket=30, OpenCurlyBracket=31,
+ ClosedCurlyBracket=32, Semicolon=33, Comma=34, Class=35, This=36, While=37,
+ Do=38, If=39, Else=40, For=41, Return=42, New=43, Switch=44, Case=45,
+ Default=46, Colon=47, CharValue=48, IntValue=49, BooleanValue=50, NullValue=51,
+ Identifier=52, WS=53, InlineComment=54, MultilineComment=55;
+ public static String[] channelNames = {
+ "DEFAULT_TOKEN_CHANNEL", "HIDDEN"
+ };
+
+ public static String[] modeNames = {
+ "DEFAULT_MODE"
+ };
+
+ private static String[] makeRuleNames() {
+ return new String[] {
+ "T__0", "T__1", "Void", "Boolean", "Char", "Int", "AccessModifier", "MainMethodDeclaration",
+ "DotOperator", "LineOperator", "ComparisonOperator", "LogicalOperator",
+ "Assign", "Plus", "Minus", "Mult", "Modulo", "Div", "Greater", "Less",
+ "GreaterEqual", "LessEqual", "Equal", "NotEqual", "Not", "And", "Or",
+ "Dot", "OpenRoundBracket", "ClosedRoundBracket", "OpenCurlyBracket",
+ "ClosedCurlyBracket", "Semicolon", "Comma", "Class", "This", "While",
+ "Do", "If", "Else", "For", "Return", "New", "Switch", "Case", "Default",
+ "Colon", "CharValue", "IntValue", "BooleanValue", "NullValue", "Alphabetic",
+ "Numeric", "ValidIdentSymbols", "Identifier", "WS", "InlineComment",
+ "MultilineComment"
+ };
+ }
+ public static final String[] ruleNames = makeRuleNames();
+
+ private static String[] makeLiteralNames() {
+ return new String[] {
+ null, "'++'", "'--'", "'void'", "'boolean'", "'char'", "'int'", null,
+ "'public static void main(String[] args)'", null, null, null, null, "'='",
+ "'+'", "'-'", "'*'", "'%'", "'/'", "'>'", "'<'", "'>='", "'<='", "'=='",
+ "'!='", "'!'", "'&&'", "'||'", "'.'", "'('", "')'", "'{'", "'}'", "';'",
+ "','", "'class'", "'this'", "'while'", "'do'", "'if'", "'else'", "'for'",
+ "'return'", "'new'", "'switch'", "'case'", "'default'", "':'", null,
+ null, null, "'null'"
+ };
+ }
+ private static final String[] _LITERAL_NAMES = makeLiteralNames();
+ private static String[] makeSymbolicNames() {
+ return new String[] {
+ null, null, null, "Void", "Boolean", "Char", "Int", "AccessModifier",
+ "MainMethodDeclaration", "DotOperator", "LineOperator", "ComparisonOperator",
+ "LogicalOperator", "Assign", "Plus", "Minus", "Mult", "Modulo", "Div",
+ "Greater", "Less", "GreaterEqual", "LessEqual", "Equal", "NotEqual",
+ "Not", "And", "Or", "Dot", "OpenRoundBracket", "ClosedRoundBracket",
+ "OpenCurlyBracket", "ClosedCurlyBracket", "Semicolon", "Comma", "Class",
+ "This", "While", "Do", "If", "Else", "For", "Return", "New", "Switch",
+ "Case", "Default", "Colon", "CharValue", "IntValue", "BooleanValue",
+ "NullValue", "Identifier", "WS", "InlineComment", "MultilineComment"
+ };
+ }
+ private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames();
+ public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
+
+ /**
+ * @deprecated Use {@link #VOCABULARY} instead.
+ */
+ @Deprecated
+ public static final String[] tokenNames;
+ static {
+ tokenNames = new String[_SYMBOLIC_NAMES.length];
+ for (int i = 0; i < tokenNames.length; i++) {
+ tokenNames[i] = VOCABULARY.getLiteralName(i);
+ if (tokenNames[i] == null) {
+ tokenNames[i] = VOCABULARY.getSymbolicName(i);
+ }
+
+ if (tokenNames[i] == null) {
+ tokenNames[i] = "";
+ }
+ }
+ }
+
+ @Override
+ @Deprecated
+ public String[] getTokenNames() {
+ return tokenNames;
+ }
+
+ @Override
+
+ public Vocabulary getVocabulary() {
+ return VOCABULARY;
+ }
+
+
+ public SimpleJavaLexer(CharStream input) {
+ super(input);
+ _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
+ }
+
+ @Override
+ public String getGrammarFileName() { return "SimpleJava.g4"; }
+
+ @Override
+ public String[] getRuleNames() { return ruleNames; }
+
+ @Override
+ public String getSerializedATN() { return _serializedATN; }
+
+ @Override
+ public String[] getChannelNames() { return channelNames; }
+
+ @Override
+ public String[] getModeNames() { return modeNames; }
+
+ @Override
+ public ATN getATN() { return _ATN; }
+
+ public static final String _serializedATN =
+ "\u0004\u00007\u01bb\u0006\uffff\uffff\u0002\u0000\u0007\u0000\u0002\u0001"+
+ "\u0007\u0001\u0002\u0002\u0007\u0002\u0002\u0003\u0007\u0003\u0002\u0004"+
+ "\u0007\u0004\u0002\u0005\u0007\u0005\u0002\u0006\u0007\u0006\u0002\u0007"+
+ "\u0007\u0007\u0002\b\u0007\b\u0002\t\u0007\t\u0002\n\u0007\n\u0002\u000b"+
+ "\u0007\u000b\u0002\f\u0007\f\u0002\r\u0007\r\u0002\u000e\u0007\u000e\u0002"+
+ "\u000f\u0007\u000f\u0002\u0010\u0007\u0010\u0002\u0011\u0007\u0011\u0002"+
+ "\u0012\u0007\u0012\u0002\u0013\u0007\u0013\u0002\u0014\u0007\u0014\u0002"+
+ "\u0015\u0007\u0015\u0002\u0016\u0007\u0016\u0002\u0017\u0007\u0017\u0002"+
+ "\u0018\u0007\u0018\u0002\u0019\u0007\u0019\u0002\u001a\u0007\u001a\u0002"+
+ "\u001b\u0007\u001b\u0002\u001c\u0007\u001c\u0002\u001d\u0007\u001d\u0002"+
+ "\u001e\u0007\u001e\u0002\u001f\u0007\u001f\u0002 \u0007 \u0002!\u0007"+
+ "!\u0002\"\u0007\"\u0002#\u0007#\u0002$\u0007$\u0002%\u0007%\u0002&\u0007"+
+ "&\u0002\'\u0007\'\u0002(\u0007(\u0002)\u0007)\u0002*\u0007*\u0002+\u0007"+
+ "+\u0002,\u0007,\u0002-\u0007-\u0002.\u0007.\u0002/\u0007/\u00020\u0007"+
+ "0\u00021\u00071\u00022\u00072\u00023\u00073\u00024\u00074\u00025\u0007"+
+ "5\u00026\u00076\u00027\u00077\u00028\u00078\u00029\u00079\u0001\u0000"+
+ "\u0001\u0000\u0001\u0000\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0002"+
+ "\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0003\u0001\u0003"+
+ "\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003"+
+ "\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0005"+
+ "\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0006\u0001\u0006\u0001\u0006"+
+ "\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006"+
+ "\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006"+
+ "\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006"+
+ "\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006"+
+ "\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006"+
+ "\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006"+
+ "\u0001\u0006\u0003\u0006\u00ba\b\u0006\u0001\u0007\u0001\u0007\u0001\u0007"+
+ "\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007"+
+ "\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007"+
+ "\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007"+
+ "\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007"+
+ "\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007"+
+ "\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007"+
+ "\u0001\b\u0001\b\u0001\b\u0003\b\u00e6\b\b\u0001\t\u0001\t\u0003\t\u00ea"+
+ "\b\t\u0001\n\u0001\n\u0001\n\u0001\n\u0001\n\u0001\n\u0003\n\u00f2\b\n"+
+ "\u0001\u000b\u0001\u000b\u0003\u000b\u00f6\b\u000b\u0001\f\u0001\f\u0001"+
+ "\r\u0001\r\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\u0014\u0001\u0015\u0001\u0015"+
+ "\u0001\u0015\u0001\u0016\u0001\u0016\u0001\u0016\u0001\u0017\u0001\u0017"+
+ "\u0001\u0017\u0001\u0018\u0001\u0018\u0001\u0019\u0001\u0019\u0001\u0019"+
+ "\u0001\u001a\u0001\u001a\u0001\u001a\u0001\u001b\u0001\u001b\u0001\u001c"+
+ "\u0001\u001c\u0001\u001d\u0001\u001d\u0001\u001e\u0001\u001e\u0001\u001f"+
+ "\u0001\u001f\u0001 \u0001 \u0001!\u0001!\u0001\"\u0001\"\u0001\"\u0001"+
+ "\"\u0001\"\u0001\"\u0001#\u0001#\u0001#\u0001#\u0001#\u0001$\u0001$\u0001"+
+ "$\u0001$\u0001$\u0001$\u0001%\u0001%\u0001%\u0001&\u0001&\u0001&\u0001"+
+ "\'\u0001\'\u0001\'\u0001\'\u0001\'\u0001(\u0001(\u0001(\u0001(\u0001)"+
+ "\u0001)\u0001)\u0001)\u0001)\u0001)\u0001)\u0001*\u0001*\u0001*\u0001"+
+ "*\u0001+\u0001+\u0001+\u0001+\u0001+\u0001+\u0001+\u0001,\u0001,\u0001"+
+ ",\u0001,\u0001,\u0001-\u0001-\u0001-\u0001-\u0001-\u0001-\u0001-\u0001"+
+ "-\u0001.\u0001.\u0001/\u0001/\u0005/\u016d\b/\n/\f/\u0170\t/\u0001/\u0001"+
+ "/\u00010\u00030\u0175\b0\u00010\u00040\u0178\b0\u000b0\f0\u0179\u0001"+
+ "1\u00011\u00011\u00011\u00011\u00011\u00011\u00011\u00011\u00031\u0185"+
+ "\b1\u00012\u00012\u00012\u00012\u00012\u00013\u00013\u00014\u00014\u0001"+
+ "5\u00015\u00015\u00035\u0193\b5\u00016\u00016\u00056\u0197\b6\n6\f6\u019a"+
+ "\t6\u00017\u00047\u019d\b7\u000b7\f7\u019e\u00017\u00017\u00018\u0001"+
+ "8\u00018\u00018\u00058\u01a7\b8\n8\f8\u01aa\t8\u00018\u00018\u00019\u0001"+
+ "9\u00019\u00019\u00059\u01b2\b9\n9\f9\u01b5\t9\u00019\u00019\u00019\u0001"+
+ "9\u00019\u0001\u01b3\u0000:\u0001\u0001\u0003\u0002\u0005\u0003\u0007"+
+ "\u0004\t\u0005\u000b\u0006\r\u0007\u000f\b\u0011\t\u0013\n\u0015\u000b"+
+ "\u0017\f\u0019\r\u001b\u000e\u001d\u000f\u001f\u0010!\u0011#\u0012%\u0013"+
+ "\'\u0014)\u0015+\u0016-\u0017/\u00181\u00193\u001a5\u001b7\u001c9\u001d"+
+ ";\u001e=\u001f? A!C\"E#G$I%K&M\'O(Q)S*U+W,Y-[.]/_0a1c2e3g\u0000i\u0000"+
+ "k\u0000m4o5q6s7\u0001\u0000\u0005\u0002\u0000\n\n\r\r\u0002\u0000AZaz"+
+ "\u0001\u000009\u0002\u0000$$__\u0003\u0000\t\n\r\r \u01cd\u0000\u0001"+
+ "\u0001\u0000\u0000\u0000\u0000\u0003\u0001\u0000\u0000\u0000\u0000\u0005"+
+ "\u0001\u0000\u0000\u0000\u0000\u0007\u0001\u0000\u0000\u0000\u0000\t\u0001"+
+ "\u0000\u0000\u0000\u0000\u000b\u0001\u0000\u0000\u0000\u0000\r\u0001\u0000"+
+ "\u0000\u0000\u0000\u000f\u0001\u0000\u0000\u0000\u0000\u0011\u0001\u0000"+
+ "\u0000\u0000\u0000\u0013\u0001\u0000\u0000\u0000\u0000\u0015\u0001\u0000"+
+ "\u0000\u0000\u0000\u0017\u0001\u0000\u0000\u0000\u0000\u0019\u0001\u0000"+
+ "\u0000\u0000\u0000\u001b\u0001\u0000\u0000\u0000\u0000\u001d\u0001\u0000"+
+ "\u0000\u0000\u0000\u001f\u0001\u0000\u0000\u0000\u0000!\u0001\u0000\u0000"+
+ "\u0000\u0000#\u0001\u0000\u0000\u0000\u0000%\u0001\u0000\u0000\u0000\u0000"+
+ "\'\u0001\u0000\u0000\u0000\u0000)\u0001\u0000\u0000\u0000\u0000+\u0001"+
+ "\u0000\u0000\u0000\u0000-\u0001\u0000\u0000\u0000\u0000/\u0001\u0000\u0000"+
+ "\u0000\u00001\u0001\u0000\u0000\u0000\u00003\u0001\u0000\u0000\u0000\u0000"+
+ "5\u0001\u0000\u0000\u0000\u00007\u0001\u0000\u0000\u0000\u00009\u0001"+
+ "\u0000\u0000\u0000\u0000;\u0001\u0000\u0000\u0000\u0000=\u0001\u0000\u0000"+
+ "\u0000\u0000?\u0001\u0000\u0000\u0000\u0000A\u0001\u0000\u0000\u0000\u0000"+
+ "C\u0001\u0000\u0000\u0000\u0000E\u0001\u0000\u0000\u0000\u0000G\u0001"+
+ "\u0000\u0000\u0000\u0000I\u0001\u0000\u0000\u0000\u0000K\u0001\u0000\u0000"+
+ "\u0000\u0000M\u0001\u0000\u0000\u0000\u0000O\u0001\u0000\u0000\u0000\u0000"+
+ "Q\u0001\u0000\u0000\u0000\u0000S\u0001\u0000\u0000\u0000\u0000U\u0001"+
+ "\u0000\u0000\u0000\u0000W\u0001\u0000\u0000\u0000\u0000Y\u0001\u0000\u0000"+
+ "\u0000\u0000[\u0001\u0000\u0000\u0000\u0000]\u0001\u0000\u0000\u0000\u0000"+
+ "_\u0001\u0000\u0000\u0000\u0000a\u0001\u0000\u0000\u0000\u0000c\u0001"+
+ "\u0000\u0000\u0000\u0000e\u0001\u0000\u0000\u0000\u0000m\u0001\u0000\u0000"+
+ "\u0000\u0000o\u0001\u0000\u0000\u0000\u0000q\u0001\u0000\u0000\u0000\u0000"+
+ "s\u0001\u0000\u0000\u0000\u0001u\u0001\u0000\u0000\u0000\u0003x\u0001"+
+ "\u0000\u0000\u0000\u0005{\u0001\u0000\u0000\u0000\u0007\u0080\u0001\u0000"+
+ "\u0000\u0000\t\u0088\u0001\u0000\u0000\u0000\u000b\u008d\u0001\u0000\u0000"+
+ "\u0000\r\u00b9\u0001\u0000\u0000\u0000\u000f\u00bb\u0001\u0000\u0000\u0000"+
+ "\u0011\u00e5\u0001\u0000\u0000\u0000\u0013\u00e9\u0001\u0000\u0000\u0000"+
+ "\u0015\u00f1\u0001\u0000\u0000\u0000\u0017\u00f5\u0001\u0000\u0000\u0000"+
+ "\u0019\u00f7\u0001\u0000\u0000\u0000\u001b\u00f9\u0001\u0000\u0000\u0000"+
+ "\u001d\u00fb\u0001\u0000\u0000\u0000\u001f\u00fd\u0001\u0000\u0000\u0000"+
+ "!\u00ff\u0001\u0000\u0000\u0000#\u0101\u0001\u0000\u0000\u0000%\u0103"+
+ "\u0001\u0000\u0000\u0000\'\u0105\u0001\u0000\u0000\u0000)\u0107\u0001"+
+ "\u0000\u0000\u0000+\u010a\u0001\u0000\u0000\u0000-\u010d\u0001\u0000\u0000"+
+ "\u0000/\u0110\u0001\u0000\u0000\u00001\u0113\u0001\u0000\u0000\u00003"+
+ "\u0115\u0001\u0000\u0000\u00005\u0118\u0001\u0000\u0000\u00007\u011b\u0001"+
+ "\u0000\u0000\u00009\u011d\u0001\u0000\u0000\u0000;\u011f\u0001\u0000\u0000"+
+ "\u0000=\u0121\u0001\u0000\u0000\u0000?\u0123\u0001\u0000\u0000\u0000A"+
+ "\u0125\u0001\u0000\u0000\u0000C\u0127\u0001\u0000\u0000\u0000E\u0129\u0001"+
+ "\u0000\u0000\u0000G\u012f\u0001\u0000\u0000\u0000I\u0134\u0001\u0000\u0000"+
+ "\u0000K\u013a\u0001\u0000\u0000\u0000M\u013d\u0001\u0000\u0000\u0000O"+
+ "\u0140\u0001\u0000\u0000\u0000Q\u0145\u0001\u0000\u0000\u0000S\u0149\u0001"+
+ "\u0000\u0000\u0000U\u0150\u0001\u0000\u0000\u0000W\u0154\u0001\u0000\u0000"+
+ "\u0000Y\u015b\u0001\u0000\u0000\u0000[\u0160\u0001\u0000\u0000\u0000]"+
+ "\u0168\u0001\u0000\u0000\u0000_\u016a\u0001\u0000\u0000\u0000a\u0174\u0001"+
+ "\u0000\u0000\u0000c\u0184\u0001\u0000\u0000\u0000e\u0186\u0001\u0000\u0000"+
+ "\u0000g\u018b\u0001\u0000\u0000\u0000i\u018d\u0001\u0000\u0000\u0000k"+
+ "\u0192\u0001\u0000\u0000\u0000m\u0194\u0001\u0000\u0000\u0000o\u019c\u0001"+
+ "\u0000\u0000\u0000q\u01a2\u0001\u0000\u0000\u0000s\u01ad\u0001\u0000\u0000"+
+ "\u0000uv\u0005+\u0000\u0000vw\u0005+\u0000\u0000w\u0002\u0001\u0000\u0000"+
+ "\u0000xy\u0005-\u0000\u0000yz\u0005-\u0000\u0000z\u0004\u0001\u0000\u0000"+
+ "\u0000{|\u0005v\u0000\u0000|}\u0005o\u0000\u0000}~\u0005i\u0000\u0000"+
+ "~\u007f\u0005d\u0000\u0000\u007f\u0006\u0001\u0000\u0000\u0000\u0080\u0081"+
+ "\u0005b\u0000\u0000\u0081\u0082\u0005o\u0000\u0000\u0082\u0083\u0005o"+
+ "\u0000\u0000\u0083\u0084\u0005l\u0000\u0000\u0084\u0085\u0005e\u0000\u0000"+
+ "\u0085\u0086\u0005a\u0000\u0000\u0086\u0087\u0005n\u0000\u0000\u0087\b"+
+ "\u0001\u0000\u0000\u0000\u0088\u0089\u0005c\u0000\u0000\u0089\u008a\u0005"+
+ "h\u0000\u0000\u008a\u008b\u0005a\u0000\u0000\u008b\u008c\u0005r\u0000"+
+ "\u0000\u008c\n\u0001\u0000\u0000\u0000\u008d\u008e\u0005i\u0000\u0000"+
+ "\u008e\u008f\u0005n\u0000\u0000\u008f\u0090\u0005t\u0000\u0000\u0090\f"+
+ "\u0001\u0000\u0000\u0000\u0091\u0092\u0005p\u0000\u0000\u0092\u0093\u0005"+
+ "u\u0000\u0000\u0093\u0094\u0005b\u0000\u0000\u0094\u0095\u0005l\u0000"+
+ "\u0000\u0095\u0096\u0005i\u0000\u0000\u0096\u00ba\u0005c\u0000\u0000\u0097"+
+ "\u0098\u0005p\u0000\u0000\u0098\u0099\u0005r\u0000\u0000\u0099\u009a\u0005"+
+ "i\u0000\u0000\u009a\u009b\u0005v\u0000\u0000\u009b\u009c\u0005a\u0000"+
+ "\u0000\u009c\u009d\u0005t\u0000\u0000\u009d\u00ba\u0005e\u0000\u0000\u009e"+
+ "\u009f\u0005p\u0000\u0000\u009f\u00a0\u0005u\u0000\u0000\u00a0\u00a1\u0005"+
+ "b\u0000\u0000\u00a1\u00a2\u0005l\u0000\u0000\u00a2\u00a3\u0005i\u0000"+
+ "\u0000\u00a3\u00a4\u0005c\u0000\u0000\u00a4\u00a5\u0005 \u0000\u0000\u00a5"+
+ "\u00a6\u0005s\u0000\u0000\u00a6\u00a7\u0005t\u0000\u0000\u00a7\u00a8\u0005"+
+ "a\u0000\u0000\u00a8\u00a9\u0005t\u0000\u0000\u00a9\u00aa\u0005i\u0000"+
+ "\u0000\u00aa\u00ba\u0005c\u0000\u0000\u00ab\u00ac\u0005p\u0000\u0000\u00ac"+
+ "\u00ad\u0005r\u0000\u0000\u00ad\u00ae\u0005i\u0000\u0000\u00ae\u00af\u0005"+
+ "v\u0000\u0000\u00af\u00b0\u0005a\u0000\u0000\u00b0\u00b1\u0005t\u0000"+
+ "\u0000\u00b1\u00b2\u0005e\u0000\u0000\u00b2\u00b3\u0005 \u0000\u0000\u00b3"+
+ "\u00b4\u0005s\u0000\u0000\u00b4\u00b5\u0005t\u0000\u0000\u00b5\u00b6\u0005"+
+ "a\u0000\u0000\u00b6\u00b7\u0005t\u0000\u0000\u00b7\u00b8\u0005i\u0000"+
+ "\u0000\u00b8\u00ba\u0005c\u0000\u0000\u00b9\u0091\u0001\u0000\u0000\u0000"+
+ "\u00b9\u0097\u0001\u0000\u0000\u0000\u00b9\u009e\u0001\u0000\u0000\u0000"+
+ "\u00b9\u00ab\u0001\u0000\u0000\u0000\u00ba\u000e\u0001\u0000\u0000\u0000"+
+ "\u00bb\u00bc\u0005p\u0000\u0000\u00bc\u00bd\u0005u\u0000\u0000\u00bd\u00be"+
+ "\u0005b\u0000\u0000\u00be\u00bf\u0005l\u0000\u0000\u00bf\u00c0\u0005i"+
+ "\u0000\u0000\u00c0\u00c1\u0005c\u0000\u0000\u00c1\u00c2\u0005 \u0000\u0000"+
+ "\u00c2\u00c3\u0005s\u0000\u0000\u00c3\u00c4\u0005t\u0000\u0000\u00c4\u00c5"+
+ "\u0005a\u0000\u0000\u00c5\u00c6\u0005t\u0000\u0000\u00c6\u00c7\u0005i"+
+ "\u0000\u0000\u00c7\u00c8\u0005c\u0000\u0000\u00c8\u00c9\u0005 \u0000\u0000"+
+ "\u00c9\u00ca\u0005v\u0000\u0000\u00ca\u00cb\u0005o\u0000\u0000\u00cb\u00cc"+
+ "\u0005i\u0000\u0000\u00cc\u00cd\u0005d\u0000\u0000\u00cd\u00ce\u0005 "+
+ "\u0000\u0000\u00ce\u00cf\u0005m\u0000\u0000\u00cf\u00d0\u0005a\u0000\u0000"+
+ "\u00d0\u00d1\u0005i\u0000\u0000\u00d1\u00d2\u0005n\u0000\u0000\u00d2\u00d3"+
+ "\u0005(\u0000\u0000\u00d3\u00d4\u0005S\u0000\u0000\u00d4\u00d5\u0005t"+
+ "\u0000\u0000\u00d5\u00d6\u0005r\u0000\u0000\u00d6\u00d7\u0005i\u0000\u0000"+
+ "\u00d7\u00d8\u0005n\u0000\u0000\u00d8\u00d9\u0005g\u0000\u0000\u00d9\u00da"+
+ "\u0005[\u0000\u0000\u00da\u00db\u0005]\u0000\u0000\u00db\u00dc\u0005 "+
+ "\u0000\u0000\u00dc\u00dd\u0005a\u0000\u0000\u00dd\u00de\u0005r\u0000\u0000"+
+ "\u00de\u00df\u0005g\u0000\u0000\u00df\u00e0\u0005s\u0000\u0000\u00e0\u00e1"+
+ "\u0005)\u0000\u0000\u00e1\u0010\u0001\u0000\u0000\u0000\u00e2\u00e6\u0003"+
+ "\u001f\u000f\u0000\u00e3\u00e6\u0003#\u0011\u0000\u00e4\u00e6\u0003!\u0010"+
+ "\u0000\u00e5\u00e2\u0001\u0000\u0000\u0000\u00e5\u00e3\u0001\u0000\u0000"+
+ "\u0000\u00e5\u00e4\u0001\u0000\u0000\u0000\u00e6\u0012\u0001\u0000\u0000"+
+ "\u0000\u00e7\u00ea\u0003\u001b\r\u0000\u00e8\u00ea\u0003\u001d\u000e\u0000"+
+ "\u00e9\u00e7\u0001\u0000\u0000\u0000\u00e9\u00e8\u0001\u0000\u0000\u0000"+
+ "\u00ea\u0014\u0001\u0000\u0000\u0000\u00eb\u00f2\u0003%\u0012\u0000\u00ec"+
+ "\u00f2\u0003\'\u0013\u0000\u00ed\u00f2\u0003)\u0014\u0000\u00ee\u00f2"+
+ "\u0003+\u0015\u0000\u00ef\u00f2\u0003-\u0016\u0000\u00f0\u00f2\u0003/"+
+ "\u0017\u0000\u00f1\u00eb\u0001\u0000\u0000\u0000\u00f1\u00ec\u0001\u0000"+
+ "\u0000\u0000\u00f1\u00ed\u0001\u0000\u0000\u0000\u00f1\u00ee\u0001\u0000"+
+ "\u0000\u0000\u00f1\u00ef\u0001\u0000\u0000\u0000\u00f1\u00f0\u0001\u0000"+
+ "\u0000\u0000\u00f2\u0016\u0001\u0000\u0000\u0000\u00f3\u00f6\u00033\u0019"+
+ "\u0000\u00f4\u00f6\u00035\u001a\u0000\u00f5\u00f3\u0001\u0000\u0000\u0000"+
+ "\u00f5\u00f4\u0001\u0000\u0000\u0000\u00f6\u0018\u0001\u0000\u0000\u0000"+
+ "\u00f7\u00f8\u0005=\u0000\u0000\u00f8\u001a\u0001\u0000\u0000\u0000\u00f9"+
+ "\u00fa\u0005+\u0000\u0000\u00fa\u001c\u0001\u0000\u0000\u0000\u00fb\u00fc"+
+ "\u0005-\u0000\u0000\u00fc\u001e\u0001\u0000\u0000\u0000\u00fd\u00fe\u0005"+
+ "*\u0000\u0000\u00fe \u0001\u0000\u0000\u0000\u00ff\u0100\u0005%\u0000"+
+ "\u0000\u0100\"\u0001\u0000\u0000\u0000\u0101\u0102\u0005/\u0000\u0000"+
+ "\u0102$\u0001\u0000\u0000\u0000\u0103\u0104\u0005>\u0000\u0000\u0104&"+
+ "\u0001\u0000\u0000\u0000\u0105\u0106\u0005<\u0000\u0000\u0106(\u0001\u0000"+
+ "\u0000\u0000\u0107\u0108\u0005>\u0000\u0000\u0108\u0109\u0005=\u0000\u0000"+
+ "\u0109*\u0001\u0000\u0000\u0000\u010a\u010b\u0005<\u0000\u0000\u010b\u010c"+
+ "\u0005=\u0000\u0000\u010c,\u0001\u0000\u0000\u0000\u010d\u010e\u0005="+
+ "\u0000\u0000\u010e\u010f\u0005=\u0000\u0000\u010f.\u0001\u0000\u0000\u0000"+
+ "\u0110\u0111\u0005!\u0000\u0000\u0111\u0112\u0005=\u0000\u0000\u01120"+
+ "\u0001\u0000\u0000\u0000\u0113\u0114\u0005!\u0000\u0000\u01142\u0001\u0000"+
+ "\u0000\u0000\u0115\u0116\u0005&\u0000\u0000\u0116\u0117\u0005&\u0000\u0000"+
+ "\u01174\u0001\u0000\u0000\u0000\u0118\u0119\u0005|\u0000\u0000\u0119\u011a"+
+ "\u0005|\u0000\u0000\u011a6\u0001\u0000\u0000\u0000\u011b\u011c\u0005."+
+ "\u0000\u0000\u011c8\u0001\u0000\u0000\u0000\u011d\u011e\u0005(\u0000\u0000"+
+ "\u011e:\u0001\u0000\u0000\u0000\u011f\u0120\u0005)\u0000\u0000\u0120<"+
+ "\u0001\u0000\u0000\u0000\u0121\u0122\u0005{\u0000\u0000\u0122>\u0001\u0000"+
+ "\u0000\u0000\u0123\u0124\u0005}\u0000\u0000\u0124@\u0001\u0000\u0000\u0000"+
+ "\u0125\u0126\u0005;\u0000\u0000\u0126B\u0001\u0000\u0000\u0000\u0127\u0128"+
+ "\u0005,\u0000\u0000\u0128D\u0001\u0000\u0000\u0000\u0129\u012a\u0005c"+
+ "\u0000\u0000\u012a\u012b\u0005l\u0000\u0000\u012b\u012c\u0005a\u0000\u0000"+
+ "\u012c\u012d\u0005s\u0000\u0000\u012d\u012e\u0005s\u0000\u0000\u012eF"+
+ "\u0001\u0000\u0000\u0000\u012f\u0130\u0005t\u0000\u0000\u0130\u0131\u0005"+
+ "h\u0000\u0000\u0131\u0132\u0005i\u0000\u0000\u0132\u0133\u0005s\u0000"+
+ "\u0000\u0133H\u0001\u0000\u0000\u0000\u0134\u0135\u0005w\u0000\u0000\u0135"+
+ "\u0136\u0005h\u0000\u0000\u0136\u0137\u0005i\u0000\u0000\u0137\u0138\u0005"+
+ "l\u0000\u0000\u0138\u0139\u0005e\u0000\u0000\u0139J\u0001\u0000\u0000"+
+ "\u0000\u013a\u013b\u0005d\u0000\u0000\u013b\u013c\u0005o\u0000\u0000\u013c"+
+ "L\u0001\u0000\u0000\u0000\u013d\u013e\u0005i\u0000\u0000\u013e\u013f\u0005"+
+ "f\u0000\u0000\u013fN\u0001\u0000\u0000\u0000\u0140\u0141\u0005e\u0000"+
+ "\u0000\u0141\u0142\u0005l\u0000\u0000\u0142\u0143\u0005s\u0000\u0000\u0143"+
+ "\u0144\u0005e\u0000\u0000\u0144P\u0001\u0000\u0000\u0000\u0145\u0146\u0005"+
+ "f\u0000\u0000\u0146\u0147\u0005o\u0000\u0000\u0147\u0148\u0005r\u0000"+
+ "\u0000\u0148R\u0001\u0000\u0000\u0000\u0149\u014a\u0005r\u0000\u0000\u014a"+
+ "\u014b\u0005e\u0000\u0000\u014b\u014c\u0005t\u0000\u0000\u014c\u014d\u0005"+
+ "u\u0000\u0000\u014d\u014e\u0005r\u0000\u0000\u014e\u014f\u0005n\u0000"+
+ "\u0000\u014fT\u0001\u0000\u0000\u0000\u0150\u0151\u0005n\u0000\u0000\u0151"+
+ "\u0152\u0005e\u0000\u0000\u0152\u0153\u0005w\u0000\u0000\u0153V\u0001"+
+ "\u0000\u0000\u0000\u0154\u0155\u0005s\u0000\u0000\u0155\u0156\u0005w\u0000"+
+ "\u0000\u0156\u0157\u0005i\u0000\u0000\u0157\u0158\u0005t\u0000\u0000\u0158"+
+ "\u0159\u0005c\u0000\u0000\u0159\u015a\u0005h\u0000\u0000\u015aX\u0001"+
+ "\u0000\u0000\u0000\u015b\u015c\u0005c\u0000\u0000\u015c\u015d\u0005a\u0000"+
+ "\u0000\u015d\u015e\u0005s\u0000\u0000\u015e\u015f\u0005e\u0000\u0000\u015f"+
+ "Z\u0001\u0000\u0000\u0000\u0160\u0161\u0005d\u0000\u0000\u0161\u0162\u0005"+
+ "e\u0000\u0000\u0162\u0163\u0005f\u0000\u0000\u0163\u0164\u0005a\u0000"+
+ "\u0000\u0164\u0165\u0005u\u0000\u0000\u0165\u0166\u0005l\u0000\u0000\u0166"+
+ "\u0167\u0005t\u0000\u0000\u0167\\\u0001\u0000\u0000\u0000\u0168\u0169"+
+ "\u0005:\u0000\u0000\u0169^\u0001\u0000\u0000\u0000\u016a\u016e\u0005\'"+
+ "\u0000\u0000\u016b\u016d\b\u0000\u0000\u0000\u016c\u016b\u0001\u0000\u0000"+
+ "\u0000\u016d\u0170\u0001\u0000\u0000\u0000\u016e\u016c\u0001\u0000\u0000"+
+ "\u0000\u016e\u016f\u0001\u0000\u0000\u0000\u016f\u0171\u0001\u0000\u0000"+
+ "\u0000\u0170\u016e\u0001\u0000\u0000\u0000\u0171\u0172\u0005\'\u0000\u0000"+
+ "\u0172`\u0001\u0000\u0000\u0000\u0173\u0175\u0003\u001d\u000e\u0000\u0174"+
+ "\u0173\u0001\u0000\u0000\u0000\u0174\u0175\u0001\u0000\u0000\u0000\u0175"+
+ "\u0177\u0001\u0000\u0000\u0000\u0176\u0178\u0003i4\u0000\u0177\u0176\u0001"+
+ "\u0000\u0000\u0000\u0178\u0179\u0001\u0000\u0000\u0000\u0179\u0177\u0001"+
+ "\u0000\u0000\u0000\u0179\u017a\u0001\u0000\u0000\u0000\u017ab\u0001\u0000"+
+ "\u0000\u0000\u017b\u017c\u0005t\u0000\u0000\u017c\u017d\u0005r\u0000\u0000"+
+ "\u017d\u017e\u0005u\u0000\u0000\u017e\u0185\u0005e\u0000\u0000\u017f\u0180"+
+ "\u0005f\u0000\u0000\u0180\u0181\u0005a\u0000\u0000\u0181\u0182\u0005l"+
+ "\u0000\u0000\u0182\u0183\u0005s\u0000\u0000\u0183\u0185\u0005e\u0000\u0000"+
+ "\u0184\u017b\u0001\u0000\u0000\u0000\u0184\u017f\u0001\u0000\u0000\u0000"+
+ "\u0185d\u0001\u0000\u0000\u0000\u0186\u0187\u0005n\u0000\u0000\u0187\u0188"+
+ "\u0005u\u0000\u0000\u0188\u0189\u0005l\u0000\u0000\u0189\u018a\u0005l"+
+ "\u0000\u0000\u018af\u0001\u0000\u0000\u0000\u018b\u018c\u0007\u0001\u0000"+
+ "\u0000\u018ch\u0001\u0000\u0000\u0000\u018d\u018e\u0007\u0002\u0000\u0000"+
+ "\u018ej\u0001\u0000\u0000\u0000\u018f\u0193\u0003g3\u0000\u0190\u0193"+
+ "\u0003i4\u0000\u0191\u0193\u0007\u0003\u0000\u0000\u0192\u018f\u0001\u0000"+
+ "\u0000\u0000\u0192\u0190\u0001\u0000\u0000\u0000\u0192\u0191\u0001\u0000"+
+ "\u0000\u0000\u0193l\u0001\u0000\u0000\u0000\u0194\u0198\u0003g3\u0000"+
+ "\u0195\u0197\u0003k5\u0000\u0196\u0195\u0001\u0000\u0000\u0000\u0197\u019a"+
+ "\u0001\u0000\u0000\u0000\u0198\u0196\u0001\u0000\u0000\u0000\u0198\u0199"+
+ "\u0001\u0000\u0000\u0000\u0199n\u0001\u0000\u0000\u0000\u019a\u0198\u0001"+
+ "\u0000\u0000\u0000\u019b\u019d\u0007\u0004\u0000\u0000\u019c\u019b\u0001"+
+ "\u0000\u0000\u0000\u019d\u019e\u0001\u0000\u0000\u0000\u019e\u019c\u0001"+
+ "\u0000\u0000\u0000\u019e\u019f\u0001\u0000\u0000\u0000\u019f\u01a0\u0001"+
+ "\u0000\u0000\u0000\u01a0\u01a1\u00067\u0000\u0000\u01a1p\u0001\u0000\u0000"+
+ "\u0000\u01a2\u01a3\u0005/\u0000\u0000\u01a3\u01a4\u0005/\u0000\u0000\u01a4"+
+ "\u01a8\u0001\u0000\u0000\u0000\u01a5\u01a7\b\u0000\u0000\u0000\u01a6\u01a5"+
+ "\u0001\u0000\u0000\u0000\u01a7\u01aa\u0001\u0000\u0000\u0000\u01a8\u01a6"+
+ "\u0001\u0000\u0000\u0000\u01a8\u01a9\u0001\u0000\u0000\u0000\u01a9\u01ab"+
+ "\u0001\u0000\u0000\u0000\u01aa\u01a8\u0001\u0000\u0000\u0000\u01ab\u01ac"+
+ "\u00068\u0000\u0000\u01acr\u0001\u0000\u0000\u0000\u01ad\u01ae\u0005/"+
+ "\u0000\u0000\u01ae\u01af\u0005*\u0000\u0000\u01af\u01b3\u0001\u0000\u0000"+
+ "\u0000\u01b0\u01b2\t\u0000\u0000\u0000\u01b1\u01b0\u0001\u0000\u0000\u0000"+
+ "\u01b2\u01b5\u0001\u0000\u0000\u0000\u01b3\u01b4\u0001\u0000\u0000\u0000"+
+ "\u01b3\u01b1\u0001\u0000\u0000\u0000\u01b4\u01b6\u0001\u0000\u0000\u0000"+
+ "\u01b5\u01b3\u0001\u0000\u0000\u0000\u01b6\u01b7\u0005*\u0000\u0000\u01b7"+
+ "\u01b8\u0005/\u0000\u0000\u01b8\u01b9\u0001\u0000\u0000\u0000\u01b9\u01ba"+
+ "\u00069\u0000\u0000\u01bat\u0001\u0000\u0000\u0000\u000f\u0000\u00b9\u00e5"+
+ "\u00e9\u00f1\u00f5\u016e\u0174\u0179\u0184\u0192\u0198\u019e\u01a8\u01b3"+
+ "\u0001\u0006\u0000\u0000";
+ public static final ATN _ATN =
+ new ATNDeserializer().deserialize(_serializedATN.toCharArray());
+ static {
+ _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()];
+ for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) {
+ _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/parser/generated/SimpleJavaLexer.tokens b/src/main/java/parser/generated/SimpleJavaLexer.tokens
new file mode 100644
index 0000000..ffe0902
--- /dev/null
+++ b/src/main/java/parser/generated/SimpleJavaLexer.tokens
@@ -0,0 +1,98 @@
+T__0=1
+T__1=2
+Void=3
+Boolean=4
+Char=5
+Int=6
+AccessModifier=7
+MainMethodDeclaration=8
+DotOperator=9
+LineOperator=10
+ComparisonOperator=11
+LogicalOperator=12
+Assign=13
+Plus=14
+Minus=15
+Mult=16
+Modulo=17
+Div=18
+Greater=19
+Less=20
+GreaterEqual=21
+LessEqual=22
+Equal=23
+NotEqual=24
+Not=25
+And=26
+Or=27
+Dot=28
+OpenRoundBracket=29
+ClosedRoundBracket=30
+OpenCurlyBracket=31
+ClosedCurlyBracket=32
+Semicolon=33
+Comma=34
+Class=35
+This=36
+While=37
+Do=38
+If=39
+Else=40
+For=41
+Return=42
+New=43
+Switch=44
+Case=45
+Default=46
+Colon=47
+CharValue=48
+IntValue=49
+BooleanValue=50
+NullValue=51
+Identifier=52
+WS=53
+InlineComment=54
+MultilineComment=55
+'++'=1
+'--'=2
+'void'=3
+'boolean'=4
+'char'=5
+'int'=6
+'public static void main(String[] args)'=8
+'='=13
+'+'=14
+'-'=15
+'*'=16
+'%'=17
+'/'=18
+'>'=19
+'<'=20
+'>='=21
+'<='=22
+'=='=23
+'!='=24
+'!'=25
+'&&'=26
+'||'=27
+'.'=28
+'('=29
+')'=30
+'{'=31
+'}'=32
+';'=33
+','=34
+'class'=35
+'this'=36
+'while'=37
+'do'=38
+'if'=39
+'else'=40
+'for'=41
+'return'=42
+'new'=43
+'switch'=44
+'case'=45
+'default'=46
+':'=47
+'null'=51
diff --git a/src/main/java/parser/generated/SimpleJavaListener.java b/src/main/java/parser/generated/SimpleJavaListener.java
new file mode 100644
index 0000000..e352191
--- /dev/null
+++ b/src/main/java/parser/generated/SimpleJavaListener.java
@@ -0,0 +1,500 @@
+// Generated from C:/Users/Maxi/Documents/DHBW/Compilerbau/NichtHaskell2.0/src/main/java/parser/grammar/SimpleJava.g4 by ANTLR 4.13.1
+package parser.generated;
+import org.antlr.v4.runtime.tree.ParseTreeListener;
+
+/**
+ * This interface defines a complete listener for a parse tree produced by
+ * {@link SimpleJavaParser}.
+ */
+public interface SimpleJavaListener extends ParseTreeListener {
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#program}.
+ * @param ctx the parse tree
+ */
+ void enterProgram(SimpleJavaParser.ProgramContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#program}.
+ * @param ctx the parse tree
+ */
+ void exitProgram(SimpleJavaParser.ProgramContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#classDeclaration}.
+ * @param ctx the parse tree
+ */
+ void enterClassDeclaration(SimpleJavaParser.ClassDeclarationContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#classDeclaration}.
+ * @param ctx the parse tree
+ */
+ void exitClassDeclaration(SimpleJavaParser.ClassDeclarationContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#memberDeclaration}.
+ * @param ctx the parse tree
+ */
+ void enterMemberDeclaration(SimpleJavaParser.MemberDeclarationContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#memberDeclaration}.
+ * @param ctx the parse tree
+ */
+ void exitMemberDeclaration(SimpleJavaParser.MemberDeclarationContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#constructorDeclaration}.
+ * @param ctx the parse tree
+ */
+ void enterConstructorDeclaration(SimpleJavaParser.ConstructorDeclarationContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#constructorDeclaration}.
+ * @param ctx the parse tree
+ */
+ void exitConstructorDeclaration(SimpleJavaParser.ConstructorDeclarationContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#fieldDeclaration}.
+ * @param ctx the parse tree
+ */
+ void enterFieldDeclaration(SimpleJavaParser.FieldDeclarationContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#fieldDeclaration}.
+ * @param ctx the parse tree
+ */
+ void exitFieldDeclaration(SimpleJavaParser.FieldDeclarationContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#methodDeclaration}.
+ * @param ctx the parse tree
+ */
+ void enterMethodDeclaration(SimpleJavaParser.MethodDeclarationContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#methodDeclaration}.
+ * @param ctx the parse tree
+ */
+ void exitMethodDeclaration(SimpleJavaParser.MethodDeclarationContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#parameterList}.
+ * @param ctx the parse tree
+ */
+ void enterParameterList(SimpleJavaParser.ParameterListContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#parameterList}.
+ * @param ctx the parse tree
+ */
+ void exitParameterList(SimpleJavaParser.ParameterListContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#parameter}.
+ * @param ctx the parse tree
+ */
+ void enterParameter(SimpleJavaParser.ParameterContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#parameter}.
+ * @param ctx the parse tree
+ */
+ void exitParameter(SimpleJavaParser.ParameterContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#argumentList}.
+ * @param ctx the parse tree
+ */
+ void enterArgumentList(SimpleJavaParser.ArgumentListContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#argumentList}.
+ * @param ctx the parse tree
+ */
+ void exitArgumentList(SimpleJavaParser.ArgumentListContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#statement}.
+ * @param ctx the parse tree
+ */
+ void enterStatement(SimpleJavaParser.StatementContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#statement}.
+ * @param ctx the parse tree
+ */
+ void exitStatement(SimpleJavaParser.StatementContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#blockStatement}.
+ * @param ctx the parse tree
+ */
+ void enterBlockStatement(SimpleJavaParser.BlockStatementContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#blockStatement}.
+ * @param ctx the parse tree
+ */
+ void exitBlockStatement(SimpleJavaParser.BlockStatementContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#returnStatement}.
+ * @param ctx the parse tree
+ */
+ void enterReturnStatement(SimpleJavaParser.ReturnStatementContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#returnStatement}.
+ * @param ctx the parse tree
+ */
+ void exitReturnStatement(SimpleJavaParser.ReturnStatementContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#localVariableDeclaration}.
+ * @param ctx the parse tree
+ */
+ void enterLocalVariableDeclaration(SimpleJavaParser.LocalVariableDeclarationContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#localVariableDeclaration}.
+ * @param ctx the parse tree
+ */
+ void exitLocalVariableDeclaration(SimpleJavaParser.LocalVariableDeclarationContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#whileStatement}.
+ * @param ctx the parse tree
+ */
+ void enterWhileStatement(SimpleJavaParser.WhileStatementContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#whileStatement}.
+ * @param ctx the parse tree
+ */
+ void exitWhileStatement(SimpleJavaParser.WhileStatementContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#doWhileStatement}.
+ * @param ctx the parse tree
+ */
+ void enterDoWhileStatement(SimpleJavaParser.DoWhileStatementContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#doWhileStatement}.
+ * @param ctx the parse tree
+ */
+ void exitDoWhileStatement(SimpleJavaParser.DoWhileStatementContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#forStatement}.
+ * @param ctx the parse tree
+ */
+ void enterForStatement(SimpleJavaParser.ForStatementContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#forStatement}.
+ * @param ctx the parse tree
+ */
+ void exitForStatement(SimpleJavaParser.ForStatementContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#ifElseStatement}.
+ * @param ctx the parse tree
+ */
+ void enterIfElseStatement(SimpleJavaParser.IfElseStatementContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#ifElseStatement}.
+ * @param ctx the parse tree
+ */
+ void exitIfElseStatement(SimpleJavaParser.IfElseStatementContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#ifStatement}.
+ * @param ctx the parse tree
+ */
+ void enterIfStatement(SimpleJavaParser.IfStatementContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#ifStatement}.
+ * @param ctx the parse tree
+ */
+ void exitIfStatement(SimpleJavaParser.IfStatementContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#elseIfStatement}.
+ * @param ctx the parse tree
+ */
+ void enterElseIfStatement(SimpleJavaParser.ElseIfStatementContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#elseIfStatement}.
+ * @param ctx the parse tree
+ */
+ void exitElseIfStatement(SimpleJavaParser.ElseIfStatementContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#elseStatement}.
+ * @param ctx the parse tree
+ */
+ void enterElseStatement(SimpleJavaParser.ElseStatementContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#elseStatement}.
+ * @param ctx the parse tree
+ */
+ void exitElseStatement(SimpleJavaParser.ElseStatementContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#switchStatement}.
+ * @param ctx the parse tree
+ */
+ void enterSwitchStatement(SimpleJavaParser.SwitchStatementContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#switchStatement}.
+ * @param ctx the parse tree
+ */
+ void exitSwitchStatement(SimpleJavaParser.SwitchStatementContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#caseStatement}.
+ * @param ctx the parse tree
+ */
+ void enterCaseStatement(SimpleJavaParser.CaseStatementContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#caseStatement}.
+ * @param ctx the parse tree
+ */
+ void exitCaseStatement(SimpleJavaParser.CaseStatementContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#defaultStatement}.
+ * @param ctx the parse tree
+ */
+ void enterDefaultStatement(SimpleJavaParser.DefaultStatementContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#defaultStatement}.
+ * @param ctx the parse tree
+ */
+ void exitDefaultStatement(SimpleJavaParser.DefaultStatementContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#statementExpression}.
+ * @param ctx the parse tree
+ */
+ void enterStatementExpression(SimpleJavaParser.StatementExpressionContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#statementExpression}.
+ * @param ctx the parse tree
+ */
+ void exitStatementExpression(SimpleJavaParser.StatementExpressionContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#assign}.
+ * @param ctx the parse tree
+ */
+ void enterAssign(SimpleJavaParser.AssignContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#assign}.
+ * @param ctx the parse tree
+ */
+ void exitAssign(SimpleJavaParser.AssignContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#newDeclaration}.
+ * @param ctx the parse tree
+ */
+ void enterNewDeclaration(SimpleJavaParser.NewDeclarationContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#newDeclaration}.
+ * @param ctx the parse tree
+ */
+ void exitNewDeclaration(SimpleJavaParser.NewDeclarationContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#expression}.
+ * @param ctx the parse tree
+ */
+ void enterExpression(SimpleJavaParser.ExpressionContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#expression}.
+ * @param ctx the parse tree
+ */
+ void exitExpression(SimpleJavaParser.ExpressionContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#unaryExpression}.
+ * @param ctx the parse tree
+ */
+ void enterUnaryExpression(SimpleJavaParser.UnaryExpressionContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#unaryExpression}.
+ * @param ctx the parse tree
+ */
+ void exitUnaryExpression(SimpleJavaParser.UnaryExpressionContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#notExpression}.
+ * @param ctx the parse tree
+ */
+ void enterNotExpression(SimpleJavaParser.NotExpressionContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#notExpression}.
+ * @param ctx the parse tree
+ */
+ void exitNotExpression(SimpleJavaParser.NotExpressionContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#crementExpression}.
+ * @param ctx the parse tree
+ */
+ void enterCrementExpression(SimpleJavaParser.CrementExpressionContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#crementExpression}.
+ * @param ctx the parse tree
+ */
+ void exitCrementExpression(SimpleJavaParser.CrementExpressionContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#incrementExpression}.
+ * @param ctx the parse tree
+ */
+ void enterIncrementExpression(SimpleJavaParser.IncrementExpressionContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#incrementExpression}.
+ * @param ctx the parse tree
+ */
+ void exitIncrementExpression(SimpleJavaParser.IncrementExpressionContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#prefixIncrementExpression}.
+ * @param ctx the parse tree
+ */
+ void enterPrefixIncrementExpression(SimpleJavaParser.PrefixIncrementExpressionContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#prefixIncrementExpression}.
+ * @param ctx the parse tree
+ */
+ void exitPrefixIncrementExpression(SimpleJavaParser.PrefixIncrementExpressionContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#suffixIncrementExpression}.
+ * @param ctx the parse tree
+ */
+ void enterSuffixIncrementExpression(SimpleJavaParser.SuffixIncrementExpressionContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#suffixIncrementExpression}.
+ * @param ctx the parse tree
+ */
+ void exitSuffixIncrementExpression(SimpleJavaParser.SuffixIncrementExpressionContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#decrementExpression}.
+ * @param ctx the parse tree
+ */
+ void enterDecrementExpression(SimpleJavaParser.DecrementExpressionContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#decrementExpression}.
+ * @param ctx the parse tree
+ */
+ void exitDecrementExpression(SimpleJavaParser.DecrementExpressionContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#prefixDecrementExpression}.
+ * @param ctx the parse tree
+ */
+ void enterPrefixDecrementExpression(SimpleJavaParser.PrefixDecrementExpressionContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#prefixDecrementExpression}.
+ * @param ctx the parse tree
+ */
+ void exitPrefixDecrementExpression(SimpleJavaParser.PrefixDecrementExpressionContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#suffixDecrementExpression}.
+ * @param ctx the parse tree
+ */
+ void enterSuffixDecrementExpression(SimpleJavaParser.SuffixDecrementExpressionContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#suffixDecrementExpression}.
+ * @param ctx the parse tree
+ */
+ void exitSuffixDecrementExpression(SimpleJavaParser.SuffixDecrementExpressionContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#assignableExpression}.
+ * @param ctx the parse tree
+ */
+ void enterAssignableExpression(SimpleJavaParser.AssignableExpressionContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#assignableExpression}.
+ * @param ctx the parse tree
+ */
+ void exitAssignableExpression(SimpleJavaParser.AssignableExpressionContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#memberAccess}.
+ * @param ctx the parse tree
+ */
+ void enterMemberAccess(SimpleJavaParser.MemberAccessContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#memberAccess}.
+ * @param ctx the parse tree
+ */
+ void exitMemberAccess(SimpleJavaParser.MemberAccessContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#binaryExpression}.
+ * @param ctx the parse tree
+ */
+ void enterBinaryExpression(SimpleJavaParser.BinaryExpressionContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#binaryExpression}.
+ * @param ctx the parse tree
+ */
+ void exitBinaryExpression(SimpleJavaParser.BinaryExpressionContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#calculationExpression}.
+ * @param ctx the parse tree
+ */
+ void enterCalculationExpression(SimpleJavaParser.CalculationExpressionContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#calculationExpression}.
+ * @param ctx the parse tree
+ */
+ void exitCalculationExpression(SimpleJavaParser.CalculationExpressionContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#dotExpression}.
+ * @param ctx the parse tree
+ */
+ void enterDotExpression(SimpleJavaParser.DotExpressionContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#dotExpression}.
+ * @param ctx the parse tree
+ */
+ void exitDotExpression(SimpleJavaParser.DotExpressionContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#dotSubtractionExpression}.
+ * @param ctx the parse tree
+ */
+ void enterDotSubtractionExpression(SimpleJavaParser.DotSubtractionExpressionContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#dotSubtractionExpression}.
+ * @param ctx the parse tree
+ */
+ void exitDotSubtractionExpression(SimpleJavaParser.DotSubtractionExpressionContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#nonCalculationExpression}.
+ * @param ctx the parse tree
+ */
+ void enterNonCalculationExpression(SimpleJavaParser.NonCalculationExpressionContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#nonCalculationExpression}.
+ * @param ctx the parse tree
+ */
+ void exitNonCalculationExpression(SimpleJavaParser.NonCalculationExpressionContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#methodCall}.
+ * @param ctx the parse tree
+ */
+ void enterMethodCall(SimpleJavaParser.MethodCallContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#methodCall}.
+ * @param ctx the parse tree
+ */
+ void exitMethodCall(SimpleJavaParser.MethodCallContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#target}.
+ * @param ctx the parse tree
+ */
+ void enterTarget(SimpleJavaParser.TargetContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#target}.
+ * @param ctx the parse tree
+ */
+ void exitTarget(SimpleJavaParser.TargetContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#chainedMethod}.
+ * @param ctx the parse tree
+ */
+ void enterChainedMethod(SimpleJavaParser.ChainedMethodContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#chainedMethod}.
+ * @param ctx the parse tree
+ */
+ void exitChainedMethod(SimpleJavaParser.ChainedMethodContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#type}.
+ * @param ctx the parse tree
+ */
+ void enterType(SimpleJavaParser.TypeContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#type}.
+ * @param ctx the parse tree
+ */
+ void exitType(SimpleJavaParser.TypeContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#value}.
+ * @param ctx the parse tree
+ */
+ void enterValue(SimpleJavaParser.ValueContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#value}.
+ * @param ctx the parse tree
+ */
+ void exitValue(SimpleJavaParser.ValueContext ctx);
+ /**
+ * Enter a parse tree produced by {@link SimpleJavaParser#nonCalculationOperator}.
+ * @param ctx the parse tree
+ */
+ void enterNonCalculationOperator(SimpleJavaParser.NonCalculationOperatorContext ctx);
+ /**
+ * Exit a parse tree produced by {@link SimpleJavaParser#nonCalculationOperator}.
+ * @param ctx the parse tree
+ */
+ void exitNonCalculationOperator(SimpleJavaParser.NonCalculationOperatorContext ctx);
+}
\ No newline at end of file
diff --git a/src/main/java/parser/generated/SimpleJavaParser.java b/src/main/java/parser/generated/SimpleJavaParser.java
new file mode 100644
index 0000000..0d6fb65
--- /dev/null
+++ b/src/main/java/parser/generated/SimpleJavaParser.java
@@ -0,0 +1,3918 @@
+// Generated from C:/Users/Maxi/Documents/DHBW/Compilerbau/NichtHaskell2.0/src/main/java/parser/grammar/SimpleJava.g4 by ANTLR 4.13.1
+package parser.generated;
+import org.antlr.v4.runtime.atn.*;
+import org.antlr.v4.runtime.dfa.DFA;
+import org.antlr.v4.runtime.*;
+import org.antlr.v4.runtime.misc.*;
+import org.antlr.v4.runtime.tree.*;
+import java.util.List;
+import java.util.Iterator;
+import java.util.ArrayList;
+
+@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast", "CheckReturnValue"})
+public class SimpleJavaParser extends Parser {
+ static { RuntimeMetaData.checkVersion("4.13.1", RuntimeMetaData.VERSION); }
+
+ protected static final DFA[] _decisionToDFA;
+ protected static final PredictionContextCache _sharedContextCache =
+ new PredictionContextCache();
+ public static final int
+ T__0=1, T__1=2, Void=3, Boolean=4, Char=5, Int=6, AccessModifier=7, MainMethodDeclaration=8,
+ DotOperator=9, LineOperator=10, ComparisonOperator=11, LogicalOperator=12,
+ Assign=13, Plus=14, Minus=15, Mult=16, Modulo=17, Div=18, Greater=19,
+ Less=20, GreaterEqual=21, LessEqual=22, Equal=23, NotEqual=24, Not=25,
+ And=26, Or=27, Dot=28, OpenRoundBracket=29, ClosedRoundBracket=30, OpenCurlyBracket=31,
+ ClosedCurlyBracket=32, Semicolon=33, Comma=34, Class=35, This=36, While=37,
+ Do=38, If=39, Else=40, For=41, Return=42, New=43, Switch=44, Case=45,
+ Default=46, Colon=47, CharValue=48, IntValue=49, BooleanValue=50, NullValue=51,
+ Identifier=52, WS=53, InlineComment=54, MultilineComment=55;
+ public static final int
+ RULE_program = 0, RULE_classDeclaration = 1, RULE_memberDeclaration = 2,
+ RULE_constructorDeclaration = 3, RULE_fieldDeclaration = 4, RULE_methodDeclaration = 5,
+ RULE_parameterList = 6, RULE_parameter = 7, RULE_argumentList = 8, RULE_statement = 9,
+ RULE_blockStatement = 10, RULE_returnStatement = 11, RULE_localVariableDeclaration = 12,
+ RULE_whileStatement = 13, RULE_doWhileStatement = 14, RULE_forStatement = 15,
+ RULE_ifElseStatement = 16, RULE_ifStatement = 17, RULE_elseIfStatement = 18,
+ RULE_elseStatement = 19, RULE_switchStatement = 20, RULE_caseStatement = 21,
+ RULE_defaultStatement = 22, RULE_statementExpression = 23, RULE_assign = 24,
+ RULE_newDeclaration = 25, RULE_expression = 26, RULE_unaryExpression = 27,
+ RULE_notExpression = 28, RULE_crementExpression = 29, RULE_incrementExpression = 30,
+ RULE_prefixIncrementExpression = 31, RULE_suffixIncrementExpression = 32,
+ RULE_decrementExpression = 33, RULE_prefixDecrementExpression = 34, RULE_suffixDecrementExpression = 35,
+ RULE_assignableExpression = 36, RULE_memberAccess = 37, RULE_binaryExpression = 38,
+ RULE_calculationExpression = 39, RULE_dotExpression = 40, RULE_dotSubtractionExpression = 41,
+ RULE_nonCalculationExpression = 42, RULE_methodCall = 43, RULE_target = 44,
+ RULE_chainedMethod = 45, RULE_type = 46, RULE_value = 47, RULE_nonCalculationOperator = 48;
+ private static String[] makeRuleNames() {
+ return new String[] {
+ "program", "classDeclaration", "memberDeclaration", "constructorDeclaration",
+ "fieldDeclaration", "methodDeclaration", "parameterList", "parameter",
+ "argumentList", "statement", "blockStatement", "returnStatement", "localVariableDeclaration",
+ "whileStatement", "doWhileStatement", "forStatement", "ifElseStatement",
+ "ifStatement", "elseIfStatement", "elseStatement", "switchStatement",
+ "caseStatement", "defaultStatement", "statementExpression", "assign",
+ "newDeclaration", "expression", "unaryExpression", "notExpression", "crementExpression",
+ "incrementExpression", "prefixIncrementExpression", "suffixIncrementExpression",
+ "decrementExpression", "prefixDecrementExpression", "suffixDecrementExpression",
+ "assignableExpression", "memberAccess", "binaryExpression", "calculationExpression",
+ "dotExpression", "dotSubtractionExpression", "nonCalculationExpression",
+ "methodCall", "target", "chainedMethod", "type", "value", "nonCalculationOperator"
+ };
+ }
+ public static final String[] ruleNames = makeRuleNames();
+
+ private static String[] makeLiteralNames() {
+ return new String[] {
+ null, "'++'", "'--'", "'void'", "'boolean'", "'char'", "'int'", null,
+ "'public static void main(String[] args)'", null, null, null, null, "'='",
+ "'+'", "'-'", "'*'", "'%'", "'/'", "'>'", "'<'", "'>='", "'<='", "'=='",
+ "'!='", "'!'", "'&&'", "'||'", "'.'", "'('", "')'", "'{'", "'}'", "';'",
+ "','", "'class'", "'this'", "'while'", "'do'", "'if'", "'else'", "'for'",
+ "'return'", "'new'", "'switch'", "'case'", "'default'", "':'", null,
+ null, null, "'null'"
+ };
+ }
+ private static final String[] _LITERAL_NAMES = makeLiteralNames();
+ private static String[] makeSymbolicNames() {
+ return new String[] {
+ null, null, null, "Void", "Boolean", "Char", "Int", "AccessModifier",
+ "MainMethodDeclaration", "DotOperator", "LineOperator", "ComparisonOperator",
+ "LogicalOperator", "Assign", "Plus", "Minus", "Mult", "Modulo", "Div",
+ "Greater", "Less", "GreaterEqual", "LessEqual", "Equal", "NotEqual",
+ "Not", "And", "Or", "Dot", "OpenRoundBracket", "ClosedRoundBracket",
+ "OpenCurlyBracket", "ClosedCurlyBracket", "Semicolon", "Comma", "Class",
+ "This", "While", "Do", "If", "Else", "For", "Return", "New", "Switch",
+ "Case", "Default", "Colon", "CharValue", "IntValue", "BooleanValue",
+ "NullValue", "Identifier", "WS", "InlineComment", "MultilineComment"
+ };
+ }
+ private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames();
+ public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
+
+ /**
+ * @deprecated Use {@link #VOCABULARY} instead.
+ */
+ @Deprecated
+ public static final String[] tokenNames;
+ static {
+ tokenNames = new String[_SYMBOLIC_NAMES.length];
+ for (int i = 0; i < tokenNames.length; i++) {
+ tokenNames[i] = VOCABULARY.getLiteralName(i);
+ if (tokenNames[i] == null) {
+ tokenNames[i] = VOCABULARY.getSymbolicName(i);
+ }
+
+ if (tokenNames[i] == null) {
+ tokenNames[i] = "";
+ }
+ }
+ }
+
+ @Override
+ @Deprecated
+ public String[] getTokenNames() {
+ return tokenNames;
+ }
+
+ @Override
+
+ public Vocabulary getVocabulary() {
+ return VOCABULARY;
+ }
+
+ @Override
+ public String getGrammarFileName() { return "SimpleJava.g4"; }
+
+ @Override
+ public String[] getRuleNames() { return ruleNames; }
+
+ @Override
+ public String getSerializedATN() { return _serializedATN; }
+
+ @Override
+ public ATN getATN() { return _ATN; }
+
+ public SimpleJavaParser(TokenStream input) {
+ super(input);
+ _interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class ProgramContext extends ParserRuleContext {
+ public List classDeclaration() {
+ return getRuleContexts(ClassDeclarationContext.class);
+ }
+ public ClassDeclarationContext classDeclaration(int i) {
+ return getRuleContext(ClassDeclarationContext.class,i);
+ }
+ public ProgramContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_program; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterProgram(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitProgram(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitProgram(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final ProgramContext program() throws RecognitionException {
+ ProgramContext _localctx = new ProgramContext(_ctx, getState());
+ enterRule(_localctx, 0, RULE_program);
+ int _la;
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(99);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ do {
+ {
+ {
+ setState(98);
+ classDeclaration();
+ }
+ }
+ setState(101);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ } while ( _la==AccessModifier || _la==Class );
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class ClassDeclarationContext extends ParserRuleContext {
+ public TerminalNode Class() { return getToken(SimpleJavaParser.Class, 0); }
+ public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
+ public TerminalNode OpenCurlyBracket() { return getToken(SimpleJavaParser.OpenCurlyBracket, 0); }
+ public TerminalNode ClosedCurlyBracket() { return getToken(SimpleJavaParser.ClosedCurlyBracket, 0); }
+ public TerminalNode AccessModifier() { return getToken(SimpleJavaParser.AccessModifier, 0); }
+ public List memberDeclaration() {
+ return getRuleContexts(MemberDeclarationContext.class);
+ }
+ public MemberDeclarationContext memberDeclaration(int i) {
+ return getRuleContext(MemberDeclarationContext.class,i);
+ }
+ public ClassDeclarationContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_classDeclaration; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterClassDeclaration(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitClassDeclaration(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitClassDeclaration(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final ClassDeclarationContext classDeclaration() throws RecognitionException {
+ ClassDeclarationContext _localctx = new ClassDeclarationContext(_ctx, getState());
+ enterRule(_localctx, 2, RULE_classDeclaration);
+ int _la;
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(104);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ if (_la==AccessModifier) {
+ {
+ setState(103);
+ match(AccessModifier);
+ }
+ }
+
+ setState(106);
+ match(Class);
+ setState(107);
+ match(Identifier);
+ setState(108);
+ match(OpenCurlyBracket);
+ setState(112);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 4503599627371000L) != 0)) {
+ {
+ {
+ setState(109);
+ memberDeclaration();
+ }
+ }
+ setState(114);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ }
+ setState(115);
+ match(ClosedCurlyBracket);
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class MemberDeclarationContext extends ParserRuleContext {
+ public ConstructorDeclarationContext constructorDeclaration() {
+ return getRuleContext(ConstructorDeclarationContext.class,0);
+ }
+ public FieldDeclarationContext fieldDeclaration() {
+ return getRuleContext(FieldDeclarationContext.class,0);
+ }
+ public MethodDeclarationContext methodDeclaration() {
+ return getRuleContext(MethodDeclarationContext.class,0);
+ }
+ public MemberDeclarationContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_memberDeclaration; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterMemberDeclaration(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitMemberDeclaration(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitMemberDeclaration(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final MemberDeclarationContext memberDeclaration() throws RecognitionException {
+ MemberDeclarationContext _localctx = new MemberDeclarationContext(_ctx, getState());
+ enterRule(_localctx, 4, RULE_memberDeclaration);
+ try {
+ setState(120);
+ _errHandler.sync(this);
+ switch ( getInterpreter().adaptivePredict(_input,3,_ctx) ) {
+ case 1:
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(117);
+ constructorDeclaration();
+ }
+ break;
+ case 2:
+ enterOuterAlt(_localctx, 2);
+ {
+ setState(118);
+ fieldDeclaration();
+ }
+ break;
+ case 3:
+ enterOuterAlt(_localctx, 3);
+ {
+ setState(119);
+ methodDeclaration();
+ }
+ break;
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class ConstructorDeclarationContext extends ParserRuleContext {
+ public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
+ public TerminalNode OpenRoundBracket() { return getToken(SimpleJavaParser.OpenRoundBracket, 0); }
+ public TerminalNode ClosedRoundBracket() { return getToken(SimpleJavaParser.ClosedRoundBracket, 0); }
+ public BlockStatementContext blockStatement() {
+ return getRuleContext(BlockStatementContext.class,0);
+ }
+ public TerminalNode AccessModifier() { return getToken(SimpleJavaParser.AccessModifier, 0); }
+ public ParameterListContext parameterList() {
+ return getRuleContext(ParameterListContext.class,0);
+ }
+ public ConstructorDeclarationContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_constructorDeclaration; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterConstructorDeclaration(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitConstructorDeclaration(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitConstructorDeclaration(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final ConstructorDeclarationContext constructorDeclaration() throws RecognitionException {
+ ConstructorDeclarationContext _localctx = new ConstructorDeclarationContext(_ctx, getState());
+ enterRule(_localctx, 6, RULE_constructorDeclaration);
+ int _la;
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(123);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ if (_la==AccessModifier) {
+ {
+ setState(122);
+ match(AccessModifier);
+ }
+ }
+
+ setState(125);
+ match(Identifier);
+ setState(126);
+ match(OpenRoundBracket);
+ setState(128);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 4503599627370608L) != 0)) {
+ {
+ setState(127);
+ parameterList();
+ }
+ }
+
+ setState(130);
+ match(ClosedRoundBracket);
+ setState(131);
+ blockStatement();
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class FieldDeclarationContext extends ParserRuleContext {
+ public TypeContext type() {
+ return getRuleContext(TypeContext.class,0);
+ }
+ public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
+ public TerminalNode Semicolon() { return getToken(SimpleJavaParser.Semicolon, 0); }
+ public TerminalNode AccessModifier() { return getToken(SimpleJavaParser.AccessModifier, 0); }
+ public TerminalNode Assign() { return getToken(SimpleJavaParser.Assign, 0); }
+ public ExpressionContext expression() {
+ return getRuleContext(ExpressionContext.class,0);
+ }
+ public FieldDeclarationContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_fieldDeclaration; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterFieldDeclaration(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitFieldDeclaration(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitFieldDeclaration(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final FieldDeclarationContext fieldDeclaration() throws RecognitionException {
+ FieldDeclarationContext _localctx = new FieldDeclarationContext(_ctx, getState());
+ enterRule(_localctx, 8, RULE_fieldDeclaration);
+ int _la;
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(134);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ if (_la==AccessModifier) {
+ {
+ setState(133);
+ match(AccessModifier);
+ }
+ }
+
+ setState(136);
+ type();
+ setState(137);
+ match(Identifier);
+ setState(140);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ if (_la==Assign) {
+ {
+ setState(138);
+ match(Assign);
+ setState(139);
+ expression();
+ }
+ }
+
+ setState(142);
+ match(Semicolon);
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class MethodDeclarationContext extends ParserRuleContext {
+ public TerminalNode MainMethodDeclaration() { return getToken(SimpleJavaParser.MainMethodDeclaration, 0); }
+ public BlockStatementContext blockStatement() {
+ return getRuleContext(BlockStatementContext.class,0);
+ }
+ public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
+ public TerminalNode OpenRoundBracket() { return getToken(SimpleJavaParser.OpenRoundBracket, 0); }
+ public TerminalNode ClosedRoundBracket() { return getToken(SimpleJavaParser.ClosedRoundBracket, 0); }
+ public TypeContext type() {
+ return getRuleContext(TypeContext.class,0);
+ }
+ public TerminalNode Void() { return getToken(SimpleJavaParser.Void, 0); }
+ public TerminalNode AccessModifier() { return getToken(SimpleJavaParser.AccessModifier, 0); }
+ public ParameterListContext parameterList() {
+ return getRuleContext(ParameterListContext.class,0);
+ }
+ public MethodDeclarationContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_methodDeclaration; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterMethodDeclaration(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitMethodDeclaration(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitMethodDeclaration(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final MethodDeclarationContext methodDeclaration() throws RecognitionException {
+ MethodDeclarationContext _localctx = new MethodDeclarationContext(_ctx, getState());
+ enterRule(_localctx, 10, RULE_methodDeclaration);
+ int _la;
+ try {
+ setState(160);
+ _errHandler.sync(this);
+ switch (_input.LA(1)) {
+ case MainMethodDeclaration:
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(144);
+ match(MainMethodDeclaration);
+ setState(145);
+ blockStatement();
+ }
+ break;
+ case Void:
+ case Boolean:
+ case Char:
+ case Int:
+ case AccessModifier:
+ case Identifier:
+ enterOuterAlt(_localctx, 2);
+ {
+ setState(147);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ if (_la==AccessModifier) {
+ {
+ setState(146);
+ match(AccessModifier);
+ }
+ }
+
+ setState(151);
+ _errHandler.sync(this);
+ switch (_input.LA(1)) {
+ case Boolean:
+ case Char:
+ case Int:
+ case Identifier:
+ {
+ setState(149);
+ type();
+ }
+ break;
+ case Void:
+ {
+ setState(150);
+ match(Void);
+ }
+ break;
+ default:
+ throw new NoViableAltException(this);
+ }
+ setState(153);
+ match(Identifier);
+ setState(154);
+ match(OpenRoundBracket);
+ setState(156);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 4503599627370608L) != 0)) {
+ {
+ setState(155);
+ parameterList();
+ }
+ }
+
+ setState(158);
+ match(ClosedRoundBracket);
+ setState(159);
+ blockStatement();
+ }
+ break;
+ default:
+ throw new NoViableAltException(this);
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class ParameterListContext extends ParserRuleContext {
+ public List parameter() {
+ return getRuleContexts(ParameterContext.class);
+ }
+ public ParameterContext parameter(int i) {
+ return getRuleContext(ParameterContext.class,i);
+ }
+ public List Comma() { return getTokens(SimpleJavaParser.Comma); }
+ public TerminalNode Comma(int i) {
+ return getToken(SimpleJavaParser.Comma, i);
+ }
+ public ParameterListContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_parameterList; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterParameterList(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitParameterList(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitParameterList(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final ParameterListContext parameterList() throws RecognitionException {
+ ParameterListContext _localctx = new ParameterListContext(_ctx, getState());
+ enterRule(_localctx, 12, RULE_parameterList);
+ int _la;
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(162);
+ parameter();
+ setState(167);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ while (_la==Comma) {
+ {
+ {
+ setState(163);
+ match(Comma);
+ setState(164);
+ parameter();
+ }
+ }
+ setState(169);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ }
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class ParameterContext extends ParserRuleContext {
+ public TypeContext type() {
+ return getRuleContext(TypeContext.class,0);
+ }
+ public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
+ public ParameterContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_parameter; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterParameter(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitParameter(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitParameter(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final ParameterContext parameter() throws RecognitionException {
+ ParameterContext _localctx = new ParameterContext(_ctx, getState());
+ enterRule(_localctx, 14, RULE_parameter);
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(170);
+ type();
+ setState(171);
+ match(Identifier);
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class ArgumentListContext extends ParserRuleContext {
+ public List expression() {
+ return getRuleContexts(ExpressionContext.class);
+ }
+ public ExpressionContext expression(int i) {
+ return getRuleContext(ExpressionContext.class,i);
+ }
+ public List Comma() { return getTokens(SimpleJavaParser.Comma); }
+ public TerminalNode Comma(int i) {
+ return getToken(SimpleJavaParser.Comma, i);
+ }
+ public ArgumentListContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_argumentList; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterArgumentList(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitArgumentList(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitArgumentList(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final ArgumentListContext argumentList() throws RecognitionException {
+ ArgumentListContext _localctx = new ArgumentListContext(_ctx, getState());
+ enterRule(_localctx, 16, RULE_argumentList);
+ int _la;
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(181);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 8734589660954630L) != 0)) {
+ {
+ setState(173);
+ expression();
+ setState(178);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ while (_la==Comma) {
+ {
+ {
+ setState(174);
+ match(Comma);
+ setState(175);
+ expression();
+ }
+ }
+ setState(180);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ }
+ }
+ }
+
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class StatementContext extends ParserRuleContext {
+ public ReturnStatementContext returnStatement() {
+ return getRuleContext(ReturnStatementContext.class,0);
+ }
+ public TerminalNode Semicolon() { return getToken(SimpleJavaParser.Semicolon, 0); }
+ public LocalVariableDeclarationContext localVariableDeclaration() {
+ return getRuleContext(LocalVariableDeclarationContext.class,0);
+ }
+ public BlockStatementContext blockStatement() {
+ return getRuleContext(BlockStatementContext.class,0);
+ }
+ public WhileStatementContext whileStatement() {
+ return getRuleContext(WhileStatementContext.class,0);
+ }
+ public DoWhileStatementContext doWhileStatement() {
+ return getRuleContext(DoWhileStatementContext.class,0);
+ }
+ public ForStatementContext forStatement() {
+ return getRuleContext(ForStatementContext.class,0);
+ }
+ public IfElseStatementContext ifElseStatement() {
+ return getRuleContext(IfElseStatementContext.class,0);
+ }
+ public SwitchStatementContext switchStatement() {
+ return getRuleContext(SwitchStatementContext.class,0);
+ }
+ public StatementExpressionContext statementExpression() {
+ return getRuleContext(StatementExpressionContext.class,0);
+ }
+ public StatementContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_statement; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterStatement(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitStatement(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitStatement(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final StatementContext statement() throws RecognitionException {
+ StatementContext _localctx = new StatementContext(_ctx, getState());
+ enterRule(_localctx, 18, RULE_statement);
+ try {
+ setState(198);
+ _errHandler.sync(this);
+ switch ( getInterpreter().adaptivePredict(_input,15,_ctx) ) {
+ case 1:
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(183);
+ returnStatement();
+ setState(184);
+ match(Semicolon);
+ }
+ break;
+ case 2:
+ enterOuterAlt(_localctx, 2);
+ {
+ setState(186);
+ localVariableDeclaration();
+ setState(187);
+ match(Semicolon);
+ }
+ break;
+ case 3:
+ enterOuterAlt(_localctx, 3);
+ {
+ setState(189);
+ blockStatement();
+ }
+ break;
+ case 4:
+ enterOuterAlt(_localctx, 4);
+ {
+ setState(190);
+ whileStatement();
+ }
+ break;
+ case 5:
+ enterOuterAlt(_localctx, 5);
+ {
+ setState(191);
+ doWhileStatement();
+ }
+ break;
+ case 6:
+ enterOuterAlt(_localctx, 6);
+ {
+ setState(192);
+ forStatement();
+ }
+ break;
+ case 7:
+ enterOuterAlt(_localctx, 7);
+ {
+ setState(193);
+ ifElseStatement();
+ }
+ break;
+ case 8:
+ enterOuterAlt(_localctx, 8);
+ {
+ setState(194);
+ switchStatement();
+ }
+ break;
+ case 9:
+ enterOuterAlt(_localctx, 9);
+ {
+ setState(195);
+ statementExpression();
+ setState(196);
+ match(Semicolon);
+ }
+ break;
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class BlockStatementContext extends ParserRuleContext {
+ public TerminalNode OpenCurlyBracket() { return getToken(SimpleJavaParser.OpenCurlyBracket, 0); }
+ public TerminalNode ClosedCurlyBracket() { return getToken(SimpleJavaParser.ClosedCurlyBracket, 0); }
+ public List statement() {
+ return getRuleContexts(StatementContext.class);
+ }
+ public StatementContext statement(int i) {
+ return getRuleContext(StatementContext.class,i);
+ }
+ public BlockStatementContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_blockStatement; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterBlockStatement(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitBlockStatement(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitBlockStatement(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final BlockStatementContext blockStatement() throws RecognitionException {
+ BlockStatementContext _localctx = new BlockStatementContext(_ctx, getState());
+ enterRule(_localctx, 20, RULE_blockStatement);
+ int _la;
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(200);
+ match(OpenCurlyBracket);
+ setState(204);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 4537617915838582L) != 0)) {
+ {
+ {
+ setState(201);
+ statement();
+ }
+ }
+ setState(206);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ }
+ setState(207);
+ match(ClosedCurlyBracket);
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class ReturnStatementContext extends ParserRuleContext {
+ public TerminalNode Return() { return getToken(SimpleJavaParser.Return, 0); }
+ public ExpressionContext expression() {
+ return getRuleContext(ExpressionContext.class,0);
+ }
+ public ReturnStatementContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_returnStatement; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterReturnStatement(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitReturnStatement(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitReturnStatement(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final ReturnStatementContext returnStatement() throws RecognitionException {
+ ReturnStatementContext _localctx = new ReturnStatementContext(_ctx, getState());
+ enterRule(_localctx, 22, RULE_returnStatement);
+ int _la;
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(209);
+ match(Return);
+ setState(211);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 8734589660954630L) != 0)) {
+ {
+ setState(210);
+ expression();
+ }
+ }
+
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class LocalVariableDeclarationContext extends ParserRuleContext {
+ public TypeContext type() {
+ return getRuleContext(TypeContext.class,0);
+ }
+ public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
+ public TerminalNode Assign() { return getToken(SimpleJavaParser.Assign, 0); }
+ public ExpressionContext expression() {
+ return getRuleContext(ExpressionContext.class,0);
+ }
+ public LocalVariableDeclarationContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_localVariableDeclaration; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterLocalVariableDeclaration(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitLocalVariableDeclaration(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitLocalVariableDeclaration(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final LocalVariableDeclarationContext localVariableDeclaration() throws RecognitionException {
+ LocalVariableDeclarationContext _localctx = new LocalVariableDeclarationContext(_ctx, getState());
+ enterRule(_localctx, 24, RULE_localVariableDeclaration);
+ int _la;
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(213);
+ type();
+ setState(214);
+ match(Identifier);
+ setState(217);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ if (_la==Assign) {
+ {
+ setState(215);
+ match(Assign);
+ setState(216);
+ expression();
+ }
+ }
+
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class WhileStatementContext extends ParserRuleContext {
+ public TerminalNode While() { return getToken(SimpleJavaParser.While, 0); }
+ public TerminalNode OpenRoundBracket() { return getToken(SimpleJavaParser.OpenRoundBracket, 0); }
+ public ExpressionContext expression() {
+ return getRuleContext(ExpressionContext.class,0);
+ }
+ public TerminalNode ClosedRoundBracket() { return getToken(SimpleJavaParser.ClosedRoundBracket, 0); }
+ public BlockStatementContext blockStatement() {
+ return getRuleContext(BlockStatementContext.class,0);
+ }
+ public WhileStatementContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_whileStatement; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterWhileStatement(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitWhileStatement(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitWhileStatement(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final WhileStatementContext whileStatement() throws RecognitionException {
+ WhileStatementContext _localctx = new WhileStatementContext(_ctx, getState());
+ enterRule(_localctx, 26, RULE_whileStatement);
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(219);
+ match(While);
+ setState(220);
+ match(OpenRoundBracket);
+ setState(221);
+ expression();
+ setState(222);
+ match(ClosedRoundBracket);
+ setState(223);
+ blockStatement();
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class DoWhileStatementContext extends ParserRuleContext {
+ public TerminalNode Do() { return getToken(SimpleJavaParser.Do, 0); }
+ public BlockStatementContext blockStatement() {
+ return getRuleContext(BlockStatementContext.class,0);
+ }
+ public TerminalNode While() { return getToken(SimpleJavaParser.While, 0); }
+ public TerminalNode OpenRoundBracket() { return getToken(SimpleJavaParser.OpenRoundBracket, 0); }
+ public ExpressionContext expression() {
+ return getRuleContext(ExpressionContext.class,0);
+ }
+ public TerminalNode ClosedRoundBracket() { return getToken(SimpleJavaParser.ClosedRoundBracket, 0); }
+ public TerminalNode Semicolon() { return getToken(SimpleJavaParser.Semicolon, 0); }
+ public DoWhileStatementContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_doWhileStatement; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterDoWhileStatement(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitDoWhileStatement(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitDoWhileStatement(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final DoWhileStatementContext doWhileStatement() throws RecognitionException {
+ DoWhileStatementContext _localctx = new DoWhileStatementContext(_ctx, getState());
+ enterRule(_localctx, 28, RULE_doWhileStatement);
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(225);
+ match(Do);
+ setState(226);
+ blockStatement();
+ setState(227);
+ match(While);
+ setState(228);
+ match(OpenRoundBracket);
+ setState(229);
+ expression();
+ setState(230);
+ match(ClosedRoundBracket);
+ setState(231);
+ match(Semicolon);
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class ForStatementContext extends ParserRuleContext {
+ public TerminalNode For() { return getToken(SimpleJavaParser.For, 0); }
+ public TerminalNode OpenRoundBracket() { return getToken(SimpleJavaParser.OpenRoundBracket, 0); }
+ public List Semicolon() { return getTokens(SimpleJavaParser.Semicolon); }
+ public TerminalNode Semicolon(int i) {
+ return getToken(SimpleJavaParser.Semicolon, i);
+ }
+ public TerminalNode ClosedRoundBracket() { return getToken(SimpleJavaParser.ClosedRoundBracket, 0); }
+ public BlockStatementContext blockStatement() {
+ return getRuleContext(BlockStatementContext.class,0);
+ }
+ public List statementExpression() {
+ return getRuleContexts(StatementExpressionContext.class);
+ }
+ public StatementExpressionContext statementExpression(int i) {
+ return getRuleContext(StatementExpressionContext.class,i);
+ }
+ public LocalVariableDeclarationContext localVariableDeclaration() {
+ return getRuleContext(LocalVariableDeclarationContext.class,0);
+ }
+ public ExpressionContext expression() {
+ return getRuleContext(ExpressionContext.class,0);
+ }
+ public ForStatementContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_forStatement; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterForStatement(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitForStatement(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitForStatement(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final ForStatementContext forStatement() throws RecognitionException {
+ ForStatementContext _localctx = new ForStatementContext(_ctx, getState());
+ enterRule(_localctx, 30, RULE_forStatement);
+ int _la;
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(233);
+ match(For);
+ setState(234);
+ match(OpenRoundBracket);
+ setState(237);
+ _errHandler.sync(this);
+ switch ( getInterpreter().adaptivePredict(_input,19,_ctx) ) {
+ case 1:
+ {
+ setState(235);
+ statementExpression();
+ }
+ break;
+ case 2:
+ {
+ setState(236);
+ localVariableDeclaration();
+ }
+ break;
+ }
+ setState(239);
+ match(Semicolon);
+ setState(241);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 8734589660954630L) != 0)) {
+ {
+ setState(240);
+ expression();
+ }
+ }
+
+ setState(243);
+ match(Semicolon);
+ setState(245);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 4512464439869446L) != 0)) {
+ {
+ setState(244);
+ statementExpression();
+ }
+ }
+
+ setState(247);
+ match(ClosedRoundBracket);
+ setState(248);
+ blockStatement();
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class IfElseStatementContext extends ParserRuleContext {
+ public IfStatementContext ifStatement() {
+ return getRuleContext(IfStatementContext.class,0);
+ }
+ public List elseIfStatement() {
+ return getRuleContexts(ElseIfStatementContext.class);
+ }
+ public ElseIfStatementContext elseIfStatement(int i) {
+ return getRuleContext(ElseIfStatementContext.class,i);
+ }
+ public ElseStatementContext elseStatement() {
+ return getRuleContext(ElseStatementContext.class,0);
+ }
+ public IfElseStatementContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_ifElseStatement; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterIfElseStatement(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitIfElseStatement(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitIfElseStatement(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final IfElseStatementContext ifElseStatement() throws RecognitionException {
+ IfElseStatementContext _localctx = new IfElseStatementContext(_ctx, getState());
+ enterRule(_localctx, 32, RULE_ifElseStatement);
+ int _la;
+ try {
+ int _alt;
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(250);
+ ifStatement();
+ setState(254);
+ _errHandler.sync(this);
+ _alt = getInterpreter().adaptivePredict(_input,22,_ctx);
+ while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
+ if ( _alt==1 ) {
+ {
+ {
+ setState(251);
+ elseIfStatement();
+ }
+ }
+ }
+ setState(256);
+ _errHandler.sync(this);
+ _alt = getInterpreter().adaptivePredict(_input,22,_ctx);
+ }
+ setState(258);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ if (_la==Else) {
+ {
+ setState(257);
+ elseStatement();
+ }
+ }
+
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class IfStatementContext extends ParserRuleContext {
+ public TerminalNode If() { return getToken(SimpleJavaParser.If, 0); }
+ public TerminalNode OpenRoundBracket() { return getToken(SimpleJavaParser.OpenRoundBracket, 0); }
+ public ExpressionContext expression() {
+ return getRuleContext(ExpressionContext.class,0);
+ }
+ public TerminalNode ClosedRoundBracket() { return getToken(SimpleJavaParser.ClosedRoundBracket, 0); }
+ public BlockStatementContext blockStatement() {
+ return getRuleContext(BlockStatementContext.class,0);
+ }
+ public IfStatementContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_ifStatement; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterIfStatement(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitIfStatement(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitIfStatement(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final IfStatementContext ifStatement() throws RecognitionException {
+ IfStatementContext _localctx = new IfStatementContext(_ctx, getState());
+ enterRule(_localctx, 34, RULE_ifStatement);
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(260);
+ match(If);
+ setState(261);
+ match(OpenRoundBracket);
+ setState(262);
+ expression();
+ setState(263);
+ match(ClosedRoundBracket);
+ setState(264);
+ blockStatement();
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class ElseIfStatementContext extends ParserRuleContext {
+ public TerminalNode Else() { return getToken(SimpleJavaParser.Else, 0); }
+ public TerminalNode If() { return getToken(SimpleJavaParser.If, 0); }
+ public TerminalNode OpenRoundBracket() { return getToken(SimpleJavaParser.OpenRoundBracket, 0); }
+ public ExpressionContext expression() {
+ return getRuleContext(ExpressionContext.class,0);
+ }
+ public TerminalNode ClosedRoundBracket() { return getToken(SimpleJavaParser.ClosedRoundBracket, 0); }
+ public BlockStatementContext blockStatement() {
+ return getRuleContext(BlockStatementContext.class,0);
+ }
+ public ElseIfStatementContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_elseIfStatement; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterElseIfStatement(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitElseIfStatement(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitElseIfStatement(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final ElseIfStatementContext elseIfStatement() throws RecognitionException {
+ ElseIfStatementContext _localctx = new ElseIfStatementContext(_ctx, getState());
+ enterRule(_localctx, 36, RULE_elseIfStatement);
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(266);
+ match(Else);
+ setState(267);
+ match(If);
+ setState(268);
+ match(OpenRoundBracket);
+ setState(269);
+ expression();
+ setState(270);
+ match(ClosedRoundBracket);
+ setState(271);
+ blockStatement();
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class ElseStatementContext extends ParserRuleContext {
+ public TerminalNode Else() { return getToken(SimpleJavaParser.Else, 0); }
+ public BlockStatementContext blockStatement() {
+ return getRuleContext(BlockStatementContext.class,0);
+ }
+ public ElseStatementContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_elseStatement; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterElseStatement(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitElseStatement(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitElseStatement(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final ElseStatementContext elseStatement() throws RecognitionException {
+ ElseStatementContext _localctx = new ElseStatementContext(_ctx, getState());
+ enterRule(_localctx, 38, RULE_elseStatement);
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(273);
+ match(Else);
+ setState(274);
+ blockStatement();
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class SwitchStatementContext extends ParserRuleContext {
+ public TerminalNode Switch() { return getToken(SimpleJavaParser.Switch, 0); }
+ public TerminalNode OpenRoundBracket() { return getToken(SimpleJavaParser.OpenRoundBracket, 0); }
+ public ExpressionContext expression() {
+ return getRuleContext(ExpressionContext.class,0);
+ }
+ public TerminalNode ClosedRoundBracket() { return getToken(SimpleJavaParser.ClosedRoundBracket, 0); }
+ public TerminalNode OpenCurlyBracket() { return getToken(SimpleJavaParser.OpenCurlyBracket, 0); }
+ public TerminalNode ClosedCurlyBracket() { return getToken(SimpleJavaParser.ClosedCurlyBracket, 0); }
+ public List caseStatement() {
+ return getRuleContexts(CaseStatementContext.class);
+ }
+ public CaseStatementContext caseStatement(int i) {
+ return getRuleContext(CaseStatementContext.class,i);
+ }
+ public DefaultStatementContext defaultStatement() {
+ return getRuleContext(DefaultStatementContext.class,0);
+ }
+ public SwitchStatementContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_switchStatement; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterSwitchStatement(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitSwitchStatement(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitSwitchStatement(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final SwitchStatementContext switchStatement() throws RecognitionException {
+ SwitchStatementContext _localctx = new SwitchStatementContext(_ctx, getState());
+ enterRule(_localctx, 40, RULE_switchStatement);
+ int _la;
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(276);
+ match(Switch);
+ setState(277);
+ match(OpenRoundBracket);
+ setState(278);
+ expression();
+ setState(279);
+ match(ClosedRoundBracket);
+ setState(280);
+ match(OpenCurlyBracket);
+ setState(282);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ do {
+ {
+ {
+ setState(281);
+ caseStatement();
+ }
+ }
+ setState(284);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ } while ( _la==Case );
+ setState(287);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ if (_la==Default) {
+ {
+ setState(286);
+ defaultStatement();
+ }
+ }
+
+ setState(289);
+ match(ClosedCurlyBracket);
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class CaseStatementContext extends ParserRuleContext {
+ public TerminalNode Case() { return getToken(SimpleJavaParser.Case, 0); }
+ public ValueContext value() {
+ return getRuleContext(ValueContext.class,0);
+ }
+ public TerminalNode Colon() { return getToken(SimpleJavaParser.Colon, 0); }
+ public List statement() {
+ return getRuleContexts(StatementContext.class);
+ }
+ public StatementContext statement(int i) {
+ return getRuleContext(StatementContext.class,i);
+ }
+ public CaseStatementContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_caseStatement; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterCaseStatement(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitCaseStatement(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitCaseStatement(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final CaseStatementContext caseStatement() throws RecognitionException {
+ CaseStatementContext _localctx = new CaseStatementContext(_ctx, getState());
+ enterRule(_localctx, 42, RULE_caseStatement);
+ int _la;
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(291);
+ match(Case);
+ setState(292);
+ value();
+ setState(293);
+ match(Colon);
+ setState(297);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 4537617915838582L) != 0)) {
+ {
+ {
+ setState(294);
+ statement();
+ }
+ }
+ setState(299);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ }
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class DefaultStatementContext extends ParserRuleContext {
+ public TerminalNode Default() { return getToken(SimpleJavaParser.Default, 0); }
+ public TerminalNode Colon() { return getToken(SimpleJavaParser.Colon, 0); }
+ public List statement() {
+ return getRuleContexts(StatementContext.class);
+ }
+ public StatementContext statement(int i) {
+ return getRuleContext(StatementContext.class,i);
+ }
+ public DefaultStatementContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_defaultStatement; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterDefaultStatement(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitDefaultStatement(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitDefaultStatement(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final DefaultStatementContext defaultStatement() throws RecognitionException {
+ DefaultStatementContext _localctx = new DefaultStatementContext(_ctx, getState());
+ enterRule(_localctx, 44, RULE_defaultStatement);
+ int _la;
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(300);
+ match(Default);
+ setState(301);
+ match(Colon);
+ setState(305);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 4537617915838582L) != 0)) {
+ {
+ {
+ setState(302);
+ statement();
+ }
+ }
+ setState(307);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ }
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class StatementExpressionContext extends ParserRuleContext {
+ public AssignContext assign() {
+ return getRuleContext(AssignContext.class,0);
+ }
+ public NewDeclarationContext newDeclaration() {
+ return getRuleContext(NewDeclarationContext.class,0);
+ }
+ public MethodCallContext methodCall() {
+ return getRuleContext(MethodCallContext.class,0);
+ }
+ public CrementExpressionContext crementExpression() {
+ return getRuleContext(CrementExpressionContext.class,0);
+ }
+ public StatementExpressionContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_statementExpression; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterStatementExpression(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitStatementExpression(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitStatementExpression(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final StatementExpressionContext statementExpression() throws RecognitionException {
+ StatementExpressionContext _localctx = new StatementExpressionContext(_ctx, getState());
+ enterRule(_localctx, 46, RULE_statementExpression);
+ try {
+ setState(312);
+ _errHandler.sync(this);
+ switch ( getInterpreter().adaptivePredict(_input,28,_ctx) ) {
+ case 1:
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(308);
+ assign();
+ }
+ break;
+ case 2:
+ enterOuterAlt(_localctx, 2);
+ {
+ setState(309);
+ newDeclaration();
+ }
+ break;
+ case 3:
+ enterOuterAlt(_localctx, 3);
+ {
+ setState(310);
+ methodCall();
+ }
+ break;
+ case 4:
+ enterOuterAlt(_localctx, 4);
+ {
+ setState(311);
+ crementExpression();
+ }
+ break;
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class AssignContext extends ParserRuleContext {
+ public AssignableExpressionContext assignableExpression() {
+ return getRuleContext(AssignableExpressionContext.class,0);
+ }
+ public TerminalNode Assign() { return getToken(SimpleJavaParser.Assign, 0); }
+ public ExpressionContext expression() {
+ return getRuleContext(ExpressionContext.class,0);
+ }
+ public AssignContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_assign; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterAssign(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitAssign(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitAssign(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final AssignContext assign() throws RecognitionException {
+ AssignContext _localctx = new AssignContext(_ctx, getState());
+ enterRule(_localctx, 48, RULE_assign);
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(314);
+ assignableExpression();
+ setState(315);
+ match(Assign);
+ setState(316);
+ expression();
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class NewDeclarationContext extends ParserRuleContext {
+ public TerminalNode New() { return getToken(SimpleJavaParser.New, 0); }
+ public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
+ public TerminalNode OpenRoundBracket() { return getToken(SimpleJavaParser.OpenRoundBracket, 0); }
+ public ArgumentListContext argumentList() {
+ return getRuleContext(ArgumentListContext.class,0);
+ }
+ public TerminalNode ClosedRoundBracket() { return getToken(SimpleJavaParser.ClosedRoundBracket, 0); }
+ public NewDeclarationContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_newDeclaration; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterNewDeclaration(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitNewDeclaration(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitNewDeclaration(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final NewDeclarationContext newDeclaration() throws RecognitionException {
+ NewDeclarationContext _localctx = new NewDeclarationContext(_ctx, getState());
+ enterRule(_localctx, 50, RULE_newDeclaration);
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(318);
+ match(New);
+ setState(319);
+ match(Identifier);
+ setState(320);
+ match(OpenRoundBracket);
+ setState(321);
+ argumentList();
+ setState(322);
+ match(ClosedRoundBracket);
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class ExpressionContext extends ParserRuleContext {
+ public UnaryExpressionContext unaryExpression() {
+ return getRuleContext(UnaryExpressionContext.class,0);
+ }
+ public BinaryExpressionContext binaryExpression() {
+ return getRuleContext(BinaryExpressionContext.class,0);
+ }
+ public ExpressionContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_expression; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterExpression(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitExpression(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitExpression(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final ExpressionContext expression() throws RecognitionException {
+ ExpressionContext _localctx = new ExpressionContext(_ctx, getState());
+ enterRule(_localctx, 52, RULE_expression);
+ try {
+ setState(326);
+ _errHandler.sync(this);
+ switch ( getInterpreter().adaptivePredict(_input,29,_ctx) ) {
+ case 1:
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(324);
+ unaryExpression();
+ }
+ break;
+ case 2:
+ enterOuterAlt(_localctx, 2);
+ {
+ setState(325);
+ binaryExpression();
+ }
+ break;
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class UnaryExpressionContext extends ParserRuleContext {
+ public TerminalNode This() { return getToken(SimpleJavaParser.This, 0); }
+ public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
+ public MemberAccessContext memberAccess() {
+ return getRuleContext(MemberAccessContext.class,0);
+ }
+ public ValueContext value() {
+ return getRuleContext(ValueContext.class,0);
+ }
+ public NotExpressionContext notExpression() {
+ return getRuleContext(NotExpressionContext.class,0);
+ }
+ public StatementExpressionContext statementExpression() {
+ return getRuleContext(StatementExpressionContext.class,0);
+ }
+ public TerminalNode OpenRoundBracket() { return getToken(SimpleJavaParser.OpenRoundBracket, 0); }
+ public ExpressionContext expression() {
+ return getRuleContext(ExpressionContext.class,0);
+ }
+ public TerminalNode ClosedRoundBracket() { return getToken(SimpleJavaParser.ClosedRoundBracket, 0); }
+ public UnaryExpressionContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_unaryExpression; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterUnaryExpression(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitUnaryExpression(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitUnaryExpression(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final UnaryExpressionContext unaryExpression() throws RecognitionException {
+ UnaryExpressionContext _localctx = new UnaryExpressionContext(_ctx, getState());
+ enterRule(_localctx, 54, RULE_unaryExpression);
+ try {
+ setState(338);
+ _errHandler.sync(this);
+ switch ( getInterpreter().adaptivePredict(_input,30,_ctx) ) {
+ case 1:
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(328);
+ match(This);
+ }
+ break;
+ case 2:
+ enterOuterAlt(_localctx, 2);
+ {
+ setState(329);
+ match(Identifier);
+ }
+ break;
+ case 3:
+ enterOuterAlt(_localctx, 3);
+ {
+ setState(330);
+ memberAccess();
+ }
+ break;
+ case 4:
+ enterOuterAlt(_localctx, 4);
+ {
+ setState(331);
+ value();
+ }
+ break;
+ case 5:
+ enterOuterAlt(_localctx, 5);
+ {
+ setState(332);
+ notExpression();
+ }
+ break;
+ case 6:
+ enterOuterAlt(_localctx, 6);
+ {
+ setState(333);
+ statementExpression();
+ }
+ break;
+ case 7:
+ enterOuterAlt(_localctx, 7);
+ {
+ setState(334);
+ match(OpenRoundBracket);
+ setState(335);
+ expression();
+ setState(336);
+ match(ClosedRoundBracket);
+ }
+ break;
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class NotExpressionContext extends ParserRuleContext {
+ public TerminalNode Not() { return getToken(SimpleJavaParser.Not, 0); }
+ public ExpressionContext expression() {
+ return getRuleContext(ExpressionContext.class,0);
+ }
+ public NotExpressionContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_notExpression; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterNotExpression(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitNotExpression(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitNotExpression(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final NotExpressionContext notExpression() throws RecognitionException {
+ NotExpressionContext _localctx = new NotExpressionContext(_ctx, getState());
+ enterRule(_localctx, 56, RULE_notExpression);
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(340);
+ match(Not);
+ setState(341);
+ expression();
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class CrementExpressionContext extends ParserRuleContext {
+ public IncrementExpressionContext incrementExpression() {
+ return getRuleContext(IncrementExpressionContext.class,0);
+ }
+ public DecrementExpressionContext decrementExpression() {
+ return getRuleContext(DecrementExpressionContext.class,0);
+ }
+ public CrementExpressionContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_crementExpression; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterCrementExpression(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitCrementExpression(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitCrementExpression(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final CrementExpressionContext crementExpression() throws RecognitionException {
+ CrementExpressionContext _localctx = new CrementExpressionContext(_ctx, getState());
+ enterRule(_localctx, 58, RULE_crementExpression);
+ try {
+ setState(345);
+ _errHandler.sync(this);
+ switch ( getInterpreter().adaptivePredict(_input,31,_ctx) ) {
+ case 1:
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(343);
+ incrementExpression();
+ }
+ break;
+ case 2:
+ enterOuterAlt(_localctx, 2);
+ {
+ setState(344);
+ decrementExpression();
+ }
+ break;
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class IncrementExpressionContext extends ParserRuleContext {
+ public PrefixIncrementExpressionContext prefixIncrementExpression() {
+ return getRuleContext(PrefixIncrementExpressionContext.class,0);
+ }
+ public SuffixIncrementExpressionContext suffixIncrementExpression() {
+ return getRuleContext(SuffixIncrementExpressionContext.class,0);
+ }
+ public IncrementExpressionContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_incrementExpression; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterIncrementExpression(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitIncrementExpression(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitIncrementExpression(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final IncrementExpressionContext incrementExpression() throws RecognitionException {
+ IncrementExpressionContext _localctx = new IncrementExpressionContext(_ctx, getState());
+ enterRule(_localctx, 60, RULE_incrementExpression);
+ try {
+ setState(349);
+ _errHandler.sync(this);
+ switch (_input.LA(1)) {
+ case T__0:
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(347);
+ prefixIncrementExpression();
+ }
+ break;
+ case This:
+ case Identifier:
+ enterOuterAlt(_localctx, 2);
+ {
+ setState(348);
+ suffixIncrementExpression();
+ }
+ break;
+ default:
+ throw new NoViableAltException(this);
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class PrefixIncrementExpressionContext extends ParserRuleContext {
+ public AssignableExpressionContext assignableExpression() {
+ return getRuleContext(AssignableExpressionContext.class,0);
+ }
+ public PrefixIncrementExpressionContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_prefixIncrementExpression; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterPrefixIncrementExpression(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitPrefixIncrementExpression(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitPrefixIncrementExpression(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final PrefixIncrementExpressionContext prefixIncrementExpression() throws RecognitionException {
+ PrefixIncrementExpressionContext _localctx = new PrefixIncrementExpressionContext(_ctx, getState());
+ enterRule(_localctx, 62, RULE_prefixIncrementExpression);
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(351);
+ match(T__0);
+ setState(352);
+ assignableExpression();
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class SuffixIncrementExpressionContext extends ParserRuleContext {
+ public AssignableExpressionContext assignableExpression() {
+ return getRuleContext(AssignableExpressionContext.class,0);
+ }
+ public SuffixIncrementExpressionContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_suffixIncrementExpression; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterSuffixIncrementExpression(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitSuffixIncrementExpression(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitSuffixIncrementExpression(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final SuffixIncrementExpressionContext suffixIncrementExpression() throws RecognitionException {
+ SuffixIncrementExpressionContext _localctx = new SuffixIncrementExpressionContext(_ctx, getState());
+ enterRule(_localctx, 64, RULE_suffixIncrementExpression);
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(354);
+ assignableExpression();
+ setState(355);
+ match(T__0);
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class DecrementExpressionContext extends ParserRuleContext {
+ public PrefixDecrementExpressionContext prefixDecrementExpression() {
+ return getRuleContext(PrefixDecrementExpressionContext.class,0);
+ }
+ public SuffixDecrementExpressionContext suffixDecrementExpression() {
+ return getRuleContext(SuffixDecrementExpressionContext.class,0);
+ }
+ public DecrementExpressionContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_decrementExpression; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterDecrementExpression(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitDecrementExpression(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitDecrementExpression(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final DecrementExpressionContext decrementExpression() throws RecognitionException {
+ DecrementExpressionContext _localctx = new DecrementExpressionContext(_ctx, getState());
+ enterRule(_localctx, 66, RULE_decrementExpression);
+ try {
+ setState(359);
+ _errHandler.sync(this);
+ switch (_input.LA(1)) {
+ case T__1:
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(357);
+ prefixDecrementExpression();
+ }
+ break;
+ case This:
+ case Identifier:
+ enterOuterAlt(_localctx, 2);
+ {
+ setState(358);
+ suffixDecrementExpression();
+ }
+ break;
+ default:
+ throw new NoViableAltException(this);
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class PrefixDecrementExpressionContext extends ParserRuleContext {
+ public AssignableExpressionContext assignableExpression() {
+ return getRuleContext(AssignableExpressionContext.class,0);
+ }
+ public PrefixDecrementExpressionContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_prefixDecrementExpression; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterPrefixDecrementExpression(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitPrefixDecrementExpression(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitPrefixDecrementExpression(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final PrefixDecrementExpressionContext prefixDecrementExpression() throws RecognitionException {
+ PrefixDecrementExpressionContext _localctx = new PrefixDecrementExpressionContext(_ctx, getState());
+ enterRule(_localctx, 68, RULE_prefixDecrementExpression);
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(361);
+ match(T__1);
+ setState(362);
+ assignableExpression();
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class SuffixDecrementExpressionContext extends ParserRuleContext {
+ public AssignableExpressionContext assignableExpression() {
+ return getRuleContext(AssignableExpressionContext.class,0);
+ }
+ public SuffixDecrementExpressionContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_suffixDecrementExpression; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterSuffixDecrementExpression(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitSuffixDecrementExpression(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitSuffixDecrementExpression(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final SuffixDecrementExpressionContext suffixDecrementExpression() throws RecognitionException {
+ SuffixDecrementExpressionContext _localctx = new SuffixDecrementExpressionContext(_ctx, getState());
+ enterRule(_localctx, 70, RULE_suffixDecrementExpression);
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(364);
+ assignableExpression();
+ setState(365);
+ match(T__1);
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class AssignableExpressionContext extends ParserRuleContext {
+ public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
+ public MemberAccessContext memberAccess() {
+ return getRuleContext(MemberAccessContext.class,0);
+ }
+ public AssignableExpressionContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_assignableExpression; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterAssignableExpression(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitAssignableExpression(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitAssignableExpression(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final AssignableExpressionContext assignableExpression() throws RecognitionException {
+ AssignableExpressionContext _localctx = new AssignableExpressionContext(_ctx, getState());
+ enterRule(_localctx, 72, RULE_assignableExpression);
+ try {
+ setState(369);
+ _errHandler.sync(this);
+ switch ( getInterpreter().adaptivePredict(_input,34,_ctx) ) {
+ case 1:
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(367);
+ match(Identifier);
+ }
+ break;
+ case 2:
+ enterOuterAlt(_localctx, 2);
+ {
+ setState(368);
+ memberAccess();
+ }
+ break;
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class MemberAccessContext extends ParserRuleContext {
+ public TerminalNode This() { return getToken(SimpleJavaParser.This, 0); }
+ public List Dot() { return getTokens(SimpleJavaParser.Dot); }
+ public TerminalNode Dot(int i) {
+ return getToken(SimpleJavaParser.Dot, i);
+ }
+ public List Identifier() { return getTokens(SimpleJavaParser.Identifier); }
+ public TerminalNode Identifier(int i) {
+ return getToken(SimpleJavaParser.Identifier, i);
+ }
+ public MemberAccessContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_memberAccess; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterMemberAccess(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitMemberAccess(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitMemberAccess(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final MemberAccessContext memberAccess() throws RecognitionException {
+ MemberAccessContext _localctx = new MemberAccessContext(_ctx, getState());
+ enterRule(_localctx, 74, RULE_memberAccess);
+ int _la;
+ try {
+ int _alt;
+ setState(385);
+ _errHandler.sync(this);
+ switch ( getInterpreter().adaptivePredict(_input,37,_ctx) ) {
+ case 1:
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(371);
+ match(This);
+ setState(372);
+ match(Dot);
+ setState(373);
+ match(Identifier);
+ }
+ break;
+ case 2:
+ enterOuterAlt(_localctx, 2);
+ {
+ setState(376);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ if (_la==This) {
+ {
+ setState(374);
+ match(This);
+ setState(375);
+ match(Dot);
+ }
+ }
+
+ setState(380);
+ _errHandler.sync(this);
+ _alt = 1;
+ do {
+ switch (_alt) {
+ case 1:
+ {
+ {
+ setState(378);
+ match(Identifier);
+ setState(379);
+ match(Dot);
+ }
+ }
+ break;
+ default:
+ throw new NoViableAltException(this);
+ }
+ setState(382);
+ _errHandler.sync(this);
+ _alt = getInterpreter().adaptivePredict(_input,36,_ctx);
+ } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER );
+ setState(384);
+ match(Identifier);
+ }
+ break;
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class BinaryExpressionContext extends ParserRuleContext {
+ public CalculationExpressionContext calculationExpression() {
+ return getRuleContext(CalculationExpressionContext.class,0);
+ }
+ public NonCalculationExpressionContext nonCalculationExpression() {
+ return getRuleContext(NonCalculationExpressionContext.class,0);
+ }
+ public BinaryExpressionContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_binaryExpression; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterBinaryExpression(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitBinaryExpression(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitBinaryExpression(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final BinaryExpressionContext binaryExpression() throws RecognitionException {
+ BinaryExpressionContext _localctx = new BinaryExpressionContext(_ctx, getState());
+ enterRule(_localctx, 76, RULE_binaryExpression);
+ try {
+ setState(389);
+ _errHandler.sync(this);
+ switch ( getInterpreter().adaptivePredict(_input,38,_ctx) ) {
+ case 1:
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(387);
+ calculationExpression(0);
+ }
+ break;
+ case 2:
+ enterOuterAlt(_localctx, 2);
+ {
+ setState(388);
+ nonCalculationExpression();
+ }
+ break;
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class CalculationExpressionContext extends ParserRuleContext {
+ public DotExpressionContext dotExpression() {
+ return getRuleContext(DotExpressionContext.class,0);
+ }
+ public CalculationExpressionContext calculationExpression() {
+ return getRuleContext(CalculationExpressionContext.class,0);
+ }
+ public TerminalNode LineOperator() { return getToken(SimpleJavaParser.LineOperator, 0); }
+ public CalculationExpressionContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_calculationExpression; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterCalculationExpression(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitCalculationExpression(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitCalculationExpression(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final CalculationExpressionContext calculationExpression() throws RecognitionException {
+ return calculationExpression(0);
+ }
+
+ private CalculationExpressionContext calculationExpression(int _p) throws RecognitionException {
+ ParserRuleContext _parentctx = _ctx;
+ int _parentState = getState();
+ CalculationExpressionContext _localctx = new CalculationExpressionContext(_ctx, _parentState);
+ CalculationExpressionContext _prevctx = _localctx;
+ int _startState = 78;
+ enterRecursionRule(_localctx, 78, RULE_calculationExpression, _p);
+ try {
+ int _alt;
+ enterOuterAlt(_localctx, 1);
+ {
+ {
+ setState(392);
+ dotExpression(0);
+ }
+ _ctx.stop = _input.LT(-1);
+ setState(399);
+ _errHandler.sync(this);
+ _alt = getInterpreter().adaptivePredict(_input,39,_ctx);
+ while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
+ if ( _alt==1 ) {
+ if ( _parseListeners!=null ) triggerExitRuleEvent();
+ _prevctx = _localctx;
+ {
+ {
+ _localctx = new CalculationExpressionContext(_parentctx, _parentState);
+ pushNewRecursionContext(_localctx, _startState, RULE_calculationExpression);
+ setState(394);
+ if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)");
+ setState(395);
+ match(LineOperator);
+ setState(396);
+ dotExpression(0);
+ }
+ }
+ }
+ setState(401);
+ _errHandler.sync(this);
+ _alt = getInterpreter().adaptivePredict(_input,39,_ctx);
+ }
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ unrollRecursionContexts(_parentctx);
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class DotExpressionContext extends ParserRuleContext {
+ public DotSubtractionExpressionContext dotSubtractionExpression() {
+ return getRuleContext(DotSubtractionExpressionContext.class,0);
+ }
+ public DotExpressionContext dotExpression() {
+ return getRuleContext(DotExpressionContext.class,0);
+ }
+ public TerminalNode DotOperator() { return getToken(SimpleJavaParser.DotOperator, 0); }
+ public DotExpressionContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_dotExpression; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterDotExpression(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitDotExpression(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitDotExpression(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final DotExpressionContext dotExpression() throws RecognitionException {
+ return dotExpression(0);
+ }
+
+ private DotExpressionContext dotExpression(int _p) throws RecognitionException {
+ ParserRuleContext _parentctx = _ctx;
+ int _parentState = getState();
+ DotExpressionContext _localctx = new DotExpressionContext(_ctx, _parentState);
+ DotExpressionContext _prevctx = _localctx;
+ int _startState = 80;
+ enterRecursionRule(_localctx, 80, RULE_dotExpression, _p);
+ try {
+ int _alt;
+ enterOuterAlt(_localctx, 1);
+ {
+ {
+ setState(403);
+ dotSubtractionExpression();
+ }
+ _ctx.stop = _input.LT(-1);
+ setState(410);
+ _errHandler.sync(this);
+ _alt = getInterpreter().adaptivePredict(_input,40,_ctx);
+ while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
+ if ( _alt==1 ) {
+ if ( _parseListeners!=null ) triggerExitRuleEvent();
+ _prevctx = _localctx;
+ {
+ {
+ _localctx = new DotExpressionContext(_parentctx, _parentState);
+ pushNewRecursionContext(_localctx, _startState, RULE_dotExpression);
+ setState(405);
+ if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)");
+ setState(406);
+ match(DotOperator);
+ setState(407);
+ dotSubtractionExpression();
+ }
+ }
+ }
+ setState(412);
+ _errHandler.sync(this);
+ _alt = getInterpreter().adaptivePredict(_input,40,_ctx);
+ }
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ unrollRecursionContexts(_parentctx);
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class DotSubtractionExpressionContext extends ParserRuleContext {
+ public TerminalNode IntValue() { return getToken(SimpleJavaParser.IntValue, 0); }
+ public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
+ public MemberAccessContext memberAccess() {
+ return getRuleContext(MemberAccessContext.class,0);
+ }
+ public MethodCallContext methodCall() {
+ return getRuleContext(MethodCallContext.class,0);
+ }
+ public TerminalNode OpenRoundBracket() { return getToken(SimpleJavaParser.OpenRoundBracket, 0); }
+ public CalculationExpressionContext calculationExpression() {
+ return getRuleContext(CalculationExpressionContext.class,0);
+ }
+ public TerminalNode ClosedRoundBracket() { return getToken(SimpleJavaParser.ClosedRoundBracket, 0); }
+ public DotSubtractionExpressionContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_dotSubtractionExpression; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterDotSubtractionExpression(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitDotSubtractionExpression(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitDotSubtractionExpression(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final DotSubtractionExpressionContext dotSubtractionExpression() throws RecognitionException {
+ DotSubtractionExpressionContext _localctx = new DotSubtractionExpressionContext(_ctx, getState());
+ enterRule(_localctx, 82, RULE_dotSubtractionExpression);
+ try {
+ setState(421);
+ _errHandler.sync(this);
+ switch ( getInterpreter().adaptivePredict(_input,41,_ctx) ) {
+ case 1:
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(413);
+ match(IntValue);
+ }
+ break;
+ case 2:
+ enterOuterAlt(_localctx, 2);
+ {
+ setState(414);
+ match(Identifier);
+ }
+ break;
+ case 3:
+ enterOuterAlt(_localctx, 3);
+ {
+ setState(415);
+ memberAccess();
+ }
+ break;
+ case 4:
+ enterOuterAlt(_localctx, 4);
+ {
+ setState(416);
+ methodCall();
+ setState(417);
+ match(OpenRoundBracket);
+ setState(418);
+ calculationExpression(0);
+ setState(419);
+ match(ClosedRoundBracket);
+ }
+ break;
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class NonCalculationExpressionContext extends ParserRuleContext {
+ public UnaryExpressionContext unaryExpression() {
+ return getRuleContext(UnaryExpressionContext.class,0);
+ }
+ public NonCalculationOperatorContext nonCalculationOperator() {
+ return getRuleContext(NonCalculationOperatorContext.class,0);
+ }
+ public ExpressionContext expression() {
+ return getRuleContext(ExpressionContext.class,0);
+ }
+ public NonCalculationExpressionContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_nonCalculationExpression; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterNonCalculationExpression(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitNonCalculationExpression(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitNonCalculationExpression(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final NonCalculationExpressionContext nonCalculationExpression() throws RecognitionException {
+ NonCalculationExpressionContext _localctx = new NonCalculationExpressionContext(_ctx, getState());
+ enterRule(_localctx, 84, RULE_nonCalculationExpression);
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(423);
+ unaryExpression();
+ setState(424);
+ nonCalculationOperator();
+ setState(425);
+ expression();
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class MethodCallContext extends ParserRuleContext {
+ public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
+ public TerminalNode OpenRoundBracket() { return getToken(SimpleJavaParser.OpenRoundBracket, 0); }
+ public ArgumentListContext argumentList() {
+ return getRuleContext(ArgumentListContext.class,0);
+ }
+ public TerminalNode ClosedRoundBracket() { return getToken(SimpleJavaParser.ClosedRoundBracket, 0); }
+ public TargetContext target() {
+ return getRuleContext(TargetContext.class,0);
+ }
+ public List chainedMethod() {
+ return getRuleContexts(ChainedMethodContext.class);
+ }
+ public ChainedMethodContext chainedMethod(int i) {
+ return getRuleContext(ChainedMethodContext.class,i);
+ }
+ public MethodCallContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_methodCall; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterMethodCall(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitMethodCall(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitMethodCall(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final MethodCallContext methodCall() throws RecognitionException {
+ MethodCallContext _localctx = new MethodCallContext(_ctx, getState());
+ enterRule(_localctx, 86, RULE_methodCall);
+ try {
+ int _alt;
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(428);
+ _errHandler.sync(this);
+ switch ( getInterpreter().adaptivePredict(_input,42,_ctx) ) {
+ case 1:
+ {
+ setState(427);
+ target();
+ }
+ break;
+ }
+ setState(433);
+ _errHandler.sync(this);
+ _alt = getInterpreter().adaptivePredict(_input,43,_ctx);
+ while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
+ if ( _alt==1 ) {
+ {
+ {
+ setState(430);
+ chainedMethod();
+ }
+ }
+ }
+ setState(435);
+ _errHandler.sync(this);
+ _alt = getInterpreter().adaptivePredict(_input,43,_ctx);
+ }
+ setState(436);
+ match(Identifier);
+ setState(437);
+ match(OpenRoundBracket);
+ setState(438);
+ argumentList();
+ setState(439);
+ match(ClosedRoundBracket);
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class TargetContext extends ParserRuleContext {
+ public TerminalNode Dot() { return getToken(SimpleJavaParser.Dot, 0); }
+ public TerminalNode This() { return getToken(SimpleJavaParser.This, 0); }
+ public MemberAccessContext memberAccess() {
+ return getRuleContext(MemberAccessContext.class,0);
+ }
+ public NewDeclarationContext newDeclaration() {
+ return getRuleContext(NewDeclarationContext.class,0);
+ }
+ public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
+ public TargetContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_target; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterTarget(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitTarget(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitTarget(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final TargetContext target() throws RecognitionException {
+ TargetContext _localctx = new TargetContext(_ctx, getState());
+ enterRule(_localctx, 88, RULE_target);
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(445);
+ _errHandler.sync(this);
+ switch ( getInterpreter().adaptivePredict(_input,44,_ctx) ) {
+ case 1:
+ {
+ setState(441);
+ match(This);
+ }
+ break;
+ case 2:
+ {
+ setState(442);
+ memberAccess();
+ }
+ break;
+ case 3:
+ {
+ setState(443);
+ newDeclaration();
+ }
+ break;
+ case 4:
+ {
+ setState(444);
+ match(Identifier);
+ }
+ break;
+ }
+ setState(447);
+ match(Dot);
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class ChainedMethodContext extends ParserRuleContext {
+ public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
+ public TerminalNode OpenRoundBracket() { return getToken(SimpleJavaParser.OpenRoundBracket, 0); }
+ public ArgumentListContext argumentList() {
+ return getRuleContext(ArgumentListContext.class,0);
+ }
+ public TerminalNode ClosedRoundBracket() { return getToken(SimpleJavaParser.ClosedRoundBracket, 0); }
+ public TerminalNode Dot() { return getToken(SimpleJavaParser.Dot, 0); }
+ public ChainedMethodContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_chainedMethod; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterChainedMethod(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitChainedMethod(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitChainedMethod(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final ChainedMethodContext chainedMethod() throws RecognitionException {
+ ChainedMethodContext _localctx = new ChainedMethodContext(_ctx, getState());
+ enterRule(_localctx, 90, RULE_chainedMethod);
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(449);
+ match(Identifier);
+ setState(450);
+ match(OpenRoundBracket);
+ setState(451);
+ argumentList();
+ setState(452);
+ match(ClosedRoundBracket);
+ setState(453);
+ match(Dot);
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class TypeContext extends ParserRuleContext {
+ public TerminalNode Int() { return getToken(SimpleJavaParser.Int, 0); }
+ public TerminalNode Boolean() { return getToken(SimpleJavaParser.Boolean, 0); }
+ public TerminalNode Char() { return getToken(SimpleJavaParser.Char, 0); }
+ public TerminalNode Identifier() { return getToken(SimpleJavaParser.Identifier, 0); }
+ public TypeContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_type; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterType(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitType(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitType(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final TypeContext type() throws RecognitionException {
+ TypeContext _localctx = new TypeContext(_ctx, getState());
+ enterRule(_localctx, 92, RULE_type);
+ int _la;
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(455);
+ _la = _input.LA(1);
+ if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 4503599627370608L) != 0)) ) {
+ _errHandler.recoverInline(this);
+ }
+ else {
+ if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
+ _errHandler.reportMatch(this);
+ consume();
+ }
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class ValueContext extends ParserRuleContext {
+ public TerminalNode IntValue() { return getToken(SimpleJavaParser.IntValue, 0); }
+ public TerminalNode BooleanValue() { return getToken(SimpleJavaParser.BooleanValue, 0); }
+ public TerminalNode CharValue() { return getToken(SimpleJavaParser.CharValue, 0); }
+ public TerminalNode NullValue() { return getToken(SimpleJavaParser.NullValue, 0); }
+ public ValueContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_value; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterValue(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitValue(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitValue(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final ValueContext value() throws RecognitionException {
+ ValueContext _localctx = new ValueContext(_ctx, getState());
+ enterRule(_localctx, 94, RULE_value);
+ int _la;
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(457);
+ _la = _input.LA(1);
+ if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 4222124650659840L) != 0)) ) {
+ _errHandler.recoverInline(this);
+ }
+ else {
+ if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
+ _errHandler.reportMatch(this);
+ consume();
+ }
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ @SuppressWarnings("CheckReturnValue")
+ public static class NonCalculationOperatorContext extends ParserRuleContext {
+ public TerminalNode LogicalOperator() { return getToken(SimpleJavaParser.LogicalOperator, 0); }
+ public TerminalNode ComparisonOperator() { return getToken(SimpleJavaParser.ComparisonOperator, 0); }
+ public NonCalculationOperatorContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_nonCalculationOperator; }
+ @Override
+ public void enterRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).enterNonCalculationOperator(this);
+ }
+ @Override
+ public void exitRule(ParseTreeListener listener) {
+ if ( listener instanceof SimpleJavaListener ) ((SimpleJavaListener)listener).exitNonCalculationOperator(this);
+ }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof SimpleJavaVisitor ) return ((SimpleJavaVisitor extends T>)visitor).visitNonCalculationOperator(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final NonCalculationOperatorContext nonCalculationOperator() throws RecognitionException {
+ NonCalculationOperatorContext _localctx = new NonCalculationOperatorContext(_ctx, getState());
+ enterRule(_localctx, 96, RULE_nonCalculationOperator);
+ int _la;
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(459);
+ _la = _input.LA(1);
+ if ( !(_la==ComparisonOperator || _la==LogicalOperator) ) {
+ _errHandler.recoverInline(this);
+ }
+ else {
+ if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
+ _errHandler.reportMatch(this);
+ consume();
+ }
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) {
+ switch (ruleIndex) {
+ case 39:
+ return calculationExpression_sempred((CalculationExpressionContext)_localctx, predIndex);
+ case 40:
+ return dotExpression_sempred((DotExpressionContext)_localctx, predIndex);
+ }
+ return true;
+ }
+ private boolean calculationExpression_sempred(CalculationExpressionContext _localctx, int predIndex) {
+ switch (predIndex) {
+ case 0:
+ return precpred(_ctx, 2);
+ }
+ return true;
+ }
+ private boolean dotExpression_sempred(DotExpressionContext _localctx, int predIndex) {
+ switch (predIndex) {
+ case 1:
+ return precpred(_ctx, 2);
+ }
+ return true;
+ }
+
+ public static final String _serializedATN =
+ "\u0004\u00017\u01ce\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"+
+ "\f\u0007\f\u0002\r\u0007\r\u0002\u000e\u0007\u000e\u0002\u000f\u0007\u000f"+
+ "\u0002\u0010\u0007\u0010\u0002\u0011\u0007\u0011\u0002\u0012\u0007\u0012"+
+ "\u0002\u0013\u0007\u0013\u0002\u0014\u0007\u0014\u0002\u0015\u0007\u0015"+
+ "\u0002\u0016\u0007\u0016\u0002\u0017\u0007\u0017\u0002\u0018\u0007\u0018"+
+ "\u0002\u0019\u0007\u0019\u0002\u001a\u0007\u001a\u0002\u001b\u0007\u001b"+
+ "\u0002\u001c\u0007\u001c\u0002\u001d\u0007\u001d\u0002\u001e\u0007\u001e"+
+ "\u0002\u001f\u0007\u001f\u0002 \u0007 \u0002!\u0007!\u0002\"\u0007\"\u0002"+
+ "#\u0007#\u0002$\u0007$\u0002%\u0007%\u0002&\u0007&\u0002\'\u0007\'\u0002"+
+ "(\u0007(\u0002)\u0007)\u0002*\u0007*\u0002+\u0007+\u0002,\u0007,\u0002"+
+ "-\u0007-\u0002.\u0007.\u0002/\u0007/\u00020\u00070\u0001\u0000\u0004\u0000"+
+ "d\b\u0000\u000b\u0000\f\u0000e\u0001\u0001\u0003\u0001i\b\u0001\u0001"+
+ "\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0005\u0001o\b\u0001\n\u0001"+
+ "\f\u0001r\t\u0001\u0001\u0001\u0001\u0001\u0001\u0002\u0001\u0002\u0001"+
+ "\u0002\u0003\u0002y\b\u0002\u0001\u0003\u0003\u0003|\b\u0003\u0001\u0003"+
+ "\u0001\u0003\u0001\u0003\u0003\u0003\u0081\b\u0003\u0001\u0003\u0001\u0003"+
+ "\u0001\u0003\u0001\u0004\u0003\u0004\u0087\b\u0004\u0001\u0004\u0001\u0004"+
+ "\u0001\u0004\u0001\u0004\u0003\u0004\u008d\b\u0004\u0001\u0004\u0001\u0004"+
+ "\u0001\u0005\u0001\u0005\u0001\u0005\u0003\u0005\u0094\b\u0005\u0001\u0005"+
+ "\u0001\u0005\u0003\u0005\u0098\b\u0005\u0001\u0005\u0001\u0005\u0001\u0005"+
+ "\u0003\u0005\u009d\b\u0005\u0001\u0005\u0001\u0005\u0003\u0005\u00a1\b"+
+ "\u0005\u0001\u0006\u0001\u0006\u0001\u0006\u0005\u0006\u00a6\b\u0006\n"+
+ "\u0006\f\u0006\u00a9\t\u0006\u0001\u0007\u0001\u0007\u0001\u0007\u0001"+
+ "\b\u0001\b\u0001\b\u0005\b\u00b1\b\b\n\b\f\b\u00b4\t\b\u0003\b\u00b6\b"+
+ "\b\u0001\t\u0001\t\u0001\t\u0001\t\u0001\t\u0001\t\u0001\t\u0001\t\u0001"+
+ "\t\u0001\t\u0001\t\u0001\t\u0001\t\u0001\t\u0001\t\u0003\t\u00c7\b\t\u0001"+
+ "\n\u0001\n\u0005\n\u00cb\b\n\n\n\f\n\u00ce\t\n\u0001\n\u0001\n\u0001\u000b"+
+ "\u0001\u000b\u0003\u000b\u00d4\b\u000b\u0001\f\u0001\f\u0001\f\u0001\f"+
+ "\u0003\f\u00da\b\f\u0001\r\u0001\r\u0001\r\u0001\r\u0001\r\u0001\r\u0001"+
+ "\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0001"+
+ "\u000e\u0001\u000e\u0001\u000f\u0001\u000f\u0001\u000f\u0001\u000f\u0003"+
+ "\u000f\u00ee\b\u000f\u0001\u000f\u0001\u000f\u0003\u000f\u00f2\b\u000f"+
+ "\u0001\u000f\u0001\u000f\u0003\u000f\u00f6\b\u000f\u0001\u000f\u0001\u000f"+
+ "\u0001\u000f\u0001\u0010\u0001\u0010\u0005\u0010\u00fd\b\u0010\n\u0010"+
+ "\f\u0010\u0100\t\u0010\u0001\u0010\u0003\u0010\u0103\b\u0010\u0001\u0011"+
+ "\u0001\u0011\u0001\u0011\u0001\u0011\u0001\u0011\u0001\u0011\u0001\u0012"+
+ "\u0001\u0012\u0001\u0012\u0001\u0012\u0001\u0012\u0001\u0012\u0001\u0012"+
+ "\u0001\u0013\u0001\u0013\u0001\u0013\u0001\u0014\u0001\u0014\u0001\u0014"+
+ "\u0001\u0014\u0001\u0014\u0001\u0014\u0004\u0014\u011b\b\u0014\u000b\u0014"+
+ "\f\u0014\u011c\u0001\u0014\u0003\u0014\u0120\b\u0014\u0001\u0014\u0001"+
+ "\u0014\u0001\u0015\u0001\u0015\u0001\u0015\u0001\u0015\u0005\u0015\u0128"+
+ "\b\u0015\n\u0015\f\u0015\u012b\t\u0015\u0001\u0016\u0001\u0016\u0001\u0016"+
+ "\u0005\u0016\u0130\b\u0016\n\u0016\f\u0016\u0133\t\u0016\u0001\u0017\u0001"+
+ "\u0017\u0001\u0017\u0001\u0017\u0003\u0017\u0139\b\u0017\u0001\u0018\u0001"+
+ "\u0018\u0001\u0018\u0001\u0018\u0001\u0019\u0001\u0019\u0001\u0019\u0001"+
+ "\u0019\u0001\u0019\u0001\u0019\u0001\u001a\u0001\u001a\u0003\u001a\u0147"+
+ "\b\u001a\u0001\u001b\u0001\u001b\u0001\u001b\u0001\u001b\u0001\u001b\u0001"+
+ "\u001b\u0001\u001b\u0001\u001b\u0001\u001b\u0001\u001b\u0003\u001b\u0153"+
+ "\b\u001b\u0001\u001c\u0001\u001c\u0001\u001c\u0001\u001d\u0001\u001d\u0003"+
+ "\u001d\u015a\b\u001d\u0001\u001e\u0001\u001e\u0003\u001e\u015e\b\u001e"+
+ "\u0001\u001f\u0001\u001f\u0001\u001f\u0001 \u0001 \u0001 \u0001!\u0001"+
+ "!\u0003!\u0168\b!\u0001\"\u0001\"\u0001\"\u0001#\u0001#\u0001#\u0001$"+
+ "\u0001$\u0003$\u0172\b$\u0001%\u0001%\u0001%\u0001%\u0001%\u0003%\u0179"+
+ "\b%\u0001%\u0001%\u0004%\u017d\b%\u000b%\f%\u017e\u0001%\u0003%\u0182"+
+ "\b%\u0001&\u0001&\u0003&\u0186\b&\u0001\'\u0001\'\u0001\'\u0001\'\u0001"+
+ "\'\u0001\'\u0005\'\u018e\b\'\n\'\f\'\u0191\t\'\u0001(\u0001(\u0001(\u0001"+
+ "(\u0001(\u0001(\u0005(\u0199\b(\n(\f(\u019c\t(\u0001)\u0001)\u0001)\u0001"+
+ ")\u0001)\u0001)\u0001)\u0001)\u0003)\u01a6\b)\u0001*\u0001*\u0001*\u0001"+
+ "*\u0001+\u0003+\u01ad\b+\u0001+\u0005+\u01b0\b+\n+\f+\u01b3\t+\u0001+"+
+ "\u0001+\u0001+\u0001+\u0001+\u0001,\u0001,\u0001,\u0001,\u0003,\u01be"+
+ "\b,\u0001,\u0001,\u0001-\u0001-\u0001-\u0001-\u0001-\u0001-\u0001.\u0001"+
+ ".\u0001/\u0001/\u00010\u00010\u00010\u0000\u0002NP1\u0000\u0002\u0004"+
+ "\u0006\b\n\f\u000e\u0010\u0012\u0014\u0016\u0018\u001a\u001c\u001e \""+
+ "$&(*,.02468:<>@BDFHJLNPRTVXZ\\^`\u0000\u0003\u0002\u0000\u0004\u00064"+
+ "4\u0001\u000003\u0001\u0000\u000b\f\u01dc\u0000c\u0001\u0000\u0000\u0000"+
+ "\u0002h\u0001\u0000\u0000\u0000\u0004x\u0001\u0000\u0000\u0000\u0006{"+
+ "\u0001\u0000\u0000\u0000\b\u0086\u0001\u0000\u0000\u0000\n\u00a0\u0001"+
+ "\u0000\u0000\u0000\f\u00a2\u0001\u0000\u0000\u0000\u000e\u00aa\u0001\u0000"+
+ "\u0000\u0000\u0010\u00b5\u0001\u0000\u0000\u0000\u0012\u00c6\u0001\u0000"+
+ "\u0000\u0000\u0014\u00c8\u0001\u0000\u0000\u0000\u0016\u00d1\u0001\u0000"+
+ "\u0000\u0000\u0018\u00d5\u0001\u0000\u0000\u0000\u001a\u00db\u0001\u0000"+
+ "\u0000\u0000\u001c\u00e1\u0001\u0000\u0000\u0000\u001e\u00e9\u0001\u0000"+
+ "\u0000\u0000 \u00fa\u0001\u0000\u0000\u0000\"\u0104\u0001\u0000\u0000"+
+ "\u0000$\u010a\u0001\u0000\u0000\u0000&\u0111\u0001\u0000\u0000\u0000("+
+ "\u0114\u0001\u0000\u0000\u0000*\u0123\u0001\u0000\u0000\u0000,\u012c\u0001"+
+ "\u0000\u0000\u0000.\u0138\u0001\u0000\u0000\u00000\u013a\u0001\u0000\u0000"+
+ "\u00002\u013e\u0001\u0000\u0000\u00004\u0146\u0001\u0000\u0000\u00006"+
+ "\u0152\u0001\u0000\u0000\u00008\u0154\u0001\u0000\u0000\u0000:\u0159\u0001"+
+ "\u0000\u0000\u0000<\u015d\u0001\u0000\u0000\u0000>\u015f\u0001\u0000\u0000"+
+ "\u0000@\u0162\u0001\u0000\u0000\u0000B\u0167\u0001\u0000\u0000\u0000D"+
+ "\u0169\u0001\u0000\u0000\u0000F\u016c\u0001\u0000\u0000\u0000H\u0171\u0001"+
+ "\u0000\u0000\u0000J\u0181\u0001\u0000\u0000\u0000L\u0185\u0001\u0000\u0000"+
+ "\u0000N\u0187\u0001\u0000\u0000\u0000P\u0192\u0001\u0000\u0000\u0000R"+
+ "\u01a5\u0001\u0000\u0000\u0000T\u01a7\u0001\u0000\u0000\u0000V\u01ac\u0001"+
+ "\u0000\u0000\u0000X\u01bd\u0001\u0000\u0000\u0000Z\u01c1\u0001\u0000\u0000"+
+ "\u0000\\\u01c7\u0001\u0000\u0000\u0000^\u01c9\u0001\u0000\u0000\u0000"+
+ "`\u01cb\u0001\u0000\u0000\u0000bd\u0003\u0002\u0001\u0000cb\u0001\u0000"+
+ "\u0000\u0000de\u0001\u0000\u0000\u0000ec\u0001\u0000\u0000\u0000ef\u0001"+
+ "\u0000\u0000\u0000f\u0001\u0001\u0000\u0000\u0000gi\u0005\u0007\u0000"+
+ "\u0000hg\u0001\u0000\u0000\u0000hi\u0001\u0000\u0000\u0000ij\u0001\u0000"+
+ "\u0000\u0000jk\u0005#\u0000\u0000kl\u00054\u0000\u0000lp\u0005\u001f\u0000"+
+ "\u0000mo\u0003\u0004\u0002\u0000nm\u0001\u0000\u0000\u0000or\u0001\u0000"+
+ "\u0000\u0000pn\u0001\u0000\u0000\u0000pq\u0001\u0000\u0000\u0000qs\u0001"+
+ "\u0000\u0000\u0000rp\u0001\u0000\u0000\u0000st\u0005 \u0000\u0000t\u0003"+
+ "\u0001\u0000\u0000\u0000uy\u0003\u0006\u0003\u0000vy\u0003\b\u0004\u0000"+
+ "wy\u0003\n\u0005\u0000xu\u0001\u0000\u0000\u0000xv\u0001\u0000\u0000\u0000"+
+ "xw\u0001\u0000\u0000\u0000y\u0005\u0001\u0000\u0000\u0000z|\u0005\u0007"+
+ "\u0000\u0000{z\u0001\u0000\u0000\u0000{|\u0001\u0000\u0000\u0000|}\u0001"+
+ "\u0000\u0000\u0000}~\u00054\u0000\u0000~\u0080\u0005\u001d\u0000\u0000"+
+ "\u007f\u0081\u0003\f\u0006\u0000\u0080\u007f\u0001\u0000\u0000\u0000\u0080"+
+ "\u0081\u0001\u0000\u0000\u0000\u0081\u0082\u0001\u0000\u0000\u0000\u0082"+
+ "\u0083\u0005\u001e\u0000\u0000\u0083\u0084\u0003\u0014\n\u0000\u0084\u0007"+
+ "\u0001\u0000\u0000\u0000\u0085\u0087\u0005\u0007\u0000\u0000\u0086\u0085"+
+ "\u0001\u0000\u0000\u0000\u0086\u0087\u0001\u0000\u0000\u0000\u0087\u0088"+
+ "\u0001\u0000\u0000\u0000\u0088\u0089\u0003\\.\u0000\u0089\u008c\u0005"+
+ "4\u0000\u0000\u008a\u008b\u0005\r\u0000\u0000\u008b\u008d\u00034\u001a"+
+ "\u0000\u008c\u008a\u0001\u0000\u0000\u0000\u008c\u008d\u0001\u0000\u0000"+
+ "\u0000\u008d\u008e\u0001\u0000\u0000\u0000\u008e\u008f\u0005!\u0000\u0000"+
+ "\u008f\t\u0001\u0000\u0000\u0000\u0090\u0091\u0005\b\u0000\u0000\u0091"+
+ "\u00a1\u0003\u0014\n\u0000\u0092\u0094\u0005\u0007\u0000\u0000\u0093\u0092"+
+ "\u0001\u0000\u0000\u0000\u0093\u0094\u0001\u0000\u0000\u0000\u0094\u0097"+
+ "\u0001\u0000\u0000\u0000\u0095\u0098\u0003\\.\u0000\u0096\u0098\u0005"+
+ "\u0003\u0000\u0000\u0097\u0095\u0001\u0000\u0000\u0000\u0097\u0096\u0001"+
+ "\u0000\u0000\u0000\u0098\u0099\u0001\u0000\u0000\u0000\u0099\u009a\u0005"+
+ "4\u0000\u0000\u009a\u009c\u0005\u001d\u0000\u0000\u009b\u009d\u0003\f"+
+ "\u0006\u0000\u009c\u009b\u0001\u0000\u0000\u0000\u009c\u009d\u0001\u0000"+
+ "\u0000\u0000\u009d\u009e\u0001\u0000\u0000\u0000\u009e\u009f\u0005\u001e"+
+ "\u0000\u0000\u009f\u00a1\u0003\u0014\n\u0000\u00a0\u0090\u0001\u0000\u0000"+
+ "\u0000\u00a0\u0093\u0001\u0000\u0000\u0000\u00a1\u000b\u0001\u0000\u0000"+
+ "\u0000\u00a2\u00a7\u0003\u000e\u0007\u0000\u00a3\u00a4\u0005\"\u0000\u0000"+
+ "\u00a4\u00a6\u0003\u000e\u0007\u0000\u00a5\u00a3\u0001\u0000\u0000\u0000"+
+ "\u00a6\u00a9\u0001\u0000\u0000\u0000\u00a7\u00a5\u0001\u0000\u0000\u0000"+
+ "\u00a7\u00a8\u0001\u0000\u0000\u0000\u00a8\r\u0001\u0000\u0000\u0000\u00a9"+
+ "\u00a7\u0001\u0000\u0000\u0000\u00aa\u00ab\u0003\\.\u0000\u00ab\u00ac"+
+ "\u00054\u0000\u0000\u00ac\u000f\u0001\u0000\u0000\u0000\u00ad\u00b2\u0003"+
+ "4\u001a\u0000\u00ae\u00af\u0005\"\u0000\u0000\u00af\u00b1\u00034\u001a"+
+ "\u0000\u00b0\u00ae\u0001\u0000\u0000\u0000\u00b1\u00b4\u0001\u0000\u0000"+
+ "\u0000\u00b2\u00b0\u0001\u0000\u0000\u0000\u00b2\u00b3\u0001\u0000\u0000"+
+ "\u0000\u00b3\u00b6\u0001\u0000\u0000\u0000\u00b4\u00b2\u0001\u0000\u0000"+
+ "\u0000\u00b5\u00ad\u0001\u0000\u0000\u0000\u00b5\u00b6\u0001\u0000\u0000"+
+ "\u0000\u00b6\u0011\u0001\u0000\u0000\u0000\u00b7\u00b8\u0003\u0016\u000b"+
+ "\u0000\u00b8\u00b9\u0005!\u0000\u0000\u00b9\u00c7\u0001\u0000\u0000\u0000"+
+ "\u00ba\u00bb\u0003\u0018\f\u0000\u00bb\u00bc\u0005!\u0000\u0000\u00bc"+
+ "\u00c7\u0001\u0000\u0000\u0000\u00bd\u00c7\u0003\u0014\n\u0000\u00be\u00c7"+
+ "\u0003\u001a\r\u0000\u00bf\u00c7\u0003\u001c\u000e\u0000\u00c0\u00c7\u0003"+
+ "\u001e\u000f\u0000\u00c1\u00c7\u0003 \u0010\u0000\u00c2\u00c7\u0003(\u0014"+
+ "\u0000\u00c3\u00c4\u0003.\u0017\u0000\u00c4\u00c5\u0005!\u0000\u0000\u00c5"+
+ "\u00c7\u0001\u0000\u0000\u0000\u00c6\u00b7\u0001\u0000\u0000\u0000\u00c6"+
+ "\u00ba\u0001\u0000\u0000\u0000\u00c6\u00bd\u0001\u0000\u0000\u0000\u00c6"+
+ "\u00be\u0001\u0000\u0000\u0000\u00c6\u00bf\u0001\u0000\u0000\u0000\u00c6"+
+ "\u00c0\u0001\u0000\u0000\u0000\u00c6\u00c1\u0001\u0000\u0000\u0000\u00c6"+
+ "\u00c2\u0001\u0000\u0000\u0000\u00c6\u00c3\u0001\u0000\u0000\u0000\u00c7"+
+ "\u0013\u0001\u0000\u0000\u0000\u00c8\u00cc\u0005\u001f\u0000\u0000\u00c9"+
+ "\u00cb\u0003\u0012\t\u0000\u00ca\u00c9\u0001\u0000\u0000\u0000\u00cb\u00ce"+
+ "\u0001\u0000\u0000\u0000\u00cc\u00ca\u0001\u0000\u0000\u0000\u00cc\u00cd"+
+ "\u0001\u0000\u0000\u0000\u00cd\u00cf\u0001\u0000\u0000\u0000\u00ce\u00cc"+
+ "\u0001\u0000\u0000\u0000\u00cf\u00d0\u0005 \u0000\u0000\u00d0\u0015\u0001"+
+ "\u0000\u0000\u0000\u00d1\u00d3\u0005*\u0000\u0000\u00d2\u00d4\u00034\u001a"+
+ "\u0000\u00d3\u00d2\u0001\u0000\u0000\u0000\u00d3\u00d4\u0001\u0000\u0000"+
+ "\u0000\u00d4\u0017\u0001\u0000\u0000\u0000\u00d5\u00d6\u0003\\.\u0000"+
+ "\u00d6\u00d9\u00054\u0000\u0000\u00d7\u00d8\u0005\r\u0000\u0000\u00d8"+
+ "\u00da\u00034\u001a\u0000\u00d9\u00d7\u0001\u0000\u0000\u0000\u00d9\u00da"+
+ "\u0001\u0000\u0000\u0000\u00da\u0019\u0001\u0000\u0000\u0000\u00db\u00dc"+
+ "\u0005%\u0000\u0000\u00dc\u00dd\u0005\u001d\u0000\u0000\u00dd\u00de\u0003"+
+ "4\u001a\u0000\u00de\u00df\u0005\u001e\u0000\u0000\u00df\u00e0\u0003\u0014"+
+ "\n\u0000\u00e0\u001b\u0001\u0000\u0000\u0000\u00e1\u00e2\u0005&\u0000"+
+ "\u0000\u00e2\u00e3\u0003\u0014\n\u0000\u00e3\u00e4\u0005%\u0000\u0000"+
+ "\u00e4\u00e5\u0005\u001d\u0000\u0000\u00e5\u00e6\u00034\u001a\u0000\u00e6"+
+ "\u00e7\u0005\u001e\u0000\u0000\u00e7\u00e8\u0005!\u0000\u0000\u00e8\u001d"+
+ "\u0001\u0000\u0000\u0000\u00e9\u00ea\u0005)\u0000\u0000\u00ea\u00ed\u0005"+
+ "\u001d\u0000\u0000\u00eb\u00ee\u0003.\u0017\u0000\u00ec\u00ee\u0003\u0018"+
+ "\f\u0000\u00ed\u00eb\u0001\u0000\u0000\u0000\u00ed\u00ec\u0001\u0000\u0000"+
+ "\u0000\u00ee\u00ef\u0001\u0000\u0000\u0000\u00ef\u00f1\u0005!\u0000\u0000"+
+ "\u00f0\u00f2\u00034\u001a\u0000\u00f1\u00f0\u0001\u0000\u0000\u0000\u00f1"+
+ "\u00f2\u0001\u0000\u0000\u0000\u00f2\u00f3\u0001\u0000\u0000\u0000\u00f3"+
+ "\u00f5\u0005!\u0000\u0000\u00f4\u00f6\u0003.\u0017\u0000\u00f5\u00f4\u0001"+
+ "\u0000\u0000\u0000\u00f5\u00f6\u0001\u0000\u0000\u0000\u00f6\u00f7\u0001"+
+ "\u0000\u0000\u0000\u00f7\u00f8\u0005\u001e\u0000\u0000\u00f8\u00f9\u0003"+
+ "\u0014\n\u0000\u00f9\u001f\u0001\u0000\u0000\u0000\u00fa\u00fe\u0003\""+
+ "\u0011\u0000\u00fb\u00fd\u0003$\u0012\u0000\u00fc\u00fb\u0001\u0000\u0000"+
+ "\u0000\u00fd\u0100\u0001\u0000\u0000\u0000\u00fe\u00fc\u0001\u0000\u0000"+
+ "\u0000\u00fe\u00ff\u0001\u0000\u0000\u0000\u00ff\u0102\u0001\u0000\u0000"+
+ "\u0000\u0100\u00fe\u0001\u0000\u0000\u0000\u0101\u0103\u0003&\u0013\u0000"+
+ "\u0102\u0101\u0001\u0000\u0000\u0000\u0102\u0103\u0001\u0000\u0000\u0000"+
+ "\u0103!\u0001\u0000\u0000\u0000\u0104\u0105\u0005\'\u0000\u0000\u0105"+
+ "\u0106\u0005\u001d\u0000\u0000\u0106\u0107\u00034\u001a\u0000\u0107\u0108"+
+ "\u0005\u001e\u0000\u0000\u0108\u0109\u0003\u0014\n\u0000\u0109#\u0001"+
+ "\u0000\u0000\u0000\u010a\u010b\u0005(\u0000\u0000\u010b\u010c\u0005\'"+
+ "\u0000\u0000\u010c\u010d\u0005\u001d\u0000\u0000\u010d\u010e\u00034\u001a"+
+ "\u0000\u010e\u010f\u0005\u001e\u0000\u0000\u010f\u0110\u0003\u0014\n\u0000"+
+ "\u0110%\u0001\u0000\u0000\u0000\u0111\u0112\u0005(\u0000\u0000\u0112\u0113"+
+ "\u0003\u0014\n\u0000\u0113\'\u0001\u0000\u0000\u0000\u0114\u0115\u0005"+
+ ",\u0000\u0000\u0115\u0116\u0005\u001d\u0000\u0000\u0116\u0117\u00034\u001a"+
+ "\u0000\u0117\u0118\u0005\u001e\u0000\u0000\u0118\u011a\u0005\u001f\u0000"+
+ "\u0000\u0119\u011b\u0003*\u0015\u0000\u011a\u0119\u0001\u0000\u0000\u0000"+
+ "\u011b\u011c\u0001\u0000\u0000\u0000\u011c\u011a\u0001\u0000\u0000\u0000"+
+ "\u011c\u011d\u0001\u0000\u0000\u0000\u011d\u011f\u0001\u0000\u0000\u0000"+
+ "\u011e\u0120\u0003,\u0016\u0000\u011f\u011e\u0001\u0000\u0000\u0000\u011f"+
+ "\u0120\u0001\u0000\u0000\u0000\u0120\u0121\u0001\u0000\u0000\u0000\u0121"+
+ "\u0122\u0005 \u0000\u0000\u0122)\u0001\u0000\u0000\u0000\u0123\u0124\u0005"+
+ "-\u0000\u0000\u0124\u0125\u0003^/\u0000\u0125\u0129\u0005/\u0000\u0000"+
+ "\u0126\u0128\u0003\u0012\t\u0000\u0127\u0126\u0001\u0000\u0000\u0000\u0128"+
+ "\u012b\u0001\u0000\u0000\u0000\u0129\u0127\u0001\u0000\u0000\u0000\u0129"+
+ "\u012a\u0001\u0000\u0000\u0000\u012a+\u0001\u0000\u0000\u0000\u012b\u0129"+
+ "\u0001\u0000\u0000\u0000\u012c\u012d\u0005.\u0000\u0000\u012d\u0131\u0005"+
+ "/\u0000\u0000\u012e\u0130\u0003\u0012\t\u0000\u012f\u012e\u0001\u0000"+
+ "\u0000\u0000\u0130\u0133\u0001\u0000\u0000\u0000\u0131\u012f\u0001\u0000"+
+ "\u0000\u0000\u0131\u0132\u0001\u0000\u0000\u0000\u0132-\u0001\u0000\u0000"+
+ "\u0000\u0133\u0131\u0001\u0000\u0000\u0000\u0134\u0139\u00030\u0018\u0000"+
+ "\u0135\u0139\u00032\u0019\u0000\u0136\u0139\u0003V+\u0000\u0137\u0139"+
+ "\u0003:\u001d\u0000\u0138\u0134\u0001\u0000\u0000\u0000\u0138\u0135\u0001"+
+ "\u0000\u0000\u0000\u0138\u0136\u0001\u0000\u0000\u0000\u0138\u0137\u0001"+
+ "\u0000\u0000\u0000\u0139/\u0001\u0000\u0000\u0000\u013a\u013b\u0003H$"+
+ "\u0000\u013b\u013c\u0005\r\u0000\u0000\u013c\u013d\u00034\u001a\u0000"+
+ "\u013d1\u0001\u0000\u0000\u0000\u013e\u013f\u0005+\u0000\u0000\u013f\u0140"+
+ "\u00054\u0000\u0000\u0140\u0141\u0005\u001d\u0000\u0000\u0141\u0142\u0003"+
+ "\u0010\b\u0000\u0142\u0143\u0005\u001e\u0000\u0000\u01433\u0001\u0000"+
+ "\u0000\u0000\u0144\u0147\u00036\u001b\u0000\u0145\u0147\u0003L&\u0000"+
+ "\u0146\u0144\u0001\u0000\u0000\u0000\u0146\u0145\u0001\u0000\u0000\u0000"+
+ "\u01475\u0001\u0000\u0000\u0000\u0148\u0153\u0005$\u0000\u0000\u0149\u0153"+
+ "\u00054\u0000\u0000\u014a\u0153\u0003J%\u0000\u014b\u0153\u0003^/\u0000"+
+ "\u014c\u0153\u00038\u001c\u0000\u014d\u0153\u0003.\u0017\u0000\u014e\u014f"+
+ "\u0005\u001d\u0000\u0000\u014f\u0150\u00034\u001a\u0000\u0150\u0151\u0005"+
+ "\u001e\u0000\u0000\u0151\u0153\u0001\u0000\u0000\u0000\u0152\u0148\u0001"+
+ "\u0000\u0000\u0000\u0152\u0149\u0001\u0000\u0000\u0000\u0152\u014a\u0001"+
+ "\u0000\u0000\u0000\u0152\u014b\u0001\u0000\u0000\u0000\u0152\u014c\u0001"+
+ "\u0000\u0000\u0000\u0152\u014d\u0001\u0000\u0000\u0000\u0152\u014e\u0001"+
+ "\u0000\u0000\u0000\u01537\u0001\u0000\u0000\u0000\u0154\u0155\u0005\u0019"+
+ "\u0000\u0000\u0155\u0156\u00034\u001a\u0000\u01569\u0001\u0000\u0000\u0000"+
+ "\u0157\u015a\u0003<\u001e\u0000\u0158\u015a\u0003B!\u0000\u0159\u0157"+
+ "\u0001\u0000\u0000\u0000\u0159\u0158\u0001\u0000\u0000\u0000\u015a;\u0001"+
+ "\u0000\u0000\u0000\u015b\u015e\u0003>\u001f\u0000\u015c\u015e\u0003@ "+
+ "\u0000\u015d\u015b\u0001\u0000\u0000\u0000\u015d\u015c\u0001\u0000\u0000"+
+ "\u0000\u015e=\u0001\u0000\u0000\u0000\u015f\u0160\u0005\u0001\u0000\u0000"+
+ "\u0160\u0161\u0003H$\u0000\u0161?\u0001\u0000\u0000\u0000\u0162\u0163"+
+ "\u0003H$\u0000\u0163\u0164\u0005\u0001\u0000\u0000\u0164A\u0001\u0000"+
+ "\u0000\u0000\u0165\u0168\u0003D\"\u0000\u0166\u0168\u0003F#\u0000\u0167"+
+ "\u0165\u0001\u0000\u0000\u0000\u0167\u0166\u0001\u0000\u0000\u0000\u0168"+
+ "C\u0001\u0000\u0000\u0000\u0169\u016a\u0005\u0002\u0000\u0000\u016a\u016b"+
+ "\u0003H$\u0000\u016bE\u0001\u0000\u0000\u0000\u016c\u016d\u0003H$\u0000"+
+ "\u016d\u016e\u0005\u0002\u0000\u0000\u016eG\u0001\u0000\u0000\u0000\u016f"+
+ "\u0172\u00054\u0000\u0000\u0170\u0172\u0003J%\u0000\u0171\u016f\u0001"+
+ "\u0000\u0000\u0000\u0171\u0170\u0001\u0000\u0000\u0000\u0172I\u0001\u0000"+
+ "\u0000\u0000\u0173\u0174\u0005$\u0000\u0000\u0174\u0175\u0005\u001c\u0000"+
+ "\u0000\u0175\u0182\u00054\u0000\u0000\u0176\u0177\u0005$\u0000\u0000\u0177"+
+ "\u0179\u0005\u001c\u0000\u0000\u0178\u0176\u0001\u0000\u0000\u0000\u0178"+
+ "\u0179\u0001\u0000\u0000\u0000\u0179\u017c\u0001\u0000\u0000\u0000\u017a"+
+ "\u017b\u00054\u0000\u0000\u017b\u017d\u0005\u001c\u0000\u0000\u017c\u017a"+
+ "\u0001\u0000\u0000\u0000\u017d\u017e\u0001\u0000\u0000\u0000\u017e\u017c"+
+ "\u0001\u0000\u0000\u0000\u017e\u017f\u0001\u0000\u0000\u0000\u017f\u0180"+
+ "\u0001\u0000\u0000\u0000\u0180\u0182\u00054\u0000\u0000\u0181\u0173\u0001"+
+ "\u0000\u0000\u0000\u0181\u0178\u0001\u0000\u0000\u0000\u0182K\u0001\u0000"+
+ "\u0000\u0000\u0183\u0186\u0003N\'\u0000\u0184\u0186\u0003T*\u0000\u0185"+
+ "\u0183\u0001\u0000\u0000\u0000\u0185\u0184\u0001\u0000\u0000\u0000\u0186"+
+ "M\u0001\u0000\u0000\u0000\u0187\u0188\u0006\'\uffff\uffff\u0000\u0188"+
+ "\u0189\u0003P(\u0000\u0189\u018f\u0001\u0000\u0000\u0000\u018a\u018b\n"+
+ "\u0002\u0000\u0000\u018b\u018c\u0005\n\u0000\u0000\u018c\u018e\u0003P"+
+ "(\u0000\u018d\u018a\u0001\u0000\u0000\u0000\u018e\u0191\u0001\u0000\u0000"+
+ "\u0000\u018f\u018d\u0001\u0000\u0000\u0000\u018f\u0190\u0001\u0000\u0000"+
+ "\u0000\u0190O\u0001\u0000\u0000\u0000\u0191\u018f\u0001\u0000\u0000\u0000"+
+ "\u0192\u0193\u0006(\uffff\uffff\u0000\u0193\u0194\u0003R)\u0000\u0194"+
+ "\u019a\u0001\u0000\u0000\u0000\u0195\u0196\n\u0002\u0000\u0000\u0196\u0197"+
+ "\u0005\t\u0000\u0000\u0197\u0199\u0003R)\u0000\u0198\u0195\u0001\u0000"+
+ "\u0000\u0000\u0199\u019c\u0001\u0000\u0000\u0000\u019a\u0198\u0001\u0000"+
+ "\u0000\u0000\u019a\u019b\u0001\u0000\u0000\u0000\u019bQ\u0001\u0000\u0000"+
+ "\u0000\u019c\u019a\u0001\u0000\u0000\u0000\u019d\u01a6\u00051\u0000\u0000"+
+ "\u019e\u01a6\u00054\u0000\u0000\u019f\u01a6\u0003J%\u0000\u01a0\u01a1"+
+ "\u0003V+\u0000\u01a1\u01a2\u0005\u001d\u0000\u0000\u01a2\u01a3\u0003N"+
+ "\'\u0000\u01a3\u01a4\u0005\u001e\u0000\u0000\u01a4\u01a6\u0001\u0000\u0000"+
+ "\u0000\u01a5\u019d\u0001\u0000\u0000\u0000\u01a5\u019e\u0001\u0000\u0000"+
+ "\u0000\u01a5\u019f\u0001\u0000\u0000\u0000\u01a5\u01a0\u0001\u0000\u0000"+
+ "\u0000\u01a6S\u0001\u0000\u0000\u0000\u01a7\u01a8\u00036\u001b\u0000\u01a8"+
+ "\u01a9\u0003`0\u0000\u01a9\u01aa\u00034\u001a\u0000\u01aaU\u0001\u0000"+
+ "\u0000\u0000\u01ab\u01ad\u0003X,\u0000\u01ac\u01ab\u0001\u0000\u0000\u0000"+
+ "\u01ac\u01ad\u0001\u0000\u0000\u0000\u01ad\u01b1\u0001\u0000\u0000\u0000"+
+ "\u01ae\u01b0\u0003Z-\u0000\u01af\u01ae\u0001\u0000\u0000\u0000\u01b0\u01b3"+
+ "\u0001\u0000\u0000\u0000\u01b1\u01af\u0001\u0000\u0000\u0000\u01b1\u01b2"+
+ "\u0001\u0000\u0000\u0000\u01b2\u01b4\u0001\u0000\u0000\u0000\u01b3\u01b1"+
+ "\u0001\u0000\u0000\u0000\u01b4\u01b5\u00054\u0000\u0000\u01b5\u01b6\u0005"+
+ "\u001d\u0000\u0000\u01b6\u01b7\u0003\u0010\b\u0000\u01b7\u01b8\u0005\u001e"+
+ "\u0000\u0000\u01b8W\u0001\u0000\u0000\u0000\u01b9\u01be\u0005$\u0000\u0000"+
+ "\u01ba\u01be\u0003J%\u0000\u01bb\u01be\u00032\u0019\u0000\u01bc\u01be"+
+ "\u00054\u0000\u0000\u01bd\u01b9\u0001\u0000\u0000\u0000\u01bd\u01ba\u0001"+
+ "\u0000\u0000\u0000\u01bd\u01bb\u0001\u0000\u0000\u0000\u01bd\u01bc\u0001"+
+ "\u0000\u0000\u0000\u01be\u01bf\u0001\u0000\u0000\u0000\u01bf\u01c0\u0005"+
+ "\u001c\u0000\u0000\u01c0Y\u0001\u0000\u0000\u0000\u01c1\u01c2\u00054\u0000"+
+ "\u0000\u01c2\u01c3\u0005\u001d\u0000\u0000\u01c3\u01c4\u0003\u0010\b\u0000"+
+ "\u01c4\u01c5\u0005\u001e\u0000\u0000\u01c5\u01c6\u0005\u001c\u0000\u0000"+
+ "\u01c6[\u0001\u0000\u0000\u0000\u01c7\u01c8\u0007\u0000\u0000\u0000\u01c8"+
+ "]\u0001\u0000\u0000\u0000\u01c9\u01ca\u0007\u0001\u0000\u0000\u01ca_\u0001"+
+ "\u0000\u0000\u0000\u01cb\u01cc\u0007\u0002\u0000\u0000\u01cca\u0001\u0000"+
+ "\u0000\u0000-ehpx{\u0080\u0086\u008c\u0093\u0097\u009c\u00a0\u00a7\u00b2"+
+ "\u00b5\u00c6\u00cc\u00d3\u00d9\u00ed\u00f1\u00f5\u00fe\u0102\u011c\u011f"+
+ "\u0129\u0131\u0138\u0146\u0152\u0159\u015d\u0167\u0171\u0178\u017e\u0181"+
+ "\u0185\u018f\u019a\u01a5\u01ac\u01b1\u01bd";
+ public static final ATN _ATN =
+ new ATNDeserializer().deserialize(_serializedATN.toCharArray());
+ static {
+ _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()];
+ for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) {
+ _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/parser/generated/SimpleJavaVisitor.java b/src/main/java/parser/generated/SimpleJavaVisitor.java
new file mode 100644
index 0000000..37fc395
--- /dev/null
+++ b/src/main/java/parser/generated/SimpleJavaVisitor.java
@@ -0,0 +1,307 @@
+// Generated from C:/Users/Maxi/Documents/DHBW/Compilerbau/NichtHaskell2.0/src/main/java/parser/grammar/SimpleJava.g4 by ANTLR 4.13.1
+package parser.generated;
+import org.antlr.v4.runtime.tree.ParseTreeVisitor;
+
+/**
+ * This interface defines a complete generic visitor for a parse tree produced
+ * by {@link SimpleJavaParser}.
+ *
+ * @param The return type of the visit operation. Use {@link Void} for
+ * operations with no return type.
+ */
+public interface SimpleJavaVisitor extends ParseTreeVisitor {
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#program}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitProgram(SimpleJavaParser.ProgramContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#classDeclaration}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitClassDeclaration(SimpleJavaParser.ClassDeclarationContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#memberDeclaration}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitMemberDeclaration(SimpleJavaParser.MemberDeclarationContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#constructorDeclaration}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitConstructorDeclaration(SimpleJavaParser.ConstructorDeclarationContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#fieldDeclaration}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitFieldDeclaration(SimpleJavaParser.FieldDeclarationContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#methodDeclaration}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitMethodDeclaration(SimpleJavaParser.MethodDeclarationContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#parameterList}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitParameterList(SimpleJavaParser.ParameterListContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#parameter}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitParameter(SimpleJavaParser.ParameterContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#argumentList}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitArgumentList(SimpleJavaParser.ArgumentListContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#statement}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitStatement(SimpleJavaParser.StatementContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#blockStatement}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitBlockStatement(SimpleJavaParser.BlockStatementContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#returnStatement}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitReturnStatement(SimpleJavaParser.ReturnStatementContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#localVariableDeclaration}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitLocalVariableDeclaration(SimpleJavaParser.LocalVariableDeclarationContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#whileStatement}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitWhileStatement(SimpleJavaParser.WhileStatementContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#doWhileStatement}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitDoWhileStatement(SimpleJavaParser.DoWhileStatementContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#forStatement}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitForStatement(SimpleJavaParser.ForStatementContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#ifElseStatement}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitIfElseStatement(SimpleJavaParser.IfElseStatementContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#ifStatement}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitIfStatement(SimpleJavaParser.IfStatementContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#elseIfStatement}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitElseIfStatement(SimpleJavaParser.ElseIfStatementContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#elseStatement}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitElseStatement(SimpleJavaParser.ElseStatementContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#switchStatement}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitSwitchStatement(SimpleJavaParser.SwitchStatementContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#caseStatement}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitCaseStatement(SimpleJavaParser.CaseStatementContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#defaultStatement}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitDefaultStatement(SimpleJavaParser.DefaultStatementContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#statementExpression}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitStatementExpression(SimpleJavaParser.StatementExpressionContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#assign}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitAssign(SimpleJavaParser.AssignContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#newDeclaration}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitNewDeclaration(SimpleJavaParser.NewDeclarationContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#expression}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitExpression(SimpleJavaParser.ExpressionContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#unaryExpression}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitUnaryExpression(SimpleJavaParser.UnaryExpressionContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#notExpression}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitNotExpression(SimpleJavaParser.NotExpressionContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#crementExpression}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitCrementExpression(SimpleJavaParser.CrementExpressionContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#incrementExpression}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitIncrementExpression(SimpleJavaParser.IncrementExpressionContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#prefixIncrementExpression}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitPrefixIncrementExpression(SimpleJavaParser.PrefixIncrementExpressionContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#suffixIncrementExpression}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitSuffixIncrementExpression(SimpleJavaParser.SuffixIncrementExpressionContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#decrementExpression}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitDecrementExpression(SimpleJavaParser.DecrementExpressionContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#prefixDecrementExpression}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitPrefixDecrementExpression(SimpleJavaParser.PrefixDecrementExpressionContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#suffixDecrementExpression}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitSuffixDecrementExpression(SimpleJavaParser.SuffixDecrementExpressionContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#assignableExpression}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitAssignableExpression(SimpleJavaParser.AssignableExpressionContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#memberAccess}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitMemberAccess(SimpleJavaParser.MemberAccessContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#binaryExpression}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitBinaryExpression(SimpleJavaParser.BinaryExpressionContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#calculationExpression}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitCalculationExpression(SimpleJavaParser.CalculationExpressionContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#dotExpression}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitDotExpression(SimpleJavaParser.DotExpressionContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#dotSubtractionExpression}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitDotSubtractionExpression(SimpleJavaParser.DotSubtractionExpressionContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#nonCalculationExpression}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitNonCalculationExpression(SimpleJavaParser.NonCalculationExpressionContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#methodCall}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitMethodCall(SimpleJavaParser.MethodCallContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#target}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitTarget(SimpleJavaParser.TargetContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#chainedMethod}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitChainedMethod(SimpleJavaParser.ChainedMethodContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#type}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitType(SimpleJavaParser.TypeContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#value}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitValue(SimpleJavaParser.ValueContext ctx);
+ /**
+ * Visit a parse tree produced by {@link SimpleJavaParser#nonCalculationOperator}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitNonCalculationOperator(SimpleJavaParser.NonCalculationOperatorContext ctx);
+}
\ No newline at end of file
--
2.34.1
From 0e512161a0bc4166870aad98ee6ee84b3ee6939d Mon Sep 17 00:00:00 2001
From: Bruder John
Date: Wed, 3 Jul 2024 20:22:09 +0200
Subject: [PATCH 36/96] Added Class name to Member accesnode
---
.../MethodCallNode.java | 2 +
src/main/java/semantic/SemanticAnalyzer.java | 102 ++++++++++++------
src/test/java/semantic/EndToTypedAstTest.java | 2 +
.../input/singleFeatureTests/MainMethod.class | Bin 264 -> 265 bytes
.../input/singleFeatureTests/Null.class | Bin 202 -> 226 bytes
.../singleFeatureTests/SelfReference.class | Bin 466 -> 466 bytes
.../VariableCalculation.class | Bin 0 -> 723 bytes
.../singleFeatureTests/VariableCompare.class | Bin 0 -> 620 bytes
.../MissingOverloadingParameter.java | 19 ----
.../SelectWrongMethodCauseParameter.java | 4 +-
.../typedAstFeatureTests/CorrectTest.java | 20 +---
11 files changed, 80 insertions(+), 69 deletions(-)
create mode 100644 src/test/resources/input/singleFeatureTests/VariableCalculation.class
create mode 100644 src/test/resources/input/singleFeatureTests/VariableCompare.class
delete mode 100644 src/test/resources/input/typedAstExceptionsTests/MissingOverloadingParameter.java
diff --git a/src/main/java/ast/statementexpressions/methodcallstatementnexpressions/MethodCallNode.java b/src/main/java/ast/statementexpressions/methodcallstatementnexpressions/MethodCallNode.java
index e88b38b..8179b82 100644
--- a/src/main/java/ast/statementexpressions/methodcallstatementnexpressions/MethodCallNode.java
+++ b/src/main/java/ast/statementexpressions/methodcallstatementnexpressions/MethodCallNode.java
@@ -2,6 +2,7 @@ package ast.statementexpressions.methodcallstatementnexpressions;
import ast.expressions.IExpressionNode;
import ast.statements.IStatementNode;
+import ast.type.type.ITypeNode;
import bytecode.visitor.MethodVisitor;
import semantic.SemanticVisitor;
import typechecker.TypeCheckResult;
@@ -11,6 +12,7 @@ import java.util.List;
public class MethodCallNode implements IStatementNode {
public TargetNode target;
+ public ITypeNode type;
public List chainedMethods = new ArrayList<>();
public String identifier;
public List parameters = new ArrayList<>();
diff --git a/src/main/java/semantic/SemanticAnalyzer.java b/src/main/java/semantic/SemanticAnalyzer.java
index 0611219..2dc13d4 100644
--- a/src/main/java/semantic/SemanticAnalyzer.java
+++ b/src/main/java/semantic/SemanticAnalyzer.java
@@ -166,7 +166,7 @@ public class SemanticAnalyzer implements SemanticVisitor {
@Override
public TypeCheckResult analyze(FieldNode toCheck) {
if (toCheck.type instanceof ReferenceType referenceType) {
- if(!context.containsClass(referenceType.getIdentifier())){
+ if (!context.containsClass(referenceType.getIdentifier())) {
errors.add(new NotDeclaredException(referenceType.getIdentifier() + " not declared"));
}
}
@@ -233,7 +233,7 @@ public class SemanticAnalyzer implements SemanticVisitor {
}
for (IStatementNode statementNode : blockNode.statements) {
var result = statementNode.accept(this);
- if(!(statementNode instanceof IncrementNode) && !(statementNode instanceof DecrementNode)){
+ if (!(statementNode instanceof IncrementNode) && !(statementNode instanceof DecrementNode)) {
if (result.getType() != null) {
if (blockReturnType == null) {
blockReturnType = result.getType();
@@ -258,6 +258,10 @@ public class SemanticAnalyzer implements SemanticVisitor {
} else {
if (currentFields.get(toCheck.identifier) != null) {
var type = currentFields.get(toCheck.identifier);
+ MemberAccessNode memberAccessNode = new MemberAccessNode(false);
+ memberAccessNode.identifiers.add(currentClass.identifier);
+ memberAccessNode.identifiers.add(toCheck.identifier);
+ toCheck.memberAccess = memberAccessNode;
toCheck.setTypeNode(type);
return new TypeCheckResult(true, type);
} else if (currentScope.getLocalVar(toCheck.identifier) != null) {
@@ -320,44 +324,66 @@ public class SemanticAnalyzer implements SemanticVisitor {
@Override
public TypeCheckResult analyze(MethodCallNode toCheck) {
- if (toCheck.target.identifier != null) {
- var targetType = currentScope.getLocalVar(toCheck.target.identifier);
- if (targetType == null) {
- targetType = currentFields.get(toCheck.target.identifier);
- }
- if (targetType instanceof ReferenceType reference) {
- if (!toCheck.chainedMethods.isEmpty()) {
- for (ChainedMethodNode chainedMethod : toCheck.chainedMethods) {
- var type = getTypeFromMethod(chainedMethod, reference);
- if (type instanceof ReferenceType referenceType)
- reference = referenceType;
- else
- errors.add(new TypeMismatchException("Ein Basetyp hat keine funktionen"));
+ if (toCheck.target != null) {
+ if (toCheck.target.identifier != null) {
+ var targetType = currentScope.getLocalVar(toCheck.target.identifier);
+ if (targetType == null) {
+ targetType = currentFields.get(toCheck.target.identifier);
+ }
+ if (targetType instanceof ReferenceType reference) {
+ if (!toCheck.chainedMethods.isEmpty()) {
+ for (ChainedMethodNode chainedMethod : toCheck.chainedMethods) {
+ var type = getTypeFromMethod(chainedMethod, reference);
+ if (type instanceof ReferenceType referenceType)
+ reference = referenceType;
+ else
+ errors.add(new TypeMismatchException("Ein Basetyp hat keine funktionen"));
+ }
+ }
+ var type = getTypeFromMethod(toCheck, reference);
+ if (type != null) {
+ return new TypeCheckResult(true, type);
+ } else {
+ return new TypeCheckResult(false, null);
+ }
+
+ }
+ } else {
+ if (toCheck.target.thisTar != null) {
+ if (toCheck.target.thisTar) {
+ var type = getTypeFromMethod(toCheck, new ReferenceType(currentClass.identifier));
+ if (type != null) {
+ return new TypeCheckResult(true, type);
+ }
+ }
+ } else {
+ var result = toCheck.target.accept(this);
+ if (result.getType() instanceof ReferenceType reference) {
+ return new TypeCheckResult(true, getTypeFromMethod(toCheck, reference));
}
}
- var type = getTypeFromMethod(toCheck, reference);
- if (type != null) {
- return new TypeCheckResult(true, type);
- } else {
- return new TypeCheckResult(false, null);
- }
-
}
} else {
- if (toCheck.target.thisTar != null) {
- if (toCheck.target.thisTar) {
- var type = getTypeFromMethod(toCheck, new ReferenceType(currentClass.identifier));
- if (type != null) {
- return new TypeCheckResult(true, type);
+
+ ReferenceType reference = new ReferenceType(currentClass.identifier);
+ if (!toCheck.chainedMethods.isEmpty()) {
+ for (ChainedMethodNode chainedMethod : toCheck.chainedMethods) {
+ var type = getTypeFromMethod(chainedMethod, reference);
+ if (type instanceof ReferenceType referenceType)
+ reference = referenceType;
+ else
+ errors.add(new TypeMismatchException("Ein Basetyp hat keine funktionen"));
}
}
+ var type = getTypeFromMethod(toCheck, reference);
+ if (type != null) {
+ return new TypeCheckResult(true, type);
} else {
- var result = toCheck.target.accept(this);
- if (result.getType() instanceof ReferenceType reference) {
- return new TypeCheckResult(true, getTypeFromMethod(toCheck, reference));
- }
+ return new TypeCheckResult(false, null);
}
+
}
+
return new TypeCheckResult(false, null);
}
@@ -508,6 +534,10 @@ public class SemanticAnalyzer implements SemanticVisitor {
if (currentScope.contains(unary.identifier)) {
return new TypeCheckResult(valid, currentScope.getLocalVar(unary.identifier));
} else if (currentFields.get(unary.identifier) != null) {
+ MemberAccessNode memberAccessNode = new MemberAccessNode(false);
+ memberAccessNode.identifiers.add(currentClass.identifier);
+ memberAccessNode.identifiers.add(unary.identifier);
+ unary.memberAccess = memberAccessNode;
return new TypeCheckResult(valid, currentFields.get(unary.identifier));
} else if (unary.statement != null) {
var result = unary.statement.accept(this);
@@ -537,8 +567,16 @@ public class SemanticAnalyzer implements SemanticVisitor {
public TypeCheckResult analyze(MemberAccessNode memberAccessNode) {
ITypeNode currentType = null;
+ int start = 0;
+ if(!memberAccessNode.identifiers.isEmpty()){
+ if(currentFields.get(memberAccessNode.identifiers.get(0)) != null){
+ memberAccessNode.identifiers.add(0, currentClass.identifier);
+ start = 1;
+ }
+ }
+ for (int i = start; i < memberAccessNode.identifiers.size(); i++) {
- for (String s : memberAccessNode.identifiers) {
+ String s = memberAccessNode.identifiers.get(i);
if (currentType == null) {
if (currentScope.getLocalVar(s) != null) {
currentType = currentScope.getLocalVar(s);
diff --git a/src/test/java/semantic/EndToTypedAstTest.java b/src/test/java/semantic/EndToTypedAstTest.java
index a33b9d4..e707197 100644
--- a/src/test/java/semantic/EndToTypedAstTest.java
+++ b/src/test/java/semantic/EndToTypedAstTest.java
@@ -26,6 +26,7 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.junit.jupiter.api.Test;
+import semantic.exceptions.NotDeclaredException;
import static org.junit.jupiter.api.Assertions.*;
@@ -108,6 +109,7 @@ public class EndToTypedAstTest {
} else {
System.out.println("The provided path is not a directory.");
}
+
}
@Test
diff --git a/src/test/resources/input/singleFeatureTests/MainMethod.class b/src/test/resources/input/singleFeatureTests/MainMethod.class
index 8c96555ce3d2249920de30814a84a73955ec260d..0470c083d8f0041792c4ae9f2158848bbefb809e 100644
GIT binary patch
delta 18
ZcmeBR>SUTQk%QkiF*DCMwPfOq0suHu29f{(
delta 17
YcmeBV>R_5Mk)6*sF*DCMb>hqd05RMPGjQ=Ra5L~QGO+lS=HxIkFeWlGu=#-4
z))T!=gE<(OfI1j~7^n!$Vq{=tU;~Qq0(n|MS&$r;)^-L)Eyk@3>>I&q_<$rI12d3h
TWnclS=44<8s^bUpnHU5B;s_69
delta 115
zcmaFFc#4th)W2Q(7#J9w82Bf0=?k$la4<5k_?715FfuSE0(^b
diff --git a/src/test/resources/input/singleFeatureTests/SelfReference.class b/src/test/resources/input/singleFeatureTests/SelfReference.class
index aff85463b35fa4182b597e635a11c85f0191ea00..413157a7ba2c818270f0daae9225110cbac90597 100644
GIT binary patch
delta 12
Ucmcb_e2IC&Ri=`RiPwJv03`DUQ2+n{
delta 12
Ucmcb_e2IC&Ri=!RiPwJv03_!IQ2+n{
diff --git a/src/test/resources/input/singleFeatureTests/VariableCalculation.class b/src/test/resources/input/singleFeatureTests/VariableCalculation.class
new file mode 100644
index 0000000000000000000000000000000000000000..131a2e6b75de3abf21e6521ad4ab0cea94218e30
GIT binary patch
literal 723
zcmZ{g%TB^j5QhH)g>qFCFC^52CA!cTFvftFka$ZVEL=I16Fqt;T3h1d7-QnbjVluu
zK7bEpoI_9%OOtk{GvEK8IrH)P_70$iQU)=^ZCE)ZkQ69f(ttKJdFLC)olEHk0?AF~
zsbEVWUR`b5NC_0%|FJ=nre=?{mj1W+R3P6B$h|tG>ydk!_I*jg
zkV(<*O-S0Dm1*`v-<5mHOi+p#c-`C-71+E0^Q8IZ6@X9WY=xsRm9^Lu&pOpabq7FTSEy&t|SmkZ<~!QL}?$VXq~^>#VGCl6m4Z(
KE3h;iYxxUZeqFBs
literal 0
HcmV?d00001
diff --git a/src/test/resources/input/singleFeatureTests/VariableCompare.class b/src/test/resources/input/singleFeatureTests/VariableCompare.class
new file mode 100644
index 0000000000000000000000000000000000000000..bf2b598420363d648239a9e90f5d6f4454e81cd4
GIT binary patch
literal 620
zcma*j!A^rf5C-6X3zkYzXp4z4ns`(X_63ZIHt9*_VAF%QrL0Or!K~1y^5V(FgAd?C
z8E1&m(!EFmv&?=wv%8;P?;ijzvE!lz%Yp4-18sp|E|+qc$^2m$#d9?)1=?q6o|fkV
z*3t3QK}W!!N}b9$Q=?+>B()N-M@2%xze;m;Q!QepCp<6Umby~cs(dVxy1<=4_g-et
zzquZRi#(aExc*OWyb1^PGLnsKz% (10 + 8)) {
- } else {
- }
-
-
- while (a > adf) {
- a--;
- }
-
- for (int i = 0; i < 5; i++) {
- }
-
+ public void test(){
+ a = 10;
}
+
}
--
2.34.1
From 879fa08cdce176b10b6d0f698fa250b007a8eab4 Mon Sep 17 00:00:00 2001
From: i22035
Date: Wed, 3 Jul 2024 20:26:39 +0200
Subject: [PATCH 37/96] SemanticAnalyzer Fail Tests
---
src/test/java/semantic/EndToTypedAstTest.java | 128 ++++++++++++++++++
src/test/java/semantic/SemanticHelper.java | 32 +++++
.../johnsTests/FieldAlreadyDecleared.java | 4 +
.../input/johnsTests/NotDeclared.java | 5 +
.../johnsTests/ParameterAlreadyDecleared.java | 3 +
.../input/johnsTests/TypeMismatchIntBool.java | 6 +
.../input/johnsTests/TypeMismatchRefType.java | 13 ++
.../typedAstFeatureTests/CorrectTest.java | 16 ++-
8 files changed, 202 insertions(+), 5 deletions(-)
create mode 100644 src/test/java/semantic/SemanticHelper.java
create mode 100644 src/test/resources/input/johnsTests/FieldAlreadyDecleared.java
create mode 100644 src/test/resources/input/johnsTests/NotDeclared.java
create mode 100644 src/test/resources/input/johnsTests/ParameterAlreadyDecleared.java
create mode 100644 src/test/resources/input/johnsTests/TypeMismatchIntBool.java
create mode 100644 src/test/resources/input/johnsTests/TypeMismatchRefType.java
diff --git a/src/test/java/semantic/EndToTypedAstTest.java b/src/test/java/semantic/EndToTypedAstTest.java
index a33b9d4..e25aec6 100644
--- a/src/test/java/semantic/EndToTypedAstTest.java
+++ b/src/test/java/semantic/EndToTypedAstTest.java
@@ -26,6 +26,10 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.junit.jupiter.api.Test;
+import semantic.exceptions.AlreadyDeclaredException;
+import semantic.exceptions.MultipleReturnTypes;
+import semantic.exceptions.NotDeclaredException;
+import semantic.exceptions.TypeMismatchException;
import static org.junit.jupiter.api.Assertions.*;
@@ -152,6 +156,130 @@ public class EndToTypedAstTest {
}
}
+ /*
+ @Test
+ public void notDeclared() {
+ ASTNode tast = SemanticHelper.generateTypedASTFrom("src/test/resources/input/johnsTests/NotDeclared.java");
+
+ SemanticAnalyzer.generateTast(tast);
+
+ assertFalse(SemanticAnalyzer.errors.isEmpty());
+ assertTrue(SemanticAnalyzer.errors.stream().anyMatch(c -> c instanceof NotDeclaredException));
+ }*/
+
+ @Test
+ public void typeMismatchTest() {
+ ASTNode tast = SemanticHelper.generateTypedASTFrom("src/test/resources/input/johnsTests/TypeMismatchIntBool.java");
+
+ SemanticAnalyzer.generateTast(tast);
+
+ assertFalse(SemanticAnalyzer.errors.isEmpty());
+ assertTrue(SemanticAnalyzer.errors.stream().anyMatch(c -> c instanceof TypeMismatchException));
+ }
+
+ @Test
+ public void parameterAlreadyDecleared() {
+ ASTNode tast = SemanticHelper.generateTypedASTFrom("src/test/resources/input/johnsTests/ParameterAlreadyDecleared.java");
+
+ SemanticAnalyzer.generateTast(tast);
+
+ assertFalse(SemanticAnalyzer.errors.isEmpty());
+ assertTrue(SemanticAnalyzer.errors.stream().anyMatch(c -> c instanceof AlreadyDeclaredException));
+ }
+
+ @Test
+ public void fieldAlreadyDecleared(){
+ ASTNode tast = SemanticHelper.generateTypedASTFrom("src/test/resources/input/johnsTests/FieldAlreadyDecleared.java");
+ SemanticAnalyzer.generateTast(tast);
+
+ assertFalse(SemanticAnalyzer.errors.isEmpty());
+ assertTrue(SemanticAnalyzer.errors.stream().anyMatch(c -> c instanceof AlreadyDeclaredException));
+
+ }
+
+ @Test
+ public void typeMismatchRefType(){
+ ASTNode tast = SemanticHelper.generateTypedASTFrom("src/test/resources/input/johnsTests/TypeMismatchRefType.java");
+
+ SemanticAnalyzer.generateTast(tast);
+
+ assertFalse(SemanticAnalyzer.errors.isEmpty());
+ assertTrue(SemanticAnalyzer.errors.stream().anyMatch(c -> c instanceof TypeMismatchException));
+ }
+
+ @Test
+ public void correctRetType(){
+
+ CharStream codeCharStream = null;
+ try {
+ codeCharStream = CharStreams.fromPath(Paths.get("src/test/resources/semantic/endToTAST/CorrectRetType.java"));
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ SimpleJavaLexer lexer = new SimpleJavaLexer(codeCharStream);
+ CommonTokenStream tokenStream = new CommonTokenStream(lexer);
+
+ SimpleJavaParser parser = new SimpleJavaParser(tokenStream);
+ ParseTree parseTree = parser.program();
+
+ ASTBuilder astBuilder = new ASTBuilder();
+ ProgramNode abstractSyntaxTree = (ProgramNode) astBuilder.visit(parseTree);
+
+ ASTNode tast = SemanticAnalyzer.generateTast(abstractSyntaxTree);
+
+ assertTrue(SemanticAnalyzer.errors.isEmpty());
+
+ }
+
+ @Test
+ public void retTypeMismatch(){
+
+ CharStream codeCharStream = null;
+ try {
+ codeCharStream = CharStreams.fromPath(Paths.get("src/test/resources/semantic/endToTAST/retTypeMismatch.java"));
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ SimpleJavaLexer lexer = new SimpleJavaLexer(codeCharStream);
+ CommonTokenStream tokenStream = new CommonTokenStream(lexer);
+
+ SimpleJavaParser parser = new SimpleJavaParser(tokenStream);
+ ParseTree parseTree = parser.program();
+
+ ASTBuilder astBuilder = new ASTBuilder();
+ ProgramNode abstractSyntaxTree = (ProgramNode) astBuilder.visit(parseTree);
+
+ ASTNode tast = SemanticAnalyzer.generateTast(abstractSyntaxTree);
+
+ assertFalse(SemanticAnalyzer.errors.isEmpty());
+ assertInstanceOf(TypeMismatchException.class, SemanticAnalyzer.errors.getFirst());
+
+ }
+
+ @Test
+ public void multipleRetType(){
+
+ CharStream codeCharStream = null;
+ try {
+ codeCharStream = CharStreams.fromPath(Paths.get("src/test/resources/semantic/endToTAST/MultipleRetTypes.java"));
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ SimpleJavaLexer lexer = new SimpleJavaLexer(codeCharStream);
+ CommonTokenStream tokenStream = new CommonTokenStream(lexer);
+
+ SimpleJavaParser parser = new SimpleJavaParser(tokenStream);
+ ParseTree parseTree = parser.program();
+
+ ASTBuilder astBuilder = new ASTBuilder();
+ ProgramNode abstractSyntaxTree = (ProgramNode) astBuilder.visit(parseTree);
+
+ ASTNode tast = SemanticAnalyzer.generateTast(abstractSyntaxTree);
+
+ assertFalse(SemanticAnalyzer.errors.isEmpty());
+ assertInstanceOf(MultipleReturnTypes.class, SemanticAnalyzer.errors.getFirst());
+
+ }
// ------------------ Helpers ------------------
diff --git a/src/test/java/semantic/SemanticHelper.java b/src/test/java/semantic/SemanticHelper.java
new file mode 100644
index 0000000..7b0c0ed
--- /dev/null
+++ b/src/test/java/semantic/SemanticHelper.java
@@ -0,0 +1,32 @@
+package semantic;
+
+import ast.ASTNode;
+import ast.ProgramNode;
+import org.antlr.v4.runtime.CharStream;
+import org.antlr.v4.runtime.CharStreams;
+import org.antlr.v4.runtime.CommonTokenStream;
+import org.antlr.v4.runtime.tree.ParseTree;
+import parser.astBuilder.ASTBuilder;
+import parser.generated.SimpleJavaLexer;
+import parser.generated.SimpleJavaParser;
+
+import java.io.IOException;
+
+public class SemanticHelper {
+ public static ASTNode generateTypedASTFrom(String filePath) {
+ CharStream testFile = null;
+ try {
+ testFile = CharStreams.fromFileName(filePath);
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ SimpleJavaLexer lexer = new SimpleJavaLexer(testFile);
+ CommonTokenStream tokenStream = new CommonTokenStream(lexer);
+ tokenStream.fill();
+ SimpleJavaParser parser = new SimpleJavaParser(tokenStream);
+ ParseTree parseTree = parser.program();
+ ASTBuilder astBuilder = new ASTBuilder();
+
+ return (ProgramNode) astBuilder.visit(parseTree);
+ }
+}
diff --git a/src/test/resources/input/johnsTests/FieldAlreadyDecleared.java b/src/test/resources/input/johnsTests/FieldAlreadyDecleared.java
new file mode 100644
index 0000000..2889707
--- /dev/null
+++ b/src/test/resources/input/johnsTests/FieldAlreadyDecleared.java
@@ -0,0 +1,4 @@
+public class FieldAlreadyDecleared {
+ public int a;
+ public int a;
+}
\ No newline at end of file
diff --git a/src/test/resources/input/johnsTests/NotDeclared.java b/src/test/resources/input/johnsTests/NotDeclared.java
new file mode 100644
index 0000000..45f3333
--- /dev/null
+++ b/src/test/resources/input/johnsTests/NotDeclared.java
@@ -0,0 +1,5 @@
+public class NotDeclared {
+ public void Method() {
+ i = 10;
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/input/johnsTests/ParameterAlreadyDecleared.java b/src/test/resources/input/johnsTests/ParameterAlreadyDecleared.java
new file mode 100644
index 0000000..b79c10a
--- /dev/null
+++ b/src/test/resources/input/johnsTests/ParameterAlreadyDecleared.java
@@ -0,0 +1,3 @@
+public class ParameterAlreadyDecleared {
+ public void Method(int a, int a) {}
+}
\ No newline at end of file
diff --git a/src/test/resources/input/johnsTests/TypeMismatchIntBool.java b/src/test/resources/input/johnsTests/TypeMismatchIntBool.java
new file mode 100644
index 0000000..cc74248
--- /dev/null
+++ b/src/test/resources/input/johnsTests/TypeMismatchIntBool.java
@@ -0,0 +1,6 @@
+public class TypeMismatchIntBool {
+ public void Method() {
+ int intVariable;
+ intVariable = true;
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/input/johnsTests/TypeMismatchRefType.java b/src/test/resources/input/johnsTests/TypeMismatchRefType.java
new file mode 100644
index 0000000..deacce3
--- /dev/null
+++ b/src/test/resources/input/johnsTests/TypeMismatchRefType.java
@@ -0,0 +1,13 @@
+public class TypeMismatchRefType {
+ public static int Methode(Class1 class1, Class2 class2){
+ class1 = class2;
+ }
+}
+
+public class Class1{
+ public int a;
+}
+
+public class Class2{
+ public boolean a;
+}
\ No newline at end of file
diff --git a/src/test/resources/input/typedAstFeatureTests/CorrectTest.java b/src/test/resources/input/typedAstFeatureTests/CorrectTest.java
index 2a7e882..53a8f3c 100644
--- a/src/test/resources/input/typedAstFeatureTests/CorrectTest.java
+++ b/src/test/resources/input/typedAstFeatureTests/CorrectTest.java
@@ -1,7 +1,13 @@
+public class Klasse1 {
+ public int test;
- public class Run {
- public static void main(String[] args) {
-// Test t = new Test();
-// System.out.println(t.test());
- }
+ public int test1() {
+ test = 5;
+ return 1;
}
+
+ public void test2() {
+ int testInt;
+ testInt = this.test1();
+ }
+}
\ No newline at end of file
--
2.34.1
From ed25868ff73b6d288dc027787a1246841af18b16 Mon Sep 17 00:00:00 2001
From: Bruder John
Date: Wed, 3 Jul 2024 20:27:29 +0200
Subject: [PATCH 38/96] fix tests
---
.../CallMethodFromObjekt.java | 5 ++---
.../CorrectMemberAccess.java | 6 +++---
.../input/typedAstFeatureTests/FullTest.java | 20 +------------------
3 files changed, 6 insertions(+), 25 deletions(-)
diff --git a/src/test/resources/input/typedAstFeatureTests/CallMethodFromObjekt.java b/src/test/resources/input/typedAstFeatureTests/CallMethodFromObjekt.java
index 714960f..469650f 100644
--- a/src/test/resources/input/typedAstFeatureTests/CallMethodFromObjekt.java
+++ b/src/test/resources/input/typedAstFeatureTests/CallMethodFromObjekt.java
@@ -3,10 +3,10 @@ public class CallMethodFromObjekt {
public int firstInt;
public Car ca;
- public int speed(){
+ public int speed() {
return ca.getSpeed();
}
-
+}
public class Car{
@@ -16,5 +16,4 @@ public class Car{
return speed;
}
-}
}
\ No newline at end of file
diff --git a/src/test/resources/input/typedAstFeatureTests/CorrectMemberAccess.java b/src/test/resources/input/typedAstFeatureTests/CorrectMemberAccess.java
index 462d181..46cdd5b 100644
--- a/src/test/resources/input/typedAstFeatureTests/CorrectMemberAccess.java
+++ b/src/test/resources/input/typedAstFeatureTests/CorrectMemberAccess.java
@@ -1,11 +1,12 @@
-public class CorrectMemberAccess{
+public class CorrectMemberAccess {
public Car c;
- public int test(){
+ public int test() {
return c.getSpeed();
}
+}
private class Car{
@@ -15,5 +16,4 @@ private class Car{
return speed;
}
-}
}
\ No newline at end of file
diff --git a/src/test/resources/input/typedAstFeatureTests/FullTest.java b/src/test/resources/input/typedAstFeatureTests/FullTest.java
index f512c69..2faec6b 100644
--- a/src/test/resources/input/typedAstFeatureTests/FullTest.java
+++ b/src/test/resources/input/typedAstFeatureTests/FullTest.java
@@ -17,25 +17,8 @@ public class FullTest {
for (int i = 0; i < 5; i++) {
}
+ }
-
-
-// void logicalOperations() {
-// // Logische UND-Operation
-// if (b && a > 5) {
-//// System.out.println("a ist größer als 5 und b ist wahr");
-// }
-//
-// // Logische ODER-Operation
-// if (b || a < 5) {
-//// System.out.println("b ist wahr oder a ist kleiner als 5");
-// }
-// }
-
-// public static void main(String[] args) {
-// AllFeaturesClassExample obj = new AllFeaturesClassExample(12, true, 'a');
-// obj.controlStructures();
-// }
}
public class Test {
@@ -60,6 +43,5 @@ public class Car {
return speed;
}
-}
}
\ No newline at end of file
--
2.34.1
From ca539add988e459fa6b832a4fbd00177f517ea21 Mon Sep 17 00:00:00 2001
From: i22035
Date: Wed, 3 Jul 2024 20:36:49 +0200
Subject: [PATCH 39/96] More Semantic Test
---
src/test/java/semantic/EndToTypedAstTest.java | 62 +++----------------
.../CorrectRetType.java | 5 ++
.../FieldAlreadyDecleared.java | 0
.../FieldTests.java | 0
.../MultipleRetTypes.java | 6 ++
.../NotDeclared.java | 0
.../ParameterAlreadyDecleared.java | 0
.../RetTypeMismatch.java | 5 ++
.../TypeMismatchIntBool.java | 0
.../TypeMismatchRefType.java | 0
10 files changed, 24 insertions(+), 54 deletions(-)
create mode 100644 src/test/resources/input/singleFeatureSemanticTests/CorrectRetType.java
rename src/test/resources/input/{johnsTests => singleFeatureSemanticTests}/FieldAlreadyDecleared.java (100%)
rename src/test/resources/input/{johnsTests => singleFeatureSemanticTests}/FieldTests.java (100%)
create mode 100644 src/test/resources/input/singleFeatureSemanticTests/MultipleRetTypes.java
rename src/test/resources/input/{johnsTests => singleFeatureSemanticTests}/NotDeclared.java (100%)
rename src/test/resources/input/{johnsTests => singleFeatureSemanticTests}/ParameterAlreadyDecleared.java (100%)
create mode 100644 src/test/resources/input/singleFeatureSemanticTests/RetTypeMismatch.java
rename src/test/resources/input/{johnsTests => singleFeatureSemanticTests}/TypeMismatchIntBool.java (100%)
rename src/test/resources/input/{johnsTests => singleFeatureSemanticTests}/TypeMismatchRefType.java (100%)
diff --git a/src/test/java/semantic/EndToTypedAstTest.java b/src/test/java/semantic/EndToTypedAstTest.java
index 6917d55..50bdfd2 100644
--- a/src/test/java/semantic/EndToTypedAstTest.java
+++ b/src/test/java/semantic/EndToTypedAstTest.java
@@ -210,78 +210,32 @@ public class EndToTypedAstTest {
@Test
public void correctRetType(){
+ ASTNode tast = SemanticHelper.generateTypedASTFrom("src/test/resources/input/johnsTests/CorrectRetType.java");
- CharStream codeCharStream = null;
- try {
- codeCharStream = CharStreams.fromPath(Paths.get("src/test/resources/semantic/endToTAST/CorrectRetType.java"));
- } catch (IOException e) {
- throw new RuntimeException(e);
- }
- SimpleJavaLexer lexer = new SimpleJavaLexer(codeCharStream);
- CommonTokenStream tokenStream = new CommonTokenStream(lexer);
-
- SimpleJavaParser parser = new SimpleJavaParser(tokenStream);
- ParseTree parseTree = parser.program();
-
- ASTBuilder astBuilder = new ASTBuilder();
- ProgramNode abstractSyntaxTree = (ProgramNode) astBuilder.visit(parseTree);
-
- ASTNode tast = SemanticAnalyzer.generateTast(abstractSyntaxTree);
+ SemanticAnalyzer.generateTast(tast);
assertTrue(SemanticAnalyzer.errors.isEmpty());
-
}
@Test
public void retTypeMismatch(){
+ ASTNode tast = SemanticHelper.generateTypedASTFrom("src/test/resources/input/johnsTests/RetTypeMismatch.java");
- CharStream codeCharStream = null;
- try {
- codeCharStream = CharStreams.fromPath(Paths.get("src/test/resources/semantic/endToTAST/retTypeMismatch.java"));
- } catch (IOException e) {
- throw new RuntimeException(e);
- }
- SimpleJavaLexer lexer = new SimpleJavaLexer(codeCharStream);
- CommonTokenStream tokenStream = new CommonTokenStream(lexer);
-
- SimpleJavaParser parser = new SimpleJavaParser(tokenStream);
- ParseTree parseTree = parser.program();
-
- ASTBuilder astBuilder = new ASTBuilder();
- ProgramNode abstractSyntaxTree = (ProgramNode) astBuilder.visit(parseTree);
-
- ASTNode tast = SemanticAnalyzer.generateTast(abstractSyntaxTree);
+ SemanticAnalyzer.generateTast(tast);
assertFalse(SemanticAnalyzer.errors.isEmpty());
- assertInstanceOf(TypeMismatchException.class, SemanticAnalyzer.errors.getFirst());
-
+ assertTrue(SemanticAnalyzer.errors.stream().anyMatch(c -> c instanceof TypeMismatchException));
}
@Test
public void multipleRetType(){
+ ASTNode tast = SemanticHelper.generateTypedASTFrom("src/test/resources/input/singleFeatureSemanticTests/MultipleRetTypes.java");
- CharStream codeCharStream = null;
- try {
- codeCharStream = CharStreams.fromPath(Paths.get("src/test/resources/semantic/endToTAST/MultipleRetTypes.java"));
- } catch (IOException e) {
- throw new RuntimeException(e);
- }
- SimpleJavaLexer lexer = new SimpleJavaLexer(codeCharStream);
- CommonTokenStream tokenStream = new CommonTokenStream(lexer);
-
- SimpleJavaParser parser = new SimpleJavaParser(tokenStream);
- ParseTree parseTree = parser.program();
-
- ASTBuilder astBuilder = new ASTBuilder();
- ProgramNode abstractSyntaxTree = (ProgramNode) astBuilder.visit(parseTree);
-
- ASTNode tast = SemanticAnalyzer.generateTast(abstractSyntaxTree);
+ SemanticAnalyzer.generateTast(tast);
assertFalse(SemanticAnalyzer.errors.isEmpty());
- assertInstanceOf(MultipleReturnTypes.class, SemanticAnalyzer.errors.getFirst());
-
+ assertTrue(SemanticAnalyzer.errors.stream().anyMatch(c -> c instanceof MultipleReturnTypes));
}
-
// ------------------ Helpers ------------------
/**
diff --git a/src/test/resources/input/singleFeatureSemanticTests/CorrectRetType.java b/src/test/resources/input/singleFeatureSemanticTests/CorrectRetType.java
new file mode 100644
index 0000000..4c0a9f9
--- /dev/null
+++ b/src/test/resources/input/singleFeatureSemanticTests/CorrectRetType.java
@@ -0,0 +1,5 @@
+public class CorrectRetType {
+ public static int testMethod(int x){
+ return x;
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/input/johnsTests/FieldAlreadyDecleared.java b/src/test/resources/input/singleFeatureSemanticTests/FieldAlreadyDecleared.java
similarity index 100%
rename from src/test/resources/input/johnsTests/FieldAlreadyDecleared.java
rename to src/test/resources/input/singleFeatureSemanticTests/FieldAlreadyDecleared.java
diff --git a/src/test/resources/input/johnsTests/FieldTests.java b/src/test/resources/input/singleFeatureSemanticTests/FieldTests.java
similarity index 100%
rename from src/test/resources/input/johnsTests/FieldTests.java
rename to src/test/resources/input/singleFeatureSemanticTests/FieldTests.java
diff --git a/src/test/resources/input/singleFeatureSemanticTests/MultipleRetTypes.java b/src/test/resources/input/singleFeatureSemanticTests/MultipleRetTypes.java
new file mode 100644
index 0000000..1492d28
--- /dev/null
+++ b/src/test/resources/input/singleFeatureSemanticTests/MultipleRetTypes.java
@@ -0,0 +1,6 @@
+public class MultipleRetTypes {
+ public static int testMethod(int x, char c){
+ return x;
+ return c;
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/input/johnsTests/NotDeclared.java b/src/test/resources/input/singleFeatureSemanticTests/NotDeclared.java
similarity index 100%
rename from src/test/resources/input/johnsTests/NotDeclared.java
rename to src/test/resources/input/singleFeatureSemanticTests/NotDeclared.java
diff --git a/src/test/resources/input/johnsTests/ParameterAlreadyDecleared.java b/src/test/resources/input/singleFeatureSemanticTests/ParameterAlreadyDecleared.java
similarity index 100%
rename from src/test/resources/input/johnsTests/ParameterAlreadyDecleared.java
rename to src/test/resources/input/singleFeatureSemanticTests/ParameterAlreadyDecleared.java
diff --git a/src/test/resources/input/singleFeatureSemanticTests/RetTypeMismatch.java b/src/test/resources/input/singleFeatureSemanticTests/RetTypeMismatch.java
new file mode 100644
index 0000000..994d51d
--- /dev/null
+++ b/src/test/resources/input/singleFeatureSemanticTests/RetTypeMismatch.java
@@ -0,0 +1,5 @@
+public class Example {
+ public static int testMethod(char x){
+ return x;
+ }
+}
\ No newline at end of file
diff --git a/src/test/resources/input/johnsTests/TypeMismatchIntBool.java b/src/test/resources/input/singleFeatureSemanticTests/TypeMismatchIntBool.java
similarity index 100%
rename from src/test/resources/input/johnsTests/TypeMismatchIntBool.java
rename to src/test/resources/input/singleFeatureSemanticTests/TypeMismatchIntBool.java
diff --git a/src/test/resources/input/johnsTests/TypeMismatchRefType.java b/src/test/resources/input/singleFeatureSemanticTests/TypeMismatchRefType.java
similarity index 100%
rename from src/test/resources/input/johnsTests/TypeMismatchRefType.java
rename to src/test/resources/input/singleFeatureSemanticTests/TypeMismatchRefType.java
--
2.34.1
From d4be77ceb2d1bd9a4d4c6aed91c6bb73f6b29990 Mon Sep 17 00:00:00 2001
From: Bruder John