diff options
author | Hop311 <Hop3114@gmail.com> | 2024-01-22 22:02:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-22 22:02:15 +0100 |
commit | 59ec8275b584d4a48f7836816114d4933c655799 (patch) | |
tree | f6be05b0720fb3bd4869b5cf28c6897dab914d0f /src/openvic-dataloader | |
parent | 77167fe3366b40b74abff45bcb62f7480963d617 (diff) | |
parent | 84a75359c2ac552f6904f944550ef2b672def844 (diff) |
Merge pull request #35 from OpenVicProject/windows-1251
Expanded v2script character list to support Windows-1251
Diffstat (limited to 'src/openvic-dataloader')
-rw-r--r-- | src/openvic-dataloader/v2script/SimpleGrammar.hpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/openvic-dataloader/v2script/SimpleGrammar.hpp b/src/openvic-dataloader/v2script/SimpleGrammar.hpp index e89f794..7a59123 100644 --- a/src/openvic-dataloader/v2script/SimpleGrammar.hpp +++ b/src/openvic-dataloader/v2script/SimpleGrammar.hpp @@ -43,7 +43,7 @@ namespace ovdl::v2script::grammar { * DAT-632 * DAT-635 */ - static constexpr auto data_specifier = + static constexpr auto windows_1252_data_specifier = lexy::dsl::ascii::alpha_digit_underscore / LEXY_ASCII_ONE_OF("+:@%&'-.") / lexy::dsl::lit_b<0x8A> / lexy::dsl::lit_b<0x8C> / lexy::dsl::lit_b<0x8E> / lexy::dsl::lit_b<0x92> / lexy::dsl::lit_b<0x97> / lexy::dsl::lit_b<0x9A> / lexy::dsl::lit_b<0x9C> / @@ -52,6 +52,17 @@ namespace ovdl::v2script::grammar { detail::lexydsl::make_range<0xD8, 0xF6>() / detail::lexydsl::make_range<0xF8, 0xFF>(); + static constexpr auto windows_1251_data_specifier_additions = + detail::lexydsl::make_range<0x80, 0x81>() / lexy::dsl::lit_b<0x83> / lexy::dsl::lit_b<0x8D> / lexy::dsl::lit_b<0x8F> / + lexy::dsl::lit_b<0x90> / lexy::dsl::lit_b<0x9D> / lexy::dsl::lit_b<0x9F> / + detail::lexydsl::make_range<0xA1, 0xA3>() / lexy::dsl::lit_b<0xA5> / lexy::dsl::lit_b<0xA8> / lexy::dsl::lit_b<0xAA> / + lexy::dsl::lit_b<0xAF> / + detail::lexydsl::make_range<0xB2, 0xB4>() / lexy::dsl::lit_b<0xB8> / lexy::dsl::lit_b<0xBA> / + detail::lexydsl::make_range<0xBC, 0xBF>() / + lexy::dsl::lit_b<0xD7> / lexy::dsl::lit_b<0xF7>; + + static constexpr auto data_specifier = windows_1252_data_specifier / windows_1251_data_specifier_additions; + static constexpr auto data_char_class = LEXY_CHAR_CLASS("DataSpecifier", data_specifier); static constexpr auto escaped_symbols = lexy::symbol_table<char> // |