next up previous
Next: Disambiguating names Up: Tree Structure Previous: Tree Structure

Abstract syntax

Abstract syntax[2]:
RULE: TypeDeclaration ::=
        Modifiers 'class'     TypeIdDef Super Interfaces ClassBody     END;
RULE: TypeDeclaration ::=
        Modifiers 'interface' TypeIdDef       Interfaces InterfaceBody END;

RULE: Modifiers LISTOF Modifier       END;
RULE: Modifier  ::=    'abstract'     END;
RULE: Modifier  ::=    'final'        END;
RULE: Modifier  ::=    'native'       END;
RULE: Modifier  ::=    'private'      END;
RULE: Modifier  ::=    'protected'    END;
RULE: Modifier  ::=    'public'       END;
RULE: Modifier  ::=    'static'       END;
RULE: Modifier  ::=    'synchronized' END;
RULE: Modifier  ::=    'transient'    END;
RULE: Modifier  ::=    'volatile'     END;
RULE: Modifier  ::=    'strictfp'     END;

RULE: Super ::= 'extends' InhName END;
RULE: Super ::=                    END;

RULE: Interfaces LISTOF InterfaceType END;

RULE: InterfaceType ::= InhName     END;
RULE: InhName       ::= QualInhName END;

RULE: ClassBody             ::=    '{' ClassBodyDeclarations '}' END;
RULE: ClassBodyDeclarations LISTOF FieldDeclaration |
                                   MethodDeclaration |
                                   TypeDeclaration |
                                   ConstructorDeclaration |
                                   ClassInitializer             END;

RULE: ConstructorDeclaration ::=
        Modifiers TypeName '(' FormalParameters ')' Throws
        '{' Statements '}' END;

RULE: InterfaceBody ::= '{' InterfaceMembers '}' END;
RULE: InterfaceMembers LISTOF AbstractMethodDeclaration |
                              TypeDeclaration |
                              ConstantDeclaration END;

RULE: AbstractMethodDeclaration ::= MethodHeader ';' END;
RULE: ConstantDeclaration       ::= FieldDeclaration END;

RULE: Statements LISTOF LocalVariableDeclaration |
                        Statement |
                        TypeDeclaration END;

RULE: FieldDeclaration  ::=    Modifiers Type FieldDeclarators ';' END;
RULE: FieldDeclarators  LISTOF FieldDeclarator                     END;
RULE: FieldDeclarator   ::=    FieldDeclaratorId                   END;
RULE: FieldDeclarator   ::=    FieldDeclaratorId '=' Initializer   END;
RULE: FieldDeclaratorId ::=    FieldIdDef                          END;

RULE: MethodDeclaration ::=    MethodHeader MethodBody                END;
RULE: MethodHeader      ::=    Modifiers Type MethodDeclarator Throws END;
RULE: MethodDeclarator  ::=    MethodIdDef '(' FormalParameters ')'   END;
RULE: MethodDeclarator  ::=    MethodDeclarator '[' ']'               END;
RULE: FormalParameters  LISTOF FormalParameter                        END;
RULE: FormalParameter   ::=   'final' Type VariableDeclaratorId       END;
RULE: FormalParameter   ::=           Type VariableDeclaratorId       END;
RULE: MethodBody        ::=    '{' Statements '}'                     END;
RULE: MethodBody        ::=    ';'                                    END;

RULE: LocalVariableDeclaration ::= 'final' Type VariableDeclarators END;
RULE: LocalVariableDeclaration ::=         Type VariableDeclarators END;

RULE: Expression ::= CharacterLiteral END;
RULE: Expression ::= DoubleLiteral END;
RULE: Expression ::= '(' PrimitiveType ')' Expression END;
RULE: Expression ::= '(' ArrayType ')'     Expression END;
RULE: Expression ::=            Operator Expression END;
RULE: Expression ::= Expression Operator            END;
RULE: Expression ::= Expression Operator Expression END;
RULE: Expression ::= Expression '?' Expression ':' Expression END;
RULE: Expression ::= Expression 'instanceof' Type END;
RULE: Expression ::= Expression '.' MethodIdUse '(' Arguments ')' END;
RULE: Expression ::= Expression '.' FieldIdUse END;
RULE: Expression ::= 'false' END;
RULE: Expression ::= FloatLiteral END;
RULE: Expression ::= IntLiteral END;
RULE: Expression ::= LeftHandSide AssignmentOperator RightHandSide END;
RULE: Expression ::= LongLiteral END;
RULE: Expression ::= MethodName '(' Arguments ')' END;
RULE: Expression ::=
  Expression '.' 'new' TypeIdUse '(' Arguments ')' AnonymousClass END;
