make 'closing' quote an optional

This commit is contained in:
artemp 2015-06-18 14:09:33 +02:00
parent d893718343
commit 69236137e5

View file

@ -70,7 +70,7 @@ struct csv_line_grammar : qi::grammar<Iterator, csv_line(std::string const&), qi
;
text = *(unesc_char | (char_ - char_(_r1)))
;
quoted = omit[char_("\"'")[_a = _1]] >> text(_a)[_val = _1] >> lit(_a)
quoted = omit[char_("\"'")[_a = _1]] >> text(_a)[_val = _1] >> -lit(_a)
;
BOOST_SPIRIT_DEBUG_NODES((line)(column)(quoted));
}