DekGenius.com
[ Team LiB ] Previous Section Next Section

D.8 Filter Expressions

The following grammar describes the syntax of a JDOQL filter:

Expression:
        ConditionalOrExpression

ConditionalOrExpression:
        ConditionalAndExpression
        ConditionalOrExpression || ConditionalAndExpression

ConditionalAndExpression:
        InclusiveOrExpression
        ConditionalAndExpression && InclusiveOrExpression

InclusiveOrExpression:
        AndExpression
        InclusiveOrExpression | AndExpression

AndExpression:
        EqualityExpression
        AndExpression & EqualityExpression

EqualityExpression:
        RelationalExpression
        EqualityExpression == RelationalExpression
        EqualityExpression != RelationalExpression

RelationalExpression:
        AdditiveExpression
        RelationalExpression <  AdditiveExpression
        RelationalExpression >  AdditiveExpression
        RelationalExpression <= AdditiveExpression
        RelationalExpression >= AdditiveExpression

AdditiveExpression:
        MultiplicativeExpression
        AdditiveExpression + MultiplicativeExpression
        AdditiveExpression - MultiplicativeExpression

MultiplicativeExpression:
        UnaryExpression
        MultiplicativeExpression * UnaryExpression
        MultiplicativeExpression / UnaryExpression

UnaryExpression:
        + UnaryExpression
        - UnaryExpression
        UnaryExpressionNotPlusMinus

UnaryExpressionNotPlusMinus:
        PostfixExpression
        ~ UnaryExpression
        ! UnaryExpression
        CastExpression

PostfixExpression:
        Primary
        Name


CastExpression:
        ( Type ) UnaryExpression

Primary:
        Literal
        this
        ( Expression )
        FieldAccess
        MethodInvocation

FieldAccess:
        Primary . Identifier

MethodInvocation:
        Primary . Identifier ( )
        Primary . Identifier ( ArgumentList )

ArgumentList:
        Expression
        ArgumentList , Expression
    [ Team LiB ] Previous Section Next Section