[antlr-interest] Re: Stream Positions

treyspiva Trey.Spiva at embarcadero.com
Mon Jan 7 13:32:50 PST 2002


I was not able to just override the consume() method because the 
lexer can backtrack adn teh same character position may be visted 
many times.

> I had to alter CharBuffer, CharScanner, CommonToken, InputBuffer,
> LexerSharedInputState, Token
> 
> I just wanted to know if you would like to put it in the Antlr 
build.  (I am
> working in C++)
> 
> -----Original Message-----
> From: Terence Parr [mailto:parrt at j...]
> Sent: Monday, January 07, 2002 12:45 PM
> To: antlr-interest at y...
> Subject: Re: [antlr-interest] Stream Positions
> 
> 
> On Friday, January 4, 2002, at 07:08  AM, treyspiva wrote:
> 
> > I have modified the C++ code to emit the starting stream position 
of
> > a token.  I found the stream position very usiful.  I was 
wondering
> > if I can get this into the C++ build.
> 
> Can't this be easily added by overriding consume() or something?
> 
> Ter
> --
> Chief Scientist & Co-founder, http://www.jguru.com
> Creator, ANTLR Parser Generator: http://www.antlr.org
> 
> 
> 
> 
> Your use of Yahoo! Groups is subject to 
http://docs.yahoo.com/info/terms/


 

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



More information about the antlr-interest mailing list