[antlr-interest] Error in 2.7.2

Terence Parr parrt at jguru.com
Mon Jun 2 09:52:21 PDT 2003


On Friday, May 30, 2003, at 06:06  PM, Matthew Ford wrote:

> I downloaded 2.7.2 final.  There is an error in the ANTLR Parser
>
> I am getting the following error
>     [antlr] ANTLR Parser Generator   Version 2.7.2   1989-2003 
> jGuru.com
>     [antlr] C:\temp\antlrTest\links.g:107: warning:lexical 
> nondeterminism
> between alts 1 and 2 of block upon
>     [antlr] C:\temp\antlrTest\links.g:107:
> k==1:'\t','\n','\u000c','\r',' '
>     [antlr] C:\temp\antlrTest\links.g:107:     k==2:<end-of-token>
>
> with (full code below)
>
> protected
> SCARF
>  : WS // track line numbers while you scarf
>  | . {}
>  ;
>
> while
> protected
> SCARF
>  : WS // track line numbers while you scarf
>  | .
>  ;
>
> gives no errors

Ah.  Yes, i use "is wildcard alone in the alt" rather than a more 
intelligent but more difficult version that ignores actions.  Sorry 
about that. :(  You can just put into a subrule and then put action at 
the end.

Ter
--
Co-founder, http://www.jguru.com
Creator, ANTLR Parser Generator: http://www.antlr.org
Co-founder, http://www.peerscope.com link sharing, pure-n-simple
Lecturer in Comp. Sci., University of San Francisco


 

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




More information about the antlr-interest mailing list