[antlr-interest] illegal option output and ! operator
testn
test1 at doramail.com
Mon Dec 21 20:08:54 PST 2009
It used to work in ANTLR 2, though....
Gavin Lambert wrote:
>
> At 03:45 19/12/2009, Rick Schumeyer wrote:
>>The following rule generates an "illegal option output" error
>>when I attempt to generate code in antrlworks 1.3.1.
>>
>>EQUOTE : '\\'! '"';
>>
>>I see that others have had the same problem, but I couldn't find
>>the solution.
>>
>>Is the ! operator supposed to work in a non-AST grammar?
>
> No, and not in the lexer. Instead of using !, you need to
> explicitly set the text of the token via { $text = "xxx"; } or {
> setText("xxx"); } or something similar, depending on your target
> language. See the examples and the wiki.
>
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe:
> http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>
>
--
View this message in context: http://n2.nabble.com/illegal-option-output-and-operator-tp4186924p4201949.html
Sent from the ANTLR mailing list archive at Nabble.com.
More information about the antlr-interest
mailing list