RULE: Expression ::= 'new' TypeName '(' Arguments ')' AnonymousClass END;
RULE: Expression ::= 'new' PrimitiveType Dimensions END;
RULE: Expression ::= 'new' TypeName      Dimensions END;
RULE: Expression ::= 'null' END;
RULE: Expression ::= StringLiteral END;
RULE: Expression ::= 'super' '.' MethodIdUse '(' Arguments ')' END;
RULE: Expression ::= 'super' '.' FieldIdUse END;
RULE: Expression ::=              'this' END;
RULE: Expression ::= 'true' END;
RULE: LeftHandSide ::= Expression END;
RULE: RightHandSide ::= Expression END;
RULE: Arguments LISTOF Argument END;
RULE: Argument ::= Expression END;

RULE: AnonymousClass ::= '{' ClassBodyDeclarations '}' END;
RULE: AnonymousClass ::=                               END;
RULE: Dimensions LISTOF Dimension END;
RULE: Dimension ::= '[' Expression ']' END;
RULE: Dimension ::= '[' ']' END;

RULE: ExpressionStatement ::= Expression                ';' END;
RULE: ExpressionStatement ::= 'this'  '(' Arguments ')' ';' END;
RULE: ExpressionStatement ::= Expression '.' 'super' '(' Arguments ')' ';' END;
RULE: ExpressionStatement ::=                'super' '(' Arguments ')' ';' END;

RULE: Block ::= '{' Statements '}' END;

RULE: LabeledStatement ::= LabelIdDef ':' Statement END;

RULE: Statement ::= AssertStatement END;
RULE: Statement ::= Block END;
RULE: Statement ::= ExpressionStatement END;
RULE: Statement ::= 'break' ';' END;
RULE: Statement ::= 'break' LabelIdUse ';' END;
RULE: Statement ::= 'continue' ';' END;
RULE: Statement ::= 'continue' LabelIdUse ';' END;
RULE: Statement ::= LoopStatement END;
RULE: Statement ::= ';' END;
RULE: Statement ::= 'if' '(' Expression ')' Statement 'else' Statement END;
RULE: Statement ::= 'if' '(' Expression ')' Statement END;
RULE: Statement ::= LabeledStatement END;
RULE: Statement ::= 'return' ';' END;
RULE: Statement ::= 'return' Expression ';' END;
RULE: Statement ::= SwitchStatement END;
RULE: Statement ::= 'synchronized' '(' Expression ')' Block END;
RULE: Statement ::= 'throw' Expression ';' END;
RULE: Statement ::= 'try' Block Catches END;

RULE: LoopStatement ::= WhileStatement END;
RULE: LoopStatement ::= DoStatement END;
RULE: LoopStatement ::= ForStatement END;

RULE: AssertStatement ::= 'assert' Expression ';' END;
RULE: AssertStatement ::= 'assert' Expression ':' Expression ';' END;

RULE: DoStatement ::= 'do' Statement 'while' '(' Expression ')' ';' END;

RULE: ForStatement ::= 'for' '(' ForInit ';' ForTest ';' ForUpdate ')' Statement END;
RULE: ForInit ::= LocalVariableDeclaration END;
RULE: ForInit ::= ExpressionList END;
RULE: ForTest ::= Expression END;
RULE: ForTest ::= END;
RULE: ForUpdate ::= ExpressionList END;

RULE: ExpressionList LISTOF Expression END;

RULE: SwitchStatement ::= 'switch' '(' Expression ')' SwitchBlock END;
RULE: SwitchBlock ::= '{' '}' END;
RULE: SwitchBlock ::= '{' SwitchBlockStatements '}' END;
RULE: SwitchBlock ::= '{' SwitchBlockStatements SwitchLabels '}' END;
RULE: SwitchBlock ::= '{' SwitchLabels '}' END;
RULE: SwitchBlockStatements ::= SwitchBlockStatement END;
RULE: SwitchBlockStatements ::= SwitchBlockStatements SwitchBlockStatement END;
RULE: SwitchBlockStatement ::= SwitchLabels Statements END;
RULE: SwitchLabels LISTOF SwitchLabel END;
RULE: SwitchLabel ::= 'case' Expression ':' END;
RULE: SwitchLabel ::= 'default' ':' END;

