From: | thetick@magelang.com (Scott Stanchfield) |
Newsgroups: | comp.compilers |
Date: | 7 May 1998 16:55:58 -0400 |
Organization: | MageLang Institute |
References: | 98-05-004 |
Keywords: | parse, semantics |
In article 98-05-004, nealh@dinigroup.com says...
> [question RE use of "parse tree" in multi-pass parser/compiler]
Take a peek at ANTLR (http://www.antlr.org). I realize it's a bit
late to suggest a parser-generator change, but the approach with ANTLR
is that it can automatically generate ASTs based on the parse, then
you can define a _grammar_ that describes the tree, and add actions
within that grammar.
The second grammar, which we call a tree-walker grammar, generates a
recursive-desecent tree walker with actions to take when matching
subtrees (as opposed to a normal parser, where actions are taken when
token sequences are matched.)
-- Scott
Scott Stanchfield, Santa Cruz, California, USA
mailto:thetick@magelang.com http://www.scruz.net/~thetick
MageLang Institute - We serve the best Java education!
http://www.MageLang.com
VisualAge for Java FAQ & Tips and Tricks
http://www.scruz.net/~thetick/visualage
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.