[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Token.setText()



Archie Cobbs wrote:
> 
> All my token classes are being generated with this method:
> 
>     public void setText(String text)
>     {
>         throw new RuntimeException("Cannot change TArrow text.");
>     }
> 

Variable text tokens will allow you to "setText". 

Fixed text tokens have a hardcoded text string. Obviously, the error
message should be customized on a token basis.

You have just uncovered a SableCC bug. The message should be: "Cannot
change Txxx text." where xxx is the name of a fixed text token.

A fixed text token is a token of the form:
  xxx = 'some text';

Etienne