Re: Are there any pure grammar examples available?

jamz@my-dejanews.com
24 Jul 1998 12:23:40 -0400

          From comp.compilers

Related articles
Are there any pure grammar examples available? russellf@selectst.com (Russ Freeman) (1998-07-20)
Re: Are there any pure grammar examples available? collins@cs.wm.edu (Bob Collins) (1998-07-21)
Re: Are there any pure grammar examples available? eodell@pobox.com (1998-07-21)
Re: Are there any pure grammar examples available? jamz@my-dejanews.com (1998-07-24)
| List of all articles for this month |

From: jamz@my-dejanews.com
Newsgroups: comp.compilers
Date: 24 Jul 1998 12:23:40 -0400
Organization: Deja News - The Leader in Internet Discussion
References: 98-07-145
Keywords: parse, syntax

    "Russ Freeman" <russellf@NOSPAM.selectst.com> wrote:
> What I mean by pure is a language grammar that has not been "re-jigged" to
> make parsing easier (e.g. LL(1)).


> It strikes me that such a form would be more useful as a basis for
> designing a clean and regular AST.


ANTLR <http://www.antlr.org> is an LL(k) parser with infinite lookahead
through syntactic predicates. I don't know what you mean by pure, but this
is much easier to write than strict LL(1). Since it is LL, you still have to
left factor, though.


I'm very happy with the ability to construct and manipulate ASTs with ANTLR.
It is easy to write tree parsers which use a tree grammar to walk through a
tree and make transformations.


Monty
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.