Opened 11 years ago
Closed 5 years ago
#6770 closed Bugs (fixed)
qi+lexer combination behaves differently when BOOST_SPIRIT_DEBUG is defined
| Reported by: | Owned by: | Hartmut Kaiser | |
|---|---|---|---|
| Milestone: | To Be Determined | Component: | spirit |
| Version: | Boost 1.49.0 | Severity: | Problem |
| Keywords: | lex qi debug | Cc: |
Description
I have a (buggy) grammar, in the course of debugging which I discovered that my grammar passes and consumes all input if BOOST_SPIRIT_DEBUG is true, but does not consume all input if it is not enabled. An (apparently) equivalent version that does not use the lexer does not exhibit this behavior.
Attachments (3)
Change History (8)
by , 11 years ago
| Attachment: | debug_fail_testcase.cpp added |
|---|
by , 11 years ago
| Attachment: | debug_fail_testcase.cpp.no_lexer added |
|---|
Version without lexer, no variation
comment:1 by , 11 years ago
| Owner: | changed from to |
|---|
comment:3 by , 10 years ago
I now believe this to be user error. Specifically, the correct guide to whether input has been consumed should be the iterator supplied to the parser, not the underlying iterator. So it is the lexer's output, not input, iterator I should be checking.
by , 10 years ago
| Attachment: | debug_fail_testcase.cpp.corrected added |
|---|
A revised example using the lexer token iterator instead, which produces the expected output (and does not vary with BOOST_SPIRIT_DEBUG)
comment:5 by , 5 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |

Version with lexer, exhibiting variation