RULE: WhileStatement ::= 'while' '(' Expression ')' Statement END;

RULE: Catches LISTOF CatchClause | Finally END;
RULE: CatchClause ::= 'catch' '(' FormalParameter ')' Block END;
RULE: Finally ::= 'finally' Block END;

RULE: ClassInitializer ::= 'static' Block END;
RULE: ClassInitializer ::=          Block END;

RULE: Throws LISTOF ThrownType END;
RULE: ThrownType ::= TypeName END;

RULE: PrimitiveType ::= 'boolean' END;
RULE: PrimitiveType ::= 'byte'    END;
RULE: PrimitiveType ::= 'char'    END;
RULE: PrimitiveType ::= 'double'  END;
RULE: PrimitiveType ::= 'float'   END;
RULE: PrimitiveType ::= 'int'     END;
RULE: PrimitiveType ::= 'long'    END;
RULE: PrimitiveType ::= 'short'   END;

RULE: ArrayType ::= PrimitiveType '[' ']' END;
RULE: ArrayType ::= ArrayType     '[' ']' END;

RULE: Type ::= PrimitiveType END;
RULE: Type ::= TypeName      END;
RULE: Type ::= ArrayType     END;
RULE: Type ::= 'void'        END;

RULE: VariableDeclarators LISTOF VariableDeclarator END;

RULE: VariableDeclarator ::= VariableDeclaratorId END;
RULE: VariableDeclarator ::= VariableDeclaratorId '=' Initializer END;

RULE: VariableDeclaratorId ::= VariableDeclaratorId '[' ']' END;
RULE: VariableDeclaratorId ::= VariableIdDef                END;

RULE: Initializer ::= Expression       END;
RULE: Initializer ::= '{' Initializers '}' END;

RULE: Initializers LISTOF InitialElement END;
RULE: InitialElement ::= Initializer END;

RULE: AssignmentOperator ::= '^='   END;
RULE: AssignmentOperator ::= '«='  END;
RULE: AssignmentOperator ::= '='    END;
RULE: AssignmentOperator ::= '»='  END;
RULE: AssignmentOperator ::= '»>=' END;
RULE: AssignmentOperator ::= '|='   END;
RULE: AssignmentOperator ::= '-='   END;
RULE: AssignmentOperator ::= '/='   END;
RULE: AssignmentOperator ::= '*='   END;
RULE: AssignmentOperator ::= '&='   END;
RULE: AssignmentOperator ::= '%='   END;
RULE: AssignmentOperator ::= '+='   END;
RULE: Operator ::= '^' END;
RULE: Operator ::= '«' END;
RULE: Operator ::= '<=' END;
RULE: Operator ::= '<' END;
RULE: Operator ::= '==' END;
RULE: Operator ::= '>=' END;
RULE: Operator ::= '»>' END;
RULE: Operator ::= '»' END;
RULE: Operator ::= '>' END;
RULE: Operator ::= '||' END;
RULE: Operator ::= '|' END;
RULE: Operator ::= '+' END;
RULE: Operator ::= '-' END;
RULE: Operator ::= '!=' END;
RULE: Operator ::= '/' END;
RULE: Operator ::= '*' END;
RULE: Operator ::= '&' END;
RULE: Operator ::= '&&' END;
RULE: Operator ::= '%' END;
RULE: Operator ::= '++' END;
RULE: Operator ::= '-' END;
RULE: Operator ::= 'SPMtilde;' END;
RULE: Operator ::= '!' END;

RULE: VariableIdDef ::= Identifier END;
RULE: MethodIdDef ::= Identifier END;
RULE: MethodIdUse ::= Identifier END;
RULE: LabelIdDef ::= Identifier END;
RULE: LabelIdUse ::= Identifier END;
RULE: FieldIdDef ::= Identifier END;
RULE: FieldIdUse ::= Identifier END;
RULE: TypeIdDef ::= Identifier END;
RULE: TypeIdUse ::= Identifier END;

Disambiguating names[3]
This macro is invoked in definition 1.


next up previous
Next: Disambiguating names Up: Tree Structure Previous: Tree Structure
2008-09-11