BNF for Parser.jj

NON-TERMINALS

CompilationUnit ::= ( Statement )* <EOF>
Expression ::= AdditiveExpression
AdditiveExpression ::= MultiplicativeExpression ( "+" MultiplicativeExpression | "-" MultiplicativeExpression )*
MultiplicativeExpression ::= UnaryExpression ( "*" UnaryExpression | "/" UnaryExpression | "%" UnaryExpression )*
UnaryExpression ::= "~" UnaryExpression
| PrimaryExpression
PrimaryExpression ::= <INTEGER_LITERAL>
| "(" Expression ")"
Statement ::= ";"
| StatementExpression
| IOStatement
StatementExpression ::= Expression ";"
IOStatement ::= WriteStatement
WriteStatement ::= "write" Expression