The following EBNF grammar describes the syntax for EQL filter expressions.
RecordPath ::= Collection "(" ")" "/" RecordStep Collection ::= FnPrefix? "collection" FnPrefix ::= "fn" ":" RecordStep ::= "record" Predicate? Predicate ::= "[" Expr "]" Expr ::= OrExpr OrExpr ::= AndExpr ("or" AndExpr)* AndExpr ::= NotExpr ("and" NotExpr)* NotExpr ::= PrimaryExpr | (FnPrefix? "not" "(" Expr ")") PrimaryExpr ::= ParenExpr | TestExpr ParenExpr ::= "(" Expr ")" TestExpr ::= ComparisonExpr | FunctionCall FunctionCall ::= TrueFunction | FalseFunction | MatchesFunction TrueFunction ::= FnPrefix? "true" "(" ")" FalseFunction ::= FnPrefix? "false" "(" ")" MatchesFunction ::= "endeca" ":" "matches" "(" "." "," StringLiteral "," StringLiteral ( "," StringLiteral ( "," StringLiteral ( "," (TrueFunction | FalseFunction) )? )? )? ")" ComparisonExpr ::= LiteralComparison | JoinComparison | RangeComparison | GeospatialComparison | DimensionComparison EqualityOperator ::= "=" | "!=" LiteralComparison ::= PropertyKey EqualityOperator Literal JoinComparison ::= PropertyKey "=" PropertyPath RangeComparison ::= PropertyKey RangeOperator NumericLiteral GeospatialComparison ::= "endeca" ":" "distance" "(" PropertyKey "," "endeca" ":" "geocode" "(" NumericLiteral "," NumericLiteral ")" ")" (">" | "<") NumericLiteral DimensionComparison ::= DimensionKey EqualityOperator (DimValById | DimValPath) "//" "id" DimValById ::= "endeca" ":" "dval-by-id" "(" IntegerLiteral ")" DimValPath ::= Collection "(" "" "dimensions" "" ")" ("/" DValStep)* DValStep ::= ("*" | "dval") "[" "name" "=" StringLiteral "]" DimensionKey ::= NCName PropertyPath ::= RecordPath "/" PropertyKey PropertyKey ::= NCName RangeOperator ::= "<" | "<=" | ">" | ">=" Literal ::= NumericLiteral | StringLiteral NumericLiteral ::= IntegerLiteral | DecimalLiteral StringLiteral ::= '"' ('""' | [^"])* '"' IntegerLiteral ::= [0-9]+ DecimalLiteral ::= ([0-9]+ "." [0-9]*) | ("." [0-9]+)