|[2 earlier articles]|
|Re: LL1 program ??? firstname.lastname@example.org (Joachim Durchholz) (1998-07-03)|
|Re: LL1 program ??? email@example.com (Janaki S) (1998-07-10)|
|Re: LL1 program ??? firstname.lastname@example.org (1998-07-11)|
|Re: LL1 program ??? email@example.com (Joachim Durchholz) (1998-07-13)|
|Re: LL1 program ??? firstname.lastname@example.org (Rodney M. Bates) (1998-07-20)|
|Re: LL1 program ??? email@example.com (Jerry Leichter) (1998-07-21)|
|Re: LL1 program ??? firstname.lastname@example.org (1998-07-24)|
|Date:||24 Jul 1998 12:23:24 -0400|
|Organization:||Deja News - The Leader in Internet Discussion|
|References:||98-07-009 98-07-033 98-07-098 98-07-110 98-07-129|
"Rodney M. Bates" <email@example.com> wrote:
> This also relates to the question of what constitutes an abstract
> syntax tree and how does it relate to a derivation tree. Again, I
> think I have a good intuition about this, but I don't know how to
> describe it formally. I suspect that grammar rewrites which preserve
> what we want them to might give the same or similar ASTs, if it were
> somehow defined what that meant.
> I think the theory of formal languages it missing some things, if it
> is to be a basis for writing compilers etc. Or am I missing some
One toolkit which might interest you is the ANTLR toolkit from
www.antlr.org. Lot's of the features in it were inspired by the lack
of practical methods from the theory side of parsing. It has had a
long history of use and has incorporated many features from feedback
on big projects. ANTLR 2 was a complete rewrite from scratch and is
For compilers and translators, I find its grammar inheritence very
useful. Typically one pass through the tree will only change a small
part of the syntax, if it changes any syntax at all. It really
depends on how close your input language is to the output language.
It also uses the same basic parsing model for lexing, parsing, and
tree parsing, which makes it easier to learn. The biggest advantage,
though, is that it generates human-readable code, so you can easily
see what it is doing from the rules you wrote.
There are many good papers on the site which describe why the author
considers his approach more practical than a lot of the theory which
is out there.
Return to the
Search the comp.compilers archives again.