[antlr-interest] how to pass object from parser to walker
Micheal J
open.zone at virgin.net
Mon Jun 19 09:28:46 PDT 2006
> Hi,
>
> I created a symbol table in parser then want to use it for
> type checking in walker. Is there a way to pass this object
> into walker? The working language is c#.
1. Create your own custom constructor that accepts a symbolTable in the code
section of the ANTLR grammar file for your walker.
2. You can also defined a [private] SymbolTable field for you walker in the
code section.
3. Use symbolTable field in your action code.
Micheal
-----------------------
The best way to contact me is via the list/forum. My time is very limited.
More information about the antlr-interest
mailing list