[antlr-interest] Avoiding warnings without code bloat

David Piepgrass qwertie256 at gmail.com
Mon Jun 25 16:20:35 PDT 2007


> fragment ESC_SEQ:
>         | '\\r' {$text = "\r";}
>         | '\\n' {$text = "\n";}
>         | '\\t' {$text = "\t";}
...
> If the C example gives no warnings, I don't know why there is a difference.

Oops, I found the problem. It's a silly mistake. My code should be

> fragment ESC_SEQ:
>           '\\r' {$text = "\r";}
>         | '\\n' {$text = "\n";}
>         | '\\t' {$text = "\t";}
...


More information about the antlr-interest mailing list