Opened 7 years ago

Closed 4 years ago

#12138 closed Bugs (fixed)

Lex plain token range is always 1 token only

Reported by: edaskel@… Owned by: Joel de Guzman
Milestone: To Be Determined Component: spirit
Version: Boost 1.61.0 Severity: Problem
Keywords: Cc:

Description

There's a bug in plain_token_range such that only the "min" value is checked. It's pretty easy to see it at plain_token.hpp:162. Only "idmin" and not "idmax" participates in the range check:

                if (id_type(idmin) >= t.id() && id_type(idmin) <= t.id())

The fix is to replace the first occurrence of "idmin" in that line with "idmax".

Change History (5)

comment:1 by Joel de Guzman, 7 years ago

Please file a PR. Thanks!

comment:2 by edaskel@…, 7 years ago

OK! I should write a test too :) May be a little while. I have a workaround (explicit token list).

comment:4 by edaskel@…, 5 years ago

The PR was merged and we can close this bug :)

comment:5 by Joel de Guzman, 4 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.