db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Dudziak <to...@first.gmd.de>
Subject RE: Need Help with JDOQL Compiler/Interpreter
Date Mon, 03 May 2004 12:01:39 GMT
On Mon, 3 May 2004, Mahler Thomas wrote:

> Hi again,
> 
> I rechecked the JDORI src distribution and I found an ANTLR grammar file
> under:
> 
> jdo-1_0_1-src-ri\src\com\sun\jdori\common\query\jdoqlc\JDOQL.g
> 
> I think it should be easy to roll our own grammar file by having a closer
> look at the jdoql.g.

Indeed, this grammar makes it much easier. Actually the lexer/parser are
simple enough, as opposed to the optimizer and semantic tree parsers. I'm
afraid, we may need part of the latter as it checks the semantic
correctness of the query.
However, we should be extra careful with the licensing. Also, the
lexer/parser may need some rework as they use specific AST classes
(com.sun.jdori.common.query.tree.*) which we perhaps don't want to use (it
would tie us to the reference implementation).

So, in my eyes the easiest route (licensing issues set aside) would be to
define unit tests: JDOQL statement -> PB query, and to convert lexer and
grammar (without semantic ckecking for now) to generate our own AST, plus
an OJB tree parser that in turn generates the queries.

As I said, I'm willing to do the parser stuff if somebody else would write
the tests ;-)

Tom


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message