Hello :)
I've got this simple parser intended to parse VB style double quoted strings. Thus, the parser should turn something like
"This is a quoted string containing quotes ("" "")"
into an output of
This is a quoted string containing quotes (" ")
Here is the grammar I came up with for this:
namespace qi = boost::spirit::qi;
namespace wide = qi::standard_wide;
class ConfigurationParser : public qi::grammar<std::wstring::iterator, std::wstring()>
{
qi::rule<std::wstring::iterator, std::wstring()> quotedString;
qi::rule<std::wstring::iterator> doubleQuote;
public:
ConfigurationParser() : ConfigurationParser::base_type(quotedString, "vFind Command Line")
{
doubleQuote = (wide::char_(L'"') >> wide::char_(L'"'));
quotedString = L'"' >> +(doubleQuote[qi::_val = L'"'] | (wide::char_ - L'"'))>> L'"';
}
};
However, the attribute I'm getting is a single quote mark ("), rather than the full parsed message.