Query ::= LBRACE VarList BAR Formula RBRACE
VarList ::= NAME | VarList COMMA NAME
Formula ::= AtomicFormula |
            Formula AND Formula |
            Formula OR Formula |
            NOT LPAREN Formula RPAREN |
            LPAREN EXISTS VarList RPAREN LPAREN Formula RPAREN |
            LPAREN FORALL VarList RPAREN LPAREN Formula RPAREN |
            LPAREN Formula RPAREN
AtomicFormula ::= 
            NAME LPAREN ArgList RPAREN |
            Arg COMPARISON Arg
ArgList ::= Arg | ArgList COMMA Arg
Arg ::= NAME | STRING | INTEGER | DECIMAL

Note: COMPARISON will be one of <, <=, >, >=, <>, =