BNF for JFXGParser.jj

NON-TERMINALS

Functor ::= CompoundExpression ( ";" )? <EOF>
CompoundExpression ::= ( Expression )? ( ";" Expression )*
Expression ::= ( LocalVariableDeclaration | AssignmentExpression | ConditionalExpression )
LocalVariableDeclaration ::= ( Type VariableDeclarator ( "," VariableDeclarator )* )
VariableDeclarator ::= VariableDeclaratorId ( "=" VariableInitializer )?
VariableDeclaratorId ::= <IDENTIFIER>
VariableInitializer ::= ConditionalExpression
AssignmentExpression ::= ( PrimaryExpression AssignmentOperator ConditionalExpression )
AssignmentOperator ::= ( ( "=" | "+=" | "-=" | "*=" | "/=" | "%=" | "<<=" | ">>=" | ">>>=" | "&=" | "^=" | "|=" ) )
ConditionalExpression ::= ( ConditionalOrExpression ( "?" Expression ":" Expression )? )
ConditionalOrExpression ::= ( ConditionalAndExpression ( "||" ConditionalAndExpression )* )
ConditionalAndExpression ::= ( OrExpression ( "&&" OrExpression )* )
OrExpression ::= ( XorExpression ( "|" XorExpression )* )
XorExpression ::= ( AndExpression ( "^" AndExpression )* )
AndExpression ::= ( EqualityExpression ( ( "&" ) EqualityExpression )* )
EqualityExpression ::= ( InstanceOfExpression ( ( "==" | "!=" ) InstanceOfExpression )* )
InstanceOfExpression ::= ( RelationalExpression ( "instanceof" Type )? )
RelationalExpression ::= ( ShiftExpression ( ( "<" | ">" | "<=" | ">=" ) ShiftExpression )* )
ShiftExpression ::= ( AdditiveExpression ( ( "<<" | ">>" | ">>>" ) AdditiveExpression )* )
AdditiveExpression ::= ( MultiplicativeExpression ( ( "-" | "+" ) MultiplicativeExpression )* )
MultiplicativeExpression ::= ( UnaryExpression ( ( "*" | "/" | "%" ) UnaryExpression )* )
UnaryExpression ::= CastExpression
| ( ( "+" | "-" | "~" | "!" )? PrimaryExpression )
CastLookahead ::= "(" Type ")" ( "!" | "(" | <IDENTIFIER> | "this" | "new" | Literal )
CastExpression ::= ( "(" Type ")" UnaryExpression )
PrimaryExpression ::= ( PrimaryPrefix ( PrimarySuffix )* )
PrimaryPrefix ::= ( Literal | "this" | "(" Expression ")" | "new" AllocationExpression | ImportedStaticMethodCall | PositionalArgument | Name )
AllocationExpression ::= ( Type Arguments )
Type ::= ( <IDENTIFIER> ( "." <IDENTIFIER> )* )
PrimarySuffix ::= ( "." "class" | "." <IDENTIFIER> Arguments | "." <IDENTIFIER> )
ImportedMethodLookahead ::= <IDENTIFIER> <LPAREN>
ImportedStaticMethodCall ::= ( <IDENTIFIER> Arguments )
PositionalArgument ::= ( "{" <INTEGER_LITERAL> ( ":" Type )? "}" )
Name ::= ( <IDENTIFIER> ( "." <IDENTIFIER> )* )
Arguments ::= "(" ( ArgumentList )? ")"
ArgumentList ::= ( Expression ( "," Expression )* )
Literal ::= ( Integer | Float | Boolean | Character | String | Null )
Integer ::= <INTEGER_LITERAL>
Float ::= <FLOATING_POINT_LITERAL>
Boolean ::= "true"
| "false"
Character ::= <CHARACTER_LITERAL>
String ::= <STRING_LITERAL>
Null ::= "null"