Created attachment 350857 [details] bnf for selectors
*** Bug 506808 has been marked as a duplicate of this bug. ***
This goes into the new Java Client documentation, which will be essentially rewritten along with the new high level API documentation. I have checked it into the Apache Qpid documentation for the Java Client.
I can't seem to find this in the upstream docs.
I can only document the syntax of the *new* C++ selectors, not the java selectors.
Here I paste in the informal BNF for the newly implemented C++ selectors: (it is very similar to the java selector syntax, but I make no guatantee that it is identical): [This is copied from SelectorExpression.cpp and currently reflects the accepted syntax, but there is no process fro keeping this description in synchrony with the the actual code] /* * Syntax for JMS style selector expressions (informal): * * Alpha ::= "a".."z" | "A".."Z" * Digit ::= "0".."9" * IdentifierInitial ::= Alpha | "_" | "$" * IdentifierPart ::= IdentifierInitial | Digit | "." * Identifier ::= IdentifierInitial IdentifierPart* * Constraint : Identifier NOT IN ("NULL", "TRUE", "FALSE", "NOT", "AND", "OR", "BETWEEN", "LIKE", "IN", "IS") // Case insensitive * * LiteralString ::= ("'" ~[']* "'")+ // Repeats to cope with embedded single quote * * LiteralExactNumeric ::= Digit+ * Exponent ::= ['+'|'-'] LiteralExactNumeric * LiteralApproxNumeric ::= ( Digit "." Digit* [ "E" Exponent ] ) | * ( "." Digit+ [ "E" Exponent ] ) | * ( Digit+ "E" Exponent ) * LiteralBool ::= "TRUE" | "FALSE" * * Literal ::= LiteralBool | LiteralString | LiteralApproxNumeric | LiteralExactNumeric * * EqOps ::= "=" | "<>" * * ComparisonOps ::= EqOps | ">" | ">=" | "<" | "<=" * * BoolExpression ::= OrExpression * * OrExpression ::= AndExpression ( "OR" AndExpression )* * * AndExpression :: = ComparisonExpression ( "AND" ComparisonExpression )* * * ComparisonExpression ::= AddExpression "IS" "NULL" | * AddExpression "IS" "NOT" "NULL" | * AddExpression "LIKE" LiteralString [ "ESCAPE" LiteralString ] | * AddExpression "NOT" "LIKE" LiteralString [ "ESCAPE" LiteralString ] | * AddExpression "BETWEEN" AddExpression "AND" AddExpression | * AddExpression "NOT" "BETWEEN" AddExpression "AND" AddExpression | * AddExpression ComparisonOps AddExpression | * "NOT" ComparisonExpression | * AddExpression * * AddOps ::= "+" | "-" * * MultiplyOps ::= "*" | "-" * * AddExpression :: = MultiplyExpression ( AddOps MultiplyExpression )* * * MultiplyExpression :: = UnaryArithExpression ( MultiplyOps UnaryArithExpression )* * * UnaryArithExpression ::= AddOps AddExpression | * "(" OrExpression ")" | * PrimaryExpression * * PrimaryExpression :: = Identifier | * Literal */
Justin is the above information sufficient for documentation purposes for the C++ selectors? If not then what else needs documenting?
Yes, I think so. We'll update the documentation later if necessary. Also changing this to the qpid-cpp component. (In reply to comment #7) > Justin is the above information sufficient for documentation purposes for > the C++ selectors? If not then what else needs documenting?