Next: Compiling multiple compilation units
Up: Phrase Structure
Previous: Productions from 14: Blocks
Productions from 15: Expressions[52]
:
Primary:
PrimaryNoNewArray /
ArrayCreationExpression .
PrimaryNoNewArray:
Literal /
Name '.' 'class' /
'this' /
Name '.' 'this' /
'(' Expression ')' /
ClassInstanceCreationExpression /
FieldAccess /
MethodInvocation /
ArrayAccess .
ClassInstanceCreationExpression:
Primary '.' 'new' Identifier '(' Arguments ')' AnonymousClass /
'new' ClassType '(' Arguments ')' AnonymousClass .
Arguments: [ Argument // ',' ] .
Argument: Expression .
AnonymousClass: ['{' ClassBodyDeclarations '}'] .
ArrayCreationExpression:
'new' PrimitiveType Dimensions /
'new' ClassType Dimensions .
Dimensions:
DimExprList /
DimExprList Dims .
DimExprList:
DimExpr /
DimExprList DimExpr .
DimExpr:
'[' Expression ']' .
Dims:
Dimension /
Dims Dimension .
Dimension: '[' ']' .
FieldAccess:
Primary '.' Identifier /
'super' '.' Identifier /
Name '.' 'super' '.' Identifier .
MethodInvocation:
MethodName '(' Arguments ')' /
Primary '.' Identifier '(' Arguments ')' /
'super' '.' Identifier '(' Arguments ')' /
Name '.' 'super' '.' Identifier '(' Arguments ')' .
MethodName:
Name .
ArrayAccess:
Name '[' Expression ']' /
PrimaryNoNewArray '[' Expression ']' .
PostfixExpression:
Primary /
Name /
PostIncrementExpression /
PostDecrementExpression .
PostIncrementExpression:
PostfixExpression '++' .
PostDecrementExpression:
PostfixExpression '-' .
UnaryExpression:
PreIncrementExpression /
PreDecrementExpression /
'+' UnaryExpression /
'-' UnaryExpression /
UnaryExpressionNotPlusMinus .
PreIncrementExpression:
'++' UnaryExpression .
PreDecrementExpression:
'-' UnaryExpression .
UnaryExpressionNotPlusMinus:
PostfixExpression /
'SPMtilde;' UnaryExpression /
'!' UnaryExpression /
CastExpression .
CastExpression:
'(' PrimitiveType ')' UnaryExpression /
'(' ArrayType ')' UnaryExpressionNotPlusMinus /
'(' Expression ')' UnaryExpressionNotPlusMinus .
MultiplicativeExpression:
UnaryExpression /
MultiplicativeExpression '*' UnaryExpression /
MultiplicativeExpression '/' UnaryExpression /
MultiplicativeExpression '%' UnaryExpression .
AdditiveExpression:
MultiplicativeExpression /
AdditiveExpression '+' MultiplicativeExpression /
AdditiveExpression '-' MultiplicativeExpression .
ShiftExpression:
AdditiveExpression /
ShiftExpression '«' AdditiveExpression /
ShiftExpression '»' AdditiveExpression /
ShiftExpression '»>' AdditiveExpression .
RelationalExpression:
ShiftExpression /
RelationalExpression '<' ShiftExpression /
RelationalExpression '>' ShiftExpression /
RelationalExpression '<=' ShiftExpression /
RelationalExpression '>=' ShiftExpression /
RelationalExpression 'instanceof' Type .
EqualityExpression:
RelationalExpression /
EqualityExpression '==' RelationalExpression /
EqualityExpression '!=' RelationalExpression .
AndExpression:
EqualityExpression /
AndExpression '&' EqualityExpression.
ExclusiveOrExpression:
AndExpression /
ExclusiveOrExpression '^' AndExpression.
InclusiveOrExpression:
ExclusiveOrExpression /
InclusiveOrExpression '|' ExclusiveOrExpression.
ConditionalAndExpression:
InclusiveOrExpression /
ConditionalAndExpression '&&' InclusiveOrExpression .
ConditionalOrExpression:
ConditionalAndExpression /
ConditionalOrExpression '||' ConditionalAndExpression .
ConditionalExpression:
ConditionalOrExpression /
ConditionalOrExpression '?' Expression ':' ConditionalExpression .
AssignmentExpression:
ConditionalExpression /
Assignment .
Assignment:
LeftHandSide AssignmentOperator AssignmentExpression .
LeftHandSide:
Name /
FieldAccess /
ArrayAccess .
AssignmentOperator:
'=' / '*=' / '/=' / '%=' / '+=' / '-=' / '«=' / '»=' / '»>=' / '&=' /
'^=' / '|=' .
Expression:
AssignmentExpression .
ConstantExpression:
Expression .
This macro is invoked in definition 38.
Next: Compiling multiple compilation units
Up: Phrase Structure
Previous: Productions from 14: Blocks
2008-09-11