formalism of java is none -> ; None ::= none ; OptQualifiedName ::= none QualifiedName ; OptTypeName ::= none TypeName ; OptBlock ::= none Block ; OptIdentifier ::= none Identifier ; OptExpression ::= none Expression ; QualifiedName ::= access Identifier ; this -> ; super -> ; null -> ; class -> ; Name ::= this super null class QualifiedName ; arrayof -> Type ; Type ::= arrayof Name ; void -> ; ResultType ::= void Type ; TypeName ::= QualifiedName ; abstract -> ; final -> ; native -> ; private -> ; protected -> ; public -> ; static -> ; synchronized -> ; transient -> ; volatile -> ; modifiers -> Modifier * ... ; Modifiers ::= modifiers ; Modifier ::= abstract final public protected private static native synchronized transient volatile ; expressions -> Expression * ... ; arrayInitializer -> VariableInitializer * ... ; catches -> Catch * ... ; importDeclarations -> ImportDeclaration * ... ; fieldDeclarations -> FieldDeclaration * ... ; parameters -> Parameter * ... ; typeDeclarations -> TypeDeclaration * ... ; typeNames -> TypeName * ... ; Expressions ::= expressions ; ArrayInitializer ::= arrayInitializer ; Catches ::= catches ; ImportDeclarations ::= importDeclarations ; FieldDeclarations ::= fieldDeclarations ; Parameters ::= parameters ; TypeDeclarations ::= typeDeclarations ; TypeNames ::= typeNames ; variableDeclarators -> VariableDeclarator + ... ; interfaceFieldDeclarations -> InterfaceFieldDeclaration * ... ; VariableDeclarators ::= variableDeclarators ; InterfaceFieldDeclarations ::= interfaceFieldDeclarations ; block -> BlockStatement * ... ; Block ::= block ; array -> VariableDeclaratorId ; VariableDeclaratorId ::= array Identifier ; initializedVariable -> VariableDeclaratorId VariableInitializer ; VariableDeclarator ::= initializedVariable VariableDeclaratorId ; methodDeclarator -> VariableDeclaratorId Parameters ; arrayMethodDeclarator -> MethodDeclarator ; MethodDeclarator ::= methodDeclarator arrayMethodDeclarator ; constructor -> TypeName Parameters ; ConstructorDeclarator ::= constructor ; compilationUnit -> OptQualifiedName ImportDeclarations TypeDeclarations ; CompilationUnit ::= compilationUnit ; classDeclaration -> Modifiers Identifier OptTypeName TypeNames FieldDeclarations ; interfaceDeclaration -> Modifiers Identifier TypeNames InterfaceFieldDeclarations ; TypeDeclaration ::= classDeclaration interfaceDeclaration ; fieldVariableDeclaration -> Modifiers Type VariableDeclarators ; methodDeclaration -> Modifiers ResultType MethodDeclarator TypeNames OptBlock ; InterfaceFieldDeclaration ::= fieldVariableDeclaration methodDeclaration classDeclaration interfaceDeclaration ; constructorDeclaration -> Modifiers ConstructorDeclarator TypeNames ConstructorBody ; FieldDeclaration ::= constructorDeclaration Block InterfaceFieldDeclaration staticInitializer instanceInitializer ; onDemand -> QualifiedName ; ImportDeclaration ::= onDemand QualifiedName ; VariableInitializer ::= Expression ArrayInitializer ; parameter -> OptModifier Type VariableDeclaratorId ; Parameter ::= parameter ; constructorBody -> ExplicitConstructorInvocation Block ; ConstructorBody ::= Block constructorBody ; thisInvocation -> Expressions ; superInvocation -> Expressions ; ExplicitConstructorInvocation ::= thisInvocation superInvocation ; BlockStatement ::= Statement LocalVariableDeclaration ExplicitConstructorInvocation classDeclaration ; localVariableDeclaration -> OptModifier Type VariableDeclarators ; OptModifier ::= none Modifier ; LocalVariableDeclaration ::= localVariableDeclaration ; staticInitializer -> Block ; instanceInitializer -> Block ; Statement ::= Expression None Block label case default if switch while do for break continue return throw synchro try ; label -> Identifier Statement ; case -> Expression Statement ; default -> Statement ; if -> Expression Statement Statement ; switch -> Expression Block ; while -> Expression Statement ; do -> Statement Expression ; for -> ForInit OptExpression Expressions Statement ; ForInit ::= LocalVariableDeclaration Expressions ; break -> OptIdentifier ; continue -> OptIdentifier ; return -> OptExpression ; throw -> Expression ; synchro -> Expression Statement ; try -> Block Catches OptBlock ; catch -> Parameter Block ; Catch ::= catch ; Expression ::= binary instanceof cond index prefix postfix unary cast call access newObject Name newDim newArray string character hexa octal floating integer linteger true false ; binary -> Expression BinaryOperator Expression ; times -> ; div -> ; mod -> ; xor -> ; and -> ; ior -> ; land -> ; lor -> ; leftShift -> ; rightShift -> ; unsignedRightShift -> ; assignment -> ; plusAssignment -> ; minusAssignment -> ; timesAssignment -> ; divAssignment -> ; modAssignment -> ; xorAssignment -> ; andAssignment -> ; iorAssignment -> ; leftShiftAssignment -> ; rightShiftAssignment -> ; unsignedRightShiftAssignment -> ; less -> ; gtr -> ; lessEq -> ; gtrEq -> ; eq -> ; neq -> ; BinaryOperator ::= times div mod xor and ior land lor leftShift rightShift unsignedRightShift assignment plusAssignment minusAssignment timesAssignment divAssignment modAssignment xorAssignment andAssignment iorAssignment leftShiftAssignment rightShiftAssignment unsignedRightShiftAssignment less gtr lessEq gtrEq eq neq PlusOrMinus ; instanceof -> Expression Type ; cond -> Expression Expression Expression ; index -> Expression Expression ; prefix -> PrefixOrPostfixOperator Expression ; postfix -> Expression PrefixOrPostfixOperator ; incr -> ; decr -> ; PrefixOrPostfixOperator ::= incr decr ; unary -> UnaryOperator Expression ; plus -> ; minus -> ; PlusOrMinus ::= plus minus ; UnaryOperator ::= PlusOrMinus not complement ; not -> ; complement -> ; cast -> TypeName Expression ; call -> Access Expressions ; access -> Expression Identifier ; Access ::= access Name ; newObject -> New TypeName Expressions FieldDeclarations ; newDim -> TypeName Dims Dims ArrayInitializer ; newArray -> TypeName Dims ; dim -> ; dims -> Dim * ... ; Dims ::= dims ; Dim ::= dim Expression ; string -> implemented as STRING ; character -> implemented as STRING ; hexa -> implemented as STRING ; octal -> implemented as STRING ; floating -> implemented as STRING ; integer -> implemented as STRING ; linteger -> implemented as STRING ; true -> ; false -> ; identifier -> implemented as STRING ; Identifier ::= identifier class ; new -> ; instNew -> Expression NewKw ; New ::= new instNew ; NewKw ::= new ; COMMENT ::= comment ; comment -> implemented as STRING ; COMMENT_S ::= comment_s ; comment_s -> COMMENT * ... ; end