Re: Parser does not parse
Mike Gresens <[email protected]>
| Newsgroups | gmane.comp.parsers.spirit.general |
|---|---|
| Message-ID | <[email protected]> |
I want to advice you to:
1) Make small rules
2) Give them names
3) Use these rules multiple times
4) Don't write "big" rules!
5) Use a try-catch-block, like:
try
{
parsing...
}
catch(const expectation_failure<iterator_t>& e)
{
std::cout << "expected: " << e.what_ << std::endl;
}
Then you will see:
The parser expects a "=" because the "e" of "endif" (or "i" of "if") matches
char_("a-zA-Z0-9") so the parser expects "=" next. But there is no "=" in
your source string.
Note: There is no need for so many brackets...
Best regards,
Mike...
--
View this message in context: http://boost.2283326.n4.nabble.com/Parser-does-not-parse-tp4690084p4690090.html
Sent from the spirit-general mailing list archive at Nabble.com.
------------------------------------------------------------------------------