[antlr-interest] gUnit special character escaping

Ana Nelson nelson.ana at gmail.com
Wed Feb 6 09:37:17 PST 2008


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080206/dbcc1828/attachment-0001.html 


More information about the antlr-interest mailing list