[antlr-interest] gUnit special character escaping
    Andreas Bartho 
    andreas.bartho at inf.tu-dresden.de
       
    Wed Feb  6 10:15:46 PST 2008
    
    
  
Hi Ana,
have you tried
<< "ABC DE"
 >>
as described in the wiki?
Andreas
Ana Nelson wrote:
> I'm trying to write gUnit tests for expressions like
> 
> "ABC DE"\n
> 
> The quotes are part of the expression, so I've been trying to escape the 
> quotes and newline as follows to include them in my .testsuite file:
> 
> "\"ABC DE\"\n"
> 
> But, gUnit doesn't seem to like escaped quotes, or I'm not escaping them 
> properly. I've tried various alternatives but haven't found anything 
> that works. I have a clumsy workaround which is to put the quoted 
> expression "ABC DE" into an external text file.
> 
> If anyone knows the correct way of escaping quotes (and newlines) in 
> gUnit, or if someone can tell me that it's not possible, I would 
> appreciate it. I've looked in the gunit.jar source and see references to 
> escaped quotes in the parser grammar but can't manage to work that back 
> into how to write them.
> 
> Many thanks! :-)
> 
> Ana
> 
    
    
More information about the antlr-interest
mailing list