Special Characters in StringLiteral

Jun 8, 2012 at 8:10 AM

Hi,

First of all i would like to say that after testing multiple parsing kits, this open source project is by far the best on the .Net platform if not all platforms.

and now to get back on the topic of the discussion :)

I am trying to get the following special characters accepted in a string when using stringliterals:

"check of cable1 is ok (" ~ $Cable1.UC ~ ")";

I have tried all the StringOptions to get this text accepted, but it gives me an error on the ~ sign and the double quotes.

Out of desperation i even configured my stringliteral like this:

StringLiteral str = new StringLiteral("str", "\"",StringOptions.AllowsAllEscapes | StringOptions.AllowsDoubledQuote |  StringOptions.AllowsLineBreak | StringOptions.AllowsOctalEscapes 
| StringOptions.AllowsUEscapes | StringOptions.AllowsXEscapes);

 

But i haven't been able to get that working. Any suggestions regarding the matter would be greatly appreciated :)

 

 

 

Jun 8, 2012 at 8:37 AM

Never mind, Just figured out why i should have my coffee early in the morning before starting to code :)

My rule was not set up correctly to work with quotes so after the second quote, the string literal had ended and the rest because unrecognized string that werent part of the rule anymore.

Coffee+ enough sleep = good coding