BNF for expressions.oo

NON-TERMINALS

CompilationUnit ::= Expression <EOF>
Expression ::= ConditionalOrExpression
ConditionalOrExpression ::= ConditionalAndExpression ( "||" ConditionalAndExpression )*
ConditionalAndExpression ::= InclusiveOrExpression ( "&&" InclusiveOrExpression )*
InclusiveOrExpression ::= ExclusiveOrExpression ( "|" ExclusiveOrExpression )*
ExclusiveOrExpression ::= AndExpression ( "^" AndExpression )*
AndExpression ::= EqualityExpression ( "&" EqualityExpression )*
EqualityExpression ::= RelationalExpression ( ( ( "==" | "!=" ) ) RelationalExpression )*
RelationalExpression ::= ShiftExpression ( ( ( "<" | ">" | "<=" | ">=" ) ) ShiftExpression )?
ShiftExpression ::= AdditiveExpression ( ( ( "<<" | ">>" | ">>>" ) ) AdditiveExpression )*
AdditiveExpression ::= MultiplicativeExpression ( ( ( "+" | "-" ) ) MultiplicativeExpression )*
MultiplicativeExpression ::= UnaryExpression ( ( ( "*" | "/" | "%" ) ) UnaryExpression )*
UnaryExpression ::= ( ( ( "+" | "-" ) ) UnaryExpression | UnaryExpressionNotPlusMinus )
UnaryExpressionNotPlusMinus ::= ( ( ( "~" | "!" ) ) UnaryExpression | PrimaryExpression )
PrimaryExpression ::= ( Literal | "(" Expression ")" )
Literal ::= ( <INTEGER_LITERAL> | <FLOATING_POINT_LITERAL> | BooleanLiteral )
BooleanLiteral ::= ( "true" | "false" )