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 06:23:36 GMT
On Mon, 3 May 2004, Thomas Mahler wrote:

> Hi Brian,
> 
> The "real" way to deal with jdoql will be to use a parser-generator like 
> ANTLR. The parser Generator will be able to take an EBNF-like grammar 
> file and generate Java-programes implementing Lexer and Parser for the 
> language defined by the EBNF.

Brian, how soon do you need the grammar ? I could put together an Antlr
grammar at the end of the week.
 
> In my mind the procdure for JDOQL will be quite similar as for ODMG OQL.
> That is the parser should translate from JDOQL to PB query/criteria objects.
> We are defining all parsing rules in a grammar file (oql.g). Antlr will 
> then generate the parser runtime classes from that grammar file.

+1. In fact this makes it easy to test the grammar without even having a
database at hand. The unit tests simply input a JDOQL statement into the
parser and then check the resulting pb query.

> As far as I remember there is an ANTLR grammar for JDOQL in the JDO RI.
> This grammar could be a starting point for writing our own JDOQL -> 
> Query/Criteria grammar.

Nope, AFAIK, its only a recursive decent BNF of JDOQL which can be quite a
hassle to convert into LL(k) (it surely was with the Java grammar).

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