taocpp / PEGTL

Parsing Expression Grammar Template Library
Boost Software License 1.0
1.94k stars 228 forks source link

minor bug in abnf2pegtl #41

Closed cppden closed 7 years ago

cppden commented 7 years ago

~> cat q.abnf quoted-pair = "\" (%x00-09 / %x0B-0C / %x0E-7F)

~> ./abnf2pegtl q.abnf struct quoted_pair : pegtl::seq< pegtl::one< '\' >, pegtl::sor< pegtl::range< 0x00, 0x09 >, pegtl::range< 0x0B, 0x0C >, pegtl::range< 0x0E, 0x7F > > > {};

Note that "\" from abnf was converted to '\' with just one backslash, i.e. malformed char.

d-frey commented 7 years ago

Thanks for catching this, I guess I really need to add some unit-tests before moving it from example/ to some more official place/state :)