diff --git a/Phase-3/src/Main.java b/Phase-3/src/Main.java index d203f13..c14c342 100644 --- a/Phase-3/src/Main.java +++ b/Phase-3/src/Main.java @@ -10,27 +10,26 @@ import visitor.typeAnalyzer.TypeAnalyzer; public class Main { - public static void main(String[] args) throws java.io.IOException { + public static void main(String[] args) throws java.io.IOException { - CharStream reader = CharStreams.fromFileName(args[0]); - LogicPLLexer lexer = new LogicPLLexer(reader); - CommonTokenStream tokens = new CommonTokenStream(lexer); - LogicPLParser parser = new LogicPLParser(tokens); - Program program = parser.program().p; + CharStream reader = CharStreams.fromFileName(args[0]); + LogicPLLexer lexer = new LogicPLLexer(reader); + CommonTokenStream tokens = new CommonTokenStream(lexer); + LogicPLParser parser = new LogicPLParser(tokens); + Program program = parser.program().p; + NameAnalyzer nameAnalyzer = new NameAnalyzer(); + nameAnalyzer.visit(program); - NameAnalyzer nameAnalyzer = new NameAnalyzer(); - nameAnalyzer.visit(program); + TypeAnalyzer typeAnalyzer = new TypeAnalyzer(); + typeAnalyzer.visit(program); - TypeAnalyzer typeAnalyzer = new TypeAnalyzer(); - typeAnalyzer.visit(program); - if (typeAnalyzer.typeErrors.size() > 0){ - for(CompileError compileError: typeAnalyzer.typeErrors) - System.out.println(compileError.getMessage()); - return; - } - - System.out.println("Compilation was Successful!!"); + if (typeAnalyzer.typeErrors.size() > 0) { + for (CompileError compileError : typeAnalyzer.typeErrors) + System.out.println(compileError.getMessage()); + return; } -} \ No newline at end of file + System.out.println("Compilation was Successful!!"); + } +} diff --git a/Phase-3/src/ast/node/statement/ForloopStmt.java b/Phase-3/src/ast/node/statement/ForloopStmt.java index 066bf50..afee4fe 100644 --- a/Phase-3/src/ast/node/statement/ForloopStmt.java +++ b/Phase-3/src/ast/node/statement/ForloopStmt.java @@ -7,6 +7,7 @@ //Line -> FOR public class ForloopStmt extends Statement { + private int id; private Identifier iterator; private Identifier arrayName; private ArrayList bodyStmts = new ArrayList<>(); @@ -43,6 +44,14 @@ public void setArrayName(Identifier identifier) { this.arrayName = identifier; } + public int getForloopId() { + return id; + } + + public void setForloopId(int id) { + this.id = id; + } + @Override public String toString() { return "ForloopStmt"; diff --git a/Phase-3/src/ast/node/statement/ImplicationStmt.java b/Phase-3/src/ast/node/statement/ImplicationStmt.java index c04b6dc..8aa207b 100644 --- a/Phase-3/src/ast/node/statement/ImplicationStmt.java +++ b/Phase-3/src/ast/node/statement/ImplicationStmt.java @@ -1,14 +1,13 @@ package ast.node.statement; import ast.node.expression.Expression; -import ast.node.expression.Identifier; -import ast.node.expression.Variable; import visitor.IVisitor; import java.util.ArrayList; //Line -> ARROW public class ImplicationStmt extends Statement { + private int id; private Expression condition; private ArrayList resaultStmts = new ArrayList<>(); @@ -35,6 +34,14 @@ public void setCondition(Expression condition) { this.condition = condition; } + public int getImplicationId() { + return id; + } + + public void setImplicationId(int id) { + this.id = id; + } + @Override public String toString() { return "ImplicationStmt"; diff --git a/Phase-3/src/symbolTable/symbolTableItems/ForLoopItem.java b/Phase-3/src/symbolTable/symbolTableItems/ForLoopItem.java index 9bb26ae..46bf5d6 100644 --- a/Phase-3/src/symbolTable/symbolTableItems/ForLoopItem.java +++ b/Phase-3/src/symbolTable/symbolTableItems/ForLoopItem.java @@ -1,35 +1,33 @@ package symbolTable.symbolTableItems; -import ast.node.declaration.ArgDeclaration; -import ast.node.declaration.FuncDeclaration; import ast.node.statement.ForloopStmt; -import ast.type.Type; import symbolTable.SymbolTable; -import java.util.ArrayList; - -public class ForLoopItem extends SymbolTableItem{ - protected SymbolTable ForLoopSymbolTable; +public class ForLoopItem extends SymbolTableItem { + protected SymbolTable forLoopSymbolTable; protected ForloopStmt forloopStmt; - public static final String STARTKEY = "ForLoop_"; - public ForLoopItem(String name) { - this.name = name; - } + public static final String STARTKEY = "ForLoop_"; + private static int counter = 0; + private int id; - public ForLoopItem(ForloopStmt forloopStmt) - { + public ForLoopItem(ForloopStmt forloopStmt) { + this.id = counter++; + forloopStmt.setForloopId(id); this.name = forloopStmt.toString(); this.forloopStmt = forloopStmt; } - public SymbolTable getForLoopSymbolTable() - { - return this.ForLoopSymbolTable; + public SymbolTable getForLoopSymbolTable() { + return this.forLoopSymbolTable; + } + + public void setForLoopSymbolTable(SymbolTable symbolTable) { + this.forLoopSymbolTable = symbolTable; } @Override public String getKey() { - return FunctionItem.STARTKEY + this.name; + return ForLoopItem.STARTKEY + this.name + this.id; } } diff --git a/Phase-3/src/symbolTable/symbolTableItems/ImplicationItem.java b/Phase-3/src/symbolTable/symbolTableItems/ImplicationItem.java new file mode 100644 index 0000000..111cd4d --- /dev/null +++ b/Phase-3/src/symbolTable/symbolTableItems/ImplicationItem.java @@ -0,0 +1,33 @@ +package symbolTable.symbolTableItems; + +import ast.node.statement.ImplicationStmt; +import symbolTable.SymbolTable; + +public class ImplicationItem extends SymbolTableItem { + protected SymbolTable implicationSymbolTable; + protected ImplicationStmt implicationStmt; + + public static final String STARTKEY = "Implication_"; + private static int counter = 0; + private int id; + + public ImplicationItem(ImplicationStmt implicationStmt) { + this.id = counter++; + implicationStmt.setImplicationId(id); + this.name = implicationStmt.toString(); + this.implicationStmt = implicationStmt; + } + + public SymbolTable getImplicationSymbolTable() { + return this.implicationSymbolTable; + } + + public void setImplicationSymbolTable(SymbolTable symbolTable) { + this.implicationSymbolTable = symbolTable; + } + + @Override + public String getKey() { + return ImplicationItem.STARTKEY + this.name + this.id; + } +} diff --git a/Phase-3/src/visitor/astPrinter/ASTPrinter.java b/Phase-3/src/visitor/astPrinter/ASTPrinter.java index f9649e7..a2e3ed8 100644 --- a/Phase-3/src/visitor/astPrinter/ASTPrinter.java +++ b/Phase-3/src/visitor/astPrinter/ASTPrinter.java @@ -86,8 +86,8 @@ public Void visit(ArrayAccess arrayAccess) { @Override public Void visit(FunctionCall functionCall) { messagePrinter(functionCall.getLine(), functionCall.toString()); - if (functionCall.getUFuncName() != null) - functionCall.getUFuncName().accept(this); + if (functionCall.getFuncName() != null) + functionCall.getFuncName().accept(this); for (Expression expression: functionCall.getArgs()) expression.accept(this); return null; diff --git a/Phase-3/src/visitor/nameAnalyzer/NameAnalyzer.java b/Phase-3/src/visitor/nameAnalyzer/NameAnalyzer.java index 1f1de19..eb42090 100644 --- a/Phase-3/src/visitor/nameAnalyzer/NameAnalyzer.java +++ b/Phase-3/src/visitor/nameAnalyzer/NameAnalyzer.java @@ -3,12 +3,13 @@ import ast.node.Program; import ast.node.declaration.*; import ast.node.statement.*; +import ast.type.NoType; import compileError.*; import compileError.Name.*; import symbolTable.SymbolTable; import symbolTable.symbolTableItems.*; import symbolTable.itemException.ItemAlreadyExistsException; -import symbolTable.symbolTableItems.VariableItem; +import symbolTable.itemException.ItemNotFoundException; import visitor.Visitor; import java.util.ArrayList; @@ -27,6 +28,7 @@ public Void visit(Program program) { functionDeclaration.accept(this); } + // program.getMain().accept(this); for (var stmt : program.getMain().getMainStatements()) { if(stmt instanceof VarDecStmt) { stmt.accept(this); @@ -45,6 +47,30 @@ public Void visit(Program program) { return null; } + // @Override + // public Void visit(MainDeclaration mainDeclaration) { + // var mainItem = new MainItem(mainDeclaration); + // var mainSymbolTable = new SymbolTable(SymbolTable.top, "main"); + // mainItem.setMainItemSymbolTable(mainSymbolTable); + // SymbolTable.push(mainSymbolTable); + + // for (var stmt : mainDeclaration.getMainStatements()) { + // if (stmt instanceof VarDecStmt) { + // stmt.accept(this); + // } + // if (stmt instanceof ArrayDecStmt) { + // stmt.accept(this); + // } + // if (stmt instanceof ForloopStmt) { + // stmt.accept(this); + // } + // if (stmt instanceof ImplicationStmt) { + // stmt.accept(this); + // } + // } + + // return null; + // } @Override public Void visit(FuncDeclaration funcDeclaration) { @@ -94,9 +120,34 @@ public Void visit(FuncDeclaration funcDeclaration) { @Override public Void visit(ForloopStmt forloopStmt) { + var forloopItem = new ForLoopItem(forloopStmt); var forLoopSymbolTable = new SymbolTable(SymbolTable.top, forloopStmt.toString()); + forloopItem.setForLoopSymbolTable(forLoopSymbolTable); + + try { + SymbolTable.top.put(forloopItem); + } + catch (ItemAlreadyExistsException e) { + // unreachable + } + + VariableItem forVarItem; + try { + var x = (VariableItem) SymbolTable.top.get(VariableItem.STARTKEY + forloopStmt.getArrayName().getName()); + forVarItem = new VariableItem(forloopStmt.getIterator().getName(), x.getType()); + } + catch (ItemNotFoundException e) { + forVarItem = new VariableItem(forloopStmt.getIterator().getName(), new NoType()); + } SymbolTable.push(forLoopSymbolTable); + try { + SymbolTable.top.put(forVarItem); + } + catch (ItemAlreadyExistsException e) { + // unreachable + } + for(Statement stmt: forloopStmt.getStatements()) { if(stmt instanceof VarDecStmt) { stmt.accept(this); @@ -121,7 +172,16 @@ public Void visit(ForloopStmt forloopStmt) { @Override public Void visit(ImplicationStmt implicationStmt) { + var implicationItem = new ImplicationItem(implicationStmt); var implicationSymbolTable = new SymbolTable(SymbolTable.top, implicationStmt.toString()); + implicationItem.setImplicationSymbolTable(implicationSymbolTable); + + try { + SymbolTable.top.put(implicationItem); + } + catch (ItemAlreadyExistsException e) { + // unreachable + } SymbolTable.push(implicationSymbolTable); for(Statement stmt: implicationStmt.getStatements()) { @@ -161,6 +221,7 @@ public Void visit(VarDecStmt varDeclaration) { @Override public Void visit(ArrayDecStmt arrayDecStmt) { + // var variableItem = new ArrayItem(arrayDecStmt); var variableItem = new VariableItem(arrayDecStmt.getIdentifier().getName(), arrayDecStmt.getType()); try { SymbolTable.top.put(variableItem); diff --git a/Phase-3/src/visitor/typeAnalyzer/ExpressionTypeChecker.java b/Phase-3/src/visitor/typeAnalyzer/ExpressionTypeChecker.java index ceb1cc6..f5193d9 100644 --- a/Phase-3/src/visitor/typeAnalyzer/ExpressionTypeChecker.java +++ b/Phase-3/src/visitor/typeAnalyzer/ExpressionTypeChecker.java @@ -4,7 +4,7 @@ import ast.node.expression.*; import ast.node.expression.operators.BinaryOperator; import ast.node.expression.operators.UnaryOperator; -import ast.node.expression.values.IntValue; +import ast.node.expression.values.*; import ast.type.NoType; import ast.type.Type; import ast.type.primitiveType.BooleanType; @@ -15,7 +15,9 @@ import compileError.Type.UnsupportedOperandType; import compileError.Type.VarNotDeclared; import symbolTable.SymbolTable; +import symbolTable.itemException.ItemAlreadyExistsException; import symbolTable.itemException.ItemNotFoundException; +import symbolTable.symbolTableItems.ArrayItem; import symbolTable.symbolTableItems.FunctionItem; import symbolTable.symbolTableItems.VariableItem; import visitor.Visitor; @@ -40,7 +42,6 @@ public boolean isLvalue(Expression expr) { @Override public Type visit(UnaryExpression unaryExpression) { - Expression uExpr = unaryExpression.getOperand(); Type expType = uExpr.accept(this); UnaryOperator operator = unaryExpression.getUnaryOperator(); @@ -53,6 +54,9 @@ public Type visit(UnaryExpression unaryExpression) { else if (expType instanceof IntType) { return new IntType(); } + else if (expType instanceof FloatType) { + return new FloatType(); + } if (!(expType instanceof NoType)) { typeErrors.add(new UnsupportedOperandType(unaryExpression.getLine(), operator.name())); @@ -75,11 +79,15 @@ public Type visit(BinaryExpression binaryExpression) { if (tl instanceof IntType && tr instanceof IntType) { return new IntType(); } - if (tl instanceof NoType && tr instanceof IntType || tl instanceof IntType && tr instanceof NoType) { + if (tl instanceof FloatType && tr instanceof FloatType) { + return new FloatType(); + } + if ((tl instanceof NoType && (tr instanceof IntType || tr instanceof FloatType)) || + (tr instanceof NoType && (tl instanceof IntType || tl instanceof FloatType))) { return new NoType(); } } - case gt, lt, gte, lte -> { // TODO: The fuck vaghean + case eq, neq, gt, lt, gte, lte -> { if (sameType(tl, tr)) { return new BooleanType(); } @@ -91,17 +99,11 @@ public Type visit(BinaryExpression binaryExpression) { if (tl instanceof BooleanType && tr instanceof BooleanType) { return new BooleanType(); } - if (tl instanceof NoType && tr instanceof BooleanType || tl instanceof BooleanType && tr instanceof NoType) { + if ((tl instanceof NoType && tr instanceof BooleanType) || + (tr instanceof NoType && tl instanceof BooleanType)) { return new NoType(); } } - case eq, neq -> { - if (sameType(tl, tr)) { - return new BooleanType(); - } - if (tl instanceof NoType || tr instanceof NoType) - return new NoType(); - } } typeErrors.add(new UnsupportedOperandType(binaryExpression.getLine(), operator.name())); @@ -111,10 +113,17 @@ public Type visit(BinaryExpression binaryExpression) { @Override public Type visit(Identifier identifier) { try { - VariableItem var = (VariableItem) SymbolTable.root.get(VariableItem.STARTKEY + identifier.getName()); + VariableItem var = (VariableItem) SymbolTable.top.get(VariableItem.STARTKEY + identifier.getName()); return var.getType(); } catch (ItemNotFoundException e) { typeErrors.add(new VarNotDeclared(identifier.getLine(), identifier.getName())); + VariableItem vi = new VariableItem(identifier.getName(), new NoType()); + try { + SymbolTable.top.put(vi); + } + catch (ItemAlreadyExistsException ee) { + // unreachable? + } return new NoType(); } } @@ -122,14 +131,21 @@ public Type visit(Identifier identifier) { @Override public Type visit(ArrayAccess arrayAccess) { try { - VariableItem var = (VariableItem) SymbolTable.root.get(VariableItem.STARTKEY + arrayAccess.getName()); + VariableItem var = (VariableItem) SymbolTable.top.get(VariableItem.STARTKEY + arrayAccess.getName()); if (arrayAccess.getIndex().accept(this) instanceof IntType) { return var.getType(); } -// typeErrors.add(new UnsupportedOperandType(arrayAccess.getLine(), "[]")); + // typeErrors.add(new UnsupportedOperandType(arrayAccess.getLine(), "[]")); return new NoType(); } catch (ItemNotFoundException e) { typeErrors.add(new VarNotDeclared(arrayAccess.getLine(), arrayAccess.getName())); + VariableItem aa = new VariableItem(arrayAccess.getName(), new NoType()); + try { + SymbolTable.top.put(aa); + } + catch (ItemAlreadyExistsException ee) { + // unreachable + } return new NoType(); } } @@ -137,22 +153,48 @@ public Type visit(ArrayAccess arrayAccess) { @Override public Type visit(FunctionCall functionCall) { try { - FunctionItem func = (FunctionItem) SymbolTable.root.get(FunctionItem.STARTKEY + functionCall.getFuncName().getName()); + FunctionItem func = (FunctionItem) SymbolTable.top.get(FunctionItem.STARTKEY + functionCall.getFuncName().getName()); ArrayList args = functionCall.getArgs(); + if (func.getHandlerDeclaration() == null) { + return new NoType(); + } ArrayList argTypes = func.getHandlerDeclaration().getArgs(); if (args.size() != argTypes.size()) { -// typeErrors.add(new FunctionNotDeclared(functionCall.getLine(), functionCall.getFuncName().getName())); + // typeErrors.add(new FunctionNotDeclared(functionCall.getLine(), functionCall.getFuncName().getName())); } for (int i = 0; i < args.size(); i++) { Type argType = args.get(i).accept(this); Type argType2 = argTypes.get(i).getType(); if (!sameType(argType, argType2)) { -// typeErrors.add(new FunctionNotDeclared(functionCall.getLine(), functionCall.getFuncName().getName())); + // typeErrors.add(new FunctionNotDeclared(functionCall.getLine(), functionCall.getFuncName().getName())); } } return func.getHandlerDeclaration().getType(); } catch (ItemNotFoundException e) { typeErrors.add(new FunctionNotDeclared(functionCall.getLine(), functionCall.getFuncName().getName())); + ArrayList arrl = new ArrayList<>(); + for (var item : functionCall.getArgs()) { + arrl.add(item.getType()); + } + FunctionItem vi = new FunctionItem(functionCall.getFuncName().getName(), arrl); + try { + SymbolTable.top.put(vi); + } + catch (ItemAlreadyExistsException ee) { + // unreachable + } + return new NoType(); + } + } + + @Override + public Type visit(QueryExpression queryExpression) { + var item = queryExpression.getVar(); + if (item != null) { + item.accept(this); + return new BooleanType(); + } + else { return new NoType(); } } @@ -163,12 +205,12 @@ public Type visit(IntValue value) { } @Override - public Type visit(FloatType value) { + public Type visit(FloatValue value) { return new FloatType(); } @Override - public Type visit(BooleanType value) { + public Type visit(BooleanValue value) { return new BooleanType(); } } diff --git a/Phase-3/src/visitor/typeAnalyzer/TypeAnalyzer.java b/Phase-3/src/visitor/typeAnalyzer/TypeAnalyzer.java index acc2e63..83407ce 100644 --- a/Phase-3/src/visitor/typeAnalyzer/TypeAnalyzer.java +++ b/Phase-3/src/visitor/typeAnalyzer/TypeAnalyzer.java @@ -7,9 +7,12 @@ import ast.node.expression.*; import ast.node.expression.operators.BinaryOperator; import ast.node.expression.operators.UnaryOperator; +import ast.node.statement.ArrayDecStmt; import ast.node.statement.AssignStmt; import ast.node.statement.ForloopStmt; import ast.node.statement.ImplicationStmt; +import ast.node.statement.PrintStmt; +import ast.node.statement.ReturnStmt; import ast.node.statement.VarDecStmt; import ast.type.NoType; import ast.type.Type; @@ -24,6 +27,7 @@ import symbolTable.itemException.ItemNotFoundException; import symbolTable.symbolTableItems.ForLoopItem; import symbolTable.symbolTableItems.FunctionItem; +import symbolTable.symbolTableItems.ImplicationItem; import symbolTable.symbolTableItems.MainItem; import visitor.Visitor; @@ -40,15 +44,15 @@ public Void visit(Program program) { } program.getMain().accept(this); - return null; } @Override public Void visit(FuncDeclaration funcDeclaration) { try { - FunctionItem functionItem = (FunctionItem) SymbolTable.root.get(FunctionItem.STARTKEY + funcDeclaration.getName().getName()); - SymbolTable.push((functionItem.getFunctionSymbolTable())); + FunctionItem functionItem = (FunctionItem) SymbolTable.root + .get(FunctionItem.STARTKEY + funcDeclaration.getName().getName()); + SymbolTable.push(functionItem.getFunctionSymbolTable()); } catch (ItemNotFoundException e) { // unreachable } @@ -58,7 +62,6 @@ public Void visit(FuncDeclaration funcDeclaration) { } SymbolTable.pop(); - return null; } @@ -73,23 +76,25 @@ public Void visit(MainDeclaration mainDeclaration) { for (var stmt : mainDeclaration.getMainStatements()) { stmt.accept(this); } - return null; } @Override public Void visit(ForloopStmt forloopStmt) { - try { // FIXME: I don't fucking get this - ForLoopItem forLoopItem = (ForLoopItem) SymbolTable.root.get(forloopStmt.toString()); - SymbolTable.push((forLoopItem.getForLoopSymbolTable())); + try { + ForLoopItem forLoopItem = (ForLoopItem) SymbolTable.top + .get(ForLoopItem.STARTKEY + forloopStmt.toString() + forloopStmt.getForloopId()); + SymbolTable.push(forLoopItem.getForLoopSymbolTable()); } catch (ItemNotFoundException e) { - + // unreachable } - // TODO: Complete this + forloopStmt.getArrayName().accept(expressionTypeChecker); + for (var stmt : forloopStmt.getStatements()) { + stmt.accept(this); + } SymbolTable.pop(); - return null; } @@ -103,9 +108,9 @@ public Void visit(AssignStmt assignStmt) { } if (!expressionTypeChecker.isLvalue(assignStmt.getLValue())) { + // is handled in grammar typeErrors.add(new LeftSideNotLValue(assignStmt.getLine())); } - return null; } @@ -114,10 +119,85 @@ public Void visit(FunctionCall functionCall) { try { SymbolTable.root.get(FunctionItem.STARTKEY + functionCall.getFuncName().getName()); } catch (ItemNotFoundException e) { + // unreachable + } + functionCall.accept(expressionTypeChecker); + return null; + } + + @Override + public Void visit(ReturnStmt returnStmt) { + var retExpr = returnStmt.getExpression(); + if (retExpr != null) { + retExpr.accept(expressionTypeChecker); } + return null; + } + @Override + public Void visit(PrintStmt printStmt) { + var printExpr = printStmt.getArg(); + if (printExpr != null) { + printExpr.accept(expressionTypeChecker); + } + return null; + } + @Override + public Void visit(ImplicationStmt implicationStmt) { + try { + ImplicationItem implicationItem = (ImplicationItem) SymbolTable.top + .get(ImplicationItem.STARTKEY + implicationStmt.toString() + implicationStmt.getImplicationId()); + SymbolTable.push(implicationItem.getImplicationSymbolTable()); + } catch (ItemNotFoundException e) { + // unreachable + } + + Type tl = implicationStmt.getCondition().accept(expressionTypeChecker); + if (!(tl instanceof BooleanType) && !(tl instanceof NoType)) { + typeErrors.add(new ConditionTypeNotBool(implicationStmt.getLine())); + } + + for (var stmt : implicationStmt.getStatements()) { + stmt.accept(this); + } + + SymbolTable.pop(); + return null; + } + + @Override + public Void visit(VarDecStmt vardecStmt) { + if (vardecStmt.getInitialExpression() == null) { + return null; + } + Type t1 = vardecStmt.getInitialExpression().accept(expressionTypeChecker); + Type t2 = vardecStmt.getType(); + if (!expressionTypeChecker.sameType(t1, t2) && !(t1 instanceof NoType) && !(t2 instanceof NoType)) { + typeErrors.add(new UnsupportedOperandType(vardecStmt.getLine(), BinaryOperator.assign.name())); + } + return null; + } + + @Override + public Void visit(ArrayDecStmt arrDecStmt) { + if (arrDecStmt.getInitialValues().isEmpty()) { + return null; + } + + boolean hasError = false; + for (var item : arrDecStmt.getInitialValues()) { + Type t1 = item.accept(expressionTypeChecker); + Type t2 = arrDecStmt.getType(); + if (!expressionTypeChecker.sameType(t1, t2) && !(t1 instanceof NoType) && !(t2 instanceof NoType)) { + hasError = true; + } + } + + if (hasError) { + typeErrors.add(new UnsupportedOperandType(arrDecStmt.getLine(), BinaryOperator.assign.name())); + } return null; } }