[antlr-interest] Verbatim string literal in C#

X f linkspeed2000 at yahoo.com
Tue Mar 11 01:47:00 PST 2003


Hi, All:
  How can I express a lexer rule to parse verbatime
  literal string in C#? This literal starts by '@"'
  and stop by '"'. It can not have a single " in
between, but can have double quote ("") as quote
escape. 

   I used:
VERBATIM_LITERAL 
  : '@' '"' ( (~'"' ~'"') | '"' '"'  )* '"'	
  ;

   It seems it can only work on @"""", If I put 
  @" aaa ", it will treat the last " as illegal
character

Cheers
linkspeed

__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list