Re: HELP: Using an abstract syntax tree for semantic checking

thetick@magelang.com (Scott Stanchfield)
7 May 1998 16:55:58 -0400

          From comp.compilers

Related articles
HELP: Using an abstract syntax tree for semantic checking nealh@dinigroup.com (Neal Harder) (1998-05-04)
Re: HELP: Using an abstract syntax tree for semantic checking chase@naturalbridge.com (David Chase) (1998-05-07)
Re: HELP: Using an abstract syntax tree for semantic checking dwight@pentasoft.com (1998-05-07)
Re: HELP: Using an abstract syntax tree for semantic checking rod.bates@wichita.boeing.com (Rodney M. Bates) (1998-05-07)
Re: HELP: Using an abstract syntax tree for semantic checking thetick@magelang.com (1998-05-07)
Re: HELP: Using an abstract syntax tree for semantic checking donham@linex.com (Jake Donham) (1998-05-07)
Re: HELP: Using an abstract syntax tree for semantic checking ndc@alum.mit.edu (N. D. Culver) (1998-05-07)
Re: HELP: Using an abstract syntax tree for semantic checking adrian@dcs.rhbnc.ac.uk (1998-05-07)
Re: HELP: Using an abstract syntax tree for semantic checking danwang+news@CS.Princeton.EDU (Daniel C. Wang) (1998-05-12)
Re: HELP: Using an abstract syntax tree for semantic checking cfc@world.std.com (Chris F Clark) (1998-05-12)
| List of all articles for this month |
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
--


Post a followup to this message

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