Identifier -> Name
Variable -> Identifier { [ Expression ] }
IncDec -> ++ | --
IncDecExpression -> Variable IncDec | IncDec Variable
Cast -> ( PrimitiveType )
UnaryOperator -> + | - | ! | Cast
Primary -> Literal | Variable | IncDecExpression | MethodInvocation
UnaryExpression -> Primary | UnaryOperator UnaryExpression
Expression -> UnaryExpression
BinaryOperator -> + | - | * | / | & | && | '|' | '||' |
BinaryExpression -> Expression BinaryOperator Expression
ConditionalExpression -> Expression ? Expression : Expression
AssignmentOperator -> = | += | -= | *= | /= 
AssignmentExpression -> Variable AssignmentOperator Expression
ActualArguments	-> Expression { , Expression }
Method -> Identifier
MethodInvocation -> Method ( [ ActualArguments ] )
CreationExpression -> new ClassIdentifier ( [ ActualArguments ] )
ArrayCreationExpression -> new Identifier [ Expression ] { [ Expression ] } { [] }
Expression -> BinaryExpression | ConditionalExpression | AssignmentExpression | MethodInvocation | CreationExpression
Primary -> ( Expression ) | MethodInvocation
EmptyStatement -> ;
StatementExpression -> AssignmentExpression | IncDecExpression | MethodInvocation | CreationExpression
ExpressionStatement -> StatementExpression ;
Label -> Name
BreakStatement -> break ; | break Label ;
ContinueStatement -> continue ; |  continue Label ;
ReturnStatement -> return ; | return Expression ;
JumpStatement -> BreakStatement | ContinueStatement | ReturnStatement 
ThrowStatement -> throw Expression
VariableDeclarator -> Name | Name = Expression
VariableDeclarators -> VariableDeclarator | VariableDeclarator , VariableDeclarator
VariableDeclaration ->  Type VariableDeclarators ;
PrimitiveType -> Name
ClassType -> Identifier
ArrayType -> Identifier [] | Identifier [] []
Type -> PrimitiveType | ClassType | ArrayType
Exception -> Identifier
Block -> { VariableDeclaration }
Update -> StatementExpression { , StatementExpression }
Initialization -> StatementExpression | StatementExpression , StatementExpression | VariableDeclaration
CatchClause -> catch ( Exception Name ) Block
TryBlock -> try Block CatchClause { CatchClause } finally Block | try Block CatchClause { CatchClause } | try Block { CatchClause } finally Block
SimpleStatement -> EmptyStatement | ExpressionStatement | JumpStatement | ThrowStatement
Statement -> SimpleStatement 
ForStatement -> for ( Initialization ; Expression ; Update ) Statement
ConditionalStatement -> if ( Expression ) Statement | if ( Expression ) Statement else Statement
DoStatement -> do Statement while ( Expression ) ;
ConstantExpression -> Expression
WhileStatement -> while ( Expression ) Statement
SwitchLabel -> case ConstantExpression : | default :
CaseGroup -> SwitchLabel StatementSequence | SwitchLabel SwitchLabel StatementSequence
SwitchBlock -> { CaseGroup }
SwitchStatement -> switch ( Expression ) SwitchBlock
CaseStatement -> ConditionalStatement | SwitchStatement
Block -> { Statement }
RepetitiveStatement -> WhileStatement | DoStatement | ForStatement
CompositeStatement -> Block | CaseStatement | RepetitiveStatement | TryBlock
Statement -> CompositeStatement | Label : Statement
FormalArgument -> Type Name
ThrowsClause -> throws Exception | throws Exception , Exception
MethodBody -> ; | Block
FormalArguments -> FormalArgument | FormalArgument , FormalArgument
MethodDeclarator -> Identifier ( ) | Identifier ( FormalArguments )
Modifier -> public | static |  final
ResultType -> Type | void
MethodHeader -> Modifier ResultType MethodDeclarator | Modifier ResultType MethodDeclarator ThrowsClause
MethodDeclaration -> MethodHeader MethodBody
Initializer -> static Block | Block
FieldDeclaration -> VariableDeclaration
ConstructorDeclaration -> public Name ( FormalArguments ) ThrowsClause Block | Name ( FormalArguments ) ThrowsClause Block | public Name ( ) ThrowsClause Block | public Name ( FormalArguments ) Block | Name ( ) ThrowsClause Block | Name ( FormalArguments ) Block |  public Name ( ) Block | Name ( ) Block |
ClassBody -> { Modifier Declaration } | { Declaration }
ClassDeclaration -> public class Name ClassBody | class Name ClassBody
Declaration -> FieldDeclaration | MethodDeclaration | ClassDeclaration | ConstructorDeclaration | Initializer
Package -> Identifier
PackageBody -> ClassDeclaration
PackageHeader -> package Identifier ;
Import -> import ClassType ; | import Package . * ;
CompilationUnit -> PackageHeader Import PackageBody | Import PackageBody | PackageBody











