> Date: Wed, 15 Feb 2006 11:04:46 -0500
> From: "Mark R. Diggory" <[log in to unmask]>
>
> Is your CQL parser Antlr or JavaCC based at all?
Yeesh -- I've never even heard of these things, sorry. I am not
really a Java hacker (if there is such a thing). I am just a
Unix/C/Perl hacker who took a wrong turn one day and accidentally
wrote a Java library :-)
So the answer to your question is: no. So far as I know.
> I've been experimenting with using these lexical parsers to build
> parser with other query languages but without significant
> success. I'm thinking an alternative here is to use Antlr or JavaCC,
> to build a parser generation "framework". Then cases such as this
> can extend the parser generation with handlers for their
> implementation, the simplest example implementation would be A SAX
> event generator. Since these tools are specifically designed to
> handle query parsing and usually are tailored to working with BNF
> like syntaxes, getting from the CQL spec to an actual implementation
> could be automated.
Beep, beep, beep. Architecture astronautics alert! :-)
Seriously, I tend to duck for cover these days when I hear the word
"framework". ("import" is another one.) If you can make it fly, then
great. But in my experience of writing this kind of code, nothing
beats a simple hand-crafted recursive descent parser. Apart from
anything else, the diagnostics you can generate for malformed input
are an order of magnitude more informative than anything I've ever
seen a framework generate (and, yes, that includes YACC!)
Just my advice; use or discard according to what's most useful.
_/|_ ___________________________________________________________________
/o ) \/ Mike Taylor <[log in to unmask]> http://www.miketaylor.org.uk
)_v__/\ "Schmeichel is beaten for the first time today." -- Andy Gray,
17th December 1995, after Robbie Fowler's second goal made the
score 2-0.
|