[antlr-interest] Can Resolvers etc be written as ANTLR tree parsers?
John D. Mitchell
johnm-antlr at non.net
Mon Jan 13 17:24:43 PST 2003
>>>>> "micheal" == micheal jor <open zone at virgin net> <open.zone at virgin.net> writes:
> Hi,
[...]
> I am a total ANTLR TreeParser newbie. Having read the docs again, I felt
> that Resolvers and SymbolTale population are things that it should be
> possible for a TreeParser to do. Am I right or have I missed something
> fundamentally?
That sounds like a tautology...
Sure, you can walk a tree and gather whatever information is available from
the tree.
The trick is to build the initial AST with sufficient information. :-)
A canonical example seems to be mapping back to the source with position
information.
Remember that you can:
* make multiple passes over the tree
* transform the tree into "better" trees
* create auxiliary structues that you thread through the tree
> If there are examples of resolvers etc written as ANTLR tree parsers, I'd
> appreciate a link/sample.
In this context, what do you mean by "resolvers"?
Take care,
John
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list