[antlr-interest] Re: upgrade question

Terence Parr parrt at jguru.com
Tue Feb 19 12:19:03 PST 2002

On Tuesday, February 19, 2002, at 12:14  PM, nagii5 wrote:

> pardon my ignorance...
> Would that mean i should increase the lookahead to the maximum
> needed for this grammer
> i.e if i had to look for everything but </somelongelement>
> then should i set k = "</somelongelement>".length();

An excellent question.  The answer is yes, but that should start 
indicating another solution is better.  You could have the lexer match 
<anytag> and </anytag> and then use a stack to make sure they line up :)



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

More information about the antlr-interest mailing list