BimQL is a query language and like any other language it consists of a number of rules. All rules together are called a grammar. This page describes that grammar by providing the EBNF notation and syntax diagrams.

bimql

bimql ::= select

select

select ::= ‘Select’ VARIABLE where? cascade* set?

cascade

cascade ::= ‘Select’ VARIABLE ‘:=’ VARIABLE ( | ‘.EntityType’ | ‘.Attribute.’ STRING | ‘.Property.’ STRING | (‘.*’ | ‘.*(‘ INTEGER? TRUE? ‘)’)) where?

where

where ::= ‘Where’ statement

set

set ::= ‘Set’ VARIABLE ‘.Attribute.’ STRING ‘:=’ (INTEGER | REAL | STRING)

statement

statement ::= relation (‘And’ relation | ‘Or’ relation)*

relation

relation ::= relationleft (‘=’ relationright | ‘/=’ relationright | ‘<‘ relationright | ‘=’ relationright | ‘>’ relationright)

relationleft

relationleft ::= (VARIABLE ‘.EntityType’ | VARIABLE ‘.Attribute.’ STRING | VARIABLE ‘.Property.’ STRING | VARIABLE (‘.*.EntityType’ | ‘.*(‘ INTEGER? TRUE? ‘).EntityType’) | VARIABLE (‘.*.Attribute.’ | ‘.*(‘ INTEGER? TRUE? ‘).Attribute.’) STRING | VARIABLE (‘.*.Property.’ | ‘.*(‘ INTEGER? TRUE? ‘).Property.’) STRING)

relationright

relationright ::= (INTEGER | REAL | DQSTRING)

TRUE

TRUE ::= ‘+’

FALSE

FALSE ::= ‘-‘

VARIABLE

VARIABLE ::= ‘?’ STRING

INTEGER

INTEGER ::= ‘-‘? ‘0..9’+

REAL

REAL ::= ‘-‘? ‘0..9’+ ‘.’ ‘0..9’+

DQSTRING

DQSTRING ::= ‘”‘ (‘0..9’ | ‘A..Z’ | ‘a..z’ | ‘!’ | ‘#’ | ‘$’ | ‘%’ | ‘&’ | ‘^’ | ‘|’ | ‘*’ | ‘+’ | ‘,’ | ‘-‘ | ‘.’ | ‘/’ | ‘:’ | ‘;’ | ” | ‘?’ | ‘~’ | ‘`’ | ‘@’ | ‘_’)+ ‘”‘

STRING

STRING ::= (‘0..9’ | ‘A..Z’ | ‘a..z’)+

WS

WS ::= (‘ ‘ | ‘t’ | ‘n’ | ‘r’ | ‘f’)+