[antlr-interest] Re: Token.filename being ignored - solutions

antlrlist antlrlist at yahoo.com
Wed Jun 11 11:59:37 PDT 2003


I feel ashamed...

I did't know one could override protected members in java, like in 
C++. I thought "protected" meant "package" in java, which is 
completely wrong...

Sometimes I'm soooo dumb -__- ...

Thanks again, Monty. You were of great help! (however, I still think 
makeToken should authomatically do the filename thing... it's up to 
the Token class to determine if it uses the information or not)

Enrique.


--- In antlr-interest at yahoogroups.com, mzukowski at y... wrote:
> See the gcc code for the lexer.  I override makeToken() just fine.  
You do
> it by declaring that method in the generated lexer (in your .g 
file).  It's
> a subclass of antlr.CharScanner, so it's ok to override it.
> 
> http://www.codetransform.com/gcc.html
> 
> Monty
> 



 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 




More information about the antlr-interest mailing list