[antlr-interest] Possible bug in Antlr.g

Ric Klaren klaren at cs.utwente.nl
Thu May 30 09:28:04 PDT 2002


Hi,

On Thu, May 30, 2002 at 10:04:40AM -0600, Trey Spiva wrote:
> CHAR_LITERAL is defined as 
>  
> CHAR_LITERAL
>    :  '\'' (ESC|~'\'') '\''
>    ;
..
> It seems to me that CHAR_LITERAL will only correctly match '\3' it will not
> match '\377' because 
> the rule does not have an (ESC|~'\'')*

But the ESC rule will match \377 (if I'm not off :) ) representing one
charachter. And in the other case it will match just one char '~'\'' which
seems to be ok to me.

Cheers,

Ric
--
-----+++++*****************************************************+++++++++-------
    ---- Ric Klaren ----- klaren at cs.utwente.nl ----- +31 53 4893722  ----
-----+++++*****************************************************+++++++++-------
     Human beings, who are almost unique in having the ability to learn
   from the experience of others, are also remarkable for their apparent
         disinclination to do so. --- Douglas Adams, Last Chance to See


 

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



More information about the antlr-interest mailing list