[antlr-interest] I got the parsing, now how do I do something useful ?
Terence Parr
parrt at jguru.com
Thu Feb 27 11:18:09 PST 2003
On Thursday, February 27, 2003, at 10:59 AM, Tiller, Michael (M.M.)
wrote:
> I am in a similar boat. I've built a lexer and a parser.
> Furthermore, I have used the AST generation directives to create an
> AST that has the information I need in it. Finally, I have a
> treewalker that I have used to walk the resulting ASTs (for complex
> test cases).
>
> In summary, I have everything I need to get to the complete AST. Now
> what?
>
> In some sense, I know what I need to do to get to my final goal (which
> is an elaborated version of my initial tree), but I have these nagging
> questions:
>
> 1) Are there any tools (beyond the tree walker) that I can use for
> elaboration of my AST.
>
> 2) I expect to have to make many passes over my tree (which I can do
> with a tree walker), to do semantic checking before I finally
> elaborate the tree. How do I store the data that I collect on these
> passes? Should I store it on each AST node somehow (with some
> auxiliary "collection" objects) or should I somehow collect it at a
> global level using the AST node as a form of key?
>
> Actually, those are the only questions I can think of off the top of
> my head. Once I have some time to move beyond the tree construction
> phase, I'm sure I'll have more.
Keep the questions coming...I'll build them into my lectures when I get
to that :)
Ter
--
Co-founder, http://www.jguru.com
Creator, ANTLR Parser Generator: http://www.antlr.org
Lecturer in Comp. Sci., University of San Francisco
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list