[antlr-interest] Persistent symbol table?

Johannes Luber jaluber at gmx.de
Tue Nov 20 06:11:56 PST 2007


Damir Kirasić wrote:
> Hello everybody,
> 
>  
> 
> We are using antlr 3 and
> 
> would like to have a symbol table
> 
> (global scope) that would survive parser completion.
> 
> Any suggestions how to implement persistency?

Usually you use some instance member to store and update the symbol
table. You could copy the entries of global scopes in an @after action
for the start rule. Add then in @parser::members a getSymbolTable()
method and access the data afterwards.

Johannes


More information about the antlr-interest mailing list