db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Mahler <thm...@web.de>
Subject Re: Need Help with JDOQL Compiler/Interpreter
Date Mon, 03 May 2004 05:45:36 GMT
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.

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.

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.

cheers,
Thomas


Brian McCallister wrote:
> My knowledge of compilers/interpreters is nil. I'd really appreciate 
> some help figuring out how to do JDOQL in a reasonable way!
> 
> There is BNF for it in the JDO spec, and it looks pretty basic -- but 
> the naive hack I will wind up throwing together if I tackle it will be 
> just that.
> 
> -Brian
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
> 
> 


---------------------------------------------------------------------
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