[antlr-interest] lexer rule for string
krupa_gadde at yahoo.com
Tue Oct 15 23:08:43 PDT 2002
Include "\\" also as part of you lexer for string. I
guess this should solve your problem.
--- stephane brossier <dognogod at yahoo.com> wrote: >
> I am trying to recognize some strings in a C
> I first had a lexer rule defined as is:
> STRING: '"' ~'"' '"';
> This worked pretty well until I had some traces
> printf("The string is \" the_string \" ");
> How can i make the lexer understand that \" is not
> end of my string but is actually part of my string
> since there is an escape char before?
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest