next up previous
Next: Statements Up: Relating Phrase Structure to Previous: Types


Precedence and association are expressed in the phrase structure by distinct nonterminals. These concepts have to do with the relationship between the linear text and the semantic structure, and are no longer relevant once the AST has been built. Retaining distinctions between semantically-equivalent nonterminals in the AST is counterproductive:


Expression ::=
  Primary PrimaryNoNewArray ArrayCreationExpression Literal
  ClassInstanceCreationExpression FieldAccess MethodInvocation ArrayAccess
  PostfixExpression PostIncrementExpression PostDecrementExpression
  UnaryExpression PreIncrementExpression PreDecrementExpression
  UnaryExpressionNotPlusMinus CastExpression MultiplicativeExpression
  AdditiveExpression ShiftExpression RelationalExpression EqualityExpression
  AndExpression ExclusiveOrExpression InclusiveOrExpression
  ConditionalAndExpression ConditionalOrExpression ConditionalExpression
  AssignmentExpression Assignment StatementExpression ConstantExpression .

Initializer ::= ArrayInitializer .
Dimension  ::= DimExpr .
This macro is invoked in definition 22.