[antlr-interest] What is $Symbols

Terence Parr parrt at cs.usfca.edu
Mon Jun 25 17:57:21 PDT 2007


On Jun 26, 2007, at 12:00 AM, Paul Keir wrote:

> $Symbols is a stack of 'Symbols_scope' objects. 'Symbols_scope' is  
> defined as a protected class within the antlr-generated  
> *Parser.java code.
>
> My problem is that as my class is defined in its own file (to  
> permit step-debugging), I have a problem informing it about  
> 'Symbols_scope'. i.e. If I add a 'Symbols_scope' cast to the  
> my_method example from before...
>
> public void my_method(Stack sym) {
>  for (Object depth : sym)
>    ((Symbols_scope)depth).types.add("hello");   // e.g.
> }
>
> ...I am of course told that 'Symbols_scope' symbol cannot be found.  
> Can anyone help?

can you try parser.Symbols_scope type?

Ter



More information about the antlr-interest mailing list