[antlr-interest] not operator and sets

Terence Parr parrt at jguru.com
Wed Jun 12 10:45:19 PDT 2002


On Friday, June 7, 2002, at 12:38  AM, gertgrossmann wrote:

> what is the reason to deny mixing of token references and character
> literals in a negated set like this:
>
> STAR : '*';
> NEGTEST: '+' ~( ';' | STAR | '-');   <- not allowed :(

The reason is that STAR might execute actions rather than just match 
chars.  ANTLR isn't currently smart enough to replace a rule ref with a 
set if no actions are there.  Sorry.

Ter
--
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/ 



More information about the antlr-interest mailing list