Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#3086 closed Bugs (wontfix)

Space skip parser doesn't skip trailing spaces

Reported by: olafvdspek@… 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 zaravalle@…, 13 years ago

Resolution: invalid
Status: newclosed

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.

comment:2 by OlafvdSpek@…, 13 years ago

Resolution: invalid
Status: closedreopened

AFAIK, parser should

Why?

comment:3 by anonymous, 13 years ago

Guys, please see http://spirit.sourceforge.net/ and the note in red titled: Post-skips

comment:4 by OlafvdSpek@…, 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 Joel de Guzman, 13 years ago

Resolution: wontfix
Status: reopenedclosed

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 OlafvdSpek@…, 13 years ago

What about this part?

but it should at least be mentioned in the Spirit documentation and examples.

comment:7 by Joel de Guzman, 13 years ago

Noted. Please add a trac ticket for this.

comment:8 by OlafvdSpek@…, 13 years ago

Eh, this *is* a trac ticket, isn't it?

comment:9 by Joel de Guzman, 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 anonymous, 13 years ago

Done: https://svn.boost.org/trac/boost/ticket/3099

It would be way easier if existing reports could just be reassigned...

comment:11 by Joel de Guzman, 13 years ago

Thank you.

Note: See TracTickets for help on using tickets.