AdditiveExpression ::= MultiplicativeExpression OptRestOfAdd; AddOp ::= "+" | "-"; AllocationExpression ::= "new" PrimitiveType ArrayDimsAndInits |"new" Name ArrayDimsAndInits| "new" Name Arguments |"new" Name Arguments ClassBody; AndExpression ::= EqualityExpression OptRestOfAnd; ArgumentList ::= Expression OptRestOfArg; Arguments ::= "(" ")" |"(" ArgumentList ")"; ArrayDimsAndInits ::= ArrayPrefix OptBrackets| "[" "]" ArrayInitializer; ArrayInitializer ::= "{" OptVariableInitializers OptComma "}"; ArrayPrefix ::= "[" Expression "]" ArrayPrefix; AssignmentOperator ::= "=" | "*=" | "/=" | "%=" | "+=" | "-=" | "<<=" | ">>=" | ">>>=" | "&=" | "^=" | "|="; Block ::= "{" BlockStatements "}"; BlockStatement ::= LocalVariableDeclaration ";"| Statement | UnmodifiedClassDecl; BlockStatements ::= | BlockStatement BlockStatements ; BooleanLiteral::= "true" | "false"; Brackets ::= | "[" "]" Brackets ; BreakStatement ::= "break" ";" |"break" "id" ";"; CastExpression ::= "(" Type ")" UnaryExpression |"(" Type ")" UnaryExpressionNotPlusMinus; CatchList ::= | "catch" "(" FormalParameters ")" Block CatchList ; ClassBody ::= "{" ClassBodyDecls "}"; ClassBodyDecl ::= Initializer | NestedClassDecl | NestedInterfaceDecl | MethodDecl| ConstructorDecl | FieldDecl; ClassBodyDecls ::= | ClassBodyDecl ClassBodyDecls ; ClassDecl ::= ClassSpecifications UnmodifiedClassDecl; ClassSpecification ::= "abstract" | "final" | "public"; ClassSpecifications ::= | ClassSpecification ClassSpecifications; Compare ::= "==" | "!="; CompilationUnit ::= OptPackageDecl ImportDecls TypeDecls; ConditionalAndExpression ::= InclusiveOrExpression OptRestOfIncl; ConditionalExpression ::= ConditionalOrExpression OptRestOfCondExpression; ConditionalOrExpression ::= ConditionalAndExpression OptRestOfCond; ConstructorDecl ::= ConstructorSpecifications "id" FormalParameters OptThrows "{" OptExplicitConstrInvoc BlockStatements "}"; ConstructorSpecification ::= "public" | "protected" | "private"| ; ConstructorSpecifications ::= ConstructorSpecification ConstructorSpecifications ; ContinueStatement ::= "continue" ";" |"continue" "id" ";"; DoStatement ::= "do" Statement "while" "(" Expression ")" ";"; EmptyStatement ::= ";"; EqualityExpression ::= InstanceOfExpression OptRestOfEq; ExclusiveOrExpression ::= AndExpression OptRestOfExcl; ExplicitConstructorInvocation ::= "this" Arguments ";" | OptPrim "super" Arguments ";"; Expression ::= ConditionalExpression OptRestOfExpr; Extension ::= | "extends" Name ; FieldDecl ::= FieldSpecifications Type VariableDeclarator VariableDeclarators; FieldSpecification ::= "public" | "protected" | "private" | "static" | "final" | "transient" | "volatile"; FieldSpecifications ::= FieldSpecification FieldSpecifications|; FormalParameters ::= "(" ")" |"(" Parameter OptParameters ")"; ForStatement ::= "for" "(" OptForInit ";" OptExpression ";" OptForUpdate ")" Statement; IfStatement ::= "if" "(" Expression ")" Statement OptElse; Implements ::= | "implements" NameList ; ImportDecl ::= "import" Name OptEndImport ";" ; ImportDecls ::= |ImportDecl ImportDecls ; InclusiveOrExpression ::= ExclusiveOrExpression OptRestOfInclOr; IncrDecr ::= "++" | "--"; Initializer ::= "static" Block | Block; InstanceOfExpression ::= RelationalExpression OptInstanceOf; InterfaceDecl ::= InterfaceSpecifications UnmodifiedInterfaceDecl; InterfaceExtension ::= | "extends" NameList; InterfaceMemberDecl ::= NestedClassDecl | NestedInterfaceDecl | MethodDecl | FieldDecl; InterfaceMemberDecls ::= | InterfaceMemberDecl InterfaceMemberDecls; InterfaceSpecification ::= "abstract" | "public"; InterfaceSpecifications ::= | InterfaceSpecification InterfaceSpecifications ; LabeledStatement ::= "id" ":" Statement; Literal ::= "int_literal" | "float_literal" | "char_literal" | "string_literal"| BooleanLiteral | NullLiteral; LocalVariableDeclaration ::= OptFinal Type VariableDeclarators; MethodBlock ::= Block |";"; MethodDecl ::= MethodSpecifications ResultType MethodDeclarator OptThrows MethodBlock; MethodDeclarator ::= "id" FormalParameters Brackets; MethodSpecification ::= "public" | "protected" | "private" | "static" | "abstract" | "final" | "native" | "synchronized"; MethodSpecifications ::= | MethodSpecification MethodSpecifications ; MultiplicativeExpression ::= UnaryExpression OptRestOfMult; MultOp ::= "*" | "/" | "%"; Name ::= "id" Quals; NameList ::= Name Names; Names ::= | "," NameList ; NestedClassDecl ::= NestedSpecifications UnmodifiedClassDecl; NestedInterfaceDecl ::= NestedInterfaceSpecifications UnmodifiedInterfaceDecl; NestedInterfaceSpecification ::= "static" | "abstract" | "final" | "public" | "protected" | "private"; NestedInterfaceSpecifications ::= | NestedInterfaceSpecification NestedInterfaceSpecifications ; NestedSpecification ::= "static" | "final" | "abstract" | "public" | "protected" | "private"; NestedSpecifications ::= | NestedSpecification NestedSpecifications; NullLiteral ::= "null"; OptBrackets ::= |Brackets; OptComma ::= | "," ; OptElse ::= |"else" Statement ; OptEndImport ::="." "*"; OptExplicitConstrInvoc ::= | ExplicitConstructorInvocation ; OptExpression ::= | Expression; OptFinal ::= | "final" ; Optfinal ::= |"final"; OptFinally ::= | "finally" Block ; OptForInit ::= | LocalVariableDeclaration | StatementExpressionList ; OptForUpdate ::= StatementExpressionList; OptInstanceOf ::= | "instanceof" Type ; OptPackageDecl ::= | PackageDecl ; OptParameters ::= "," Parameter OptParameters ; OptPrim ::= | PrimaryExpression "."; OptRestOfAdd ::= | AddOp AdditiveExpression; OptRestOfAnd ::= | "&" AndExpression; OptRestOfArg ::= "," ArgumentList; OptRestOfCond ::= | "||" ConditionalOrExpression; OptRestOfCondExpression ::= | "?" Expression ":" ConditionalExpression ; OptRestOfEq ::= | Compare EqualityExpression; OptRestOfExcl ::= | "^" ExclusiveOrExpression; OptRestOfExpr ::= AssignmentOperator Expression; OptRestOfIncl ::= | "&&" ConditionalAndExpression; OptRestOfInclOr ::= | "|" InclusiveOrExpression; OptRestOfMult ::= | MultOp MultiplicativeExpression; OptRestOfRel ::= | Relop RelationalExpression; OptRestOfRRest ::= | SwitchLabelList ; OptRestOfShift ::= | ShiftOp ShiftExpression; OptRestOfStmt ::= |"++" | "--" | AssignmentOperator Expression; OptRestOfStmtExprList ::= | "," StatementExpressionList; OptRestOfVarId ::= | "=" VariableInitializer; OptRestOfVarInit ::= | "," VariableInitilizers; OptThrows ::= | "throws" NameList; OptVariableInitializers ::= | VariableInitilizers ; PackageDecl ::= "package" Name ";"; Parameter ::= Optfinal Type VariableDeclaratorId; PostfixExpression ::= PrimaryExpression IncrDecr; PreDecrementExpression ::= "--" PrimaryExpression; PreIncrementExpression ::= "++" PrimaryExpression; PrimaryExpression ::= PrimaryPrefix PrimarySuffixes; PrimaryPrefix ::= Literal | "this" | "super" "." "id"|"(" Expression ")"| AllocationExpression |ResultType "." "class" | Name; PrimarySuffix ::= "." "this" | "." AllocationExpression | "[" Expression "]" | "." "id" |Arguments; PrimarySuffixes ::= PrimarySuffix PrimarySuffixes |; PrimitiveType ::= "boolean" | "char" | "byte" | "short" | "int" | "long" | "float" | "double"; Qual ::= "." "id"; Quals ::= |Qual Quals ; RelationalExpression ::= ShiftExpression OptRestOfRel; Relop ::= "<" | ">" |"<=" | ">="; RestOfSwitchLabelList ::= BlockStatements OptRestOfRRest; ResultType ::= "void" | Type; ReturnStatement ::= "return" ";" |"return" Expression ";"; ShiftExpression ::= AdditiveExpression OptRestOfShift; ShiftOp ::= "<<" | ">>" | ">>>"; Statement ::= LabeledStatement | Block | EmptyStatement | StatementExpression ";"| SwitchStatement | IfStatement |WhileStatement | DoStatement | ForStatement |BreakStatement | ContinueStatement | ReturnStatement| ThrowStatement | SynchronizedStatement | TryStatement; StatementExpression ::= PreIncrementExpression | PreDecrementExpression | PrimaryExpression OptRestOfStmt; StatementExpressionList ::= StatementExpression OptRestOfStmtExprList; SwitchLabel ::= "case" Expression ":" |"default" ":"; SwitchLabelList ::= | SwitchLabel RestOfSwitchLabelList; SwitchStatement ::= "switch" "(" Expression ")" "{" SwitchLabelList "}"; SynchronizedStatement ::= "synchronized" "(" Expression ")" Block; ThrowStatement ::= "throw" Expression ";"; TryStatement ::= "try" Block CatchList OptFinally; Type ::= PrimitiveType Brackets | Name Brackets; TypeDecl ::= ClassDecl|InterfaceDecl|";" ; TypeDecls ::= | TypeDecl TypeDecls ; UnaryExpression ::= AddOp UnaryExpression |PreIncrementExpression | PreDecrementExpression | UnaryExpressionNotPlusMinus; UnaryExpressionNotPlusMinus ::= "~" UnaryExpression | "!" UnaryExpression | CastExpression | PostfixExpression; UnmodifiedClassDecl ::= "class" "id" Extension Implements ClassBody; UnmodifiedInterfaceDecl ::= "interface" "id" InterfaceExtension "{" InterfaceMemberDecls "}"; VariableDeclarator ::= VariableDeclaratorId OptRestOfVarId; VariableDeclaratorId ::= "id" | "id" "[""]"; VariableDeclarators ::= VariableDeclarator VariableDeclarators; VariableInitializer ::= ArrayInitializer |Expression; VariableInitilizers ::= VariableInitializer OptRestOfVarInit; WhileStatement ::= "while" "(" Expression ")" Statement;