db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian McCallister <mccallis...@forthillcompany.com>
Subject Re: Need Help with JDOQL Compiler/Interpreter
Date Mon, 03 May 2004 11:50:53 GMT
No deadline -- but it's the biggest thing blocking JDO progress at the 
moment. That said, once JDOQL is in place, the next biggest thing 
becomes the biggest thing...

The BNF is published as part of the specification, so if the JDORI and 
spec grammars match, I think it would be safe to use the JDORI one. If 
it isn't, I'll happily type in the one from the spec if you can make it 
do something useful!

Thank You!

-Brian

On May 3, 2004, at 2:23 AM, Thomas Dudziak wrote:

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



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