#3086 closed Bugs (wontfix)
Space skip parser doesn't skip trailing spaces
Reported by: | Owned by: | Joel de Guzman | |
---|---|---|---|
Milestone: | Boost 1.40.0 | Component: | spirit |
Version: | Boost 1.39.0 | Severity: | Problem |
Keywords: | Cc: |
Description
#include <cassert> #include <boost/spirit/include/classic.hpp> using namespace BOOST_SPIRIT_CLASSIC_NS; int main() { parse_info<> result = parse(" 5 ", int_p, space_p); assert(result.full); return 0; }
Change History (11)
comment:1 by , 13 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:3 by , 13 years ago
Guys, please see http://spirit.sourceforge.net/ and the note in red titled: Post-skips
comment:4 by , 13 years ago
I don't agree with that work around, but it should at least be mentioned in the Spirit documentation and examples.
comment:5 by , 13 years ago
Resolution: | → wontfix |
---|---|
Status: | reopened → closed |
Feel free to voice out your objection to spirit's mailing list. FWIW, the new spirit2 has some defaults that does post skipping and a flag parameter to disable it. Unfortunately, we do not intend to change the behavior for "classic" spirit anymore since it is now in maintenance mode. But then again, I urge you to voice out your concern if you really need to. In the meantime, I'll be closing this ticket.
comment:6 by , 13 years ago
What about this part?
but it should at least be mentioned in the Spirit documentation and examples.
comment:9 by , 13 years ago
Yes, but it is the wrong ticket. You want documentation and examples, not bug fixing. It is better to have another "support" related trac ticket asking exactly what you want. Otherwise, this will flag the wrong message.
comment:10 by , 13 years ago
Done: https://svn.boost.org/trac/boost/ticket/3099
It would be way easier if existing reports could just be reassigned...
AFAIK, parser should skip spaces until reaching the int, and should consume while reading the int and stop after that. So, it should not skip trailing spaces in this case.