[antlr-interest] symbol table in antlr

Bryan Ewbank ewbank at gmail.com
Mon Jun 27 16:16:15 PDT 2005


There's no built in symbol table available; ANTLR provides a mechanism
for defining your lex/parse/transform pipeline.  It is your
application code that will have to manage a symbol table (push, pop,
find) as defined by the semantics of your input language.

Without making it sounds trite, the way to incorporate symbol tables
is to write them.

I see you're at redhat; are you by chance located in RTP?  It's a long
shot, I know, but I'm curious if there's other ANTLRites around here.

On 6/27/05, Tarun Khanna <tkhanna at redhat.com> wrote:
> I am trying to write a lexer/parser for a language similar to C++. Does
> ANTLR provide an inbuilt way to handle symbol tables or do we have to
> initialize our own symbol tables and populate them using actions.
> 
> In other words what would be the best way to incorporate symbol tables
> when using ANTLR with JAVA.


More information about the antlr-interest mailing list