The grammar notation is taken from the Java Language Specification:
C.1.1 Parameter declarationThis section describes the syntax of the declareParameters argument. DeclareParameters: Parameters ,opt Parameters: Parameter Parameters , Parameter Parameter: Type Identifier C.1.2 Variable declarationThis section describes the syntax of the declareVariables argument. DeclareVariables: Variables ;opt Variables: Variable Variables ; Variable Variable: Type Identifier C.1.3 Import declarationThis section describes the syntax of the declareImports argument. DeclareImports: ImportDeclarations ;opt ImportDeclarations: ImportDeclaration ImportDeclarations ; ImportDeclaration ImportDeclaration: import Name import Name.* C.1.4 Ordering specificationThis section describes the syntax of the setOrdering argument. SetOrdering: OrderSpecifications ,opt OrderSpecifications: OrderSpecification OrderSpecifications , OrderSpecification OrderSpecification: Expression ascending Expression descending C.1.5 Filter expressionThis section describes the syntax of the setFilter argument. Basically, the query filter expression is a Java boolean expression, where some Java expressions are not permitted. Specifically, pre- and post- increment and decrement (++ and - -), shift (>> and <<), and assignment expressions (+=, -=, and so on) are not permitted. The description is bottom-up; in other words, the last rule Expression is the root of the filter expression syntax. Please note that the grammar allows arbitrary method calls ( MethodInvocation ), where JDO permits calls only to the methods contains() , isEmpty() , and a number of String methods. This restriction cannot be expressed in terms of the syntax and must be ensured by a semantic check. Primary: Literal this ( Expression ) FieldAccess MethodInvocation ArgumentList: Expression ArgumentList , Expression FieldAccess: Primary . Identifier MethodInvocation: Name ( ArgumentListopt ) Primary . Identifier ( ArgumentListopt ) PostfixExpression: Primary Name UnaryExpression: + UnaryExpression - UnaryExpression UnaryExpressionNotPlusMinus UnaryExpressionNotPlusMinus: PostfixExpression ~ UnaryExpression ! UnaryExpression CastExpression CastExpression: ( Type ) UnaryExpression MultiplicativeExpression: UnaryExpression MultiplicativeExpression * UnaryExpression MultiplicativeExpression / UnaryExpression AdditiveExpression: MultiplicativeExpression AdditiveExpression + MultiplicativeExpression AdditiveExpression - MultiplicativeExpression RelationalExpression: AdditiveExpression RelationalExpression < AdditiveExpression RelationalExpression > AdditiveExpression RelationalExpression <= AdditiveExpression RelationalExpression >= AdditiveExpression EqualityExpression: RelationalExpression EqualityExpression == RelationalExpression EqualityExpression != RelationalExpression AndExpression: EqualityExpression AndExpression & EqualityExpression ExclusiveOrExpression: AndExpression ExclusiveOrExpression ^ AndExpression InclusiveOrExpression: ExclusiveOrExpression InclusiveOrExpression ExclusiveOrExpression ConditionalAndExpression: InclusiveOrExpression ConditionalAndExpression && InclusiveOrExpression ConditionalOrExpression: ConditionalAndExpression ConditionalOrExpression ConditionalAndExpression Expression: ConditionalOrExpression C.1.6 TypesThis section describes a type specification used in a parameter or variable declaration or in a cast expression. Type PrimitiveType Name PrimitiveType: NumericType boolean NumericType: IntegralType FloatingPointType IntegralType: one of byte short int long char FloatingPointType: one of float double C.1.7 LiteralsA literal is the source code representation of a value of a primitive type, the String type, or the null type. Please refer to the Java Language Specification for the lexical structure of IntegerLiterals , FloatingPointLiterals , CharacterLiterals , and StringLiterals . IntegerLiteral: ... FloatingPointLiteral: ... BooleanLiteral: one of true false CharacterLiteral: ... StringLiteral: ... NullLiteral: null Literal: IntegerLiteral FloatingPointLiteral BooleanLiteral CharacterLiteral StringLiteral NullLiteral C.1.8 NamesA name is a possible qualified identifier. Please refer to the Java Language Specification for the lexical structure of an identifier. Name: Identifier QualifiedName QualifiedName: Name . Identifier |