Opened 15 years ago
Closed 15 years ago
#1048 closed Bugs (fixed)
Spirit returns full = false in 1.34 if there is trailing spaces in input
Reported by: | Owned by: | Joel de Guzman | |
---|---|---|---|
Milestone: | To Be Determined | Component: | spirit |
Version: | Boost 1.34.0 | Severity: | Showstopper |
Keywords: | spirit space full | Cc: |
Description
In boost 1.34, if there is a trailing white space characters in an input sequence, parse returns with info.full set to false, even though parsing was (essentially) full. The space_p skip parser is ignored for the last sequence. In 1.33 parsing succeeds as expected.
Change History (4)
comment:1 by , 15 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Summary: | Spirit returns full = false in 1.3.4 if there is trailing spaces in input → Spirit returns full = false in 1.34 if there is trailing spaces in input |
comment:2 by , 15 years ago
Resolution: | wontfix |
---|---|
Status: | closed → reopened |
This new change in behaviour breaks the C parser example in the repository. Others in the repository may be broken as well, I haven't checked.
comment:3 by , 15 years ago
Owner: | set to |
---|---|
Status: | reopened → new |
comment:4 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Author (Hartmut Kaiser) notified and web-page note on this issue added. I shall close this now.
Note:
See TracTickets
for help on using tickets.
The change in behaviour was intentional. It was made on the grounds of consistency (parsers shouldn't consume any more output than what they have matched), as well as to avoid a hang when directly parsing stdin: namely, parse() would hang waiting for a non-whitespace character at the end of a match.
You may workaround this change by adding eps_p or end_p after your grammar, as in:
The 2nd option requires a full match, while the first one gets you the previous behaviour without making a full match obligatory.
Here's where the change was first announced, for context: