IPv6 mapped phrase not parsing MSVC2015
Michael Powell <[email protected]>
| Newsgroups | gmane.comp.parsers.spirit.general |
|---|---|
| Message-ID | <CAMEoF_GD3Kwgp5Bo2SMRODXRAOs8OpK1CoC71mhEy0xPUpeJXA@mail.gmail.com> |
Hello,
Merry Christmas!
The same phrases/grammar is working on GCC but does not appear to work
across platforms on Microsoft Visual C++ 2015.
https://wandbox.org/permlink/LDudwkvVa0M7J6z0
The first couple of IPv4 mapped phrase grammars work, no problem. But
when I jump into the third, all of a sudden there is a problem. I've
tried different iterations how to compose the grammar, all are
rejecting the test case:
// Micro-grammar representing the phrase: / [*1(h16 ":") h16] "::"
3(h16 ":") ls32
_ipv6_addr_base = lexeme[
_h16_col >> _h16 >> _col_x2 >> _h16_col >> _h16_col >> _h16
| /* */ _h16 >> _col_x2 >> _h16_col >> _h16_col >> _h16
| /* */ _col_x2 >> _h16_col >> _h16_col >> _h16
];
// or...
_ipv6_addr_base = lexeme[
-(_h16_col >> _h16
| /* */ _h16
) >> _col_x2 >> _h16_col >> _h16_col >> _h16
];
// or...
_ipv6_addr_base = lexeme[(
_h16_col >> _h16 >> _col_x2
| _h16 >> /* */ _col_x2
| /* */ _col_x2
) >> _h16_col >> _h16_col >> _h16
];
// The bit with the ':' delimiter is the odd exception to including
Colon in the address.
_start = _ipv6_addr_base >> col_ >> _ls32 >> eoi;
// The test case: "::c60:b132:f8e2:120.48.69.95"
The same grammar/test case in GCC appears to pass without difficulties.
Running with Boost version: '106501'
Parsing '::1234:3456:5678:0.12.234.50' -> ::1234:3456:5678:0.12.234.50 (PASS)
Phrase elements are composed in the same way across platforms using
Integer parsers, etc.
What is the cross platform issue with Boost.Spirit, then? Open to suggestions...
Cheers,
Michael Powell
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot