lug icon indicating copy to clipboard operation
lug copied to clipboard

Support compile-time character encoding parameterization

Open jwtowner opened this issue 1 year ago • 0 comments
trafficstars

UTF-8 support is not always needed. Often times, ASCII is all you need. Being able to parameterize the parser at compile time with the desired encoding would improve performance and potentially eliminate pulling in the Unicode tables. This could be highly desirable for future compile-time parsing scenarios in C++23 and beyond.

Investigate turning the lug::parser class into a lug::basic_parser template that takes the character encoding class as a template parameter. For a starting point, both ASCII and UTF-8 character encodings should be supported. A type alias of lug::parser can then be introduced to maintain the existing behavior with full Unicode support.

This feature might also make it easier to perform byte level parsing of binary file formats.

jwtowner avatar Jun 22 '24 01:06 jwtowner