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]+)

The EBNF uses these notations:

The EBNF uses the same Basic EBNF notation as the W3C specification of XML, located at this URL: http://www.w3.org/TR/xml/#sec-notation

Also, note these important items about the syntax:

These and other aspects of EQL will be discussed further in later sections of this section.


Copyright © Legal Notices