Antlr is LL(*), but LL can't handle direct/indirect recursion, which is a
matter of grammar rules. Direct recursion is easier to handle, but indirect
recursion makes my head hurt :)


On Wed, Jan 4, 2012 at 4:02 PM, Thomas Beale <
thomas.beale at oceaninformatics.com> wrote:

> On 04/01/2012 15:37, Seref Arikan wrote:
> > Greetings,
> > The AQL grammar from the wiki has direct and indirect left recursion.
> > Which means without changes in the grammar, LL parser generators (both
> > JavaCC and Anltr) can't generate parsers for this grammar.
> >
> > I'm curious if anybody has refactored this grammar for LL parser
> > generators. Shinji? Your latest release includes an AQL parser does
> > not it? Could you please share your method? I can always look at the
> > code, but you'd probably save me time :)
> >
> > I'm interested in experiences of others too.
>
> there is no guarantee that the current grammar is the best one, and in
> my view, a better grammar could be developed. We just need to make sure
> it deals with the typical queries we write, and ones that are already
> written (or at least that the latter could safely be translated).
>
> Other thing to keep in mind: many non-LL grammars are probably
> computable as LL grammars with sufficient tokens of lookahead.
>
> - thomas
>
> _______________________________________________
> openEHR-technical mailing list
> openEHR-technical at openehr.org
> http://lists.chime.ucl.ac.uk/mailman/listinfo/openehr-technical
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.openehr.org/mailman/private/openehr-technical_lists.openehr.org/attachments/20120104/06d0c6c7/attachment.html>

Reply via email to