Documentation Home
X DevAPI User Guide
Download this Manual

X DevAPI User Guide  /  Expressions EBNF Definitions

Chapter 12 Expressions EBNF Definitions

This section provides a visual reference guide to the grammar for the expression language used in X DevAPI.

ident

ident 
   ::= ID | QUOTED_ID

Figure 12.1 ident

Content shows the syntax in EBNF form as described in the preceding text.

schemaQualifiedIdent

schemaQualifiedIdent 
                  ::= ( ident_schema '.' )? ident

Figure 12.2 schemaQualifiedIdent

Content shows the syntax in EBNF form as described in the preceding text.

columnIdent

Figure 12.3 columnIdent

columnIdent
         ::= ( ident '.' ( ident '.' )? )? ident ( ( '->' | '->>' ) "'" '$' documentPath "'" )?
Content shows the syntax in EBNF form as described in the preceding text.

documentPathLastItem

documentPathLastItem
         ::= '[*]'
           | '[' INT ']'
           | '.*'
           | '.' documentPathMember

Figure 12.4 documentPathLastItem

Content shows the syntax in EBNF form as described in the preceding text.

documentPathItem

documentPathItem
         ::= documentPathLastItem
           | '**'

Figure 12.5 documentPathItem

Content shows the syntax in EBNF form as described in the preceding text.

documentPath

documentPath        
          ::= documentPathItem* documentPathLastItem

Figure 12.6 documentPath

Content shows the syntax in EBNF form as described in the preceding text.

documentField

Figure 12.7 documentField

documentField
         ::= fieldId documentPath*
           | '$' documentPath
Content shows the syntax in EBNF form as described in the preceding text.

argsList

argsList ::= expr ( ',' expr )*

Figure 12.8 argsList

Content shows the syntax in EBNF form as described in the preceding text.

lengthSpec

lengthSpec ::= '(' INT ')'

Figure 12.9 lengthSpec

Content shows the syntax in EBNF form as described in the preceding text.

castType

castType ::= 'SIGNED' 'INTEGER'*
           | 'UNSIGNED' 'INTEGER'*
           | 'CHAR' lengthSpec*
           | 'BINARY' lengthSpec*
           | 'DECIMAL' ( lengthSpec | '(' INT ',' INT ')' )?
           | 'TIME'
           | 'DATE'
           | 'DATETIME'
           | 'JSON'

Figure 12.10 castType

Content shows the syntax in EBNF form as described in the preceding text.

functionCall

functionCall
         ::= schemaQualifiedIdent '(' argsList? ')'

Figure 12.11 functionCall

Content shows the syntax in EBNF form as described in the preceding text.

placeholder

placeholder ::= ':' ID

Figure 12.12 placeholder

Content shows the syntax in EBNF form as described in the preceding text.

groupedExpr

groupedExpr ::= '(' expr ')'

Figure 12.13 groupedExpr

Content shows the syntax in EBNF form as described in the preceding text.

unaryOp

unaryOp  ::= ( '!' | '~' | '+' | '-' ) atomicExpr

Figure 12.14 unaryOp

Content shows the syntax in EBNF form as described in the preceding text.

literal

literal  ::= INT
           | FLOAT
           | STRING_SQ
           | STRING_DQ
           | 'NULL'
           | 'FALSE'
           | 'TRUE'

Figure 12.15 literal

Content shows the syntax in EBNF form as described in the preceding text.

jsonKeyValue

jsonKeyValue ::= STRING_DQ ':' expr

Figure 12.16 jsonKeyValue

Content shows the syntax in EBNF form as described in the preceding text.

jsonDoc

jsonDoc  ::= '{' ( jsonKeyValue ( ',' jsonKeyValue )* )* '}'

Figure 12.17 jsonDoc

Content shows the syntax in EBNF form as described in the preceding text.

jsonarray

jsonArray ::= '[' ( expr ( ',' expr )* )* ']'

Figure 12.18 jsonarray

Content shows the syntax in EBNF form as described in the preceding text.

atomicExpr

atomicExpr
         ::= placeholder
           | columnOrPath
           | functionCall
           | groupedExpr
           | unaryOp
           | castOp

Figure 12.19 atomicExpr

Content shows the syntax in EBNF form as described in the preceding text.

intervalUnit

INTERVAL_UNIT
         ::= 'MICROSECOND'
           | 'SECOND'
           | 'MINUTE'
           | 'HOUR'
           | 'DAY'
           | 'WEEK'
           | 'MONTH'
           | 'QUARTER'
           | 'YEAR'
           | 'SECOND_MICROSECOND'
           | 'MINUTE_MICROSECOND'
           | 'MINUTE_SECOND'
           | 'HOUR_MICROSECOND'
           | 'HOUR_SECOND'
           | 'HOUR_MINUTE'
           | 'DAY_MICROSECOND'
           | 'DAY_SECOND'
           | 'DAY_MINUTE'
           | 'DAY_HOUR'
           | 'YEAR_MONTH'

