BNF Grammar For Zoe Query Specification
By Mark Woods, October 13, 2002
It has been a long time since I tried my hand at writing up a BNF grammar for a language. Here is my attempt at doing so for Zoe's Specification syntax. This is mostly just to help me understand the specification syntax. It would be nice to have a parser that handles the grammar and builds the specification, but I lack the cycles for that.
|
From the Zoe Mail List: objectsWithSpecification is the most complex API as it involve three levels of translation: XML-RPC -> SZQualifier -> Lucene's Query. Also keep in mind that not all the SZQualifier functionalities are supported by Lucene. Which means that some qualifier might be pretty much meaningless when translated to a Lucene query.
Also From the Zoe Mail List: "SZQualifier.KeyComparison is a subclass of SZQualifier that compares a named property of an object with a named value of another object. For example, to return all of the employees whose salaries are greater than those of their managers, you might use an expression such as "salary > manager.salary", where "salary" is the left key and "manager.salary" is the right key. The "left key" is the property of the first object that's being compared to a property in a second object. The property in the second object is the "right key". Both the left key and the right key might be key paths. You can use SZQualifier.KeyComparison to compare properties of two different objects or to compare two properties of the same object."
For more info, refer to Zoe.