[antlr-interest] Escaping quotes in a lexer
antlr at mirality.co.nz
Wed Mar 25 02:21:55 PDT 2009
At 22:04 25/03/2009, Emanuele Gesuato wrote:
>I'm sorry i haven't understad how could i use your code snippet.
>I've tried to prefix/append your snippet to my code but antlr
>refuses to compile.
>> STRING : '\'' ('\\' ('\'')? | ~('\\' | '\''))* '\'';
The rule I posted was for v3. If you're using v2 then you'll need
to use " quotes instead of ' quotes.
More information about the antlr-interest