Figure 12.20 INTERVAL_UNIT

Content shows the syntax in EBNF form as described in the preceding text.

interval

interval ::= 'INTERVAL' expr INTERVAL_UNIT

Figure 12.21 interval

Content shows the syntax in EBNF form as described in the preceding text.

intervalExpr

intervalExpr
         ::= atomicExpr ( ( '+' | '-' ) interval )*

Figure 12.22 intervalExpr

Content shows the syntax in EBNF form as described in the preceding text.

mulDivExpr

mulDivExpr
         ::= intervalExpr ( ( '*' | '/' | '%' ) intervalExpr )*

Figure 12.23 mulDivExpr

Content shows the syntax in EBNF form as described in the preceding text.

addSubExpr

addSubExpr
         ::= mulDivExpr ( ( '+' | '-' ) mulDivExpr )*

Figure 12.24 addSubExpr

Content shows the syntax in EBNF form as described in the preceding text.

shiftExpr

shiftExpr
         ::= addSubExpr ( ( '<<' | '>>' ) addSubExpr )*

Figure 12.25 shiftExpr

Content shows the syntax in EBNF form as described in the preceding text.

bitExpr

bitExpr  ::= shiftExpr ( ( '&' | '|' | '^' ) shiftExpr )*

Figure 12.26 bitExpr

Content shows the syntax in EBNF form as described in the preceding text.

compExpr

compExpr ::= bitExpr ( ( '>=' | '>' | '<=' | '<' | '=' | '<>' | '!=' ) bitExpr )*

Figure 12.27 compExpr

Content shows the syntax in EBNF form as described in the preceding text.

ilriExpr

ilriExpr ::= compExpr 'IS' 'NOT'* ( 'NULL' | 'TRUE' | 'FALSE' )
           | compExpr 'NOT'* 'IN' '(' argsList* ')'
           | compExpr 'NOT'* 'IN' compExpr
           | compExpr 'NOT'* 'LIKE' compExpr ( 'ESCAPE' compExpr )*
           | compExpr 'NOT'* 'BETWEEN' compExpr 'AND' compExpr
           | compExpr 'NOT'* 'REGEXP' compExpr
           | compExpr

Figure 12.28 ilriExpr

Content shows the syntax in EBNF form as described in the preceding text.

andExpr

andExpr  ::= ilriExpr ( ( '&&' | 'AND' ) ilriExpr )*

Figure 12.29 andExpr

Content shows the syntax in EBNF form as described in the preceding text.

orExpr

orExpr   ::= andExpr ( ( '||' | 'OR' ) andExpr )*

Figure 12.30 orExpr

Content shows the syntax in EBNF form as described in the preceding text.

expr

expr     ::= orExpr

Figure 12.31 expr

Content shows the syntax in EBNF form as described in the preceding text.

DIGIT

DIGIT    ::= '0' - '9'

Figure 12.32 DIGIT

Content shows the syntax in EBNF form as described in the preceding text.

FLOAT

FLOAT    ::= DIGIT* '.' DIGIT+ ( 'E' ( '+' | '-' )* DIGIT+ )*
           | DIGIT+ 'E' ( '+' | '-' )* DIGIT+

Figure 12.33 FLOAT

Content shows the syntax in EBNF form as described in the preceding text.

INT

INT      ::= DIGIT+

Figure 12.34 INT

Content shows the syntax in EBNF form as described in the preceding text.

QUOTED_ID

QUOTED_ID
         ::= '`' ID '`'
           | '`' ( '~' '`'* | '``' )* '`'

Figure 12.35 QUOTED_ID

Content shows the syntax in EBNF form as described in the preceding text.

ID

ID       ::= ( 'a' - 'z' | 'A' - 'Z' | '_' ) ( 'a' - 'z' | 'A' - 'Z' | '0' - '9' | '_' )*

Figure 12.36 ID

Content shows the syntax in EBNF form as described in the preceding text.

WS

WS       ::= [ \t\r\n]+

Figure 12.37 WS

Content shows the syntax in EBNF form as described in the preceding text.

SCHAR

SCHAR    ::= [\u0020\u0021\u0023\u0024\u0025\u0026\u0028-\u005B\u005D-\u007E]

Figure 12.38 SCHAR

Content shows the syntax in EBNF form as described in the preceding text.

STRING_DQ

STRING_DQ
         ::= '"' ( SCHAR | "'" | ESCAPED_DQ )* '"'

Figure 12.39 STRING_DQ

Content shows the syntax in EBNF form as described in the preceding text.

STRING_SQ

STRING_SQ
         ::= "'" ( SCHAR | '"' | ESCAPED_SQ )* "'"

Figure 12.40 STRING_SQ

Content shows the syntax in EBNF form as described in the preceding text.