[antlr-interest] Re: A question about extracting comments

Brian Smith brian-l-smith at uiowa.edu
Fri Oct 11 10:32:31 PDT 2002


Put "rem" into the lexer's tokens table. That is the technique I use.

Fan Yang wrote:
> Hi,
> 
> Thank you very much for your response.
> 
> I have already tried to use k=4 for 4 characters look ahead. But it 
> didn't work; it still gave me the following warning.
> 
> warning: lexical nondeterminism between rules COMMENT and IDENT upon
> MyVB.g:0:       k==1:'r'
> MyVB.g:0:       k==2:'0'..'9','_','a'..'z'
> MyVB.g:0:       k==3:<end-of-token>,'0'..'9','_','a'..'z'
> MyVB.g:0:       k==4:<end-of-token>,'0'..'9','_','a'..'z'
> 
> Is it possible to put "rem" into literal table(I know it's possible 
> for parser not for lexer)? because I have given  the options 
> {testLiterals=true;} for IDENT. or someway else?


 

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



More information about the antlr-interest mailing list