Different character for string quotes (parser)

Feb 13, 2010 at 7:14 AM


I've been trying to use Flee for this type of problems: http://www.denismo.name/b2evolution/index.php?blog=5&p=43&more=1&c=1&tb=1&pb=1

Because Flee is used withing XAML, the default quote character cannot be used - XAML parser does not allow this character to be used withing an attribute expression. I had to change Flee to support different quote character:

// Old string quote character
// STRING_LITERAL             = <<"([^"\r\n\\]|\\u[0-9a-f]{4}|\\[\\"'trn])*">>
STRING_LITERAL             = <<`([^`\r\n\\]|\\u[0-9a-f]{4}|\\[\\`"'trn])*`>>

It may be hard to read - it is U+0060 instead of U+0022. At the moment, I've modified the source, but this creates the problem with licensing (I hope to be able to use it in a commercial project as well). I was wondering if you were planning to add an option to Flee (I can provide a patch if you want) ExpressionParserOptions which would allow specifying the character used for marking string literals?