It seems that the operator NOT is'nt been parsed properly. Look this example:
apeg expression; s[int x, int y, int z, int w, boolean i]: {i = ! x ;} ;
This should be parsed but not type check, however this parse incorrrectly. When executed we get an error on the PrettyPrintVisitor:
Exception in thread "main" java.lang.NullPointerException at apeg.parse.ast.visitor.PrettyPrintVisitor.visit(PrettyPrintVisitor.java:235) at apeg.parse.ast.NotExprNode.accept(NotExprNode.java:18) at apeg.parse.ast.visitor.PrettyPrintVisitor.visit(PrettyPrintVisitor.java:431) at apeg.parse.ast.AssignmentNode.accept(AssignmentNode.java:25) at apeg.parse.ast.visitor.PrettyPrintVisitor.visit(PrettyPrintVisitor.java:420) at apeg.parse.ast.UpdatePegNode.accept(UpdatePegNode.java:20) at apeg.parse.ast.visitor.PrettyPrintVisitor.visit(PrettyPrintVisitor.java:516) at apeg.parse.ast.RuleNode.accept(RuleNode.java:45) at apeg.parse.ast.visitor.PrettyPrintVisitor.visit(PrettyPrintVisitor.java:478) at apeg.parse.ast.GrammarNode.accept(GrammarNode.java:49) at apeg.Tool.main(Tool.java:113)
It seems that the operator NOT is'nt been parsed properly. Look this example:
apeg expression; s[int x, int y, int z, int w, boolean i]: {i = ! x ;} ;
This should be parsed but not type check, however this parse incorrrectly. When executed we get an error on the PrettyPrintVisitor:Exception in thread "main" java.lang.NullPointerException at apeg.parse.ast.visitor.PrettyPrintVisitor.visit(PrettyPrintVisitor.java:235) at apeg.parse.ast.NotExprNode.accept(NotExprNode.java:18) at apeg.parse.ast.visitor.PrettyPrintVisitor.visit(PrettyPrintVisitor.java:431) at apeg.parse.ast.AssignmentNode.accept(AssignmentNode.java:25) at apeg.parse.ast.visitor.PrettyPrintVisitor.visit(PrettyPrintVisitor.java:420) at apeg.parse.ast.UpdatePegNode.accept(UpdatePegNode.java:20) at apeg.parse.ast.visitor.PrettyPrintVisitor.visit(PrettyPrintVisitor.java:516) at apeg.parse.ast.RuleNode.accept(RuleNode.java:45) at apeg.parse.ast.visitor.PrettyPrintVisitor.visit(PrettyPrintVisitor.java:478) at apeg.parse.ast.GrammarNode.accept(GrammarNode.java:49) at apeg.Tool.main(Tool.java:113)