|generating recursive parsers from grammars. email@example.com (Ralph Boland) (2006-02-03)|
|Re: generating recursive parsers from grammars. firstname.lastname@example.org (Peter Gammie) (2006-02-06)|
|Re: generating recursive parsers from grammars. email@example.com (Josef Grosch) (2006-02-06)|
|Re: generating recursive parsers from grammars. firstname.lastname@example.org (2006-02-07)|
|generating recursive parsers from grammars. email@example.com (Lowell Thomas) (2006-02-20)|
|From:||"Lowell Thomas" <firstname.lastname@example.org>|
|Date:||20 Feb 2006 21:41:32 -0500|
|Posted-Date:||20 Feb 2006 21:41:32 EST|
You might have a look at APG, an ABNF Parser Generator tool that I have
written (www.coasttocoastresearch.com). Its parsers use a recursive-decent
algorithm and as far as I can determine they can handle any context-free
grammar. With ABNF left recursion can be eliminated via the repetition (*)
operator. Other types of recursion, except for cyclical recursion and
infinite strings, are not a problem. It uses a hard-coded disambiguation
rule to resolve ambiguities, but the source code is available other rules
can be implemented. It is not a mainstream method but I have found it to
work well for all grammars that I have tried so far, including
dangling-else, expressions and an expression/declaration abstraction that
requires semantic predicates.
I'd be interested in hearing about your experience with APG if you decide to
give it a try.
Return to the
Search the comp.compilers archives again.